summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorJulien Isorce <julien.isorce@collabora.co.uk>2014-06-22 13:14:27 +0100
committerJulien Isorce <julien.isorce@collabora.co.uk>2014-06-25 06:55:11 +0100
commit6f45d00a9b065e4baa15aee9d79f2eb2b0df92d9 (patch)
treed4f484092a4f729453009421d94848d230a5aae8 /ext
parent3d22f686b69d759ffec0250d4d45aa963f97b476 (diff)
downloadgstreamer-plugins-bad-6f45d00a9b065e4baa15aee9d79f2eb2b0df92d9.tar.gz
gl: enable glvideomixer on GLES2
Diffstat (limited to 'ext')
-rw-r--r--ext/gl/Makefile.am4
-rw-r--r--ext/gl/gstglvideomixer.c3
-rw-r--r--ext/gl/gstopengl.c12
3 files changed, 11 insertions, 8 deletions
diff --git a/ext/gl/Makefile.am b/ext/gl/Makefile.am
index 66537e64b..5e9f43765 100644
--- a/ext/gl/Makefile.am
+++ b/ext/gl/Makefile.am
@@ -29,8 +29,6 @@ OPENGL_SOURCES = \
gstgltestsrc.h \
gstglmosaic.c \
gstglmosaic.h \
- gstglvideomixer.c \
- gstglvideomixer.h \
effects/gstgleffectscurves.h \
effects/gstgleffectstretch.c \
effects/gstgleffecttunnel.c \
@@ -74,6 +72,8 @@ libgstopengl_la_SOURCES = \
effects/gstgleffectsqueeze.c \
gstglcolorscale.c \
gstglcolorscale.h \
+ gstglvideomixer.c \
+ gstglvideomixer.h \
$(OPENGL_SOURCES)
if HAVE_GRAPHENE
diff --git a/ext/gl/gstglvideomixer.c b/ext/gl/gstglvideomixer.c
index 7b3904e64..7dcb9367a 100644
--- a/ext/gl/gstglvideomixer.c
+++ b/ext/gl/gstglvideomixer.c
@@ -81,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"
diff --git a/ext/gl/gstopengl.c b/ext/gl/gstopengl.c
index 471d5acf0..fbe5b277c 100644
--- a/ext/gl/gstopengl.c
+++ b/ext/gl/gstopengl.c
@@ -48,6 +48,7 @@
#include "gstglfiltercube.h"
#include "gstgleffects.h"
#include "gstglcolorscale.h"
+#include "gstglvideomixer.h"
#if HAVE_GRAPHENE
#include "gstgltransformation.h"
#endif
@@ -63,7 +64,6 @@
#include "gstglfiltersobel.h"
#include "gstgldeinterlace.h"
#include "gstglmosaic.h"
-#include "gstglvideomixer.h"
#if HAVE_PNG
#include "gstgldifferencematte.h"
#include "gstglbumper.h"
@@ -124,6 +124,11 @@ 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_GL_HAVE_OPENGL
if (!gst_element_register (plugin, "gltestsrc",
GST_RANK_NONE, GST_TYPE_GL_TEST_SRC)) {
@@ -174,11 +179,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 ())) {