mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 23:36:38 +00:00
gl: XInitThreads when env variable is set
This is too allow gst-launch debugging with multiple GL contexts as well as avoiding segfaulting innocent gtk+ apps that have not called XInitThreads. https://bugzilla.gnome.org/show_bug.cgi?id=731525
This commit is contained in:
parent
1d16cd50a3
commit
5409a3ea2f
1 changed files with 9 additions and 0 deletions
|
@ -77,6 +77,10 @@
|
||||||
#include <bcm_host.h>
|
#include <bcm_host.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if GST_GL_HAVE_WINDOW_X11
|
||||||
|
#include <X11/Xlib.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#define GST_CAT_DEFAULT gst_gl_gstgl_debug
|
#define GST_CAT_DEFAULT gst_gl_gstgl_debug
|
||||||
GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
|
GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
|
||||||
|
|
||||||
|
@ -91,6 +95,11 @@ plugin_init (GstPlugin * plugin)
|
||||||
bcm_host_init ();
|
bcm_host_init ();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if GST_GL_HAVE_WINDOW_X11
|
||||||
|
if (g_getenv ("GST_GL_XINITTHREADS"))
|
||||||
|
XInitThreads ();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!gst_element_register (plugin, "glimagesink",
|
if (!gst_element_register (plugin, "glimagesink",
|
||||||
GST_RANK_SECONDARY, GST_TYPE_GLIMAGE_SINK)) {
|
GST_RANK_SECONDARY, GST_TYPE_GLIMAGE_SINK)) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
Loading…
Reference in a new issue