Why I can not push an RGBA image to OBS

YooM

New Member
Hi,
I implemented a sources plug-in that produces RGBA images continuously,now I want to send RGBA data to OBS.

In bool obs_module_load(void) I created a thread:
h_tStitcher = CreateThread(NULL, 0, stitcherThread,NULL, 0, NULL);
This thread will push the image by calling CALLBACK

In Callback,I have:
uchar *p_data;int x,y;
p_data is a pointer to RGBA data,x,y is the length and width
and I use:
obs_source_frame *p_outData = NULL;
p_outData = (obs_source_frame*)bzalloc(sizeof(obs_source_frame));
p_outData->data[0]=(uint8_t*)data;
p_outData->linesize[0] = x * 4;
p_outData->height = y;
p_outData->width= x;
p_outData->timestamp = os_gettime_ns();
p_outData->format = VIDEO_FORMAT_RGBA;
obs_source_output_video(p_obsStitcher->source, p_outData);

but nothing happened
I have verified the correctness of data and xy
 
Top