aboutsummaryrefslogtreecommitdiff
path: root/ext/gl
diff options
context:
space:
mode:
Diffstat (limited to 'ext/gl')
-rw-r--r--ext/gl/Makefile.am8
-rw-r--r--ext/gl/Makefile.in59
-rw-r--r--ext/gl/gstglcolorscale.c3
-rw-r--r--ext/gl/gstglfiltershader.c7
-rw-r--r--ext/gl/gstglvideomixer.c57
-rw-r--r--ext/gl/gstopengl.c32
6 files changed, 112 insertions, 54 deletions
diff --git a/ext/gl/Makefile.am b/ext/gl/Makefile.am
index 66537e64..7ec63b30 100644
--- a/ext/gl/Makefile.am
+++ b/ext/gl/Makefile.am
@@ -7,8 +7,6 @@ AM_LIBS = $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS)
# full opengl required
if USE_OPENGL
OPENGL_SOURCES = \
- gstglfiltershader.c \
- gstglfiltershader.h \
gstglfilterblur.c \
gstglfilterblur.h \
gstglfiltersobel.c \
@@ -29,8 +27,6 @@ OPENGL_SOURCES = \
gstgltestsrc.h \
gstglmosaic.c \
gstglmosaic.h \
- gstglvideomixer.c \
- gstglvideomixer.h \
effects/gstgleffectscurves.h \
effects/gstgleffectstretch.c \
effects/gstgleffecttunnel.c \
@@ -74,6 +70,10 @@ libgstopengl_la_SOURCES = \
effects/gstgleffectsqueeze.c \
gstglcolorscale.c \
gstglcolorscale.h \
+ gstglvideomixer.c \
+ gstglvideomixer.h \
+ gstglfiltershader.c \
+ gstglfiltershader.h \
$(OPENGL_SOURCES)
if HAVE_GRAPHENE
diff --git a/ext/gl/Makefile.in b/ext/gl/Makefile.in
index f1411fb9..316dfcc1 100644
--- a/ext/gl/Makefile.in
+++ b/ext/gl/Makefile.in
@@ -178,19 +178,19 @@ am__libgstopengl_la_SOURCES_DIST = gstopengl.c gstglimagesink.c \
gstgleffects.c gstgleffects.h effects/gstgleffectssources.c \
effects/gstgleffectssources.h effects/gstgleffectidentity.c \
effects/gstgleffectmirror.c effects/gstgleffectsqueeze.c \
- gstglcolorscale.c gstglcolorscale.h gstglfiltershader.c \
- gstglfiltershader.h gstglfilterblur.c gstglfilterblur.h \
- gstglfiltersobel.c gstglfiltersobel.h gstglfilterlaplacian.c \
+ gstglcolorscale.c gstglcolorscale.h gstglvideomixer.c \
+ gstglvideomixer.h gstglfiltershader.c gstglfiltershader.h \
+ gstglfilterblur.c gstglfilterblur.h gstglfiltersobel.c \
+ gstglfiltersobel.h gstglfilterlaplacian.c \
gstglfilterlaplacian.h gstglfilterglass.c gstglfilterglass.h \
gstglfilterapp.c gstglfilterapp.h gstglfilterreflectedscreen.c \
gstglfilterreflectedscreen.h gstgldeinterlace.c \
gstgldeinterlace.h gltestsrc.c gltestsrc.h gstgltestsrc.c \
- gstgltestsrc.h gstglmosaic.c gstglmosaic.h gstglvideomixer.c \
- gstglvideomixer.h effects/gstgleffectscurves.h \
- effects/gstgleffectstretch.c effects/gstgleffecttunnel.c \
- effects/gstgleffectfisheye.c effects/gstgleffecttwirl.c \
- effects/gstgleffectbulge.c effects/gstgleffectsquare.c \
- effects/gstgleffectlumatocurve.c \
+ gstgltestsrc.h gstglmosaic.c gstglmosaic.h \
+ effects/gstgleffectscurves.h effects/gstgleffectstretch.c \
+ effects/gstgleffecttunnel.c effects/gstgleffectfisheye.c \
+ effects/gstgleffecttwirl.c effects/gstgleffectbulge.c \
+ effects/gstgleffectsquare.c effects/gstgleffectlumatocurve.c \
effects/gstgleffectlumatocurve.h \
effects/gstgleffectrgbtocurve.c effects/gstgleffectsin.c \
effects/gstgleffectglow.c effects/gstgleffectxray.c \
@@ -201,8 +201,7 @@ am__dirstamp = $(am__leading_dot)dirstamp
@HAVE_PNG_TRUE@@USE_OPENGL_TRUE@am__objects_1 = libgstopengl_la-gstglbumper.lo \
@HAVE_PNG_TRUE@@USE_OPENGL_TRUE@ libgstopengl_la-gstgldifferencematte.lo
@HAVE_JPEG_TRUE@@HAVE_PNG_TRUE@@USE_OPENGL_TRUE@am__objects_2 = libgstopengl_la-gstgloverlay.lo
-@USE_OPENGL_TRUE@am__objects_3 = libgstopengl_la-gstglfiltershader.lo \
-@USE_OPENGL_TRUE@ libgstopengl_la-gstglfilterblur.lo \
+@USE_OPENGL_TRUE@am__objects_3 = libgstopengl_la-gstglfilterblur.lo \
@USE_OPENGL_TRUE@ libgstopengl_la-gstglfiltersobel.lo \
@USE_OPENGL_TRUE@ libgstopengl_la-gstglfilterlaplacian.lo \
@USE_OPENGL_TRUE@ libgstopengl_la-gstglfilterglass.lo \
@@ -212,7 +211,6 @@ am__dirstamp = $(am__leading_dot)dirstamp
@USE_OPENGL_TRUE@ libgstopengl_la-gltestsrc.lo \
@USE_OPENGL_TRUE@ libgstopengl_la-gstgltestsrc.lo \
@USE_OPENGL_TRUE@ libgstopengl_la-gstglmosaic.lo \
-@USE_OPENGL_TRUE@ libgstopengl_la-gstglvideomixer.lo \
@USE_OPENGL_TRUE@ effects/libgstopengl_la-gstgleffectstretch.lo \
@USE_OPENGL_TRUE@ effects/libgstopengl_la-gstgleffecttunnel.lo \
@USE_OPENGL_TRUE@ effects/libgstopengl_la-gstgleffectfisheye.lo \
@@ -235,7 +233,9 @@ am_libgstopengl_la_OBJECTS = libgstopengl_la-gstopengl.lo \
effects/libgstopengl_la-gstgleffectidentity.lo \
effects/libgstopengl_la-gstgleffectmirror.lo \
effects/libgstopengl_la-gstgleffectsqueeze.lo \
- libgstopengl_la-gstglcolorscale.lo $(am__objects_3) \
+ libgstopengl_la-gstglcolorscale.lo \
+ libgstopengl_la-gstglvideomixer.lo \
+ libgstopengl_la-gstglfiltershader.lo $(am__objects_3) \
$(am__objects_4)
libgstopengl_la_OBJECTS = $(am_libgstopengl_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
@@ -809,18 +809,16 @@ AM_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS)
AM_LIBS = $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS)
# full opengl required
-@USE_OPENGL_TRUE@OPENGL_SOURCES = gstglfiltershader.c \
-@USE_OPENGL_TRUE@ gstglfiltershader.h gstglfilterblur.c \
-@USE_OPENGL_TRUE@ gstglfilterblur.h gstglfiltersobel.c \
-@USE_OPENGL_TRUE@ gstglfiltersobel.h gstglfilterlaplacian.c \
-@USE_OPENGL_TRUE@ gstglfilterlaplacian.h gstglfilterglass.c \
-@USE_OPENGL_TRUE@ gstglfilterglass.h gstglfilterapp.c \
-@USE_OPENGL_TRUE@ gstglfilterapp.h gstglfilterreflectedscreen.c \
+@USE_OPENGL_TRUE@OPENGL_SOURCES = gstglfilterblur.c gstglfilterblur.h \
+@USE_OPENGL_TRUE@ gstglfiltersobel.c gstglfiltersobel.h \
+@USE_OPENGL_TRUE@ gstglfilterlaplacian.c gstglfilterlaplacian.h \
+@USE_OPENGL_TRUE@ gstglfilterglass.c gstglfilterglass.h \
+@USE_OPENGL_TRUE@ gstglfilterapp.c gstglfilterapp.h \
+@USE_OPENGL_TRUE@ gstglfilterreflectedscreen.c \
@USE_OPENGL_TRUE@ gstglfilterreflectedscreen.h \
@USE_OPENGL_TRUE@ gstgldeinterlace.c gstgldeinterlace.h \
@USE_OPENGL_TRUE@ gltestsrc.c gltestsrc.h gstgltestsrc.c \
@USE_OPENGL_TRUE@ gstgltestsrc.h gstglmosaic.c gstglmosaic.h \
-@USE_OPENGL_TRUE@ gstglvideomixer.c gstglvideomixer.h \
@USE_OPENGL_TRUE@ effects/gstgleffectscurves.h \
@USE_OPENGL_TRUE@ effects/gstgleffectstretch.c \
@USE_OPENGL_TRUE@ effects/gstgleffecttunnel.c \
@@ -840,8 +838,9 @@ libgstopengl_la_SOURCES = gstopengl.c gstglimagesink.c \
gstgleffects.c gstgleffects.h effects/gstgleffectssources.c \
effects/gstgleffectssources.h effects/gstgleffectidentity.c \
effects/gstgleffectmirror.c effects/gstgleffectsqueeze.c \
- gstglcolorscale.c gstglcolorscale.h $(OPENGL_SOURCES) \
- $(am__append_3)
+ gstglcolorscale.c gstglcolorscale.h gstglvideomixer.c \
+ gstglvideomixer.h gstglfiltershader.c gstglfiltershader.h \
+ $(OPENGL_SOURCES) $(am__append_3)
# check order of CFLAGS and LIBS, shouldn't the order be the other way around
# (like in AM_CFLAGS)?
@@ -1110,6 +1109,13 @@ libgstopengl_la-gstglcolorscale.lo: gstglcolorscale.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstopengl_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopengl_la_CFLAGS) $(CFLAGS) -c -o libgstopengl_la-gstglcolorscale.lo `test -f 'gstglcolorscale.c' || echo '$(srcdir)/'`gstglcolorscale.c
+libgstopengl_la-gstglvideomixer.lo: gstglvideomixer.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstopengl_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopengl_la_CFLAGS) $(CFLAGS) -MT libgstopengl_la-gstglvideomixer.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-gstglvideomixer.Tpo -c -o libgstopengl_la-gstglvideomixer.lo `test -f 'gstglvideomixer.c' || echo '$(srcdir)/'`gstglvideomixer.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstopengl_la-gstglvideomixer.Tpo $(DEPDIR)/libgstopengl_la-gstglvideomixer.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstglvideomixer.c' object='libgstopengl_la-gstglvideomixer.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstopengl_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopengl_la_CFLAGS) $(CFLAGS) -c -o libgstopengl_la-gstglvideomixer.lo `test -f 'gstglvideomixer.c' || echo '$(srcdir)/'`gstglvideomixer.c
+
libgstopengl_la-gstglfiltershader.lo: gstglfiltershader.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstopengl_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopengl_la_CFLAGS) $(CFLAGS) -MT libgstopengl_la-gstglfiltershader.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-gstglfiltershader.Tpo -c -o libgstopengl_la-gstglfiltershader.lo `test -f 'gstglfiltershader.c' || echo '$(srcdir)/'`gstglfiltershader.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstopengl_la-gstglfiltershader.Tpo $(DEPDIR)/libgstopengl_la-gstglfiltershader.Plo
@@ -1187,13 +1193,6 @@ libgstopengl_la-gstglmosaic.lo: gstglmosaic.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstopengl_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopengl_la_CFLAGS) $(CFLAGS) -c -o libgstopengl_la-gstglmosaic.lo `test -f 'gstglmosaic.c' || echo '$(srcdir)/'`gstglmosaic.c
-libgstopengl_la-gstglvideomixer.lo: gstglvideomixer.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstopengl_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopengl_la_CFLAGS) $(CFLAGS) -MT libgstopengl_la-gstglvideomixer.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-gstglvideomixer.Tpo -c -o libgstopengl_la-gstglvideomixer.lo `test -f 'gstglvideomixer.c' || echo '$(srcdir)/'`gstglvideomixer.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstopengl_la-gstglvideomixer.Tpo $(DEPDIR)/libgstopengl_la-gstglvideomixer.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstglvideomixer.c' object='libgstopengl_la-gstglvideomixer.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstopengl_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopengl_la_CFLAGS) $(CFLAGS) -c -o libgstopengl_la-gstglvideomixer.lo `test -f 'gstglvideomixer.c' || echo '$(srcdir)/'`gstglvideomixer.c
-
effects/libgstopengl_la-gstgleffectstretch.lo: effects/gstgleffectstretch.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstopengl_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopengl_la_CFLAGS) $(CFLAGS) -MT effects/libgstopengl_la-gstgleffectstretch.lo -MD -MP -MF effects/$(DEPDIR)/libgstopengl_la-gstgleffectstretch.Tpo -c -o effects/libgstopengl_la-gstgleffectstretch.lo `test -f 'effects/gstgleffectstretch.c' || echo '$(srcdir)/'`effects/gstgleffectstretch.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) effects/$(DEPDIR)/libgstopengl_la-gstgleffectstretch.Tpo effects/$(DEPDIR)/libgstopengl_la-gstgleffectstretch.Plo
diff --git a/ext/gl/gstglcolorscale.c b/ext/gl/gstglcolorscale.c
index bde35c3a..e56da5b0 100644
--- a/ext/gl/gstglcolorscale.c
+++ b/ext/gl/gstglcolorscale.c
@@ -88,6 +88,7 @@ gst_gl_colorscale_class_init (GstGLColorscaleClass * klass)
GObjectClass *gobject_class;
GstElementClass *element_class;
GstGLFilterClass *filter_class;
+ GstBaseTransformClass *basetransform_class = GST_BASE_TRANSFORM_CLASS (klass);
gobject_class = (GObjectClass *) klass;
element_class = GST_ELEMENT_CLASS (klass);
@@ -107,6 +108,8 @@ gst_gl_colorscale_class_init (GstGLColorscaleClass * klass)
#endif
filter_class->filter_texture = gst_gl_colorscale_filter_texture;
+
+ basetransform_class->passthrough_on_same_caps = TRUE;
}
static void
diff --git a/ext/gl/gstglfiltershader.c b/ext/gl/gstglfiltershader.c
index 71130e65..5da6ed4b 100644
--- a/ext/gl/gstglfiltershader.c
+++ b/ext/gl/gstglfiltershader.c
@@ -36,13 +36,6 @@
#include "config.h"
#endif
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <string.h>
-
#include <gst/gst.h>
#include <gst/gl/gstglshadervariables.h>
diff --git a/ext/gl/gstglvideomixer.c b/ext/gl/gstglvideomixer.c
index 5a5d7a23..7dcb9367 100644
--- a/ext/gl/gstglvideomixer.c
+++ b/ext/gl/gstglvideomixer.c
@@ -60,6 +60,7 @@ static void gst_gl_video_mixer_set_property (GObject * object, guint prop_id,
static void gst_gl_video_mixer_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
+static gboolean _update_info (GstVideoAggregator * vagg, GstVideoInfo * info);
static void gst_gl_video_mixer_reset (GstGLMixer * mixer);
static gboolean gst_gl_video_mixer_init_shader (GstGLMixer * mixer,
GstCaps * outcaps);
@@ -80,6 +81,9 @@ static const gchar *video_mixer_v_src =
/* fragment source */
static const gchar *video_mixer_f_src =
+ "#ifdef GL_ES\n"
+ "precision mediump float;\n"
+ "#endif\n"
"uniform sampler2D texture; \n"
"uniform float alpha;\n"
"varying vec2 v_texCoord; \n"
@@ -249,6 +253,7 @@ gst_gl_video_mixer_class_init (GstGLVideoMixerClass * klass)
GObjectClass *gobject_class;
GstElementClass *element_class;
GstAggregatorClass *agg_class = (GstAggregatorClass *) klass;
+ GstVideoAggregatorClass *vagg_class = (GstVideoAggregatorClass *) klass;
gobject_class = (GObjectClass *) klass;
element_class = GST_ELEMENT_CLASS (klass);
@@ -265,8 +270,9 @@ gst_gl_video_mixer_class_init (GstGLVideoMixerClass * klass)
GST_GL_MIXER_CLASS (klass)->process_textures =
gst_gl_video_mixer_process_textures;
- agg_class->sinkpads_type = GST_TYPE_GL_VIDEO_MIXER_PAD;
+ vagg_class->update_info = _update_info;
+ agg_class->sinkpads_type = GST_TYPE_GL_VIDEO_MIXER_PAD;
}
static void
@@ -298,6 +304,52 @@ gst_gl_video_mixer_get_property (GObject * object, guint prop_id,
}
}
+static gboolean
+_update_info (GstVideoAggregator * vagg, GstVideoInfo * info)
+{
+ GList *l;
+ gint best_width = -1, best_height = -1;
+ gboolean ret = FALSE;
+
+ GST_OBJECT_LOCK (vagg);
+ for (l = GST_ELEMENT (vagg)->sinkpads; l; l = l->next) {
+ GstVideoAggregatorPad *vaggpad = l->data;
+ GstGLVideoMixerPad *mixer_pad = GST_GL_VIDEO_MIXER_PAD (vaggpad);
+ gint this_width, this_height;
+ gint width, height;
+
+ if (mixer_pad->width > 0)
+ width = mixer_pad->width;
+ else
+ width = GST_VIDEO_INFO_WIDTH (&vaggpad->info);
+
+ if (mixer_pad->height > 0)
+ height = mixer_pad->height;
+ else
+ height = GST_VIDEO_INFO_HEIGHT (&vaggpad->info);
+
+ if (width == 0 || height == 0)
+ continue;
+
+ this_width = width + MAX (mixer_pad->xpos, 0);
+ this_height = height + MAX (mixer_pad->ypos, 0);
+
+ if (best_width < this_width)
+ best_width = this_width;
+ if (best_height < this_height)
+ best_height = this_height;
+ }
+ GST_OBJECT_UNLOCK (vagg);
+
+ if (best_width > 0 && best_height > 0) {
+ gst_video_info_set_format (info, GST_VIDEO_INFO_FORMAT (info),
+ best_width, best_height);
+ ret = TRUE;
+ }
+
+ return ret;
+}
+
static void
gst_gl_video_mixer_reset (GstGLMixer * mixer)
{
@@ -315,6 +367,9 @@ gst_gl_video_mixer_init_shader (GstGLMixer * mixer, GstCaps * outcaps)
{
GstGLVideoMixer *video_mixer = GST_GL_VIDEO_MIXER (mixer);
+ if (video_mixer->shader)
+ gst_gl_context_del_shader (mixer->context, video_mixer->shader);
+
return gst_gl_context_gen_shader (mixer->context, video_mixer_v_src,
video_mixer_f_src, &video_mixer->shader);
}
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 ())) {