After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 735790 - GstGLMixer random create none-RGBA output buffer pool for GstGLFilter
GstGLMixer random create none-RGBA output buffer pool for GstGLFilter
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-09-01 06:41 UTC by comicfans44
Modified: 2014-10-21 02:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
trace log of gst_base_transform_find_transform (14.45 KB, text/plain)
2014-09-01 07:48 UTC, comicfans44
Details

Description comicfans44 2014-09-01 06:41:31 UTC
if construct pipeline as 

gst-launch-1.0 videotestsrc ! glfilterblur ! glvideomixer name=mixer ! glimagesink  videotestsrc ! glfiltercube ! mixer.

correct result should be a rotate cube floating on background image,
but sometimes the result is only the floaing cube . after checking in 
gst_gl_filter_texture, I found in such situation glfiltercube  outbuf->glmem->tex_type is GST_VIDEO_GL_TEXTURE_RGB, not normally GST_VIDEO_GL_TEXTURE_RGBA.

when checking in GstGLMixer 
gst_gl_mixer_propose_allocation , it should receive a caps as

"video/x-raw(memory:GLMemory), width=(int)320, height=(int)240, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, format=(string)RGBA, interlace-mode=(string)progressive"

but sometimes it receives


"video/x-raw, width=(int)320, height=(int)240, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)0/1, format=(string)RGB"

seems this caps created a none-RGBA GstGLBufferPool, which leads the bug.

backtrace shows this caps comes from 
gstbasetransfrom.c:1385  

gst_gl_mixer_propose_allocation (mix=0x80e2268, decide_query=0xb3901e30, query=0xb3901e60) at ../../../ext/gl/gstglmixer.c:161
  • #1 gst_gl_mixer_sink_query
    at ../../../ext/gl/gstglmixer.c line 312
  • #2 pad_query_func
    at ../../../../gst-libs/gst/base/gstaggregator.c line 1231
  • #3 gst_pad_query
    at ../../gst/gstpad.c line 3584
  • #4 gst_pad_peer_query
    at ../../gst/gstpad.c line 3715
  • #5 gst_base_transform_do_bufferpool
    at ../../../../libs/gst/base/gstbasetransform.c line 978
  • #6 gst_base_transform_setcaps
    at ../../../../libs/gst/base/gstbasetransform.c line 1385
  • #7 gst_base_transform_sink_eventfunc
    at ../../../../libs/gst/base/gstbasetransform.c line 1889
  • #8 gst_base_transform_sink_event
    at ../../../../libs/gst/base/gstbasetransform.c line 1848
  • #9 gst_pad_send_event_unchecked
    at ../../gst/gstpad.c line 5141
  • #10 gst_pad_push_event_unchecked
    at ../../gst/gstpad.c line 4839
  • #11 push_sticky
    at ../../gst/gstpad.c line 3443
  • #12 events_foreach
    at ../../gst/gstpad.c line 570
  • #13 check_sticky
    at ../../gst/gstpad.c line 3499
  • #14 gst_pad_push_event
    at ../../gst/gstpad.c line 4958
  • #15 gst_base_src_set_caps
    at ../../../../libs/gst/base/gstbasesrc.c line 918
  • #16 gst_base_src_default_negotiate
    at ../../../../libs/gst/base/gstbasesrc.c line 3206
  • #17 gst_base_src_negotiate
    at ../../../../libs/gst/base/gstbasesrc.c line 3246
  • #18 gst_base_src_loop
    at ../../../../libs/gst/base/gstbasesrc.c line 2683
  • #19 gst_task_func
    at ../../gst/gsttask.c line 317
  • #20 default_func
    at ../../gst/gsttaskpool.c line 68
  • #21 g_thread_pool_thread_proxy
    at /build/buildd/glib2.0-2.40.0/./glib/gthreadpool.c line 307



seems that gst_base_transform_find_transform(gstbasetransform:1356) of GstGLFilter did not always find the correct outcaps. but if pipeline construct
as 

videotestsrc ! glfilterblur ! glvideomixer ! glimagesink

every time gst_base_transform_find_transform will find the corrent caps.
Comment 1 comicfans44 2014-09-01 07:48:09 UTC
Created attachment 284980 [details]
trace log of gst_base_transform_find_transform

I'm not sure if this related to gst_gl_mixer_query_caps,when line 537

GST_VIDEO_INFO_FORMAT (&vagg->info) != GST_VIDEO_FORMAT_UNKNOWN) 

condition true,the returned caps didn't contain memory:GLMemory.

attachment is the trace of gst_base_transform_find_transform when
correct caps returned and incorrect caps returned , hopes it help.
Comment 2 Matthew Waters (ystreet00) 2014-09-22 05:10:29 UTC
This *might* be the same issue as bug #735042.
Comment 3 comicfans44 2014-10-08 02:10:47 UTC
(In reply to comment #2)
> This *might* be the same issue as bug #735042.

after checking out lastest git version (e6212f), this problem still happens,
gst_gl_mixer_propose_allocation can still receive RGB caps.
Comment 4 comicfans44 2014-10-21 01:38:26 UTC
(In reply to comment #2)
> This *might* be the same issue as bug #735042.

seems that 
 commit f0caf04ad6bf6f04c53424a2057ffe988ad781b9
videoaggregator: operate on caps rather than video info

also fix this bug.
Comment 5 Matthew Waters (ystreet00) 2014-10-21 02:46:21 UTC
Thanks for testing!

commit f0caf04ad6bf6f04c53424a2057ffe988ad781b9
Author: Matthew Waters <matthew@centricular.com>
Date:   Mon Oct 20 10:34:27 2014 +1100

    videoaggregator: operate on caps rather than video info
    
    Otherwise the CapsFeatures will be lost along with the possibility
    of multiple output types and formats.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=738129