[Bug 731525] multiple glimagesink elements aborts due to no XInitThreads.

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Sun Jun 15 01:14:30 PDT 2014


https://bugzilla.gnome.org/show_bug.cgi?id=731525
  GStreamer | gst-plugins-bad | git

--- Comment #11 from Matthew Waters <ystreet00 at gmail.com> 2014-06-15 08:14:27 UTC ---
(In reply to comment #7)
> (In reply to comment #6)
> > clutter-gst already calls XInitThreads in it's plugin_init function.
> 
> ... which might be too late already.

It is...

(In reply to comment #9)
> (http://qt-project.org/doc/qt-5/qopenglframebufferobject.html) and looking at
> the source code it's not clear when it's called and would require to actually
> test and break on XInitThreads.

http://qt-project.org/doc/qt-5/qt.html#ApplicationAttribute-enum
It's still there.

> Any chance to fail properly if the app did not call XInitThreads ? Maybe
> re-calling XInitThreads in gstgl when using an external x11 connection, if it
> returns non-zero then it could mean it has been called before, otherwise we
> fail anyway. Nothing is mentioned about the case:  the user call XInitThreads
> before any X call and then re-call XInitThreads later.

XInitThreads can be called multiple times, only the first call has any effect. 
Calling it multiple times will still report success with every call.

(In reply to comment #10)
> One more note, XInitThreads iirc set a global variable, so only the display
> created afterward will be affected. Existing display will remain
> non-threadsafe.

It's even more dangerous than that, calling XInitThreads after gtk_init for
example will segfault on a mutex lock in X (that presumably was not allocated
at display creation time).

I don't think we can really do anything about this other than defining that
XInitThreads must be called for libgstgl to work with multiple contexts and/or
external displays with at least glx.  We could say for any use of X11 to be on
the safe side :).

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list