aboutsummaryrefslogtreecommitdiff
path: root/ext/gl/gstopengl.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/gl/gstopengl.c')
-rw-r--r--ext/gl/gstopengl.c32
1 files changed, 20 insertions, 12 deletions
diff --git a/ext/gl/gstopengl.c b/ext/gl/gstopengl.c
index bb692d77..a4b25405 100644
--- a/ext/gl/gstopengl.c
+++ b/ext/gl/gstopengl.c
@@ -48,6 +48,8 @@
#include "gstglfiltercube.h"
#include "gstgleffects.h"
#include "gstglcolorscale.h"
+#include "gstglvideomixer.h"
+#include "gstglfiltershader.h"
#if HAVE_GRAPHENE
#include "gstgltransformation.h"
#endif
@@ -59,11 +61,9 @@
#include "gstglfilterapp.h"
#include "gstglfilterblur.h"
#include "gstglfilterreflectedscreen.h"
-#include "gstglfiltershader.h"
#include "gstglfiltersobel.h"
#include "gstgldeinterlace.h"
#include "gstglmosaic.h"
-#include "gstglvideomixer.h"
#if HAVE_PNG
#include "gstgldifferencematte.h"
#include "gstglbumper.h"
@@ -77,6 +77,10 @@
#include <bcm_host.h>
#endif
+#if GST_GL_HAVE_WINDOW_X11
+#include <X11/Xlib.h>
+#endif
+
#define GST_CAT_DEFAULT gst_gl_gstgl_debug
GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
@@ -91,6 +95,11 @@ plugin_init (GstPlugin * plugin)
bcm_host_init ();
#endif
+#if GST_GL_HAVE_WINDOW_X11
+ if (g_getenv ("GST_GL_XINITTHREADS"))
+ XInitThreads ();
+#endif
+
if (!gst_element_register (plugin, "glimagesink",
GST_RANK_SECONDARY, GST_TYPE_GLIMAGE_SINK)) {
return FALSE;
@@ -115,6 +124,15 @@ plugin_init (GstPlugin * plugin)
GST_RANK_NONE, GST_TYPE_GL_COLORSCALE)) {
return FALSE;
}
+
+ if (!gst_element_register (plugin, "glvideomixer",
+ GST_RANK_NONE, GST_TYPE_GL_VIDEO_MIXER)) {
+ return FALSE;
+ }
+ if (!gst_element_register (plugin, "glshader",
+ GST_RANK_NONE, gst_gl_filtershader_get_type ())) {
+ return FALSE;
+ }
#if GST_GL_HAVE_OPENGL
if (!gst_element_register (plugin, "gltestsrc",
GST_RANK_NONE, GST_TYPE_GL_TEST_SRC)) {
@@ -126,11 +144,6 @@ plugin_init (GstPlugin * plugin)
return FALSE;
}
- if (!gst_element_register (plugin, "glshader",
- GST_RANK_NONE, gst_gl_filtershader_get_type ())) {
- return FALSE;
- }
-
if (!gst_element_register (plugin, "glfiltersobel",
GST_RANK_NONE, gst_gl_filtersobel_get_type ())) {
return FALSE;
@@ -165,11 +178,6 @@ plugin_init (GstPlugin * plugin)
GST_RANK_NONE, GST_TYPE_GL_MOSAIC)) {
return FALSE;
}
-
- if (!gst_element_register (plugin, "glvideomixer",
- GST_RANK_NONE, GST_TYPE_GL_VIDEO_MIXER)) {
- return FALSE;
- }
#if HAVE_PNG
if (!gst_element_register (plugin, "gldifferencematte",
GST_RANK_NONE, gst_gl_differencematte_get_type ())) {