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 776401 - gst-launch should set GST_GL_XINITHREADS so that XinitThread() is called appropriately
gst-launch should set GST_GL_XINITHREADS so that XinitThread() is called appr...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal enhancement
: 1.10.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-12-22 17:46 UTC by nicolas dechesne
Modified: 2017-01-09 13:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
set GST_GL_XINITTHREADS (946 bytes, patch)
2016-12-22 17:52 UTC, nicolas dechesne
committed Details | Review

Description nicolas dechesne 2016-12-22 17:46:25 UTC
A simple 'videotestsrc ! glimagesink' with gst-launch started to fail very consistently on my embedded boards (Dragonboard) and actually on my PC as well (running Debian/Sid). 

$ gst-launch-1.0 videotestsrc ! videoconvert ! glimagesink 
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Got context from element 'sink': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayX11\)\ gldisplayx11-0";
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock

** (gst-launch-1.0:9734): CRITICAL **: gst_gl_context_thread_add: assertion 'GST_IS_GL_CONTEXT (context)' failed
[xcb] Unknown request in queue while dequeuing
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
gst-launch-1.0: ../../src/xcb_io.c:165: dequeue_pending_request: Assertion `!xcb_xlib_unknown_req_in_deq' failed.
Aborted

As discussed on IRC with slomo, let's ensure that gst tools such as gst-launch and gst-play will force XInitThread() to be called.
Comment 1 nicolas dechesne 2016-12-22 17:52:59 UTC
Created attachment 342396 [details] [review]
set GST_GL_XINITTHREADS

tested on my PC, using gst-launch-1.0 videotestsrc ! glimagesink
Comment 2 Sebastian Dröge (slomo) 2016-12-23 10:11:39 UTC
Comment on attachment 342396 [details] [review]
set GST_GL_XINITTHREADS

Seems like a good idea to me, even if annoying.
Comment 3 Sebastian Dröge (slomo) 2016-12-23 10:23:03 UTC
commit 2d5dba8d058081f0b41d3b25efddc5edbd3a5120
Author: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Date:   Thu Dec 22 18:45:10 2016 +0100

    tools: gst-launch: set GST_GL_XINITTHREADS
    
    This ensure that XInitThreads is called and so gl contexts are properly
    initialized.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=776401