summaryrefslogtreecommitdiffstats
path: root/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2018-02-01 10:27:11 -0500
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-03-12 22:51:39 -0400
commit6e60e8b2b2bab889379b380a28a167a0edd9d1d3 (patch)
treef12f54d5ba8e74e67e5fad3651a1e125bb8f4191 /import-layers/yocto-poky/meta/recipes-multimedia/gstreamer
parent509842add85b53e13164c1569a1fd43d5b8d91c5 (diff)
downloadtalos-openbmc-6e60e8b2b2bab889379b380a28a167a0edd9d1d3.tar.gz
talos-openbmc-6e60e8b2b2bab889379b380a28a167a0edd9d1d3.zip
Yocto 2.3
Move OpenBMC to Yocto 2.3(pyro). Tested: Built and verified Witherspoon and Palmetto images Change-Id: I50744030e771f4850afc2a93a10d3507e76d36bc Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Resolves: openbmc/openbmc#2461
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-multimedia/gstreamer')
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/0001-gtk-play-Disable-visualizations.patch59
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/0001-gtk-play-provide-similar-behaviour-for-quit-and-clos.patch32
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player_git.bb6
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc10
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer-vaapi/vaapivideobufferpool-create-allocator-if-needed.patch61
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav.inc4
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/mips64_cpu_detection.patch32
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.10.4.bb (renamed from import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.8.3.bb)8
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb38
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx.inc4
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx/0001-omx-fixed-type-error-in-printf-call.patch30
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.10.4.bb (renamed from import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.2.0.bb)4
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb25
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc20
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch35
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-Prepend-PKG_CONFIG_SYSROOT_DIR-to-pkg-config-output.patch34
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch15
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-mssdemux-improved-live-playback-support.patch929
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-smoothstreaming-implement-adaptivedemux-s-get_live_s.patch183
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-smoothstreaming-use-the-duration-from-the-list-of-fr.patch62
-rwxr-xr-ximport-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-enable-gldeinterlace-on-OpenGL-ES.patch634
-rwxr-xr-ximport-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-glcolorconvert-implement-multiple-render-targets-for.patch244
-rwxr-xr-ximport-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-glcolorconvert-don-t-use-the-predefined-variable-nam.patch32
-rwxr-xr-ximport-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-glshader-add-glBindFragDataLocation.patch77
-rwxr-xr-ximport-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-glcolorconvert-GLES3-deprecates-texture2D-and-it-doe.patch51
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-gl-implement-GstGLMemoryEGL.patch495
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch63
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb (renamed from import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.3.bb)20
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb45
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base.inc5
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.10.4.bb (renamed from import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.8.3.bb)8
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb31
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good.inc3
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-v4l2object-Also-add-videometa-if-there-is-padding-to.patch35
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.10.4.bb (renamed from import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.8.3.bb)9
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb29
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.10.4.bb (renamed from import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.8.3.bb)8
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb37
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc2
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server.inc2
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.10.4.bb6
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.8.3.bb6
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi.inc37
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.10.4.bb7
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc2
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/deterministic-unwind.patch24
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.10.4.bb (renamed from import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.8.3.bb)8
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb25
48 files changed, 1586 insertions, 1950 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/0001-gtk-play-Disable-visualizations.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/0001-gtk-play-Disable-visualizations.patch
new file mode 100644
index 000000000..ea8812007
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/0001-gtk-play-Disable-visualizations.patch
@@ -0,0 +1,59 @@
+From 6cf42c468e93b0aaa171961e059bc3e2fb915889 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Fri, 28 Apr 2017 14:35:19 +0300
+Subject: [PATCH] gtk-play: Disable visualizations
+
+This is a workaround for [YOCTO #11410] (audio playback is broken in
+mediaplayer if vaapi is used). It disables visualizations and makes
+sure we clear the window (otherwise nothing does that and result is
+very ugly).
+
+This patch should be removed when 11410 is fixed.
+
+Upstream-Status: Inappropriate [bug workaround]
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ gtk/gtk-play.c | 13 ++++++++++++-
+ 1 file changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/gtk/gtk-play.c b/gtk/gtk-play.c
+index 8ae0fea..63b9bb0 100644
+--- a/gtk/gtk-play.c
++++ b/gtk/gtk-play.c
+@@ -1401,6 +1401,15 @@ get_child_position (GtkOverlay * overlay, GtkWidget * widget,
+ return TRUE;
+ }
+
++/* Hack to make sure something gets drawn if visualizations are disabled */
++static gboolean
++draw_cb (GtkWidget *widget, cairo_t *cr, gpointer data)
++{
++ cairo_set_source_rgb (cr, 0, 0, 0);
++ cairo_paint (cr);
++ return FALSE;
++}
++
+ static void
+ create_ui (GtkPlay * play)
+ {
+@@ -1431,6 +1440,8 @@ create_ui (GtkPlay * play)
+ play->video_area = gtk_drawing_area_new ();
+ g_signal_connect (play->video_area, "realize",
+ G_CALLBACK (video_area_realize_cb), play);
++ g_signal_connect (play->video_area, "draw",
++ G_CALLBACK (draw_cb), NULL);
+ }
+ gtk_widget_set_events (play->video_area, GDK_EXPOSURE_MASK
+ | GDK_LEAVE_NOTIFY_MASK
+@@ -1753,7 +1764,7 @@ gtk_play_constructor (GType type, guint n_construct_params,
+
+ /* enable visualization (by default playbin uses goom) */
+ /* if visualization is enabled then use the first element */
+- gst_player_set_visualization_enabled (self->player, TRUE);
++ gst_player_set_visualization_enabled (self->player, FALSE);
+
+ g_signal_connect (G_OBJECT (self), "show", G_CALLBACK (show_cb), NULL);
+
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/0001-gtk-play-provide-similar-behaviour-for-quit-and-clos.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/0001-gtk-play-provide-similar-behaviour-for-quit-and-clos.patch
deleted file mode 100644
index e3f1c4f74..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/0001-gtk-play-provide-similar-behaviour-for-quit-and-clos.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 220c2659a45dd354270a465c45197970dae5f548 Mon Sep 17 00:00:00 2001
-From: "Maxin B. John" <maxin.john@intel.com>
-Date: Fri, 5 Aug 2016 17:52:18 +0300
-Subject: [PATCH] gtk-play: provide similar behaviour for quit and close
-
-In x86 targets, gtk-play just pause rather than quitting the application
-when we click the close button (delete-event). Change the callback function
-to get similar behaviour when we click on "Quit" menu option.
-
-Upstream-Status: Accepted
-
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- gtk/gtk-play.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gtk/gtk-play.c b/gtk/gtk-play.c
-index a520bef..16afc6b 100644
---- a/gtk/gtk-play.c
-+++ b/gtk/gtk-play.c
-@@ -177,7 +177,7 @@ load_from_builder (const gchar * filename, gboolean register_sig_handler,
- static void
- delete_event_cb (GtkWidget * widget, GdkEvent * event, GtkPlay * play)
- {
-- gst_player_stop (play->player);
-+ gtk_widget_destroy (GTK_WIDGET (play));
- }
-
- static void
---
-2.4.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player_git.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player_git.bb
index 2a4c9dcfb..cb12a464a 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player_git.bb
@@ -2,16 +2,16 @@ SUMMARY = "GStreamer playback helper library and examples"
LICENSE = "LGPL-2.0+"
LIC_FILES_CHKSUM = "file://gtk/gtk-play.c;beginline=1;endline=20;md5=f8c72dae3d36823ec716a9ebcae593b9"
-DEPENDS = "glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad gtk+3"
+DEPENDS = "glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad gtk+3 glib-2.0-native"
SRC_URI = "git://github.com/sdroege/gst-player.git \
file://filechooser.patch;apply=0 \
file://Fix-pause-play.patch;apply=0 \
file://Add-error-signal-emission-for-missing-plugins.patch;apply=0 \
- file://0001-gtk-play-provide-similar-behaviour-for-quit-and-clos.patch \
+ file://0001-gtk-play-Disable-visualizations.patch \
file://gst-player.desktop"
-SRCREV = "ea90e63c1064503f9ba5d59aa4ca604f13ca5def"
+SRCREV = "ee3c226c82767a089743e4e06058743e67f73cdb"
PV = "0.0.1+git${SRCPV}"
S = "${WORKDIR}/git"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc
index c24493e1e..3fdb10e40 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc
@@ -3,8 +3,8 @@ PACKAGESPLITFUNCS_append = " set_metapkg_rdepends "
python split_gstreamer10_packages () {
gst_libdir = d.expand('${libdir}/gstreamer-${LIBV}')
- postinst = d.getVar('plugin_postinst', True)
- glibdir = d.getVar('libdir', True)
+ postinst = d.getVar('plugin_postinst')
+ glibdir = d.getVar('libdir')
do_split_packages(d, glibdir, '^lib(.*)\.so\.*', 'lib%s', 'gstreamer %s library', extra_depends='', allow_links=True)
do_split_packages(d, gst_libdir, 'libgst(.*)\.so$', d.expand('${PN}-%s'), 'GStreamer plugin for %s', postinst=postinst, extra_depends='')
@@ -16,14 +16,14 @@ python split_gstreamer10_packages () {
python set_metapkg_rdepends () {
import os
- pn = d.getVar('PN', True)
+ pn = d.getVar('PN')
metapkg = pn + '-meta'
d.setVar('ALLOW_EMPTY_' + metapkg, "1")
d.setVar('FILES_' + metapkg, "")
blacklist = [ pn, pn + '-locale', pn + '-dev', pn + '-dbg', pn + '-doc', pn + '-meta' ]
metapkg_rdepends = []
- packages = d.getVar('PACKAGES', True).split()
- pkgdest = d.getVar('PKGDEST', True)
+ packages = d.getVar('PACKAGES').split()
+ pkgdest = d.getVar('PKGDEST')
for pkg in packages[1:]:
if not pkg in blacklist and not pkg in metapkg_rdepends and not pkg.endswith('-dev') and not pkg.endswith('-dbg') and not pkg.count('locale') and not pkg.count('-staticdev'):
# See if the package is empty by looking at the contents of its PKGDEST subdirectory.
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer-vaapi/vaapivideobufferpool-create-allocator-if-needed.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer-vaapi/vaapivideobufferpool-create-allocator-if-needed.patch
new file mode 100644
index 000000000..f666adc81
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer-vaapi/vaapivideobufferpool-create-allocator-if-needed.patch
@@ -0,0 +1,61 @@
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Upstream-Status: Backport [commit 59a731be6b in '1.10' branch]
+
+
+From 02a6002c3a80b3a5301c0943b1a1518bbdf439fc Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?=
+ <vjaquez@igalia.com>
+Date: Fri, 21 Apr 2017 19:07:18 +0200
+Subject: [PATCH] vaapivideobufferpool: create allocator if needed
+
+Backport to branch 1.10
+
+Sometimes a video decoder could set different buffer pool
+configurations, because their frame size changes. In this case we
+did not reconfigure the allocator.
+
+This patch enables this use case, creating a new allocator inside
+the VAAPI buffer pool if the caps changed, if it is not dmabuf-based.
+If so, it is just reconfigured, since it doesn't have a surface pool.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=781577
+---
+ gst/vaapi/gstvaapivideobufferpool.c | 21 +++++++++++++++++++++
+ 1 file changed, 21 insertions(+)
+
+diff --git a/gst/vaapi/gstvaapivideobufferpool.c b/gst/vaapi/gstvaapivideobufferpool.c
+index a3b9223f..9a50614b 100644
+--- a/gst/vaapi/gstvaapivideobufferpool.c
++++ b/gst/vaapi/gstvaapivideobufferpool.c
+@@ -159,6 +159,27 @@ gst_vaapi_video_buffer_pool_set_config (GstBufferPool * pool,
+ gst_object_replace ((GstObject **) & priv->allocator, NULL);
+ priv->video_info = new_vip;
+
++ {
++ guint surface_alloc_flags;
++ gboolean vinfo_changed = FALSE;
++
++ if (allocator) {
++ const GstVideoInfo *alloc_vinfo =
++ gst_allocator_get_vaapi_video_info (allocator, &surface_alloc_flags);
++ vinfo_changed = gst_video_info_changed (alloc_vinfo, &new_vip);
++ }
++
++ if (vinfo_changed && allocator && priv->use_dmabuf_memory) {
++ gst_allocator_set_vaapi_video_info (allocator, &new_vip,
++ surface_alloc_flags);
++ } else if (!priv->use_dmabuf_memory && (vinfo_changed || !allocator)) {
++ /* let's destroy the other allocator and create a new one */
++ allocator = gst_vaapi_video_allocator_new (priv->display, &new_vip,
++ surface_alloc_flags);
++ gst_buffer_pool_config_set_allocator (config, allocator, NULL);
++ }
++ }
++
+ if (!gst_buffer_pool_config_has_option (config,
+ GST_BUFFER_POOL_OPTION_VAAPI_VIDEO_META))
+ goto error_no_vaapi_video_meta_option;
+--
+2.11.0
+
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav.inc b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav.inc
index ea011637c..c2283061c 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav.inc
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav.inc
@@ -30,6 +30,10 @@ LIBAV_EXTRA_CONFIGURE_COMMON_ARG = "--target-os=linux \
${GSTREAMER_1_0_DEBUG} \
--cross-prefix='${HOST_PREFIX}'"
+# Disable assembly optimizations for X32, as this libav lacks the support
+PACKAGECONFIG_remove_linux-gnux32 = "yasm"
+LIBAV_EXTRA_CONFIGURE_COMMON_ARG_append_linux-gnux32 = " --disable-asm"
+
LIBAV_EXTRA_CONFIGURE_COMMON = \
'${LIBAV_EXTRA_CONFIGURE}="${LIBAV_EXTRA_CONFIGURE_COMMON_ARG}"'
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/mips64_cpu_detection.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/mips64_cpu_detection.patch
new file mode 100644
index 000000000..7a0b44888
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/mips64_cpu_detection.patch
@@ -0,0 +1,32 @@
+It will add -mips64r6 and -mips64r2 to cmdline which will
+cause conflicts
+
+in OE we user mips32r2 and mips64r2 for mips arch versions
+so there is no benefit of detecting it automatically by
+poking at tools especially in cross env
+
+Fixes errors like
+
+linking -mnan=2008 module with previous -mnan=legacy modules
+failed to merge target specific data of file
+
+-Khem
+Upstream-Status: Inappropriate [OE-Specific]
+
+Index: gst-libav-1.10.1/gst-libs/ext/libav/configure
+===================================================================
+--- gst-libav-1.10.1.orig/gst-libs/ext/libav/configure
++++ gst-libav-1.10.1/gst-libs/ext/libav/configure
+@@ -5269,12 +5269,9 @@ elif enabled mips; then
+
+ # Enable minimum ISA based on selected options
+ if enabled mips64; then
+- enabled mips64r6 && check_inline_asm_flags mips64r6 '"dlsa $0, $0, $0, 1"' '-mips64r6'
+ enabled mips64r2 && check_inline_asm_flags mips64r2 '"dext $0, $0, 0, 1"' '-mips64r2'
+ disabled mips64r6 && disabled mips64r2 && check_inline_asm_flags mips64r1 '"daddi $0, $0, 0"' '-mips64'
+ else
+- enabled mips32r6 && check_inline_asm_flags mips32r6 '"aui $0, $0, 0"' '-mips32r6'
+- enabled mips32r5 && check_inline_asm_flags mips32r5 '"eretnc"' '-mips32r5'
+ enabled mips32r2 && check_inline_asm_flags mips32r2 '"ext $0, $0, 0, 1"' '-mips32r2'
+ disabled mips32r6 && disabled mips32r5 && disabled mips32r2 && check_inline_asm_flags mips32r1 '"addi $0, $0, 0"' '-mips32'
+ fi
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.8.3.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.10.4.bb
index 3d86221d2..59d81db03 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.8.3.bb
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.10.4.bb
@@ -1,4 +1,4 @@
-include gstreamer1.0-libav.inc
+require gstreamer1.0-libav.inc
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \
@@ -12,9 +12,9 @@ SRC_URI = " \
http://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${PV}.tar.xz \
file://0001-Disable-yasm-for-libav-when-disable-yasm.patch \
file://workaround-to-build-gst-libav-for-i586-with-gcc.patch \
+ file://mips64_cpu_detection.patch \
"
-
-SRC_URI[md5sum] = "b51a736147bacb40f85827a4e0ae0d2c"
-SRC_URI[sha256sum] = "9006a05990089f7155ee0e848042f6bb24e52ab1d0a59ff8d1b5d7e33001a495"
+SRC_URI[md5sum] = "e2bdd9fde6ca3ff7efffb93df121f4fd"
+SRC_URI[sha256sum] = "6ca0feca75e3d48315e07f20ec37cf6260ed1e9dde58df355febd5016246268b"
S = "${WORKDIR}/gst-libav-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb
deleted file mode 100644
index f4604a34c..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-DEFAULT_PREFERENCE = "-1"
-
-include gstreamer1.0-libav.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \
- file://ext/libav/gstav.h;beginline=1;endline=18;md5=a752c35267d8276fd9ca3db6994fca9c \
- file://gst-libs/ext/libav/LICENSE.md;md5=acda96fe91ccaabc9cd9d541806a0d37 \
- file://gst-libs/ext/libav/COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://gst-libs/ext/libav/COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
- file://gst-libs/ext/libav/COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \
- file://gst-libs/ext/libav/COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
-
-# To build using the system libav/ffmpeg, append "libav" to PACKAGECONFIG
-# and remove the ffmpeg sources from SRC_URI below. However, first note the
-# warnings in gstreamer1.0-libav.inc
-SRC_URI = " \
- git://anongit.freedesktop.org/gstreamer/gst-libav;branch=1.8;name=base \
- git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;name=common \
- git://source.ffmpeg.org/ffmpeg;destsuffix=git/gst-libs/ext/libav;name=ffmpeg;branch=release/3.0 \
- file://0001-Disable-yasm-for-libav-when-disable-yasm.patch \
- file://workaround-to-build-gst-libav-for-i586-with-gcc.patch \
-"
-
-PV = "1.8.2+git${SRCPV}"
-
-UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
-
-SRCREV_base = "f285cf0fd799cc3b46b5cecaaa439d5a2a38a9b7"
-SRCREV_common = "f363b3205658a38e84fa77f19dee218cd4445275"
-SRCREV_ffmpeg = "c66f4d1ae64dffaf456d05cbdade02054446f499"
-SRCREV_FORMAT = "base"
-
-S = "${WORKDIR}/git"
-
-do_configure_prepend() {
- ${S}/autogen.sh --noconfigure
-}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx.inc b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx.inc
index 07e5b7db5..05562b11a 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx.inc
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx.inc
@@ -18,7 +18,7 @@ GSTREAMER_1_0_OMX_CORE_NAME ?= "${libdir}/libomxil-bellagio.so.0"
EXTRA_OECONF += "--disable-valgrind --with-omx-target=${GSTREAMER_1_0_OMX_TARGET}"
python __anonymous () {
- omx_target = d.getVar("GSTREAMER_1_0_OMX_TARGET", True)
+ omx_target = d.getVar("GSTREAMER_1_0_OMX_TARGET")
if omx_target in ['generic', 'bellagio']:
# Bellagio headers are incomplete (they are missing the OMX_VERSION_MAJOR,#
# OMX_VERSION_MINOR, OMX_VERSION_REVISION, and OMX_VERSION_STEP macros);
@@ -26,7 +26,7 @@ python __anonymous () {
d.appendVar("CFLAGS", " -I${S}/omx/openmax")
elif omx_target == "rpi":
# Dedicated Raspberry Pi OpenMAX IL support makes this package machine specific
- d.setVar("PACKAGE_ARCH", d.getVar("MACHINE_ARCH", True))
+ d.setVar("PACKAGE_ARCH", d.getVar("MACHINE_ARCH"))
}
set_omx_core_name() {
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx/0001-omx-fixed-type-error-in-printf-call.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx/0001-omx-fixed-type-error-in-printf-call.patch
deleted file mode 100644
index a428ac9c9..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx/0001-omx-fixed-type-error-in-printf-call.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From f629e041e9f678fcd86ad764a15117dff63c271c Mon Sep 17 00:00:00 2001
-From: Carlos Rafael Giani <dv@pseudoterminal.org>
-Date: Sat, 27 Apr 2013 02:50:25 +0200
-Subject: [PATCH] omx: fixed type error in printf call
-
-%zu expects size_t
-
-Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=699008]
-
-Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
----
- omx/gstomx.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/omx/gstomx.c b/omx/gstomx.c
-index a2945ed..1eca7cc 100644
---- a/omx/gstomx.c
-+++ b/omx/gstomx.c
-@@ -1630,7 +1630,7 @@ gst_omx_port_allocate_buffers_unlocked (GstOMXPort * port,
-
- GST_INFO_OBJECT (comp->parent,
- "Allocating %d buffers of size %zu for %s port %u", n,
-- port->port_def.nBufferSize, comp->name, (guint) port->index);
-+ (size_t) (port->port_def.nBufferSize), comp->name, (guint) port->index);
-
- if (!port->buffers)
- port->buffers = g_ptr_array_sized_new (n);
---
-1.7.9.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.2.0.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.10.4.bb
index 74358a724..dfeefa557 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.2.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.10.4.bb
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
SRC_URI = "http://gstreamer.freedesktop.org/src/gst-omx/gst-omx-${PV}.tar.xz"
-SRC_URI[md5sum] = "d24e8c0153c35dfefee3e26b1c2c35f8"
-SRC_URI[sha256sum] = "0b4874961e6488ad9e5808114bd486ea981c540907262caab1419355fd82d745"
+SRC_URI[md5sum] = "cedb230f1c47d0cf4b575d70dff66ff2"
+SRC_URI[sha256sum] = "45072925cf262f0fd528fab78f0de52734e46a5a88aa802fae51c67c09c81aa2"
S = "${WORKDIR}/gst-omx-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb
deleted file mode 100644
index 970554352..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-DEFAULT_PREFERENCE = "-1"
-
-include gstreamer1.0-omx.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
- file://omx/gstomx.h;beginline=1;endline=21;md5=5c8e1fca32704488e76d2ba9ddfa935f"
-
-SRC_URI = " \
- git://anongit.freedesktop.org/gstreamer/gst-omx;branch=master;name=gst-omx \
- git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;branch=master;name=common \
- file://0001-omx-fixed-type-error-in-printf-call.patch \
-"
-
-SRCREV_gst-omx = "a2db76b048db278ef0aa798e106b7594264e06c0"
-SRCREV_common = "5edcd857b2107cd8b78c16232dd10877513ec157"
-
-SRCREV_FORMAT = "gst-omx"
-
-S = "${WORKDIR}/git"
-
-do_configure_prepend() {
- cd ${S}
- ./autogen.sh --noconfigure
- cd ${B}
-}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
index 0fe5564b5..0ccfc89a2 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
@@ -12,7 +12,7 @@ SRC_URI_append = " \
# opengl packageconfig factored out to make it easy for distros
# and BSP layers to pick either (desktop) opengl, gles2, or no GL
-PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2', '', d)}"
+PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}"
# gtk is not in the PACKAGECONFIG variable by default until
# the transition to gtk+3 is finished
@@ -20,7 +20,7 @@ PACKAGECONFIG ??= " \
${GSTREAMER_ORC} \
${PACKAGECONFIG_GL} \
${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)} \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland egl', '', d)} \
bz2 curl dash dtls hls neon rsvg sbc smoothstreaming sndfile uvch264 webp \
"
@@ -30,6 +30,7 @@ PACKAGECONFIG[bluez] = "--enable-bluez,--disable-bluez,${BLUEZ}"
PACKAGECONFIG[bz2] = "--enable-bz2,--disable-bz2,bzip2"
PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl"
PACKAGECONFIG[dash] = "--enable-dash,--disable-dash,libxml2"
+PACKAGECONFIG[dc1394] = "--enable-dc1394,--disable-dc1394,libdc1394"
PACKAGECONFIG[directfb] = "--enable-directfb,--disable-directfb,directfb"
PACKAGECONFIG[dtls] = "--enable-dtls,--disable-dtls,openssl"
PACKAGECONFIG[egl] = "--enable-egl,--disable-egl,virtual/egl"
@@ -42,6 +43,7 @@ PACKAGECONFIG[gtk] = "--enable-gtk3,--disable-gtk3,gtk+3"
# ensure OpenSSL is used for HLS AES description instead of nettle
# (OpenSSL is a shared dependency with dtls)
PACKAGECONFIG[hls] = "--enable-hls --with-hls-crypto=openssl,--disable-hls,openssl"
+PACKAGECONFIG[kms] = "--enable-kms,--disable-kms,libdrm"
PACKAGECONFIG[libmms] = "--enable-libmms,--disable-libmms,libmms"
PACKAGECONFIG[libssh2] = "--enable-libssh2,--disable-libssh2,libssh2"
PACKAGECONFIG[modplug] = "--enable-modplug,--disable-modplug,libmodplug"
@@ -49,6 +51,7 @@ PACKAGECONFIG[neon] = "--enable-neon,--disable-neon,neon"
PACKAGECONFIG[openal] = "--enable-openal,--disable-openal,openal-soft"
PACKAGECONFIG[opencv] = "--enable-opencv,--disable-opencv,opencv"
PACKAGECONFIG[opengl] = "--enable-opengl,--disable-opengl,virtual/libgl libglu"
+PACKAGECONFIG[openjpeg] = "--enable-openjpeg,--disable-openjpeg,openjpeg"
# the opus encoder/decoder elements are now in the -base package,
# but the opus parser remains in -bad
PACKAGECONFIG[opusparse] = "--enable-opus,--disable-opus,libopus"
@@ -63,18 +66,18 @@ PACKAGECONFIG[srtp] = "--enable-srtp,--disable-srtp,libsrtp"
PACKAGECONFIG[uvch264] = "--enable-uvch264,--disable-uvch264,libusb1 libgudev"
PACKAGECONFIG[voaacenc] = "--enable-voaacenc,--disable-voaacenc,vo-aacenc"
PACKAGECONFIG[voamrwbenc] = "--enable-voamrwbenc,--disable-voamrwbenc,vo-amrwbenc"
-PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,wayland-native wayland"
+PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,wayland-native wayland wayland-protocols"
PACKAGECONFIG[webp] = "--enable-webp,--disable-webp,libwebp"
# these plugins have not been ported to 1.0 (yet):
-# apexsink dc1394 lv2 linsys musepack nas timidity sdl xvid wininet
+# apexsink linsys nas timidity sdl xvid wininet
# sndio cdxaparse dccp faceoverlay hdvparse tta mve nuvdemux
# patchdetect sdi videomeasure
# these plugins have no corresponding library in OE-core or meta-openembedded:
-# openni2 winks direct3d directsound winscreencap acm
-# apple_media android_media avc bs2b chromaprint daala dts gme gsm kate ladspa
-# libde265 mimic mpeg2enc mplex nvenc ofa openh264 opensles pvr soundtouch spandsp
+# openni2 winks direct3d directsound winscreencap acm apple_media
+# android_media avc bs2b chromaprint daala dts fdkaac gme gsm kate ladspa libde265
+# lv2 mimic mpeg2enc mplex musepack nvenc ofa openh264 opensles pvr soundtouch spandsp
# spc teletextdec tinyalsa vdpau vulkan wasapi x265 zbar
# qt5 support is disabled, because it is not present in OE core, and requires more work than
@@ -98,10 +101,10 @@ EXTRA_OECONF += " \
--disable-chromaprint \
--disable-cocoa \
--disable-daala \
- --disable-dc1394 \
--disable-direct3d \
--disable-directsound \
--disable-dts \
+ --disable-fdk_aac \
--disable-gme \
--disable-gsm \
--disable-kate \
@@ -119,7 +122,6 @@ EXTRA_OECONF += " \
--disable-ofa \
--disable-openexr \
--disable-openh264 \
- --disable-openjpeg \
--disable-openni2 \
--disable-opensles \
--disable-pvr \
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch
index 33efc503e..43f1ee0d2 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch
+++ b/import-layers/yocto-poky/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>
gst-libs/gst/mpegts/Makefile.am | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
-diff --git a/gst-libs/gst/gl/Makefile.am b/gst-libs/gst/gl/Makefile.am
-index f968357..7cc2c7a 100644
---- a/gst-libs/gst/gl/Makefile.am
-+++ b/gst-libs/gst/gl/Makefile.am
-@@ -167,7 +167,7 @@ GstGL-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstgl-@GST_API_VERSION@
- --library=libgstgl-@GST_API_VERSION@.la \
+Index: gst-plugins-bad-1.10.1/gst-libs/gst/gl/Makefile.am
+===================================================================
+--- gst-plugins-bad-1.10.1.orig/gst-libs/gst/gl/Makefile.am
++++ gst-plugins-bad-1.10.1/gst-libs/gst/gl/Makefile.am
+@@ -171,7 +171,7 @@ GstGL-@GST_API_VERSION@.gir: $(INTROSPEC
--include=Gst-@GST_API_VERSION@ \
--include=GstBase-@GST_API_VERSION@ \
+ --include=GstVideo-@GST_API_VERSION@ \
- --libtool="$(top_builddir)/libtool" \
+ --libtool="$(LIBTOOL)" \
--pkg gstreamer-@GST_API_VERSION@ \
--pkg gstreamer-base-@GST_API_VERSION@ \
--pkg gstreamer-video-@GST_API_VERSION@ \
-diff --git a/gst-libs/gst/insertbin/Makefile.am b/gst-libs/gst/insertbin/Makefile.am
-index 09eb97c..b746885 100644
---- a/gst-libs/gst/insertbin/Makefile.am
-+++ b/gst-libs/gst/insertbin/Makefile.am
-@@ -44,7 +44,7 @@ GstInsertBin-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstinsertbin-@GS
+Index: gst-plugins-bad-1.10.1/gst-libs/gst/insertbin/Makefile.am
+===================================================================
+--- gst-plugins-bad-1.10.1.orig/gst-libs/gst/insertbin/Makefile.am
++++ gst-plugins-bad-1.10.1/gst-libs/gst/insertbin/Makefile.am
+@@ -45,7 +45,7 @@ GstInsertBin-@GST_API_VERSION@.gir: $(IN
--library=libgstinsertbin-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
--include=GstBase-@GST_API_VERSION@ \
@@ -39,11 +39,11 @@ index 09eb97c..b746885 100644
--pkg gstreamer-@GST_API_VERSION@ \
--pkg gstreamer-base-@GST_API_VERSION@ \
--pkg-export gstreamer-insertbin-@GST_API_VERSION@ \
-diff --git a/gst-libs/gst/mpegts/Makefile.am b/gst-libs/gst/mpegts/Makefile.am
-index 2511d49..c1cbce6 100644
---- a/gst-libs/gst/mpegts/Makefile.am
-+++ b/gst-libs/gst/mpegts/Makefile.am
-@@ -78,7 +78,7 @@ GstMpegts-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstmpegts-@GST_API_
+Index: gst-plugins-bad-1.10.1/gst-libs/gst/mpegts/Makefile.am
+===================================================================
+--- gst-plugins-bad-1.10.1.orig/gst-libs/gst/mpegts/Makefile.am
++++ gst-plugins-bad-1.10.1/gst-libs/gst/mpegts/Makefile.am
+@@ -79,7 +79,7 @@ GstMpegts-@GST_API_VERSION@.gir: $(INTRO
--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-video-@GST_API_VERSION@` \
--library=libgstmpegts-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
@@ -52,6 +52,3 @@ index 2511d49..c1cbce6 100644
--pkg gstreamer-@GST_API_VERSION@ \
--pkg gstreamer-video-@GST_API_VERSION@ \
--pkg-export gstreamer-mpegts-@GST_API_VERSION@ \
---
-2.6.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-Prepend-PKG_CONFIG_SYSROOT_DIR-to-pkg-config-output.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-Prepend-PKG_CONFIG_SYSROOT_DIR-to-pkg-config-output.patch
new file mode 100644
index 000000000..86a4495a8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-Prepend-PKG_CONFIG_SYSROOT_DIR-to-pkg-config-output.patch
@@ -0,0 +1,34 @@
+From c271503d7e233428ac0323c51d6517113e26bef7 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 1 Dec 2016 00:27:13 -0800
+Subject: [PATCH] Prepend PKG_CONFIG_SYSROOT_DIR to pkg-config output
+
+In cross environment we have to prepend the sysroot to the path found by
+pkgconfig since the path returned from pkgconfig does not have sysroot prefixed
+it ends up using the files from host system. If build host has wayland installed
+the build will succeed but if you dont have wayland-protocols installed on build host then
+it wont find the files on build host
+
+This should work ok with non sysrooted builds too since in those cases PKG_CONFIG_SYSROOT_DIR
+will be empty
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: gst-plugins-bad-1.10.1/configure.ac
+===================================================================
+--- gst-plugins-bad-1.10.1.orig/configure.ac
++++ gst-plugins-bad-1.10.1/configure.ac
+@@ -2233,7 +2233,7 @@ AG_GST_CHECK_FEATURE(WAYLAND, [wayland s
+ PKG_CHECK_MODULES(WAYLAND_PROTOCOLS, wayland-protocols >= 1.4, [
+ if test "x$wayland_scanner" != "x"; then
+ HAVE_WAYLAND="yes"
+- AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, `$PKG_CONFIG --variable=pkgdatadir wayland-protocols`)
++ AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, ${WAYLAND_PROTOCOLS_SYSROOT_DIR}`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`)
+ else
+ AC_MSG_RESULT([wayland-scanner is required to build the wayland plugin])
+ HAVE_WAYLAND="no"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch
index e81b06570..9fc91d8fc 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch
+++ b/import-layers/yocto-poky/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>
pkgconfig/gstreamer-gl.pc.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/pkgconfig/gstreamer-gl.pc.in b/pkgconfig/gstreamer-gl.pc.in
-index 5589e2a..b986450 100644
---- a/pkgconfig/gstreamer-gl.pc.in
-+++ b/pkgconfig/gstreamer-gl.pc.in
+Index: gst-plugins-bad-1.10.1/pkgconfig/gstreamer-gl.pc.in
+===================================================================
+--- gst-plugins-bad-1.10.1.orig/pkgconfig/gstreamer-gl.pc.in
++++ gst-plugins-bad-1.10.1/pkgconfig/gstreamer-gl.pc.in
@@ -10,4 +10,4 @@ Version: @VERSION@
Requires: gstreamer-base-@GST_API_VERSION@ gstreamer-@GST_API_VERSION@
Libs: -L${libdir} -lgstgl-@GST_API_VERSION@ @GL_LIBS@
--Cflags: -I${includedir} @GL_CFLAGS@
-+Cflags: -I${includedir}
---
-2.7.0
-
+-Cflags: -I${includedir} -I${libdir}/gstreamer-@GST_API_VERSION@/include @GL_CFLAGS@
++Cflags: -I${includedir} -I${libdir}/gstreamer-@GST_API_VERSION@/include
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-mssdemux-improved-live-playback-support.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-mssdemux-improved-live-playback-support.patch
new file mode 100644
index 000000000..4832c18e7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-mssdemux-improved-live-playback-support.patch
@@ -0,0 +1,929 @@
+From 73721ad4e9e2d32e1c8b6a3b4aaa98401530e58a Mon Sep 17 00:00:00 2001
+From: Philippe Normand <philn@igalia.com>
+Date: Tue, 29 Nov 2016 14:43:41 +0100
+Subject: [PATCH] mssdemux: improved live playback support
+
+When a MSS server hosts a live stream the fragments listed in the
+manifest usually don't have accurate timestamps and duration, except
+for the first fragment, which additionally stores timing information
+for the few upcoming fragments. In this scenario it is useless to
+periodically fetch and update the manifest and the fragments list can
+be incrementally built by parsing the first/current fragment.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=755036
+---
+Upstream-Status: Backport
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+ ext/smoothstreaming/Makefile.am | 2 +
+ ext/smoothstreaming/gstmssdemux.c | 60 ++++++
+ ext/smoothstreaming/gstmssfragmentparser.c | 266 ++++++++++++++++++++++++++
+ ext/smoothstreaming/gstmssfragmentparser.h | 84 ++++++++
+ ext/smoothstreaming/gstmssmanifest.c | 158 ++++++++++++++-
+ ext/smoothstreaming/gstmssmanifest.h | 7 +
+ gst-libs/gst/adaptivedemux/gstadaptivedemux.c | 27 ++-
+ gst-libs/gst/adaptivedemux/gstadaptivedemux.h | 14 ++
+ 8 files changed, 606 insertions(+), 12 deletions(-)
+ create mode 100644 ext/smoothstreaming/gstmssfragmentparser.c
+ create mode 100644 ext/smoothstreaming/gstmssfragmentparser.h
+
+diff --git a/ext/smoothstreaming/Makefile.am b/ext/smoothstreaming/Makefile.am
+index 4faf9df9f..a5e1ad6ae 100644
+--- a/ext/smoothstreaming/Makefile.am
++++ b/ext/smoothstreaming/Makefile.am
+@@ -13,8 +13,10 @@ libgstsmoothstreaming_la_LIBADD = \
+ libgstsmoothstreaming_la_LDFLAGS = ${GST_PLUGIN_LDFLAGS}
+ libgstsmoothstreaming_la_SOURCES = gstsmoothstreaming-plugin.c \
+ gstmssdemux.c \
++ gstmssfragmentparser.c \
+ gstmssmanifest.c
+ libgstsmoothstreaming_la_LIBTOOLFLAGS = --tag=disable-static
+
+ noinst_HEADERS = gstmssdemux.h \
++ gstmssfragmentparser.h \
+ gstmssmanifest.h
+diff --git a/ext/smoothstreaming/gstmssdemux.c b/ext/smoothstreaming/gstmssdemux.c
+index 12fb40497..120d9c22b 100644
+--- a/ext/smoothstreaming/gstmssdemux.c
++++ b/ext/smoothstreaming/gstmssdemux.c
+@@ -135,11 +135,18 @@ gst_mss_demux_stream_update_fragment_info (GstAdaptiveDemuxStream * stream);
+ static gboolean gst_mss_demux_seek (GstAdaptiveDemux * demux, GstEvent * seek);
+ static gint64
+ gst_mss_demux_get_manifest_update_interval (GstAdaptiveDemux * demux);
++static gint64
++gst_mss_demux_stream_get_fragment_waiting_time (GstAdaptiveDemuxStream *
++ stream);
+ static GstFlowReturn
+ gst_mss_demux_update_manifest_data (GstAdaptiveDemux * demux,
+ GstBuffer * buffer);
+ static gboolean gst_mss_demux_get_live_seek_range (GstAdaptiveDemux * demux,
+ gint64 * start, gint64 * stop);
++static GstFlowReturn gst_mss_demux_data_received (GstAdaptiveDemux * demux,
++ GstAdaptiveDemuxStream * stream, GstBuffer * buffer);
++static gboolean
++gst_mss_demux_requires_periodical_playlist_update (GstAdaptiveDemux * demux);
+
+ static void
+ gst_mss_demux_class_init (GstMssDemuxClass * klass)
+@@ -192,10 +199,15 @@ gst_mss_demux_class_init (GstMssDemuxClass * klass)
+ gst_mss_demux_stream_select_bitrate;
+ gstadaptivedemux_class->stream_update_fragment_info =
+ gst_mss_demux_stream_update_fragment_info;
++ gstadaptivedemux_class->stream_get_fragment_waiting_time =
++ gst_mss_demux_stream_get_fragment_waiting_time;
+ gstadaptivedemux_class->update_manifest_data =
+ gst_mss_demux_update_manifest_data;
+ gstadaptivedemux_class->get_live_seek_range =
+ gst_mss_demux_get_live_seek_range;
++ gstadaptivedemux_class->data_received = gst_mss_demux_data_received;
++ gstadaptivedemux_class->requires_periodical_playlist_update =
++ gst_mss_demux_requires_periodical_playlist_update;
+
+ GST_DEBUG_CATEGORY_INIT (mssdemux_debug, "mssdemux", 0, "mssdemux plugin");
+ }
+@@ -650,6 +662,13 @@ gst_mss_demux_get_manifest_update_interval (GstAdaptiveDemux * demux)
+ return interval;
+ }
+
++static gint64
++gst_mss_demux_stream_get_fragment_waiting_time (GstAdaptiveDemuxStream * stream)
++{
++ /* Wait a second for live streams so we don't try premature fragments downloading */
++ return GST_SECOND;
++}
++
+ static GstFlowReturn
+ gst_mss_demux_update_manifest_data (GstAdaptiveDemux * demux,
+ GstBuffer * buffer)
+@@ -670,3 +689,44 @@ gst_mss_demux_get_live_seek_range (GstAdaptiveDemux * demux, gint64 * start,
+
+ return gst_mss_manifest_get_live_seek_range (mssdemux->manifest, start, stop);
+ }
++
++static GstFlowReturn
++gst_mss_demux_data_received (GstAdaptiveDemux * demux,
++ GstAdaptiveDemuxStream * stream, GstBuffer * buffer)
++{
++ GstMssDemux *mssdemux = GST_MSS_DEMUX_CAST (demux);
++ GstMssDemuxStream *mssstream = (GstMssDemuxStream *) stream;
++ gsize available;
++
++ if (!gst_mss_manifest_is_live (mssdemux->manifest)) {
++ return GST_ADAPTIVE_DEMUX_CLASS (parent_class)->data_received (demux,
++ stream, buffer);
++ }
++
++ if (gst_mss_stream_fragment_parsing_needed (mssstream->manifest_stream)) {
++ gst_mss_manifest_live_adapter_push (mssstream->manifest_stream, buffer);
++ available =
++ gst_mss_manifest_live_adapter_available (mssstream->manifest_stream);
++ // FIXME: try to reduce this minimal size.
++ if (available < 4096) {
++ return GST_FLOW_OK;
++ } else {
++ GST_LOG_OBJECT (stream->pad, "enough data, parsing fragment.");
++ buffer =
++ gst_mss_manifest_live_adapter_take_buffer (mssstream->manifest_stream,
++ available);
++ gst_mss_stream_parse_fragment (mssstream->manifest_stream, buffer);
++ }
++ }
++
++ return GST_ADAPTIVE_DEMUX_CLASS (parent_class)->data_received (demux, stream,
++ buffer);
++}
++
++static gboolean
++gst_mss_demux_requires_periodical_playlist_update (GstAdaptiveDemux * demux)
++{
++ GstMssDemux *mssdemux = GST_MSS_DEMUX_CAST (demux);
++
++ return (!gst_mss_manifest_is_live (mssdemux->manifest));
++}
+diff --git a/ext/smoothstreaming/gstmssfragmentparser.c b/ext/smoothstreaming/gstmssfragmentparser.c
+new file mode 100644
+index 000000000..b554d4f31
+--- /dev/null
++++ b/ext/smoothstreaming/gstmssfragmentparser.c
+@@ -0,0 +1,266 @@
++/*
++ * Microsoft Smooth-Streaming fragment parsing library
++ *
++ * gstmssfragmentparser.h
++ *
++ * Copyright (C) 2016 Igalia S.L
++ * Copyright (C) 2016 Metrological
++ * Author: Philippe Normand <philn@igalia.com>
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Library General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Library General Public License for more details.
++ *
++ * You should have received a copy of the GNU Library General Public
++ * License along with this library (COPYING); if not, write to the
++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++ * Boston, MA 02111-1307, USA.
++ */
++
++#include "gstmssfragmentparser.h"
++#include <gst/base/gstbytereader.h>
++#include <string.h>
++
++GST_DEBUG_CATEGORY_EXTERN (mssdemux_debug);
++#define GST_CAT_DEFAULT mssdemux_debug
++
++void
++gst_mss_fragment_parser_init (GstMssFragmentParser * parser)
++{
++ parser->status = GST_MSS_FRAGMENT_HEADER_PARSER_INIT;
++ parser->tfrf.entries_count = 0;
++}
++
++void
++gst_mss_fragment_parser_clear (GstMssFragmentParser * parser)
++{
++ parser->tfrf.entries_count = 0;
++ if (parser->tfrf.entries) {
++ g_free (parser->tfrf.entries);
++ parser->tfrf.entries = 0;
++ }
++}
++
++static gboolean
++_parse_tfrf_box (GstMssFragmentParser * parser, GstByteReader * reader)
++{
++ guint8 version;
++ guint32 flags = 0;
++ guint8 fragment_count = 0;
++ guint8 index = 0;
++
++ if (!gst_byte_reader_get_uint8 (reader, &version)) {
++ GST_ERROR ("Error getting box's version field");
++ return FALSE;
++ }
++
++ if (!gst_byte_reader_get_uint24_be (reader, &flags)) {
++ GST_ERROR ("Error getting box's flags field");
++ return FALSE;
++ }
++
++ gst_byte_reader_get_uint8 (reader, &fragment_count);
++ parser->tfrf.entries_count = fragment_count;
++ parser->tfrf.entries =
++ g_malloc (sizeof (GstTfrfBoxEntry) * parser->tfrf.entries_count);
++ for (index = 0; index < fragment_count; index++) {
++ guint64 absolute_time = 0;
++ guint64 absolute_duration = 0;
++ if (version & 0x01) {
++ gst_byte_reader_get_uint64_be (reader, &absolute_time);
++ gst_byte_reader_get_uint64_be (reader, &absolute_duration);
++ } else {
++ guint32 time = 0;
++ guint32 duration = 0;
++ gst_byte_reader_get_uint32_be (reader, &time);
++ gst_byte_reader_get_uint32_be (reader, &duration);
++ time = ~time;
++ duration = ~duration;
++ absolute_time = ~time;
++ absolute_duration = ~duration;
++ }
++ parser->tfrf.entries[index].time = absolute_time;
++ parser->tfrf.entries[index].duration = absolute_duration;
++ }
++
++ GST_LOG ("tfrf box parsed");
++ return TRUE;
++}
++
++static gboolean
++_parse_tfxd_box (GstMssFragmentParser * parser, GstByteReader * reader)
++{
++ guint8 version;
++ guint32 flags = 0;
++ guint64 absolute_time = 0;
++ guint64 absolute_duration = 0;
++
++ if (!gst_byte_reader_get_uint8 (reader, &version)) {
++ GST_ERROR ("Error getting box's version field");
++ return FALSE;
++ }
++
++ if (!gst_byte_reader_get_uint24_be (reader, &flags)) {
++ GST_ERROR ("Error getting box's flags field");
++ return FALSE;
++ }
++
++ if (version & 0x01) {
++ gst_byte_reader_get_uint64_be (reader, &absolute_time);
++ gst_byte_reader_get_uint64_be (reader, &absolute_duration);
++ } else {
++ guint32 time = 0;
++ guint32 duration = 0;
++ gst_byte_reader_get_uint32_be (reader, &time);
++ gst_byte_reader_get_uint32_be (reader, &duration);
++ time = ~time;
++ duration = ~duration;
++ absolute_time = ~time;
++ absolute_duration = ~duration;
++ }
++
++ parser->tfxd.time = absolute_time;
++ parser->tfxd.duration = absolute_duration;
++ GST_LOG ("tfxd box parsed");
++ return TRUE;
++}
++
++gboolean
++gst_mss_fragment_parser_add_buffer (GstMssFragmentParser * parser,
++ GstBuffer * buffer)
++{
++ GstByteReader reader;
++ GstMapInfo info;
++ guint32 size;
++ guint32 fourcc;
++ const guint8 *uuid;
++ gboolean error = FALSE;
++ gboolean mdat_box_found = FALSE;
++
++ static const guint8 tfrf_uuid[] = {
++ 0xd4, 0x80, 0x7e, 0xf2, 0xca, 0x39, 0x46, 0x95,
++ 0x8e, 0x54, 0x26, 0xcb, 0x9e, 0x46, 0xa7, 0x9f
++ };
++
++ static const guint8 tfxd_uuid[] = {
++ 0x6d, 0x1d, 0x9b, 0x05, 0x42, 0xd5, 0x44, 0xe6,
++ 0x80, 0xe2, 0x14, 0x1d, 0xaf, 0xf7, 0x57, 0xb2
++ };
++
++ static const guint8 piff_uuid[] = {
++ 0xa2, 0x39, 0x4f, 0x52, 0x5a, 0x9b, 0x4f, 0x14,
++ 0xa2, 0x44, 0x6c, 0x42, 0x7c, 0x64, 0x8d, 0xf4
++ };
++
++ if (!gst_buffer_map (buffer, &info, GST_MAP_READ)) {
++ return FALSE;
++ }
++
++ gst_byte_reader_init (&reader, info.data, info.size);
++ GST_TRACE ("Total buffer size: %u", gst_byte_reader_get_size (&reader));
++
++ size = gst_byte_reader_get_uint32_be_unchecked (&reader);
++ fourcc = gst_byte_reader_get_uint32_le_unchecked (&reader);
++ if (fourcc == GST_MSS_FRAGMENT_FOURCC_MOOF) {
++ GST_TRACE ("moof box found");
++ size = gst_byte_reader_get_uint32_be_unchecked (&reader);
++ fourcc = gst_byte_reader_get_uint32_le_unchecked (&reader);
++ if (fourcc == GST_MSS_FRAGMENT_FOURCC_MFHD) {
++ gst_byte_reader_skip_unchecked (&reader, size - 8);
++
++ size = gst_byte_reader_get_uint32_be_unchecked (&reader);
++ fourcc = gst_byte_reader_get_uint32_le_unchecked (&reader);
++ if (fourcc == GST_MSS_FRAGMENT_FOURCC_TRAF) {
++ size = gst_byte_reader_get_uint32_be_unchecked (&reader);
++ fourcc = gst_byte_reader_get_uint32_le_unchecked (&reader);
++ if (fourcc == GST_MSS_FRAGMENT_FOURCC_TFHD) {
++ gst_byte_reader_skip_unchecked (&reader, size - 8);
++
++ size = gst_byte_reader_get_uint32_be_unchecked (&reader);
++ fourcc = gst_byte_reader_get_uint32_le_unchecked (&reader);
++ if (fourcc == GST_MSS_FRAGMENT_FOURCC_TRUN) {
++ GST_TRACE ("trun box found, size: %" G_GUINT32_FORMAT, size);
++ if (!gst_byte_reader_skip (&reader, size - 8)) {
++ GST_WARNING ("Failed to skip trun box, enough data?");
++ error = TRUE;
++ goto beach;
++ }
++ }
++ }
++ }
++ }
++ }
++
++ while (!mdat_box_found) {
++ GST_TRACE ("remaining data: %u", gst_byte_reader_get_remaining (&reader));
++ if (!gst_byte_reader_get_uint32_be (&reader, &size)) {
++ GST_WARNING ("Failed to get box size, enough data?");
++ error = TRUE;
++ break;
++ }
++
++ GST_TRACE ("box size: %" G_GUINT32_FORMAT, size);
++ if (!gst_byte_reader_get_uint32_le (&reader, &fourcc)) {
++ GST_WARNING ("Failed to get fourcc, enough data?");
++ error = TRUE;
++ break;
++ }
++
++ if (fourcc == GST_MSS_FRAGMENT_FOURCC_MDAT) {
++ GST_LOG ("mdat box found");
++ mdat_box_found = TRUE;
++ break;
++ }
++
++ if (fourcc != GST_MSS_FRAGMENT_FOURCC_UUID) {
++ GST_ERROR ("invalid UUID fourcc: %" GST_FOURCC_FORMAT,
++ GST_FOURCC_ARGS (fourcc));
++ error = TRUE;
++ break;
++ }
++
++ if (!gst_byte_reader_peek_data (&reader, 16, &uuid)) {
++ GST_ERROR ("not enough data in UUID box");
++ error = TRUE;
++ break;
++ }
++
++ if (memcmp (uuid, piff_uuid, 16) == 0) {
++ gst_byte_reader_skip_unchecked (&reader, size - 8);
++ GST_LOG ("piff box detected");
++ }
++
++ if (memcmp (uuid, tfrf_uuid, 16) == 0) {
++ gst_byte_reader_get_data (&reader, 16, &uuid);
++ if (!_parse_tfrf_box (parser, &reader)) {
++ GST_ERROR ("txrf box parsing error");
++ error = TRUE;
++ break;
++ }
++ }
++
++ if (memcmp (uuid, tfxd_uuid, 16) == 0) {
++ gst_byte_reader_get_data (&reader, 16, &uuid);
++ if (!_parse_tfxd_box (parser, &reader)) {
++ GST_ERROR ("tfrf box parsing error");
++ error = TRUE;
++ break;
++ }
++ }
++ }
++
++beach:
++
++ if (!error)
++ parser->status = GST_MSS_FRAGMENT_HEADER_PARSER_FINISHED;
++
++ GST_LOG ("Fragment parsing successful: %s", error ? "no" : "yes");
++ gst_buffer_unmap (buffer, &info);
++ return !error;
++}
+diff --git a/ext/smoothstreaming/gstmssfragmentparser.h b/ext/smoothstreaming/gstmssfragmentparser.h
+new file mode 100644
+index 000000000..cf4711865
+--- /dev/null
++++ b/ext/smoothstreaming/gstmssfragmentparser.h
+@@ -0,0 +1,84 @@
++/*
++ * Microsoft Smooth-Streaming fragment parsing library
++ *
++ * gstmssfragmentparser.h
++ *
++ * Copyright (C) 2016 Igalia S.L
++ * Copyright (C) 2016 Metrological
++ * Author: Philippe Normand <philn@igalia.com>
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Library General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Library General Public License for more details.
++ *
++ * You should have received a copy of the GNU Library General Public
++ * License along with this library (COPYING); if not, write to the
++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++ * Boston, MA 02111-1307, USA.
++ */
++
++#ifndef __GST_MSS_FRAGMENT_PARSER_H__
++#define __GST_MSS_FRAGMENT_PARSER_H__
++
++#include <gst/gst.h>
++
++G_BEGIN_DECLS
++
++#define GST_MSS_FRAGMENT_FOURCC_MOOF GST_MAKE_FOURCC('m','o','o','f')
++#define GST_MSS_FRAGMENT_FOURCC_MFHD GST_MAKE_FOURCC('m','f','h','d')
++#define GST_MSS_FRAGMENT_FOURCC_TRAF GST_MAKE_FOURCC('t','r','a','f')
++#define GST_MSS_FRAGMENT_FOURCC_TFHD GST_MAKE_FOURCC('t','f','h','d')
++#define GST_MSS_FRAGMENT_FOURCC_TRUN GST_MAKE_FOURCC('t','r','u','n')
++#define GST_MSS_FRAGMENT_FOURCC_UUID GST_MAKE_FOURCC('u','u','i','d')
++#define GST_MSS_FRAGMENT_FOURCC_MDAT GST_MAKE_FOURCC('m','d','a','t')
++
++typedef struct _GstTfxdBox
++{
++ guint8 version;
++ guint32 flags;
++
++ guint64 time;
++ guint64 duration;
++} GstTfxdBox;
++
++typedef struct _GstTfrfBoxEntry
++{
++ guint64 time;
++ guint64 duration;
++} GstTfrfBoxEntry;
++
++typedef struct _GstTfrfBox
++{
++ guint8 version;
++ guint32 flags;
++
++ gint entries_count;
++ GstTfrfBoxEntry *entries;
++} GstTfrfBox;
++
++typedef enum _GstFragmentHeaderParserStatus
++{
++ GST_MSS_FRAGMENT_HEADER_PARSER_INIT,
++ GST_MSS_FRAGMENT_HEADER_PARSER_FINISHED
++} GstFragmentHeaderParserStatus;
++
++typedef struct _GstMssFragmentParser
++{
++ GstFragmentHeaderParserStatus status;
++ GstTfxdBox tfxd;
++ GstTfrfBox tfrf;
++} GstMssFragmentParser;
++
++void gst_mss_fragment_parser_init (GstMssFragmentParser * parser);
++void gst_mss_fragment_parser_clear (GstMssFragmentParser * parser);
++gboolean gst_mss_fragment_parser_add_buffer (GstMssFragmentParser * parser, GstBuffer * buf);
++
++G_END_DECLS
++
++#endif /* __GST_MSS_FRAGMENT_PARSER_H__ */
+diff --git a/ext/smoothstreaming/gstmssmanifest.c b/ext/smoothstreaming/gstmssmanifest.c
+index 144bbb42d..e1031ba55 100644
+--- a/ext/smoothstreaming/gstmssmanifest.c
++++ b/ext/smoothstreaming/gstmssmanifest.c
+@@ -1,5 +1,7 @@
+ /* GStreamer
+ * Copyright (C) 2012 Smart TV Alliance
++ * Copyright (C) 2016 Igalia S.L
++ * Copyright (C) 2016 Metrological
+ * Author: Thiago Sousa Santos <thiago.sousa.santos@collabora.com>, Collabora Ltd.
+ *
+ * gstmssmanifest.c:
+@@ -31,6 +33,7 @@
+ #include <gst/codecparsers/gsth264parser.h>
+
+ #include "gstmssmanifest.h"
++#include "gstmssfragmentparser.h"
+
+ GST_DEBUG_CATEGORY_EXTERN (mssdemux_debug);
+ #define GST_CAT_DEFAULT mssdemux_debug
+@@ -74,12 +77,17 @@ struct _GstMssStream
+ gboolean active; /* if the stream is currently being used */
+ gint selectedQualityIndex;
+
++ gboolean has_live_fragments;
++ GstAdapter *live_adapter;
++
+ GList *fragments;
+ GList *qualities;
+
+ gchar *url;
+ gchar *lang;
+
++ GstMssFragmentParser fragment_parser;
++
+ guint fragment_repetition_index;
+ GList *current_fragment;
+ GList *current_quality;
+@@ -96,6 +104,7 @@ struct _GstMssManifest
+
+ gboolean is_live;
+ gint64 dvr_window;
++ guint64 look_ahead_fragment_count;
+
+ GString *protection_system_id;
+ gchar *protection_data;
+@@ -235,7 +244,8 @@ compare_bitrate (GstMssStreamQuality * a, GstMssStreamQuality * b)
+ }
+
+ static void
+-_gst_mss_stream_init (GstMssStream * stream, xmlNodePtr node)
++_gst_mss_stream_init (GstMssManifest * manifest, GstMssStream * stream,
++ xmlNodePtr node)
+ {
+ xmlNodePtr iter;
+ GstMssFragmentListBuilder builder;
+@@ -248,9 +258,21 @@ _gst_mss_stream_init (GstMssStream * stream, xmlNodePtr node)
+ stream->url = (gchar *) xmlGetProp (node, (xmlChar *) MSS_PROP_URL);
+ stream->lang = (gchar *) xmlGetProp (node, (xmlChar *) MSS_PROP_LANGUAGE);
+
++ /* for live playback each fragment usually has timing
++ * information for the few next look-ahead fragments so the
++ * playlist can be built incrementally from the first fragment
++ * of the manifest.
++ */
++
++ GST_DEBUG ("Live stream: %s, look-ahead fragments: %" G_GUINT64_FORMAT,
++ manifest->is_live ? "yes" : "no", manifest->look_ahead_fragment_count);
++ stream->has_live_fragments = manifest->is_live
++ && manifest->look_ahead_fragment_count;
++
+ for (iter = node->children; iter; iter = iter->next) {
+ if (node_has_type (iter, MSS_NODE_STREAM_FRAGMENT)) {
+- gst_mss_fragment_list_builder_add (&builder, iter);
++ if (!stream->has_live_fragments || !builder.fragments)
++ gst_mss_fragment_list_builder_add (&builder, iter);
+ } else if (node_has_type (iter, MSS_NODE_STREAM_QUALITY)) {
+ GstMssStreamQuality *quality = gst_mss_stream_quality_new (iter);
+ stream->qualities = g_list_prepend (stream->qualities, quality);
+@@ -259,17 +281,24 @@ _gst_mss_stream_init (GstMssStream * stream, xmlNodePtr node)
+ }
+ }
+
+- stream->fragments = g_list_reverse (builder.fragments);
++ if (stream->has_live_fragments) {
++ stream->live_adapter = gst_adapter_new ();
++ }
++
++ if (builder.fragments) {
++ stream->fragments = g_list_reverse (builder.fragments);
++ stream->current_fragment = stream->fragments;
++ }
+
+ /* order them from smaller to bigger based on bitrates */
+ stream->qualities =
+ g_list_sort (stream->qualities, (GCompareFunc) compare_bitrate);
+-
+- stream->current_fragment = stream->fragments;
+ stream->current_quality = stream->qualities;
+
+ stream->regex_bitrate = g_regex_new ("\\{[Bb]itrate\\}", 0, 0, NULL);
+ stream->regex_position = g_regex_new ("\\{start[ _]time\\}", 0, 0, NULL);
++
++ gst_mss_fragment_parser_init (&stream->fragment_parser);
+ }
+
+
+@@ -315,6 +344,7 @@ gst_mss_manifest_new (GstBuffer * data)
+ xmlNodePtr nodeiter;
+ gchar *live_str;
+ GstMapInfo mapinfo;
++ gchar *look_ahead_fragment_count_str;
+
+ if (!gst_buffer_map (data, &mapinfo, GST_MAP_READ)) {
+ return NULL;
+@@ -335,6 +365,7 @@ gst_mss_manifest_new (GstBuffer * data)
+ /* the entire file is always available for non-live streams */
+ if (!manifest->is_live) {
+ manifest->dvr_window = 0;
++ manifest->look_ahead_fragment_count = 0;
+ } else {
+ /* if 0, or non-existent, the length is infinite */
+ gchar *dvr_window_str = (gchar *) xmlGetProp (root,
+@@ -346,6 +377,17 @@ gst_mss_manifest_new (GstBuffer * data)
+ manifest->dvr_window = 0;
+ }
+ }
++
++ look_ahead_fragment_count_str =
++ (gchar *) xmlGetProp (root, (xmlChar *) "LookAheadFragmentCount");
++ if (look_ahead_fragment_count_str) {
++ manifest->look_ahead_fragment_count =
++ g_ascii_strtoull (look_ahead_fragment_count_str, NULL, 10);
++ xmlFree (look_ahead_fragment_count_str);
++ if (manifest->look_ahead_fragment_count <= 0) {
++ manifest->look_ahead_fragment_count = 0;
++ }
++ }
+ }
+
+ for (nodeiter = root->children; nodeiter; nodeiter = nodeiter->next) {
+@@ -354,7 +396,7 @@ gst_mss_manifest_new (GstBuffer * data)
+ GstMssStream *stream = g_new0 (GstMssStream, 1);
+
+ manifest->streams = g_slist_append (manifest->streams, stream);
+- _gst_mss_stream_init (stream, nodeiter);
++ _gst_mss_stream_init (manifest, stream, nodeiter);
+ }
+
+ if (nodeiter->type == XML_ELEMENT_NODE
+@@ -371,6 +413,11 @@ gst_mss_manifest_new (GstBuffer * data)
+ static void
+ gst_mss_stream_free (GstMssStream * stream)
+ {
++ if (stream->live_adapter) {
++ gst_adapter_clear (stream->live_adapter);
++ g_object_unref (stream->live_adapter);
++ }
++
+ g_list_free_full (stream->fragments, g_free);
+ g_list_free_full (stream->qualities,
+ (GDestroyNotify) gst_mss_stream_quality_free);
+@@ -379,6 +426,7 @@ gst_mss_stream_free (GstMssStream * stream)
+ g_regex_unref (stream->regex_position);
+ g_regex_unref (stream->regex_bitrate);
+ g_free (stream);
++ gst_mss_fragment_parser_clear (&stream->fragment_parser);
+ }
+
+ void
+@@ -1079,6 +1127,9 @@ GstFlowReturn
+ gst_mss_stream_advance_fragment (GstMssStream * stream)
+ {
+ GstMssStreamFragment *fragment;
++ const gchar *stream_type_name =
++ gst_mss_stream_type_name (gst_mss_stream_get_type (stream));
++
+ g_return_val_if_fail (stream->active, GST_FLOW_ERROR);
+
+ if (stream->current_fragment == NULL)
+@@ -1086,14 +1137,20 @@ gst_mss_stream_advance_fragment (GstMssStream * stream)
+
+ fragment = stream->current_fragment->data;
+ stream->fragment_repetition_index++;
+- if (stream->fragment_repetition_index < fragment->repetitions) {
+- return GST_FLOW_OK;
+- }
++ if (stream->fragment_repetition_index < fragment->repetitions)
++ goto beach;
+
+ stream->fragment_repetition_index = 0;
+ stream->current_fragment = g_list_next (stream->current_fragment);
++
++ GST_DEBUG ("Advanced to fragment #%d on %s stream", fragment->number,
++ stream_type_name);
+ if (stream->current_fragment == NULL)
+ return GST_FLOW_EOS;
++
++beach:
++ gst_mss_fragment_parser_clear (&stream->fragment_parser);
++ gst_mss_fragment_parser_init (&stream->fragment_parser);
+ return GST_FLOW_OK;
+ }
+
+@@ -1173,6 +1230,11 @@ gst_mss_stream_seek (GstMssStream * stream, gboolean forward,
+ GST_DEBUG ("Stream %s seeking to %" G_GUINT64_FORMAT, stream->url, time);
+ for (iter = stream->fragments; iter; iter = g_list_next (iter)) {
+ fragment = iter->data;
++ if (stream->has_live_fragments) {
++ if (fragment->time + fragment->repetitions * fragment->duration > time)
++ stream->current_fragment = iter;
++ break;
++ }
+ if (fragment->time + fragment->repetitions * fragment->duration > time) {
+ stream->current_fragment = iter;
+ stream->fragment_repetition_index =
+@@ -1256,9 +1318,14 @@ static void
+ gst_mss_stream_reload_fragments (GstMssStream * stream, xmlNodePtr streamIndex)
+ {
+ xmlNodePtr iter;
+- guint64 current_gst_time = gst_mss_stream_get_fragment_gst_timestamp (stream);
++ guint64 current_gst_time;
+ GstMssFragmentListBuilder builder;
+
++ if (stream->has_live_fragments)
++ return;
++
++ current_gst_time = gst_mss_stream_get_fragment_gst_timestamp (stream);
++
+ gst_mss_fragment_list_builder_init (&builder);
+
+ GST_DEBUG ("Current position: %" GST_TIME_FORMAT,
+@@ -1514,3 +1581,74 @@ gst_mss_manifest_get_live_seek_range (GstMssManifest * manifest, gint64 * start,
+
+ return ret;
+ }
++
++void
++gst_mss_manifest_live_adapter_push (GstMssStream * stream, GstBuffer * buffer)
++{
++ gst_adapter_push (stream->live_adapter, buffer);
++}
++
++gsize
++gst_mss_manifest_live_adapter_available (GstMssStream * stream)
++{
++ return gst_adapter_available (stream->live_adapter);
++}
++
++GstBuffer *
++gst_mss_manifest_live_adapter_take_buffer (GstMssStream * stream, gsize nbytes)
++{
++ return gst_adapter_take_buffer (stream->live_adapter, nbytes);
++}
++
++gboolean
++gst_mss_stream_fragment_parsing_needed (GstMssStream * stream)
++{
++ return stream->fragment_parser.status == GST_MSS_FRAGMENT_HEADER_PARSER_INIT;
++}
++
++void
++gst_mss_stream_parse_fragment (GstMssStream * stream, GstBuffer * buffer)
++{
++ GstMssStreamFragment *current_fragment = NULL;
++ const gchar *stream_type_name;
++ guint8 index;
++
++ if (!stream->has_live_fragments)
++ return;
++
++ if (!gst_mss_fragment_parser_add_buffer (&stream->fragment_parser, buffer))
++ return;
++
++ current_fragment = stream->current_fragment->data;
++ current_fragment->time = stream->fragment_parser.tfxd.time;
++ current_fragment->duration = stream->fragment_parser.tfxd.duration;
++
++ stream_type_name =
++ gst_mss_stream_type_name (gst_mss_stream_get_type (stream));
++
++ for (index = 0; index < stream->fragment_parser.tfrf.entries_count; index++) {
++ GList *l = g_list_last (stream->fragments);
++ GstMssStreamFragment *last;
++ GstMssStreamFragment *fragment;
++
++ if (l == NULL)
++ break;
++
++ last = (GstMssStreamFragment *) l->data;
++
++ if (last->time == stream->fragment_parser.tfrf.entries[index].time)
++ continue;
++
++ fragment = g_new (GstMssStreamFragment, 1);
++ fragment->number = last->number + 1;
++ fragment->repetitions = 1;
++ fragment->time = stream->fragment_parser.tfrf.entries[index].time;
++ fragment->duration = stream->fragment_parser.tfrf.entries[index].duration;
++
++ stream->fragments = g_list_append (stream->fragments, fragment);
++ GST_LOG ("Adding fragment number: %u to %s stream, time: %" G_GUINT64_FORMAT
++ ", duration: %" G_GUINT64_FORMAT ", repetitions: %u",
++ fragment->number, stream_type_name,
++ fragment->time, fragment->duration, fragment->repetitions);
++ }
++}
+diff --git a/ext/smoothstreaming/gstmssmanifest.h b/ext/smoothstreaming/gstmssmanifest.h
+index 6b7b1f971..03b066ae5 100644
+--- a/ext/smoothstreaming/gstmssmanifest.h
++++ b/ext/smoothstreaming/gstmssmanifest.h
+@@ -26,6 +26,7 @@
+ #include <glib.h>
+ #include <gio/gio.h>
+ #include <gst/gst.h>
++#include <gst/base/gstadapter.h>
+
+ G_BEGIN_DECLS
+
+@@ -73,5 +74,11 @@ const gchar * gst_mss_stream_get_lang (GstMssStream * stream);
+
+ const gchar * gst_mss_stream_type_name (GstMssStreamType streamtype);
+
++void gst_mss_manifest_live_adapter_push(GstMssStream * stream, GstBuffer * buffer);
++gsize gst_mss_manifest_live_adapter_available(GstMssStream * stream);
++GstBuffer * gst_mss_manifest_live_adapter_take_buffer(GstMssStream * stream, gsize nbytes);
++gboolean gst_mss_stream_fragment_parsing_needed(GstMssStream * stream);
++void gst_mss_stream_parse_fragment(GstMssStream * stream, GstBuffer * buffer);
++
+ G_END_DECLS
+ #endif /* __GST_MSS_MANIFEST_H__ */
+diff --git a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c
+index 634e4f388..ddca726b6 100644
+--- a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c
++++ b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c
+@@ -291,6 +291,9 @@ gst_adaptive_demux_wait_until (GstClock * clock, GCond * cond, GMutex * mutex,
+ GstClockTime end_time);
+ static gboolean gst_adaptive_demux_clock_callback (GstClock * clock,
+ GstClockTime time, GstClockID id, gpointer user_data);
++static gboolean
++gst_adaptive_demux_requires_periodical_playlist_update_default (GstAdaptiveDemux
++ * demux);
+
+ /* we can't use G_DEFINE_ABSTRACT_TYPE because we need the klass in the _init
+ * method to get to the padtemplates */
+@@ -412,6 +415,9 @@ gst_adaptive_demux_class_init (GstAdaptiveDemuxClass * klass)
+ klass->data_received = gst_adaptive_demux_stream_data_received_default;
+ klass->finish_fragment = gst_adaptive_demux_stream_finish_fragment_default;
+ klass->update_manifest = gst_adaptive_demux_update_manifest_default;
++ klass->requires_periodical_playlist_update =
++ gst_adaptive_demux_requires_periodical_playlist_update_default;
++
+ }
+
+ static void
+@@ -686,7 +692,9 @@ gst_adaptive_demux_sink_event (GstPad * pad, GstObject * parent,
+ demux->priv->stop_updates_task = FALSE;
+ g_mutex_unlock (&demux->priv->updates_timed_lock);
+ /* Task to periodically update the manifest */
+- gst_task_start (demux->priv->updates_task);
++ if (demux_class->requires_periodical_playlist_update (demux)) {
++ gst_task_start (demux->priv->updates_task);
++ }
+ }
+ } else {
+ /* no streams */
+@@ -2125,6 +2133,13 @@ gst_adaptive_demux_stream_data_received_default (GstAdaptiveDemux * demux,
+ return gst_adaptive_demux_stream_push_buffer (stream, buffer);
+ }
+
++static gboolean
++gst_adaptive_demux_requires_periodical_playlist_update_default (GstAdaptiveDemux
++ * demux)
++{
++ return TRUE;
++}
++
+ static GstFlowReturn
+ _src_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
+ {
+@@ -3338,7 +3353,15 @@ gst_adaptive_demux_stream_download_loop (GstAdaptiveDemuxStream * stream)
+ GST_DEBUG_OBJECT (stream->pad, "EOS, checking to stop download loop");
+ /* we push the EOS after releasing the object lock */
+ if (gst_adaptive_demux_is_live (demux)) {
+- if (gst_adaptive_demux_stream_wait_manifest_update (demux, stream)) {
++ GstAdaptiveDemuxClass *demux_class =
++ GST_ADAPTIVE_DEMUX_GET_CLASS (demux);
++
++ /* this might be a fragment download error, refresh the manifest, just in case */
++ if (!demux_class->requires_periodical_playlist_update (demux)) {
++ ret = gst_adaptive_demux_update_manifest (demux);
++ break;
++ } else if (gst_adaptive_demux_stream_wait_manifest_update (demux,
++ stream)) {
+ goto end;
+ }
+ gst_task_stop (stream->download_task);
+diff --git a/gst-libs/gst/adaptivedemux/gstadaptivedemux.h b/gst-libs/gst/adaptivedemux/gstadaptivedemux.h
+index 780f4d93f..9a1a1b7d1 100644
+--- a/gst-libs/gst/adaptivedemux/gstadaptivedemux.h
++++ b/gst-libs/gst/adaptivedemux/gstadaptivedemux.h
+@@ -459,6 +459,20 @@ struct _GstAdaptiveDemuxClass
+ * selected period.
+ */
+ GstClockTime (*get_period_start_time) (GstAdaptiveDemux *demux);
++
++ /**
++ * requires_periodical_playlist_update:
++ * @demux: #GstAdaptiveDemux
++ *
++ * Some adaptive streaming protocols allow the client to download
++ * the playlist once and build up the fragment list based on the
++ * current fragment metadata. For those protocols the demuxer
++ * doesn't need to periodically refresh the playlist. This vfunc
++ * is relevant only for live playback scenarios.
++ *
++ * Return: %TRUE if the playlist needs to be refreshed periodically by the demuxer.
++ */
++ gboolean (*requires_periodical_playlist_update) (GstAdaptiveDemux * demux);
+ };
+
+ GType gst_adaptive_demux_get_type (void);
+--
+2.11.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-smoothstreaming-implement-adaptivedemux-s-get_live_s.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-smoothstreaming-implement-adaptivedemux-s-get_live_s.patch
new file mode 100644
index 000000000..76d29e151
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-smoothstreaming-implement-adaptivedemux-s-get_live_s.patch
@@ -0,0 +1,183 @@
+From e9178fa082116d4bf733b184a8b6951112c17900 Mon Sep 17 00:00:00 2001
+From: Matthew Waters <matthew@centricular.com>
+Date: Thu, 10 Nov 2016 17:18:36 +1100
+Subject: [PATCH] smoothstreaming: implement adaptivedemux's
+ get_live_seek_range()
+
+Allows seeking through the available fragments that are still available
+on the server as specified by the DVRWindowLength attribute in the
+manifest.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=774178
+---
+Upstream-Status: Backport
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+ ext/smoothstreaming/gstmssdemux.c | 13 ++++++
+ ext/smoothstreaming/gstmssmanifest.c | 84 ++++++++++++++++++++++++++++++++++++
+ ext/smoothstreaming/gstmssmanifest.h | 1 +
+ 3 files changed, 98 insertions(+)
+
+diff --git a/ext/smoothstreaming/gstmssdemux.c b/ext/smoothstreaming/gstmssdemux.c
+index 9d0aece2b..b66e19514 100644
+--- a/ext/smoothstreaming/gstmssdemux.c
++++ b/ext/smoothstreaming/gstmssdemux.c
+@@ -138,6 +138,8 @@ gst_mss_demux_get_manifest_update_interval (GstAdaptiveDemux * demux);
+ static GstFlowReturn
+ gst_mss_demux_update_manifest_data (GstAdaptiveDemux * demux,
+ GstBuffer * buffer);
++static gboolean gst_mss_demux_get_live_seek_range (GstAdaptiveDemux * demux,
++ gint64 * start, gint64 * stop);
+
+ static void
+ gst_mss_demux_class_init (GstMssDemuxClass * klass)
+@@ -192,6 +194,8 @@ gst_mss_demux_class_init (GstMssDemuxClass * klass)
+ gst_mss_demux_stream_update_fragment_info;
+ gstadaptivedemux_class->update_manifest_data =
+ gst_mss_demux_update_manifest_data;
++ gstadaptivedemux_class->get_live_seek_range =
++ gst_mss_demux_get_live_seek_range;
+
+ GST_DEBUG_CATEGORY_INIT (mssdemux_debug, "mssdemux", 0, "mssdemux plugin");
+ }
+@@ -659,3 +663,12 @@ gst_mss_demux_update_manifest_data (GstAdaptiveDemux * demux,
+ gst_mss_manifest_reload_fragments (mssdemux->manifest, buffer);
+ return GST_FLOW_OK;
+ }
++
++static gboolean
++gst_mss_demux_get_live_seek_range (GstAdaptiveDemux * demux, gint64 * start,
++ gint64 * stop)
++{
++ GstMssDemux *mssdemux = GST_MSS_DEMUX_CAST (demux);
++
++ return gst_mss_manifest_get_live_seek_range (mssdemux->manifest, start, stop);
++}
+diff --git a/ext/smoothstreaming/gstmssmanifest.c b/ext/smoothstreaming/gstmssmanifest.c
+index 1b72e8de1..317b3cef9 100644
+--- a/ext/smoothstreaming/gstmssmanifest.c
++++ b/ext/smoothstreaming/gstmssmanifest.c
+@@ -42,6 +42,7 @@ GST_DEBUG_CATEGORY_EXTERN (mssdemux_debug);
+
+ #define MSS_PROP_BITRATE "Bitrate"
+ #define MSS_PROP_DURATION "d"
++#define MSS_PROP_DVR_WINDOW_LENGTH "DVRWindowLength"
+ #define MSS_PROP_LANGUAGE "Language"
+ #define MSS_PROP_NUMBER "n"
+ #define MSS_PROP_REPETITIONS "r"
+@@ -94,6 +95,7 @@ struct _GstMssManifest
+ xmlNodePtr xmlrootnode;
+
+ gboolean is_live;
++ gint64 dvr_window;
+
+ GString *protection_system_id;
+ gchar *protection_data;
+@@ -330,6 +332,22 @@ gst_mss_manifest_new (GstBuffer * data)
+ xmlFree (live_str);
+ }
+
++ /* the entire file is always available for non-live streams */
++ if (!manifest->is_live) {
++ manifest->dvr_window = 0;
++ } else {
++ /* if 0, or non-existent, the length is infinite */
++ gchar *dvr_window_str = (gchar *) xmlGetProp (root,
++ (xmlChar *) MSS_PROP_DVR_WINDOW_LENGTH);
++ if (dvr_window_str) {
++ manifest->dvr_window = g_ascii_strtoull (dvr_window_str, NULL, 10);
++ xmlFree (dvr_window_str);
++ if (manifest->dvr_window <= 0) {
++ manifest->dvr_window = 0;
++ }
++ }
++ }
++
+ for (nodeiter = root->children; nodeiter; nodeiter = nodeiter->next) {
+ if (nodeiter->type == XML_ELEMENT_NODE
+ && (strcmp ((const char *) nodeiter->name, "StreamIndex") == 0)) {
+@@ -1406,3 +1424,69 @@ gst_mss_stream_get_lang (GstMssStream * stream)
+ {
+ return stream->lang;
+ }
++
++static GstClockTime
++gst_mss_manifest_get_dvr_window_length_clock_time (GstMssManifest * manifest)
++{
++ gint64 timescale;
++
++ /* the entire file is always available for non-live streams */
++ if (manifest->dvr_window == 0)
++ return GST_CLOCK_TIME_NONE;
++
++ timescale = gst_mss_manifest_get_timescale (manifest);
++ return (GstClockTime) gst_util_uint64_scale_round (manifest->dvr_window,
++ GST_SECOND, timescale);
++}
++
++static gboolean
++gst_mss_stream_get_live_seek_range (GstMssStream * stream, gint64 * start,
++ gint64 * stop)
++{
++ GList *l;
++ GstMssStreamFragment *fragment;
++ guint64 timescale = gst_mss_stream_get_timescale (stream);
++
++ g_return_val_if_fail (stream->active, FALSE);
++
++ /* XXX: assumes all the data in the stream is still available */
++ l = g_list_first (stream->fragments);
++ fragment = (GstMssStreamFragment *) l->data;
++ *start = gst_util_uint64_scale_round (fragment->time, GST_SECOND, timescale);
++
++ l = g_list_last (stream->fragments);
++ fragment = (GstMssStreamFragment *) l->data;
++ *stop = gst_util_uint64_scale_round (fragment->time + fragment->duration *
++ fragment->repetitions, GST_SECOND, timescale);
++
++ return TRUE;
++}
++
++gboolean
++gst_mss_manifest_get_live_seek_range (GstMssManifest * manifest, gint64 * start,
++ gint64 * stop)
++{
++ GSList *iter;
++ gboolean ret = FALSE;
++
++ for (iter = manifest->streams; iter; iter = g_slist_next (iter)) {
++ GstMssStream *stream = iter->data;
++
++ if (stream->active) {
++ /* FIXME: bound this correctly for multiple streams */
++ if (!(ret = gst_mss_stream_get_live_seek_range (stream, start, stop)))
++ break;
++ }
++ }
++
++ if (ret && gst_mss_manifest_is_live (manifest)) {
++ GstClockTime dvr_window =
++ gst_mss_manifest_get_dvr_window_length_clock_time (manifest);
++
++ if (GST_CLOCK_TIME_IS_VALID (dvr_window) && *stop - *start > dvr_window) {
++ *start = *stop - dvr_window;
++ }
++ }
++
++ return ret;
++}
+diff --git a/ext/smoothstreaming/gstmssmanifest.h b/ext/smoothstreaming/gstmssmanifest.h
+index af7419c23..6b7b1f971 100644
+--- a/ext/smoothstreaming/gstmssmanifest.h
++++ b/ext/smoothstreaming/gstmssmanifest.h
+@@ -54,6 +54,7 @@ void gst_mss_manifest_reload_fragments (GstMssManifest * manifest, GstBuffer * d
+ GstClockTime gst_mss_manifest_get_min_fragment_duration (GstMssManifest * manifest);
+ const gchar * gst_mss_manifest_get_protection_system_id (GstMssManifest * manifest);
+ const gchar * gst_mss_manifest_get_protection_data (GstMssManifest * manifest);
++gboolean gst_mss_manifest_get_live_seek_range (GstMssManifest * manifest, gint64 * start, gint64 * stop);
+
+ GstMssStreamType gst_mss_stream_get_type (GstMssStream *stream);
+ GstCaps * gst_mss_stream_get_caps (GstMssStream * stream);
+--
+2.11.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-smoothstreaming-use-the-duration-from-the-list-of-fr.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-smoothstreaming-use-the-duration-from-the-list-of-fr.patch
new file mode 100644
index 000000000..4e5104086
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-smoothstreaming-use-the-duration-from-the-list-of-fr.patch
@@ -0,0 +1,62 @@
+From 0fbee8f37427b88339194b22ba9aa210772a8613 Mon Sep 17 00:00:00 2001
+From: Matthew Waters <matthew@centricular.com>
+Date: Thu, 10 Nov 2016 17:20:27 +1100
+Subject: [PATCH] smoothstreaming: use the duration from the list of fragments
+ if not present in the manifest
+
+Provides a more accurate duration for live streams that may be minutes
+or hours in front of the earliest fragment.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=774178
+---
+Upstream-Status: Backport
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+ ext/smoothstreaming/gstmssmanifest.c | 24 ++++++++++++++++++++++++
+ 1 file changed, 24 insertions(+)
+
+diff --git a/ext/smoothstreaming/gstmssmanifest.c b/ext/smoothstreaming/gstmssmanifest.c
+index 317b3cef9..144bbb42d 100644
+--- a/ext/smoothstreaming/gstmssmanifest.c
++++ b/ext/smoothstreaming/gstmssmanifest.c
+@@ -888,6 +888,7 @@ gst_mss_manifest_get_duration (GstMssManifest * manifest)
+ gchar *duration;
+ guint64 dur = -1;
+
++ /* try the property */
+ duration =
+ (gchar *) xmlGetProp (manifest->xmlrootnode,
+ (xmlChar *) MSS_PROP_STREAM_DURATION);
+@@ -895,6 +896,29 @@ gst_mss_manifest_get_duration (GstMssManifest * manifest)
+ dur = g_ascii_strtoull (duration, NULL, 10);
+ xmlFree (duration);
+ }
++ /* else use the fragment list */
++ if (dur <= 0) {
++ guint64 max_dur = 0;
++ GSList *iter;
++
++ for (iter = manifest->streams; iter; iter = g_slist_next (iter)) {
++ GstMssStream *stream = iter->data;
++
++ if (stream->active) {
++ if (stream->fragments) {
++ GList *l = g_list_last (stream->fragments);
++ GstMssStreamFragment *fragment = (GstMssStreamFragment *) l->data;
++ guint64 frag_dur =
++ fragment->time + fragment->duration * fragment->repetitions;
++ max_dur = MAX (frag_dur, max_dur);
++ }
++ }
++ }
++
++ if (max_dur != 0)
++ dur = max_dur;
++ }
++
+ return dur;
+ }
+
+--
+2.11.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-enable-gldeinterlace-on-OpenGL-ES.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-enable-gldeinterlace-on-OpenGL-ES.patch
deleted file mode 100755
index 51f4eb4b3..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-enable-gldeinterlace-on-OpenGL-ES.patch
+++ /dev/null
@@ -1,634 +0,0 @@
-From 8a0e97f7e672301cc76e394855e8c7a3448b0249 Mon Sep 17 00:00:00 2001
-From: Haihua Hu <jared.hu@nxp.com>
-Date: Fri, 8 Apr 2016 16:47:15 +0800
-Subject: [PATCH 4/6] [glplugin] enable gldeinterlace on OpenGL ES
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-1.Porting the exist deinterlace shader and OpenGL callback
- to be compatible with OpenGL ES.
-2.Add a our blur vertical shader to gldeinterlace.
-3.Add a property named “method” to let user choose which
- deinterlace function to use. Default to choose blur vertical
- method for better performance.
-
-Upstream-Status: Backport [1.9.1]
-
-https://bugzilla.gnome.org/show_bug.cgi?id=764873
-
-Signed-off-by: Haihua Hu <jared.hu@nxp.com>
----
- ext/gl/Makefile.am | 4 +-
- ext/gl/gstgldeinterlace.c | 344 +++++++++++++++++++++++++++++++++++-----------
- ext/gl/gstgldeinterlace.h | 6 +-
- ext/gl/gstopengl.c | 13 +-
- 4 files changed, 275 insertions(+), 92 deletions(-)
-
-diff --git a/ext/gl/Makefile.am b/ext/gl/Makefile.am
-index 5d55f54..46419a7 100644
---- a/ext/gl/Makefile.am
-+++ b/ext/gl/Makefile.am
-@@ -40,6 +40,7 @@ libgstopengl_la_SOURCES = \
- gstglfilterapp.c \
- gstglviewconvert.c \
- gstglstereosplit.c \
-+ gstgldeinterlace.c \
- gstglstereomix.c
-
- noinst_HEADERS = \
-@@ -63,20 +64,19 @@ noinst_HEADERS = \
- gstglfilterapp.h \
- gstglstereosplit.h \
- gstglstereomix.h \
-+ gstgldeinterlace.h \
- gstglviewconvert.h
-
- # full opengl required
- if USE_OPENGL
- libgstopengl_la_SOURCES += \
- gstglfilterglass.c \
-- gstgldeinterlace.c \
- gltestsrc.c \
- gstgltestsrc.c \
- gstglmosaic.c
-
- noinst_HEADERS += \
- gstglfilterglass.h \
-- gstgldeinterlace.h \
- gltestsrc.h \
- gstgltestsrc.h \
- gstglmosaic.h \
-diff --git a/ext/gl/gstgldeinterlace.c b/ext/gl/gstgldeinterlace.c
-index bd0eff0..c1250dc 100644
---- a/ext/gl/gstgldeinterlace.c
-+++ b/ext/gl/gstgldeinterlace.c
-@@ -43,7 +43,8 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
-
- enum
- {
-- PROP_0
-+ PROP_0,
-+ PROP_METHOD
- };
-
- #define DEBUG_INIT \
-@@ -57,17 +58,23 @@ static void gst_gl_deinterlace_set_property (GObject * object,
- static void gst_gl_deinterlace_get_property (GObject * object,
- guint prop_id, GValue * value, GParamSpec * pspec);
-
-+static gboolean gst_gl_deinterlace_start (GstBaseTransform * trans);
- static gboolean gst_gl_deinterlace_reset (GstBaseTransform * trans);
--static gboolean gst_gl_deinterlace_init_shader (GstGLFilter * filter);
-+static gboolean gst_gl_deinterlace_init_fbo (GstGLFilter * filter);
- static gboolean gst_gl_deinterlace_filter (GstGLFilter * filter,
- GstBuffer * inbuf, GstBuffer * outbuf);
- static gboolean gst_gl_deinterlace_filter_texture (GstGLFilter * filter,
- guint in_tex, guint out_tex);
--static void gst_gl_deinterlace_callback (gint width, gint height,
-+static void gst_gl_deinterlace_vfir_callback (gint width, gint height,
-+ guint texture, gpointer stuff);
-+static void gst_gl_deinterlace_greedyh_callback (gint width, gint height,
- guint texture, gpointer stuff);
-
- /* *INDENT-OFF* */
- static const gchar *greedyh_fragment_source =
-+ "#ifdef GL_ES\n"
-+ "precision mediump float;\n"
-+ "#endif\n"
- "uniform sampler2D tex;\n"
- "uniform sampler2D tex_prev;\n"
- "uniform float max_comb;\n"
-@@ -75,35 +82,35 @@ static const gchar *greedyh_fragment_source =
- "uniform float motion_sense;\n"
- "uniform float width;\n"
- "uniform float height;\n"
-+ "varying vec2 v_texcoord;\n"
-
- "void main () {\n"
-- " vec2 texcoord = gl_TexCoord[0].xy;\n"
-- " if (int(mod(texcoord.y * height, 2.0)) == 0) {\n"
-- " gl_FragColor = vec4(texture2D(tex_prev, texcoord).rgb, 1.0);\n"
-+ " if (int(mod(v_texcoord.y * height, 2.0)) == 0) {\n"
-+ " gl_FragColor = vec4(texture2D(tex_prev, v_texcoord).rgb, 1.0);\n"
- " } else {\n"
- " vec2 texcoord_L1_a1, texcoord_L3_a1, texcoord_L1, texcoord_L3, texcoord_L1_1, texcoord_L3_1;\n"
- " vec3 L1_a1, L3_a1, L1, L3, L1_1, L3_1;\n"
-
-- " texcoord_L1 = vec2(texcoord.x, texcoord.y - 1.0 / height);\n"
-- " texcoord_L3 = vec2(texcoord.x, texcoord.y + 1.0 / height);\n"
-+ " texcoord_L1 = vec2(v_texcoord.x, v_texcoord.y - 1.0 / height);\n"
-+ " texcoord_L3 = vec2(v_texcoord.x, v_texcoord.y + 1.0 / height);\n"
- " L1 = texture2D(tex_prev, texcoord_L1).rgb;\n"
- " L3 = texture2D(tex_prev, texcoord_L3).rgb;\n"
-- " if (texcoord.x == 1.0 && texcoord.y == 1.0) {\n"
-+ " if (v_texcoord.x == 1.0 && v_texcoord.y == 1.0) {\n"
- " L1_1 = L1;\n"
- " L3_1 = L3;\n"
- " } else {\n"
-- " texcoord_L1_1 = vec2(texcoord.x + 1.0 / width, texcoord.y - 1.0 / height);\n"
-- " texcoord_L3_1 = vec2(texcoord.x + 1.0 / width, texcoord.y + 1.0 / height);\n"
-+ " texcoord_L1_1 = vec2(v_texcoord.x + 1.0 / width, v_texcoord.y - 1.0 / height);\n"
-+ " texcoord_L3_1 = vec2(v_texcoord.x + 1.0 / width, v_texcoord.y + 1.0 / height);\n"
- " L1_1 = texture2D(tex_prev, texcoord_L1_1).rgb;\n"
- " L3_1 = texture2D(tex_prev, texcoord_L3_1).rgb;\n"
- " }\n"
-
-- " if (int(ceil(texcoord.x + texcoord.y)) == 0) {\n"
-+ " if (int(ceil(v_texcoord.x + v_texcoord.y)) == 0) {\n"
- " L1_a1 = L1;\n"
- " L3_a1 = L3;\n"
- " } else {\n"
-- " texcoord_L1_a1 = vec2(texcoord.x - 1.0 / width, texcoord.y - 1.0 / height);\n"
-- " texcoord_L3_a1 = vec2(texcoord.x - 1.0 / width, texcoord.y + 1.0 / height);\n"
-+ " texcoord_L1_a1 = vec2(v_texcoord.x - 1.0 / width, v_texcoord.y - 1.0 / height);\n"
-+ " texcoord_L3_a1 = vec2(v_texcoord.x - 1.0 / width, v_texcoord.y + 1.0 / height);\n"
- " L1_a1 = texture2D(tex_prev, texcoord_L1_a1).rgb;\n"
- " L3_a1 = texture2D(tex_prev, texcoord_L3_a1).rgb;\n"
- " }\n"
-@@ -113,8 +120,8 @@ static const gchar *greedyh_fragment_source =
- " vec3 avg_1 = (L1_1 + L3_1) / 2.0;\n"
- " vec3 avg_s = (avg_a1 + avg_1) / 2.0;\n"
- " vec3 avg_sc = (avg_s + avg) / 2.0;\n"
-- " vec3 L2 = texture2D(tex, texcoord).rgb;\n"
-- " vec3 LP2 = texture2D(tex_prev, texcoord).rgb;\n"
-+ " vec3 L2 = texture2D(tex, v_texcoord).rgb;\n"
-+ " vec3 LP2 = texture2D(tex_prev, v_texcoord).rgb;\n"
- " vec3 best;\n"
- " if (abs(L2.r - avg_sc.r) < abs(LP2.r - avg_sc.r)) {\n"
- " best.r = L2.r;\n" " } else {\n"
-@@ -144,8 +151,87 @@ static const gchar *greedyh_fragment_source =
- " gl_FragColor = vec4(last, 1.0);\n"
- " }\n"
- "}\n";
-+
-+const gchar *vfir_fragment_source =
-+ "#ifdef GL_ES\n"
-+ "precision mediump float;\n"
-+ "#endif\n"
-+ "uniform sampler2D tex;\n"
-+ "uniform float width;\n"
-+ "uniform float height;\n"
-+ "varying vec2 v_texcoord;\n"
-+ "void main()\n"
-+ "{\n"
-+ " vec2 topcoord, botcoord;\n"
-+ " vec4 cur_color, top_color, bot_color;\n"
-+ " topcoord.x = v_texcoord.x;\n"
-+ " botcoord.x = v_texcoord.x;\n"
-+ " if (v_texcoord.y == 0.0 || v_texcoord.y == 1.0) {\n"
-+ " topcoord.y = v_texcoord.y ;\n"
-+ " botcoord.y = v_texcoord.y ;\n"
-+ " }\n"
-+ " else {\n"
-+ " topcoord.y = v_texcoord.y - 1.0/height;\n"
-+ " botcoord.y = v_texcoord.y + 1.0/height;\n"
-+ " }\n"
-+ " cur_color = texture2D(tex, v_texcoord);\n"
-+ " top_color = texture2D(tex, topcoord);\n"
-+ " bot_color = texture2D(tex, botcoord);\n"
-+ " gl_FragColor = 0.5*cur_color + 0.25*top_color + 0.25*bot_color;\n"
-+ "}";
- /* *INDENT-ON* */
-
-+/* dont' forget to edit the following when a new method is added */
-+typedef enum
-+{
-+ GST_GL_DEINTERLACE_VFIR,
-+ GST_GL_DEINTERLACE_GREEDYH
-+} GstGLDeinterlaceMethod;
-+
-+static const GEnumValue *
-+gst_gl_deinterlace_get_methods (void)
-+{
-+ static const GEnumValue method_types[] = {
-+ {GST_GL_DEINTERLACE_VFIR, "Blur Vertical", "vfir"},
-+ {GST_GL_DEINTERLACE_GREEDYH, "Motion Adaptive: Advanced Detection",
-+ "greedhy"},
-+ {0, NULL, NULL}
-+ };
-+ return method_types;
-+}
-+
-+#define GST_TYPE_GL_DEINTERLACE_METHODS (gst_gl_deinterlace_method_get_type ())
-+static GType
-+gst_gl_deinterlace_method_get_type (void)
-+{
-+ static GType gl_deinterlace_method_type = 0;
-+ if (!gl_deinterlace_method_type) {
-+ gl_deinterlace_method_type =
-+ g_enum_register_static ("GstGLDeinterlaceMethod",
-+ gst_gl_deinterlace_get_methods ());
-+ }
-+ return gl_deinterlace_method_type;
-+}
-+
-+static void
-+gst_gl_deinterlace_set_method (GstGLDeinterlace * deinterlace,
-+ guint method_types)
-+{
-+ switch (method_types) {
-+ case GST_GL_DEINTERLACE_VFIR:
-+ deinterlace->deinterlacefunc = gst_gl_deinterlace_vfir_callback;
-+ deinterlace->current_method = method_types;
-+ break;
-+ case GST_GL_DEINTERLACE_GREEDYH:
-+ deinterlace->deinterlacefunc = gst_gl_deinterlace_greedyh_callback;
-+ deinterlace->current_method = method_types;
-+ break;
-+ default:
-+ g_assert_not_reached ();
-+ break;
-+ }
-+}
-+
- static void
- gst_gl_deinterlace_class_init (GstGLDeinterlaceClass * klass)
- {
-@@ -163,25 +249,60 @@ gst_gl_deinterlace_class_init (GstGLDeinterlaceClass * klass)
- "Deinterlacing based on fragment shaders",
- "Julien Isorce <julien.isorce@mail.com>");
-
-+ g_object_class_install_property (gobject_class,
-+ PROP_METHOD,
-+ g_param_spec_enum ("method",
-+ "Deinterlace Method",
-+ "Select which deinterlace method apply to GL video texture",
-+ GST_TYPE_GL_DEINTERLACE_METHODS,
-+ GST_GL_DEINTERLACE_VFIR, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-+
-+ GST_BASE_TRANSFORM_CLASS (klass)->start = gst_gl_deinterlace_start;
- GST_BASE_TRANSFORM_CLASS (klass)->stop = gst_gl_deinterlace_reset;
-
- GST_GL_FILTER_CLASS (klass)->filter = gst_gl_deinterlace_filter;
- GST_GL_FILTER_CLASS (klass)->filter_texture =
- gst_gl_deinterlace_filter_texture;
-- GST_GL_FILTER_CLASS (klass)->init_fbo = gst_gl_deinterlace_init_shader;
-+ GST_GL_FILTER_CLASS (klass)->init_fbo = gst_gl_deinterlace_init_fbo;
-
-- GST_GL_BASE_FILTER_CLASS (klass)->supported_gl_api = GST_GL_API_OPENGL;
-+ GST_GL_BASE_FILTER_CLASS (klass)->supported_gl_api =
-+ GST_GL_API_OPENGL | GST_GL_API_GLES2 | GST_GL_API_OPENGL3;
- }
-
- static void
- gst_gl_deinterlace_init (GstGLDeinterlace * filter)
- {
-- filter->shader = NULL;
-+ filter->shaderstable = NULL;
-+ filter->deinterlacefunc = gst_gl_deinterlace_vfir_callback;
-+ filter->current_method = GST_GL_DEINTERLACE_VFIR;
- filter->prev_buffer = NULL;
- filter->prev_tex = 0;
- }
-
- static gboolean
-+gst_gl_deinterlace_start (GstBaseTransform * trans)
-+{
-+ GstGLDeinterlace *deinterlace_filter = GST_GL_DEINTERLACE (trans);
-+
-+ deinterlace_filter->shaderstable = g_hash_table_new (g_str_hash, g_str_equal);
-+
-+ return GST_BASE_TRANSFORM_CLASS (parent_class)->start (trans);
-+}
-+
-+static void
-+gst_gl_deinterlace_ghash_func_clean (gpointer key, gpointer value,
-+ gpointer data)
-+{
-+ GstGLShader *shader = (GstGLShader *) value;
-+ GstGLFilter *filter = (GstGLFilter *) data;
-+
-+ //blocking call, wait the opengl thread has destroyed the shader
-+ gst_gl_context_del_shader (GST_GL_BASE_FILTER (filter)->context, shader);
-+
-+ value = NULL;
-+}
-+
-+static gboolean
- gst_gl_deinterlace_reset (GstBaseTransform * trans)
- {
- GstGLDeinterlace *deinterlace_filter = GST_GL_DEINTERLACE (trans);
-@@ -189,10 +310,17 @@ gst_gl_deinterlace_reset (GstBaseTransform * trans)
- gst_buffer_replace (&deinterlace_filter->prev_buffer, NULL);
-
- //blocking call, wait the opengl thread has destroyed the shader
-- if (deinterlace_filter->shader)
-- gst_gl_context_del_shader (GST_GL_BASE_FILTER (trans)->context,
-- deinterlace_filter->shader);
-- deinterlace_filter->shader = NULL;
-+ if (deinterlace_filter->shaderstable) {
-+ /* release shaders in the gl thread */
-+ g_hash_table_foreach (deinterlace_filter->shaderstable,
-+ gst_gl_deinterlace_ghash_func_clean, deinterlace_filter);
-+
-+ /* clean the htable without calling values destructors
-+ * because shaders have been released in the glthread
-+ * through the foreach func */
-+ g_hash_table_unref (deinterlace_filter->shaderstable);
-+ deinterlace_filter->shaderstable = NULL;
-+ }
-
- return GST_BASE_TRANSFORM_CLASS (parent_class)->stop (trans);
- }
-@@ -201,9 +329,12 @@ static void
- gst_gl_deinterlace_set_property (GObject * object, guint prop_id,
- const GValue * value, GParamSpec * pspec)
- {
-- //GstGLDeinterlace *filter = GST_GL_DEINTERLACE (object);
-+ GstGLDeinterlace *filter = GST_GL_DEINTERLACE (object);
-
- switch (prop_id) {
-+ case PROP_METHOD:
-+ gst_gl_deinterlace_set_method (filter, g_value_get_enum (value));
-+ break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
-@@ -214,9 +345,12 @@ static void
- gst_gl_deinterlace_get_property (GObject * object, guint prop_id,
- GValue * value, GParamSpec * pspec)
- {
-- //GstGLDeinterlace *filter = GST_GL_DEINTERLACE (object);
-+ GstGLDeinterlace *filter = GST_GL_DEINTERLACE (object);
-
- switch (prop_id) {
-+ case PROP_METHOD:
-+ g_value_set_enum (value, filter->current_method);
-+ break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
-@@ -224,13 +358,9 @@ gst_gl_deinterlace_get_property (GObject * object, guint prop_id,
- }
-
- static gboolean
--gst_gl_deinterlace_init_shader (GstGLFilter * filter)
-+gst_gl_deinterlace_init_fbo (GstGLFilter * filter)
- {
-- GstGLDeinterlace *deinterlace_filter = GST_GL_DEINTERLACE (filter);
--
-- //blocking call, wait the opengl thread has compiled the shader
-- return gst_gl_context_gen_shader (GST_GL_BASE_FILTER (filter)->context, 0,
-- greedyh_fragment_source, &deinterlace_filter->shader);
-+ return TRUE;
- }
-
- static gboolean
-@@ -241,7 +371,7 @@ gst_gl_deinterlace_filter_texture (GstGLFilter * filter, guint in_tex,
-
- //blocking call, use a FBO
- gst_gl_filter_render_to_target (filter, TRUE, in_tex, out_tex,
-- gst_gl_deinterlace_callback, deinterlace_filter);
-+ deinterlace_filter->deinterlacefunc, deinterlace_filter);
-
- return TRUE;
- }
-@@ -259,36 +389,104 @@ gst_gl_deinterlace_filter (GstGLFilter * filter, GstBuffer * inbuf,
- return TRUE;
- }
-
--//opengl scene, params: input texture (not the output filter->texture)
-+static GstGLShader *
-+gst_gl_deinterlace_get_fragment_shader (GstGLFilter * filter,
-+ const gchar * shader_name, const gchar * shader_source)
-+{
-+ GstGLShader *shader = NULL;
-+ GstGLDeinterlace *deinterlace_filter = GST_GL_DEINTERLACE (filter);
-+ GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
-+
-+ shader = g_hash_table_lookup (deinterlace_filter->shaderstable, shader_name);
-+
-+ if (!shader) {
-+ GError *error = NULL;
-+
-+ if (!(shader = gst_gl_shader_new_link_with_stages (context, &error,
-+ gst_glsl_stage_new_default_vertex (context),
-+ gst_glsl_stage_new_with_string (context, GL_FRAGMENT_SHADER,
-+ GST_GLSL_VERSION_NONE,
-+ GST_GLSL_PROFILE_ES | GST_GLSL_PROFILE_COMPATIBILITY,
-+ shader_source), NULL))) {
-+ GST_ELEMENT_ERROR (deinterlace_filter, RESOURCE, NOT_FOUND,
-+ ("Failed to initialize %s shader", shader_name), (NULL));
-+ }
-+
-+ filter->draw_attr_position_loc =
-+ gst_gl_shader_get_attribute_location (shader, "a_position");
-+ filter->draw_attr_texture_loc =
-+ gst_gl_shader_get_attribute_location (shader, "a_texcoord");
-+ }
-+
-+ g_hash_table_insert (deinterlace_filter->shaderstable, (gchar *) shader_name,
-+ shader);
-+
-+ return shader;
-+}
-+
- static void
--gst_gl_deinterlace_callback (gint width, gint height, guint texture,
-+gst_gl_deinterlace_vfir_callback (gint width, gint height, guint texture,
- gpointer stuff)
- {
-- GstGLDeinterlace *deinterlace_filter = GST_GL_DEINTERLACE (stuff);
-+ GstGLShader *shader;
- GstGLFilter *filter = GST_GL_FILTER (stuff);
-- GstGLFuncs *gl = GST_GL_BASE_FILTER (filter)->context->gl_vtable;
-+ GstGLDeinterlace *deinterlace_filter = GST_GL_DEINTERLACE (filter);
-+ GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
-+ GstGLFuncs *gl = context->gl_vtable;
-+
-+ shader = gst_gl_deinterlace_get_fragment_shader (deinterlace_filter, "vfir",
-+ vfir_fragment_source);
-+
-+ if (!shader)
-+ return;
-+
-+#if GST_GL_HAVE_OPENGL
-+ if (USING_OPENGL (context)) {
-+ gl->MatrixMode (GL_PROJECTION);
-+ gl->LoadIdentity ();
-+ }
-+#endif
-+
-+ gst_gl_shader_use (shader);
-+
-+ gl->ActiveTexture (GL_TEXTURE0);
-+ gl->BindTexture (GL_TEXTURE_2D, texture);
-+
-+ gst_gl_shader_set_uniform_1i (shader, "tex", 0);
-+ gst_gl_shader_set_uniform_1f (shader, "width",
-+ GST_VIDEO_INFO_WIDTH (&filter->out_info));
-+ gst_gl_shader_set_uniform_1f (shader, "height",
-+ GST_VIDEO_INFO_HEIGHT (&filter->out_info));
-+
-+ gst_gl_filter_draw_texture (filter, texture, width, height);
-+}
-+
-+static void
-+gst_gl_deinterlace_greedyh_callback (gint width, gint height, guint texture,
-+ gpointer stuff)
-+{
-+ GstGLShader *shader;
-+ GstGLFilter *filter = GST_GL_FILTER (stuff);
-+ GstGLDeinterlace *deinterlace_filter = GST_GL_DEINTERLACE (filter);
-+ GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
-+ GstGLFuncs *gl = context->gl_vtable;
- guint temp;
-
-- GLfloat verts[] = { -1.0, -1.0,
-- 1.0, -1.0,
-- 1.0, 1.0,
-- -1.0, 1.0
-- };
-- GLfloat texcoords0[] = { 0.0f, 0.0f,
-- 1.0f, 0.0f,
-- 1.0f, 1.0f,
-- 0.0f, 1.0f
-- };
-- GLfloat texcoords1[] = { 0.0f, 0.0f,
-- 1.0f, 0.0f,
-- 1.0f, 1.0f,
-- 0.0f, 1.0f
-- };
-+ shader =
-+ gst_gl_deinterlace_get_fragment_shader (deinterlace_filter, "greedhy",
-+ greedyh_fragment_source);
-
-- gl->MatrixMode (GL_PROJECTION);
-- gl->LoadIdentity ();
-+ if (!shader)
-+ return;
-
-- gst_gl_shader_use (deinterlace_filter->shader);
-+#if GST_GL_HAVE_OPENGL
-+ if (USING_OPENGL (context)) {
-+ gl->MatrixMode (GL_PROJECTION);
-+ gl->LoadIdentity ();
-+ }
-+#endif
-+
-+ gst_gl_shader_use (shader);
-
- if (G_UNLIKELY (deinterlace_filter->prev_tex == 0)) {
- gst_gl_context_gen_texture (GST_GL_BASE_FILTER (filter)->context,
-@@ -298,44 +496,24 @@ gst_gl_deinterlace_callback (gint width, gint height, guint texture,
- GST_VIDEO_INFO_HEIGHT (&filter->out_info));
- } else {
- gl->ActiveTexture (GL_TEXTURE1);
-- gst_gl_shader_set_uniform_1i (deinterlace_filter->shader, "tex_prev", 1);
-+ gst_gl_shader_set_uniform_1i (shader, "tex_prev", 1);
- gl->BindTexture (GL_TEXTURE_2D, deinterlace_filter->prev_tex);
- }
-
- gl->ActiveTexture (GL_TEXTURE0);
-- gst_gl_shader_set_uniform_1i (deinterlace_filter->shader, "tex", 0);
-+ gl->BindTexture (GL_TEXTURE_2D, texture);
-
-- gst_gl_shader_set_uniform_1f (deinterlace_filter->shader, "max_comb",
-- 5.0f / 255.0f);
-- gst_gl_shader_set_uniform_1f (deinterlace_filter->shader, "motion_threshold",
-- 25.0f / 255.0f);
-- gst_gl_shader_set_uniform_1f (deinterlace_filter->shader, "motion_sense",
-- 30.0f / 255.0f);
-+ gst_gl_shader_set_uniform_1i (shader, "tex", 0);
-+ gst_gl_shader_set_uniform_1f (shader, "max_comb", 5.0f / 255.0f);
-+ gst_gl_shader_set_uniform_1f (shader, "motion_threshold", 25.0f / 255.0f);
-+ gst_gl_shader_set_uniform_1f (shader, "motion_sense", 30.0f / 255.0f);
-
-- gst_gl_shader_set_uniform_1f (deinterlace_filter->shader, "width",
-+ gst_gl_shader_set_uniform_1f (shader, "width",
- GST_VIDEO_INFO_WIDTH (&filter->out_info));
-- gst_gl_shader_set_uniform_1f (deinterlace_filter->shader, "height",
-+ gst_gl_shader_set_uniform_1f (shader, "height",
- GST_VIDEO_INFO_HEIGHT (&filter->out_info));
-
-- gl->ClientActiveTexture (GL_TEXTURE0);
--
-- gl->EnableClientState (GL_TEXTURE_COORD_ARRAY);
-- gl->EnableClientState (GL_VERTEX_ARRAY);
--
-- gl->VertexPointer (2, GL_FLOAT, 0, &verts);
-- gl->TexCoordPointer (2, GL_FLOAT, 0, &texcoords0);
--
-- gl->ClientActiveTexture (GL_TEXTURE1);
-- gl->EnableClientState (GL_TEXTURE_COORD_ARRAY);
-- gl->TexCoordPointer (2, GL_FLOAT, 0, &texcoords1);
--
-- gl->DrawArrays (GL_TRIANGLE_FAN, 0, 4);
--
-- gl->DisableClientState (GL_VERTEX_ARRAY);
-- gl->DisableClientState (GL_TEXTURE_COORD_ARRAY);
--
-- gl->ClientActiveTexture (GL_TEXTURE0);
-- gl->DisableClientState (GL_TEXTURE_COORD_ARRAY);
-+ gst_gl_filter_draw_texture (filter, texture, width, height);
-
- if (texture == filter->in_tex_id) {
- temp = filter->in_tex_id;
-diff --git a/ext/gl/gstgldeinterlace.h b/ext/gl/gstgldeinterlace.h
-index a81a2e7..58a9c0c 100644
---- a/ext/gl/gstgldeinterlace.h
-+++ b/ext/gl/gstgldeinterlace.h
-@@ -38,9 +38,13 @@ typedef struct _GstGLDeinterlaceClass GstGLDeinterlaceClass;
- struct _GstGLDeinterlace
- {
- GstGLFilter filter;
-- GstGLShader *shader;
-+
-+ GLCB deinterlacefunc;
-+ GHashTable *shaderstable;
- GstBuffer *prev_buffer;
- guint prev_tex;
-+
-+ gint current_method;
- };
-
- struct _GstGLDeinterlaceClass
-diff --git a/ext/gl/gstopengl.c b/ext/gl/gstopengl.c
-index 50676c4..135862a 100644
---- a/ext/gl/gstopengl.c
-+++ b/ext/gl/gstopengl.c
-@@ -62,6 +62,7 @@
- #include "gstglstereosplit.h"
- #include "gstglstereomix.h"
- #include "gstglviewconvert.h"
-+#include "gstgldeinterlace.h"
-
- #if HAVE_GRAPHENE
- #include "gstgltransformation.h"
-@@ -77,7 +78,6 @@
- #include "gstgltestsrc.h"
- #include "gstglfilterglass.h"
- /* #include "gstglfilterreflectedscreen.h" */
--#include "gstgldeinterlace.h"
- #include "gstglmosaic.h"
- #if HAVE_PNG
- #include "gstgldifferencematte.h"
-@@ -226,6 +226,12 @@ plugin_init (GstPlugin * plugin)
- GST_RANK_NONE, GST_TYPE_GL_STEREO_MIX)) {
- return FALSE;
- }
-+
-+ if (!gst_element_register (plugin, "gldeinterlace",
-+ GST_RANK_NONE, GST_TYPE_GL_DEINTERLACE)) {
-+ return FALSE;
-+ }
-+
- #if HAVE_JPEG
- #if HAVE_PNG
- if (!gst_element_register (plugin, "gloverlay",
-@@ -250,11 +256,6 @@ plugin_init (GstPlugin * plugin)
- return FALSE;
- }
- #endif
-- if (!gst_element_register (plugin, "gldeinterlace",
-- GST_RANK_NONE, GST_TYPE_GL_DEINTERLACE)) {
-- return FALSE;
-- }
--
- if (!gst_element_register (plugin, "glmosaic",
- GST_RANK_NONE, GST_TYPE_GL_MOSAIC)) {
- return FALSE;
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-glcolorconvert-implement-multiple-render-targets-for.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-glcolorconvert-implement-multiple-render-targets-for.patch
deleted file mode 100755
index 31d8e052f..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-glcolorconvert-implement-multiple-render-targets-for.patch
+++ /dev/null
@@ -1,244 +0,0 @@
-From 127e517568490fc147211d8b2fb4da01cecbbeb5 Mon Sep 17 00:00:00 2001
-From: Matthew Waters <matthew@centricular.com>
-Date: Thu, 31 Mar 2016 19:50:28 +1100
-Subject: [PATCH 5/6] glcolorconvert: implement multiple render targets for
- GLES3
-
-There are numerous slight differences required between Desktop GL and GLES3 for
-multiple render targets.
-
-1. gl_FragData doesn't exist at all and one is required to use
- 'layout (location = ?) out ...' instead.
-2. gl_FragColor doesn't exist, same as 1
-3. texture2D() has been deprecated
-
-Fortunately most of these have been taken care of with GL3 and the shader
-mangling already exists so just expand the conditions they are used in. The
-gl_FragData issue requires a new mangle pass though. We also use this new
-pass on desktop GL for consistency.
-
-Upstream-Status: Backport [1.9.1]
-
----
- gst-libs/gst/gl/gstglcolorconvert.c | 125 ++++++++++++++++++++++++++++--------
- 1 file changed, 99 insertions(+), 26 deletions(-)
-
-diff --git a/gst-libs/gst/gl/gstglcolorconvert.c b/gst-libs/gst/gl/gstglcolorconvert.c
-index 490ec54..f478faa 100644
---- a/gst-libs/gst/gl/gstglcolorconvert.c
-+++ b/gst-libs/gst/gl/gstglcolorconvert.c
-@@ -1802,10 +1802,11 @@ _mangle_sampler_type (const gchar * str, GstGLTextureTarget from,
-
- static gchar *
- _mangle_varying_attribute (const gchar * str, guint shader_type,
-- GstGLAPI gl_api)
-+ GstGLAPI gl_api, guint gl_major, guint gl_minor)
- {
-- if (gl_api & GST_GL_API_OPENGL3) {
-- if (shader_type == GL_VERTEX_SHADER) {
-+ if (shader_type == GL_VERTEX_SHADER) {
-+ if ((gl_api & GST_GL_API_OPENGL3) || (gl_api & GST_GL_API_GLES2
-+ && gl_major >= 3)) {
- gchar *tmp, *tmp2;
- GRegex *regex;
-
-@@ -1821,7 +1822,10 @@ _mangle_varying_attribute (const gchar * str, guint shader_type,
-
- g_free (tmp);
- return tmp2;
-- } else if (shader_type == GL_FRAGMENT_SHADER) {
-+ }
-+ } else if (shader_type == GL_FRAGMENT_SHADER) {
-+ if ((gl_api & GST_GL_API_OPENGL3) || (gl_api & GST_GL_API_GLES2
-+ && gl_major > 3)) {
- gchar *tmp;
- GRegex *regex;
-
-@@ -1837,28 +1841,48 @@ _mangle_varying_attribute (const gchar * str, guint shader_type,
- }
-
- static gchar *
--_mangle_frag_color (const gchar * str)
-+_mangle_frag_color_data (const gchar * str)
- {
- GRegex *regex;
-- gchar *ret;
-+ gchar *ret, *tmp;
-
- regex = g_regex_new ("gl_FragColor", 0, 0, NULL);
- ret = g_regex_replace_literal (regex, str, -1, 0, "fragColor", 0, NULL);
- g_regex_unref (regex);
-
-+ tmp = ret;
-+ /* search and replace 'gl_FragData[NUM]' into fragColor_NUM */
-+ regex = g_regex_new ("gl_FragData\\[(\\d+)\\]", 0, 0, NULL);
-+ ret = g_regex_replace (regex, tmp, -1, 0, "fragColor_\\1", 0, NULL);
-+ g_regex_unref (regex);
-+ g_free (tmp);
-+
- return ret;
- }
-
- static void
--_mangle_version_profile_from_gl_api (GstGLAPI gl_api, GstGLSLVersion * version,
-- GstGLSLProfile * profile)
-+_mangle_version_profile_from_gl_api (GstGLAPI gl_api, gint gl_major,
-+ gint gl_minor, GstGLSLVersion * version, GstGLSLProfile * profile)
- {
-+ *version = GST_GLSL_VERSION_NONE;
-+ *profile = GST_GLSL_PROFILE_NONE;
-+
- if (gl_api & GST_GL_API_OPENGL3) {
-- *version = GST_GLSL_VERSION_150;
-- *profile = GST_GLSL_PROFILE_NONE;
-+ if (gl_major > 3 || gl_minor >= 3) {
-+ *version = GST_GLSL_VERSION_330;
-+ *profile = GST_GLSL_PROFILE_CORE;
-+ } else {
-+ *version = GST_GLSL_VERSION_150;
-+ *profile = GST_GLSL_PROFILE_NONE;
-+ }
- } else if (gl_api & GST_GL_API_GLES2) {
-- *version = GST_GLSL_VERSION_100;
-- *profile = GST_GLSL_PROFILE_ES;
-+ if (gl_major >= 3) {
-+ *version = GST_GLSL_VERSION_300;
-+ *profile = GST_GLSL_PROFILE_ES;
-+ } else if (gl_major >= 2) {
-+ *version = GST_GLSL_VERSION_100;
-+ *profile = GST_GLSL_PROFILE_ES;
-+ }
- } else if (gl_api & GST_GL_API_OPENGL) {
- *version = GST_GLSL_VERSION_110;
- *profile = GST_GLSL_PROFILE_COMPATIBILITY;
-@@ -1867,22 +1891,28 @@ _mangle_version_profile_from_gl_api (GstGLAPI gl_api, GstGLSLVersion * version,
-
- static gchar *
- _mangle_shader (const gchar * str, guint shader_type, GstGLTextureTarget from,
-- GstGLTextureTarget to, GstGLAPI gl_api, GstGLSLVersion * version,
-- GstGLSLProfile * profile)
-+ GstGLTextureTarget to, GstGLAPI gl_api, gint gl_major, gint gl_minor,
-+ GstGLSLVersion * version, GstGLSLProfile * profile)
- {
- gchar *tmp, *tmp2;
-
-+ _mangle_version_profile_from_gl_api (gl_api, gl_major, gl_minor, version,
-+ profile);
- tmp = _mangle_texture_access (str, from, to, gl_api);
- tmp2 = _mangle_sampler_type (tmp, from, to);
- g_free (tmp);
-- tmp = _mangle_varying_attribute (tmp2, shader_type, gl_api);
-+ tmp =
-+ _mangle_varying_attribute (tmp2, shader_type, gl_api, gl_major, gl_minor);
- g_free (tmp2);
-- if (shader_type == GL_FRAGMENT_SHADER && gl_api & GST_GL_API_OPENGL3) {
-- tmp2 = _mangle_frag_color (tmp);
-- g_free (tmp);
-- tmp = tmp2;
-+ if (shader_type == GL_FRAGMENT_SHADER) {
-+ if ((*profile == GST_GLSL_PROFILE_ES && *version >= GST_GLSL_VERSION_300)
-+ || (*profile == GST_GLSL_PROFILE_CORE
-+ && *version >= GST_GLSL_VERSION_150)) {
-+ tmp2 = _mangle_frag_color_data (tmp);
-+ g_free (tmp);
-+ tmp = tmp2;
-+ }
- }
-- _mangle_version_profile_from_gl_api (gl_api, version, profile);
- return tmp;
- }
-
-@@ -1899,15 +1929,18 @@ _create_shader (GstGLColorConvert * convert)
- const gchar *strings[2];
- GError *error = NULL;
- GstGLAPI gl_api;
-+ gint gl_major, gl_minor;
- int i;
-
- gl_api = gst_gl_context_get_gl_api (convert->context);
-+ gst_gl_context_get_gl_version (convert->context, &gl_major, &gl_minor);
-
- ret = gst_gl_shader_new (convert->context);
-
- tmp =
- _mangle_shader (text_vertex_shader, GL_VERTEX_SHADER, info->templ->target,
-- convert->priv->from_texture_target, gl_api, &version, &profile);
-+ convert->priv->from_texture_target, gl_api, gl_major, gl_minor, &version,
-+ &profile);
-
- tmp1 = gst_glsl_version_profile_to_string (version, profile);
- version_str = g_strdup_printf ("#version %s\n", tmp1);
-@@ -1945,9 +1978,37 @@ _create_shader (GstGLColorConvert * convert)
- if (info->templ->uniforms)
- g_string_append (str, info->templ->uniforms);
-
-- if (gl_api & GST_GL_API_OPENGL3) {
-- g_string_append_c (str, '\n');
-- g_string_append (str, "out vec4 fragColor;\n");
-+ g_string_append_c (str, '\n');
-+
-+ /* GL 3.3+ and GL ES 3.x */
-+ if ((profile == GST_GLSL_PROFILE_CORE && version >= GST_GLSL_VERSION_330)
-+ || (profile == GST_GLSL_PROFILE_ES && version >= GST_GLSL_VERSION_300)) {
-+ if (info->out_n_textures > 1) {
-+ gint i;
-+
-+ for (i = 0; i < info->out_n_textures; i++) {
-+ g_string_append_printf (str,
-+ "layout(location = %d) out vec4 fragColor_%d;\n", i, i);
-+ }
-+ } else {
-+ g_string_append (str, "layout (location = 0) out vec4 fragColor;\n");
-+ }
-+ } else if (profile == GST_GLSL_PROFILE_CORE
-+ && version >= GST_GLSL_VERSION_150) {
-+ /* no layout specifiers, use glBindFragDataLocation instead */
-+ if (info->out_n_textures > 1) {
-+ gint i;
-+
-+ for (i = 0; i < info->out_n_textures; i++) {
-+ gchar *var_name = g_strdup_printf ("fragColor_%d", i);
-+ g_string_append_printf (str, "out vec4 %s;\n", var_name);
-+ gst_gl_shader_bind_frag_data_location (ret, i, var_name);
-+ g_free (var_name);
-+ }
-+ } else {
-+ g_string_append (str, "out vec4 fragColor;\n");
-+ gst_gl_shader_bind_frag_data_location (ret, 0, "fragColor");
-+ }
- }
-
- for (i = 0; i < MAX_FUNCTIONS; i++) {
-@@ -1959,7 +2020,19 @@ _create_shader (GstGLColorConvert * convert)
- g_string_append_c (str, '\n');
- }
-
-- g_string_append (str, "\nvarying vec2 v_texcoord;\nvoid main (void) {\n");
-+ {
-+ const gchar *varying = NULL;
-+
-+ if ((profile == GST_GLSL_PROFILE_ES && version >= GST_GLSL_VERSION_300)
-+ || (profile == GST_GLSL_PROFILE_CORE
-+ && version >= GST_GLSL_VERSION_150)) {
-+ varying = "in";
-+ } else {
-+ varying = "varying";
-+ }
-+ g_string_append_printf (str, "\n%s vec2 v_texcoord;\nvoid main (void) {\n",
-+ varying);
-+ }
- if (info->frag_body) {
- g_string_append (str, "vec2 texcoord;\n");
- if (convert->priv->from_texture_target == GST_GL_TEXTURE_TARGET_RECTANGLE
-@@ -1975,7 +2048,7 @@ _create_shader (GstGLColorConvert * convert)
- tmp = g_string_free (str, FALSE);
- info->frag_prog = _mangle_shader (tmp, GL_FRAGMENT_SHADER,
- info->templ->target, convert->priv->from_texture_target, gl_api,
-- &version, &profile);
-+ gl_major, gl_minor, &version, &profile);
- g_free (tmp);
-
- strings[1] = info->frag_prog;
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-glcolorconvert-don-t-use-the-predefined-variable-nam.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-glcolorconvert-don-t-use-the-predefined-variable-nam.patch
deleted file mode 100755
index b75f402d8..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-glcolorconvert-don-t-use-the-predefined-variable-nam.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From b069672ace2b762f400ca6d318571cbedf5141f2 Mon Sep 17 00:00:00 2001
-From: Matthew Waters <matthew@centricular.com>
-Date: Thu, 31 Mar 2016 20:00:37 +1100
-Subject: [PATCH 1/3] glcolorconvert: don't use the predefined variable name
- sample
-
-Using 'sample' as a variable name is an error in GLES3
-
-Upstream-Status: Backport [1.9.1]
----
- gst-libs/gst/gl/gstglcolorconvert.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gst-libs/gst/gl/gstglcolorconvert.c b/gst-libs/gst/gl/gstglcolorconvert.c
-index f478faa..c23624f 100644
---- a/gst-libs/gst/gl/gstglcolorconvert.c
-+++ b/gst-libs/gst/gl/gstglcolorconvert.c
-@@ -261,9 +261,9 @@ static const struct shader_templ templ_RGB_to_PLANAR_YUV =
- " for (int j = 0; j < int(chroma_sampling.y); j++) {\n"
- " int n = (i+1)*(j+1);\n"
- " delta.y = float(j);\n"
-- " vec4 sample = texture2D(tex, (chroma_pos + delta) / unnormalization).%c%c%c%c;\n"
-+ " vec4 s = texture2D(tex, (chroma_pos + delta) / unnormalization).%c%c%c%c;\n"
- /* rolling average */
-- " uv_texel = (float(n-1) * uv_texel + sample) / float(n);\n"
-+ " uv_texel = (float(n-1) * uv_texel + s) / float(n);\n"
- " }\n"
- " }\n"
- "}\n"
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-glshader-add-glBindFragDataLocation.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-glshader-add-glBindFragDataLocation.patch
deleted file mode 100755
index 57e9d1a46..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-glshader-add-glBindFragDataLocation.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From 38221080181229d520522a20bcb1663ca19f7aff Mon Sep 17 00:00:00 2001
-From: Matthew Waters <matthew@centricular.com>
-Date: Thu, 31 Mar 2016 19:25:32 +1100
-Subject: [PATCH 2/3] glshader: add glBindFragDataLocation
-
-There are some cases where it's needed for binding in/out variables in shaders.
-e.g. glsl 150 (gl 3.2) doesn't support the 'layout (location = ?)' specifiers in
-the shader source so we have to bind them ourselves.
-
-Upstream-Status: Backport [1.9.1]
----
- gst-libs/gst/gl/glprototypes/shaders.h | 10 ++++++++++
- gst-libs/gst/gl/gstglshader.c | 20 ++++++++++++++++++++
- gst-libs/gst/gl/gstglshader.h | 1 +
- 3 files changed, 31 insertions(+)
-
-diff --git a/gst-libs/gst/gl/glprototypes/shaders.h b/gst-libs/gst/gl/glprototypes/shaders.h
-index 817e479..6d828db 100644
---- a/gst-libs/gst/gl/glprototypes/shaders.h
-+++ b/gst-libs/gst/gl/glprototypes/shaders.h
-@@ -362,3 +362,13 @@ GST_GL_EXT_FUNCTION (void, UniformMatrix3x4fv,
- GST_GL_EXT_FUNCTION (void, UniformMatrix4x3fv,
- (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value))
- GST_GL_EXT_END ()
-+
-+GST_GL_EXT_BEGIN (bind_frag_data,
-+ GST_GL_API_OPENGL | GST_GL_API_OPENGL3,
-+ 3, 0,
-+ 255, 255,
-+ "\0",
-+ "\0")
-+GST_GL_EXT_FUNCTION (void, BindFragDataLocation,
-+ (GLuint program, GLuint index, const GLchar * name))
-+GST_GL_EXT_END ()
-diff --git a/gst-libs/gst/gl/gstglshader.c b/gst-libs/gst/gl/gstglshader.c
-index 9d96784..9f09236 100644
---- a/gst-libs/gst/gl/gstglshader.c
-+++ b/gst-libs/gst/gl/gstglshader.c
-@@ -1306,3 +1306,23 @@ gst_gl_shader_bind_attribute_location (GstGLShader * shader, GLuint index,
-
- gl->BindAttribLocation (priv->program_handle, index, name);
- }
-+
-+void
-+gst_gl_shader_bind_frag_data_location (GstGLShader * shader,
-+ guint index, const gchar * name)
-+{
-+ GstGLShaderPrivate *priv;
-+ GstGLFuncs *gl;
-+
-+ g_return_if_fail (shader != NULL);
-+ if (!_ensure_program (shader))
-+ g_return_if_fail (shader->priv->program_handle);
-+ priv = shader->priv;
-+ gl = shader->context->gl_vtable;
-+ g_return_if_fail (gl->BindFragDataLocation);
-+
-+ GST_TRACE_OBJECT (shader, "binding program %i frag data \'%s\' location %i",
-+ (int) priv->program_handle, name, index);
-+
-+ gl->BindFragDataLocation (priv->program_handle, index, name);
-+}
-diff --git a/gst-libs/gst/gl/gstglshader.h b/gst-libs/gst/gl/gstglshader.h
-index 21410e2..2200b89 100644
---- a/gst-libs/gst/gl/gstglshader.h
-+++ b/gst-libs/gst/gl/gstglshader.h
-@@ -104,6 +104,7 @@ void gst_gl_shader_set_uniform_matrix_4x3fv (GstGLShader *shader, const gchar *n
-
- gint gst_gl_shader_get_attribute_location (GstGLShader *shader, const gchar *name);
- void gst_gl_shader_bind_attribute_location (GstGLShader * shader, guint index, const gchar * name);
-+void gst_gl_shader_bind_frag_data_location (GstGLShader * shader, guint index, const gchar * name);
-
- G_END_DECLS
-
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-glcolorconvert-GLES3-deprecates-texture2D-and-it-doe.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-glcolorconvert-GLES3-deprecates-texture2D-and-it-doe.patch
deleted file mode 100755
index 79ef4c81a..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-glcolorconvert-GLES3-deprecates-texture2D-and-it-doe.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 764fd69f8482eca9f925cefe72ebae090ae59d43 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
-Date: Tue, 19 Apr 2016 19:27:33 +0300
-Subject: [PATCH 3/3] glcolorconvert: GLES3 deprecates texture2D() and it does
- not work at all in newer versions than 3.3
-
-Use the newer texture() function instead. This fixes glimagesink and other
-things on various Android devices.
-
-Upstream-Status: Backport [1.9.1]
-
-https://bugzilla.gnome.org/show_bug.cgi?id=765266
----
- gst-libs/gst/gl/gstglcolorconvert.c | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/gst-libs/gst/gl/gstglcolorconvert.c b/gst-libs/gst/gl/gstglcolorconvert.c
-index c23624f..f472d5d 100644
---- a/gst-libs/gst/gl/gstglcolorconvert.c
-+++ b/gst-libs/gst/gl/gstglcolorconvert.c
-@@ -1716,7 +1716,7 @@ _unbind_buffer (GstGLColorConvert * convert)
-
- static gchar *
- _mangle_texture_access (const gchar * str, GstGLTextureTarget from,
-- GstGLTextureTarget to, GstGLAPI gl_api)
-+ GstGLTextureTarget to, GstGLAPI gl_api, guint gl_major, guint gl_minor)
- {
- const gchar *from_str = NULL, *to_str = NULL;
- gchar *ret, *tmp;
-@@ -1730,7 +1730,8 @@ _mangle_texture_access (const gchar * str, GstGLTextureTarget from,
- if (from == GST_GL_TEXTURE_TARGET_EXTERNAL_OES)
- from_str = "texture2D";
-
-- if (gl_api & GST_GL_API_OPENGL3) {
-+ if ((gl_api & GST_GL_API_OPENGL3) || (gl_api & GST_GL_API_GLES2
-+ && gl_major >= 3)) {
- to_str = "texture";
- } else {
- if (to == GST_GL_TEXTURE_TARGET_2D)
-@@ -1898,7 +1899,7 @@ _mangle_shader (const gchar * str, guint shader_type, GstGLTextureTarget from,
-
- _mangle_version_profile_from_gl_api (gl_api, gl_major, gl_minor, version,
- profile);
-- tmp = _mangle_texture_access (str, from, to, gl_api);
-+ tmp = _mangle_texture_access (str, from, to, gl_api, gl_major, gl_minor);
- tmp2 = _mangle_sampler_type (tmp, from, to);
- g_free (tmp);
- tmp =
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-gl-implement-GstGLMemoryEGL.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-gl-implement-GstGLMemoryEGL.patch
deleted file mode 100644
index a67381cfe..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-gl-implement-GstGLMemoryEGL.patch
+++ /dev/null
@@ -1,495 +0,0 @@
-From 806bbe75b0b6947f589bce3960c28fee51b5c6c2 Mon Sep 17 00:00:00 2001
-From: Gwang Yoon Hwang <yoon@igalia.com>
-Date: Thu, 21 Jan 2016 22:18:17 +0900
-Subject: [PATCH] gl: implement GstGLMemoryEGL
-
-Because current GstEGLImageMemory does not inherit GstGLMemory, GLUpload
-allocates additional GLMemory and upload the decoded contents from the decoder
-which uses EGLImage (e.g. gst-omx in RPi).
-
-This work adds GstGLMemoryEGL to avoid this overhead. Decoders allocate
-GstGLMemoryEGL and decode its contents to the EGLImage of GstGLMemoryEGL. And
-GLUpload uses this memory without allocation of additional textures and blit
-operations.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=760916
----
-Upstream-Status: Backport
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
- gst-libs/gst/gl/egl/Makefile.am | 2 +
- gst-libs/gst/gl/egl/gstgldisplay_egl.c | 2 +
- gst-libs/gst/gl/egl/gstglmemoryegl.c | 241 +++++++++++++++++++++++++++++++++
- gst-libs/gst/gl/egl/gstglmemoryegl.h | 108 +++++++++++++++
- gst-libs/gst/gl/gstgl_fwd.h | 4 +
- gst-libs/gst/gl/gstgldisplay.c | 2 +
- gst-libs/gst/gl/gstglupload.c | 8 ++
- 7 files changed, 367 insertions(+)
- create mode 100644 gst-libs/gst/gl/egl/gstglmemoryegl.c
- create mode 100644 gst-libs/gst/gl/egl/gstglmemoryegl.h
-
-diff --git a/gst-libs/gst/gl/egl/Makefile.am b/gst-libs/gst/gl/egl/Makefile.am
-index b808178..878f16c 100644
---- a/gst-libs/gst/gl/egl/Makefile.am
-+++ b/gst-libs/gst/gl/egl/Makefile.am
-@@ -5,6 +5,7 @@ noinst_LTLIBRARIES = libgstgl-egl.la
- libgstgl_egl_la_SOURCES = \
- gstgldisplay_egl.c \
- gstglcontext_egl.c \
-+ gstglmemoryegl.c \
- gsteglimagememory.c
-
- noinst_HEADERS =
-@@ -13,6 +14,7 @@ libgstgl_eglincludedir = $(includedir)/gstreamer-@GST_API_VERSION@/gst/gl/egl
- libgstgl_eglinclude_HEADERS = \
- gstgldisplay_egl.h \
- gstglcontext_egl.h \
-+ gstglmemoryegl.h \
- gsteglimagememory.h \
- gstegl.h
-
-diff --git a/gst-libs/gst/gl/egl/gstgldisplay_egl.c b/gst-libs/gst/gl/egl/gstgldisplay_egl.c
-index 9acf4f0..20816c2 100644
---- a/gst-libs/gst/gl/egl/gstgldisplay_egl.c
-+++ b/gst-libs/gst/gl/egl/gstgldisplay_egl.c
-@@ -24,6 +24,7 @@
-
- #include <gst/gl/egl/gstgldisplay_egl.h>
- #include <gst/gl/egl/gsteglimagememory.h>
-+#include <gst/gl/egl/gstglmemoryegl.h>
-
- GST_DEBUG_CATEGORY_STATIC (gst_gl_display_debug);
- #define GST_CAT_DEFAULT gst_gl_display_debug
-@@ -51,6 +52,7 @@ gst_gl_display_egl_init (GstGLDisplayEGL * display_egl)
- display_egl->foreign_display = FALSE;
-
- gst_egl_image_memory_init ();
-+ gst_gl_memory_egl_init_once ();
- }
-
- static void
-diff --git a/gst-libs/gst/gl/egl/gstglmemoryegl.c b/gst-libs/gst/gl/egl/gstglmemoryegl.c
-new file mode 100644
-index 0000000..03cf432
---- /dev/null
-+++ b/gst-libs/gst/gl/egl/gstglmemoryegl.c
-@@ -0,0 +1,241 @@
-+/*
-+ * GStreamer
-+ * Copyright (C) 2012 Collabora Ltd.
-+ * @author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
-+ * Copyright (C) 2014 Julien Isorce <julien.isorce@gmail.com>
-+ * Copyright (C) 2015 Igalia
-+ * Author: Gwang Yoon Hwang <yoon@igalia.com>
-+ *
-+ * This library is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Library General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2 of the License, or (at your option) any later version.
-+ *
-+ * This library is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ * Library General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Library General Public
-+ * License along with this library; if not, write to the
-+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
-+ * Boston, MA 02110-1301, USA.
-+ */
-+
-+#ifdef HAVE_CONFIG_H
-+#include "config.h"
-+#endif
-+
-+#include <string.h>
-+
-+#include <gst/gl/egl/gstglmemoryegl.h>
-+
-+static GstAllocator *_gl_memory_egl_allocator;
-+
-+GST_DEBUG_CATEGORY_STATIC (GST_CAT_GL_MEMORY);
-+#define GST_CAT_DEFAULT GST_CAT_GL_MEMORY
-+
-+#define parent_class gst_gl_memory_egl_allocator_parent_class
-+G_DEFINE_TYPE (GstGLMemoryEGLAllocator, gst_gl_memory_egl_allocator,
-+ GST_TYPE_GL_MEMORY_ALLOCATOR);
-+
-+gboolean
-+gst_is_gl_memory_egl (GstMemory * mem)
-+{
-+ return mem != NULL && mem->allocator != NULL
-+ && g_type_is_a (G_OBJECT_TYPE (mem->allocator),
-+ GST_TYPE_GL_MEMORY_EGL_ALLOCATOR);
-+}
-+
-+static GstGLMemoryEGL *
-+_gl_mem_get_parent (GstGLMemoryEGL * gl_mem)
-+{
-+ GstGLMemoryEGL *parent = (GstGLMemoryEGL *)gl_mem->mem.mem.mem.parent;
-+ return parent ? parent : gl_mem;
-+}
-+
-+EGLImageKHR
-+gst_gl_memory_egl_get_image (GstGLMemoryEGL * mem)
-+{
-+ g_return_val_if_fail (gst_is_gl_memory_egl (GST_MEMORY_CAST (mem)),
-+ EGL_NO_IMAGE_KHR);
-+ return _gl_mem_get_parent(mem)->image;
-+}
-+
-+EGLDisplay
-+gst_gl_memory_egl_get_display (GstGLMemoryEGL * mem)
-+{
-+ g_return_val_if_fail (gst_is_gl_memory_egl (GST_MEMORY_CAST (mem)), NULL);
-+ return GST_GL_CONTEXT_EGL(_gl_mem_get_parent(mem))->egl_display;
-+}
-+
-+GstVideoGLTextureOrientation
-+gst_gl_memory_egl_get_orientation (GstGLMemoryEGL * mem)
-+{
-+ g_return_val_if_fail (gst_is_gl_memory_egl (GST_MEMORY_CAST (mem)),
-+ GST_VIDEO_GL_TEXTURE_ORIENTATION_X_NORMAL_Y_NORMAL);
-+
-+ return _gl_mem_get_parent(mem)->orientation;
-+}
-+
-+void
-+gst_gl_memory_egl_set_orientation (GstGLMemoryEGL * mem,
-+ GstVideoGLTextureOrientation orientation)
-+{
-+ g_return_if_fail (gst_is_gl_memory_egl (GST_MEMORY_CAST (mem)));
-+
-+ _gl_mem_get_parent(mem)->orientation = orientation;
-+}
-+
-+static GstMemory *
-+_gl_mem_alloc (GstAllocator * allocator, gsize size,
-+ GstAllocationParams * params)
-+{
-+ g_warning ("Use gst_gl_base_memory_allocator_alloc() to allocate from this "
-+ "GstGLMemoryEGL allocator");
-+
-+ return NULL;
-+}
-+
-+static void
-+_gl_mem_destroy (GstGLMemoryEGL * mem)
-+{
-+ /* Shared memory should not destroy all the data */
-+ if (!mem->mem.mem.mem.parent) {
-+ GstGLContextEGL *context = GST_GL_CONTEXT_EGL(mem->mem.mem.context);
-+ context->eglDestroyImage (context->egl_display, mem->image);
-+ }
-+
-+ GST_GL_BASE_MEMORY_ALLOCATOR_CLASS (parent_class)->destroy ((GstGLBaseMemory
-+ *) mem);
-+}
-+
-+static void
-+_gl_mem_init (GstGLMemoryEGL * mem, GstAllocator * allocator,
-+ GstMemory * parent, GstGLContext * context, GstGLTextureTarget target,
-+ GstAllocationParams * params, GstVideoInfo * info,
-+ guint plane, GstVideoAlignment * valign, gpointer user_data,
-+ GDestroyNotify notify)
-+{
-+ gst_gl_memory_init ((GstGLMemory *) mem, allocator, parent,
-+ context, target, params, info, plane, valign, user_data, notify);
-+}
-+
-+static GstGLMemoryEGL *
-+_gl_mem_egl_alloc (GstGLBaseMemoryAllocator * allocator,
-+ GstGLVideoAllocationParams * params)
-+{
-+ guint alloc_flags = params->parent.alloc_flags;
-+ GstGLMemoryEGL *mem;
-+
-+ g_return_val_if_fail (alloc_flags & GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_VIDEO,
-+ NULL);
-+ g_return_val_if_fail ((alloc_flags &
-+ GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_WRAP_GPU_HANDLE) == 0, NULL);
-+ g_return_val_if_fail ((alloc_flags &
-+ GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_WRAP_SYSMEM) == 0, NULL);
-+
-+ mem = g_new0 (GstGLMemoryEGL, 1);
-+ mem->image = EGL_NO_IMAGE_KHR;
-+
-+ _gl_mem_init (mem, GST_ALLOCATOR_CAST (allocator), NULL,
-+ params->parent.context, params->target, params->parent.alloc_params,
-+ params->v_info, params->plane, params->valign, params->parent.user_data,
-+ params->parent.notify);
-+
-+ return mem;
-+}
-+
-+static gboolean
-+_gl_mem_create (GstGLMemoryEGL * gl_mem, GError ** error)
-+{
-+ GstGLContextEGL *context = GST_GL_CONTEXT_EGL (gl_mem->mem.mem.context);
-+ GstGLBaseMemoryAllocatorClass *alloc_class;
-+
-+ if (!gst_gl_context_check_feature (GST_GL_CONTEXT (context),
-+ "EGL_KHR_image_base")) {
-+ g_set_error (error, GST_GL_CONTEXT_ERROR, GST_GL_CONTEXT_ERROR_WRONG_API,
-+ "EGL_KHR_image_base is not supported");
-+ return FALSE;
-+ }
-+
-+ alloc_class = GST_GL_BASE_MEMORY_ALLOCATOR_CLASS (parent_class);
-+ if (!alloc_class->create ((GstGLBaseMemory *) gl_mem, error))
-+ return FALSE;
-+
-+ gl_mem->image = context->eglCreateImage (context->egl_display,
-+ context->egl_context, EGL_GL_TEXTURE_2D_KHR,
-+ (EGLClientBuffer) GSIZE_TO_POINTER (gl_mem->mem.tex_id), NULL);
-+
-+ GST_TRACE ("Generating EGLImage handle:%p from a texture:%u",
-+ gl_mem->image, gl_mem->mem.tex_id);
-+
-+ if (eglGetError () != EGL_SUCCESS) {
-+ g_set_error (error, GST_GL_CONTEXT_ERROR, GST_GL_CONTEXT_ERROR_FAILED,
-+ "Failed to create EGLImage");
-+ return FALSE;
-+ }
-+
-+ return TRUE;
-+}
-+
-+static GstMemory *
-+_gl_mem_copy (GstGLMemoryEGL * src, gssize offset, gssize size)
-+{
-+ GST_CAT_ERROR (GST_CAT_GL_MEMORY, "GstGLMemoryEGL does not support copy");
-+ return NULL;
-+}
-+
-+static void
-+gst_gl_memory_egl_allocator_class_init (GstGLMemoryEGLAllocatorClass * klass)
-+{
-+ GstGLBaseMemoryAllocatorClass *gl_base;
-+ GstGLMemoryAllocatorClass *gl_tex;
-+ GstAllocatorClass *allocator_class;
-+
-+ gl_tex = (GstGLMemoryAllocatorClass *) klass;
-+ gl_base = (GstGLBaseMemoryAllocatorClass *) klass;
-+ allocator_class = (GstAllocatorClass *) klass;
-+
-+ gl_base->alloc = (GstGLBaseMemoryAllocatorAllocFunction) _gl_mem_egl_alloc;
-+ gl_base->create = (GstGLBaseMemoryAllocatorCreateFunction) _gl_mem_create;
-+ gl_base->destroy = (GstGLBaseMemoryAllocatorDestroyFunction) _gl_mem_destroy;
-+ gl_tex->copy = (GstGLBaseMemoryAllocatorCopyFunction) _gl_mem_copy;
-+
-+ allocator_class->alloc = _gl_mem_alloc;
-+}
-+
-+static void
-+gst_gl_memory_egl_allocator_init (GstGLMemoryEGLAllocator * allocator)
-+{
-+ GstAllocator *alloc = GST_ALLOCATOR_CAST (allocator);
-+
-+ alloc->mem_type = GST_GL_MEMORY_EGL_ALLOCATOR_NAME;
-+
-+ GST_OBJECT_FLAG_SET (allocator, GST_ALLOCATOR_FLAG_CUSTOM_ALLOC);
-+}
-+
-+/**
-+ * gst_gl_memory_egl_init_once:
-+ *
-+ * Initializes the GL Memory allocator. It is safe to call this function
-+ * multiple times. This must be called before any other GstGLMemoryEGL operation.
-+ */
-+void
-+gst_gl_memory_egl_init_once (void)
-+{
-+ static volatile gsize _init = 0;
-+
-+ if (g_once_init_enter (&_init)) {
-+ gst_gl_memory_init_once ();
-+
-+ GST_DEBUG_CATEGORY_INIT (GST_CAT_GL_MEMORY, "glmemory", 0,
-+ "OpenGL Texture with EGLImage memory");
-+
-+ _gl_memory_egl_allocator = g_object_new (GST_TYPE_GL_MEMORY_EGL_ALLOCATOR, NULL);
-+
-+ gst_allocator_register (GST_GL_MEMORY_EGL_ALLOCATOR_NAME,
-+ gst_object_ref (_gl_memory_egl_allocator));
-+ g_once_init_leave (&_init, 1);
-+ }
-+}
-diff --git a/gst-libs/gst/gl/egl/gstglmemoryegl.h b/gst-libs/gst/gl/egl/gstglmemoryegl.h
-new file mode 100644
-index 0000000..7256d33
---- /dev/null
-+++ b/gst-libs/gst/gl/egl/gstglmemoryegl.h
-@@ -0,0 +1,108 @@
-+/*
-+ * GStreamer
-+ * Copyright (C) 2012 Collabora Ltd.
-+ * @author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
-+ * Copyright (C) 2014 Julien Isorce <julien.isorce@gmail.com>
-+ *
-+ * This library is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Library General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2 of the License, or (at your option) any later version.
-+ *
-+ * This library is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ * Library General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Library General Public
-+ * License along with this library; if not, write to the
-+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
-+ * Boston, MA 02110-1301, USA.
-+ */
-+
-+#ifndef _GST_GL_MEMORY_EGL_H_
-+#define _GST_GL_MEMORY_EGL_H_
-+
-+#include <gst/gst.h>
-+#include <gst/gstallocator.h>
-+#include <gst/gstmemory.h>
-+#include <gst/video/video.h>
-+
-+#include <gst/gl/gl.h>
-+#include "gstglcontext_egl.h"
-+
-+#include <gst/gl/gstglmemory.h>
-+
-+G_BEGIN_DECLS
-+
-+#define GST_TYPE_GL_MEMORY_EGL_ALLOCATOR (gst_gl_memory_egl_allocator_get_type())
-+GType gst_gl_memory_egl_allocator_get_type(void);
-+
-+#define GST_IS_GL_MEMORY_EGL_ALLOCATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_GL_MEMORY_EGL_ALLOCATOR))
-+#define GST_IS_GL_MEMORY_EGL_ALLOCATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_GL_MEMORY_EGL_ALLOCATOR))
-+#define GST_GL_MEMORY_EGL_ALLOCATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_GL_MEMORY_EGL_ALLOCATOR, GstGLMemoryEGLAllocatorClass))
-+#define GST_GL_MEMORY_EGL_ALLOCATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_GL_MEMORY_EGL_ALLOCATOR, GstGLMemoryEGLAllocator))
-+#define GST_GL_MEMORY_EGL_ALLOCATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_GL_MEMORY_EGL_ALLOCATOR, GstGLAllocatorClass))
-+#define GST_GL_MEMORY_EGL_ALLOCATOR_CAST(obj) ((GstGLMemoryEGLAllocator *)(obj))
-+
-+typedef void (*GstEGLImageDestroyNotify) (GstGLContextEGL * context,
-+ gpointer data);
-+
-+typedef struct _GstEGLImageMemory GstEGLImageMemory;
-+
-+
-+/**
-+ * GstGLMemoryEGL:
-+ *
-+ * Private instance
-+ */
-+struct _GstGLMemoryEGL
-+{
-+ GstGLMemory mem;
-+
-+ EGLImageKHR image;
-+ GstVideoGLTextureOrientation orientation;
-+};
-+
-+/**
-+ * GST_GL_MEMORY_EGL_ALLOCATOR:
-+ *
-+ * The name of the GL Memory EGL allocator
-+ */
-+#define GST_GL_MEMORY_EGL_ALLOCATOR_NAME "GLMemoryEGL"
-+
-+void gst_gl_memory_egl_init_once (void);
-+gboolean gst_is_gl_memory_egl (GstMemory * mem);
-+
-+EGLImageKHR gst_gl_memory_egl_get_image (GstGLMemoryEGL * mem);
-+EGLDisplay gst_gl_memory_egl_get_display (GstGLMemoryEGL * mem);
-+
-+GstVideoGLTextureOrientation gst_gl_memory_egl_get_orientation
-+ (GstGLMemoryEGL * mem);
-+
-+void gst_gl_memory_egl_set_orientation (GstGLMemoryEGL * mem,
-+ GstVideoGLTextureOrientation orientation);
-+
-+/**
-+ * GstGLAllocator
-+ *
-+ * Opaque #GstGLAllocator struct
-+ */
-+struct _GstGLMemoryEGLAllocator
-+{
-+ GstGLMemoryAllocator parent;
-+};
-+
-+/**
-+ * GstGLAllocatorClass:
-+ *
-+ * The #GstGLAllocatorClass only contains private data
-+ */
-+struct _GstGLMemoryEGLAllocatorClass
-+{
-+ GstGLMemoryAllocatorClass parent_class;
-+};
-+
-+G_END_DECLS
-+
-+#endif /* _GST_GL_MEMORY_EGL_H_ */
-diff --git a/gst-libs/gst/gl/gstgl_fwd.h b/gst-libs/gst/gl/gstgl_fwd.h
-index fb64ff6..73e17bd 100644
---- a/gst-libs/gst/gl/gstgl_fwd.h
-+++ b/gst-libs/gst/gl/gstgl_fwd.h
-@@ -55,6 +55,10 @@ typedef struct _GstGLMemoryPBO GstGLMemoryPBO;
- typedef struct _GstGLMemoryPBOAllocator GstGLMemoryPBOAllocator;
- typedef struct _GstGLMemoryPBOAllocatorClass GstGLMemoryPBOAllocatorClass;
-
-+typedef struct _GstGLMemoryEGL GstGLMemoryEGL;
-+typedef struct _GstGLMemoryEGLAllocator GstGLMemoryEGLAllocator;
-+typedef struct _GstGLMemoryEGLAllocatorClass GstGLMemoryEGLAllocatorClass;
-+
- typedef struct _GstGLSLStage GstGLSLStage;
- typedef struct _GstGLSLStagePrivate GstGLSLStagePrivate;
- typedef struct _GstGLSLStageClass GstGLSLStageClass;
-diff --git a/gst-libs/gst/gl/gstgldisplay.c b/gst-libs/gst/gl/gstgldisplay.c
-index 60dec6a..34770d0 100644
---- a/gst-libs/gst/gl/gstgldisplay.c
-+++ b/gst-libs/gst/gl/gstgldisplay.c
-@@ -68,6 +68,7 @@
- #if GST_GL_HAVE_PLATFORM_EGL
- #include <gst/gl/egl/gstgldisplay_egl.h>
- #include <gst/gl/egl/gsteglimagememory.h>
-+#include <gst/gl/egl/gstglmemoryegl.h>
- #endif
-
- GST_DEBUG_CATEGORY_STATIC (gst_context);
-@@ -144,6 +145,7 @@ gst_gl_display_init (GstGLDisplay * display)
-
- #if GST_GL_HAVE_PLATFORM_EGL
- gst_egl_image_memory_init ();
-+ gst_gl_memory_egl_init_once ();
- #endif
- }
-
-diff --git a/gst-libs/gst/gl/gstglupload.c b/gst-libs/gst/gl/gstglupload.c
-index 16ed5ea..73a9029 100644
---- a/gst-libs/gst/gl/gstglupload.c
-+++ b/gst-libs/gst/gl/gstglupload.c
-@@ -29,6 +29,7 @@
-
- #if GST_GL_HAVE_PLATFORM_EGL
- #include "egl/gsteglimagememory.h"
-+#include "egl/gstglmemoryegl.h"
- #endif
-
- #if GST_GL_HAVE_DMABUF
-@@ -301,6 +302,13 @@ _gl_memory_upload_propose_allocation (gpointer impl, GstQuery * decide_query,
- context));
- gst_query_add_allocation_param (query, allocator, &params);
- gst_object_unref (allocator);
-+
-+#if GST_GL_HAVE_PLATFORM_EGL
-+ allocator =
-+ GST_ALLOCATOR (gst_allocator_find (GST_GL_MEMORY_EGL_ALLOCATOR_NAME));
-+ gst_query_add_allocation_param (query, allocator, &params);
-+ gst_object_unref (allocator);
-+#endif
- }
-
- n_pools = gst_query_get_n_allocation_pools (query);
---
-2.5.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch
index 369ff93ac..20c9ffcd8 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch
@@ -23,43 +23,45 @@ Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
sys/decklink/gstdecklinkvideosink.cpp | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
-diff --git a/sys/decklink/gstdecklink.cpp b/sys/decklink/gstdecklink.cpp
-index 64637f1..bac956f 100644
---- a/sys/decklink/gstdecklink.cpp
-+++ b/sys/decklink/gstdecklink.cpp
-@@ -324,22 +324,22 @@ gst_decklink_mode_get_structure (GstDecklinkModeEnum e, BMDPixelFormat f)
- "height", G_TYPE_INT, mode->height,
+Index: gst-plugins-bad-1.10.2/sys/decklink/gstdecklink.cpp
+===================================================================
+--- gst-plugins-bad-1.10.2.orig/sys/decklink/gstdecklink.cpp
++++ gst-plugins-bad-1.10.2/sys/decklink/gstdecklink.cpp
+@@ -476,7 +476,7 @@ gst_decklink_mode_get_structure (GstDeck
"pixel-aspect-ratio", GST_TYPE_FRACTION, mode->par_n, mode->par_d,
- "interlace-mode", G_TYPE_STRING, mode->interlaced ? "interleaved" : "progressive",
+ "interlace-mode", G_TYPE_STRING,
+ mode->interlaced ? "interleaved" : "progressive",
- "framerate", GST_TYPE_FRACTION, mode->fps_n, mode->fps_d, NULL);
-+ "framerate", GST_TYPE_FRACTION, mode->fps_n, mode->fps_d, (void *) NULL);
++ "framerate", GST_TYPE_FRACTION, mode->fps_n, mode->fps_d, (void*)NULL);
- switch (f) {
- case bmdFormat8BitYUV: /* '2vuy' */
+ if (input && mode->interlaced) {
+ if (mode->tff)
+@@ -489,16 +489,16 @@ gst_decklink_mode_get_structure (GstDeck
+ case bmdFormat8BitYUV: /* '2vuy' */
gst_structure_set (s, "format", G_TYPE_STRING, "UYVY",
"colorimetry", G_TYPE_STRING, mode->colorimetry,
- "chroma-site", G_TYPE_STRING, "mpeg2", NULL);
-+ "chroma-site", G_TYPE_STRING, "mpeg2", (void *) NULL);
++ "chroma-site", G_TYPE_STRING, "mpeg2", (void*)NULL);
break;
- case bmdFormat10BitYUV: /* 'v210' */
+ case bmdFormat10BitYUV: /* 'v210' */
- gst_structure_set (s, "format", G_TYPE_STRING, "v210", NULL);
-+ gst_structure_set (s, "format", G_TYPE_STRING, "v210", (void *) NULL);
++ gst_structure_set (s, "format", G_TYPE_STRING, "v210", (void*)NULL);
break;
- case bmdFormat8BitARGB: /* 'ARGB' */
+ case bmdFormat8BitARGB: /* 'ARGB' */
- gst_structure_set (s, "format", G_TYPE_STRING, "ARGB", NULL);
-+ gst_structure_set (s, "format", G_TYPE_STRING, "ARGB", (void *) NULL);
++ gst_structure_set (s, "format", G_TYPE_STRING, "ARGB", (void*)NULL);
break;
- case bmdFormat8BitBGRA: /* 'BGRA' */
+ case bmdFormat8BitBGRA: /* 'BGRA' */
- gst_structure_set (s, "format", G_TYPE_STRING, "BGRA", NULL);
-+ gst_structure_set (s, "format", G_TYPE_STRING, "BGRA", (void *) NULL);
++ gst_structure_set (s, "format", G_TYPE_STRING, "BGRA", (void*)NULL);
break;
- case bmdFormat10BitRGB: /* 'r210' Big-endian RGB 10-bit per component with SMPTE video levels (64-960). Packed as 2:10:10:10 */
- case bmdFormat12BitRGB: /* 'R12B' Big-endian RGB 12-bit per component with full range (0-4095). Packed as 12-bit per component */
-diff --git a/sys/decklink/gstdecklinkaudiosrc.cpp b/sys/decklink/gstdecklinkaudiosrc.cpp
-index 9a701ee..26fb7ec 100644
---- a/sys/decklink/gstdecklinkaudiosrc.cpp
-+++ b/sys/decklink/gstdecklinkaudiosrc.cpp
-@@ -312,7 +312,7 @@ gst_decklink_audio_src_set_caps (GstBaseSrc * bsrc, GstCaps * caps)
+ case bmdFormat10BitRGB: /* 'r210' Big-endian RGB 10-bit per component with SMPTE video levels (64-960). Packed as 2:10:10:10 */
+ case bmdFormat12BitRGB: /* 'R12B' Big-endian RGB 12-bit per component with full range (0-4095). Packed as 12-bit per component */
+Index: gst-plugins-bad-1.10.2/sys/decklink/gstdecklinkaudiosrc.cpp
+===================================================================
+--- gst-plugins-bad-1.10.2.orig/sys/decklink/gstdecklinkaudiosrc.cpp
++++ gst-plugins-bad-1.10.2/sys/decklink/gstdecklinkaudiosrc.cpp
+@@ -322,7 +322,7 @@ gst_decklink_audio_src_set_caps (GstBase
g_mutex_unlock (&self->input->lock);
if (videosrc) {
@@ -68,11 +70,11 @@ index 9a701ee..26fb7ec 100644
gst_object_unref (videosrc);
switch (vconn) {
-diff --git a/sys/decklink/gstdecklinkvideosink.cpp b/sys/decklink/gstdecklinkvideosink.cpp
-index eebeff3..da6e486 100644
---- a/sys/decklink/gstdecklinkvideosink.cpp
-+++ b/sys/decklink/gstdecklinkvideosink.cpp
-@@ -158,7 +158,7 @@ reset_framerate (GstCapsFeatures * features, GstStructure * structure,
+Index: gst-plugins-bad-1.10.2/sys/decklink/gstdecklinkvideosink.cpp
+===================================================================
+--- gst-plugins-bad-1.10.2.orig/sys/decklink/gstdecklinkvideosink.cpp
++++ gst-plugins-bad-1.10.2/sys/decklink/gstdecklinkvideosink.cpp
+@@ -163,7 +163,7 @@ reset_framerate (GstCapsFeatures * featu
gpointer user_data)
{
gst_structure_set (structure, "framerate", GST_TYPE_FRACTION_RANGE, 0, 1,
@@ -81,6 +83,3 @@ index eebeff3..da6e486 100644
return TRUE;
}
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.3.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb
index 108f4db10..0bb4053e4 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.3.bb
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb
@@ -1,4 +1,4 @@
-include gstreamer1.0-plugins-bad.inc
+require gstreamer1.0-plugins-bad.inc
LIC_FILES_CHKSUM = "file://COPYING;md5=73a5855a8119deb017f5f13cf327095d \
file://COPYING.LIB;md5=21682e4e8fea52413fd26c60acb907e5 \
@@ -12,15 +12,17 @@ SRC_URI = " \
file://avoid-including-sys-poll.h-directly.patch \
file://ensure-valid-sentinels-for-gst_structure_get-etc.patch \
file://0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch \
- file://0002-glplugin-enable-gldeinterlace-on-OpenGL-ES.patch \
- file://0003-glcolorconvert-implement-multiple-render-targets-for.patch \
- file://0004-glcolorconvert-don-t-use-the-predefined-variable-nam.patch \
- file://0005-glshader-add-glBindFragDataLocation.patch \
- file://0006-glcolorconvert-GLES3-deprecates-texture2D-and-it-doe.patch \
- file://0008-gl-implement-GstGLMemoryEGL.patch \
file://0009-glimagesink-Downrank-to-marginal.patch \
+ file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
+ file://0001-Prepend-PKG_CONFIG_SYSROOT_DIR-to-pkg-config-output.patch \
+ file://0001-smoothstreaming-implement-adaptivedemux-s-get_live_s.patch \
+ file://0001-smoothstreaming-use-the-duration-from-the-list-of-fr.patch \
+ file://0001-mssdemux-improved-live-playback-support.patch \
"
-SRC_URI[md5sum] = "955281a43e98c5464563fa049e0a0911"
-SRC_URI[sha256sum] = "7899fcb18e6a1af2888b19c90213af018a57d741c6e72ec56b133bc73ec8509b"
+SRC_URI[md5sum] = "2757103e57a096a1a05b3ab85b8381af"
+SRC_URI[sha256sum] = "23ddae506b3a223b94869a0d3eea3e9a12e847f94d2d0e0b97102ce13ecd6966"
S = "${WORKDIR}/gst-plugins-bad-${PV}"
+
+EXTRA_OECONF += "WAYLAND_PROTOCOLS_SYSROOT_DIR=${RECIPE_SYSROOT}"
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb
deleted file mode 100644
index 1370380b9..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb
+++ /dev/null
@@ -1,45 +0,0 @@
-DEFAULT_PREFERENCE = "-1"
-
-include gstreamer1.0-plugins-bad.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=73a5855a8119deb017f5f13cf327095d \
- file://COPYING.LIB;md5=21682e4e8fea52413fd26c60acb907e5 \
- file://gst/tta/crc32.h;beginline=12;endline=29;md5=27db269c575d1e5317fffca2d33b3b50 \
- file://gst/tta/filters.h;beginline=12;endline=29;md5=8a08270656f2f8ad7bb3655b83138e5a"
-
-SRC_URI = " \
- git://anongit.freedesktop.org/gstreamer/gst-plugins-bad;branch=1.8;name=base \
- git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;name=common \
- file://configure-allow-to-disable-libssh2.patch \
- file://fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch \
- file://avoid-including-sys-poll.h-directly.patch \
- file://ensure-valid-sentinels-for-gst_structure_get-etc.patch \
- file://0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch \
-"
-
-PV = "1.8.2+git${SRCPV}"
-
-UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
-
-SRCREV_base = "5e73b5a4843d9675246f4efec158624475ed9586"
-SRCREV_common = "f363b3205658a38e84fa77f19dee218cd4445275"
-SRCREV_FORMAT = "base"
-
-S = "${WORKDIR}/git"
-
-do_configure_prepend() {
- ${S}/autogen.sh --noconfigure
-}
-
-# In 1.6.2, the "--enable-hls" configure option generated an installable package
-# called "gstreamer1.0-plugins-bad-fragmented". In 1.7.1 that HLS plugin package
-# has become "gstreamer1.0-plugins-bad-hls". See:
-# http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=efe62292a3d045126654d93239fdf4cc8e48ae08
-
-PACKAGESPLITFUNCS_append = " handle_hls_rename "
-
-python handle_hls_rename () {
- d.setVar('RPROVIDES_gstreamer1.0-plugins-bad-hls', 'gstreamer1.0-plugins-bad-fragmented')
- d.setVar('RREPLACES_gstreamer1.0-plugins-bad-hls', 'gstreamer1.0-plugins-bad-fragmented')
- d.setVar('RCONFLICTS_gstreamer1.0-plugins-bad-hls', 'gstreamer1.0-plugins-bad-fragmented')
-}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base.inc b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base.inc
index a04f155dc..08130c1da 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base.inc
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base.inc
@@ -17,9 +17,8 @@ PACKAGES_DYNAMIC =+ "^libgst.*"
PACKAGECONFIG ??= " \
${GSTREAMER_ORC} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
- gio-unix-2.0 ivorbis ogg pango theora vorbis \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'alsa x11', d)} \
+ gio-unix-2.0 ogg pango theora vorbis \
"
X11DEPENDS = "virtual/libx11 libsm libxrender libxv"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.8.3.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.10.4.bb
index 986b5ac60..7c8167093 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.8.3.bb
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.10.4.bb
@@ -1,4 +1,4 @@
-include gstreamer1.0-plugins-base.inc
+require gstreamer1.0-plugins-base.inc
LIC_FILES_CHKSUM = "file://COPYING;md5=c54ce9345727175ff66d17b67ff51f58 \
file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \
@@ -11,9 +11,9 @@ SRC_URI = " \
file://0004-subparse-set-need_segment-after-sink-pad-received-GS.patch \
file://encodebin-Need-more-buffers-in-output-queue-for-bett.patch \
file://make-gio_unix_2_0-dependency-configurable.patch \
+ file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
"
-
-SRC_URI[md5sum] = "4d03dd81828ea6b98a44c8f1ab7f4976"
-SRC_URI[sha256sum] = "114871d4d63606b4af424a8433cd923e4ff66896b244bb7ac97b9da47f71e79e"
+SRC_URI[md5sum] = "f6b46f8fac01eb773d556e3efc369e86"
+SRC_URI[sha256sum] = "f6d245b6b3d4cb733f81ebb021074c525ece83db0c10e932794b339b8d935eb7"
S = "${WORKDIR}/gst-plugins-base-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb
deleted file mode 100644
index 3c2b50400..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-DEFAULT_PREFERENCE = "-1"
-
-include gstreamer1.0-plugins-base.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=c54ce9345727175ff66d17b67ff51f58 \
- file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \
- file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607"
-
-SRC_URI = " \
- git://anongit.freedesktop.org/gstreamer/gst-plugins-base;branch=1.8;name=base \
- git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;name=common \
- file://get-caps-from-src-pad-when-query-caps.patch \
- file://0003-ssaparse-enhance-SSA-text-lines-parsing.patch \
- file://0004-subparse-set-need_segment-after-sink-pad-received-GS.patch \
- file://encodebin-Need-more-buffers-in-output-queue-for-bett.patch \
- file://make-gio_unix_2_0-dependency-configurable.patch \
-"
-
-PV = "1.8.2+git${SRCPV}"
-
-UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
-
-SRCREV_base = "70f3750773bf5dba4098f6d72d63aa6c84f1f539"
-SRCREV_common = "f363b3205658a38e84fa77f19dee218cd4445275"
-SRCREV_FORMAT = "base"
-
-S = "${WORKDIR}/git"
-
-do_configure_prepend() {
- ${S}/autogen.sh --noconfigure
-}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good.inc b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good.inc
index f1e30aba5..14c3d6184 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good.inc
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good.inc
@@ -8,8 +8,7 @@ inherit gettext
PACKAGECONFIG ??= " \
${GSTREAMER_ORC} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio x11', d)} \
cairo flac gdk-pixbuf gudev jpeg libpng soup speex taglib v4l2 \
"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-v4l2object-Also-add-videometa-if-there-is-padding-to.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-v4l2object-Also-add-videometa-if-there-is-padding-to.patch
new file mode 100644
index 000000000..2a9a23e15
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-v4l2object-Also-add-videometa-if-there-is-padding-to.patch
@@ -0,0 +1,35 @@
+From 22be02612adc757f6a43cefc6ee65ecaef68f0d9 Mon Sep 17 00:00:00 2001
+From: Carlos Rafael Giani <dv@pseudoterminal.org>
+Date: Thu, 23 Mar 2017 22:13:05 +0100
+Subject: [PATCH] v4l2object: Also add videometa if there is padding to the
+ right and bottom
+
+https://bugzilla.gnome.org/show_bug.cgi?id=780478
+
+Upstream-Status: Backport [1.10.5]
+
+Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
+---
+ sys/v4l2/gstv4l2object.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/sys/v4l2/gstv4l2object.c b/sys/v4l2/gstv4l2object.c
+index 91c8ff0..ed4654e 100644
+--- a/sys/v4l2/gstv4l2object.c
++++ b/sys/v4l2/gstv4l2object.c
+@@ -3070,9 +3070,10 @@ store_info:
+ GST_DEBUG_OBJECT (v4l2object->element, "Got sizeimage %" G_GSIZE_FORMAT,
+ info->size);
+
+- /* to avoid copies we need video meta if top or left padding */
++ /* to avoid copies we need video meta if there is padding */
+ v4l2object->need_video_meta =
+- ((align->padding_top + align->padding_left) != 0);
++ ((align->padding_top + align->padding_left + align->padding_right +
++ align->padding_bottom) != 0);
+
+ /* ... or if stride is non "standard" */
+ if (!standard_stride)
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.8.3.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.10.4.bb
index 5cc6578b7..57447bffb 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.8.3.bb
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.10.4.bb
@@ -1,4 +1,4 @@
-include gstreamer1.0-plugins-good.inc
+require gstreamer1.0-plugins-good.inc
LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607 \
@@ -9,9 +9,10 @@ SRC_URI = " \
file://0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch \
file://avoid-including-sys-poll.h-directly.patch \
file://ensure-valid-sentinel-for-gst_structure_get.patch \
+ file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
+ file://0001-v4l2object-Also-add-videometa-if-there-is-padding-to.patch \
"
-
-SRC_URI[md5sum] = "473ebb1f15c67de99ddb6e4d027c0876"
-SRC_URI[sha256sum] = "a1d6579ba203a7734927c24b90bf6590d846c5a5fcec01a48201018c8ad2827a"
+SRC_URI[md5sum] = "cc0cc13cdb07d4237600b6886b81f31d"
+SRC_URI[sha256sum] = "8a86c61434a8c44665365bd0b3557a040937d1f44bf69caee4e9ea816ce74d7e"
S = "${WORKDIR}/gst-plugins-good-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb
deleted file mode 100644
index 9b79af2a9..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-DEFAULT_PREFERENCE = "-1"
-
-include gstreamer1.0-plugins-good.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
- file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607 \
- file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe"
-
-SRC_URI = " \
- git://anongit.freedesktop.org/gstreamer/gst-plugins-good;branch=1.8;name=base \
- git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;name=common \
- file://avoid-including-sys-poll.h-directly.patch \
- file://ensure-valid-sentinel-for-gst_structure_get.patch \
- file://0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch \
-"
-
-PV = "1.8.2+git${SRCPV}"
-
-UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
-
-SRCREV_base = "9f73b5818f98cd045e7049bb313da1c943635109"
-SRCREV_common = "f363b3205658a38e84fa77f19dee218cd4445275"
-SRCREV_FORMAT = "base"
-
-S = "${WORKDIR}/git"
-
-do_configure_prepend() {
- ${S}/autogen.sh --noconfigure
-}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.8.3.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.10.4.bb
index 274593796..92a2caa2c 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.8.3.bb
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.10.4.bb
@@ -1,13 +1,13 @@
-include gstreamer1.0-plugins-ugly.inc
+require gstreamer1.0-plugins-ugly.inc
LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
file://tests/check/elements/xingmux.c;beginline=1;endline=21;md5=4c771b8af188724855cb99cadd390068"
SRC_URI = " \
http://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-${PV}.tar.xz \
+ file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
"
-
-SRC_URI[md5sum] = "4fc66c77253b0ad5ce224bda654b2e7d"
-SRC_URI[sha256sum] = "6fa2599fdd072d31fbaf50c34af406e2be944a010b1f4eab67a5fe32a0310693"
+SRC_URI[md5sum] = "c68d0509c9980b0b70a4b836ff73fff1"
+SRC_URI[sha256sum] = "6386c77ca8459cba431ed0b63da780c7062c7cc48055d222024d8eaf198ffa59"
S = "${WORKDIR}/gst-plugins-ugly-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb
deleted file mode 100644
index 22cca3a8d..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb
+++ /dev/null
@@ -1,37 +0,0 @@
-DEFAULT_PREFERENCE = "-1"
-
-include gstreamer1.0-plugins-ugly.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
- file://tests/check/elements/xingmux.c;beginline=1;endline=21;md5=4c771b8af188724855cb99cadd390068"
-
-SRC_URI = " \
- git://anongit.freedesktop.org/gstreamer/gst-plugins-ugly;branch=1.8;name=base \
- git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;name=common \
-"
-
-PV = "1.8.2+git${SRCPV}"
-
-UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
-
-SRCREV_base = "79fe43c00925455a37fab6fc428e7f08655a9bbd"
-SRCREV_common = "f363b3205658a38e84fa77f19dee218cd4445275"
-SRCREV_FORMAT = "base"
-
-S = "${WORKDIR}/git"
-
-do_configure_prepend() {
- ${S}/autogen.sh --noconfigure
-}
-
-# In 1.7.2, the mpg123 plugin was moved from -bad to -ugly
-# https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=08d8aefcdaaf89ecb6dd53ec1e4f95cd42d01664
-# https://cgit.freedesktop.org/gstreamer/gst-plugins-ugly/commit/?id=43bd45ba991ef3247957ca37cdcb52f4b8c0acb1
-
-PACKAGESPLITFUNCS_append = " handle_mpg123_rename "
-
-python handle_mpg123_rename () {
- d.setVar('RPROVIDES_gstreamer1.0-plugins-ugly-mpg123', 'gstreamer1.0-plugins-bad-mpg123')
- d.setVar('RREPLACES_gstreamer1.0-plugins-ugly-mpg123', 'gstreamer1.0-plugins-bad-mpg123')
- d.setVar('RCONFLICTS_gstreamer1.0-plugins-ugly-mpg123', 'gstreamer1.0-plugins-bad-mpg123')
-}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc
index 9cfcec3ca..3f6d4c370 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc
@@ -28,8 +28,6 @@ EXTRA_OECONF = " \
--disable-examples \
"
-SRC_URI_append = " file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch"
-
delete_pkg_m4_file() {
# This m4 file is out of date and is missing PKG_CONFIG_SYSROOT_PATH tweaks which we need for introspection
rm "${S}/common/m4/pkg.m4" || true
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server.inc b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server.inc
index 13ba40d3d..7191f9892 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server.inc
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server.inc
@@ -3,7 +3,7 @@ HOMEPAGE = "http://cgit.freedesktop.org/gstreamer/gst-rtsp-server/"
SECTION = "multimedia"
LICENSE = "LGPLv2"
-DEPENDS = "gstreamer1.0 libcgroup gstreamer1.0-plugins-base"
+DEPENDS = "gstreamer1.0 libcgroup gstreamer1.0-plugins-base libcheck"
PNREAL = "gst-rtsp-server"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.10.4.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.10.4.bb
new file mode 100644
index 000000000..6aa9a53cc
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.10.4.bb
@@ -0,0 +1,6 @@
+require gstreamer1.0-rtsp-server.inc
+
+SRC_URI[md5sum] = "ef587fa6393e09bc26f884510596e305"
+SRC_URI[sha256sum] = "2f6e12fd4e3568ee190dc24e57e4c3a878971c3a3fb6904a9674404fac256de6"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.8.3.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.8.3.bb
deleted file mode 100644
index 17059d070..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.8.3.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-include gstreamer1.0-rtsp-server.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d"
-
-SRC_URI[md5sum] = "e4b07b10dd65b6c26c9ca5f72e59297b"
-SRC_URI[sha256sum] = "010f06800c1c957851d1352e5ec7a8ba3ce6a857fec1b8afc7d1a9e5f53288bf"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi.inc b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi.inc
new file mode 100644
index 000000000..ef0734ba9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi.inc
@@ -0,0 +1,37 @@
+SUMMARY = "VA-API support to GStreamer"
+DESCRIPTION = "gstreamer-vaapi consists of a collection of VA-API \
+based plugins for GStreamer and helper libraries: `vaapidecode', \
+`vaapiconvert', and `vaapisink'."
+
+REALPN = "gstreamer-vaapi"
+FILESPATH = "${@base_set_filespath(["${FILE_DIRNAME}/${REALPN}", "${FILE_DIRNAME}/${REALPN}"], d)}"
+
+LICENSE = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
+
+DEPENDS = "libva"
+
+SRC_URI = "https://gstreamer.freedesktop.org/src/${REALPN}/${REALPN}-${PV}.tar.xz \
+ "
+
+S = "${WORKDIR}/${REALPN}-${PV}"
+
+inherit autotools pkgconfig gtk-doc distro_features_check upstream-version-is-even
+
+REQUIRED_DISTRO_FEATURES ?= "opengl"
+
+PACKAGES =+ "${PN}-tests"
+
+PACKAGECONFIG ??= "drm \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl x11', 'glx', '', d)} \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11', d)}"
+
+PACKAGECONFIG[drm] = "--enable-drm,--disable-drm,udev libdrm"
+PACKAGECONFIG[glx] = "--enable-glx,--disable-glx,virtual/mesa"
+PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,wayland"
+PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11 libxrandr libxrender"
+
+FILES_${PN} += "${libdir}/gstreamer-*/*.so"
+FILES_${PN}-dbg += "${libdir}/gstreamer-*/.debug"
+FILES_${PN}-dev += "${libdir}/gstreamer-*/*.la ${libdir}/gstreamer-*/*.a"
+FILES_${PN}-tests = "${bindir}/*"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.10.4.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.10.4.bb
new file mode 100644
index 000000000..44c66de44
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.10.4.bb
@@ -0,0 +1,7 @@
+require gstreamer1.0-vaapi.inc
+SRC_URI[md5sum] = "318af17f906637570b61dd7be9b5581d"
+SRC_URI[sha256sum] = "03e690621594d9f9495d86c7dac8b8590b3a150462770ed070dc76f66a70de75"
+
+SRC_URI += "file://vaapivideobufferpool-create-allocator-if-needed.patch"
+
+DEPENDS += "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
index cb0bd82f2..72d7ce68d 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
@@ -24,7 +24,7 @@ PACKAGECONFIG[debug] = "--enable-debug,--disable-debug"
PACKAGECONFIG[tests] = "--enable-tests,--disable-tests"
PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind,"
PACKAGECONFIG[gst-tracer-hooks] = "--enable-gst-tracer-hooks,--disable-gst-tracer-hooks,"
-PACKAGECONFIG[trace-historic] = "--enable-trace,--disable-trace,"
+PACKAGECONFIG[unwind] = "--with-unwind,--without-unwind,libunwind"
EXTRA_OECONF = " \
--disable-dependency-tracking \
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/deterministic-unwind.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/deterministic-unwind.patch
new file mode 100644
index 000000000..e39e6cad0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/deterministic-unwind.patch
@@ -0,0 +1,24 @@
+Make the detection of libunwind deterministic.
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/configure.ac b/configure.ac
+index ac88fb2..182c19a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -829,3 +828,0 @@ AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
+-dnl libunwind is optionally used by the leaks tracer
+-PKG_CHECK_MODULES(UNWIND, libunwind, HAVE_UNWIND=yes, HAVE_UNWIND=no)
+-
+@@ -839,3 +836,7 @@ AC_CHECK_FUNC(backtrace, [
+-if test "x$HAVE_UNWIND" = "xyes"; then
+- AC_DEFINE(HAVE_UNWIND, 1, [libunwind available])
+-fi
++dnl libunwind is optionally used by the leaks tracer
++AC_ARG_WITH([unwind],[AS_HELP_STRING([--with-unwind],[use libunwind])],
++ [], [with_unwind=yes])
++AS_IF([test "$with_unwind" = yes],
++ [PKG_CHECK_MODULES(UNWIND, libunwind)
++ AC_DEFINE(HAVE_UNWIND, 1, [libunwind available])]
++)
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.8.3.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.10.4.bb
index d3561ebbd..2a6799345 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.8.3.bb
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.10.4.bb
@@ -1,13 +1,13 @@
-include gstreamer1.0.inc
+require gstreamer1.0.inc
LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \
file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d"
SRC_URI = " \
http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz \
+ file://deterministic-unwind.patch \
"
-
-SRC_URI[md5sum] = "e88dad542df9d986822e982105d2b530"
-SRC_URI[sha256sum] = "66b37762d4fdcd63bce5a2bec57e055f92420e95037361609900278c0db7c53f"
+SRC_URI[md5sum] = "7c91a97e4a2dc81eafd59d0a2f8b0d6e"
+SRC_URI[sha256sum] = "50c2f5af50a6cc6c0a3f3ed43bdd8b5e2bff00bacfb766d4be139ec06d8b5218"
S = "${WORKDIR}/gstreamer-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb
deleted file mode 100644
index 6112f2a89..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-DEFAULT_PREFERENCE = "-1"
-
-include gstreamer1.0.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \
- file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d"
-
-SRC_URI = " \
- git://anongit.freedesktop.org/gstreamer/gstreamer;branch=1.8;name=base \
- git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;name=common \
-"
-
-PV = "1.8.2+git${SRCPV}"
-
-UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
-
-SRCREV_base = "3de8a4f728a7194a12b784ec4085f6a8e7d9b5bd"
-SRCREV_common = "f363b3205658a38e84fa77f19dee218cd4445275"
-SRCREV_FORMAT = "base"
-
-S = "${WORKDIR}/git"
-
-do_configure_prepend() {
- ${S}/autogen.sh --noconfigure
-}
OpenPOWER on IntegriCloud