[Bug 787820] glvideomixer: need update output geo after src caps reconfigure

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed Sep 20 02:32:00 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=787820

--- Comment #16 from Haihua Hu <jared.hu at nxp.com> ---
(In reply to Matthew Waters (ystreet00) from comment #14)
> Created attachment 360045 [details]
> glvideomixer-dynamic-input
> 
> Here's a program that does a dynamic input change and successfully updates
> glvideomixer's output caps with the correct sizes.  I'm not sure what issue
> you're seeing but it does not seem to be an issue with glvideomixer's output
> size choice.
> 
> Could you explain a bit your scenario and what doesn't work for you?

Full log attached:

1. output caps didn't change on my side using your unit test. when capsfilter
change its size, glvideomixer src caps log as below. The rootcause is that when
fixate caps, glvideomixer calculate best width and height and try to update
caps, but the width and height is fixed to 320*240 when start. Then
gst_structure_fixate_field_nearest_int just return false.

0:00:07.225278250 22668     0x122b2ad0 DEBUG           glvideomixer
gstglvideomixer.c:1092:_fixate_caps: best width 640 best_height 480
0:00:07.225394875 22668     0x122b2ad0 DEBUG        videoaggregator
gstvideoaggregator.c:786:gst_video_aggregator_update_src_caps:<mixer>          
   to video/x-raw(memory:GLMemory), width=(int)320, height=(int)240,
framerate=(fraction)2/1, pixel-aspect-ratio=(fraction)1/1,
interlace-mode=(string)progressive, format=(string)RGBA,
texture-target=(string)2D
0:00:07.225551875 22668     0x122b2ad0 INFO         videoaggregator
gstvideoaggregator.c:547:gst_video_aggregator_src_setcaps:<mixer:src> set src
caps: video/x-raw(memory:GLMemory), width=(int)320, height=(int)240,
framerate=(fraction)2/1, pixel-aspect-ratio=(fraction)1/1,
interlace-mode=(string)progressive, format=(string)RGBA,
texture-target=(string)2D

2. when aggregator, glvideomixer will only update output geometry when pad
geometry changed or the first time to call gst_gl_video_mixer_callback

see below code, when caps changed, this will not been called:
1491     if (pad->geometry_change || !pad->vertex_buffer) {
.....
1502       /* top-left */
1503       v_vertices[0] = v_vertices[15] =
1504           2.0f * (gfloat) pad->xpos / (gfloat) out_width - 1.0f;
1505       /* bottom-left */
1506       v_vertices[1] = v_vertices[6] =
1507           2.0f * (gfloat) pad->ypos / (gfloat) out_height - 1.0f;
1508       /* top-right */
1509       v_vertices[5] = v_vertices[10] = v_vertices[0] + 2.0f * w;
1510       /* bottom-right */
1511       v_vertices[11] = v_vertices[16] = v_vertices[1] + 2.0f * h;
.....
}

If there is something that I misunderstanding, please point out.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.


More information about the gstreamer-bugs mailing list