Why my source can not be streamlined

YooM

New Member
Hi:
I'm trying to make a plugin to put the RGBA image in BUFF in OBS,It works
无标题.jpg

But when I open RTMP I can not see that image,why?
I register the plug-in like this:
obs_source_info t_stitcherInfo;
t_stitcherInfo.type = OBS_SOURCE_TYPE_INPUT;
t_stitcherInfo.output_flags = OBS_SOURCE_VIDEO;
......
t_stitcherInfo::show = stitcher_source_show;
t_stitcherInfo::video_render = stitcher_source_render;
And stitcher_source_show function like this:
static void
stitcher_source_show(void *data){
StitchStruct* p_thisStitcher = (StitchStruct*)data;
if (p_thisStitcher->b_isPayloadFull) {
obs_enter_graphics();
obs_source_draw(p_thisStitcher->p_outImg->texture, 0,0,0,0,0);
obs_leave_graphics();
p_thisStitcher->b_isPayloadFull = false;
}
}
And stitcher_source_render function like this:
static void
stitcher_source_render(void *data, gs_effect_t *effect){
StitchStruct* p_thisStitcher = (StitchStruct*)data;
p_thisStitcher->b_bootOK = true;
if (p_thisStitcher->b_isPayloadFull) {
obs_enter_graphics();
gs_effect_set_texture(gs_effect_get_param_by_name(effect, "image"),
p_thisStitcher->p_outImg->texture);
gs_draw_sprite(p_thisStitcher->p_outImg->texture, 0,
p_thisStitcher->p_outImg->cx, p_thisStitcher->p_outImg->cy);
obs_leave_graphics();
p_thisStitcher->b_isPayloadFull = false;
}
}
 
Top