summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia/gstreamer
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-multimedia/gstreamer')
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.10.1.bb (renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.8.3.bb)5
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc1
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch35
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch15
-rwxr-xr-xmeta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-enable-gldeinterlace-on-OpenGL-ES.patch634
-rwxr-xr-xmeta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-glcolorconvert-implement-multiple-render-targets-for.patch244
-rwxr-xr-xmeta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-glcolorconvert-don-t-use-the-predefined-variable-nam.patch32
-rwxr-xr-xmeta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-glshader-add-glBindFragDataLocation.patch77
-rwxr-xr-xmeta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-glcolorconvert-GLES3-deprecates-texture2D-and-it-doe.patch51
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-gl-implement-GstGLMemoryEGL.patch495
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch59
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.1.bb (renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.3.bb)10
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.10.1.bb (renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.8.3.bb)5
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.10.1.bb (renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.8.3.bb)5
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.10.1.bb (renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.8.3.bb)5
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.10.1.bb6
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.8.3.bb6
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0.inc1
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0_1.10.1.bb (renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0_1.8.3.bb)5
19 files changed, 69 insertions, 1622 deletions
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.8.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.10.1.bb
index 3d86221d22..98f5a50a9a 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.8.3.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.10.1.bb
@@ -13,8 +13,7 @@ SRC_URI = " \
13 file://0001-Disable-yasm-for-libav-when-disable-yasm.patch \ 13 file://0001-Disable-yasm-for-libav-when-disable-yasm.patch \
14 file://workaround-to-build-gst-libav-for-i586-with-gcc.patch \ 14 file://workaround-to-build-gst-libav-for-i586-with-gcc.patch \
15" 15"
16 16SRC_URI[md5sum] = "9dc8fb8dd01818c27230a1ed6ba9f4de"
17SRC_URI[md5sum] = "b51a736147bacb40f85827a4e0ae0d2c" 17SRC_URI[sha256sum] = "27b28b8de0e6dff1e3952428e8ed8ba4a12f452f789ac0ae9bbe50f00a5c72c7"
18SRC_URI[sha256sum] = "9006a05990089f7155ee0e848042f6bb24e52ab1d0a59ff8d1b5d7e33001a495"
19 18
20S = "${WORKDIR}/gst-libav-${PV}" 19S = "${WORKDIR}/gst-libav-${PV}"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
index 0fe5564b53..d26a6a9433 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
@@ -42,6 +42,7 @@ PACKAGECONFIG[gtk] = "--enable-gtk3,--disable-gtk3,gtk+3"
42# ensure OpenSSL is used for HLS AES description instead of nettle 42# ensure OpenSSL is used for HLS AES description instead of nettle
43# (OpenSSL is a shared dependency with dtls) 43# (OpenSSL is a shared dependency with dtls)
44PACKAGECONFIG[hls] = "--enable-hls --with-hls-crypto=openssl,--disable-hls,openssl" 44PACKAGECONFIG[hls] = "--enable-hls --with-hls-crypto=openssl,--disable-hls,openssl"
45PACKAGECONFIG[kms] = "--enable-kms,--disable-kms,libdrm"
45PACKAGECONFIG[libmms] = "--enable-libmms,--disable-libmms,libmms" 46PACKAGECONFIG[libmms] = "--enable-libmms,--disable-libmms,libmms"
46PACKAGECONFIG[libssh2] = "--enable-libssh2,--disable-libssh2,libssh2" 47PACKAGECONFIG[libssh2] = "--enable-libssh2,--disable-libssh2,libssh2"
47PACKAGECONFIG[modplug] = "--enable-modplug,--disable-modplug,libmodplug" 48PACKAGECONFIG[modplug] = "--enable-modplug,--disable-modplug,libmodplug"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch
index 33efc503eb..43f1ee0d23 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch
@@ -13,24 +13,24 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
13 gst-libs/gst/mpegts/Makefile.am | 2 +- 13 gst-libs/gst/mpegts/Makefile.am | 2 +-
14 3 files changed, 3 insertions(+), 3 deletions(-) 14 3 files changed, 3 insertions(+), 3 deletions(-)
15 15
16diff --git a/gst-libs/gst/gl/Makefile.am b/gst-libs/gst/gl/Makefile.am 16Index: gst-plugins-bad-1.10.1/gst-libs/gst/gl/Makefile.am
17index f968357..7cc2c7a 100644 17===================================================================
18--- a/gst-libs/gst/gl/Makefile.am 18--- gst-plugins-bad-1.10.1.orig/gst-libs/gst/gl/Makefile.am
19+++ b/gst-libs/gst/gl/Makefile.am 19+++ gst-plugins-bad-1.10.1/gst-libs/gst/gl/Makefile.am
20@@ -167,7 +167,7 @@ GstGL-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstgl-@GST_API_VERSION@ 20@@ -171,7 +171,7 @@ GstGL-@GST_API_VERSION@.gir: $(INTROSPEC
21 --library=libgstgl-@GST_API_VERSION@.la \
22 --include=Gst-@GST_API_VERSION@ \ 21 --include=Gst-@GST_API_VERSION@ \
23 --include=GstBase-@GST_API_VERSION@ \ 22 --include=GstBase-@GST_API_VERSION@ \
23 --include=GstVideo-@GST_API_VERSION@ \
24- --libtool="$(top_builddir)/libtool" \ 24- --libtool="$(top_builddir)/libtool" \
25+ --libtool="$(LIBTOOL)" \ 25+ --libtool="$(LIBTOOL)" \
26 --pkg gstreamer-@GST_API_VERSION@ \ 26 --pkg gstreamer-@GST_API_VERSION@ \
27 --pkg gstreamer-base-@GST_API_VERSION@ \ 27 --pkg gstreamer-base-@GST_API_VERSION@ \
28 --pkg gstreamer-video-@GST_API_VERSION@ \ 28 --pkg gstreamer-video-@GST_API_VERSION@ \
29diff --git a/gst-libs/gst/insertbin/Makefile.am b/gst-libs/gst/insertbin/Makefile.am 29Index: gst-plugins-bad-1.10.1/gst-libs/gst/insertbin/Makefile.am
30index 09eb97c..b746885 100644 30===================================================================
31--- a/gst-libs/gst/insertbin/Makefile.am 31--- gst-plugins-bad-1.10.1.orig/gst-libs/gst/insertbin/Makefile.am
32+++ b/gst-libs/gst/insertbin/Makefile.am 32+++ gst-plugins-bad-1.10.1/gst-libs/gst/insertbin/Makefile.am
33@@ -44,7 +44,7 @@ GstInsertBin-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstinsertbin-@GS 33@@ -45,7 +45,7 @@ GstInsertBin-@GST_API_VERSION@.gir: $(IN
34 --library=libgstinsertbin-@GST_API_VERSION@.la \ 34 --library=libgstinsertbin-@GST_API_VERSION@.la \
35 --include=Gst-@GST_API_VERSION@ \ 35 --include=Gst-@GST_API_VERSION@ \
36 --include=GstBase-@GST_API_VERSION@ \ 36 --include=GstBase-@GST_API_VERSION@ \
@@ -39,11 +39,11 @@ index 09eb97c..b746885 100644
39 --pkg gstreamer-@GST_API_VERSION@ \ 39 --pkg gstreamer-@GST_API_VERSION@ \
40 --pkg gstreamer-base-@GST_API_VERSION@ \ 40 --pkg gstreamer-base-@GST_API_VERSION@ \
41 --pkg-export gstreamer-insertbin-@GST_API_VERSION@ \ 41 --pkg-export gstreamer-insertbin-@GST_API_VERSION@ \
42diff --git a/gst-libs/gst/mpegts/Makefile.am b/gst-libs/gst/mpegts/Makefile.am 42Index: gst-plugins-bad-1.10.1/gst-libs/gst/mpegts/Makefile.am
43index 2511d49..c1cbce6 100644 43===================================================================
44--- a/gst-libs/gst/mpegts/Makefile.am 44--- gst-plugins-bad-1.10.1.orig/gst-libs/gst/mpegts/Makefile.am
45+++ b/gst-libs/gst/mpegts/Makefile.am 45+++ gst-plugins-bad-1.10.1/gst-libs/gst/mpegts/Makefile.am
46@@ -78,7 +78,7 @@ GstMpegts-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstmpegts-@GST_API_ 46@@ -79,7 +79,7 @@ GstMpegts-@GST_API_VERSION@.gir: $(INTRO
47 --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-video-@GST_API_VERSION@` \ 47 --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-video-@GST_API_VERSION@` \
48 --library=libgstmpegts-@GST_API_VERSION@.la \ 48 --library=libgstmpegts-@GST_API_VERSION@.la \
49 --include=Gst-@GST_API_VERSION@ \ 49 --include=Gst-@GST_API_VERSION@ \
@@ -52,6 +52,3 @@ index 2511d49..c1cbce6 100644
52 --pkg gstreamer-@GST_API_VERSION@ \ 52 --pkg gstreamer-@GST_API_VERSION@ \
53 --pkg gstreamer-video-@GST_API_VERSION@ \ 53 --pkg gstreamer-video-@GST_API_VERSION@ \
54 --pkg-export gstreamer-mpegts-@GST_API_VERSION@ \ 54 --pkg-export gstreamer-mpegts-@GST_API_VERSION@ \
55--
562.6.2
57
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch
index e81b065705..9fc91d8fc4 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch
@@ -12,16 +12,13 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
12 pkgconfig/gstreamer-gl.pc.in | 2 +- 12 pkgconfig/gstreamer-gl.pc.in | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-) 13 1 file changed, 1 insertion(+), 1 deletion(-)
14 14
15diff --git a/pkgconfig/gstreamer-gl.pc.in b/pkgconfig/gstreamer-gl.pc.in 15Index: gst-plugins-bad-1.10.1/pkgconfig/gstreamer-gl.pc.in
16index 5589e2a..b986450 100644 16===================================================================
17--- a/pkgconfig/gstreamer-gl.pc.in 17--- gst-plugins-bad-1.10.1.orig/pkgconfig/gstreamer-gl.pc.in
18+++ b/pkgconfig/gstreamer-gl.pc.in 18+++ gst-plugins-bad-1.10.1/pkgconfig/gstreamer-gl.pc.in
19@@ -10,4 +10,4 @@ Version: @VERSION@ 19@@ -10,4 +10,4 @@ Version: @VERSION@
20 Requires: gstreamer-base-@GST_API_VERSION@ gstreamer-@GST_API_VERSION@ 20 Requires: gstreamer-base-@GST_API_VERSION@ gstreamer-@GST_API_VERSION@
21 21
22 Libs: -L${libdir} -lgstgl-@GST_API_VERSION@ @GL_LIBS@ 22 Libs: -L${libdir} -lgstgl-@GST_API_VERSION@ @GL_LIBS@
23-Cflags: -I${includedir} @GL_CFLAGS@ 23-Cflags: -I${includedir} -I${libdir}/gstreamer-@GST_API_VERSION@/include @GL_CFLAGS@
24+Cflags: -I${includedir} 24+Cflags: -I${includedir} -I${libdir}/gstreamer-@GST_API_VERSION@/include
25--
262.7.0
27
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-enable-gldeinterlace-on-OpenGL-ES.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-enable-gldeinterlace-on-OpenGL-ES.patch
deleted file mode 100755
index 51f4eb4b39..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-enable-gldeinterlace-on-OpenGL-ES.patch
+++ /dev/null
@@ -1,634 +0,0 @@
1From 8a0e97f7e672301cc76e394855e8c7a3448b0249 Mon Sep 17 00:00:00 2001
2From: Haihua Hu <jared.hu@nxp.com>
3Date: Fri, 8 Apr 2016 16:47:15 +0800
4Subject: [PATCH 4/6] [glplugin] enable gldeinterlace on OpenGL ES
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
91.Porting the exist deinterlace shader and OpenGL callback
10 to be compatible with OpenGL ES.
112.Add a our blur vertical shader to gldeinterlace.
123.Add a property named “method” to let user choose which
13 deinterlace function to use. Default to choose blur vertical
14 method for better performance.
15
16Upstream-Status: Backport [1.9.1]
17
18https://bugzilla.gnome.org/show_bug.cgi?id=764873
19
20Signed-off-by: Haihua Hu <jared.hu@nxp.com>
21---
22 ext/gl/Makefile.am | 4 +-
23 ext/gl/gstgldeinterlace.c | 344 +++++++++++++++++++++++++++++++++++-----------
24 ext/gl/gstgldeinterlace.h | 6 +-
25 ext/gl/gstopengl.c | 13 +-
26 4 files changed, 275 insertions(+), 92 deletions(-)
27
28diff --git a/ext/gl/Makefile.am b/ext/gl/Makefile.am
29index 5d55f54..46419a7 100644
30--- a/ext/gl/Makefile.am
31+++ b/ext/gl/Makefile.am
32@@ -40,6 +40,7 @@ libgstopengl_la_SOURCES = \
33 gstglfilterapp.c \
34 gstglviewconvert.c \
35 gstglstereosplit.c \
36+ gstgldeinterlace.c \
37 gstglstereomix.c
38
39 noinst_HEADERS = \
40@@ -63,20 +64,19 @@ noinst_HEADERS = \
41 gstglfilterapp.h \
42 gstglstereosplit.h \
43 gstglstereomix.h \
44+ gstgldeinterlace.h \
45 gstglviewconvert.h
46
47 # full opengl required
48 if USE_OPENGL
49 libgstopengl_la_SOURCES += \
50 gstglfilterglass.c \
51- gstgldeinterlace.c \
52 gltestsrc.c \
53 gstgltestsrc.c \
54 gstglmosaic.c
55
56 noinst_HEADERS += \
57 gstglfilterglass.h \
58- gstgldeinterlace.h \
59 gltestsrc.h \
60 gstgltestsrc.h \
61 gstglmosaic.h \
62diff --git a/ext/gl/gstgldeinterlace.c b/ext/gl/gstgldeinterlace.c
63index bd0eff0..c1250dc 100644
64--- a/ext/gl/gstgldeinterlace.c
65+++ b/ext/gl/gstgldeinterlace.c
66@@ -43,7 +43,8 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
67
68 enum
69 {
70- PROP_0
71+ PROP_0,
72+ PROP_METHOD
73 };
74
75 #define DEBUG_INIT \
76@@ -57,17 +58,23 @@ static void gst_gl_deinterlace_set_property (GObject * object,
77 static void gst_gl_deinterlace_get_property (GObject * object,
78 guint prop_id, GValue * value, GParamSpec * pspec);
79
80+static gboolean gst_gl_deinterlace_start (GstBaseTransform * trans);
81 static gboolean gst_gl_deinterlace_reset (GstBaseTransform * trans);
82-static gboolean gst_gl_deinterlace_init_shader (GstGLFilter * filter);
83+static gboolean gst_gl_deinterlace_init_fbo (GstGLFilter * filter);
84 static gboolean gst_gl_deinterlace_filter (GstGLFilter * filter,
85 GstBuffer * inbuf, GstBuffer * outbuf);
86 static gboolean gst_gl_deinterlace_filter_texture (GstGLFilter * filter,
87 guint in_tex, guint out_tex);
88-static void gst_gl_deinterlace_callback (gint width, gint height,
89+static void gst_gl_deinterlace_vfir_callback (gint width, gint height,
90+ guint texture, gpointer stuff);
91+static void gst_gl_deinterlace_greedyh_callback (gint width, gint height,
92 guint texture, gpointer stuff);
93
94 /* *INDENT-OFF* */
95 static const gchar *greedyh_fragment_source =
96+ "#ifdef GL_ES\n"
97+ "precision mediump float;\n"
98+ "#endif\n"
99 "uniform sampler2D tex;\n"
100 "uniform sampler2D tex_prev;\n"
101 "uniform float max_comb;\n"
102@@ -75,35 +82,35 @@ static const gchar *greedyh_fragment_source =
103 "uniform float motion_sense;\n"
104 "uniform float width;\n"
105 "uniform float height;\n"
106+ "varying vec2 v_texcoord;\n"
107
108 "void main () {\n"
109- " vec2 texcoord = gl_TexCoord[0].xy;\n"
110- " if (int(mod(texcoord.y * height, 2.0)) == 0) {\n"
111- " gl_FragColor = vec4(texture2D(tex_prev, texcoord).rgb, 1.0);\n"
112+ " if (int(mod(v_texcoord.y * height, 2.0)) == 0) {\n"
113+ " gl_FragColor = vec4(texture2D(tex_prev, v_texcoord).rgb, 1.0);\n"
114 " } else {\n"
115 " vec2 texcoord_L1_a1, texcoord_L3_a1, texcoord_L1, texcoord_L3, texcoord_L1_1, texcoord_L3_1;\n"
116 " vec3 L1_a1, L3_a1, L1, L3, L1_1, L3_1;\n"
117
118- " texcoord_L1 = vec2(texcoord.x, texcoord.y - 1.0 / height);\n"
119- " texcoord_L3 = vec2(texcoord.x, texcoord.y + 1.0 / height);\n"
120+ " texcoord_L1 = vec2(v_texcoord.x, v_texcoord.y - 1.0 / height);\n"
121+ " texcoord_L3 = vec2(v_texcoord.x, v_texcoord.y + 1.0 / height);\n"
122 " L1 = texture2D(tex_prev, texcoord_L1).rgb;\n"
123 " L3 = texture2D(tex_prev, texcoord_L3).rgb;\n"
124- " if (texcoord.x == 1.0 && texcoord.y == 1.0) {\n"
125+ " if (v_texcoord.x == 1.0 && v_texcoord.y == 1.0) {\n"
126 " L1_1 = L1;\n"
127 " L3_1 = L3;\n"
128 " } else {\n"
129- " texcoord_L1_1 = vec2(texcoord.x + 1.0 / width, texcoord.y - 1.0 / height);\n"
130- " texcoord_L3_1 = vec2(texcoord.x + 1.0 / width, texcoord.y + 1.0 / height);\n"
131+ " texcoord_L1_1 = vec2(v_texcoord.x + 1.0 / width, v_texcoord.y - 1.0 / height);\n"
132+ " texcoord_L3_1 = vec2(v_texcoord.x + 1.0 / width, v_texcoord.y + 1.0 / height);\n"
133 " L1_1 = texture2D(tex_prev, texcoord_L1_1).rgb;\n"
134 " L3_1 = texture2D(tex_prev, texcoord_L3_1).rgb;\n"
135 " }\n"
136
137- " if (int(ceil(texcoord.x + texcoord.y)) == 0) {\n"
138+ " if (int(ceil(v_texcoord.x + v_texcoord.y)) == 0) {\n"
139 " L1_a1 = L1;\n"
140 " L3_a1 = L3;\n"
141 " } else {\n"
142- " texcoord_L1_a1 = vec2(texcoord.x - 1.0 / width, texcoord.y - 1.0 / height);\n"
143- " texcoord_L3_a1 = vec2(texcoord.x - 1.0 / width, texcoord.y + 1.0 / height);\n"
144+ " texcoord_L1_a1 = vec2(v_texcoord.x - 1.0 / width, v_texcoord.y - 1.0 / height);\n"
145+ " texcoord_L3_a1 = vec2(v_texcoord.x - 1.0 / width, v_texcoord.y + 1.0 / height);\n"
146 " L1_a1 = texture2D(tex_prev, texcoord_L1_a1).rgb;\n"
147 " L3_a1 = texture2D(tex_prev, texcoord_L3_a1).rgb;\n"
148 " }\n"
149@@ -113,8 +120,8 @@ static const gchar *greedyh_fragment_source =
150 " vec3 avg_1 = (L1_1 + L3_1) / 2.0;\n"
151 " vec3 avg_s = (avg_a1 + avg_1) / 2.0;\n"
152 " vec3 avg_sc = (avg_s + avg) / 2.0;\n"
153- " vec3 L2 = texture2D(tex, texcoord).rgb;\n"
154- " vec3 LP2 = texture2D(tex_prev, texcoord).rgb;\n"
155+ " vec3 L2 = texture2D(tex, v_texcoord).rgb;\n"
156+ " vec3 LP2 = texture2D(tex_prev, v_texcoord).rgb;\n"
157 " vec3 best;\n"
158 " if (abs(L2.r - avg_sc.r) < abs(LP2.r - avg_sc.r)) {\n"
159 " best.r = L2.r;\n" " } else {\n"
160@@ -144,8 +151,87 @@ static const gchar *greedyh_fragment_source =
161 " gl_FragColor = vec4(last, 1.0);\n"
162 " }\n"
163 "}\n";
164+
165+const gchar *vfir_fragment_source =
166+ "#ifdef GL_ES\n"
167+ "precision mediump float;\n"
168+ "#endif\n"
169+ "uniform sampler2D tex;\n"
170+ "uniform float width;\n"
171+ "uniform float height;\n"
172+ "varying vec2 v_texcoord;\n"
173+ "void main()\n"
174+ "{\n"
175+ " vec2 topcoord, botcoord;\n"
176+ " vec4 cur_color, top_color, bot_color;\n"
177+ " topcoord.x = v_texcoord.x;\n"
178+ " botcoord.x = v_texcoord.x;\n"
179+ " if (v_texcoord.y == 0.0 || v_texcoord.y == 1.0) {\n"
180+ " topcoord.y = v_texcoord.y ;\n"
181+ " botcoord.y = v_texcoord.y ;\n"
182+ " }\n"
183+ " else {\n"
184+ " topcoord.y = v_texcoord.y - 1.0/height;\n"
185+ " botcoord.y = v_texcoord.y + 1.0/height;\n"
186+ " }\n"
187+ " cur_color = texture2D(tex, v_texcoord);\n"
188+ " top_color = texture2D(tex, topcoord);\n"
189+ " bot_color = texture2D(tex, botcoord);\n"
190+ " gl_FragColor = 0.5*cur_color + 0.25*top_color + 0.25*bot_color;\n"
191+ "}";
192 /* *INDENT-ON* */
193
194+/* dont' forget to edit the following when a new method is added */
195+typedef enum
196+{
197+ GST_GL_DEINTERLACE_VFIR,
198+ GST_GL_DEINTERLACE_GREEDYH
199+} GstGLDeinterlaceMethod;
200+
201+static const GEnumValue *
202+gst_gl_deinterlace_get_methods (void)
203+{
204+ static const GEnumValue method_types[] = {
205+ {GST_GL_DEINTERLACE_VFIR, "Blur Vertical", "vfir"},
206+ {GST_GL_DEINTERLACE_GREEDYH, "Motion Adaptive: Advanced Detection",
207+ "greedhy"},
208+ {0, NULL, NULL}
209+ };
210+ return method_types;
211+}
212+
213+#define GST_TYPE_GL_DEINTERLACE_METHODS (gst_gl_deinterlace_method_get_type ())
214+static GType
215+gst_gl_deinterlace_method_get_type (void)
216+{
217+ static GType gl_deinterlace_method_type = 0;
218+ if (!gl_deinterlace_method_type) {
219+ gl_deinterlace_method_type =
220+ g_enum_register_static ("GstGLDeinterlaceMethod",
221+ gst_gl_deinterlace_get_methods ());
222+ }
223+ return gl_deinterlace_method_type;
224+}
225+
226+static void
227+gst_gl_deinterlace_set_method (GstGLDeinterlace * deinterlace,
228+ guint method_types)
229+{
230+ switch (method_types) {
231+ case GST_GL_DEINTERLACE_VFIR:
232+ deinterlace->deinterlacefunc = gst_gl_deinterlace_vfir_callback;
233+ deinterlace->current_method = method_types;
234+ break;
235+ case GST_GL_DEINTERLACE_GREEDYH:
236+ deinterlace->deinterlacefunc = gst_gl_deinterlace_greedyh_callback;
237+ deinterlace->current_method = method_types;
238+ break;
239+ default:
240+ g_assert_not_reached ();
241+ break;
242+ }
243+}
244+
245 static void
246 gst_gl_deinterlace_class_init (GstGLDeinterlaceClass * klass)
247 {
248@@ -163,25 +249,60 @@ gst_gl_deinterlace_class_init (GstGLDeinterlaceClass * klass)
249 "Deinterlacing based on fragment shaders",
250 "Julien Isorce <julien.isorce@mail.com>");
251
252+ g_object_class_install_property (gobject_class,
253+ PROP_METHOD,
254+ g_param_spec_enum ("method",
255+ "Deinterlace Method",
256+ "Select which deinterlace method apply to GL video texture",
257+ GST_TYPE_GL_DEINTERLACE_METHODS,
258+ GST_GL_DEINTERLACE_VFIR, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
259+
260+ GST_BASE_TRANSFORM_CLASS (klass)->start = gst_gl_deinterlace_start;
261 GST_BASE_TRANSFORM_CLASS (klass)->stop = gst_gl_deinterlace_reset;
262
263 GST_GL_FILTER_CLASS (klass)->filter = gst_gl_deinterlace_filter;
264 GST_GL_FILTER_CLASS (klass)->filter_texture =
265 gst_gl_deinterlace_filter_texture;
266- GST_GL_FILTER_CLASS (klass)->init_fbo = gst_gl_deinterlace_init_shader;
267+ GST_GL_FILTER_CLASS (klass)->init_fbo = gst_gl_deinterlace_init_fbo;
268
269- GST_GL_BASE_FILTER_CLASS (klass)->supported_gl_api = GST_GL_API_OPENGL;
270+ GST_GL_BASE_FILTER_CLASS (klass)->supported_gl_api =
271+ GST_GL_API_OPENGL | GST_GL_API_GLES2 | GST_GL_API_OPENGL3;
272 }
273
274 static void
275 gst_gl_deinterlace_init (GstGLDeinterlace * filter)
276 {
277- filter->shader = NULL;
278+ filter->shaderstable = NULL;
279+ filter->deinterlacefunc = gst_gl_deinterlace_vfir_callback;
280+ filter->current_method = GST_GL_DEINTERLACE_VFIR;
281 filter->prev_buffer = NULL;
282 filter->prev_tex = 0;
283 }
284
285 static gboolean
286+gst_gl_deinterlace_start (GstBaseTransform * trans)
287+{
288+ GstGLDeinterlace *deinterlace_filter = GST_GL_DEINTERLACE (trans);
289+
290+ deinterlace_filter->shaderstable = g_hash_table_new (g_str_hash, g_str_equal);
291+
292+ return GST_BASE_TRANSFORM_CLASS (parent_class)->start (trans);
293+}
294+
295+static void
296+gst_gl_deinterlace_ghash_func_clean (gpointer key, gpointer value,
297+ gpointer data)
298+{
299+ GstGLShader *shader = (GstGLShader *) value;
300+ GstGLFilter *filter = (GstGLFilter *) data;
301+
302+ //blocking call, wait the opengl thread has destroyed the shader
303+ gst_gl_context_del_shader (GST_GL_BASE_FILTER (filter)->context, shader);
304+
305+ value = NULL;
306+}
307+
308+static gboolean
309 gst_gl_deinterlace_reset (GstBaseTransform * trans)
310 {
311 GstGLDeinterlace *deinterlace_filter = GST_GL_DEINTERLACE (trans);
312@@ -189,10 +310,17 @@ gst_gl_deinterlace_reset (GstBaseTransform * trans)
313 gst_buffer_replace (&deinterlace_filter->prev_buffer, NULL);
314
315 //blocking call, wait the opengl thread has destroyed the shader
316- if (deinterlace_filter->shader)
317- gst_gl_context_del_shader (GST_GL_BASE_FILTER (trans)->context,
318- deinterlace_filter->shader);
319- deinterlace_filter->shader = NULL;
320+ if (deinterlace_filter->shaderstable) {
321+ /* release shaders in the gl thread */
322+ g_hash_table_foreach (deinterlace_filter->shaderstable,
323+ gst_gl_deinterlace_ghash_func_clean, deinterlace_filter);
324+
325+ /* clean the htable without calling values destructors
326+ * because shaders have been released in the glthread
327+ * through the foreach func */
328+ g_hash_table_unref (deinterlace_filter->shaderstable);
329+ deinterlace_filter->shaderstable = NULL;
330+ }
331
332 return GST_BASE_TRANSFORM_CLASS (parent_class)->stop (trans);
333 }
334@@ -201,9 +329,12 @@ static void
335 gst_gl_deinterlace_set_property (GObject * object, guint prop_id,
336 const GValue * value, GParamSpec * pspec)
337 {
338- //GstGLDeinterlace *filter = GST_GL_DEINTERLACE (object);
339+ GstGLDeinterlace *filter = GST_GL_DEINTERLACE (object);
340
341 switch (prop_id) {
342+ case PROP_METHOD:
343+ gst_gl_deinterlace_set_method (filter, g_value_get_enum (value));
344+ break;
345 default:
346 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
347 break;
348@@ -214,9 +345,12 @@ static void
349 gst_gl_deinterlace_get_property (GObject * object, guint prop_id,
350 GValue * value, GParamSpec * pspec)
351 {
352- //GstGLDeinterlace *filter = GST_GL_DEINTERLACE (object);
353+ GstGLDeinterlace *filter = GST_GL_DEINTERLACE (object);
354
355 switch (prop_id) {
356+ case PROP_METHOD:
357+ g_value_set_enum (value, filter->current_method);
358+ break;
359 default:
360 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
361 break;
362@@ -224,13 +358,9 @@ gst_gl_deinterlace_get_property (GObject * object, guint prop_id,
363 }
364
365 static gboolean
366-gst_gl_deinterlace_init_shader (GstGLFilter * filter)
367+gst_gl_deinterlace_init_fbo (GstGLFilter * filter)
368 {
369- GstGLDeinterlace *deinterlace_filter = GST_GL_DEINTERLACE (filter);
370-
371- //blocking call, wait the opengl thread has compiled the shader
372- return gst_gl_context_gen_shader (GST_GL_BASE_FILTER (filter)->context, 0,
373- greedyh_fragment_source, &deinterlace_filter->shader);
374+ return TRUE;
375 }
376
377 static gboolean
378@@ -241,7 +371,7 @@ gst_gl_deinterlace_filter_texture (GstGLFilter * filter, guint in_tex,
379
380 //blocking call, use a FBO
381 gst_gl_filter_render_to_target (filter, TRUE, in_tex, out_tex,
382- gst_gl_deinterlace_callback, deinterlace_filter);
383+ deinterlace_filter->deinterlacefunc, deinterlace_filter);
384
385 return TRUE;
386 }
387@@ -259,36 +389,104 @@ gst_gl_deinterlace_filter (GstGLFilter * filter, GstBuffer * inbuf,
388 return TRUE;
389 }
390
391-//opengl scene, params: input texture (not the output filter->texture)
392+static GstGLShader *
393+gst_gl_deinterlace_get_fragment_shader (GstGLFilter * filter,
394+ const gchar * shader_name, const gchar * shader_source)
395+{
396+ GstGLShader *shader = NULL;
397+ GstGLDeinterlace *deinterlace_filter = GST_GL_DEINTERLACE (filter);
398+ GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
399+
400+ shader = g_hash_table_lookup (deinterlace_filter->shaderstable, shader_name);
401+
402+ if (!shader) {
403+ GError *error = NULL;
404+
405+ if (!(shader = gst_gl_shader_new_link_with_stages (context, &error,
406+ gst_glsl_stage_new_default_vertex (context),
407+ gst_glsl_stage_new_with_string (context, GL_FRAGMENT_SHADER,
408+ GST_GLSL_VERSION_NONE,
409+ GST_GLSL_PROFILE_ES | GST_GLSL_PROFILE_COMPATIBILITY,
410+ shader_source), NULL))) {
411+ GST_ELEMENT_ERROR (deinterlace_filter, RESOURCE, NOT_FOUND,
412+ ("Failed to initialize %s shader", shader_name), (NULL));
413+ }
414+
415+ filter->draw_attr_position_loc =
416+ gst_gl_shader_get_attribute_location (shader, "a_position");
417+ filter->draw_attr_texture_loc =
418+ gst_gl_shader_get_attribute_location (shader, "a_texcoord");
419+ }
420+
421+ g_hash_table_insert (deinterlace_filter->shaderstable, (gchar *) shader_name,
422+ shader);
423+
424+ return shader;
425+}
426+
427 static void
428-gst_gl_deinterlace_callback (gint width, gint height, guint texture,
429+gst_gl_deinterlace_vfir_callback (gint width, gint height, guint texture,
430 gpointer stuff)
431 {
432- GstGLDeinterlace *deinterlace_filter = GST_GL_DEINTERLACE (stuff);
433+ GstGLShader *shader;
434 GstGLFilter *filter = GST_GL_FILTER (stuff);
435- GstGLFuncs *gl = GST_GL_BASE_FILTER (filter)->context->gl_vtable;
436+ GstGLDeinterlace *deinterlace_filter = GST_GL_DEINTERLACE (filter);
437+ GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
438+ GstGLFuncs *gl = context->gl_vtable;
439+
440+ shader = gst_gl_deinterlace_get_fragment_shader (deinterlace_filter, "vfir",
441+ vfir_fragment_source);
442+
443+ if (!shader)
444+ return;
445+
446+#if GST_GL_HAVE_OPENGL
447+ if (USING_OPENGL (context)) {
448+ gl->MatrixMode (GL_PROJECTION);
449+ gl->LoadIdentity ();
450+ }
451+#endif
452+
453+ gst_gl_shader_use (shader);
454+
455+ gl->ActiveTexture (GL_TEXTURE0);
456+ gl->BindTexture (GL_TEXTURE_2D, texture);
457+
458+ gst_gl_shader_set_uniform_1i (shader, "tex", 0);
459+ gst_gl_shader_set_uniform_1f (shader, "width",
460+ GST_VIDEO_INFO_WIDTH (&filter->out_info));
461+ gst_gl_shader_set_uniform_1f (shader, "height",
462+ GST_VIDEO_INFO_HEIGHT (&filter->out_info));
463+
464+ gst_gl_filter_draw_texture (filter, texture, width, height);
465+}
466+
467+static void
468+gst_gl_deinterlace_greedyh_callback (gint width, gint height, guint texture,
469+ gpointer stuff)
470+{
471+ GstGLShader *shader;
472+ GstGLFilter *filter = GST_GL_FILTER (stuff);
473+ GstGLDeinterlace *deinterlace_filter = GST_GL_DEINTERLACE (filter);
474+ GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
475+ GstGLFuncs *gl = context->gl_vtable;
476 guint temp;
477
478- GLfloat verts[] = { -1.0, -1.0,
479- 1.0, -1.0,
480- 1.0, 1.0,
481- -1.0, 1.0
482- };
483- GLfloat texcoords0[] = { 0.0f, 0.0f,
484- 1.0f, 0.0f,
485- 1.0f, 1.0f,
486- 0.0f, 1.0f
487- };
488- GLfloat texcoords1[] = { 0.0f, 0.0f,
489- 1.0f, 0.0f,
490- 1.0f, 1.0f,
491- 0.0f, 1.0f
492- };
493+ shader =
494+ gst_gl_deinterlace_get_fragment_shader (deinterlace_filter, "greedhy",
495+ greedyh_fragment_source);
496
497- gl->MatrixMode (GL_PROJECTION);
498- gl->LoadIdentity ();
499+ if (!shader)
500+ return;
501
502- gst_gl_shader_use (deinterlace_filter->shader);
503+#if GST_GL_HAVE_OPENGL
504+ if (USING_OPENGL (context)) {
505+ gl->MatrixMode (GL_PROJECTION);
506+ gl->LoadIdentity ();
507+ }
508+#endif
509+
510+ gst_gl_shader_use (shader);
511
512 if (G_UNLIKELY (deinterlace_filter->prev_tex == 0)) {
513 gst_gl_context_gen_texture (GST_GL_BASE_FILTER (filter)->context,
514@@ -298,44 +496,24 @@ gst_gl_deinterlace_callback (gint width, gint height, guint texture,
515 GST_VIDEO_INFO_HEIGHT (&filter->out_info));
516 } else {
517 gl->ActiveTexture (GL_TEXTURE1);
518- gst_gl_shader_set_uniform_1i (deinterlace_filter->shader, "tex_prev", 1);
519+ gst_gl_shader_set_uniform_1i (shader, "tex_prev", 1);
520 gl->BindTexture (GL_TEXTURE_2D, deinterlace_filter->prev_tex);
521 }
522
523 gl->ActiveTexture (GL_TEXTURE0);
524- gst_gl_shader_set_uniform_1i (deinterlace_filter->shader, "tex", 0);
525+ gl->BindTexture (GL_TEXTURE_2D, texture);
526
527- gst_gl_shader_set_uniform_1f (deinterlace_filter->shader, "max_comb",
528- 5.0f / 255.0f);
529- gst_gl_shader_set_uniform_1f (deinterlace_filter->shader, "motion_threshold",
530- 25.0f / 255.0f);
531- gst_gl_shader_set_uniform_1f (deinterlace_filter->shader, "motion_sense",
532- 30.0f / 255.0f);
533+ gst_gl_shader_set_uniform_1i (shader, "tex", 0);
534+ gst_gl_shader_set_uniform_1f (shader, "max_comb", 5.0f / 255.0f);
535+ gst_gl_shader_set_uniform_1f (shader, "motion_threshold", 25.0f / 255.0f);
536+ gst_gl_shader_set_uniform_1f (shader, "motion_sense", 30.0f / 255.0f);
537
538- gst_gl_shader_set_uniform_1f (deinterlace_filter->shader, "width",
539+ gst_gl_shader_set_uniform_1f (shader, "width",
540 GST_VIDEO_INFO_WIDTH (&filter->out_info));
541- gst_gl_shader_set_uniform_1f (deinterlace_filter->shader, "height",
542+ gst_gl_shader_set_uniform_1f (shader, "height",
543 GST_VIDEO_INFO_HEIGHT (&filter->out_info));
544
545- gl->ClientActiveTexture (GL_TEXTURE0);
546-
547- gl->EnableClientState (GL_TEXTURE_COORD_ARRAY);
548- gl->EnableClientState (GL_VERTEX_ARRAY);
549-
550- gl->VertexPointer (2, GL_FLOAT, 0, &verts);
551- gl->TexCoordPointer (2, GL_FLOAT, 0, &texcoords0);
552-
553- gl->ClientActiveTexture (GL_TEXTURE1);
554- gl->EnableClientState (GL_TEXTURE_COORD_ARRAY);
555- gl->TexCoordPointer (2, GL_FLOAT, 0, &texcoords1);
556-
557- gl->DrawArrays (GL_TRIANGLE_FAN, 0, 4);
558-
559- gl->DisableClientState (GL_VERTEX_ARRAY);
560- gl->DisableClientState (GL_TEXTURE_COORD_ARRAY);
561-
562- gl->ClientActiveTexture (GL_TEXTURE0);
563- gl->DisableClientState (GL_TEXTURE_COORD_ARRAY);
564+ gst_gl_filter_draw_texture (filter, texture, width, height);
565
566 if (texture == filter->in_tex_id) {
567 temp = filter->in_tex_id;
568diff --git a/ext/gl/gstgldeinterlace.h b/ext/gl/gstgldeinterlace.h
569index a81a2e7..58a9c0c 100644
570--- a/ext/gl/gstgldeinterlace.h
571+++ b/ext/gl/gstgldeinterlace.h
572@@ -38,9 +38,13 @@ typedef struct _GstGLDeinterlaceClass GstGLDeinterlaceClass;
573 struct _GstGLDeinterlace
574 {
575 GstGLFilter filter;
576- GstGLShader *shader;
577+
578+ GLCB deinterlacefunc;
579+ GHashTable *shaderstable;
580 GstBuffer *prev_buffer;
581 guint prev_tex;
582+
583+ gint current_method;
584 };
585
586 struct _GstGLDeinterlaceClass
587diff --git a/ext/gl/gstopengl.c b/ext/gl/gstopengl.c
588index 50676c4..135862a 100644
589--- a/ext/gl/gstopengl.c
590+++ b/ext/gl/gstopengl.c
591@@ -62,6 +62,7 @@
592 #include "gstglstereosplit.h"
593 #include "gstglstereomix.h"
594 #include "gstglviewconvert.h"
595+#include "gstgldeinterlace.h"
596
597 #if HAVE_GRAPHENE
598 #include "gstgltransformation.h"
599@@ -77,7 +78,6 @@
600 #include "gstgltestsrc.h"
601 #include "gstglfilterglass.h"
602 /* #include "gstglfilterreflectedscreen.h" */
603-#include "gstgldeinterlace.h"
604 #include "gstglmosaic.h"
605 #if HAVE_PNG
606 #include "gstgldifferencematte.h"
607@@ -226,6 +226,12 @@ plugin_init (GstPlugin * plugin)
608 GST_RANK_NONE, GST_TYPE_GL_STEREO_MIX)) {
609 return FALSE;
610 }
611+
612+ if (!gst_element_register (plugin, "gldeinterlace",
613+ GST_RANK_NONE, GST_TYPE_GL_DEINTERLACE)) {
614+ return FALSE;
615+ }
616+
617 #if HAVE_JPEG
618 #if HAVE_PNG
619 if (!gst_element_register (plugin, "gloverlay",
620@@ -250,11 +256,6 @@ plugin_init (GstPlugin * plugin)
621 return FALSE;
622 }
623 #endif
624- if (!gst_element_register (plugin, "gldeinterlace",
625- GST_RANK_NONE, GST_TYPE_GL_DEINTERLACE)) {
626- return FALSE;
627- }
628-
629 if (!gst_element_register (plugin, "glmosaic",
630 GST_RANK_NONE, GST_TYPE_GL_MOSAIC)) {
631 return FALSE;
632--
6331.9.1
634
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-glcolorconvert-implement-multiple-render-targets-for.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-glcolorconvert-implement-multiple-render-targets-for.patch
deleted file mode 100755
index 31d8e052fd..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-glcolorconvert-implement-multiple-render-targets-for.patch
+++ /dev/null
@@ -1,244 +0,0 @@
1From 127e517568490fc147211d8b2fb4da01cecbbeb5 Mon Sep 17 00:00:00 2001
2From: Matthew Waters <matthew@centricular.com>
3Date: Thu, 31 Mar 2016 19:50:28 +1100
4Subject: [PATCH 5/6] glcolorconvert: implement multiple render targets for
5 GLES3
6
7There are numerous slight differences required between Desktop GL and GLES3 for
8multiple render targets.
9
101. gl_FragData doesn't exist at all and one is required to use
11 'layout (location = ?) out ...' instead.
122. gl_FragColor doesn't exist, same as 1
133. texture2D() has been deprecated
14
15Fortunately most of these have been taken care of with GL3 and the shader
16mangling already exists so just expand the conditions they are used in. The
17gl_FragData issue requires a new mangle pass though. We also use this new
18pass on desktop GL for consistency.
19
20Upstream-Status: Backport [1.9.1]
21
22---
23 gst-libs/gst/gl/gstglcolorconvert.c | 125 ++++++++++++++++++++++++++++--------
24 1 file changed, 99 insertions(+), 26 deletions(-)
25
26diff --git a/gst-libs/gst/gl/gstglcolorconvert.c b/gst-libs/gst/gl/gstglcolorconvert.c
27index 490ec54..f478faa 100644
28--- a/gst-libs/gst/gl/gstglcolorconvert.c
29+++ b/gst-libs/gst/gl/gstglcolorconvert.c
30@@ -1802,10 +1802,11 @@ _mangle_sampler_type (const gchar * str, GstGLTextureTarget from,
31
32 static gchar *
33 _mangle_varying_attribute (const gchar * str, guint shader_type,
34- GstGLAPI gl_api)
35+ GstGLAPI gl_api, guint gl_major, guint gl_minor)
36 {
37- if (gl_api & GST_GL_API_OPENGL3) {
38- if (shader_type == GL_VERTEX_SHADER) {
39+ if (shader_type == GL_VERTEX_SHADER) {
40+ if ((gl_api & GST_GL_API_OPENGL3) || (gl_api & GST_GL_API_GLES2
41+ && gl_major >= 3)) {
42 gchar *tmp, *tmp2;
43 GRegex *regex;
44
45@@ -1821,7 +1822,10 @@ _mangle_varying_attribute (const gchar * str, guint shader_type,
46
47 g_free (tmp);
48 return tmp2;
49- } else if (shader_type == GL_FRAGMENT_SHADER) {
50+ }
51+ } else if (shader_type == GL_FRAGMENT_SHADER) {
52+ if ((gl_api & GST_GL_API_OPENGL3) || (gl_api & GST_GL_API_GLES2
53+ && gl_major > 3)) {
54 gchar *tmp;
55 GRegex *regex;
56
57@@ -1837,28 +1841,48 @@ _mangle_varying_attribute (const gchar * str, guint shader_type,
58 }
59
60 static gchar *
61-_mangle_frag_color (const gchar * str)
62+_mangle_frag_color_data (const gchar * str)
63 {
64 GRegex *regex;
65- gchar *ret;
66+ gchar *ret, *tmp;
67
68 regex = g_regex_new ("gl_FragColor", 0, 0, NULL);
69 ret = g_regex_replace_literal (regex, str, -1, 0, "fragColor", 0, NULL);
70 g_regex_unref (regex);
71
72+ tmp = ret;
73+ /* search and replace 'gl_FragData[NUM]' into fragColor_NUM */
74+ regex = g_regex_new ("gl_FragData\\[(\\d+)\\]", 0, 0, NULL);
75+ ret = g_regex_replace (regex, tmp, -1, 0, "fragColor_\\1", 0, NULL);
76+ g_regex_unref (regex);
77+ g_free (tmp);
78+
79 return ret;
80 }
81
82 static void
83-_mangle_version_profile_from_gl_api (GstGLAPI gl_api, GstGLSLVersion * version,
84- GstGLSLProfile * profile)
85+_mangle_version_profile_from_gl_api (GstGLAPI gl_api, gint gl_major,
86+ gint gl_minor, GstGLSLVersion * version, GstGLSLProfile * profile)
87 {
88+ *version = GST_GLSL_VERSION_NONE;
89+ *profile = GST_GLSL_PROFILE_NONE;
90+
91 if (gl_api & GST_GL_API_OPENGL3) {
92- *version = GST_GLSL_VERSION_150;
93- *profile = GST_GLSL_PROFILE_NONE;
94+ if (gl_major > 3 || gl_minor >= 3) {
95+ *version = GST_GLSL_VERSION_330;
96+ *profile = GST_GLSL_PROFILE_CORE;
97+ } else {
98+ *version = GST_GLSL_VERSION_150;
99+ *profile = GST_GLSL_PROFILE_NONE;
100+ }
101 } else if (gl_api & GST_GL_API_GLES2) {
102- *version = GST_GLSL_VERSION_100;
103- *profile = GST_GLSL_PROFILE_ES;
104+ if (gl_major >= 3) {
105+ *version = GST_GLSL_VERSION_300;
106+ *profile = GST_GLSL_PROFILE_ES;
107+ } else if (gl_major >= 2) {
108+ *version = GST_GLSL_VERSION_100;
109+ *profile = GST_GLSL_PROFILE_ES;
110+ }
111 } else if (gl_api & GST_GL_API_OPENGL) {
112 *version = GST_GLSL_VERSION_110;
113 *profile = GST_GLSL_PROFILE_COMPATIBILITY;
114@@ -1867,22 +1891,28 @@ _mangle_version_profile_from_gl_api (GstGLAPI gl_api, GstGLSLVersion * version,
115
116 static gchar *
117 _mangle_shader (const gchar * str, guint shader_type, GstGLTextureTarget from,
118- GstGLTextureTarget to, GstGLAPI gl_api, GstGLSLVersion * version,
119- GstGLSLProfile * profile)
120+ GstGLTextureTarget to, GstGLAPI gl_api, gint gl_major, gint gl_minor,
121+ GstGLSLVersion * version, GstGLSLProfile * profile)
122 {
123 gchar *tmp, *tmp2;
124
125+ _mangle_version_profile_from_gl_api (gl_api, gl_major, gl_minor, version,
126+ profile);
127 tmp = _mangle_texture_access (str, from, to, gl_api);
128 tmp2 = _mangle_sampler_type (tmp, from, to);
129 g_free (tmp);
130- tmp = _mangle_varying_attribute (tmp2, shader_type, gl_api);
131+ tmp =
132+ _mangle_varying_attribute (tmp2, shader_type, gl_api, gl_major, gl_minor);
133 g_free (tmp2);
134- if (shader_type == GL_FRAGMENT_SHADER && gl_api & GST_GL_API_OPENGL3) {
135- tmp2 = _mangle_frag_color (tmp);
136- g_free (tmp);
137- tmp = tmp2;
138+ if (shader_type == GL_FRAGMENT_SHADER) {
139+ if ((*profile == GST_GLSL_PROFILE_ES && *version >= GST_GLSL_VERSION_300)
140+ || (*profile == GST_GLSL_PROFILE_CORE
141+ && *version >= GST_GLSL_VERSION_150)) {
142+ tmp2 = _mangle_frag_color_data (tmp);
143+ g_free (tmp);
144+ tmp = tmp2;
145+ }
146 }
147- _mangle_version_profile_from_gl_api (gl_api, version, profile);
148 return tmp;
149 }
150
151@@ -1899,15 +1929,18 @@ _create_shader (GstGLColorConvert * convert)
152 const gchar *strings[2];
153 GError *error = NULL;
154 GstGLAPI gl_api;
155+ gint gl_major, gl_minor;
156 int i;
157
158 gl_api = gst_gl_context_get_gl_api (convert->context);
159+ gst_gl_context_get_gl_version (convert->context, &gl_major, &gl_minor);
160
161 ret = gst_gl_shader_new (convert->context);
162
163 tmp =
164 _mangle_shader (text_vertex_shader, GL_VERTEX_SHADER, info->templ->target,
165- convert->priv->from_texture_target, gl_api, &version, &profile);
166+ convert->priv->from_texture_target, gl_api, gl_major, gl_minor, &version,
167+ &profile);
168
169 tmp1 = gst_glsl_version_profile_to_string (version, profile);
170 version_str = g_strdup_printf ("#version %s\n", tmp1);
171@@ -1945,9 +1978,37 @@ _create_shader (GstGLColorConvert * convert)
172 if (info->templ->uniforms)
173 g_string_append (str, info->templ->uniforms);
174
175- if (gl_api & GST_GL_API_OPENGL3) {
176- g_string_append_c (str, '\n');
177- g_string_append (str, "out vec4 fragColor;\n");
178+ g_string_append_c (str, '\n');
179+
180+ /* GL 3.3+ and GL ES 3.x */
181+ if ((profile == GST_GLSL_PROFILE_CORE && version >= GST_GLSL_VERSION_330)
182+ || (profile == GST_GLSL_PROFILE_ES && version >= GST_GLSL_VERSION_300)) {
183+ if (info->out_n_textures > 1) {
184+ gint i;
185+
186+ for (i = 0; i < info->out_n_textures; i++) {
187+ g_string_append_printf (str,
188+ "layout(location = %d) out vec4 fragColor_%d;\n", i, i);
189+ }
190+ } else {
191+ g_string_append (str, "layout (location = 0) out vec4 fragColor;\n");
192+ }
193+ } else if (profile == GST_GLSL_PROFILE_CORE
194+ && version >= GST_GLSL_VERSION_150) {
195+ /* no layout specifiers, use glBindFragDataLocation instead */
196+ if (info->out_n_textures > 1) {
197+ gint i;
198+
199+ for (i = 0; i < info->out_n_textures; i++) {
200+ gchar *var_name = g_strdup_printf ("fragColor_%d", i);
201+ g_string_append_printf (str, "out vec4 %s;\n", var_name);
202+ gst_gl_shader_bind_frag_data_location (ret, i, var_name);
203+ g_free (var_name);
204+ }
205+ } else {
206+ g_string_append (str, "out vec4 fragColor;\n");
207+ gst_gl_shader_bind_frag_data_location (ret, 0, "fragColor");
208+ }
209 }
210
211 for (i = 0; i < MAX_FUNCTIONS; i++) {
212@@ -1959,7 +2020,19 @@ _create_shader (GstGLColorConvert * convert)
213 g_string_append_c (str, '\n');
214 }
215
216- g_string_append (str, "\nvarying vec2 v_texcoord;\nvoid main (void) {\n");
217+ {
218+ const gchar *varying = NULL;
219+
220+ if ((profile == GST_GLSL_PROFILE_ES && version >= GST_GLSL_VERSION_300)
221+ || (profile == GST_GLSL_PROFILE_CORE
222+ && version >= GST_GLSL_VERSION_150)) {
223+ varying = "in";
224+ } else {
225+ varying = "varying";
226+ }
227+ g_string_append_printf (str, "\n%s vec2 v_texcoord;\nvoid main (void) {\n",
228+ varying);
229+ }
230 if (info->frag_body) {
231 g_string_append (str, "vec2 texcoord;\n");
232 if (convert->priv->from_texture_target == GST_GL_TEXTURE_TARGET_RECTANGLE
233@@ -1975,7 +2048,7 @@ _create_shader (GstGLColorConvert * convert)
234 tmp = g_string_free (str, FALSE);
235 info->frag_prog = _mangle_shader (tmp, GL_FRAGMENT_SHADER,
236 info->templ->target, convert->priv->from_texture_target, gl_api,
237- &version, &profile);
238+ gl_major, gl_minor, &version, &profile);
239 g_free (tmp);
240
241 strings[1] = info->frag_prog;
242--
2431.9.1
244
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-glcolorconvert-don-t-use-the-predefined-variable-nam.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-glcolorconvert-don-t-use-the-predefined-variable-nam.patch
deleted file mode 100755
index b75f402d82..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-glcolorconvert-don-t-use-the-predefined-variable-nam.patch
+++ /dev/null
@@ -1,32 +0,0 @@
1From b069672ace2b762f400ca6d318571cbedf5141f2 Mon Sep 17 00:00:00 2001
2From: Matthew Waters <matthew@centricular.com>
3Date: Thu, 31 Mar 2016 20:00:37 +1100
4Subject: [PATCH 1/3] glcolorconvert: don't use the predefined variable name
5 sample
6
7Using 'sample' as a variable name is an error in GLES3
8
9Upstream-Status: Backport [1.9.1]
10---
11 gst-libs/gst/gl/gstglcolorconvert.c | 4 ++--
12 1 file changed, 2 insertions(+), 2 deletions(-)
13
14diff --git a/gst-libs/gst/gl/gstglcolorconvert.c b/gst-libs/gst/gl/gstglcolorconvert.c
15index f478faa..c23624f 100644
16--- a/gst-libs/gst/gl/gstglcolorconvert.c
17+++ b/gst-libs/gst/gl/gstglcolorconvert.c
18@@ -261,9 +261,9 @@ static const struct shader_templ templ_RGB_to_PLANAR_YUV =
19 " for (int j = 0; j < int(chroma_sampling.y); j++) {\n"
20 " int n = (i+1)*(j+1);\n"
21 " delta.y = float(j);\n"
22- " vec4 sample = texture2D(tex, (chroma_pos + delta) / unnormalization).%c%c%c%c;\n"
23+ " vec4 s = texture2D(tex, (chroma_pos + delta) / unnormalization).%c%c%c%c;\n"
24 /* rolling average */
25- " uv_texel = (float(n-1) * uv_texel + sample) / float(n);\n"
26+ " uv_texel = (float(n-1) * uv_texel + s) / float(n);\n"
27 " }\n"
28 " }\n"
29 "}\n"
30--
311.9.1
32
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-glshader-add-glBindFragDataLocation.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-glshader-add-glBindFragDataLocation.patch
deleted file mode 100755
index 57e9d1a46e..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-glshader-add-glBindFragDataLocation.patch
+++ /dev/null
@@ -1,77 +0,0 @@
1From 38221080181229d520522a20bcb1663ca19f7aff Mon Sep 17 00:00:00 2001
2From: Matthew Waters <matthew@centricular.com>
3Date: Thu, 31 Mar 2016 19:25:32 +1100
4Subject: [PATCH 2/3] glshader: add glBindFragDataLocation
5
6There are some cases where it's needed for binding in/out variables in shaders.
7e.g. glsl 150 (gl 3.2) doesn't support the 'layout (location = ?)' specifiers in
8the shader source so we have to bind them ourselves.
9
10Upstream-Status: Backport [1.9.1]
11---
12 gst-libs/gst/gl/glprototypes/shaders.h | 10 ++++++++++
13 gst-libs/gst/gl/gstglshader.c | 20 ++++++++++++++++++++
14 gst-libs/gst/gl/gstglshader.h | 1 +
15 3 files changed, 31 insertions(+)
16
17diff --git a/gst-libs/gst/gl/glprototypes/shaders.h b/gst-libs/gst/gl/glprototypes/shaders.h
18index 817e479..6d828db 100644
19--- a/gst-libs/gst/gl/glprototypes/shaders.h
20+++ b/gst-libs/gst/gl/glprototypes/shaders.h
21@@ -362,3 +362,13 @@ GST_GL_EXT_FUNCTION (void, UniformMatrix3x4fv,
22 GST_GL_EXT_FUNCTION (void, UniformMatrix4x3fv,
23 (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value))
24 GST_GL_EXT_END ()
25+
26+GST_GL_EXT_BEGIN (bind_frag_data,
27+ GST_GL_API_OPENGL | GST_GL_API_OPENGL3,
28+ 3, 0,
29+ 255, 255,
30+ "\0",
31+ "\0")
32+GST_GL_EXT_FUNCTION (void, BindFragDataLocation,
33+ (GLuint program, GLuint index, const GLchar * name))
34+GST_GL_EXT_END ()
35diff --git a/gst-libs/gst/gl/gstglshader.c b/gst-libs/gst/gl/gstglshader.c
36index 9d96784..9f09236 100644
37--- a/gst-libs/gst/gl/gstglshader.c
38+++ b/gst-libs/gst/gl/gstglshader.c
39@@ -1306,3 +1306,23 @@ gst_gl_shader_bind_attribute_location (GstGLShader * shader, GLuint index,
40
41 gl->BindAttribLocation (priv->program_handle, index, name);
42 }
43+
44+void
45+gst_gl_shader_bind_frag_data_location (GstGLShader * shader,
46+ guint index, const gchar * name)
47+{
48+ GstGLShaderPrivate *priv;
49+ GstGLFuncs *gl;
50+
51+ g_return_if_fail (shader != NULL);
52+ if (!_ensure_program (shader))
53+ g_return_if_fail (shader->priv->program_handle);
54+ priv = shader->priv;
55+ gl = shader->context->gl_vtable;
56+ g_return_if_fail (gl->BindFragDataLocation);
57+
58+ GST_TRACE_OBJECT (shader, "binding program %i frag data \'%s\' location %i",
59+ (int) priv->program_handle, name, index);
60+
61+ gl->BindFragDataLocation (priv->program_handle, index, name);
62+}
63diff --git a/gst-libs/gst/gl/gstglshader.h b/gst-libs/gst/gl/gstglshader.h
64index 21410e2..2200b89 100644
65--- a/gst-libs/gst/gl/gstglshader.h
66+++ b/gst-libs/gst/gl/gstglshader.h
67@@ -104,6 +104,7 @@ void gst_gl_shader_set_uniform_matrix_4x3fv (GstGLShader *shader, const gchar *n
68
69 gint gst_gl_shader_get_attribute_location (GstGLShader *shader, const gchar *name);
70 void gst_gl_shader_bind_attribute_location (GstGLShader * shader, guint index, const gchar * name);
71+void gst_gl_shader_bind_frag_data_location (GstGLShader * shader, guint index, const gchar * name);
72
73 G_END_DECLS
74
75--
761.9.1
77
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-glcolorconvert-GLES3-deprecates-texture2D-and-it-doe.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-glcolorconvert-GLES3-deprecates-texture2D-and-it-doe.patch
deleted file mode 100755
index 79ef4c81ab..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-glcolorconvert-GLES3-deprecates-texture2D-and-it-doe.patch
+++ /dev/null
@@ -1,51 +0,0 @@
1From 764fd69f8482eca9f925cefe72ebae090ae59d43 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
3Date: Tue, 19 Apr 2016 19:27:33 +0300
4Subject: [PATCH 3/3] glcolorconvert: GLES3 deprecates texture2D() and it does
5 not work at all in newer versions than 3.3
6
7Use the newer texture() function instead. This fixes glimagesink and other
8things on various Android devices.
9
10Upstream-Status: Backport [1.9.1]
11
12https://bugzilla.gnome.org/show_bug.cgi?id=765266
13---
14 gst-libs/gst/gl/gstglcolorconvert.c | 7 ++++---
15 1 file changed, 4 insertions(+), 3 deletions(-)
16
17diff --git a/gst-libs/gst/gl/gstglcolorconvert.c b/gst-libs/gst/gl/gstglcolorconvert.c
18index c23624f..f472d5d 100644
19--- a/gst-libs/gst/gl/gstglcolorconvert.c
20+++ b/gst-libs/gst/gl/gstglcolorconvert.c
21@@ -1716,7 +1716,7 @@ _unbind_buffer (GstGLColorConvert * convert)
22
23 static gchar *
24 _mangle_texture_access (const gchar * str, GstGLTextureTarget from,
25- GstGLTextureTarget to, GstGLAPI gl_api)
26+ GstGLTextureTarget to, GstGLAPI gl_api, guint gl_major, guint gl_minor)
27 {
28 const gchar *from_str = NULL, *to_str = NULL;
29 gchar *ret, *tmp;
30@@ -1730,7 +1730,8 @@ _mangle_texture_access (const gchar * str, GstGLTextureTarget from,
31 if (from == GST_GL_TEXTURE_TARGET_EXTERNAL_OES)
32 from_str = "texture2D";
33
34- if (gl_api & GST_GL_API_OPENGL3) {
35+ if ((gl_api & GST_GL_API_OPENGL3) || (gl_api & GST_GL_API_GLES2
36+ && gl_major >= 3)) {
37 to_str = "texture";
38 } else {
39 if (to == GST_GL_TEXTURE_TARGET_2D)
40@@ -1898,7 +1899,7 @@ _mangle_shader (const gchar * str, guint shader_type, GstGLTextureTarget from,
41
42 _mangle_version_profile_from_gl_api (gl_api, gl_major, gl_minor, version,
43 profile);
44- tmp = _mangle_texture_access (str, from, to, gl_api);
45+ tmp = _mangle_texture_access (str, from, to, gl_api, gl_major, gl_minor);
46 tmp2 = _mangle_sampler_type (tmp, from, to);
47 g_free (tmp);
48 tmp =
49--
501.9.1
51
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-gl-implement-GstGLMemoryEGL.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-gl-implement-GstGLMemoryEGL.patch
deleted file mode 100644
index a67381cfef..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-gl-implement-GstGLMemoryEGL.patch
+++ /dev/null
@@ -1,495 +0,0 @@
1From 806bbe75b0b6947f589bce3960c28fee51b5c6c2 Mon Sep 17 00:00:00 2001
2From: Gwang Yoon Hwang <yoon@igalia.com>
3Date: Thu, 21 Jan 2016 22:18:17 +0900
4Subject: [PATCH] gl: implement GstGLMemoryEGL
5
6Because current GstEGLImageMemory does not inherit GstGLMemory, GLUpload
7allocates additional GLMemory and upload the decoded contents from the decoder
8which uses EGLImage (e.g. gst-omx in RPi).
9
10This work adds GstGLMemoryEGL to avoid this overhead. Decoders allocate
11GstGLMemoryEGL and decode its contents to the EGLImage of GstGLMemoryEGL. And
12GLUpload uses this memory without allocation of additional textures and blit
13operations.
14
15https://bugzilla.gnome.org/show_bug.cgi?id=760916
16---
17Upstream-Status: Backport
18Signed-off-by: Khem Raj <raj.khem@gmail.com>
19
20 gst-libs/gst/gl/egl/Makefile.am | 2 +
21 gst-libs/gst/gl/egl/gstgldisplay_egl.c | 2 +
22 gst-libs/gst/gl/egl/gstglmemoryegl.c | 241 +++++++++++++++++++++++++++++++++
23 gst-libs/gst/gl/egl/gstglmemoryegl.h | 108 +++++++++++++++
24 gst-libs/gst/gl/gstgl_fwd.h | 4 +
25 gst-libs/gst/gl/gstgldisplay.c | 2 +
26 gst-libs/gst/gl/gstglupload.c | 8 ++
27 7 files changed, 367 insertions(+)
28 create mode 100644 gst-libs/gst/gl/egl/gstglmemoryegl.c
29 create mode 100644 gst-libs/gst/gl/egl/gstglmemoryegl.h
30
31diff --git a/gst-libs/gst/gl/egl/Makefile.am b/gst-libs/gst/gl/egl/Makefile.am
32index b808178..878f16c 100644
33--- a/gst-libs/gst/gl/egl/Makefile.am
34+++ b/gst-libs/gst/gl/egl/Makefile.am
35@@ -5,6 +5,7 @@ noinst_LTLIBRARIES = libgstgl-egl.la
36 libgstgl_egl_la_SOURCES = \
37 gstgldisplay_egl.c \
38 gstglcontext_egl.c \
39+ gstglmemoryegl.c \
40 gsteglimagememory.c
41
42 noinst_HEADERS =
43@@ -13,6 +14,7 @@ libgstgl_eglincludedir = $(includedir)/gstreamer-@GST_API_VERSION@/gst/gl/egl
44 libgstgl_eglinclude_HEADERS = \
45 gstgldisplay_egl.h \
46 gstglcontext_egl.h \
47+ gstglmemoryegl.h \
48 gsteglimagememory.h \
49 gstegl.h
50
51diff --git a/gst-libs/gst/gl/egl/gstgldisplay_egl.c b/gst-libs/gst/gl/egl/gstgldisplay_egl.c
52index 9acf4f0..20816c2 100644
53--- a/gst-libs/gst/gl/egl/gstgldisplay_egl.c
54+++ b/gst-libs/gst/gl/egl/gstgldisplay_egl.c
55@@ -24,6 +24,7 @@
56
57 #include <gst/gl/egl/gstgldisplay_egl.h>
58 #include <gst/gl/egl/gsteglimagememory.h>
59+#include <gst/gl/egl/gstglmemoryegl.h>
60
61 GST_DEBUG_CATEGORY_STATIC (gst_gl_display_debug);
62 #define GST_CAT_DEFAULT gst_gl_display_debug
63@@ -51,6 +52,7 @@ gst_gl_display_egl_init (GstGLDisplayEGL * display_egl)
64 display_egl->foreign_display = FALSE;
65
66 gst_egl_image_memory_init ();
67+ gst_gl_memory_egl_init_once ();
68 }
69
70 static void
71diff --git a/gst-libs/gst/gl/egl/gstglmemoryegl.c b/gst-libs/gst/gl/egl/gstglmemoryegl.c
72new file mode 100644
73index 0000000..03cf432
74--- /dev/null
75+++ b/gst-libs/gst/gl/egl/gstglmemoryegl.c
76@@ -0,0 +1,241 @@
77+/*
78+ * GStreamer
79+ * Copyright (C) 2012 Collabora Ltd.
80+ * @author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
81+ * Copyright (C) 2014 Julien Isorce <julien.isorce@gmail.com>
82+ * Copyright (C) 2015 Igalia
83+ * Author: Gwang Yoon Hwang <yoon@igalia.com>
84+ *
85+ * This library is free software; you can redistribute it and/or
86+ * modify it under the terms of the GNU Library General Public
87+ * License as published by the Free Software Foundation; either
88+ * version 2 of the License, or (at your option) any later version.
89+ *
90+ * This library is distributed in the hope that it will be useful,
91+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
92+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
93+ * Library General Public License for more details.
94+ *
95+ * You should have received a copy of the GNU Library General Public
96+ * License along with this library; if not, write to the
97+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
98+ * Boston, MA 02110-1301, USA.
99+ */
100+
101+#ifdef HAVE_CONFIG_H
102+#include "config.h"
103+#endif
104+
105+#include <string.h>
106+
107+#include <gst/gl/egl/gstglmemoryegl.h>
108+
109+static GstAllocator *_gl_memory_egl_allocator;
110+
111+GST_DEBUG_CATEGORY_STATIC (GST_CAT_GL_MEMORY);
112+#define GST_CAT_DEFAULT GST_CAT_GL_MEMORY
113+
114+#define parent_class gst_gl_memory_egl_allocator_parent_class
115+G_DEFINE_TYPE (GstGLMemoryEGLAllocator, gst_gl_memory_egl_allocator,
116+ GST_TYPE_GL_MEMORY_ALLOCATOR);
117+
118+gboolean
119+gst_is_gl_memory_egl (GstMemory * mem)
120+{
121+ return mem != NULL && mem->allocator != NULL
122+ && g_type_is_a (G_OBJECT_TYPE (mem->allocator),
123+ GST_TYPE_GL_MEMORY_EGL_ALLOCATOR);
124+}
125+
126+static GstGLMemoryEGL *
127+_gl_mem_get_parent (GstGLMemoryEGL * gl_mem)
128+{
129+ GstGLMemoryEGL *parent = (GstGLMemoryEGL *)gl_mem->mem.mem.mem.parent;
130+ return parent ? parent : gl_mem;
131+}
132+
133+EGLImageKHR
134+gst_gl_memory_egl_get_image (GstGLMemoryEGL * mem)
135+{
136+ g_return_val_if_fail (gst_is_gl_memory_egl (GST_MEMORY_CAST (mem)),
137+ EGL_NO_IMAGE_KHR);
138+ return _gl_mem_get_parent(mem)->image;
139+}
140+
141+EGLDisplay
142+gst_gl_memory_egl_get_display (GstGLMemoryEGL * mem)
143+{
144+ g_return_val_if_fail (gst_is_gl_memory_egl (GST_MEMORY_CAST (mem)), NULL);
145+ return GST_GL_CONTEXT_EGL(_gl_mem_get_parent(mem))->egl_display;
146+}
147+
148+GstVideoGLTextureOrientation
149+gst_gl_memory_egl_get_orientation (GstGLMemoryEGL * mem)
150+{
151+ g_return_val_if_fail (gst_is_gl_memory_egl (GST_MEMORY_CAST (mem)),
152+ GST_VIDEO_GL_TEXTURE_ORIENTATION_X_NORMAL_Y_NORMAL);
153+
154+ return _gl_mem_get_parent(mem)->orientation;
155+}
156+
157+void
158+gst_gl_memory_egl_set_orientation (GstGLMemoryEGL * mem,
159+ GstVideoGLTextureOrientation orientation)
160+{
161+ g_return_if_fail (gst_is_gl_memory_egl (GST_MEMORY_CAST (mem)));
162+
163+ _gl_mem_get_parent(mem)->orientation = orientation;
164+}
165+
166+static GstMemory *
167+_gl_mem_alloc (GstAllocator * allocator, gsize size,
168+ GstAllocationParams * params)
169+{
170+ g_warning ("Use gst_gl_base_memory_allocator_alloc() to allocate from this "
171+ "GstGLMemoryEGL allocator");
172+
173+ return NULL;
174+}
175+
176+static void
177+_gl_mem_destroy (GstGLMemoryEGL * mem)
178+{
179+ /* Shared memory should not destroy all the data */
180+ if (!mem->mem.mem.mem.parent) {
181+ GstGLContextEGL *context = GST_GL_CONTEXT_EGL(mem->mem.mem.context);
182+ context->eglDestroyImage (context->egl_display, mem->image);
183+ }
184+
185+ GST_GL_BASE_MEMORY_ALLOCATOR_CLASS (parent_class)->destroy ((GstGLBaseMemory
186+ *) mem);
187+}
188+
189+static void
190+_gl_mem_init (GstGLMemoryEGL * mem, GstAllocator * allocator,
191+ GstMemory * parent, GstGLContext * context, GstGLTextureTarget target,
192+ GstAllocationParams * params, GstVideoInfo * info,
193+ guint plane, GstVideoAlignment * valign, gpointer user_data,
194+ GDestroyNotify notify)
195+{
196+ gst_gl_memory_init ((GstGLMemory *) mem, allocator, parent,
197+ context, target, params, info, plane, valign, user_data, notify);
198+}
199+
200+static GstGLMemoryEGL *
201+_gl_mem_egl_alloc (GstGLBaseMemoryAllocator * allocator,
202+ GstGLVideoAllocationParams * params)
203+{
204+ guint alloc_flags = params->parent.alloc_flags;
205+ GstGLMemoryEGL *mem;
206+
207+ g_return_val_if_fail (alloc_flags & GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_VIDEO,
208+ NULL);
209+ g_return_val_if_fail ((alloc_flags &
210+ GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_WRAP_GPU_HANDLE) == 0, NULL);
211+ g_return_val_if_fail ((alloc_flags &
212+ GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_WRAP_SYSMEM) == 0, NULL);
213+
214+ mem = g_new0 (GstGLMemoryEGL, 1);
215+ mem->image = EGL_NO_IMAGE_KHR;
216+
217+ _gl_mem_init (mem, GST_ALLOCATOR_CAST (allocator), NULL,
218+ params->parent.context, params->target, params->parent.alloc_params,
219+ params->v_info, params->plane, params->valign, params->parent.user_data,
220+ params->parent.notify);
221+
222+ return mem;
223+}
224+
225+static gboolean
226+_gl_mem_create (GstGLMemoryEGL * gl_mem, GError ** error)
227+{
228+ GstGLContextEGL *context = GST_GL_CONTEXT_EGL (gl_mem->mem.mem.context);
229+ GstGLBaseMemoryAllocatorClass *alloc_class;
230+
231+ if (!gst_gl_context_check_feature (GST_GL_CONTEXT (context),
232+ "EGL_KHR_image_base")) {
233+ g_set_error (error, GST_GL_CONTEXT_ERROR, GST_GL_CONTEXT_ERROR_WRONG_API,
234+ "EGL_KHR_image_base is not supported");
235+ return FALSE;
236+ }
237+
238+ alloc_class = GST_GL_BASE_MEMORY_ALLOCATOR_CLASS (parent_class);
239+ if (!alloc_class->create ((GstGLBaseMemory *) gl_mem, error))
240+ return FALSE;
241+
242+ gl_mem->image = context->eglCreateImage (context->egl_display,
243+ context->egl_context, EGL_GL_TEXTURE_2D_KHR,
244+ (EGLClientBuffer) GSIZE_TO_POINTER (gl_mem->mem.tex_id), NULL);
245+
246+ GST_TRACE ("Generating EGLImage handle:%p from a texture:%u",
247+ gl_mem->image, gl_mem->mem.tex_id);
248+
249+ if (eglGetError () != EGL_SUCCESS) {
250+ g_set_error (error, GST_GL_CONTEXT_ERROR, GST_GL_CONTEXT_ERROR_FAILED,
251+ "Failed to create EGLImage");
252+ return FALSE;
253+ }
254+
255+ return TRUE;
256+}
257+
258+static GstMemory *
259+_gl_mem_copy (GstGLMemoryEGL * src, gssize offset, gssize size)
260+{
261+ GST_CAT_ERROR (GST_CAT_GL_MEMORY, "GstGLMemoryEGL does not support copy");
262+ return NULL;
263+}
264+
265+static void
266+gst_gl_memory_egl_allocator_class_init (GstGLMemoryEGLAllocatorClass * klass)
267+{
268+ GstGLBaseMemoryAllocatorClass *gl_base;
269+ GstGLMemoryAllocatorClass *gl_tex;
270+ GstAllocatorClass *allocator_class;
271+
272+ gl_tex = (GstGLMemoryAllocatorClass *) klass;
273+ gl_base = (GstGLBaseMemoryAllocatorClass *) klass;
274+ allocator_class = (GstAllocatorClass *) klass;
275+
276+ gl_base->alloc = (GstGLBaseMemoryAllocatorAllocFunction) _gl_mem_egl_alloc;
277+ gl_base->create = (GstGLBaseMemoryAllocatorCreateFunction) _gl_mem_create;
278+ gl_base->destroy = (GstGLBaseMemoryAllocatorDestroyFunction) _gl_mem_destroy;
279+ gl_tex->copy = (GstGLBaseMemoryAllocatorCopyFunction) _gl_mem_copy;
280+
281+ allocator_class->alloc = _gl_mem_alloc;
282+}
283+
284+static void
285+gst_gl_memory_egl_allocator_init (GstGLMemoryEGLAllocator * allocator)
286+{
287+ GstAllocator *alloc = GST_ALLOCATOR_CAST (allocator);
288+
289+ alloc->mem_type = GST_GL_MEMORY_EGL_ALLOCATOR_NAME;
290+
291+ GST_OBJECT_FLAG_SET (allocator, GST_ALLOCATOR_FLAG_CUSTOM_ALLOC);
292+}
293+
294+/**
295+ * gst_gl_memory_egl_init_once:
296+ *
297+ * Initializes the GL Memory allocator. It is safe to call this function
298+ * multiple times. This must be called before any other GstGLMemoryEGL operation.
299+ */
300+void
301+gst_gl_memory_egl_init_once (void)
302+{
303+ static volatile gsize _init = 0;
304+
305+ if (g_once_init_enter (&_init)) {
306+ gst_gl_memory_init_once ();
307+
308+ GST_DEBUG_CATEGORY_INIT (GST_CAT_GL_MEMORY, "glmemory", 0,
309+ "OpenGL Texture with EGLImage memory");
310+
311+ _gl_memory_egl_allocator = g_object_new (GST_TYPE_GL_MEMORY_EGL_ALLOCATOR, NULL);
312+
313+ gst_allocator_register (GST_GL_MEMORY_EGL_ALLOCATOR_NAME,
314+ gst_object_ref (_gl_memory_egl_allocator));
315+ g_once_init_leave (&_init, 1);
316+ }
317+}
318diff --git a/gst-libs/gst/gl/egl/gstglmemoryegl.h b/gst-libs/gst/gl/egl/gstglmemoryegl.h
319new file mode 100644
320index 0000000..7256d33
321--- /dev/null
322+++ b/gst-libs/gst/gl/egl/gstglmemoryegl.h
323@@ -0,0 +1,108 @@
324+/*
325+ * GStreamer
326+ * Copyright (C) 2012 Collabora Ltd.
327+ * @author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
328+ * Copyright (C) 2014 Julien Isorce <julien.isorce@gmail.com>
329+ *
330+ * This library is free software; you can redistribute it and/or
331+ * modify it under the terms of the GNU Library General Public
332+ * License as published by the Free Software Foundation; either
333+ * version 2 of the License, or (at your option) any later version.
334+ *
335+ * This library is distributed in the hope that it will be useful,
336+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
337+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
338+ * Library General Public License for more details.
339+ *
340+ * You should have received a copy of the GNU Library General Public
341+ * License along with this library; if not, write to the
342+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
343+ * Boston, MA 02110-1301, USA.
344+ */
345+
346+#ifndef _GST_GL_MEMORY_EGL_H_
347+#define _GST_GL_MEMORY_EGL_H_
348+
349+#include <gst/gst.h>
350+#include <gst/gstallocator.h>
351+#include <gst/gstmemory.h>
352+#include <gst/video/video.h>
353+
354+#include <gst/gl/gl.h>
355+#include "gstglcontext_egl.h"
356+
357+#include <gst/gl/gstglmemory.h>
358+
359+G_BEGIN_DECLS
360+
361+#define GST_TYPE_GL_MEMORY_EGL_ALLOCATOR (gst_gl_memory_egl_allocator_get_type())
362+GType gst_gl_memory_egl_allocator_get_type(void);
363+
364+#define GST_IS_GL_MEMORY_EGL_ALLOCATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_GL_MEMORY_EGL_ALLOCATOR))
365+#define GST_IS_GL_MEMORY_EGL_ALLOCATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_GL_MEMORY_EGL_ALLOCATOR))
366+#define GST_GL_MEMORY_EGL_ALLOCATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_GL_MEMORY_EGL_ALLOCATOR, GstGLMemoryEGLAllocatorClass))
367+#define GST_GL_MEMORY_EGL_ALLOCATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_GL_MEMORY_EGL_ALLOCATOR, GstGLMemoryEGLAllocator))
368+#define GST_GL_MEMORY_EGL_ALLOCATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_GL_MEMORY_EGL_ALLOCATOR, GstGLAllocatorClass))
369+#define GST_GL_MEMORY_EGL_ALLOCATOR_CAST(obj) ((GstGLMemoryEGLAllocator *)(obj))
370+
371+typedef void (*GstEGLImageDestroyNotify) (GstGLContextEGL * context,
372+ gpointer data);
373+
374+typedef struct _GstEGLImageMemory GstEGLImageMemory;
375+
376+
377+/**
378+ * GstGLMemoryEGL:
379+ *
380+ * Private instance
381+ */
382+struct _GstGLMemoryEGL
383+{
384+ GstGLMemory mem;
385+
386+ EGLImageKHR image;
387+ GstVideoGLTextureOrientation orientation;
388+};
389+
390+/**
391+ * GST_GL_MEMORY_EGL_ALLOCATOR:
392+ *
393+ * The name of the GL Memory EGL allocator
394+ */
395+#define GST_GL_MEMORY_EGL_ALLOCATOR_NAME "GLMemoryEGL"
396+
397+void gst_gl_memory_egl_init_once (void);
398+gboolean gst_is_gl_memory_egl (GstMemory * mem);
399+
400+EGLImageKHR gst_gl_memory_egl_get_image (GstGLMemoryEGL * mem);
401+EGLDisplay gst_gl_memory_egl_get_display (GstGLMemoryEGL * mem);
402+
403+GstVideoGLTextureOrientation gst_gl_memory_egl_get_orientation
404+ (GstGLMemoryEGL * mem);
405+
406+void gst_gl_memory_egl_set_orientation (GstGLMemoryEGL * mem,
407+ GstVideoGLTextureOrientation orientation);
408+
409+/**
410+ * GstGLAllocator
411+ *
412+ * Opaque #GstGLAllocator struct
413+ */
414+struct _GstGLMemoryEGLAllocator
415+{
416+ GstGLMemoryAllocator parent;
417+};
418+
419+/**
420+ * GstGLAllocatorClass:
421+ *
422+ * The #GstGLAllocatorClass only contains private data
423+ */
424+struct _GstGLMemoryEGLAllocatorClass
425+{
426+ GstGLMemoryAllocatorClass parent_class;
427+};
428+
429+G_END_DECLS
430+
431+#endif /* _GST_GL_MEMORY_EGL_H_ */
432diff --git a/gst-libs/gst/gl/gstgl_fwd.h b/gst-libs/gst/gl/gstgl_fwd.h
433index fb64ff6..73e17bd 100644
434--- a/gst-libs/gst/gl/gstgl_fwd.h
435+++ b/gst-libs/gst/gl/gstgl_fwd.h
436@@ -55,6 +55,10 @@ typedef struct _GstGLMemoryPBO GstGLMemoryPBO;
437 typedef struct _GstGLMemoryPBOAllocator GstGLMemoryPBOAllocator;
438 typedef struct _GstGLMemoryPBOAllocatorClass GstGLMemoryPBOAllocatorClass;
439
440+typedef struct _GstGLMemoryEGL GstGLMemoryEGL;
441+typedef struct _GstGLMemoryEGLAllocator GstGLMemoryEGLAllocator;
442+typedef struct _GstGLMemoryEGLAllocatorClass GstGLMemoryEGLAllocatorClass;
443+
444 typedef struct _GstGLSLStage GstGLSLStage;
445 typedef struct _GstGLSLStagePrivate GstGLSLStagePrivate;
446 typedef struct _GstGLSLStageClass GstGLSLStageClass;
447diff --git a/gst-libs/gst/gl/gstgldisplay.c b/gst-libs/gst/gl/gstgldisplay.c
448index 60dec6a..34770d0 100644
449--- a/gst-libs/gst/gl/gstgldisplay.c
450+++ b/gst-libs/gst/gl/gstgldisplay.c
451@@ -68,6 +68,7 @@
452 #if GST_GL_HAVE_PLATFORM_EGL
453 #include <gst/gl/egl/gstgldisplay_egl.h>
454 #include <gst/gl/egl/gsteglimagememory.h>
455+#include <gst/gl/egl/gstglmemoryegl.h>
456 #endif
457
458 GST_DEBUG_CATEGORY_STATIC (gst_context);
459@@ -144,6 +145,7 @@ gst_gl_display_init (GstGLDisplay * display)
460
461 #if GST_GL_HAVE_PLATFORM_EGL
462 gst_egl_image_memory_init ();
463+ gst_gl_memory_egl_init_once ();
464 #endif
465 }
466
467diff --git a/gst-libs/gst/gl/gstglupload.c b/gst-libs/gst/gl/gstglupload.c
468index 16ed5ea..73a9029 100644
469--- a/gst-libs/gst/gl/gstglupload.c
470+++ b/gst-libs/gst/gl/gstglupload.c
471@@ -29,6 +29,7 @@
472
473 #if GST_GL_HAVE_PLATFORM_EGL
474 #include "egl/gsteglimagememory.h"
475+#include "egl/gstglmemoryegl.h"
476 #endif
477
478 #if GST_GL_HAVE_DMABUF
479@@ -301,6 +302,13 @@ _gl_memory_upload_propose_allocation (gpointer impl, GstQuery * decide_query,
480 context));
481 gst_query_add_allocation_param (query, allocator, &params);
482 gst_object_unref (allocator);
483+
484+#if GST_GL_HAVE_PLATFORM_EGL
485+ allocator =
486+ GST_ALLOCATOR (gst_allocator_find (GST_GL_MEMORY_EGL_ALLOCATOR_NAME));
487+ gst_query_add_allocation_param (query, allocator, &params);
488+ gst_object_unref (allocator);
489+#endif
490 }
491
492 n_pools = gst_query_get_n_allocation_pools (query);
493--
4942.5.0
495
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch
index 369ff93ac1..59321f704b 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch
@@ -23,43 +23,43 @@ Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
23 sys/decklink/gstdecklinkvideosink.cpp | 2 +- 23 sys/decklink/gstdecklinkvideosink.cpp | 2 +-
24 3 files changed, 7 insertions(+), 7 deletions(-) 24 3 files changed, 7 insertions(+), 7 deletions(-)
25 25
26diff --git a/sys/decklink/gstdecklink.cpp b/sys/decklink/gstdecklink.cpp 26Index: gst-plugins-bad-1.10.1/sys/decklink/gstdecklink.cpp
27index 64637f1..bac956f 100644 27===================================================================
28--- a/sys/decklink/gstdecklink.cpp 28--- gst-plugins-bad-1.10.1.orig/sys/decklink/gstdecklink.cpp
29+++ b/sys/decklink/gstdecklink.cpp 29+++ gst-plugins-bad-1.10.1/sys/decklink/gstdecklink.cpp
30@@ -324,22 +324,22 @@ gst_decklink_mode_get_structure (GstDecklinkModeEnum e, BMDPixelFormat f) 30@@ -476,22 +476,22 @@ gst_decklink_mode_get_structure (GstDeck
31 "height", G_TYPE_INT, mode->height,
32 "pixel-aspect-ratio", GST_TYPE_FRACTION, mode->par_n, mode->par_d, 31 "pixel-aspect-ratio", GST_TYPE_FRACTION, mode->par_n, mode->par_d,
33 "interlace-mode", G_TYPE_STRING, mode->interlaced ? "interleaved" : "progressive", 32 "interlace-mode", G_TYPE_STRING,
33 mode->interlaced ? "interleaved" : "progressive",
34- "framerate", GST_TYPE_FRACTION, mode->fps_n, mode->fps_d, NULL); 34- "framerate", GST_TYPE_FRACTION, mode->fps_n, mode->fps_d, NULL);
35+ "framerate", GST_TYPE_FRACTION, mode->fps_n, mode->fps_d, (void *) NULL); 35+ "framerate", GST_TYPE_FRACTION, mode->fps_n, mode->fps_d, (void *)NULL);
36 36
37 switch (f) { 37 switch (f) {
38 case bmdFormat8BitYUV: /* '2vuy' */ 38 case bmdFormat8BitYUV: /* '2vuy' */
39 gst_structure_set (s, "format", G_TYPE_STRING, "UYVY", 39 gst_structure_set (s, "format", G_TYPE_STRING, "UYVY",
40 "colorimetry", G_TYPE_STRING, mode->colorimetry, 40 "colorimetry", G_TYPE_STRING, mode->colorimetry,
41- "chroma-site", G_TYPE_STRING, "mpeg2", NULL); 41- "chroma-site", G_TYPE_STRING, "mpeg2", NULL);
42+ "chroma-site", G_TYPE_STRING, "mpeg2", (void *) NULL); 42+ "chroma-site", G_TYPE_STRING, "mpeg2", (void *)NULL);
43 break; 43 break;
44 case bmdFormat10BitYUV: /* 'v210' */ 44 case bmdFormat10BitYUV: /* 'v210' */
45- gst_structure_set (s, "format", G_TYPE_STRING, "v210", NULL); 45- gst_structure_set (s, "format", G_TYPE_STRING, "v210", NULL);
46+ gst_structure_set (s, "format", G_TYPE_STRING, "v210", (void *) NULL); 46+ gst_structure_set (s, "format", G_TYPE_STRING, "v210", (void *)NULL);
47 break; 47 break;
48 case bmdFormat8BitARGB: /* 'ARGB' */ 48 case bmdFormat8BitARGB: /* 'ARGB' */
49- gst_structure_set (s, "format", G_TYPE_STRING, "ARGB", NULL); 49- gst_structure_set (s, "format", G_TYPE_STRING, "ARGB", NULL);
50+ gst_structure_set (s, "format", G_TYPE_STRING, "ARGB", (void *) NULL); 50+ gst_structure_set (s, "format", G_TYPE_STRING, "ARGB", (void *)NULL);
51 break; 51 break;
52 case bmdFormat8BitBGRA: /* 'BGRA' */ 52 case bmdFormat8BitBGRA: /* 'BGRA' */
53- gst_structure_set (s, "format", G_TYPE_STRING, "BGRA", NULL); 53- gst_structure_set (s, "format", G_TYPE_STRING, "BGRA", NULL);
54+ gst_structure_set (s, "format", G_TYPE_STRING, "BGRA", (void *) NULL); 54+ gst_structure_set (s, "format", G_TYPE_STRING, "BGRA", (void *)NULL);
55 break; 55 break;
56 case bmdFormat10BitRGB: /* 'r210' Big-endian RGB 10-bit per component with SMPTE video levels (64-960). Packed as 2:10:10:10 */ 56 case bmdFormat10BitRGB: /* 'r210' Big-endian RGB 10-bit per component with SMPTE video levels (64-960). Packed as 2:10:10:10 */
57 case bmdFormat12BitRGB: /* 'R12B' Big-endian RGB 12-bit per component with full range (0-4095). Packed as 12-bit per component */ 57 case bmdFormat12BitRGB: /* 'R12B' Big-endian RGB 12-bit per component with full range (0-4095). Packed as 12-bit per component */
58diff --git a/sys/decklink/gstdecklinkaudiosrc.cpp b/sys/decklink/gstdecklinkaudiosrc.cpp 58Index: gst-plugins-bad-1.10.1/sys/decklink/gstdecklinkaudiosrc.cpp
59index 9a701ee..26fb7ec 100644 59===================================================================
60--- a/sys/decklink/gstdecklinkaudiosrc.cpp 60--- gst-plugins-bad-1.10.1.orig/sys/decklink/gstdecklinkaudiosrc.cpp
61+++ b/sys/decklink/gstdecklinkaudiosrc.cpp 61+++ gst-plugins-bad-1.10.1/sys/decklink/gstdecklinkaudiosrc.cpp
62@@ -312,7 +312,7 @@ gst_decklink_audio_src_set_caps (GstBaseSrc * bsrc, GstCaps * caps) 62@@ -322,7 +322,7 @@ gst_decklink_audio_src_set_caps (GstBase
63 g_mutex_unlock (&self->input->lock); 63 g_mutex_unlock (&self->input->lock);
64 64
65 if (videosrc) { 65 if (videosrc) {
@@ -68,11 +68,11 @@ index 9a701ee..26fb7ec 100644
68 gst_object_unref (videosrc); 68 gst_object_unref (videosrc);
69 69
70 switch (vconn) { 70 switch (vconn) {
71diff --git a/sys/decklink/gstdecklinkvideosink.cpp b/sys/decklink/gstdecklinkvideosink.cpp 71Index: gst-plugins-bad-1.10.1/sys/decklink/gstdecklinkvideosink.cpp
72index eebeff3..da6e486 100644 72===================================================================
73--- a/sys/decklink/gstdecklinkvideosink.cpp 73--- gst-plugins-bad-1.10.1.orig/sys/decklink/gstdecklinkvideosink.cpp
74+++ b/sys/decklink/gstdecklinkvideosink.cpp 74+++ gst-plugins-bad-1.10.1/sys/decklink/gstdecklinkvideosink.cpp
75@@ -158,7 +158,7 @@ reset_framerate (GstCapsFeatures * features, GstStructure * structure, 75@@ -163,7 +163,7 @@ reset_framerate (GstCapsFeatures * featu
76 gpointer user_data) 76 gpointer user_data)
77 { 77 {
78 gst_structure_set (structure, "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, 78 gst_structure_set (structure, "framerate", GST_TYPE_FRACTION_RANGE, 0, 1,
@@ -81,6 +81,3 @@ index eebeff3..da6e486 100644
81 81
82 return TRUE; 82 return TRUE;
83 } 83 }
84--
851.9.1
86
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.1.bb
index ae3f04d75b..9cd892edf5 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.3.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.1.bb
@@ -12,16 +12,10 @@ SRC_URI = " \
12 file://avoid-including-sys-poll.h-directly.patch \ 12 file://avoid-including-sys-poll.h-directly.patch \
13 file://ensure-valid-sentinels-for-gst_structure_get-etc.patch \ 13 file://ensure-valid-sentinels-for-gst_structure_get-etc.patch \
14 file://0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch \ 14 file://0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch \
15 file://0002-glplugin-enable-gldeinterlace-on-OpenGL-ES.patch \
16 file://0003-glcolorconvert-implement-multiple-render-targets-for.patch \
17 file://0004-glcolorconvert-don-t-use-the-predefined-variable-nam.patch \
18 file://0005-glshader-add-glBindFragDataLocation.patch \
19 file://0006-glcolorconvert-GLES3-deprecates-texture2D-and-it-doe.patch \
20 file://0008-gl-implement-GstGLMemoryEGL.patch \
21 file://0009-glimagesink-Downrank-to-marginal.patch \ 15 file://0009-glimagesink-Downrank-to-marginal.patch \
22 file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \ 16 file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
23" 17"
24SRC_URI[md5sum] = "955281a43e98c5464563fa049e0a0911" 18SRC_URI[md5sum] = "491d2d5aab55ffc60c66e714d3d664ea"
25SRC_URI[sha256sum] = "7899fcb18e6a1af2888b19c90213af018a57d741c6e72ec56b133bc73ec8509b" 19SRC_URI[sha256sum] = "133e0ed9fe21011b15d3898e3d3a9d17ab74eed31996da2e353353e688ca921d"
26 20
27S = "${WORKDIR}/gst-plugins-bad-${PV}" 21S = "${WORKDIR}/gst-plugins-bad-${PV}"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.8.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.10.1.bb
index 84cbc04823..82e5a84817 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.8.3.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.10.1.bb
@@ -13,8 +13,7 @@ SRC_URI = " \
13 file://make-gio_unix_2_0-dependency-configurable.patch \ 13 file://make-gio_unix_2_0-dependency-configurable.patch \
14 file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \ 14 file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
15" 15"
16 16SRC_URI[md5sum] = "eb03953ff239b53a7d69a604edbe5c8c"
17SRC_URI[md5sum] = "4d03dd81828ea6b98a44c8f1ab7f4976" 17SRC_URI[sha256sum] = "66cfee294c7aaf9d7867eaba4841ca6254ea74f1a8b53e1289f4d3b9b6c976c9"
18SRC_URI[sha256sum] = "114871d4d63606b4af424a8433cd923e4ff66896b244bb7ac97b9da47f71e79e"
19 18
20S = "${WORKDIR}/gst-plugins-base-${PV}" 19S = "${WORKDIR}/gst-plugins-base-${PV}"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.8.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.10.1.bb
index 840df15146..44703dc7e6 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.8.3.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.10.1.bb
@@ -11,8 +11,7 @@ SRC_URI = " \
11 file://ensure-valid-sentinel-for-gst_structure_get.patch \ 11 file://ensure-valid-sentinel-for-gst_structure_get.patch \
12 file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \ 12 file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
13" 13"
14 14SRC_URI[md5sum] = "7d24b1412d49fa7bab763b35f4640abd"
15SRC_URI[md5sum] = "473ebb1f15c67de99ddb6e4d027c0876" 15SRC_URI[sha256sum] = "a7642ea7e7c17fb67e94d0c17e56757b6577fa7ed244ff8c11031841d3556cc2"
16SRC_URI[sha256sum] = "a1d6579ba203a7734927c24b90bf6590d846c5a5fcec01a48201018c8ad2827a"
17 16
18S = "${WORKDIR}/gst-plugins-good-${PV}" 17S = "${WORKDIR}/gst-plugins-good-${PV}"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.8.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.10.1.bb
index 4a9a437b9d..16264301a0 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.8.3.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.10.1.bb
@@ -7,8 +7,7 @@ SRC_URI = " \
7 http://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-${PV}.tar.xz \ 7 http://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-${PV}.tar.xz \
8 file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \ 8 file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
9" 9"
10 10SRC_URI[md5sum] = "646ab511bc8e56425e63d3fc4812e582"
11SRC_URI[md5sum] = "4fc66c77253b0ad5ce224bda654b2e7d" 11SRC_URI[sha256sum] = "a5ecd59fc2091eeb52368de81cc6a91c1a1c19dc5bdde85ce90e1eed5d4183c2"
12SRC_URI[sha256sum] = "6fa2599fdd072d31fbaf50c34af406e2be944a010b1f4eab67a5fe32a0310693"
13 12
14S = "${WORKDIR}/gst-plugins-ugly-${PV}" 13S = "${WORKDIR}/gst-plugins-ugly-${PV}"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.10.1.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.10.1.bb
new file mode 100644
index 0000000000..7b6e4cb508
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.10.1.bb
@@ -0,0 +1,6 @@
1include gstreamer1.0-rtsp-server.inc
2
3LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d"
4
5SRC_URI[md5sum] = "ae93aa9e5d89a53636a8c0217d8d8c30"
6SRC_URI[sha256sum] = "ddc0c2699598623c2d19d3a2856fb73365496a949783537b238f44bc51e5b005"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.8.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.8.3.bb
deleted file mode 100644
index 17059d0703..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.8.3.bb
+++ /dev/null
@@ -1,6 +0,0 @@
1include gstreamer1.0-rtsp-server.inc
2
3LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d"
4
5SRC_URI[md5sum] = "e4b07b10dd65b6c26c9ca5f72e59297b"
6SRC_URI[sha256sum] = "010f06800c1c957851d1352e5ec7a8ba3ce6a857fec1b8afc7d1a9e5f53288bf"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
index cb0bd82f23..86c6f66a2f 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
@@ -24,7 +24,6 @@ PACKAGECONFIG[debug] = "--enable-debug,--disable-debug"
24PACKAGECONFIG[tests] = "--enable-tests,--disable-tests" 24PACKAGECONFIG[tests] = "--enable-tests,--disable-tests"
25PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind," 25PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind,"
26PACKAGECONFIG[gst-tracer-hooks] = "--enable-gst-tracer-hooks,--disable-gst-tracer-hooks," 26PACKAGECONFIG[gst-tracer-hooks] = "--enable-gst-tracer-hooks,--disable-gst-tracer-hooks,"
27PACKAGECONFIG[trace-historic] = "--enable-trace,--disable-trace,"
28 27
29EXTRA_OECONF = " \ 28EXTRA_OECONF = " \
30 --disable-dependency-tracking \ 29 --disable-dependency-tracking \
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.8.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.10.1.bb
index d3561ebbde..428a01203b 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.8.3.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.10.1.bb
@@ -6,8 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \
6SRC_URI = " \ 6SRC_URI = " \
7 http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz \ 7 http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz \
8" 8"
9 9SRC_URI[md5sum] = "2c0cc6907aed5ea8005a8f332e34d92f"
10SRC_URI[md5sum] = "e88dad542df9d986822e982105d2b530" 10SRC_URI[sha256sum] = "f68df996e0e699382b935bb4783dd402c301377df18f57e28e0318c4b3bff6da"
11SRC_URI[sha256sum] = "66b37762d4fdcd63bce5a2bec57e055f92420e95037361609900278c0db7c53f"
12 11
13S = "${WORKDIR}/gstreamer-${PV}" 12S = "${WORKDIR}/gstreamer-${PV}"