summaryrefslogtreecommitdiffstats
path: root/import-layers/yocto-poky/meta/recipes-multimedia
diff options
context:
space:
mode:
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-multimedia')
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/0001-topology-Add-missing-include-sys-stat.h.patch35
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/avoid-including-sys-poll.h-directly.patch22
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib_1.1.2.bb (renamed from import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib_1.1.0.bb)13
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins/0001-pph-include-config.h-from-rate_speexrate.c.patch35
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins_1.1.1.bb (renamed from import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins_1.1.0.bb)10
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/0001-Cus428Midi-Explicitly-cast-constant-to-char-type.patch75
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools_1.1.0.bb8
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.2.bb (renamed from import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.0.bb)4
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils/0001-alsabat-rename-to-avoid-naming-conflict.patch153
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils_1.1.2.bb (renamed from import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils_1.1.0.bb)23
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/mips64_cpu_detection.patch32
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg_3.1.3.bb (renamed from import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg_3.0.bb)11
-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/gst-player.desktop2
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/gtk2.patch71
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player_git.bb36
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav.inc3
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.8.3.bb (renamed from import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.6.3.bb)4
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb10
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx.inc3
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc29
-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.patch4
-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/0002-glplugin-glwindow-fix-memory-leak-of-navigation-thre.patch35
-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/0009-glimagesink-Downrank-to-marginal.patch (renamed from import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-glimagesink-Downrank-to-marginal.patch)2
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bb28
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.3.bb26
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb28
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base.inc1
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch20
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch38
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch2
-rwxr-xr-ximport-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-convertframe-Support-video-crop-when-convert-frame.patch143
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/get-caps-from-src-pad-when-query-caps.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/make-gio_unix_2_0-dependency-configurable.patch4
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.8.3.bb (renamed from import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.6.3.bb)12
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb12
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good.inc4
-rw-r--r--[-rwxr-xr-x]import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch6
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.8.3.bb (renamed from import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.6.3.bb)6
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb9
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly.inc3
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.8.3.bb (renamed from import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.6.3.bb)4
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb12
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc17
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server.inc18
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.6.2.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.inc21
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-Fix-crash-with-gst-inspect.patch28
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.8.3.bb (renamed from import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.6.3.bb)5
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb13
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/lame/lame/lame-3.99.5_fix_for_automake-1.12.x.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/add-pkgconfig.patch70
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/automake-foreign.patch12
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/fix_for_mips_with_gcc-4.5.0.patch33
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/no-force-mem.patch18
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/obsolete_automake_macros.patch14
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad_0.15.1b.bb36
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libpng/libpng_1.6.24.bb (renamed from import-layers/yocto-poky/meta/recipes-multimedia/libpng/libpng_1.6.21.bb)10
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.27.bb (renamed from import-layers/yocto-poky/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.26.bb)4
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2015-8665_8683.patch137
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2015-8781.patch195
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2015-8784.patch73
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2016-3186.patch24
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2016-5321.patch49
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2016-5323.patch107
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libtiff/tiff_4.0.6.bb9
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/mpg123/mpg123_1.23.6.bb63
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio.inc9
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-Revert-module-switch-on-port-available-Route-to-pref.patch268
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-alsa-bluetooth-fail-if-user-requested-profile-doesn-.patch (renamed from import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-alsa-bluetooth-fail-if-user-requested-profile-doesn-.patch)30
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-card-add-pa_card_profile.ports.patch218
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-client-conf-Add-allow-autospawn-for-root.patch18
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-card-don-t-allow-the-CARD_NEW-hook-to-fail.patch37
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0003-card-move-profile-selection-after-pa_card_new.patch373
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0004-card-remove-pa_card_new_data.active_profile.patch72
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0005-alsa-set-availability-for-some-unavailable-profiles.patch (renamed from import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0004-alsa-set-availability-for-some-unavailable-profiles.patch)38
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio_9.0.bb (renamed from import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio_8.0.bb)14
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/webp/libwebp_0.5.1.bb (renamed from import-layers/yocto-poky/meta/recipes-multimedia/webp/libwebp_0.5.0.bb)9
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/x264/x264_git.bb6
88 files changed, 2981 insertions, 1630 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/0001-topology-Add-missing-include-sys-stat.h.patch b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/0001-topology-Add-missing-include-sys-stat.h.patch
deleted file mode 100644
index 0ead0cdaf..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/0001-topology-Add-missing-include-sys-stat.h.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 3f1dba9a821b53b42001605f9a126a958804884f Mon Sep 17 00:00:00 2001
-From: Takashi Iwai <tiwai@suse.de>
-Date: Mon, 9 Nov 2015 13:37:26 +0100
-Subject: [PATCH] topology: Add missing include sys/stat.h
-
-Necessary for proper definitions of S_IRUSR & co. Otherwise it
-results in compile errors with old glibc and uclibc:
- parser.c: In function 'snd_tplg_build_file':
- parser.c:262: error: 'S_IRUSR' undeclared (first use in this function)
- parser.c:262: error: (Each undeclared identifier is reported only once
- parser.c:262: error: for each function it appears in.)
-
-Upstream-Status: Backport
-
-Signed-off-by: Takashi Iwai <tiwai@suse.de>
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- src/topology/parser.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/topology/parser.c b/src/topology/parser.c
-index 80a0ae0..18bb9c7 100644
---- a/src/topology/parser.c
-+++ b/src/topology/parser.c
-@@ -16,6 +16,7 @@
- Liam Girdwood <liam.r.girdwood@linux.intel.com>
- */
-
-+#include <sys/stat.h>
- #include "list.h"
- #include "tplg_local.h"
-
---
-2.4.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/avoid-including-sys-poll.h-directly.patch b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/avoid-including-sys-poll.h-directly.patch
index 161619b27..3d4458593 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/avoid-including-sys-poll.h-directly.patch
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/avoid-including-sys-poll.h-directly.patch
@@ -1,4 +1,4 @@
-From 7dcf46969e85c881c901df4b49309e9091cad16a Mon Sep 17 00:00:00 2001
+From c2c13cf0c469862cd39b2a69862002331ab7c8cb Mon Sep 17 00:00:00 2001
From: Andre McCurdy <armccurdy@gmail.com>
Date: Tue, 9 Feb 2016 14:01:18 -0800
Subject: [PATCH] avoid including <sys/poll.h> directly
@@ -24,7 +24,7 @@ Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
12 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/aserver/aserver.c b/aserver/aserver.c
-index 1579da7..ef64248 100644
+index ac20706..46f731a 100644
--- a/aserver/aserver.c
+++ b/aserver/aserver.c
@@ -20,7 +20,7 @@
@@ -62,7 +62,7 @@ index 3c2766e..a546194 100644
#include <stdarg.h>
#include <endian.h>
diff --git a/include/local.h b/include/local.h
-index b429f5d..e05898f 100644
+index 317f2e3..6a43a47 100644
--- a/include/local.h
+++ b/include/local.h
@@ -47,7 +47,7 @@
@@ -73,20 +73,20 @@ index b429f5d..e05898f 100644
+#include <poll.h>
#include <sys/types.h>
#include <errno.h>
- #include <linux/types.h>
+ #if defined(__linux__)
diff --git a/src/control/control.c b/src/control/control.c
-index 4a28cf6..071c5db 100644
+index 6c00b8e..fd0c303 100644
--- a/src/control/control.c
+++ b/src/control/control.c
-@@ -48,7 +48,7 @@ and IEC958 structure.
+@@ -90,7 +90,7 @@ I/O operations.
#include <string.h>
#include <fcntl.h>
#include <signal.h>
-#include <sys/poll.h>
+#include <poll.h>
+ #include <stdbool.h>
#include "control_local.h"
- /**
diff --git a/src/control/control_shm.c b/src/control/control_shm.c
index bd07d4a..9a2e268 100644
--- a/src/control/control_shm.c
@@ -101,7 +101,7 @@ index bd07d4a..9a2e268 100644
#include <sys/uio.h>
#include <sys/mman.h>
diff --git a/src/pcm/pcm_direct.c b/src/pcm/pcm_direct.c
-index fd3877c..52ac093 100644
+index c3925cc..18f1dd5 100644
--- a/src/pcm/pcm_direct.c
+++ b/src/pcm/pcm_direct.c
@@ -30,7 +30,7 @@
@@ -114,7 +114,7 @@ index fd3877c..52ac093 100644
#include <sys/sem.h>
#include <sys/wait.h>
diff --git a/src/pcm/pcm_mmap.c b/src/pcm/pcm_mmap.c
-index 5c4fbe1..2cfa7db 100644
+index 1948289..4cf220a 100644
--- a/src/pcm/pcm_mmap.c
+++ b/src/pcm/pcm_mmap.c
@@ -22,7 +22,7 @@
@@ -153,7 +153,7 @@ index a815ac6..4ee958c 100644
#include <sys/mman.h>
#include <netinet/in.h>
diff --git a/src/seq/seq.c b/src/seq/seq.c
-index 620ca3f..681cef1 100644
+index 9279830..d2027cb 100644
--- a/src/seq/seq.c
+++ b/src/seq/seq.c
@@ -777,7 +777,7 @@ void event_filter(snd_seq_t *seq, snd_seq_event_t *ev)
@@ -179,5 +179,5 @@ index 9843aa8..eaa71f0 100644
#include <sys/shm.h>
#include "list.h"
--
-1.9.1
+2.8.1
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib_1.1.0.bb b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib_1.1.2.bb
index a73da2882..e313da78e 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib_1.1.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib_1.1.2.bb
@@ -1,6 +1,6 @@
SUMMARY = "ALSA sound library"
HOMEPAGE = "http://www.alsa-project.org"
-BUGTRACKER = "https://bugtrack.alsa-project.org/alsa-bug/login_page.php"
+BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking"
SECTION = "libs/multimedia"
LICENSE = "LGPLv2.1 & GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34 \
@@ -8,19 +8,12 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34 \
BBCLASSEXTEND = "native nativesdk"
-# configure.in sets -D__arm__ on the command line for any arm system
-# (not just those with the ARM instruction set), this should be removed,
-# (or replaced by a permitted #define).
-#FIXME: remove the following
-ARM_INSTRUCTION_SET = "arm"
-
SRC_URI = "ftp://ftp.alsa-project.org/pub/lib/${BP}.tar.bz2 \
file://Check-if-wordexp-function-is-supported.patch \
file://avoid-including-sys-poll.h-directly.patch \
- file://0001-topology-Add-missing-include-sys-stat.h.patch \
"
-SRC_URI[md5sum] = "69515ca73c3c4a212ef45160dea846c1"
-SRC_URI[sha256sum] = "dfde65d11e82b68f82e562ab6228c1fb7c78854345d3c57e2c68a9dd3dae1f15"
+SRC_URI[md5sum] = "1946e6438b8262a7b8fdadacd0e06ba7"
+SRC_URI[sha256sum] = "d38dacd9892b06b8bff04923c380b38fb2e379ee5538935ff37e45b395d861d6"
inherit autotools pkgconfig
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins/0001-pph-include-config.h-from-rate_speexrate.c.patch b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins/0001-pph-include-config.h-from-rate_speexrate.c.patch
deleted file mode 100644
index 8e5b6a2a2..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins/0001-pph-include-config.h-from-rate_speexrate.c.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 4350314c941489833a8baa930e16512e55f72a13 Mon Sep 17 00:00:00 2001
-From: Tanu Kaskinen <tanuk@iki.fi>
-Date: Wed, 27 Jan 2016 13:22:38 +0200
-Subject: [PATCH] pph: include config.h from rate_speexrate.c
-
-Fixes compilation against libspeexdsp 1.2rc3.
-
-rate_speexrate.c includes speex_resampler.h, which depends on config.h
-by referencing the HAVE_SPEEX_SPEEXDSP_TYPES_H macro. AFAIK it's not
-a good idea to include config.h from headers (I don't know/remember
-why, though), which is why I include config.h from rate_speexrate.c
-instead of speex_resampler.h.
-
-Upstream-Status: Accepted [expected in 1.1.1]
-
-Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
----
- pph/rate_speexrate.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/pph/rate_speexrate.c b/pph/rate_speexrate.c
-index 0a1325c..8fc4cef 100644
---- a/pph/rate_speexrate.c
-+++ b/pph/rate_speexrate.c
-@@ -28,6 +28,7 @@
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-+#include "config.h"
- #include <stdio.h>
- #include <alsa/asoundlib.h>
- #include <alsa/pcm_rate.h>
---
-2.7.0.rc3
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins_1.1.0.bb b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins_1.1.1.bb
index fec657530..c95ea5416 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins_1.1.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins_1.1.1.bb
@@ -1,5 +1,6 @@
SUMMARY = "ALSA Plugins"
HOMEPAGE = "http://alsa-project.org"
+BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking"
SECTION = "multimedia"
# The primary license of alsa-plugins is LGPLv2.1.
@@ -19,12 +20,9 @@ LIC_FILES_CHKSUM = "\
file://rate/rate_samplerate.c;endline=35;md5=fd77bce85f4a338c0e8ab18430b69fae \
"
-SRC_URI = "\
- ftp://ftp.alsa-project.org/pub/plugins/${BP}.tar.bz2 \
- file://0001-pph-include-config.h-from-rate_speexrate.c.patch \
-"
-SRC_URI[md5sum] = "b123e42ed881b9adbc99e4040f257c39"
-SRC_URI[sha256sum] = "3b83c329953bef99f5fe25ae04ec4a455fe6514939f3b45a5321966652b2c9ee"
+SRC_URI = "ftp://ftp.alsa-project.org/pub/plugins/${BP}.tar.bz2"
+SRC_URI[md5sum] = "69f9f3e2de3c97fc71d496e91e271fe5"
+SRC_URI[sha256sum] = "8ea4d1e082c36528a896a2581e5eb62d4dc2683238e353050d0d624e65f901f1"
DEPENDS += "alsa-lib"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/0001-Cus428Midi-Explicitly-cast-constant-to-char-type.patch b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/0001-Cus428Midi-Explicitly-cast-constant-to-char-type.patch
new file mode 100644
index 000000000..bf95cac44
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/0001-Cus428Midi-Explicitly-cast-constant-to-char-type.patch
@@ -0,0 +1,75 @@
+From 1cc0aa4dbd3c7f1267809e0e1ca57d46f4803bfd Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 17 Apr 2016 23:25:18 +0000
+Subject: [PATCH] Cus428Midi: Explicitly cast constant to char type
+
+This is flagged by gcc6
+Cus428Midi.cc:83:1: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ us428control/Cus428Midi.cc | 30 +++++++++++++++---------------
+ 1 file changed, 15 insertions(+), 15 deletions(-)
+
+diff --git a/us428control/Cus428Midi.cc b/us428control/Cus428Midi.cc
+index b9e6783..bef7bb1 100644
+--- a/us428control/Cus428Midi.cc
++++ b/us428control/Cus428Midi.cc
+@@ -32,22 +32,22 @@ char Cus428Midi::KnobParam[] = {
+ 0x2A,
+ 0x29,
+ 0x28,
+- -1,
++ static_cast<char>(-1),
+ 0x10,
+ 0x11,
+ 0x18,
+ 0x19,
+ 0x1A,
+- -1,
+- -1,
+- -1,
+- -1,
++ static_cast<char>(-1),
++ static_cast<char>(-1),
++ static_cast<char>(-1),
++ static_cast<char>(-1),
+ 0x2C,
+ 0x2D,
+ 0x2E,
+ 0x2F,
+- -1,
+- -1,
++ static_cast<char>(-1),
++ static_cast<char>(-1),
+ 0x20,
+ 0x21,
+ 0x22,
+@@ -64,14 +64,14 @@ char Cus428Midi::KnobParam[] = {
+ 5,
+ 6,
+ 7,
+- -1,
+- -1,
+- -1,
+- -1,
+- -1,
+- -1,
+- -1,
+- -1,
++ static_cast<char>(-1),
++ static_cast<char>(-1),
++ static_cast<char>(-1),
++ static_cast<char>(-1),
++ static_cast<char>(-1),
++ static_cast<char>(-1),
++ static_cast<char>(-1),
++ static_cast<char>(-1),
+ 0x30,
+ 0x31,
+ 0x32,
+--
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools_1.1.0.bb b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools_1.1.0.bb
index 9e633f1f7..8d4a14658 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools_1.1.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools_1.1.0.bb
@@ -1,6 +1,6 @@
SUMMARY = "Advanced tools for certain ALSA sound card drivers"
HOMEPAGE = "http://www.alsa-project.org"
-BUGTRACKER = "https://bugtrack.alsa-project.org/alsa-bug/login_page.php"
+BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking"
SECTION = "console/utils"
LICENSE = "GPLv2 & LGPLv2+"
DEPENDS = "alsa-lib ncurses glib-2.0"
@@ -10,11 +10,11 @@ LIC_FILES_CHKSUM = "file://hdsploader/COPYING;md5=94d55d512a9ba36caa9b7df079bae1
SRC_URI = "ftp://ftp.alsa-project.org/pub/tools/${BP}.tar.bz2 \
file://autotools.patch \
- ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', \
- 'file://makefile_no_gtk.patch', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', 'file://makefile_no_gtk.patch', d)} \
file://gitcompile_hdajacksensetest \
file://0001-as10k1-Make-output_tram_line-static-inline.patch \
- "
+ file://0001-Cus428Midi-Explicitly-cast-constant-to-char-type.patch \
+ "
SRC_URI[md5sum] = "b476a5afaa3ea3230855553ad59d259d"
SRC_URI[sha256sum] = "7d34558c590a50294b36576d257316a1ac5cd951eb8cd7d330e09f8cc757ab51"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.0.bb b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.2.bb
index a98f9b90b..fef79d9c9 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.2.bb
@@ -10,6 +10,7 @@ RDEPENDS_${PN} += "bash"
FILES_${PN} = "${sbindir}/alsaconf \
${sbindir}/alsa-info.sh \
+ ${sbindir}/alsabat-test.sh \
"
S = "${WORKDIR}/alsa-utils-${PV}"
@@ -18,4 +19,7 @@ do_install() {
install -d ${D}${sbindir}
install -m 0755 ${B}/alsaconf/alsaconf ${D}${sbindir}/
install -m 0755 ${S}/alsa-info/alsa-info.sh ${D}${sbindir}/
+ if ${@bb.utils.contains('PACKAGECONFIG', 'bat', 'true', 'false', d)}; then
+ install -m 0755 ${S}/bat/alsabat-test.sh ${D}${sbindir}/
+ fi
}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils/0001-alsabat-rename-to-avoid-naming-conflict.patch b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils/0001-alsabat-rename-to-avoid-naming-conflict.patch
deleted file mode 100644
index b6d7d4f0d..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils/0001-alsabat-rename-to-avoid-naming-conflict.patch
+++ /dev/null
@@ -1,153 +0,0 @@
-From 28c29dece6c434e7d3d01e805555ba7ddf6fba65 Mon Sep 17 00:00:00 2001
-From: "Lu, Han" <han.lu@intel.com>
-Date: Wed, 3 Feb 2016 14:20:33 +0800
-Subject: [PATCH] alsabat: rename to avoid naming conflict
-
-alsa-utils as well as bareos-bat (as well a some Bacula packages)
-all contain a program called /usr/bin/bat, which causes conflicts on
-various distributions ("basic audio tester" vs "bareos administration
-tool"("bacula administration tool")).
-Rename to avoid conflict.
-
-Signed-off-by: Lu, Han <han.lu@intel.com>
-Signed-off-by: Takashi Iwai <tiwai@suse.de>
-
-Upstream-Status: Accepted [expected in version 1.1.1]
-
-Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
----
- bat/Makefile.am | 10 +++++-----
- bat/{bat.1 => alsabat.1} | 43 ++++++++++++++++++++++---------------------
- bat/bat.c | 2 +-
- 3 files changed, 28 insertions(+), 27 deletions(-)
- rename bat/{bat.1 => alsabat.1} (72%)
-
-diff --git a/bat/Makefile.am b/bat/Makefile.am
-index 842ae6b..985f00c 100644
---- a/bat/Makefile.am
-+++ b/bat/Makefile.am
-@@ -1,9 +1,9 @@
--bin_PROGRAMS = bat
--man_MANS = bat.1
-+bin_PROGRAMS = alsabat
-+man_MANS = alsabat.1
-
--EXTRA_DIST = bat.1
-+EXTRA_DIST = alsabat.1
-
--bat_SOURCES = \
-+alsabat_SOURCES = \
- bat.c \
- common.c \
- analyze.c \
-@@ -21,4 +21,4 @@ noinst_HEADERS = \
- AM_CPPFLAGS = \
- -Wall -I$(top_srcdir)/include
-
--bat_LDADD = @FFTW_LIB@
-+alsabat_LDADD = @FFTW_LIB@
-diff --git a/bat/bat.1 b/bat/alsabat.1
-similarity index 72%
-rename from bat/bat.1
-rename to bat/alsabat.1
-index e00fc27..8d0b9c0 100644
---- a/bat/bat.1
-+++ b/bat/alsabat.1
-@@ -1,23 +1,23 @@
--.TH BAT 1 "20th October 2015"
-+.TH ALSABAT 1 "20th October 2015"
- .SH NAME
--bat \- command\-line sound tester for ALSA sound card driver
-+alsabat \- command\-line sound tester for ALSA sound card driver
-
- .SH SYNOPSIS
--\fBbat\fP [\fIflags\fP]
-+\fBalsabat\fP [\fIflags\fP]
-
- .SH DESCRIPTION
--\fBBAT(Basic Audio Tester)\fP is a simple command\-line utility intended
--to help automate audio driver and sound server testing with little human
--interaction. BAT can be used to test audio quality, stress test features
--and test audio before and after PM state changes.
-+\fBALSABAT(ALSA Basic Audio Tester)\fP is a simple command\-line utility
-+intended to help automate audio driver and sound server testing with little
-+human interaction. ALSABAT can be used to test audio quality, stress test
-+features and test audio before and after PM state changes.
-
--BAT's design is relatively simple. BAT plays an audio stream and captures
--the same stream in either a digital or analog loop back. It then compares
--the captured stream using a FFT to the original to determine if the test
--case passes or fails.
-+ALSABAT's design is relatively simple. ALSABAT plays an audio stream and
-+captures the same stream in either a digital or analog loop back. It then
-+compares the captured stream using a FFT to the original to determine if
-+the test case passes or fails.
-
--BAT can either run wholly on the target machine being tested (standalone
--mode) or can run as a client/server mode where by bat client runs on the
-+ALSABAT can either run wholly on the target machine being tested (standalone
-+mode) or can run as a client/server mode where by alsabat client runs on the
- target and runs as a server on a separate tester machine. The client/server
- mode still requires some manual interaction for synchronization, but this
- is actively being developed for future releases.
-@@ -93,8 +93,8 @@ Frequencies with amplitude larger than threshold will be recognized as a
- peak, and the frequency with largest peak value will be recognized as a
- detected frequency.
- .br
--BAT then compares the detected frequency to target frequency, to decide
--if the detecting passes or fails.
-+ALSABAT then compares the detected frequency to target frequency, to
-+decide if the detecting passes or fails.
- .br
- The default value is 3.0.
- .TP
-@@ -117,18 +117,19 @@ Target WAV file to save capture test content.
- .TP
- \fI\-\-local\fP
- Internal loopback mode.
--Playback, capture and analysis internal to BAT only. This is intended for
--developers to test new BAT features as no audio is routed outside of BAT.
-+Playback, capture and analysis internal to ALSABAT only. This is intended
-+for developers to test new ALSABAT features as no audio is routed outside
-+of ALSABAT.
-
- .SH EXAMPLES
-
- .TP
--\fBbat \-P plughw:0,0 \-C plughw:0,0 \-c 2 \-f S32_LE \-F 250\fR
-+\fBalsabat \-P plughw:0,0 \-C plughw:0,0 \-c 2 \-f S32_LE \-F 250\fR
- Generate and play a sine wave of 250 Hertz with 2 channel and S32_LE format,
- and then capture and analyze.
-
- .TP
--\fBbat \-P plughw:0,0 \-C plughw:0,0 \-\-file 500Hz.wav\fR
-+\fBalsabat \-P plughw:0,0 \-C plughw:0,0 \-\-file 500Hz.wav\fR
- Play the RIFF WAV file "500Hz.wav" which contains 500 Hertz waveform LPCM
- data, and then capture and analyze.
-
-@@ -152,7 +153,7 @@ Currently only support RIFF WAV format with PCM data. Please report any bugs to
- the alsa-devel mailing list.
-
- .SH AUTHOR
--\fBbat\fP is by Liam Girdwood <liam.r.girdwood@linux.intel.com>, Bernard Gautier
--<bernard.gautier@intel.com> and Han Lu <han.lu@intel.com>.
-+\fBalsabat\fP is by Liam Girdwood <liam.r.girdwood@linux.intel.com>, Bernard
-+Gautier <bernard.gautier@intel.com> and Han Lu <han.lu@intel.com>.
- This document is by Liam Girdwood <liam.r.girdwood@linux.intel.com> and Han Lu
- <han.lu@intel.com>.
-diff --git a/bat/bat.c b/bat/bat.c
-index 086b9fa..ddb60b7 100644
---- a/bat/bat.c
-+++ b/bat/bat.c
-@@ -272,7 +272,7 @@ static void test_capture(struct bat *bat)
- static void usage(struct bat *bat)
- {
- fprintf(bat->log,
--_("Usage: bat [-options]...\n"
-+_("Usage: alsabat [-options]...\n"
- "\n"
- " -h, --help this help\n"
- " -D pcm device for both playback and capture\n"
---
-2.7.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils_1.1.0.bb b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils_1.1.2.bb
index af4048818..a22d999fb 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils_1.1.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils_1.1.2.bb
@@ -1,6 +1,6 @@
SUMMARY = "ALSA sound utilities"
HOMEPAGE = "http://www.alsa-project.org"
-BUGTRACKER = "https://bugtrack.alsa-project.org/alsa-bug/login_page.php"
+BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking"
SECTION = "console/utils"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
@@ -8,17 +8,23 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
DEPENDS = "alsa-lib ncurses libsamplerate0"
PACKAGECONFIG ??= "udev"
-PACKAGECONFIG[bat] = "--enable-bat,--disable-bat,fftw"
+
+# alsabat can be built also without fftw support (with reduced functionality).
+# It would be better to always enable alsabat, but provide an option for
+# enabling/disabling fftw. The configure script doesn't support that, however
+# (at least in any obvious way), so for now we only support alsabat with fftw
+# or no alsabat at all.
+PACKAGECONFIG[bat] = "--enable-bat,--disable-bat,fftwf"
+
PACKAGECONFIG[udev] = "--with-udev-rules-dir=`pkg-config --variable=udevdir udev`/rules.d,,udev"
PACKAGECONFIG[xmlto] = "--enable-xmlto, --disable-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
SRC_URI = "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-${PV}.tar.bz2 \
file://0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch \
- file://0001-alsabat-rename-to-avoid-naming-conflict.patch \
"
-SRC_URI[md5sum] = "b9d6102fbbd0b68040bb77023ed30c0c"
-SRC_URI[sha256sum] = "3b1c3135b76e14532d3dd23fb15759ddd7daf9ffbc183f7a9a0a3a86374748f1"
+SRC_URI[md5sum] = "38ac7c781f80c41c02b4664d8cbafa87"
+SRC_URI[sha256sum] = "7af603c0877d1251599d65b4fbc372e63a54371b888f5c26c6a86ac1d0519071"
# lazy hack. needs proper fixing in gettext.m4, see
# http://bugs.openembedded.org/show_bug.cgi?id=2348
@@ -93,10 +99,11 @@ do_install() {
# See alsa-utils-scripts_${PV}.bb
rm ${D}${sbindir}/alsaconf
rm ${D}${sbindir}/alsa-info.sh
+ rm -f ${D}${sbindir}/alsabat-test.sh
if ${@bb.utils.contains('PACKAGECONFIG', 'udev', 'false', 'true', d)}; then
- # This is where alsa-utils will install its rules if we don't tell it anything else.
- rm -rf ${D}/lib/udev
- rmdir --ignore-fail-on-non-empty ${D}/lib
+ # This is where alsa-utils will install its rules if we don't tell it anything else.
+ rm -rf ${D}/lib/udev
+ rmdir --ignore-fail-on-non-empty ${D}/lib
fi
}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/mips64_cpu_detection.patch b/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/mips64_cpu_detection.patch
new file mode 100644
index 000000000..69429af8f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/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: ffmpeg-3.1.1/configure
+===================================================================
+--- ffmpeg-3.1.1.orig/configure
++++ ffmpeg-3.1.1/configure
+@@ -5220,12 +5220,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/ffmpeg/ffmpeg_3.0.bb b/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg_3.1.3.bb
index 1dfbb9b04..050f1eefa 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg_3.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg_3.1.3.bb
@@ -13,10 +13,11 @@ LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \
file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
-SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz"
-
-SRC_URI[md5sum] = "ef9b6634bb7c920efc940b4d55adf7b2"
-SRC_URI[sha256sum] = "12f32cee41c74435f608c30793fd616bdf53467bb513278e273e135a4c58e470"
+SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \
+ file://mips64_cpu_detection.patch \
+ "
+SRC_URI[md5sum] = "72769316a4b2b8809c7f6d5a8b6766f4"
+SRC_URI[sha256sum] = "f8575c071e2a64437aeb70c8c030b385cddbe0b5cde20c9b18a6def840128822"
# Build fails when thumb is enabled: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717
ARM_INSTRUCTION_SET = "arm"
@@ -75,6 +76,8 @@ EXTRA_OECONF = " \
--cross-prefix=${TARGET_PREFIX} \
\
--ld="${CCLD}" \
+ --cc="${CC}" \
+ --cxx="${CXX}" \
--arch=${TARGET_ARCH} \
--target-os="linux" \
--enable-cross-compile \
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
new file mode 100644
index 000000000..e3f1c4f74
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/0001-gtk-play-provide-similar-behaviour-for-quit-and-clos.patch
@@ -0,0 +1,32 @@
+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/gst-player.desktop b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/gst-player.desktop
index 9fd207b38..7ddd456a1 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/gst-player.desktop
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/gst-player.desktop
@@ -1,7 +1,7 @@
[Desktop Entry]
Name=Media Player
Comment=Basic media player
-Icon=audio-player
+Icon=multimedia-player
TryExec=gtk-play
Exec=gtk-play
StartupNotify=true
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/gtk2.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/gtk2.patch
deleted file mode 100644
index 2cd18bbc9..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/gtk2.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-As the rest of Sato is GTK+ 2, patch gtk-play to use GTK+ 2. When the rest of
-Sato has been ported to GTK+ 3 this patch can be dropped.
-
-Upstream-Status: Inappropriate
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-
-diff --git a/configure.ac b/configure.ac
-index b8af13b..90ab74c 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -60,7 +60,7 @@ AC_SUBST(GLIB_PREFIX)
- GST_PREFIX="`$PKG_CONFIG --variable=prefix gstreamer-1.0`"
- AC_SUBST(GST_PREFIX)
-
--PKG_CHECK_MODULES(GTK, [gtk+-3.0], [have_gtk="yes"], [have_gtk="no"])
-+PKG_CHECK_MODULES(GTK, [gtk+-2.0], [have_gtk="yes"], [have_gtk="no"])
- AM_CONDITIONAL(HAVE_GTK, test "x$have_gtk" != "xno")
-
- GOBJECT_INTROSPECTION_CHECK([1.31.1])
-diff --git a/gtk/gtk-play.c b/gtk/gtk-play.c
-index f015077..954d6fb 100644
---- a/gtk/gtk-play.c
-+++ b/gtk/gtk-play.c
-@@ -34,6 +34,46 @@ typedef struct
- gulong seekbar_value_changed_signal_id;
- } GtkPlay;
-
-+/* Compat stubs */
-+GtkWidget *
-+gtk_box_new (GtkOrientation orientation,
-+ gint spacing)
-+{
-+ switch (orientation) {
-+ case GTK_ORIENTATION_HORIZONTAL:
-+ return gtk_hbox_new (FALSE, spacing);
-+ case GTK_ORIENTATION_VERTICAL:
-+ return gtk_vbox_new (FALSE, spacing);
-+ }
-+}
-+
-+GtkWidget*
-+gtk_button_new_from_icon_name (const gchar *icon_name,
-+ GtkIconSize size)
-+{
-+ GtkWidget *button;
-+ GtkWidget *image;
-+
-+ image = gtk_image_new_from_icon_name (icon_name, size);
-+ button = g_object_new (GTK_TYPE_BUTTON,
-+ "image", image,
-+ NULL);
-+ return button;
-+}
-+
-+GtkWidget *
-+gtk_scale_new_with_range (GtkOrientation orientation,
-+ gdouble min,
-+ gdouble max,
-+ gdouble step)
-+{
-+ switch (orientation) {
-+ case GTK_ORIENTATION_HORIZONTAL:
-+ return gtk_hscale_new_with_range (min, max, step);
-+ case GTK_ORIENTATION_VERTICAL:
-+ return gtk_vscale_new_with_range (min, max, step);
-+ }
-+}
-
- static void
- set_title (GtkPlay * play, const gchar * title)
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 8129169c5..2a4c9dcfb 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
@@ -1,39 +1,37 @@
SUMMARY = "GStreamer playback helper library and examples"
LICENSE = "LGPL-2.0+"
-LIC_FILES_CHKSUM = "file://lib/gst/player/gstplayer.c;beginline=1;endline=19;md5=03aeca9d8295f811817909075a15ff65"
+LIC_FILES_CHKSUM = "file://gtk/gtk-play.c;beginline=1;endline=20;md5=f8c72dae3d36823ec716a9ebcae593b9"
-DEPENDS = "glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base gtk+"
+DEPENDS = "glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad gtk+3"
SRC_URI = "git://github.com/sdroege/gst-player.git \
- file://filechooser.patch \
- file://gtk2.patch \
- file://Fix-pause-play.patch \
- file://Add-error-signal-emission-for-missing-plugins.patch \
+ 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://gst-player.desktop"
-SRCREV = "5386c5b984d40ef5434673ed62204e69aaf52645"
+SRCREV = "ea90e63c1064503f9ba5d59aa4ca604f13ca5def"
+PV = "0.0.1+git${SRCPV}"
S = "${WORKDIR}/git"
-inherit autotools gtk-doc lib_package pkgconfig distro_features_check gobject-introspection
+inherit autotools pkgconfig distro_features_check
-ANY_OF_DISTRO_FEATURES = "${GTK2DISTROFEATURES}"
+ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
do_configure_prepend() {
touch ${S}/ChangeLog
}
-EXTRA_OECONF += "ac_cv_path_VALGRIND=no ac_cv_path_GDB=no"
-
do_install_append() {
install -m 0644 -D ${WORKDIR}/gst-player.desktop ${D}${datadir}/applications/gst-player.desktop
}
-FILES_${PN}-bin += "${datadir}/applications/*.desktop"
-
-RDEPENDS_${PN}-bin = "gstreamer1.0-plugins-base-playback"
-RRECOMMENDS_${PN}-bin = "gstreamer1.0-plugins-base-meta \
- gstreamer1.0-plugins-good-meta \
- gstreamer1.0-plugins-bad-meta \
- ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "gstreamer1.0-libav", "", d)} \
- ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "gstreamer1.0-plugins-ugly-meta", "", d)}"
+RDEPENDS_${PN} = "gstreamer1.0-plugins-base-playback"
+RRECOMMENDS_${PN} = "gstreamer1.0-plugins-base-meta \
+ gstreamer1.0-plugins-good-meta \
+ gstreamer1.0-plugins-bad-meta \
+ ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "gstreamer1.0-libav", "", d)} \
+ ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "gstreamer1.0-plugins-ugly-meta", "", d)}"
+RPROVIDES_${PN} += "${PN}-bin"
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 363101e1a..ea011637c 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
@@ -7,7 +7,7 @@ LICENSE_FLAGS = "commercial"
DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base zlib bzip2 xz"
-inherit autotools pkgconfig upstream-version-is-even
+inherit autotools pkgconfig upstream-version-is-even gtk-doc
# CAUTION: Using the system libav is not recommended. Since the libav API is changing all the time,
# compilation errors (and other, more subtle bugs) can happen. It is usually better to rely on the
@@ -18,6 +18,7 @@ PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl,"
PACKAGECONFIG[libav] = "--with-system-libav,,libav"
PACKAGECONFIG[orc] = "--enable-orc,--disable-orc,orc"
PACKAGECONFIG[yasm] = "--enable-yasm,--disable-yasm,yasm-native"
+PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind"
GSTREAMER_1_0_DEBUG ?= "--disable-debug"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.6.3.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.8.3.bb
index 687230a8f..3d86221d2 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.6.3.bb
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.8.3.bb
@@ -14,7 +14,7 @@ SRC_URI = " \
file://workaround-to-build-gst-libav-for-i586-with-gcc.patch \
"
-SRC_URI[md5sum] = "cfe9a06913d4fd4067e9e47f6e05fac2"
-SRC_URI[sha256sum] = "857b9c060a0337de38c6d26238c47352433c02eabf26c2f860c854dbc35bd4ab"
+SRC_URI[md5sum] = "b51a736147bacb40f85827a4e0ae0d2c"
+SRC_URI[sha256sum] = "9006a05990089f7155ee0e848042f6bb24e52ab1d0a59ff8d1b5d7e33001a495"
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
index ebc8a5ef2..f4604a34c 100644
--- 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
@@ -15,20 +15,20 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
# 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;name=base \
+ 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.7.2+git${SRCPV}"
+PV = "1.8.2+git${SRCPV}"
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
-SRCREV_base = "6c4878b6abc916b7f6f25b8926c4859119acf1ec"
-SRCREV_common = "b64f03f6090245624608beb5d2fff335e23a01c0"
-SRCREV_ffmpeg = "c40983a6f631d22fede713d535bb9c31d5c9740c"
+SRCREV_base = "f285cf0fd799cc3b46b5cecaaa439d5a2a38a9b7"
+SRCREV_common = "f363b3205658a38e84fa77f19dee218cd4445275"
+SRCREV_ffmpeg = "c66f4d1ae64dffaf456d05cbdade02054446f499"
SRCREV_FORMAT = "base"
S = "${WORKDIR}/git"
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 0fff612ee..07e5b7db5 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
@@ -7,11 +7,10 @@ LICENSE_FLAGS = "commercial"
DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad"
-inherit autotools pkgconfig gettext
+inherit autotools pkgconfig gettext gtk-doc upstream-version-is-even
acpaths = "-I ${S}/common/m4 -I ${S}/m4"
-PR = "r1"
GSTREAMER_1_0_OMX_TARGET ?= "bellagio"
GSTREAMER_1_0_OMX_CORE_NAME ?= "${libdir}/libomxil-bellagio.so.0"
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 9e2b94ede..0fe5564b5 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
@@ -21,7 +21,7 @@ PACKAGECONFIG ??= " \
${PACKAGECONFIG_GL} \
${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland egl', '', d)} \
bz2 curl dash dtls hls neon rsvg sbc smoothstreaming sndfile uvch264 webp \
"
@@ -32,13 +32,16 @@ PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl"
PACKAGECONFIG[dash] = "--enable-dash,--disable-dash,libxml2"
PACKAGECONFIG[directfb] = "--enable-directfb,--disable-directfb,directfb"
PACKAGECONFIG[dtls] = "--enable-dtls,--disable-dtls,openssl"
+PACKAGECONFIG[egl] = "--enable-egl,--disable-egl,virtual/egl"
PACKAGECONFIG[faac] = "--enable-faac,--disable-faac,faac"
PACKAGECONFIG[faad] = "--enable-faad,--disable-faad,faad2"
PACKAGECONFIG[flite] = "--enable-flite,--disable-flite,flite-alsa"
PACKAGECONFIG[fluidsynth] = "--enable-fluidsynth,--disable-fluidsynth,fluidsynth"
PACKAGECONFIG[gles2] = "--enable-gles2,--disable-gles2,virtual/libgles2"
PACKAGECONFIG[gtk] = "--enable-gtk3,--disable-gtk3,gtk+3"
-PACKAGECONFIG[hls] = "--enable-hls,--disable-hls,nettle"
+# 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[libmms] = "--enable-libmms,--disable-libmms,libmms"
PACKAGECONFIG[libssh2] = "--enable-libssh2,--disable-libssh2,libssh2"
PACKAGECONFIG[modplug] = "--enable-modplug,--disable-modplug,libmodplug"
@@ -46,7 +49,9 @@ 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[opus] = "--enable-opus,--disable-opus,libopus"
+# 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"
PACKAGECONFIG[resindvd] = "--enable-resindvd,--disable-resindvd,libdvdread libdvdnav"
PACKAGECONFIG[rsvg] = "--enable-rsvg,--disable-rsvg,librsvg"
PACKAGECONFIG[rtmp] = "--enable-rtmp,--disable-rtmp,rtmpdump"
@@ -58,19 +63,19 @@ 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 --enable-egl,--disable-wayland --disable-egl,wayland virtual/egl"
+PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,wayland-native wayland"
PACKAGECONFIG[webp] = "--enable-webp,--disable-webp,libwebp"
# these plugins have not been ported to 1.0 (yet):
-# apexsink dc1394 lv2 linsys musepack nas timidity teletextdec sdl xvid wininet
-# acm gsettings sndio cdxaparse dccp faceoverlay hdvparse tta mve nuvdemux
-# patchdetect real sdi videomeasure gsettings
+# apexsink dc1394 lv2 linsys musepack 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
+# openni2 winks direct3d directsound winscreencap acm
# apple_media android_media avc bs2b chromaprint daala dts gme gsm kate ladspa
-# libde265 mimic mpeg2enc mplex ofa openh264 opensles pvr soundtouch spandsp
-# spc vdpau wasapi x265 zbar
+# libde265 mimic mpeg2enc mplex 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
# just adding a packageconfig (it requires access to moc, uic, rcc, and qmake paths).
@@ -81,6 +86,7 @@ EXTRA_OECONF += " \
--enable-decklink \
--enable-dvb \
--enable-fbdev \
+ --enable-netsim \
--enable-shm \
--enable-vcd \
--disable-acm \
@@ -109,6 +115,7 @@ EXTRA_OECONF += " \
--disable-mplex \
--disable-musepack \
--disable-nas \
+ --disable-nvenc \
--disable-ofa \
--disable-openexr \
--disable-openh264 \
@@ -125,7 +132,9 @@ EXTRA_OECONF += " \
--disable-spc \
--disable-teletextdec \
--disable-timidity \
+ --disable-tinyalsa \
--disable-vdpau \
+ --disable-vulkan \
--disable-wasapi \
--disable-wildmidi \
--disable-wininet \
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 154d340e4..33efc503e 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
@@ -17,7 +17,7 @@ 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
-@@ -149,7 +149,7 @@ GstGL-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstgl-@GST_API_VERSION@
+@@ -167,7 +167,7 @@ GstGL-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstgl-@GST_API_VERSION@
--library=libgstgl-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
--include=GstBase-@GST_API_VERSION@ \
@@ -30,7 +30,7 @@ diff --git a/gst-libs/gst/insertbin/Makefile.am b/gst-libs/gst/insertbin/Makefil
index 09eb97c..b746885 100644
--- a/gst-libs/gst/insertbin/Makefile.am
+++ b/gst-libs/gst/insertbin/Makefile.am
-@@ -43,7 +43,7 @@ GstInsertBin-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstinsertbin-@GS
+@@ -44,7 +44,7 @@ GstInsertBin-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstinsertbin-@GS
--library=libgstinsertbin-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
--include=GstBase-@GST_API_VERSION@ \
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
new file mode 100755
index 000000000..51f4eb4b3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-enable-gldeinterlace-on-OpenGL-ES.patch
@@ -0,0 +1,634 @@
+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/0002-glplugin-glwindow-fix-memory-leak-of-navigation-thre.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-glwindow-fix-memory-leak-of-navigation-thre.patch
deleted file mode 100755
index 3491a15e6..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-glwindow-fix-memory-leak-of-navigation-thre.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 95cda7fbcf1a81289d9315c801c8e2b3d896f4cb Mon Sep 17 00:00:00 2001
-From: Haihua Hu <b55597@freescale.com>
-Date: Mon, 30 Nov 2015 09:36:09 +0800
-Subject: [PATCH 2/5] [glplugin] glwindow: fix memory leak of navigation
- thread
-
-When exit navigation thread, call g_thread_join() to release
-the resource hold by it.
-
-Upstream-Status: Backport [1.7.1]
-
-bugzilla URL: https://bugzilla.gnome.org/show_bug.cgi?id=758820
-
-Signed-off-by: Haihua Hu <b55597@freescale.com>
----
- gst-libs/gst/gl/gstglwindow.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/gst-libs/gst/gl/gstglwindow.c b/gst-libs/gst/gl/gstglwindow.c
-index 44b74ca..42ef296 100644
---- a/gst-libs/gst/gl/gstglwindow.c
-+++ b/gst-libs/gst/gl/gstglwindow.c
-@@ -343,6 +343,9 @@ gst_gl_window_finalize (GObject * object)
- while (window->nav_alive) {
- g_cond_wait (&window->nav_destroy_cond, &window->nav_lock);
- }
-+ /* release resource hold by navigation thread */
-+ g_thread_join(window->priv->navigation_thread);
-+ window->priv->navigation_thread = NULL;
- g_mutex_unlock (&window->nav_lock);
- }
-
---
-1.7.9.5
-
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
new file mode 100755
index 000000000..31d8e052f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-glcolorconvert-implement-multiple-render-targets-for.patch
@@ -0,0 +1,244 @@
+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
new file mode 100755
index 000000000..b75f402d8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-glcolorconvert-don-t-use-the-predefined-variable-nam.patch
@@ -0,0 +1,32 @@
+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
new file mode 100755
index 000000000..57e9d1a46
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-glshader-add-glBindFragDataLocation.patch
@@ -0,0 +1,77 @@
+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
new file mode 100755
index 000000000..79ef4c81a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-glcolorconvert-GLES3-deprecates-texture2D-and-it-doe.patch
@@ -0,0 +1,51 @@
+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
new file mode 100644
index 000000000..a67381cfe
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-gl-implement-GstGLMemoryEGL.patch
@@ -0,0 +1,495 @@
+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/0001-glimagesink-Downrank-to-marginal.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0009-glimagesink-Downrank-to-marginal.patch
index 1085e95e8..c81fb0f6a 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-glimagesink-Downrank-to-marginal.patch
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0009-glimagesink-Downrank-to-marginal.patch
@@ -18,7 +18,7 @@ diff --git a/ext/gl/gstopengl.c b/ext/gl/gstopengl.c
index a4b2540..0ccaacd 100644
--- a/ext/gl/gstopengl.c
+++ b/ext/gl/gstopengl.c
-@@ -101,7 +101,7 @@ plugin_init (GstPlugin * plugin)
+@@ -118,7 +118,7 @@ plugin_init (GstPlugin * plugin)
#endif
if (!gst_element_register (plugin, "glimagesink",
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bb
deleted file mode 100644
index 8eb47c265..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-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"
-
-# Note: The mpg123 plugin was moved to gst-plugins-ugly prior to the 1.7.2
-# release, so this line should be removed during the update to 1.8.x
-# https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=08d8aefcdaaf89ecb6dd53ec1e4f95cd42d01664
-PACKAGECONFIG[mpg123] = "--enable-mpg123,--disable-mpg123,mpg123"
-
-# Note: The gsettings plug-in was dropped prior to the 1.7.2 release,
-# so this line should be removed during the update to 1.8.x
-# https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=914291808ad10621d6a74031f3d46d45eef5a3a3
-EXTRA_OECONF += "--disable-gsettings"
-
-SRC_URI = " \
- http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-${PV}.tar.xz \
- file://configure-allow-to-disable-libssh2.patch \
- file://0001-glimagesink-Downrank-to-marginal.patch \
- file://0002-glplugin-glwindow-fix-memory-leak-of-navigation-thre.patch \
-"
-
-SRC_URI[md5sum] = "4857adcafe41e4b9b8805cf88303bd55"
-SRC_URI[sha256sum] = "971b29101d6a9c5e3fe94d99d977a227f58f0b2d29b6ca2c7f292052542b3a61"
-
-S = "${WORKDIR}/gst-plugins-bad-${PV}"
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.8.3.bb
new file mode 100644
index 000000000..108f4db10
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.3.bb
@@ -0,0 +1,26 @@
+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 = " \
+ http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-${PV}.tar.xz \
+ 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 \
+ 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 \
+"
+SRC_URI[md5sum] = "955281a43e98c5464563fa049e0a0911"
+SRC_URI[sha256sum] = "7899fcb18e6a1af2888b19c90213af018a57d741c6e72ec56b133bc73ec8509b"
+
+S = "${WORKDIR}/gst-plugins-bad-${PV}"
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
index ef6581b2a..1370380b9 100644
--- 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
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=73a5855a8119deb017f5f13cf327095d \
file://gst/tta/filters.h;beginline=12;endline=29;md5=8a08270656f2f8ad7bb3655b83138e5a"
SRC_URI = " \
- git://anongit.freedesktop.org/gstreamer/gst-plugins-bad;name=base \
+ 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 \
@@ -17,36 +17,16 @@ SRC_URI = " \
file://0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch \
"
-PV = "1.7.2+git${SRCPV}"
+PV = "1.8.2+git${SRCPV}"
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
-SRCREV_base = "50ae46cc0f8827bf966920d9c221e5cf86e811ba"
-SRCREV_common = "a25397448942079002622be231e9ec49b985745a"
+SRCREV_base = "5e73b5a4843d9675246f4efec158624475ed9586"
+SRCREV_common = "f363b3205658a38e84fa77f19dee218cd4445275"
SRCREV_FORMAT = "base"
S = "${WORKDIR}/git"
-# over-ride the default hls PACKAGECONFIG in gstreamer1.0-plugins-bad.inc to
-# pass an additional --with-hls-crypto=XXX option (new in 1.7.x) and switch HLS
-# AES decryption from nettle to openssl (ie a shared dependency with dtls).
-# This should move back to the common .inc once the main recipe updates to 1.8.x
-PACKAGECONFIG[hls] = "--enable-hls --with-hls-crypto=openssl,--disable-hls,openssl"
-
-# The tinyalsa plugin was added prior to the 1.7.2 release
-# https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=c8bd74fa9a81398f57d976c478d2043f30188684
-PACKAGECONFIG[tinyalsa] = "--enable-tinyalsa,--disable-tinyalsa,tinyalsa"
-
-# The vulkan based video sink plugin was added prior to the 1.7.2 release
-# https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=5de6dd9f40629562acf90e35e1fa58464d66617d
-PACKAGECONFIG[vulkan] = "--enable-vulkan,--disable-vulkan,libxcb"
-
-# The dependency-less netsim plugin was added prior to the 1.7.2 release
-# https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=e3f9e854f08e82bfab11182c5a2aa6f9a0c73cd5
-EXTRA_OECONF += " \
- --enable-netsim \
-"
-
do_configure_prepend() {
${S}/autogen.sh --noconfigure
}
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 7381458f4..a04f155dc 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
@@ -31,6 +31,7 @@ PACKAGECONFIG[cdparanoia] = "--enable-cdparanoia,--disable-cdparanoia,cdparano
PACKAGECONFIG[gio-unix-2.0] = "--enable-gio_unix_2_0,--disable-gio_unix_2_0,glib-2.0"
PACKAGECONFIG[ivorbis] = "--enable-ivorbis,--disable-ivorbis,tremor"
PACKAGECONFIG[ogg] = "--enable-ogg,--disable-ogg,libogg"
+PACKAGECONFIG[opus] = "--enable-opus,--disable-opus,libopus"
PACKAGECONFIG[pango] = "--enable-pango,--disable-pango,pango"
PACKAGECONFIG[theora] = "--enable-theora,--disable-theora,libtheora"
PACKAGECONFIG[visual] = "--enable-libvisual,--disable-libvisual,libvisual"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch
index 781e4d801..094bdac84 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch
@@ -24,7 +24,7 @@ diff --git a/gst-libs/gst/allocators/Makefile.am b/gst-libs/gst/allocators/Makef
index 9361bf9..bc7f53a 100644
--- a/gst-libs/gst/allocators/Makefile.am
+++ b/gst-libs/gst/allocators/Makefile.am
-@@ -37,7 +37,7 @@ GstAllocators-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstallocators-@
+@@ -38,7 +38,7 @@ GstAllocators-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstallocators-@
--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
--library=libgstallocators-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
@@ -37,7 +37,7 @@ diff --git a/gst-libs/gst/app/Makefile.am b/gst-libs/gst/app/Makefile.am
index 6d6de8d..dcc2fe0 100644
--- a/gst-libs/gst/app/Makefile.am
+++ b/gst-libs/gst/app/Makefile.am
-@@ -52,7 +52,7 @@ GstApp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstapp-@GST_API_VERSIO
+@@ -53,7 +53,7 @@ GstApp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstapp-@GST_API_VERSIO
--library=libgstapp-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
--include=GstBase-@GST_API_VERSION@ \
@@ -50,7 +50,7 @@ diff --git a/gst-libs/gst/audio/Makefile.am b/gst-libs/gst/audio/Makefile.am
index 275d222..2374196 100644
--- a/gst-libs/gst/audio/Makefile.am
+++ b/gst-libs/gst/audio/Makefile.am
-@@ -106,7 +106,7 @@ GstAudio-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstaudio-@GST_API_VE
+@@ -116,7 +116,7 @@ GstAudio-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstaudio-@GST_API_VE
--include=Gst-@GST_API_VERSION@ \
--include=GstBase-@GST_API_VERSION@ \
--include=GstTag-@GST_API_VERSION@ \
@@ -63,7 +63,7 @@ diff --git a/gst-libs/gst/fft/Makefile.am b/gst-libs/gst/fft/Makefile.am
index 09b3d68..f545354 100644
--- a/gst-libs/gst/fft/Makefile.am
+++ b/gst-libs/gst/fft/Makefile.am
-@@ -64,7 +64,7 @@ GstFft-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstfft-@GST_API_VERSIO
+@@ -65,7 +65,7 @@ GstFft-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstfft-@GST_API_VERSIO
--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
--library=libgstfft-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
@@ -76,7 +76,7 @@ diff --git a/gst-libs/gst/pbutils/Makefile.am b/gst-libs/gst/pbutils/Makefile.am
index 64d5eb0..91dc214 100644
--- a/gst-libs/gst/pbutils/Makefile.am
+++ b/gst-libs/gst/pbutils/Makefile.am
-@@ -94,7 +94,7 @@ GstPbutils-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstpbutils-@GST_AP
+@@ -99,7 +99,7 @@ GstPbutils-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstpbutils-@GST_AP
--include=GstTag-@GST_API_VERSION@ \
--include=GstVideo-@GST_API_VERSION@ \
--include=GstAudio-@GST_API_VERSION@ \
@@ -102,7 +102,7 @@ diff --git a/gst-libs/gst/rtp/Makefile.am b/gst-libs/gst/rtp/Makefile.am
index fdd01c1..f5445c1 100644
--- a/gst-libs/gst/rtp/Makefile.am
+++ b/gst-libs/gst/rtp/Makefile.am
-@@ -64,7 +64,7 @@ GstRtp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtp-@GST_API_VERSIO
+@@ -65,7 +65,7 @@ GstRtp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtp-@GST_API_VERSIO
--library=libgstrtp-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
--include=GstBase-@GST_API_VERSION@ \
@@ -115,7 +115,7 @@ diff --git a/gst-libs/gst/rtsp/Makefile.am b/gst-libs/gst/rtsp/Makefile.am
index ede5706..9b0b258 100644
--- a/gst-libs/gst/rtsp/Makefile.am
+++ b/gst-libs/gst/rtsp/Makefile.am
-@@ -71,7 +71,7 @@ GstRtsp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtsp-@GST_API_VERS
+@@ -72,7 +72,7 @@ GstRtsp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtsp-@GST_API_VERS
--include=Gio-2.0 \
--include=Gst-@GST_API_VERSION@ \
--include=GstSdp-@GST_API_VERSION@ \
@@ -128,7 +128,7 @@ diff --git a/gst-libs/gst/sdp/Makefile.am b/gst-libs/gst/sdp/Makefile.am
index a90f30b..0e149b8 100644
--- a/gst-libs/gst/sdp/Makefile.am
+++ b/gst-libs/gst/sdp/Makefile.am
-@@ -31,7 +31,7 @@ GstSdp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstsdp-@GST_API_VERSIO
+@@ -32,7 +32,7 @@ GstSdp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstsdp-@GST_API_VERSIO
--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
--library=libgstsdp-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
@@ -141,7 +141,7 @@ diff --git a/gst-libs/gst/tag/Makefile.am b/gst-libs/gst/tag/Makefile.am
index c534a4d..cafafd3 100644
--- a/gst-libs/gst/tag/Makefile.am
+++ b/gst-libs/gst/tag/Makefile.am
-@@ -44,7 +44,7 @@ GstTag-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgsttag-@GST_API_VERSIO
+@@ -45,7 +45,7 @@ GstTag-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgsttag-@GST_API_VERSIO
--library=libgsttag-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
--include=GstBase-@GST_API_VERSION@ \
@@ -154,7 +154,7 @@ diff --git a/gst-libs/gst/video/Makefile.am b/gst-libs/gst/video/Makefile.am
index 5d31fa1..ac64eb3 100644
--- a/gst-libs/gst/video/Makefile.am
+++ b/gst-libs/gst/video/Makefile.am
-@@ -113,7 +113,7 @@ GstVideo-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstvideo-@GST_API_VE
+@@ -116,7 +116,7 @@ GstVideo-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstvideo-@GST_API_VE
--library=libgstvideo-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
--include=GstBase-@GST_API_VERSION@ \
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch
index 85fcacb55..0a8bc9b07 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch
@@ -24,7 +24,7 @@ diff --git a/gst-libs/gst/allocators/Makefile.am b/gst-libs/gst/allocators/Makef
index bc7f53a..0ef5f86 100644
--- a/gst-libs/gst/allocators/Makefile.am
+++ b/gst-libs/gst/allocators/Makefile.am
-@@ -34,7 +34,7 @@ GstAllocators-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstallocators-@
+@@ -35,7 +35,7 @@ GstAllocators-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstallocators-@
--c-include "gst/allocators/allocators.h" \
-I$(top_srcdir)/gst-libs \
-I$(top_builddir)/gst-libs \
@@ -33,7 +33,7 @@ index bc7f53a..0ef5f86 100644
--library=libgstallocators-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
--libtool="$(LIBTOOL)" \
-@@ -58,7 +58,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+@@ -59,7 +59,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
$(INTROSPECTION_COMPILER) \
--includedir=$(srcdir) \
--includedir=$(builddir) \
@@ -46,7 +46,7 @@ diff --git a/gst-libs/gst/app/Makefile.am b/gst-libs/gst/app/Makefile.am
index dcc2fe0..dc076cb 100644
--- a/gst-libs/gst/app/Makefile.am
+++ b/gst-libs/gst/app/Makefile.am
-@@ -47,8 +47,8 @@ GstApp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstapp-@GST_API_VERSIO
+@@ -48,8 +48,8 @@ GstApp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstapp-@GST_API_VERSIO
--c-include "gst/app/app.h" \
-I$(top_srcdir)/gst-libs \
-I$(top_builddir)/gst-libs \
@@ -61,7 +61,7 @@ diff --git a/gst-libs/gst/audio/Makefile.am b/gst-libs/gst/audio/Makefile.am
index 2374196..295eb42 100644
--- a/gst-libs/gst/audio/Makefile.am
+++ b/gst-libs/gst/audio/Makefile.am
-@@ -96,12 +96,12 @@ GstAudio-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstaudio-@GST_API_VE
+@@ -106,12 +106,12 @@ GstAudio-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstaudio-@GST_API_VE
-I$(top_srcdir)/gst-libs \
-I$(top_builddir)/gst-libs \
--c-include "gst/audio/audio.h" \
@@ -78,7 +78,7 @@ index 2374196..295eb42 100644
--library-path="$(top_builddir)/gst-libs/gst/tag/" \
--include=Gst-@GST_API_VERSION@ \
--include=GstBase-@GST_API_VERSION@ \
-@@ -130,8 +130,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+@@ -140,8 +140,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
--includedir=$(srcdir) \
--includedir=$(builddir) \
--includedir="$(top_builddir)/gst-libs/gst/tag/" \
@@ -93,7 +93,7 @@ diff --git a/gst-libs/gst/fft/Makefile.am b/gst-libs/gst/fft/Makefile.am
index f545354..1bb6243 100644
--- a/gst-libs/gst/fft/Makefile.am
+++ b/gst-libs/gst/fft/Makefile.am
-@@ -61,7 +61,7 @@ GstFft-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstfft-@GST_API_VERSIO
+@@ -62,7 +62,7 @@ GstFft-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstfft-@GST_API_VERSIO
--c-include "gst/fft/fft.h" \
-I$(top_srcdir)/gst-libs \
-I$(top_builddir)/gst-libs \
@@ -102,7 +102,7 @@ index f545354..1bb6243 100644
--library=libgstfft-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
--libtool="$(LIBTOOL)" \
-@@ -85,7 +85,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+@@ -86,7 +86,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
$(INTROSPECTION_COMPILER) \
--includedir=$(srcdir) \
--includedir=$(builddir) \
@@ -115,7 +115,7 @@ diff --git a/gst-libs/gst/pbutils/Makefile.am b/gst-libs/gst/pbutils/Makefile.am
index 91dc214..dc8e1d3 100644
--- a/gst-libs/gst/pbutils/Makefile.am
+++ b/gst-libs/gst/pbutils/Makefile.am
-@@ -79,14 +79,14 @@ GstPbutils-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstpbutils-@GST_AP
+@@ -84,14 +84,14 @@ GstPbutils-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstpbutils-@GST_AP
--c-include "gst/pbutils/pbutils.h" \
-I$(top_srcdir)/gst-libs \
-I$(top_builddir)/gst-libs \
@@ -134,7 +134,7 @@ index 91dc214..dc8e1d3 100644
--library-path="$(top_builddir)/gst-libs/gst/tag/" \
--library-path="$(top_builddir)/gst-libs/gst/video/" \
--library-path="$(top_builddir)/gst-libs/gst/audio/" \
-@@ -119,8 +119,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+@@ -124,8 +124,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
$(INTROSPECTION_COMPILER) \
--includedir=$(srcdir) \
--includedir=$(builddir) \
@@ -175,7 +175,7 @@ diff --git a/gst-libs/gst/rtp/Makefile.am b/gst-libs/gst/rtp/Makefile.am
index f5445c1..527c0b4 100644
--- a/gst-libs/gst/rtp/Makefile.am
+++ b/gst-libs/gst/rtp/Makefile.am
-@@ -59,8 +59,8 @@ GstRtp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtp-@GST_API_VERSIO
+@@ -60,8 +60,8 @@ GstRtp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtp-@GST_API_VERSIO
--c-include "gst/rtp/rtp.h" \
-I$(top_builddir)/gst-libs \
-I$(top_srcdir)/gst-libs \
@@ -186,7 +186,7 @@ index f5445c1..527c0b4 100644
--library=libgstrtp-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
--include=GstBase-@GST_API_VERSION@ \
-@@ -87,8 +87,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+@@ -88,8 +88,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
$(INTROSPECTION_COMPILER) \
--includedir=$(srcdir) \
--includedir=$(builddir) \
@@ -201,7 +201,7 @@ diff --git a/gst-libs/gst/rtsp/Makefile.am b/gst-libs/gst/rtsp/Makefile.am
index 9b0b258..4f6d9f8 100644
--- a/gst-libs/gst/rtsp/Makefile.am
+++ b/gst-libs/gst/rtsp/Makefile.am
-@@ -66,7 +66,7 @@ GstRtsp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtsp-@GST_API_VERS
+@@ -67,7 +67,7 @@ GstRtsp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtsp-@GST_API_VERS
-I$(top_builddir)/gst-libs \
-I$(top_srcdir)/gst-libs \
--add-include-path=$(builddir)/../sdp \
@@ -210,7 +210,7 @@ index 9b0b258..4f6d9f8 100644
--library=libgstrtsp-@GST_API_VERSION@.la \
--include=Gio-2.0 \
--include=Gst-@GST_API_VERSION@ \
-@@ -96,7 +96,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+@@ -97,7 +97,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
--includedir=$(srcdir) \
--includedir=$(builddir) \
--includedir=$(builddir)/../sdp \
@@ -223,7 +223,7 @@ diff --git a/gst-libs/gst/sdp/Makefile.am b/gst-libs/gst/sdp/Makefile.am
index 0e149b8..9aa0512 100644
--- a/gst-libs/gst/sdp/Makefile.am
+++ b/gst-libs/gst/sdp/Makefile.am
-@@ -28,7 +28,7 @@ GstSdp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstsdp-@GST_API_VERSIO
+@@ -29,7 +29,7 @@ GstSdp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstsdp-@GST_API_VERSIO
--warn-all \
--c-include "gst/sdp/sdp.h" \
-I$(top_srcdir)/gst-libs \
@@ -232,7 +232,7 @@ index 0e149b8..9aa0512 100644
--library=libgstsdp-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
--libtool="$(LIBTOOL)" \
-@@ -52,7 +52,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+@@ -53,7 +53,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
$(INTROSPECTION_COMPILER) \
--includedir=$(srcdir) \
--includedir=$(builddir) \
@@ -245,7 +245,7 @@ diff --git a/gst-libs/gst/tag/Makefile.am b/gst-libs/gst/tag/Makefile.am
index cafafd3..ba99279 100644
--- a/gst-libs/gst/tag/Makefile.am
+++ b/gst-libs/gst/tag/Makefile.am
-@@ -39,8 +39,8 @@ GstTag-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgsttag-@GST_API_VERSIO
+@@ -40,8 +40,8 @@ GstTag-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgsttag-@GST_API_VERSIO
--c-include "gst/tag/tag.h" \
-I$(top_srcdir)/gst-libs \
-I$(top_builddir)/gst-libs \
@@ -256,7 +256,7 @@ index cafafd3..ba99279 100644
--library=libgsttag-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
--include=GstBase-@GST_API_VERSION@ \
-@@ -67,8 +67,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+@@ -68,8 +68,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
$(INTROSPECTION_COMPILER) \
--includedir=$(srcdir) \
--includedir=$(builddir) \
@@ -271,7 +271,7 @@ diff --git a/gst-libs/gst/video/Makefile.am b/gst-libs/gst/video/Makefile.am
index ac64eb3..342c8c6 100644
--- a/gst-libs/gst/video/Makefile.am
+++ b/gst-libs/gst/video/Makefile.am
-@@ -108,8 +108,8 @@ GstVideo-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstvideo-@GST_API_VE
+@@ -111,8 +111,8 @@ GstVideo-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstvideo-@GST_API_VE
--c-include "gst/video/video.h" \
-I$(top_srcdir)/gst-libs \
-I$(top_builddir)/gst-libs \
@@ -282,7 +282,7 @@ index ac64eb3..342c8c6 100644
--library=libgstvideo-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
--include=GstBase-@GST_API_VERSION@ \
-@@ -136,8 +136,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+@@ -139,8 +139,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
$(INTROSPECTION_COMPILER) \
--includedir=$(srcdir) \
--includedir=$(builddir) \
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch
index 42d99c1db..4adf60546 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch
@@ -14,7 +14,7 @@ diff --git a/gst-libs/gst/rtsp/Makefile.am b/gst-libs/gst/rtsp/Makefile.am
index 4f6d9f8..0afa370 100644
--- a/gst-libs/gst/rtsp/Makefile.am
+++ b/gst-libs/gst/rtsp/Makefile.am
-@@ -74,7 +74,6 @@ GstRtsp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtsp-@GST_API_VERS
+@@ -75,7 +75,6 @@ GstRtsp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtsp-@GST_API_VERS
--libtool="$(LIBTOOL)" \
--pkg gio-2.0 \
--pkg gstreamer-@GST_API_VERSION@ \
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch
index 7813915d8..b924e3882 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch
@@ -51,7 +51,7 @@ index b565e93..7741ccc
GST_WARNING_OBJECT (self, "seek to 0 bytes failed");
}
-@@ -1632,8 +1630,10 @@ gst_sub_parse_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
+@@ -1641,8 +1639,10 @@ gst_sub_parse_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
gst_event_parse_segment (event, &s);
if (s->format == GST_FORMAT_TIME)
gst_event_copy_segment (event, &self->segment);
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-convertframe-Support-video-crop-when-convert-frame.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-convertframe-Support-video-crop-when-convert-frame.patch
deleted file mode 100755
index 096a6f4cb..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-convertframe-Support-video-crop-when-convert-frame.patch
+++ /dev/null
@@ -1,143 +0,0 @@
-From 5be6ed00aad028d9cbb4e0c63af0be69d335c71e Mon Sep 17 00:00:00 2001
-From: Song Bing <b06498@freescale.com>
-Date: Fri, 11 Dec 2015 21:42:00 +0800
-Subject: [PATCH] convertframe: Support video crop when convert frame
-
-Get thumbnail will user convertframe to convert video frame to
-desired video format and size. But haven't process crop meta on
-the video buffer. Add support video crop.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=759329
-
-Upstream-Status: Backport [1.7.1]
-
----
- gst-libs/gst/video/convertframe.c | 65 +++++++++++++++++++++++++++++++++------
- 1 file changed, 56 insertions(+), 9 deletions(-)
-
-diff --git a/gst-libs/gst/video/convertframe.c b/gst-libs/gst/video/convertframe.c
-index aa9c3d3..942a51e 100644
---- a/gst-libs/gst/video/convertframe.c
-+++ b/gst-libs/gst/video/convertframe.c
-@@ -110,12 +110,23 @@ fail:
- static GstElement *
- build_convert_frame_pipeline (GstElement ** src_element,
- GstElement ** sink_element, const GstCaps * from_caps,
-- const GstCaps * to_caps, GError ** err)
-+ GstVideoCropMeta * cmeta, const GstCaps * to_caps, GError ** err)
- {
-- GstElement *src = NULL, *csp = NULL, *vscale = NULL;
-- GstElement *sink = NULL, *encoder = NULL, *pipeline;
-+ GstElement *vcrop = NULL, *csp = NULL, *csp2 = NULL, *vscale = NULL;
-+ GstElement *src = NULL, *sink = NULL, *encoder = NULL, *pipeline;
-+ GstVideoInfo info;
- GError *error = NULL;
-
-+ if (cmeta) {
-+ if (!create_element ("videocrop", &vcrop, &error)) {
-+ g_warning
-+ ("build_convert_frame_pipeline: Buffer has crop metadata but videocrop element is not found. Cropping will be disabled");
-+ } else {
-+ if (!create_element ("videoconvert", &csp2, &error))
-+ goto no_elements;
-+ }
-+ }
-+
- /* videoscale is here to correct for the pixel-aspect-ratio for us */
- GST_DEBUG ("creating elements");
- if (!create_element ("appsrc", &src, &error) ||
-@@ -133,15 +144,42 @@ build_convert_frame_pipeline (GstElement ** src_element,
-
- GST_DEBUG ("adding elements");
- gst_bin_add_many (GST_BIN (pipeline), src, csp, vscale, sink, NULL);
-+ if (vcrop)
-+ gst_bin_add_many (GST_BIN (pipeline), vcrop, csp2, NULL);
-
- /* set caps */
- g_object_set (src, "caps", from_caps, NULL);
-+ if (vcrop) {
-+ gst_video_info_from_caps (&info, from_caps);
-+ g_object_set (vcrop, "left", cmeta->x, NULL);
-+ g_object_set (vcrop, "top", cmeta->y, NULL);
-+ g_object_set (vcrop, "right", GST_VIDEO_INFO_WIDTH (&info) - cmeta->width,
-+ NULL);
-+ g_object_set (vcrop, "bottom",
-+ GST_VIDEO_INFO_HEIGHT (&info) - cmeta->height, NULL);
-+ GST_DEBUG ("crop meta [x,y,width,height]: %d %d %d %d", cmeta->x, cmeta->y,
-+ cmeta->width, cmeta->height);
-+ }
- g_object_set (sink, "caps", to_caps, NULL);
-
- /* FIXME: linking is still way too expensive, profile this properly */
-- GST_DEBUG ("linking src->csp");
-- if (!gst_element_link_pads (src, "src", csp, "sink"))
-- goto link_failed;
-+ if (vcrop) {
-+ GST_DEBUG ("linking src->csp2");
-+ if (!gst_element_link_pads (src, "src", csp2, "sink"))
-+ goto link_failed;
-+
-+ GST_DEBUG ("linking csp2->vcrop");
-+ if (!gst_element_link_pads (csp2, "src", vcrop, "sink"))
-+ goto link_failed;
-+
-+ GST_DEBUG ("linking vcrop->csp");
-+ if (!gst_element_link_pads (vcrop, "src", csp, "sink"))
-+ goto link_failed;
-+ } else {
-+ GST_DEBUG ("linking src->csp");
-+ if (!gst_element_link_pads (src, "src", csp, "sink"))
-+ goto link_failed;
-+ }
-
- GST_DEBUG ("linking csp->vscale");
- if (!gst_element_link_pads_full (csp, "src", vscale, "sink",
-@@ -193,8 +231,12 @@ no_elements:
- {
- if (src)
- gst_object_unref (src);
-+ if (vcrop)
-+ gst_object_unref (vcrop);
- if (csp)
- gst_object_unref (csp);
-+ if (csp2)
-+ gst_object_unref (csp2);
- if (vscale)
- gst_object_unref (vscale);
- if (sink)
-@@ -209,7 +251,11 @@ no_elements:
- no_pipeline:
- {
- gst_object_unref (src);
-+ if (vcrop)
-+ gst_object_unref (vcrop);
- gst_object_unref (csp);
-+ if (csp2)
-+ gst_object_unref (csp2);
- gst_object_unref (vscale);
- gst_object_unref (sink);
-
-@@ -282,7 +328,8 @@ gst_video_convert_sample (GstSample * sample, const GstCaps * to_caps,
- }
-
- pipeline =
-- build_convert_frame_pipeline (&src, &sink, from_caps, to_caps_copy, &err);
-+ build_convert_frame_pipeline (&src, &sink, from_caps,
-+ gst_buffer_get_video_crop_meta (buf), to_caps_copy, &err);
- if (!pipeline)
- goto no_pipeline;
-
-@@ -646,8 +693,8 @@ gst_video_convert_sample_async (GstSample * sample,
- }
-
- pipeline =
-- build_convert_frame_pipeline (&src, &sink, from_caps, to_caps_copy,
-- &error);
-+ build_convert_frame_pipeline (&src, &sink, from_caps,
-+ gst_buffer_get_video_crop_meta (buf), to_caps_copy, &error);
- if (!pipeline)
- goto no_pipeline;
-
---
-2.5.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch
index 325671721..5341e3cfc 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch
@@ -17,7 +17,7 @@ diff --git a/gst/encoding/gstencodebin.c b/gst/encoding/gstencodebin.c
index 6728e58..32daae4 100644
--- a/gst/encoding/gstencodebin.c
+++ b/gst/encoding/gstencodebin.c
-@@ -1138,8 +1138,7 @@ _create_stream_group (GstEncodeBin * ebin, GstEncodingProfile * sprof,
+@@ -1228,8 +1228,7 @@ _create_stream_group (GstEncodeBin * ebin, GstEncodingProfile * sprof,
* We only use a 1buffer long queue here, the actual queueing will be done
* in the input queue */
last = sgroup->outqueue = gst_element_factory_make ("queue", NULL);
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/get-caps-from-src-pad-when-query-caps.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/get-caps-from-src-pad-when-query-caps.patch
index 284abbe94..c8e6287a5 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/get-caps-from-src-pad-when-query-caps.patch
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/get-caps-from-src-pad-when-query-caps.patch
@@ -19,7 +19,7 @@ new mode 100755
index 9b6c478..ae2294a
--- a/gst-libs/gst/tag/gsttagdemux.c
+++ b/gst-libs/gst/tag/gsttagdemux.c
-@@ -1708,6 +1708,19 @@ gst_tag_demux_pad_query (GstPad * pad, GstObject * parent, GstQuery * query)
+@@ -1769,6 +1769,19 @@ gst_tag_demux_pad_query (GstPad * pad, GstObject * parent, GstQuery * query)
}
break;
}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/make-gio_unix_2_0-dependency-configurable.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/make-gio_unix_2_0-dependency-configurable.patch
index 01e944ddd..413eff069 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/make-gio_unix_2_0-dependency-configurable.patch
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/make-gio_unix_2_0-dependency-configurable.patch
@@ -25,8 +25,8 @@ diff --git a/configure.ac b/configure.ac
index 9c52aeb..26cacd6 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -747,9 +747,16 @@ AC_SUBST(FT2_CFLAGS)
- AC_SUBST(FT2_LIBS)
+@@ -752,9 +752,16 @@ AC_SUBST(FT2_CFLAGS)
+ fi dnl of EXT plugins
dnl *** gio-unix-2.0 for tests/check/pipelines/tcp.c ***
+AC_ARG_ENABLE([gio_unix_2_0],
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.6.3.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.8.3.bb
index 429dc9338..986b5ac60 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.6.3.bb
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.8.3.bb
@@ -4,22 +4,16 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c54ce9345727175ff66d17b67ff51f58 \
file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \
file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607"
-# Note: The dependency on freetype was dropped shortly after the 1.7.1 release
-# so these lines should be removed during the update to 1.8.x
-# http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=183610c035dd6955c9b3540b940aec50474af031
-DEPENDS += "freetype"
-EXTRA_OECONF += "--disable-freetypetest"
-
SRC_URI = " \
http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-${PV}.tar.xz \
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://0005-convertframe-Support-video-crop-when-convert-frame.patch \
+ file://make-gio_unix_2_0-dependency-configurable.patch \
"
-SRC_URI[md5sum] = "3ddde0ad598ef69f58d6a2e87f8b460f"
-SRC_URI[sha256sum] = "b6154f8fdba4877e95efd94610ef0ada4f0171cd12eb829a3c3c97345d9c7a75"
+SRC_URI[md5sum] = "4d03dd81828ea6b98a44c8f1ab7f4976"
+SRC_URI[sha256sum] = "114871d4d63606b4af424a8433cd923e4ff66896b244bb7ac97b9da47f71e79e"
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
index 38a9fcc29..3c2b50400 100644
--- 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
@@ -7,17 +7,21 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c54ce9345727175ff66d17b67ff51f58 \
file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607"
SRC_URI = " \
- git://anongit.freedesktop.org/gstreamer/gst-plugins-base;name=base \
+ 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.7.2+git${SRCPV}"
+PV = "1.8.2+git${SRCPV}"
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
-SRCREV_base = "97e108bebaa58821f4566a74cbf0135e93407c01"
-SRCREV_common = "b64f03f6090245624608beb5d2fff335e23a01c0"
+SRCREV_base = "70f3750773bf5dba4098f6d72d63aa6c84f1f539"
+SRCREV_common = "f363b3205658a38e84fa77f19dee218cd4445275"
SRCREV_FORMAT = "base"
S = "${WORKDIR}/git"
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 4621bf894..f1e30aba5 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
@@ -23,12 +23,12 @@ PACKAGECONFIG[gudev] = "--with-gudev,--without-gudev,libgudev"
PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack"
PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg"
PACKAGECONFIG[libpng] = "--enable-libpng,--disable-libpng,libpng"
-PACKAGECONFIG[libv4l2] = "--with-libv4l2,--without-libv4l2,libv4l2"
+PACKAGECONFIG[libv4l2] = "--with-libv4l2,--without-libv4l2,v4l-utils"
PACKAGECONFIG[pulseaudio] = "--enable-pulse,--disable-pulse,pulseaudio"
PACKAGECONFIG[soup] = "--enable-soup,--disable-soup,libsoup-2.4"
PACKAGECONFIG[speex] = "--enable-speex,--disable-speex,speex"
PACKAGECONFIG[taglib] = "--enable-taglib,--disable-taglib,taglib"
-PACKAGECONFIG[v4l2] = "--enable-gst_v4l2,--disable-gst_v4l2"
+PACKAGECONFIG[v4l2] = "--enable-gst_v4l2 --enable-v4l2-probe,--disable-gst_v4l2"
PACKAGECONFIG[vpx] = "--enable-vpx,--disable-vpx,libvpx"
PACKAGECONFIG[wavpack] = "--enable-wavpack,--disable-wavpack,wavpack"
PACKAGECONFIG[x11] = "--enable-x,--disable-x,${X11DEPENDS}"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch
index d1973d439..a2cbb70fe 100755..100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch
@@ -17,7 +17,7 @@ diff --git a/gst/rtp/gstrtpmp4gpay.c b/gst/rtp/gstrtpmp4gpay.c
index 7913d9a..1749d39 100644
--- a/gst/rtp/gstrtpmp4gpay.c
+++ b/gst/rtp/gstrtpmp4gpay.c
-@@ -390,6 +390,7 @@ gst_rtp_mp4g_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
+@@ -391,6 +391,7 @@ gst_rtp_mp4g_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
const GValue *codec_data;
const gchar *media_type = NULL;
gboolean res;
@@ -25,7 +25,7 @@ index 7913d9a..1749d39 100644
rtpmp4gpay = GST_RTP_MP4G_PAY (payload);
-@@ -400,7 +401,6 @@ gst_rtp_mp4g_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
+@@ -401,7 +402,6 @@ gst_rtp_mp4g_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
GST_LOG_OBJECT (rtpmp4gpay, "got codec_data");
if (G_VALUE_TYPE (codec_data) == GST_TYPE_BUFFER) {
GstBuffer *buffer;
@@ -33,7 +33,7 @@ index 7913d9a..1749d39 100644
buffer = gst_value_get_buffer (codec_data);
GST_LOG_OBJECT (rtpmp4gpay, "configuring codec_data");
-@@ -426,6 +426,23 @@ gst_rtp_mp4g_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
+@@ -427,6 +427,23 @@ gst_rtp_mp4g_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
rtpmp4gpay->config = gst_buffer_copy (buffer);
}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.6.3.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.8.3.bb
index 0b4f43690..5cc6578b7 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.6.3.bb
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.8.3.bb
@@ -7,9 +7,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
SRC_URI = " \
http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-${PV}.tar.xz \
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 \
"
-SRC_URI[md5sum] = "a1958df7aa498b42793e2f2048673815"
-SRC_URI[sha256sum] = "24b19db70b2a83461ebddfe20033db432dadfdb5d4b54ffb1dfa0d830134a177"
+SRC_URI[md5sum] = "473ebb1f15c67de99ddb6e4d027c0876"
+SRC_URI[sha256sum] = "a1d6579ba203a7734927c24b90bf6590d846c5a5fcec01a48201018c8ad2827a"
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
index 9cadc9afc..9b79af2a9 100644
--- 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
@@ -7,18 +7,19 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe"
SRC_URI = " \
- git://anongit.freedesktop.org/gstreamer/gst-plugins-good;name=base \
+ 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.7.2+git${SRCPV}"
+PV = "1.8.2+git${SRCPV}"
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
-SRCREV_base = "1b6fdce67c15d59957e395b1957aa625322092d4"
-SRCREV_common = "b64f03f6090245624608beb5d2fff335e23a01c0"
+SRCREV_base = "9f73b5818f98cd045e7049bb313da1c943635109"
+SRCREV_common = "f363b3205658a38e84fa77f19dee218cd4445275"
SRCREV_FORMAT = "base"
S = "${WORKDIR}/git"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly.inc b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly.inc
index aff223072..708ad7a15 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly.inc
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly.inc
@@ -9,7 +9,7 @@ inherit gettext
PACKAGECONFIG ??= " \
${GSTREAMER_ORC} \
- a52dec lame mad mpeg2dec \
+ a52dec lame mpg123 mpeg2dec \
"
PACKAGECONFIG[a52dec] = "--enable-a52dec,--disable-a52dec,liba52"
@@ -20,6 +20,7 @@ PACKAGECONFIG[dvdread] = "--enable-dvdread,--disable-dvdread,libdvdread"
PACKAGECONFIG[lame] = "--enable-lame,--disable-lame,lame"
PACKAGECONFIG[mad] = "--enable-mad,--disable-mad,libmad"
PACKAGECONFIG[mpeg2dec] = "--enable-mpeg2dec,--disable-mpeg2dec,mpeg2dec"
+PACKAGECONFIG[mpg123] = "--enable-mpg123,--disable-mpg123,mpg123"
PACKAGECONFIG[x264] = "--enable-x264,--disable-x264,x264"
EXTRA_OECONF += " \
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.6.3.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.8.3.bb
index 7edfb81d2..274593796 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.6.3.bb
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.8.3.bb
@@ -7,7 +7,7 @@ SRC_URI = " \
http://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-${PV}.tar.xz \
"
-SRC_URI[md5sum] = "dbd92afb3816cbfa90ab1f197144a2e2"
-SRC_URI[sha256sum] = "2fecf7b7c7882f8f62f1900048f4013f98c214fb3d3303d8d812245bb41fd064"
+SRC_URI[md5sum] = "4fc66c77253b0ad5ce224bda654b2e7d"
+SRC_URI[sha256sum] = "6fa2599fdd072d31fbaf50c34af406e2be944a010b1f4eab67a5fe32a0310693"
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
index 69afe4cfb..22cca3a8d 100644
--- 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
@@ -6,24 +6,20 @@ 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;name=base \
+ 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.7.2+git${SRCPV}"
+PV = "1.8.2+git${SRCPV}"
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
-SRCREV_base = "8bdb68edbc605e21314b608e7a39bdbaab7302b8"
-SRCREV_common = "b64f03f6090245624608beb5d2fff335e23a01c0"
+SRCREV_base = "79fe43c00925455a37fab6fc428e7f08655a9bbd"
+SRCREV_common = "f363b3205658a38e84fa77f19dee218cd4445275"
SRCREV_FORMAT = "base"
S = "${WORKDIR}/git"
-# The mpg123 plugin was added prior to the 1.7.2 release
-# https://cgit.freedesktop.org/gstreamer/gst-plugins-ugly/commit/?id=43bd45ba991ef3247957ca37cdcb52f4b8c0acb1
-PACKAGECONFIG[mpg123] = "--enable-mpg123,--disable-mpg123,mpg123"
-
do_configure_prepend() {
${S}/autogen.sh --noconfigure
}
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 2dcec509d..9cfcec3ca 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
@@ -5,7 +5,7 @@ SECTION = "multimedia"
DEPENDS = "gstreamer1.0 glib-2.0-native"
-inherit autotools pkgconfig upstream-version-is-even gobject-introspection
+inherit autotools pkgconfig upstream-version-is-even gobject-introspection gtk-doc
acpaths = "-I ${S}/common/m4 -I ${S}/m4"
@@ -33,8 +33,21 @@ SRC_URI_append = " file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_
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
+ rm -f "${S}/common/m4/gtk-doc.m4"
}
-do_configure[prefuncs] += " delete_pkg_m4_file"
+# gstreamer is not using system-wide makefiles (which we patch in gtkdoc recipe,
+# but its own custom ones, which we have to patch here
+patch_gtk_doc_makefiles() {
+ # Patch the gtk-doc makefiles so that the qemu wrapper is used to run transient binaries
+ # instead of libtool wrapper or running them directly
+ # Also substitute a bogus plugin scanner, as trying to run the real one is causing issues during build on x86_64.
+ sed -i \
+ -e "s|GTKDOC_RUN =.*|GTKDOC_RUN = \$(top_builddir)/gtkdoc-qemuwrapper|" \
+ -e "s|\$(GTKDOC_EXTRA_ENVIRONMENT)|\$(GTKDOC_EXTRA_ENVIRONMENT) GST_PLUGIN_SCANNER_1_0=\$(top_builddir)/libs/gst/helpers/gst-plugin-scanner-dummy|" \
+ ${S}/common/gtk-doc*mak
+}
+
+do_configure[prefuncs] += " delete_pkg_m4_file patch_gtk_doc_makefiles"
PACKAGES_DYNAMIC = "^${PN}-.*"
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 ae6d36477..13ba40d3d 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
@@ -13,12 +13,26 @@ SRC_URI = "http://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz
S = "${WORKDIR}/${PNREAL}-${PV}"
-inherit autotools pkgconfig upstream-version-is-even gobject-introspection
+inherit autotools pkgconfig upstream-version-is-even gobject-introspection gtk-doc
+
+# Starting with 1.8.0 gst-rtsp-server includes dependency-less plugins as well
+LIBV = "1.0"
+require gst-plugins-package.inc
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
}
-do_configure[prefuncs] += " delete_pkg_m4_file"
+# gstreamer is not using system-wide makefiles (which we patch in gtkdoc recipe,
+# but its own custom ones, which we have to patch here
+patch_gtk_doc_makefiles() {
+ # Patch the gtk-doc makefiles so that the qemu wrapper is used to run transient binaries
+ # instead of libtool wrapper or running them directly
+ sed -i \
+ -e "s|GTKDOC_RUN =.*|GTKDOC_RUN = \$(top_builddir)/gtkdoc-qemuwrapper|" \
+ ${S}/common/gtk-doc*mak
+}
+
+do_configure[prefuncs] += " delete_pkg_m4_file patch_gtk_doc_makefiles"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.6.2.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.6.2.bb
deleted file mode 100644
index 5bdae6cf9..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.6.2.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-include gstreamer1.0-rtsp-server.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d"
-
-SRC_URI[md5sum] = "a1cafefb5fc14ac5d7e7d8cdbdfa9694"
-SRC_URI[sha256sum] = "0f51f9879556c0950203c766b09a1b62f1f25b17f9a7d516e01b13ecf93c8858"
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
new file mode 100644
index 000000000..17059d070
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.8.3.bb
@@ -0,0 +1,6 @@
+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.inc b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
index 10b4668e5..cb0bd82f2 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
@@ -8,7 +8,7 @@ LICENSE = "LGPLv2+"
DEPENDS = "glib-2.0 glib-2.0-native libcap libxml2 bison-native flex-native"
-inherit autotools pkgconfig gettext upstream-version-is-even gobject-introspection
+inherit autotools pkgconfig gettext upstream-version-is-even gobject-introspection gtk-doc
# This way common/m4/introspection.m4 will come first
# (it has a custom INTROSPECTION_INIT macro, and so must be used instead of our common introspection.m4 file)
@@ -20,16 +20,16 @@ SRC_URI_append = " \
PACKAGECONFIG ??= ""
-PACKAGECONFIG[check] = "--enable-check,--disable-check"
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,"
EXTRA_OECONF = " \
--disable-dependency-tracking \
--disable-docbook \
--disable-examples \
- --disable-gtk-doc \
"
CACHED_CONFIGUREVARS += "ac_cv_header_valgrind_valgrind_h=no"
@@ -49,9 +49,22 @@ RRECOMMENDS_${PN}_qemux86-64 += "kernel-module-snd-ens1370 kernel-module-snd-raw
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
+ rm -f "${S}/common/m4/gtk-doc.m4"
}
-do_configure[prefuncs] += " delete_pkg_m4_file"
+# gstreamer is not using system-wide makefiles (which we patch in gtkdoc recipe,
+# but its own custom ones, which we have to patch here
+patch_gtk_doc_makefiles() {
+ # Patch the gtk-doc makefiles so that the qemu wrapper is used to run transient binaries
+ # instead of libtool wrapper or running them directly
+ # Also substitute a bogus plugin scanner, as trying to run the real one is causing issues during build on x86_64.
+ sed -i \
+ -e "s|GTKDOC_RUN =.*|GTKDOC_RUN = \$(top_builddir)/gtkdoc-qemuwrapper|" \
+ -e "s|\$(GTKDOC_EXTRA_ENVIRONMENT)|\$(GTKDOC_EXTRA_ENVIRONMENT) GST_PLUGIN_SCANNER_1_0=\$(top_builddir)/libs/gst/helpers/gst-plugin-scanner-dummy|" \
+ ${S}/common/gtk-doc*mak
+}
+
+do_configure[prefuncs] += " delete_pkg_m4_file patch_gtk_doc_makefiles"
do_compile_prepend() {
export GIR_EXTRA_LIBS_PATH="${B}/gst/.libs:${B}/libs/gst/base/.libs"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-Fix-crash-with-gst-inspect.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-Fix-crash-with-gst-inspect.patch
deleted file mode 100644
index 94f5cc56e..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-Fix-crash-with-gst-inspect.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 6b26f3dbf9bf577d71534ab7410de66d06e46ba2 Mon Sep 17 00:00:00 2001
-From: Carlos Rafael Giani <dv@pseudoterminal.org>
-Date: Sat, 6 Apr 2013 23:52:11 +0200
-Subject: [PATCH] Fix crash with gst-inspect Chris Lord <chris@openedhand.com>
-
-Upstream-Status: Pending
-
-Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
----
- tools/gst-inspect.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tools/gst-inspect.c b/tools/gst-inspect.c
-index 23b7c44..b79b02e 100644
---- a/tools/gst-inspect.c
-+++ b/tools/gst-inspect.c
-@@ -1556,7 +1556,7 @@ main (int argc, char *argv[])
- g_option_context_add_main_entries (ctx, options, GETTEXT_PACKAGE);
- g_option_context_add_group (ctx, gst_init_get_option_group ());
- if (!g_option_context_parse (ctx, &argc, &argv, &err)) {
-- g_printerr ("Error initializing: %s\n", err->message);
-+ g_printerr ("Error initializing: %s\n", err ? err->message : "(null)");
- return -1;
- }
- g_option_context_free (ctx);
---
-1.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.6.3.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.8.3.bb
index ba1b83b08..d3561ebbd 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.6.3.bb
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.8.3.bb
@@ -5,10 +5,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \
SRC_URI = " \
http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz \
- file://0001-Fix-crash-with-gst-inspect.patch \
"
-SRC_URI[md5sum] = "b4cdeb2b9cb20dd6ac022a4f417eae0d"
-SRC_URI[sha256sum] = "22f9568d67b87cf700a111f381144bd37cb93790a77e4e331db01fe854a37f24"
+SRC_URI[md5sum] = "e88dad542df9d986822e982105d2b530"
+SRC_URI[sha256sum] = "66b37762d4fdcd63bce5a2bec57e055f92420e95037361609900278c0db7c53f"
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
index 7715bb202..6112f2a89 100644
--- 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
@@ -6,25 +6,20 @@ 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;name=base \
+ git://anongit.freedesktop.org/gstreamer/gstreamer;branch=1.8;name=base \
git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;name=common \
"
-PV = "1.7.2+git${SRCPV}"
+PV = "1.8.2+git${SRCPV}"
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
-SRCREV_base = "9e33bfa2c7a5f43da2c49b0a8235fd43cba9feaf"
-SRCREV_common = "b64f03f6090245624608beb5d2fff335e23a01c0"
+SRCREV_base = "3de8a4f728a7194a12b784ec4085f6a8e7d9b5bd"
+SRCREV_common = "f363b3205658a38e84fa77f19dee218cd4445275"
SRCREV_FORMAT = "base"
S = "${WORKDIR}/git"
-# The option to configure tracer hooks was added prior to the 1.7.2 release
-# https://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=e5ca47236e4df4683707f0bcf99181a937d358d5
-PACKAGECONFIG[gst-tracer-hooks] = "--enable-gst-tracer-hooks,--disable-gst-tracer-hooks,"
-PACKAGECONFIG[trace-historic] = "--enable-trace,--disable-trace,"
-
do_configure_prepend() {
${S}/autogen.sh --noconfigure
}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/lame/lame/lame-3.99.5_fix_for_automake-1.12.x.patch b/import-layers/yocto-poky/meta/recipes-multimedia/lame/lame/lame-3.99.5_fix_for_automake-1.12.x.patch
index 571a1d07a..51baef26f 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/lame/lame/lame-3.99.5_fix_for_automake-1.12.x.patch
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/lame/lame/lame-3.99.5_fix_for_automake-1.12.x.patch
@@ -4,7 +4,7 @@ Fix this kind of errors with automake 1.12.x:
| doc/man/Makefile.am:3: error: automatic de-ANSI-fication support has been removed
| autoreconf: automake failed with exit status: 1
-Signed-Off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
+Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2012/07/13
Index: lame-3.99.5/configure.in
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/add-pkgconfig.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/add-pkgconfig.patch
deleted file mode 100644
index b49dc8c98..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/add-pkgconfig.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-Here is a patch for adding pkg-config support to libmad.
-It would make life a bit easier for distro maintainers if this was applied.
-In case you didn't know, pkg-config is a tool for providing LDFLAGS and
-CFLAGS for packages using shared libraries. It's on freedesktop.org.
-Debian has already been distributing the pkg-config file mad.pc with
-libmad for some time, and people developing on debian (notably xmms2
-developers) have started relying on this support being present, causing
-some confusion for people installing from source and on some BSDs which
-do not provide mad.pc (google: pkgconfig libmad).
-
-EMH
-
-Upstream-Status: Inappropriate [configuration]
-
---h31gzZEtNLTqOjlF
-Content-Type: text/plain; charset=us-ascii
-Content-Disposition: attachment; filename=&quot;libmad-0.15.1b-pkgconfig.patch&quot;
-
-diff -Naur libmad-0.15.1b.old/configure.ac libmad-0.15.1b/configure.ac
---- libmad-0.15.1b.old/configure.ac 2004-01-23 10:41:32.000000000 +0100
-+++ libmad-0.15.1b/configure.ac 2004-08-07 02:25:24.633462168 +0200
-@@ -429,5 +429,5 @@
- dnl AC_SUBST(LTLIBOBJS)
-
- AC_CONFIG_FILES([Makefile msvc++/Makefile \
-- libmad.list])
-+ libmad.list mad.pc])
- AC_OUTPUT
-diff -Naur libmad-0.15.1b.old/mad.pc.in libmad-0.15.1b/mad.pc.in
---- libmad-0.15.1b.old/mad.pc.in 1970-01-01 01:00:00.000000000 +0100
-+++ libmad-0.15.1b/mad.pc.in 2004-08-07 02:04:59.617692872 +0200
-@@ -0,0 +1,14 @@
-+# libmad pkg-config source file
-+
-+prefix=@prefix@
-+exec_prefix=@exec_prefix@
-+libdir=@libdir@
-+includedir=@includedir@
-+
-+Name: mad
-+Description: MPEG Audio Decoder
-+Version: @VERSION@
-+Requires:
-+Conflicts:
-+Libs: -L${libdir} -lmad -lm
-+Cflags: -I${includedir}
-diff -Naur libmad-0.15.1b.old/Makefile.am libmad-0.15.1b/Makefile.am
---- libmad-0.15.1b.old/Makefile.am 2004-02-17 03:02:03.000000000 +0100
-+++ libmad-0.15.1b/Makefile.am 2004-08-07 02:03:19.859858368 +0200
-@@ -24,6 +24,9 @@
- SUBDIRS =
- DIST_SUBDIRS = msvc++
-
-+pkgconfigdir = $(libdir)/pkgconfig
-+pkgconfig_DATA = mad.pc
-+
- lib_LTLIBRARIES = libmad.la
- include_HEADERS = mad.h
-
-@@ -34,7 +37,8 @@
- minimad_LDADD = libmad.la
-
- EXTRA_DIST = mad.h.sed \
-- CHANGES COPYRIGHT CREDITS README TODO VERSION
-+ CHANGES COPYRIGHT CREDITS README TODO VERSION \
-+ mad.pc.in
-
- exported_headers = version.h fixed.h bit.h timer.h stream.h frame.h \
- synth.h decoder.h
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/automake-foreign.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/automake-foreign.patch
deleted file mode 100644
index 3e544248d..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/automake-foreign.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Pass foreign to AM_INIT_AUTOMAKE so it doesn't enforce GNU strictness.
-
-Upstream-Status: Pending
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-diff --git a/configure.ac b/configure.ac
-index e602fd3..e075b86 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -29 +29 @@ AC_CONFIG_SRCDIR([decoder.h])
--AM_INIT_AUTOMAKE
-+AM_INIT_AUTOMAKE([foreign])
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/fix_for_mips_with_gcc-4.5.0.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/fix_for_mips_with_gcc-4.5.0.patch
deleted file mode 100644
index 01c7aa3c8..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/fix_for_mips_with_gcc-4.5.0.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-gcc 4.4 did this: The MIPS port no longer recognizes the h asm constraint. It was necessary to remove this constraint in order to avoid generating unpredictable code sequences.
-
-so the libmad build with gcc-4.5.0 was failing.
-
-Found a solution here:
-
-http://us.generation-nt.com/answer/bug-568418-libmad0-dev-mpg321-compilation-errors-mips-mipsel-architectures-help-169033451.html
-
-Upstream-Status: Pending
-
-2010/07/29
-Nitin A Kamble <nitin.a.kamble@intel.com>
-
-Index: libmad-0.15.1b/fixed.h
-===================================================================
---- libmad-0.15.1b.orig/fixed.h
-+++ libmad-0.15.1b/fixed.h
-@@ -297,6 +297,15 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t
-
- /* --- MIPS ---------------------------------------------------------------- */
-
-+# elif defined(FPM_MIPS) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
-+ typedef unsigned int u64_di_t __attribute__ ((mode (DI)));
-+# define MAD_F_MLX(hi, lo, x, y) \
-+ do { \
-+ u64_di_t __ll = (u64_di_t) (x) * (y); \
-+ hi = __ll >> 32; \
-+ lo = __ll; \
-+ } while (0)
-+
- # elif defined(FPM_MIPS)
-
- /*
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/no-force-mem.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/no-force-mem.patch
deleted file mode 100644
index d5e6d206e..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/no-force-mem.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-This option no longer exists in gcc 3.4.1
-
-RP - 18/07/2008
-
-Upstream-Status: Inappropriate [configuration]
-
-Index: libmad-0.15.1b/configure.ac
-===================================================================
---- libmad-0.15.1b.orig/configure.ac 2008-07-18 15:45:30.000000000 +0100
-+++ libmad-0.15.1b/configure.ac 2008-07-18 15:45:37.000000000 +0100
-@@ -140,7 +140,6 @@
- case "$optimize" in
- -O|"-O "*)
- optimize="-O"
-- optimize="$optimize -fforce-mem"
- optimize="$optimize -fforce-addr"
- : #x optimize="$optimize -finline-functions"
- : #- optimize="$optimize -fstrength-reduce"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/obsolete_automake_macros.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/obsolete_automake_macros.patch
deleted file mode 100644
index cc87d299e..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/obsolete_automake_macros.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Upstream-Status: Submitted [https://sourceforge.net/tracker/?group_id=12349&atid=112349]
-
-Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
-diff -Nurd libmad-0.15.1b/configure.ac libmad-0.15.1b/configure.ac
---- libmad-0.15.1b/configure.ac 2004-01-23 11:41:32.000000000 +0200
-+++ libmad-0.15.1b/configure.ac 2013-01-03 08:28:23.718693697 +0200
-@@ -28,7 +28,7 @@
-
- AM_INIT_AUTOMAKE
-
--AM_CONFIG_HEADER([config.h])
-+AC_CONFIG_HEADERS([config.h])
-
- dnl System type.
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad_0.15.1b.bb b/import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad_0.15.1b.bb
deleted file mode 100644
index d431abdaa..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad_0.15.1b.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-SUMMARY = "MPEG Audio Decoder library"
-HOMEPAGE = "http://sourceforge.net/projects/mad/"
-BUGTRACKER = "http://sourceforge.net/tracker/?group_id=12349&atid=112349"
-LICENSE = "GPLv2+"
-LICENSE_FLAGS = "commercial"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://COPYRIGHT;md5=8e55eb14894e782b84488d5a239bc23d \
- file://version.h;beginline=1;endline=8;md5=aa07311dd39288d4349f28e1de516454"
-SECTION = "libs"
-DEPENDS = "libid3tag"
-PR = "r3"
-
-SRC_URI = "ftp://ftp.mars.org/pub/mpeg/libmad-${PV}.tar.gz \
- file://no-force-mem.patch \
- file://add-pkgconfig.patch \
- file://fix_for_mips_with_gcc-4.5.0.patch \
- file://obsolete_automake_macros.patch \
- file://automake-foreign.patch \
-"
-
-SRC_URI[md5sum] = "1be543bc30c56fb6bea1d7bf6a64e66c"
-SRC_URI[sha256sum] = "bbfac3ed6bfbc2823d3775ebb931087371e142bb0e9bb1bee51a76a6e0078690"
-
-S = "${WORKDIR}/libmad-${PV}"
-
-inherit autotools pkgconfig
-
-EXTRA_OECONF = "-enable-speed --enable-shared"
-EXTRA_OECONF_append_arm = " --enable-fpm=arm"
-
-do_configure_prepend () {
-# damn picky automake...
- touch NEWS AUTHORS ChangeLog
-}
-
-ARM_INSTRUCTION_SET = "arm"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libpng/libpng_1.6.21.bb b/import-layers/yocto-poky/meta/recipes-multimedia/libpng/libpng_1.6.24.bb
index 58cef1ff3..f91ab7ffc 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/libpng/libpng_1.6.21.bb
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libpng/libpng_1.6.24.bb
@@ -2,14 +2,14 @@ SUMMARY = "PNG image format decoding library"
HOMEPAGE = "http://www.libpng.org/"
SECTION = "libs"
LICENSE = "Libpng"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=06a1b6fde6d93170bb72201c8000bf3d \
- file://png.h;endline=112;md5=9a8b5f83e1e8046df672deab87f235be"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=5089214833586ba444048fd1dbbc76a4 \
+ file://png.h;endline=149;md5=376d8ff7f69b7c4ad3a09f4672cec696"
DEPENDS = "zlib"
SRC_URI = "${GENTOO_MIRROR}/libpng-${PV}.tar.xz \
"
-SRC_URI[md5sum] = "3bacb4728f6694a64ad9052769d6a4ce"
-SRC_URI[sha256sum] = "6c8f1849eb9264219bf5d703601e5abe92a58651ecae927a03d1a1aa15ee2083"
+SRC_URI[md5sum] = "ffcdbd549814787fa8010c372e35ff25"
+SRC_URI[sha256sum] = "7932dc9e5e45d55ece9d204e90196bbb5f2c82741ccb0f7e10d07d364a6fd6dd"
BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config"
@@ -20,6 +20,6 @@ EXTRA_OECONF_append_class-target = " ${@bb.utils.contains("TUNE_FEATURES", "neon
PACKAGES =+ "${PN}-tools"
-FILES_${PN}-tools = "${bindir}/png-fix-itxt ${bindir}/pngfix"
+FILES_${PN}-tools = "${bindir}/png-fix-itxt ${bindir}/pngfix ${bindir}/pngcp"
BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.26.bb b/import-layers/yocto-poky/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.27.bb
index 80435d4b5..ec4171943 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.26.bb
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.27.bb
@@ -7,8 +7,8 @@ LICENSE = "LGPLv2.1"
SRC_URI = "http://www.mega-nerd.com/libsndfile/files/libsndfile-${PV}.tar.gz"
-SRC_URI[md5sum] = "ec810a0c60c08772a8a5552704b63393"
-SRC_URI[sha256sum] = "cd6520ec763d1a45573885ecb1f8e4e42505ac12180268482a44b28484a25092"
+SRC_URI[md5sum] = "fd1d97c6077f03b5d984d7956ffedb7a"
+SRC_URI[sha256sum] = "a391952f27f4a92ceb2b4c06493ac107896ed6c76be9a613a4731f076d30fac0"
LIC_FILES_CHKSUM = "file://COPYING;md5=e77fe93202736b47c07035910f47974a"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2015-8665_8683.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2015-8665_8683.patch
new file mode 100644
index 000000000..39c5059c7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2015-8665_8683.patch
@@ -0,0 +1,137 @@
+From f94a29a822f5528d2334592760fbb7938f15eb55 Mon Sep 17 00:00:00 2001
+From: erouault <erouault>
+Date: Sat, 26 Dec 2015 17:32:03 +0000
+Subject: [PATCH] * libtiff/tif_getimage.c: fix out-of-bound reads in
+ TIFFRGBAImage interface in case of unsupported values of
+ SamplesPerPixel/ExtraSamples for LogLUV / CIELab. Add explicit call to
+ TIFFRGBAImageOK() in TIFFRGBAImageBegin(). Fix CVE-2015-8665 reported by
+ limingxing and CVE-2015-8683 reported by zzf of Alibaba.
+
+Upstream-Status: Backport
+CVE: CVE-2015-8665
+CVE: CVE-2015-8683
+https://github.com/vadz/libtiff/commit/f94a29a822f5528d2334592760fbb7938f15eb55
+
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+---
+ ChangeLog | 8 ++++++++
+ libtiff/tif_getimage.c | 35 ++++++++++++++++++++++-------------
+ 2 files changed, 30 insertions(+), 13 deletions(-)
+
+Index: tiff-4.0.6/libtiff/tif_getimage.c
+===================================================================
+--- tiff-4.0.6.orig/libtiff/tif_getimage.c
++++ tiff-4.0.6/libtiff/tif_getimage.c
+@@ -182,20 +182,22 @@ TIFFRGBAImageOK(TIFF* tif, char emsg[102
+ "Planarconfiguration", td->td_planarconfig);
+ return (0);
+ }
+- if( td->td_samplesperpixel != 3 )
++ if( td->td_samplesperpixel != 3 || colorchannels != 3 )
+ {
+ sprintf(emsg,
+- "Sorry, can not handle image with %s=%d",
+- "Samples/pixel", td->td_samplesperpixel);
++ "Sorry, can not handle image with %s=%d, %s=%d",
++ "Samples/pixel", td->td_samplesperpixel,
++ "colorchannels", colorchannels);
+ return 0;
+ }
+ break;
+ case PHOTOMETRIC_CIELAB:
+- if( td->td_samplesperpixel != 3 || td->td_bitspersample != 8 )
++ if( td->td_samplesperpixel != 3 || colorchannels != 3 || td->td_bitspersample != 8 )
+ {
+ sprintf(emsg,
+- "Sorry, can not handle image with %s=%d and %s=%d",
++ "Sorry, can not handle image with %s=%d, %s=%d and %s=%d",
+ "Samples/pixel", td->td_samplesperpixel,
++ "colorchannels", colorchannels,
+ "Bits/sample", td->td_bitspersample);
+ return 0;
+ }
+@@ -255,6 +257,9 @@ TIFFRGBAImageBegin(TIFFRGBAImage* img, T
+ int colorchannels;
+ uint16 *red_orig, *green_orig, *blue_orig;
+ int n_color;
++
++ if( !TIFFRGBAImageOK(tif, emsg) )
++ return 0;
+
+ /* Initialize to normal values */
+ img->row_offset = 0;
+@@ -2508,29 +2513,33 @@ PickContigCase(TIFFRGBAImage* img)
+ case PHOTOMETRIC_RGB:
+ switch (img->bitspersample) {
+ case 8:
+- if (img->alpha == EXTRASAMPLE_ASSOCALPHA)
++ if (img->alpha == EXTRASAMPLE_ASSOCALPHA &&
++ img->samplesperpixel >= 4)
+ img->put.contig = putRGBAAcontig8bittile;
+- else if (img->alpha == EXTRASAMPLE_UNASSALPHA)
++ else if (img->alpha == EXTRASAMPLE_UNASSALPHA &&
++ img->samplesperpixel >= 4)
+ {
+ if (BuildMapUaToAa(img))
+ img->put.contig = putRGBUAcontig8bittile;
+ }
+- else
++ else if( img->samplesperpixel >= 3 )
+ img->put.contig = putRGBcontig8bittile;
+ break;
+ case 16:
+- if (img->alpha == EXTRASAMPLE_ASSOCALPHA)
++ if (img->alpha == EXTRASAMPLE_ASSOCALPHA &&
++ img->samplesperpixel >=4 )
+ {
+ if (BuildMapBitdepth16To8(img))
+ img->put.contig = putRGBAAcontig16bittile;
+ }
+- else if (img->alpha == EXTRASAMPLE_UNASSALPHA)
++ else if (img->alpha == EXTRASAMPLE_UNASSALPHA &&
++ img->samplesperpixel >=4 )
+ {
+ if (BuildMapBitdepth16To8(img) &&
+ BuildMapUaToAa(img))
+ img->put.contig = putRGBUAcontig16bittile;
+ }
+- else
++ else if( img->samplesperpixel >=3 )
+ {
+ if (BuildMapBitdepth16To8(img))
+ img->put.contig = putRGBcontig16bittile;
+@@ -2539,7 +2548,7 @@ PickContigCase(TIFFRGBAImage* img)
+ }
+ break;
+ case PHOTOMETRIC_SEPARATED:
+- if (buildMap(img)) {
++ if (img->samplesperpixel >=4 && buildMap(img)) {
+ if (img->bitspersample == 8) {
+ if (!img->Map)
+ img->put.contig = putRGBcontig8bitCMYKtile;
+@@ -2635,7 +2644,7 @@ PickContigCase(TIFFRGBAImage* img)
+ }
+ break;
+ case PHOTOMETRIC_CIELAB:
+- if (buildMap(img)) {
++ if (img->samplesperpixel == 3 && buildMap(img)) {
+ if (img->bitspersample == 8)
+ img->put.contig = initCIELabConversion(img);
+ break;
+Index: tiff-4.0.6/ChangeLog
+===================================================================
+--- tiff-4.0.6.orig/ChangeLog
++++ tiff-4.0.6/ChangeLog
+@@ -1,3 +1,11 @@
++2015-12-26 Even Rouault <even.rouault at spatialys.com>
++
++ * libtiff/tif_getimage.c: fix out-of-bound reads in TIFFRGBAImage
++ interface in case of unsupported values of SamplesPerPixel/ExtraSamples
++ for LogLUV / CIELab. Add explicit call to TIFFRGBAImageOK() in
++ TIFFRGBAImageBegin(). Fix CVE-2015-8665 reported by limingxing and
++ CVE-2015-8683 reported by zzf of Alibaba.
++
+ 2015-09-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * libtiff 4.0.6 released.
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2015-8781.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2015-8781.patch
new file mode 100644
index 000000000..0846f0f68
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2015-8781.patch
@@ -0,0 +1,195 @@
+From aaab5c3c9d2a2c6984f23ccbc79702610439bc65 Mon Sep 17 00:00:00 2001
+From: erouault <erouault>
+Date: Sun, 27 Dec 2015 16:25:11 +0000
+Subject: [PATCH] * libtiff/tif_luv.c: fix potential out-of-bound writes in
+ decode functions in non debug builds by replacing assert()s by regular if
+ checks (bugzilla #2522). Fix potential out-of-bound reads in case of short
+ input data.
+
+Upstream-Status: Backport
+
+https://github.com/vadz/libtiff/commit/aaab5c3c9d2a2c6984f23ccbc79702610439bc65
+hand applied Changelog changes
+
+CVE: CVE-2015-8781
+
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+---
+ ChangeLog | 7 +++++++
+ libtiff/tif_luv.c | 55 ++++++++++++++++++++++++++++++++++++++++++++-----------
+ 2 files changed, 51 insertions(+), 11 deletions(-)
+
+Index: tiff-4.0.4/ChangeLog
+===================================================================
+--- tiff-4.0.4.orig/ChangeLog
++++ tiff-4.0.4/ChangeLog
+@@ -1,3 +1,10 @@
++2015-12-27 Even Rouault <even.rouault at spatialys.com>
++
++ * libtiff/tif_luv.c: fix potential out-of-bound writes in decode
++ functions in non debug builds by replacing assert()s by regular if
++ checks (bugzilla #2522).
++ Fix potential out-of-bound reads in case of short input data.
++
+ 2015-12-26 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_getimage.c: fix out-of-bound reads in TIFFRGBAImage
+Index: tiff-4.0.4/libtiff/tif_luv.c
+===================================================================
+--- tiff-4.0.4.orig/libtiff/tif_luv.c
++++ tiff-4.0.4/libtiff/tif_luv.c
+@@ -202,7 +202,11 @@ LogL16Decode(TIFF* tif, uint8* op, tmsiz
+ if (sp->user_datafmt == SGILOGDATAFMT_16BIT)
+ tp = (int16*) op;
+ else {
+- assert(sp->tbuflen >= npixels);
++ if(sp->tbuflen < npixels) {
++ TIFFErrorExt(tif->tif_clientdata, module,
++ "Translation buffer too short");
++ return (0);
++ }
+ tp = (int16*) sp->tbuf;
+ }
+ _TIFFmemset((void*) tp, 0, npixels*sizeof (tp[0]));
+@@ -211,9 +215,11 @@ LogL16Decode(TIFF* tif, uint8* op, tmsiz
+ cc = tif->tif_rawcc;
+ /* get each byte string */
+ for (shft = 2*8; (shft -= 8) >= 0; ) {
+- for (i = 0; i < npixels && cc > 0; )
++ for (i = 0; i < npixels && cc > 0; ) {
+ if (*bp >= 128) { /* run */
+- rc = *bp++ + (2-128); /* TODO: potential input buffer overrun when decoding corrupt or truncated data */
++ if( cc < 2 )
++ break;
++ rc = *bp++ + (2-128);
+ b = (int16)(*bp++ << shft);
+ cc -= 2;
+ while (rc-- && i < npixels)
+@@ -223,6 +229,7 @@ LogL16Decode(TIFF* tif, uint8* op, tmsiz
+ while (--cc && rc-- && i < npixels)
+ tp[i++] |= (int16)*bp++ << shft;
+ }
++ }
+ if (i != npixels) {
+ #if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__))
+ TIFFErrorExt(tif->tif_clientdata, module,
+@@ -268,13 +275,17 @@ LogLuvDecode24(TIFF* tif, uint8* op, tms
+ if (sp->user_datafmt == SGILOGDATAFMT_RAW)
+ tp = (uint32 *)op;
+ else {
+- assert(sp->tbuflen >= npixels);
++ if(sp->tbuflen < npixels) {
++ TIFFErrorExt(tif->tif_clientdata, module,
++ "Translation buffer too short");
++ return (0);
++ }
+ tp = (uint32 *) sp->tbuf;
+ }
+ /* copy to array of uint32 */
+ bp = (unsigned char*) tif->tif_rawcp;
+ cc = tif->tif_rawcc;
+- for (i = 0; i < npixels && cc > 0; i++) {
++ for (i = 0; i < npixels && cc >= 3; i++) {
+ tp[i] = bp[0] << 16 | bp[1] << 8 | bp[2];
+ bp += 3;
+ cc -= 3;
+@@ -325,7 +336,11 @@ LogLuvDecode32(TIFF* tif, uint8* op, tms
+ if (sp->user_datafmt == SGILOGDATAFMT_RAW)
+ tp = (uint32*) op;
+ else {
+- assert(sp->tbuflen >= npixels);
++ if(sp->tbuflen < npixels) {
++ TIFFErrorExt(tif->tif_clientdata, module,
++ "Translation buffer too short");
++ return (0);
++ }
+ tp = (uint32*) sp->tbuf;
+ }
+ _TIFFmemset((void*) tp, 0, npixels*sizeof (tp[0]));
+@@ -334,11 +349,13 @@ LogLuvDecode32(TIFF* tif, uint8* op, tms
+ cc = tif->tif_rawcc;
+ /* get each byte string */
+ for (shft = 4*8; (shft -= 8) >= 0; ) {
+- for (i = 0; i < npixels && cc > 0; )
++ for (i = 0; i < npixels && cc > 0; ) {
+ if (*bp >= 128) { /* run */
++ if( cc < 2 )
++ break;
+ rc = *bp++ + (2-128);
+ b = (uint32)*bp++ << shft;
+- cc -= 2; /* TODO: potential input buffer overrun when decoding corrupt or truncated data */
++ cc -= 2;
+ while (rc-- && i < npixels)
+ tp[i++] |= b;
+ } else { /* non-run */
+@@ -346,6 +363,7 @@ LogLuvDecode32(TIFF* tif, uint8* op, tms
+ while (--cc && rc-- && i < npixels)
+ tp[i++] |= (uint32)*bp++ << shft;
+ }
++ }
+ if (i != npixels) {
+ #if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__))
+ TIFFErrorExt(tif->tif_clientdata, module,
+@@ -413,6 +431,7 @@ LogLuvDecodeTile(TIFF* tif, uint8* bp, t
+ static int
+ LogL16Encode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
+ {
++ static const char module[] = "LogL16Encode";
+ LogLuvState* sp = EncoderState(tif);
+ int shft;
+ tmsize_t i;
+@@ -433,7 +452,11 @@ LogL16Encode(TIFF* tif, uint8* bp, tmsiz
+ tp = (int16*) bp;
+ else {
+ tp = (int16*) sp->tbuf;
+- assert(sp->tbuflen >= npixels);
++ if(sp->tbuflen < npixels) {
++ TIFFErrorExt(tif->tif_clientdata, module,
++ "Translation buffer too short");
++ return (0);
++ }
+ (*sp->tfunc)(sp, bp, npixels);
+ }
+ /* compress each byte string */
+@@ -506,6 +529,7 @@ LogL16Encode(TIFF* tif, uint8* bp, tmsiz
+ static int
+ LogLuvEncode24(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
+ {
++ static const char module[] = "LogLuvEncode24";
+ LogLuvState* sp = EncoderState(tif);
+ tmsize_t i;
+ tmsize_t npixels;
+@@ -521,7 +545,11 @@ LogLuvEncode24(TIFF* tif, uint8* bp, tms
+ tp = (uint32*) bp;
+ else {
+ tp = (uint32*) sp->tbuf;
+- assert(sp->tbuflen >= npixels);
++ if(sp->tbuflen < npixels) {
++ TIFFErrorExt(tif->tif_clientdata, module,
++ "Translation buffer too short");
++ return (0);
++ }
+ (*sp->tfunc)(sp, bp, npixels);
+ }
+ /* write out encoded pixels */
+@@ -553,6 +581,7 @@ LogLuvEncode24(TIFF* tif, uint8* bp, tms
+ static int
+ LogLuvEncode32(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
+ {
++ static const char module[] = "LogLuvEncode32";
+ LogLuvState* sp = EncoderState(tif);
+ int shft;
+ tmsize_t i;
+@@ -574,7 +603,11 @@ LogLuvEncode32(TIFF* tif, uint8* bp, tms
+ tp = (uint32*) bp;
+ else {
+ tp = (uint32*) sp->tbuf;
+- assert(sp->tbuflen >= npixels);
++ if(sp->tbuflen < npixels) {
++ TIFFErrorExt(tif->tif_clientdata, module,
++ "Translation buffer too short");
++ return (0);
++ }
+ (*sp->tfunc)(sp, bp, npixels);
+ }
+ /* compress each byte string */
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2015-8784.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2015-8784.patch
new file mode 100644
index 000000000..0caf800e2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2015-8784.patch
@@ -0,0 +1,73 @@
+From b18012dae552f85dcc5c57d3bf4e997a15b1cc1c Mon Sep 17 00:00:00 2001
+From: erouault <erouault>
+Date: Sun, 27 Dec 2015 16:55:20 +0000
+Subject: [PATCH] * libtiff/tif_next.c: fix potential out-of-bound write in
+ NeXTDecode() triggered by http://lcamtuf.coredump.cx/afl/vulns/libtiff5.tif
+ (bugzilla #2508)
+
+Upstream-Status: Backport
+https://github.com/vadz/libtiff/commit/b18012dae552f85dcc5c57d3bf4e997a15b1cc1c
+hand applied Changelog changes
+
+CVE: CVE-2015-8784
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+---
+ ChangeLog | 6 ++++++
+ libtiff/tif_next.c | 10 ++++++++--
+ 2 files changed, 14 insertions(+), 2 deletions(-)
+
+Index: tiff-4.0.4/ChangeLog
+===================================================================
+--- tiff-4.0.4.orig/ChangeLog
++++ tiff-4.0.4/ChangeLog
+@@ -1,5 +1,11 @@
+ 2015-12-27 Even Rouault <even.rouault at spatialys.com>
+
++ * libtiff/tif_next.c: fix potential out-of-bound write in NeXTDecode()
++ triggered by http://lcamtuf.coredump.cx/afl/vulns/libtiff5.tif
++ (bugzilla #2508)
++
++2015-12-27 Even Rouault <even.rouault at spatialys.com>
++
+ * libtiff/tif_luv.c: fix potential out-of-bound writes in decode
+ functions in non debug builds by replacing assert()s by regular if
+ checks (bugzilla #2522).
+Index: tiff-4.0.4/libtiff/tif_next.c
+===================================================================
+--- tiff-4.0.4.orig/libtiff/tif_next.c
++++ tiff-4.0.4/libtiff/tif_next.c
+@@ -37,7 +37,7 @@
+ case 0: op[0] = (unsigned char) ((v) << 6); break; \
+ case 1: op[0] |= (v) << 4; break; \
+ case 2: op[0] |= (v) << 2; break; \
+- case 3: *op++ |= (v); break; \
++ case 3: *op++ |= (v); op_offset++; break; \
+ } \
+ }
+
+@@ -106,6 +106,7 @@ NeXTDecode(TIFF* tif, uint8* buf, tmsize
+ uint32 imagewidth = tif->tif_dir.td_imagewidth;
+ if( isTiled(tif) )
+ imagewidth = tif->tif_dir.td_tilewidth;
++ tmsize_t op_offset = 0;
+
+ /*
+ * The scanline is composed of a sequence of constant
+@@ -122,10 +123,15 @@ NeXTDecode(TIFF* tif, uint8* buf, tmsize
+ * bounds, potentially resulting in a security
+ * issue.
+ */
+- while (n-- > 0 && npixels < imagewidth)
++ while (n-- > 0 && npixels < imagewidth && op_offset < scanline)
+ SETPIXEL(op, grey);
+ if (npixels >= imagewidth)
+ break;
++ if (op_offset >= scanline ) {
++ TIFFErrorExt(tif->tif_clientdata, module, "Invalid data for scanline %ld",
++ (long) tif->tif_row);
++ return (0);
++ }
+ if (cc == 0)
+ goto bad;
+ n = *bp++, cc--;
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2016-3186.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2016-3186.patch
new file mode 100644
index 000000000..4a08aba21
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2016-3186.patch
@@ -0,0 +1,24 @@
+Buffer overflow in the readextension function in gif2tiff.c
+allows remote attackers to cause a denial of service via a crafted GIF file.
+
+External References:
+https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-3186
+https://bugzilla.redhat.com/show_bug.cgi?id=1319503
+
+CVE: CVE-2016-3186
+Upstream-Status: Backport (RedHat)
+https://bugzilla.redhat.com/attachment.cgi?id=1144235&action=diff
+
+Signed-off-by: Yi Zhao <yi.zhao@windirver.com>
+
+--- tiff-4.0.6/tools/gif2tiff.c 2016-04-06 15:43:01.586048341 +0200
++++ tiff-4.0.6/tools/gif2tiff.c 2016-04-06 15:48:05.523207710 +0200
+@@ -349,7 +349,7 @@
+ int status = 1;
+
+ (void) getc(infile);
+- while ((count = getc(infile)) && count <= 255)
++ while ((count = getc(infile)) && count >= 0 && count <= 255)
+ if (fread(buf, 1, count, infile) != (size_t) count) {
+ fprintf(stderr, "short read from file %s (%s)\n",
+ filename, strerror(errno));
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2016-5321.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2016-5321.patch
new file mode 100644
index 000000000..63c665024
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2016-5321.patch
@@ -0,0 +1,49 @@
+From d9783e4a1476b6787a51c5ae9e9b3156527589f0 Mon Sep 17 00:00:00 2001
+From: erouault <erouault>
+Date: Mon, 11 Jul 2016 21:26:03 +0000
+Subject: [PATCH 1/2] * tools/tiffcrop.c: Avoid access outside of stack
+ allocated array on a tiled separate TIFF with more than 8 samples per pixel.
+ Reported by Kaixiang Zhang of the Cloud Security Team, Qihoo 360
+ (CVE-2016-5321, bugzilla #2558)
+
+CVE: CVE-2016-5321
+Upstream-Status: Backport
+https://github.com/vadz/libtiff/commit/d9783e4a1476b6787a51c5ae9e9b3156527589f0
+
+Signed-off-by: Yi Zhao <yi.zhao@windirver.com>
+---
+ ChangeLog | 7 +++++++
+ tools/tiffcrop.c | 2 +-
+ 2 files changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/ChangeLog b/ChangeLog
+index e98d54d..4e0302f 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,3 +1,10 @@
++2016-07-11 Even Rouault <even.rouault at spatialys.com>
++
++ * tools/tiffcrop.c: Avoid access outside of stack allocated array
++ on a tiled separate TIFF with more than 8 samples per pixel.
++ Reported by Kaixiang Zhang of the Cloud Security Team, Qihoo 360
++ (CVE-2016-5321, bugzilla #2558)
++
+ 2015-12-27 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_next.c: fix potential out-of-bound write in NeXTDecode()
+diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c
+index d959ae3..6fc8fc1 100644
+--- a/tools/tiffcrop.c
++++ b/tools/tiffcrop.c
+@@ -989,7 +989,7 @@ static int readSeparateTilesIntoBuffer (TIFF* in, uint8 *obuf,
+ nrow = (row + tl > imagelength) ? imagelength - row : tl;
+ for (col = 0; col < imagewidth; col += tw)
+ {
+- for (s = 0; s < spp; s++)
++ for (s = 0; s < spp && s < MAX_SAMPLES; s++)
+ { /* Read each plane of a tile set into srcbuffs[s] */
+ tbytes = TIFFReadTile(in, srcbuffs[s], col, row, 0, s);
+ if (tbytes < 0 && !ignore)
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2016-5323.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2016-5323.patch
new file mode 100644
index 000000000..41eab91ab
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2016-5323.patch
@@ -0,0 +1,107 @@
+From 2f79856097f423eb33796a15fcf700d2ea41bf31 Mon Sep 17 00:00:00 2001
+From: erouault <erouault>
+Date: Mon, 11 Jul 2016 21:38:31 +0000
+Subject: [PATCH 2/2] (CVE-2016-5321 / CVE-2016-5323 , bugzilla #2558 / #2559)
+
+CVE: CVE-2016-5323
+Upstream-Status: Backport
+https://github.com/vadz/libtiff/commit/2f79856097f423eb33796a15fcf700d2ea41bf31
+
+Signed-off-by: Yi Zhao <yi.zhao@windirver.com>
+---
+ ChangeLog | 2 +-
+ tools/tiffcrop.c | 16 ++++++++--------
+ 2 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/ChangeLog b/ChangeLog
+index 4e0302f..62dc1b5 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -3,7 +3,7 @@
+ * tools/tiffcrop.c: Avoid access outside of stack allocated array
+ on a tiled separate TIFF with more than 8 samples per pixel.
+ Reported by Kaixiang Zhang of the Cloud Security Team, Qihoo 360
+- (CVE-2016-5321, bugzilla #2558)
++ (CVE-2016-5321 / CVE-2016-5323 , bugzilla #2558 / #2559)
+
+ 2016-07-10 Even Rouault <even.rouault at spatialys.com>
+
+diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c
+index 6fc8fc1..27abc0b 100644
+--- a/tools/tiffcrop.c
++++ b/tools/tiffcrop.c
+@@ -3738,7 +3738,7 @@ combineSeparateSamples8bits (uint8 *in[], uint8 *out, uint32 cols,
+
+ matchbits = maskbits << (8 - src_bit - bps);
+ /* load up next sample from each plane */
+- for (s = 0; s < spp; s++)
++ for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++)
+ {
+ src = in[s] + src_offset + src_byte;
+ buff1 = ((*src) & matchbits) << (src_bit);
+@@ -3837,7 +3837,7 @@ combineSeparateSamples16bits (uint8 *in[], uint8 *out, uint32 cols,
+ src_bit = bit_offset % 8;
+
+ matchbits = maskbits << (16 - src_bit - bps);
+- for (s = 0; s < spp; s++)
++ for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++)
+ {
+ src = in[s] + src_offset + src_byte;
+ if (little_endian)
+@@ -3947,7 +3947,7 @@ combineSeparateSamples24bits (uint8 *in[], uint8 *out, uint32 cols,
+ src_bit = bit_offset % 8;
+
+ matchbits = maskbits << (32 - src_bit - bps);
+- for (s = 0; s < spp; s++)
++ for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++)
+ {
+ src = in[s] + src_offset + src_byte;
+ if (little_endian)
+@@ -4073,7 +4073,7 @@ combineSeparateSamples32bits (uint8 *in[], uint8 *out, uint32 cols,
+ src_bit = bit_offset % 8;
+
+ matchbits = maskbits << (64 - src_bit - bps);
+- for (s = 0; s < spp; s++)
++ for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++)
+ {
+ src = in[s] + src_offset + src_byte;
+ if (little_endian)
+@@ -4263,7 +4263,7 @@ combineSeparateTileSamples8bits (uint8 *in[], uint8 *out, uint32 cols,
+
+ matchbits = maskbits << (8 - src_bit - bps);
+ /* load up next sample from each plane */
+- for (s = 0; s < spp; s++)
++ for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++)
+ {
+ src = in[s] + src_offset + src_byte;
+ buff1 = ((*src) & matchbits) << (src_bit);
+@@ -4362,7 +4362,7 @@ combineSeparateTileSamples16bits (uint8 *in[], uint8 *out, uint32 cols,
+ src_bit = bit_offset % 8;
+
+ matchbits = maskbits << (16 - src_bit - bps);
+- for (s = 0; s < spp; s++)
++ for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++)
+ {
+ src = in[s] + src_offset + src_byte;
+ if (little_endian)
+@@ -4471,7 +4471,7 @@ combineSeparateTileSamples24bits (uint8 *in[], uint8 *out, uint32 cols,
+ src_bit = bit_offset % 8;
+
+ matchbits = maskbits << (32 - src_bit - bps);
+- for (s = 0; s < spp; s++)
++ for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++)
+ {
+ src = in[s] + src_offset + src_byte;
+ if (little_endian)
+@@ -4597,7 +4597,7 @@ combineSeparateTileSamples32bits (uint8 *in[], uint8 *out, uint32 cols,
+ src_bit = bit_offset % 8;
+
+ matchbits = maskbits << (64 - src_bit - bps);
+- for (s = 0; s < spp; s++)
++ for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++)
+ {
+ src = in[s] + src_offset + src_byte;
+ if (little_endian)
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/tiff_4.0.6.bb b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/tiff_4.0.6.bb
index e2e24e0fb..8147bc4fb 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/tiff_4.0.6.bb
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/tiff_4.0.6.bb
@@ -1,10 +1,15 @@
SUMMARY = "Provides support for the Tag Image File Format (TIFF)"
LICENSE = "BSD-2-Clause"
LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=34da3db46fab7501992f9615d7e158cf"
-HOMEPAGE = "http://www.remotesensing.org/libtiff/"
-SRC_URI = "ftp://ftp.remotesensing.org/pub/libtiff/tiff-${PV}.tar.gz \
+SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \
file://libtool2.patch \
+ file://CVE-2015-8665_8683.patch \
+ file://CVE-2015-8781.patch \
+ file://CVE-2015-8784.patch \
+ file://CVE-2016-3186.patch \
+ file://CVE-2016-5321.patch \
+ file://CVE-2016-5323.patch \
"
SRC_URI[md5sum] = "d1d2e940dea0b5ad435f21f03d96dd72"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/mpg123/mpg123_1.23.6.bb b/import-layers/yocto-poky/meta/recipes-multimedia/mpg123/mpg123_1.23.6.bb
new file mode 100644
index 000000000..6ee457d04
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/mpg123/mpg123_1.23.6.bb
@@ -0,0 +1,63 @@
+SUMMARY = "Audio decoder for MPEG-1 Layer 1/2/3"
+DESCRIPTION = "The core of mpg123 is an MPEG-1 Layer 1/2/3 decoding library, which can be used by other programs. \
+mpg123 also comes with a command-line tool which can playback using ALSA, PulseAudio, OSS, and several other APIs, \
+and also can write the decoded audio to WAV."
+HOMEPAGE = "http://mpg123.de/"
+BUGTRACKER = "http://sourceforge.net/p/mpg123/bugs/"
+SECTION = "multimedia"
+
+LICENSE = "LGPLv2.1"
+LICENSE_FLAGS = "commercial"
+LIC_FILES_CHKSUM = "file://COPYING;md5=1e86753638d3cf2512528b99079bc4f3"
+
+SRC_URI = "https://www.mpg123.de/download/${BP}.tar.bz2"
+
+SRC_URI[md5sum] = "ed22a3e664f076fa05131a3454ef8166"
+SRC_URI[sha256sum] = "4073d9c60a43872f6f5a3a322f5ea21ab7f0869d2ed25e79c3eb8521fa3c32d4"
+
+inherit autotools pkgconfig
+
+# The options should be mutually exclusive for configuration script.
+# If both alsa and pulseaudio are specified (as in the default distro features)
+# pulseaudio takes precedence.
+PACKAGECONFIG_ALSA = "${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)}"
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '${PACKAGECONFIG_ALSA}', d)}"
+
+PACKAGECONFIG[alsa] = "--with-default-audio=alsa,,alsa-lib"
+PACKAGECONFIG[esd] = ",,esound"
+PACKAGECONFIG[jack] = ",,jack"
+PACKAGECONFIG[openal] = ",,openal-soft"
+PACKAGECONFIG[portaudio] = ",,portaudio-v19"
+PACKAGECONFIG[pulseaudio] = "--with-default-audio=pulse,,pulseaudio"
+PACKAGECONFIG[sdl] = ",,libsdl"
+
+# Following are possible sound output modules:
+# alsa arts coreaudio dummy esd jack nas openal os2 oss portaudio pulse sdl sndio sun tinyalsa win32 win32_wasapi
+AUDIOMODS += "${@bb.utils.contains('PACKAGECONFIG', 'alsa', 'alsa', '', d)}"
+AUDIOMODS += "${@bb.utils.contains('PACKAGECONFIG', 'esd', 'esd', '', d)}"
+AUDIOMODS += "${@bb.utils.contains('PACKAGECONFIG', 'jack', 'jack', '', d)}"
+AUDIOMODS += "${@bb.utils.contains('PACKAGECONFIG', 'openal', 'openal', '', d)}"
+AUDIOMODS += "${@bb.utils.contains('PACKAGECONFIG', 'portaudio', 'portaudio', '', d)}"
+AUDIOMODS += "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'pulse', '', d)}"
+AUDIOMODS += "${@bb.utils.contains('PACKAGECONFIG', 'sdl', 'sdl', '', d)}"
+
+EXTRA_OECONF = " \
+ --enable-shared \
+ --with-audio='${AUDIOMODS}' \
+ --with-module-suffix=.so \
+ ${@bb.utils.contains('TUNE_FEATURES', 'neon', '--with-cpu=neon', '', d)} \
+ ${@bb.utils.contains('TUNE_FEATURES', 'altivec', '--with-cpu=altivec', '', d)} \
+"
+
+# The x86 assembler optimisations contains text relocations and there are no
+# upstream plans to fix them: http://sourceforge.net/p/mpg123/bugs/168/
+INSANE_SKIP_${PN}_append_x86 = " textrel"
+
+# Fails to build with thumb-1 (qemuarm)
+#| {standard input}: Assembler messages:
+#| {standard input}:47: Error: selected processor does not support Thumb mode `smull r5,r6,r7,r4'
+#| {standard input}:48: Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r5,r5,lsr#24'
+#...
+#| make[3]: *** [equalizer.lo] Error 1
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio.inc b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
index 0b05ce4ca..7e54ad4b5 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
@@ -3,11 +3,12 @@ HOMEPAGE = "http://www.pulseaudio.org"
AUTHOR = "Lennart Poettering"
SECTION = "libs/multimedia"
LICENSE = "GPLv2+ & LGPLv2.1"
-LIC_FILES_CHKSUM = "file://GPL;md5=4325afd396febcb659c36b49533135d4 \
+LIC_FILES_CHKSUM = "file://LICENSE;md5=d9ae089c8dc5339f8ac9d8563038a29f \
+ file://GPL;md5=4325afd396febcb659c36b49533135d4 \
file://LGPL;md5=2d5025d4aa3495befef8f17206a5b0a1 \
file://src/pulsecore/resampler.h;beginline=4;endline=21;md5=09794012ae16912c0270f3280cc8ff84"
-DEPENDS = "libatomic-ops libsndfile1 libtool"
+DEPENDS = "libatomic-ops libsndfile1 libtool intltool-native"
# optional
DEPENDS += "udev alsa-lib glib-2.0 gconf"
DEPENDS += "json-c gdbm speexdsp libxml-parser-perl-native libcap"
@@ -30,6 +31,7 @@ EXTRA_OECONF = "\
--without-zsh-completion-dir \
--with-udev-rules-dir=`pkg-config --variable=udevdir udev`/rules.d \
ac_cv_header_valgrind_memcheck_h=no \
+ --disable-tests \
"
# soxr (the SoX Resampler library) doesn't seem to be currently packaged in
@@ -41,6 +43,7 @@ PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ
${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', '3g', 'ofono', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)} \
dbus \
"
@@ -57,6 +60,8 @@ PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack"
# able to use pulseaudio autospawn for root as well.
PACKAGECONFIG[autospawn-for-root] = ",,,"
PACKAGECONFIG[lirc] = "--enable-lirc,--disable-lirc,lirc"
+PACKAGECONFIG[webrtc] = "--enable-webrtc-aec,--disable-webrtc-aec,webrtc-audio-processing"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
EXTRA_OECONF_append_arm = "${@bb.utils.contains("TUNE_FEATURES", "neon", "", " --enable-neon-opt=no", d)}"
EXTRA_OECONF_append_armeb = "${@bb.utils.contains("TUNE_FEATURES", "neon", "", " --enable-neon-opt=no", d)}"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-Revert-module-switch-on-port-available-Route-to-pref.patch b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-Revert-module-switch-on-port-available-Route-to-pref.patch
deleted file mode 100644
index 1c1e2fbdb..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-Revert-module-switch-on-port-available-Route-to-pref.patch
+++ /dev/null
@@ -1,268 +0,0 @@
-From b8b9b3da94a0c27090ceba243fdf54fb518c5489 Mon Sep 17 00:00:00 2001
-From: Tanu Kaskinen <tanuk@iki.fi>
-Date: Mon, 1 Feb 2016 15:34:59 +0200
-Subject: [PATCH] Revert "module-switch-on-port-available: Route to preferred
- profile"
-
-This reverts commit e87100d41ef6d14f8dc7f803582191d9f8d8f183.
-
-The reverted commit had some unwanted consequences:
-https://bugs.freedesktop.org/show_bug.cgi?id=93903
-https://bugs.freedesktop.org/show_bug.cgi?id=93946
-
-The first regression has a fix here:
-https://patchwork.freedesktop.org/patch/72053/
-
-The second regression, however, doesn't have a fix yet. Therefore,
-it's best to revert the offending patch for now.
-
-Upstream-Status: Inappropriate [Upstream plans to fix the issues
-properly.]
-
-Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
----
- src/modules/module-switch-on-port-available.c | 172 ++++++++++----------------
- 1 file changed, 67 insertions(+), 105 deletions(-)
-
-diff --git a/src/modules/module-switch-on-port-available.c b/src/modules/module-switch-on-port-available.c
-index 5dd9786..8de68a3 100644
---- a/src/modules/module-switch-on-port-available.c
-+++ b/src/modules/module-switch-on-port-available.c
-@@ -74,25 +74,22 @@ static bool profile_good_for_input(pa_card_profile *profile) {
- static int try_to_switch_profile(pa_device_port *port) {
- pa_card_profile *best_profile = NULL, *profile;
- void *state;
-- unsigned best_prio = 0;
-
-- pa_log_debug("Finding best profile for port %s, preferred = %s",
-- port->name, pa_strnull(port->preferred_profile));
-+ pa_log_debug("Finding best profile");
-
- PA_HASHMAP_FOREACH(profile, port->profiles, state) {
- bool good = false;
-- const char *name;
-- unsigned prio = profile->priority;
-+
-+ if (best_profile && best_profile->priority >= profile->priority)
-+ continue;
-
- /* We make a best effort to keep other direction unchanged */
- switch (port->direction) {
- case PA_DIRECTION_OUTPUT:
-- name = profile->output_name;
- good = profile_good_for_output(profile);
- break;
-
- case PA_DIRECTION_INPUT:
-- name = profile->input_name;
- good = profile_good_for_input(profile);
- break;
- }
-@@ -100,15 +97,7 @@ static int try_to_switch_profile(pa_device_port *port) {
- if (!good)
- continue;
-
-- /* Give a high bonus in case this is the preferred profile */
-- if (port->preferred_profile && pa_streq(name ? name : profile->name, port->preferred_profile))
-- prio += 1000000;
--
-- if (best_profile && best_prio >= prio)
-- continue;
--
- best_profile = profile;
-- best_prio = prio;
- }
-
- if (!best_profile) {
-@@ -124,125 +113,98 @@ static int try_to_switch_profile(pa_device_port *port) {
- return 0;
- }
-
--struct port_pointers {
-- pa_device_port *port;
-- pa_sink *sink;
-- pa_source *source;
-- bool is_possible_profile_active;
-- bool is_preferred_profile_active;
-- bool is_port_active;
--};
--
--static const char* profile_name_for_dir(pa_card_profile *cp, pa_direction_t dir) {
-- if (dir == PA_DIRECTION_OUTPUT && cp->output_name)
-- return cp->output_name;
-- if (dir == PA_DIRECTION_INPUT && cp->input_name)
-- return cp->input_name;
-- return cp->name;
--}
--
--static struct port_pointers find_port_pointers(pa_device_port *port) {
-- struct port_pointers pp = { .port = port };
-+static void find_sink_and_source(pa_card *card, pa_device_port *port, pa_sink **si, pa_source **so) {
-+ pa_sink *sink = NULL;
-+ pa_source *source = NULL;
- uint32_t state;
-- pa_card *card;
--
-- pa_assert(port);
-- pa_assert_se(card = port->card);
-
- switch (port->direction) {
- case PA_DIRECTION_OUTPUT:
-- PA_IDXSET_FOREACH(pp.sink, card->sinks, state)
-- if (port == pa_hashmap_get(pp.sink->ports, port->name))
-+ PA_IDXSET_FOREACH(sink, card->sinks, state)
-+ if (port == pa_hashmap_get(sink->ports, port->name))
- break;
- break;
-
- case PA_DIRECTION_INPUT:
-- PA_IDXSET_FOREACH(pp.source, card->sources, state)
-- if (port == pa_hashmap_get(pp.source->ports, port->name))
-+ PA_IDXSET_FOREACH(source, card->sources, state)
-+ if (port == pa_hashmap_get(source->ports, port->name))
- break;
- break;
- }
-
-- pp.is_possible_profile_active =
-- card->active_profile == pa_hashmap_get(port->profiles, card->active_profile->name);
-- pp.is_preferred_profile_active = pp.is_possible_profile_active && (!port->preferred_profile ||
-- pa_safe_streq(port->preferred_profile, profile_name_for_dir(card->active_profile, port->direction)));
-- pp.is_port_active = (pp.sink && pp.sink->active_port == port) || (pp.source && pp.source->active_port == port);
--
-- return pp;
-+ *si = sink;
-+ *so = source;
- }
-
--/* Switches to a port, switching profiles if necessary or preferred */
--static bool switch_to_port(pa_device_port *port) {
-- struct port_pointers pp = find_port_pointers(port);
-+static pa_hook_result_t port_available_hook_callback(pa_core *c, pa_device_port *port, void* userdata) {
-+ pa_card* card;
-+ pa_sink *sink;
-+ pa_source *source;
-+ bool is_active_profile, is_active_port;
-
-- if (pp.is_port_active)
-- return true; /* Already selected */
-+ if (port->available == PA_AVAILABLE_UNKNOWN)
-+ return PA_HOOK_OK;
-
-- pa_log_debug("Trying to switch to port %s", port->name);
-- if (!pp.is_preferred_profile_active) {
-- if (try_to_switch_profile(port) < 0) {
-- if (pp.is_possible_profile_active)
-- return false;
-- }
-- else
-- /* Now that profile has changed, our sink and source pointers must be updated */
-- pp = find_port_pointers(port);
-- }
-+ card = port->card;
-
-- if (pp.source)
-- pa_source_set_port(pp.source, port->name, false);
-- if (pp.sink)
-- pa_sink_set_port(pp.sink, port->name, false);
-- return true;
--}
-+ if (!card) {
-+ pa_log_warn("Port %s does not have a card", port->name);
-+ return PA_HOOK_OK;
-+ }
-
--/* Switches away from a port, switching profiles if necessary or preferred */
--static bool switch_from_port(pa_device_port *port) {
-- struct port_pointers pp = find_port_pointers(port);
-- pa_device_port *p, *best_port = NULL;
-- void *state;
-+ if (pa_idxset_size(card->sinks) == 0 && pa_idxset_size(card->sources) == 0)
-+ /* This card is not initialized yet. We'll handle it in
-+ sink_new / source_new callbacks later. */
-+ return PA_HOOK_OK;
-
-- if (!pp.is_port_active)
-- return true; /* Already deselected */
-+ find_sink_and_source(card, port, &sink, &source);
-
-- /* Try to find a good enough port to switch to */
-- PA_HASHMAP_FOREACH(p, port->card->ports, state)
-- if (p->direction == port->direction && p != port && p->available != PA_AVAILABLE_NO &&
-- (!best_port || best_port->priority < p->priority))
-- best_port = p;
-+ is_active_profile = card->active_profile == pa_hashmap_get(port->profiles, card->active_profile->name);
-+ is_active_port = (sink && sink->active_port == port) || (source && source->active_port == port);
-
-- pa_log_debug("Trying to switch away from port %s, found %s", port->name, best_port ? best_port->name : "no better option");
-+ if (port->available == PA_AVAILABLE_NO && !is_active_port)
-+ return PA_HOOK_OK;
-
-- if (best_port)
-- return switch_to_port(best_port);
-+ if (port->available == PA_AVAILABLE_YES) {
-+ if (is_active_port)
-+ return PA_HOOK_OK;
-
-- return false;
--}
-+ if (!is_active_profile) {
-+ if (try_to_switch_profile(port) < 0)
-+ return PA_HOOK_OK;
-
-+ pa_assert(card->active_profile == pa_hashmap_get(port->profiles, card->active_profile->name));
-
--static pa_hook_result_t port_available_hook_callback(pa_core *c, pa_device_port *port, void* userdata) {
-- pa_assert(port);
-+ /* Now that profile has changed, our sink and source pointers must be updated */
-+ find_sink_and_source(card, port, &sink, &source);
-+ }
-
-- if (!port->card) {
-- pa_log_warn("Port %s does not have a card", port->name);
-- return PA_HOOK_OK;
-+ if (source)
-+ pa_source_set_port(source, port->name, false);
-+ if (sink)
-+ pa_sink_set_port(sink, port->name, false);
- }
-
-- if (pa_idxset_size(port->card->sinks) == 0 && pa_idxset_size(port->card->sources) == 0)
-- /* This card is not initialized yet. We'll handle it in
-- sink_new / source_new callbacks later. */
-- return PA_HOOK_OK;
-+ if (port->available == PA_AVAILABLE_NO) {
-+ if (sink) {
-+ pa_device_port *p2 = pa_device_port_find_best(sink->ports);
-+
-+ if (p2 && p2->available != PA_AVAILABLE_NO)
-+ pa_sink_set_port(sink, p2->name, false);
-+ else {
-+ /* Maybe try to switch to another profile? */
-+ }
-+ }
-
-- switch (port->available) {
-- case PA_AVAILABLE_YES:
-- switch_to_port(port);
-- break;
-- case PA_AVAILABLE_NO:
-- switch_from_port(port);
-- break;
-- default:
-- break;
-+ if (source) {
-+ pa_device_port *p2 = pa_device_port_find_best(source->ports);
-+
-+ if (p2 && p2->available != PA_AVAILABLE_NO)
-+ pa_source_set_port(source, p2->name, false);
-+ else {
-+ /* Maybe try to switch to another profile? */
-+ }
-+ }
- }
-
- return PA_HOOK_OK;
---
-2.7.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-alsa-bluetooth-fail-if-user-requested-profile-doesn-.patch b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-alsa-bluetooth-fail-if-user-requested-profile-doesn-.patch
index be3655b23..2f72ceb33 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-alsa-bluetooth-fail-if-user-requested-profile-doesn-.patch
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-alsa-bluetooth-fail-if-user-requested-profile-doesn-.patch
@@ -1,32 +1,26 @@
-From 339eb179baa7810113f6456accc05b3a32c1cdba Mon Sep 17 00:00:00 2001
+From 9c3cdfcd198ef9727ea542f284ac6d8c1bcd7a3a Mon Sep 17 00:00:00 2001
From: Tanu Kaskinen <tanuk@iki.fi>
Date: Fri, 23 Oct 2015 12:36:34 +0300
-Subject: [PATCH 2/4] alsa, bluetooth: fail if user-requested profile doesn't
+Subject: [PATCH 1/5] alsa, bluetooth: fail if user-requested profile doesn't
exist
If we can't fulfill the user request fully, I think we shouldn't
fulfill it at all, to make it clear that the requested operation
didn't succeed.
-http://bugzilla.yoctoproject.org/show_bug.cgi?id=8448
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-
-Upstream-Status: Denied [The patch set needs some work to be accepted.
-The review thread:
-http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/24301]
+Upstream-Status: Accepted [expected in 10.0]
Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
---
- src/modules/alsa/module-alsa-card.c | 10 ++++++++--
- src/modules/bluetooth/module-bluez4-device.c | 6 ++++--
- 2 files changed, 12 insertions(+), 4 deletions(-)
+ src/modules/alsa/module-alsa-card.c | 11 +++++++++--
+ src/modules/bluetooth/module-bluez4-device.c | 7 +++++--
+ 2 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/src/modules/alsa/module-alsa-card.c b/src/modules/alsa/module-alsa-card.c
-index a7fec04..32f517e 100644
+index e5cc4ae..d761683 100644
--- a/src/modules/alsa/module-alsa-card.c
+++ b/src/modules/alsa/module-alsa-card.c
-@@ -754,8 +754,14 @@ int pa__init(pa_module *m) {
+@@ -799,8 +799,15 @@ int pa__init(pa_module *m) {
goto fail;
}
@@ -37,6 +31,7 @@ index a7fec04..32f517e 100644
+ pa_card_new_data_set_profile(&data, profile);
+ else {
+ pa_log("No such profile: %s", profile);
++ pa_card_new_data_done(&data);
+ goto fail;
+ }
+ }
@@ -44,10 +39,10 @@ index a7fec04..32f517e 100644
u->card = pa_card_new(m->core, &data);
pa_card_new_data_done(&data);
diff --git a/src/modules/bluetooth/module-bluez4-device.c b/src/modules/bluetooth/module-bluez4-device.c
-index b40c6a0..94e6988 100644
+index 9a921a5..a2de525 100644
--- a/src/modules/bluetooth/module-bluez4-device.c
+++ b/src/modules/bluetooth/module-bluez4-device.c
-@@ -2310,8 +2310,10 @@ static int add_card(struct userdata *u) {
+@@ -2301,8 +2301,11 @@ static int add_card(struct userdata *u) {
if ((default_profile = pa_modargs_get_value(u->modargs, "profile", NULL))) {
if (pa_hashmap_get(data.profiles, default_profile))
pa_card_new_data_set_profile(&data, default_profile);
@@ -55,11 +50,12 @@ index b40c6a0..94e6988 100644
- pa_log_warn("Profile '%s' not valid or not supported by device.", default_profile);
+ else {
+ pa_log("Profile '%s' not valid or not supported by device.", default_profile);
++ pa_card_new_data_done(&data);
+ return -1;
+ }
}
u->card = pa_card_new(u->core, &data);
--
-2.1.4
+2.8.1
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-card-add-pa_card_profile.ports.patch b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-card-add-pa_card_profile.ports.patch
deleted file mode 100644
index 84c951940..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-card-add-pa_card_profile.ports.patch
+++ /dev/null
@@ -1,218 +0,0 @@
-From d1c02971867bea10afcafc82c965414012c4d6bd Mon Sep 17 00:00:00 2001
-From: Tanu Kaskinen <tanuk@iki.fi>
-Date: Fri, 23 Oct 2015 12:23:13 +0300
-Subject: [PATCH 1/4] card: add pa_card_profile.ports
-
-Having ports accessible from pa_card_profile allows checking whether all ports
-of a profile are unavailable, and therefore helps with managing the profile
-availability (implemented in a later patch).
-
-http://bugzilla.yoctoproject.org/show_bug.cgi?id=8448
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-
-Rebased on 8.0.
-
-Upstream-Status: Denied [The patch set needs some work to be accepted.
-The review thread:
-http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/24301]
-
-Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
----
- src/modules/alsa/alsa-mixer.c | 4 +++-
- src/modules/alsa/alsa-ucm.c | 1 +
- src/modules/bluetooth/module-bluez4-device.c | 6 ++++++
- src/modules/bluetooth/module-bluez5-device.c | 6 ++++++
- src/pulsecore/card.c | 15 +++++++++++++++
- src/pulsecore/card.h | 4 ++++
- src/pulsecore/device-port.c | 7 ++++++-
- 7 files changed, 41 insertions(+), 2 deletions(-)
-
-diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c
-index 1fe2a02..5b76b06 100644
---- a/src/modules/alsa/alsa-mixer.c
-+++ b/src/modules/alsa/alsa-mixer.c
-@@ -4783,8 +4783,10 @@ static pa_device_port* device_port_alsa_init(pa_hashmap *ports, /* card ports */
- path->port = p;
- }
-
-- if (cp)
-+ if (cp) {
- pa_hashmap_put(p->profiles, cp->name, cp);
-+ pa_card_profile_add_port(cp, p);
-+ }
-
- if (extra) {
- pa_hashmap_put(extra, p->name, p);
-diff --git a/src/modules/alsa/alsa-ucm.c b/src/modules/alsa/alsa-ucm.c
-index 42f3242..68fcc26 100644
---- a/src/modules/alsa/alsa-ucm.c
-+++ b/src/modules/alsa/alsa-ucm.c
-@@ -791,6 +791,7 @@ static void ucm_add_port_combination(
- if (cp) {
- pa_log_debug("Adding profile %s to port %s.", cp->name, port->name);
- pa_hashmap_put(port->profiles, cp->name, cp);
-+ pa_card_profile_add_port(cp, port);
- }
-
- if (hash) {
-diff --git a/src/modules/bluetooth/module-bluez4-device.c b/src/modules/bluetooth/module-bluez4-device.c
-index 9a921a5..adecb32 100644
---- a/src/modules/bluetooth/module-bluez4-device.c
-+++ b/src/modules/bluetooth/module-bluez4-device.c
-@@ -2180,6 +2180,7 @@ static pa_card_profile *create_card_profile(struct userdata *u, const char *uuid
- p->max_sink_channels = 2;
- p->max_source_channels = 0;
- pa_hashmap_put(output_port->profiles, p->name, p);
-+ pa_card_profile_add_port(p, output_port);
-
- d = PA_CARD_PROFILE_DATA(p);
- *d = PA_BLUEZ4_PROFILE_A2DP;
-@@ -2191,6 +2192,7 @@ static pa_card_profile *create_card_profile(struct userdata *u, const char *uuid
- p->max_sink_channels = 0;
- p->max_source_channels = 2;
- pa_hashmap_put(input_port->profiles, p->name, p);
-+ pa_card_profile_add_port(p, input_port);
-
- d = PA_CARD_PROFILE_DATA(p);
- *d = PA_BLUEZ4_PROFILE_A2DP_SOURCE;
-@@ -2203,6 +2205,8 @@ static pa_card_profile *create_card_profile(struct userdata *u, const char *uuid
- p->max_source_channels = 1;
- pa_hashmap_put(input_port->profiles, p->name, p);
- pa_hashmap_put(output_port->profiles, p->name, p);
-+ pa_card_profile_add_port(p, input_port);
-+ pa_card_profile_add_port(p, output_port);
-
- d = PA_CARD_PROFILE_DATA(p);
- *d = PA_BLUEZ4_PROFILE_HSP;
-@@ -2215,6 +2219,8 @@ static pa_card_profile *create_card_profile(struct userdata *u, const char *uuid
- p->max_source_channels = 1;
- pa_hashmap_put(input_port->profiles, p->name, p);
- pa_hashmap_put(output_port->profiles, p->name, p);
-+ pa_card_profile_add_port(p, input_port);
-+ pa_card_profile_add_port(p, output_port);
-
- d = PA_CARD_PROFILE_DATA(p);
- *d = PA_BLUEZ4_PROFILE_HFGW;
-diff --git a/src/modules/bluetooth/module-bluez5-device.c b/src/modules/bluetooth/module-bluez5-device.c
-index 84e6d55..b015c67 100644
---- a/src/modules/bluetooth/module-bluez5-device.c
-+++ b/src/modules/bluetooth/module-bluez5-device.c
-@@ -1790,6 +1790,7 @@ static pa_card_profile *create_card_profile(struct userdata *u, const char *uuid
- cp->max_sink_channels = 2;
- cp->max_source_channels = 0;
- pa_hashmap_put(output_port->profiles, cp->name, cp);
-+ pa_card_profile_add_port(cp, output_port);
-
- p = PA_CARD_PROFILE_DATA(cp);
- *p = PA_BLUETOOTH_PROFILE_A2DP_SINK;
-@@ -1801,6 +1802,7 @@ static pa_card_profile *create_card_profile(struct userdata *u, const char *uuid
- cp->max_sink_channels = 0;
- cp->max_source_channels = 2;
- pa_hashmap_put(input_port->profiles, cp->name, cp);
-+ pa_card_profile_add_port(cp, input_port);
-
- p = PA_CARD_PROFILE_DATA(cp);
- *p = PA_BLUETOOTH_PROFILE_A2DP_SOURCE;
-@@ -1813,6 +1815,8 @@ static pa_card_profile *create_card_profile(struct userdata *u, const char *uuid
- cp->max_source_channels = 1;
- pa_hashmap_put(input_port->profiles, cp->name, cp);
- pa_hashmap_put(output_port->profiles, cp->name, cp);
-+ pa_card_profile_add_port(cp, input_port);
-+ pa_card_profile_add_port(cp, output_port);
-
- p = PA_CARD_PROFILE_DATA(cp);
- *p = PA_BLUETOOTH_PROFILE_HEADSET_HEAD_UNIT;
-@@ -1825,6 +1829,8 @@ static pa_card_profile *create_card_profile(struct userdata *u, const char *uuid
- cp->max_source_channels = 1;
- pa_hashmap_put(input_port->profiles, cp->name, cp);
- pa_hashmap_put(output_port->profiles, cp->name, cp);
-+ pa_card_profile_add_port(cp, input_port);
-+ pa_card_profile_add_port(cp, output_port);
-
- p = PA_CARD_PROFILE_DATA(cp);
- *p = PA_BLUETOOTH_PROFILE_HEADSET_AUDIO_GATEWAY;
-diff --git a/src/pulsecore/card.c b/src/pulsecore/card.c
-index b6cbbf7..f92ac87 100644
---- a/src/pulsecore/card.c
-+++ b/src/pulsecore/card.c
-@@ -45,6 +45,7 @@ pa_card_profile *pa_card_profile_new(const char *name, const char *description,
- c->name = pa_xstrdup(name);
- c->description = pa_xstrdup(description);
- c->available = PA_AVAILABLE_UNKNOWN;
-+ c->ports = pa_hashmap_new(pa_idxset_string_hash_func, pa_idxset_string_compare_func);
-
- return c;
- }
-@@ -52,6 +53,14 @@ pa_card_profile *pa_card_profile_new(const char *name, const char *description,
- void pa_card_profile_free(pa_card_profile *c) {
- pa_assert(c);
-
-+ if (c->ports) {
-+ pa_device_port *port;
-+ void *state;
-+ PA_HASHMAP_FOREACH(port, c->ports, state)
-+ pa_hashmap_remove (port->profiles, c->name);
-+ pa_hashmap_free(c->ports);
-+ }
-+
- pa_xfree(c->input_name);
- pa_xfree(c->output_name);
- pa_xfree(c->name);
-@@ -59,6 +68,12 @@ void pa_card_profile_free(pa_card_profile *c) {
- pa_xfree(c);
- }
-
-+void pa_card_profile_add_port(pa_card_profile *profile, pa_device_port *port) {
-+ pa_assert(profile);
-+
-+ pa_hashmap_put(profile->ports, port->name, port);
-+}
-+
- void pa_card_profile_set_available(pa_card_profile *c, pa_available_t available) {
- pa_core *core;
-
-diff --git a/src/pulsecore/card.h b/src/pulsecore/card.h
-index 30bfc0e..fff9057 100644
---- a/src/pulsecore/card.h
-+++ b/src/pulsecore/card.h
-@@ -50,6 +50,8 @@ struct pa_card_profile {
- unsigned priority;
- pa_available_t available; /* PA_AVAILABLE_UNKNOWN, PA_AVAILABLE_NO or PA_AVAILABLE_YES */
-
-+ pa_hashmap *ports; /* port name -> pa_device_port */
-+
- /* We probably want to have different properties later on here */
- unsigned n_sinks;
- unsigned n_sources;
-@@ -107,6 +109,8 @@ typedef struct pa_card_new_data {
- pa_card_profile *pa_card_profile_new(const char *name, const char *description, size_t extra);
- void pa_card_profile_free(pa_card_profile *c);
-
-+void pa_card_profile_add_port(pa_card_profile *profile, pa_device_port *port);
-+
- /* The profile's available status has changed */
- void pa_card_profile_set_available(pa_card_profile *c, pa_available_t available);
-
-diff --git a/src/pulsecore/device-port.c b/src/pulsecore/device-port.c
-index 5807d3e..d12dfbc 100644
---- a/src/pulsecore/device-port.c
-+++ b/src/pulsecore/device-port.c
-@@ -107,8 +107,13 @@ static void device_port_free(pa_object *o) {
- if (p->proplist)
- pa_proplist_free(p->proplist);
-
-- if (p->profiles)
-+ if (p->profiles) {
-+ pa_card_profile *profile;
-+ void *state;
-+ PA_HASHMAP_FOREACH(profile, p->profiles, state)
-+ pa_hashmap_remove (profile->ports, p->name);
- pa_hashmap_free(p->profiles);
-+ }
-
- pa_xfree(p->preferred_profile);
- pa_xfree(p->name);
---
-2.7.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-client-conf-Add-allow-autospawn-for-root.patch b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-client-conf-Add-allow-autospawn-for-root.patch
index bc3277583..33f7709ae 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-client-conf-Add-allow-autospawn-for-root.patch
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-client-conf-Add-allow-autospawn-for-root.patch
@@ -1,4 +1,4 @@
-From 1cb5647f76dc8cd7bacbce2a64fac9e6c2dc3b16 Mon Sep 17 00:00:00 2001
+From babec3a50dd710d26b72f6c6d43bd79b04e954a6 Mon Sep 17 00:00:00 2001
From: Tanu Kaskinen <tanu.kaskinen@linux.intel.com>
Date: Tue, 28 Apr 2015 14:32:43 +0300
Subject: [PATCH] client-conf: Add allow-autospawn-for-root
@@ -24,10 +24,10 @@ Signed-off-by: Tanu Kaskinen <tanu.kaskinen@linux.intel.com>
5 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/man/pulse-client.conf.5.xml.in b/man/pulse-client.conf.5.xml.in
-index 1002dbe..0058490 100644
+index b88898c..e737c96 100644
--- a/man/pulse-client.conf.5.xml.in
+++ b/man/pulse-client.conf.5.xml.in
-@@ -71,6 +71,15 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
+@@ -82,6 +82,15 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
</option>
<option>
@@ -44,7 +44,7 @@ index 1002dbe..0058490 100644
run when autospawning. Defaults to a path configured at compile
time.</p>
diff --git a/src/pulse/client-conf.c b/src/pulse/client-conf.c
-index 83331f8..0474583 100644
+index a3c9486..9f68ee5 100644
--- a/src/pulse/client-conf.c
+++ b/src/pulse/client-conf.c
@@ -138,6 +138,7 @@ void pa_client_conf_load(pa_client_conf *c, bool load_from_x11, bool load_from_e
@@ -56,13 +56,13 @@ index 83331f8..0474583 100644
{ "disable-shm", pa_config_parse_bool, &c->disable_shm, NULL },
{ "enable-shm", pa_config_parse_not_bool, &c->disable_shm, NULL },
diff --git a/src/pulse/client-conf.h b/src/pulse/client-conf.h
-index eac705a..131393a 100644
+index 7691ec7..19db7ed 100644
--- a/src/pulse/client-conf.h
+++ b/src/pulse/client-conf.h
@@ -38,6 +38,7 @@ typedef struct pa_client_conf {
char *cookie_file_from_application;
char *cookie_file_from_client_conf;
- bool autospawn, disable_shm, auto_connect_localhost, auto_connect_display;
+ bool autospawn, disable_shm, disable_memfd, auto_connect_localhost, auto_connect_display;
+ bool allow_autospawn_for_root;
size_t shm_size;
} pa_client_conf;
@@ -80,10 +80,10 @@ index 26b7790..69830ef 100644
; extra-arguments = --log-target=syslog
diff --git a/src/pulse/context.c b/src/pulse/context.c
-index 4bc445f..d6c3f6d 100644
+index 69be5f4..d6e13e8 100644
--- a/src/pulse/context.c
+++ b/src/pulse/context.c
-@@ -976,7 +976,7 @@ int pa_context_connect(
+@@ -1027,7 +1027,7 @@ int pa_context_connect(
if (!(flags & PA_CONTEXT_NOAUTOSPAWN) && c->conf->autospawn) {
#ifdef HAVE_GETUID
@@ -93,5 +93,5 @@ index 4bc445f..d6c3f6d 100644
else {
c->do_autospawn = true;
--
-1.9.3
+2.8.1
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-card-don-t-allow-the-CARD_NEW-hook-to-fail.patch b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-card-don-t-allow-the-CARD_NEW-hook-to-fail.patch
new file mode 100644
index 000000000..80c291f82
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-card-don-t-allow-the-CARD_NEW-hook-to-fail.patch
@@ -0,0 +1,37 @@
+From d4e6d07fef28d1bd8bfbceab4cc196ef54c23dd8 Mon Sep 17 00:00:00 2001
+From: Tanu Kaskinen <tanuk@iki.fi>
+Date: Tue, 7 Jun 2016 16:51:00 +0300
+Subject: [PATCH 2/5] card: don't allow the CARD_NEW hook to fail
+
+There is currently no use for allowing modules to cancel card creation,
+and I don't see need for that in the future either. Let's simplify
+things by removing the failure handling code.
+
+Upstream-Status: Accepted [expected in 10.0]
+
+Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
+---
+ src/pulsecore/card.c | 7 +------
+ 1 file changed, 1 insertion(+), 6 deletions(-)
+
+diff --git a/src/pulsecore/card.c b/src/pulsecore/card.c
+index 410746b..0ac70b9 100644
+--- a/src/pulsecore/card.c
++++ b/src/pulsecore/card.c
+@@ -149,12 +149,7 @@ pa_card *pa_card_new(pa_core *core, pa_card_new_data *data) {
+ }
+
+ pa_card_new_data_set_name(data, name);
+-
+- if (pa_hook_fire(&core->hooks[PA_CORE_HOOK_CARD_NEW], data) < 0) {
+- pa_xfree(c);
+- pa_namereg_unregister(core, name);
+- return NULL;
+- }
++ pa_hook_fire(&core->hooks[PA_CORE_HOOK_CARD_NEW], data);
+
+ c->core = core;
+ c->name = pa_xstrdup(data->name);
+--
+2.8.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0003-card-move-profile-selection-after-pa_card_new.patch b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0003-card-move-profile-selection-after-pa_card_new.patch
index 0e7780154..e0f424bbc 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0003-card-move-profile-selection-after-pa_card_new.patch
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0003-card-move-profile-selection-after-pa_card_new.patch
@@ -1,61 +1,62 @@
-From 13e85dd1763e99d21a60323671b9a5df08bdae75 Mon Sep 17 00:00:00 2001
+From 0b98309fdbcd36fa92ab53e33c51b485b905e294 Mon Sep 17 00:00:00 2001
From: Tanu Kaskinen <tanuk@iki.fi>
Date: Fri, 23 Oct 2015 12:59:53 +0300
-Subject: [PATCH 3/4] card: move profile selection after pa_card_new()
+Subject: [PATCH 3/5] card: move profile selection after pa_card_new()
I want module-alsa-card to set the availability of unavailable
profiles before the initial card profile gets selected, so that the
selection logic can use correct availability information.
module-alsa-card initializes the jack state after calling
pa_card_new(), however, and the profile selection happens in
-pa_card_new(). This patch solves that by introducing pa_card_put() and
-moving the profile selection code there.
+pa_card_new(). This patch solves that by moving parts of pa_card_new()
+to pa_card_choose_initial_profile() and pa_card_put().
+
+pa_card_choose_initial_profile() applies the profile selection policy,
+so module-alsa-card can first call pa_card_new(), then initialize the
+jack state, and then call pa_card_choose_initial_profile(). After that
+module-alsa-card can still override the profile selection policy, in
+case module-alsa-card was loaded with the "profile" argument. Finally,
+pa_card_put() finalizes the card creation.
An alternative solution would have been to move the jack
initialization to happen before pa_card_new() and use pa_card_new_data
instead of pa_card in the jack initialization code, but I disliked
that idea (I want to get rid of the "new data" pattern eventually).
-The CARD_NEW hook is used when applying the initial profile policy, so
-that was moved to pa_card_put(). That required changing the hook data
-from pa_card_new_data to pa_card. module-card-restore now uses
-pa_card_set_profile() instead of pa_card_new_data_set_profile(). That
-required adding a state variable to pa_card, because
-pa_card_set_profile() needs to distinguish between setting the initial
-profile and setting the profile in other situations.
-
The order in which the initial profile policy is applied is reversed
in this patch. Previously the first one to set it won, now the last
one to set it wins. I think this is better, because if you have N
parties that want to set the profile, we avoid checking N times
whether someone else has already set the profile.
-http://bugzilla.yoctoproject.org/show_bug.cgi?id=8448
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-
-Rebased on 8.0.
-
-Upstream-Status: Denied [The patch set needs some work to be accepted.
-The review thread:
-http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/24301]
+Upstream-Status: Accepted [expected in 10.0]
Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
---
- src/modules/alsa/module-alsa-card.c | 19 +++----
- src/modules/bluetooth/module-bluez4-device.c | 18 +++----
- src/modules/bluetooth/module-bluez5-device.c | 1 +
- src/modules/macosx/module-coreaudio-device.c | 1 +
- src/modules/module-card-restore.c | 24 +++++----
- src/pulsecore/card.c | 81 +++++++++++++++-------------
- src/pulsecore/card.h | 7 +++
- 7 files changed, 86 insertions(+), 65 deletions(-)
+ src/modules/alsa/module-alsa-card.c | 32 +++++----
+ src/modules/bluetooth/module-bluez4-device.c | 31 +++++----
+ src/modules/bluetooth/module-bluez5-device.c | 2 +
+ src/modules/macosx/module-coreaudio-device.c | 2 +
+ src/modules/module-card-restore.c | 36 +++++++---
+ src/pulsecore/card.c | 99 +++++++++++++++++-----------
+ src/pulsecore/card.h | 9 +++
+ src/pulsecore/core.h | 1 +
+ 8 files changed, 143 insertions(+), 69 deletions(-)
diff --git a/src/modules/alsa/module-alsa-card.c b/src/modules/alsa/module-alsa-card.c
-index 9e8cde2..fe240f0 100644
+index d761683..1976230 100644
--- a/src/modules/alsa/module-alsa-card.c
+++ b/src/modules/alsa/module-alsa-card.c
-@@ -770,15 +770,6 @@ int pa__init(pa_module *m) {
+@@ -671,7 +671,7 @@ int pa__init(pa_module *m) {
+ struct userdata *u;
+ pa_reserve_wrapper *reserve = NULL;
+ const char *description;
+- const char *profile = NULL;
++ const char *profile_str = NULL;
+ char *fn = NULL;
+ bool namereg_fail = false;
+
+@@ -799,16 +799,6 @@ int pa__init(pa_module *m) {
goto fail;
}
@@ -64,6 +65,7 @@ index 9e8cde2..fe240f0 100644
- pa_card_new_data_set_profile(&data, profile);
- else {
- pa_log("No such profile: %s", profile);
+- pa_card_new_data_done(&data);
- goto fail;
- }
- }
@@ -71,28 +73,47 @@ index 9e8cde2..fe240f0 100644
u->card = pa_card_new(m->core, &data);
pa_card_new_data_done(&data);
-@@ -789,6 +780,16 @@ int pa__init(pa_module *m) {
- u->card->set_profile = card_set_profile;
+@@ -822,6 +812,26 @@ int pa__init(pa_module *m) {
+ (pa_hook_cb_t) card_suspend_changed, u);
init_jacks(u);
-+ pa_card_put(u->card);
+
-+ if ((profile = pa_modargs_get_value(u->modargs, "profile", NULL))) {
-+ u->card->active_profile = pa_hashmap_get(u->card->profiles, profile);
-+ if (!u->card->active_profile) {
-+ pa_log("No such profile: %s", profile);
++ pa_card_choose_initial_profile(u->card);
++
++ /* If the "profile" modarg is given, we have to override whatever the usual
++ * policy chose in pa_card_choose_initial_profile(). */
++ profile_str = pa_modargs_get_value(u->modargs, "profile", NULL);
++ if (profile_str) {
++ pa_card_profile *profile;
++
++ profile = pa_hashmap_get(u->card->profiles, profile_str);
++ if (!profile) {
++ pa_log("No such profile: %s", profile_str);
+ goto fail;
+ }
++
++ pa_card_set_profile(u->card, profile, false);
+ }
+
++ pa_card_put(u->card);
++
init_profile(u);
init_eld_ctls(u);
diff --git a/src/modules/bluetooth/module-bluez4-device.c b/src/modules/bluetooth/module-bluez4-device.c
-index dd18217..5d0d3db 100644
+index a2de525..13fb7ab 100644
--- a/src/modules/bluetooth/module-bluez4-device.c
+++ b/src/modules/bluetooth/module-bluez4-device.c
-@@ -2304,15 +2304,6 @@ static int add_card(struct userdata *u) {
+@@ -2238,7 +2238,7 @@ static int add_card(struct userdata *u) {
+ pa_bluez4_profile_t *d;
+ pa_bluez4_form_factor_t ff;
+ char *n;
+- const char *default_profile;
++ const char *profile_str;
+ const pa_bluez4_device *device;
+ const pa_bluez4_uuid *uuid;
+
+@@ -2298,16 +2298,6 @@ static int add_card(struct userdata *u) {
*d = PA_BLUEZ4_PROFILE_OFF;
pa_hashmap_put(data.profiles, p->name, p);
@@ -101,6 +122,7 @@ index dd18217..5d0d3db 100644
- pa_card_new_data_set_profile(&data, default_profile);
- else {
- pa_log("Profile '%s' not valid or not supported by device.", default_profile);
+- pa_card_new_data_done(&data);
- return -1;
- }
- }
@@ -108,127 +130,126 @@ index dd18217..5d0d3db 100644
u->card = pa_card_new(u->core, &data);
pa_card_new_data_done(&data);
-@@ -2323,6 +2314,15 @@ static int add_card(struct userdata *u) {
-
+@@ -2319,6 +2309,25 @@ static int add_card(struct userdata *u) {
u->card->userdata = u;
u->card->set_profile = card_set_profile;
-+ pa_card_put(u->card);
+
++ pa_card_choose_initial_profile(u->card);
++
++ /* If the "profile" modarg is given, we have to override whatever the usual
++ * policy chose in pa_card_choose_initial_profile(). */
++ profile_str = pa_modargs_get_value(u->modargs, "profile", NULL);
++ if (profile_str) {
++ pa_card_profile *profile;
+
-+ if ((default_profile = pa_modargs_get_value(u->modargs, "profile", NULL))) {
-+ u->card->active_profile = pa_hashmap_get(u->card->profiles, default_profile);
-+ if (!u->card->active_profile) {
-+ pa_log("Profile '%s' not valid or not supported by device.", default_profile);
++ profile = pa_hashmap_get(u->card->profiles, profile_str);
++ if (!profile) {
++ pa_log("No such profile: %s", profile_str);
+ return -1;
+ }
++
++ pa_card_set_profile(u->card, profile, false);
+ }
-
++
++ pa_card_put(u->card);
++
d = PA_CARD_PROFILE_DATA(u->card->active_profile);
+ if (*d != PA_BLUEZ4_PROFILE_OFF && (!device->transports[*d] ||
diff --git a/src/modules/bluetooth/module-bluez5-device.c b/src/modules/bluetooth/module-bluez5-device.c
-index b015c67..7b90a31 100644
+index 84e6d55..498d0e1 100644
--- a/src/modules/bluetooth/module-bluez5-device.c
+++ b/src/modules/bluetooth/module-bluez5-device.c
-@@ -1959,6 +1959,7 @@ static int add_card(struct userdata *u) {
+@@ -1953,6 +1953,8 @@ static int add_card(struct userdata *u) {
u->card->userdata = u;
u->card->set_profile = set_profile_cb;
++ pa_card_choose_initial_profile(u->card);
+ pa_card_put(u->card);
p = PA_CARD_PROFILE_DATA(u->card->active_profile);
u->profile = *p;
diff --git a/src/modules/macosx/module-coreaudio-device.c b/src/modules/macosx/module-coreaudio-device.c
-index 0c92d42..7190ee9 100644
+index 6c9e55d..d91c656 100644
--- a/src/modules/macosx/module-coreaudio-device.c
+++ b/src/modules/macosx/module-coreaudio-device.c
-@@ -807,6 +807,7 @@ int pa__init(pa_module *m) {
+@@ -821,6 +821,8 @@ int pa__init(pa_module *m) {
pa_card_new_data_done(&card_new_data);
u->card->userdata = u;
u->card->set_profile = card_set_profile;
++ pa_card_choose_initial_profile(u->card);
+ pa_card_put(u->card);
u->rtpoll = pa_rtpoll_new();
pa_thread_mq_init(&u->thread_mq, m->core->mainloop, u->rtpoll);
diff --git a/src/modules/module-card-restore.c b/src/modules/module-card-restore.c
-index f906843..dce6674 100644
+index 7545aa5..718a0dd 100644
--- a/src/modules/module-card-restore.c
+++ b/src/modules/module-card-restore.c
-@@ -515,34 +515,38 @@ static pa_hook_result_t port_offset_change_callback(pa_core *c, pa_device_port *
- return PA_HOOK_OK;
- }
-
--static pa_hook_result_t card_new_hook_callback(pa_core *c, pa_card_new_data *new_data, struct userdata *u) {
-+static pa_hook_result_t card_new_hook_callback(pa_core *c, pa_card *card, struct userdata *u) {
- struct entry *e;
- void *state;
- pa_device_port *p;
- struct port_info *p_info;
-
-- pa_assert(new_data);
-+ pa_assert(c);
-+ pa_assert(card);
-+ pa_assert(u);
-
-- if (!(e = entry_read(u, new_data->name)))
-+ if (!(e = entry_read(u, card->name)))
+@@ -551,16 +551,6 @@ static pa_hook_result_t card_new_hook_callback(pa_core *c, pa_card_new_data *new
+ if (!(e = entry_read(u, new_data->name)))
return PA_HOOK_OK;
- if (e->profile[0]) {
+- if (e->profile[0]) {
- if (!new_data->active_profile) {
- pa_card_new_data_set_profile(new_data, e->profile);
- pa_log_info("Restored profile '%s' for card %s.", new_data->active_profile, new_data->name);
- new_data->save_profile = true;
-+ pa_card_profile *profile;
+-
+- } else
+- pa_log_debug("Not restoring profile for card %s, because already set.", new_data->name);
+- }
+-
+ /* Always restore the latency offsets because their
+ * initial value is always 0 */
+
+@@ -590,6 +580,30 @@ static pa_hook_result_t card_new_hook_callback(pa_core *c, pa_card_new_data *new
+ return PA_HOOK_OK;
+ }
++static pa_hook_result_t card_choose_initial_profile_callback(pa_core *core, pa_card *card, struct userdata *u) {
++ struct entry *e;
++
++ if (!(e = entry_read(u, card->name)))
++ return PA_HOOK_OK;
++
++ if (e->profile[0]) {
++ pa_card_profile *profile;
++
+ profile = pa_hashmap_get(card->profiles, e->profile);
+ if (profile) {
++ pa_log_info("Restoring profile '%s' for card %s.", card->active_profile->name, card->name);
+ pa_card_set_profile(card, profile, true);
-+ pa_log_info("Restored profile '%s' for card %s.", card->active_profile->name, card->name);
- } else
-- pa_log_debug("Not restoring profile for card %s, because already set.", new_data->name);
++ } else {
+ pa_log_debug("Tried to restore profile %s for card %s, but the card doesn't have such profile.",
+ e->profile, card->name);
- }
-
- /* Always restore the latency offsets because their
- * initial value is always 0 */
-
-- pa_log_info("Restoring port latency offsets for card %s.", new_data->name);
-+ pa_log_info("Restoring port latency offsets for card %s.", card->name);
-
- PA_HASHMAP_FOREACH(p_info, e->ports, state)
-- if ((p = pa_hashmap_get(new_data->ports, p_info->name))) {
-+ if ((p = pa_hashmap_get(card->ports, p_info->name))) {
- p->latency_offset = p_info->offset;
- if (!p->preferred_profile && p_info->profile)
- pa_device_port_set_preferred_profile(p, p_info->profile);
++ }
++ }
++
++ entry_free(e);
++
++ return PA_HOOK_OK;
++}
++
+ static pa_hook_result_t card_preferred_port_changed_callback(pa_core *core, pa_card_preferred_port_changed_hook_data *data,
+ struct userdata *u) {
+ struct entry *e;
+@@ -634,6 +648,8 @@ int pa__init(pa_module*m) {
+ u->module = m;
+
+ pa_module_hook_connect(m, &m->core->hooks[PA_CORE_HOOK_CARD_NEW], PA_HOOK_EARLY, (pa_hook_cb_t) card_new_hook_callback, u);
++ pa_module_hook_connect(m, &m->core->hooks[PA_CORE_HOOK_CARD_CHOOSE_INITIAL_PROFILE], PA_HOOK_NORMAL,
++ (pa_hook_cb_t) card_choose_initial_profile_callback, u);
+ pa_module_hook_connect(m, &m->core->hooks[PA_CORE_HOOK_CARD_PUT], PA_HOOK_NORMAL, (pa_hook_cb_t) card_put_hook_callback, u);
+ pa_module_hook_connect(m, &m->core->hooks[PA_CORE_HOOK_CARD_PREFERRED_PORT_CHANGED], PA_HOOK_NORMAL, (pa_hook_cb_t) card_preferred_port_changed_callback, u);
+ pa_module_hook_connect(m, &m->core->hooks[PA_CORE_HOOK_CARD_PROFILE_CHANGED], PA_HOOK_NORMAL, (pa_hook_cb_t) card_profile_changed_callback, u);
diff --git a/src/pulsecore/card.c b/src/pulsecore/card.c
-index f92ac87..1a6e705 100644
+index 0ac70b9..a0c3d93 100644
--- a/src/pulsecore/card.c
+++ b/src/pulsecore/card.c
-@@ -148,6 +148,7 @@ pa_card *pa_card_new(pa_core *core, pa_card_new_data *data) {
- pa_assert(!pa_hashmap_isempty(data->profiles));
-
- c = pa_xnew0(pa_card, 1);
-+ c->state = PA_CARD_STATE_INIT;
-
- if (!(name = pa_namereg_register(core, data->name, PA_NAMEREG_CARD, c, data->namereg_fail))) {
- pa_xfree(c);
-@@ -156,12 +157,6 @@ pa_card *pa_card_new(pa_core *core, pa_card_new_data *data) {
-
- pa_card_new_data_set_name(data, name);
-
-- if (pa_hook_fire(&core->hooks[PA_CORE_HOOK_CARD_NEW], data) < 0) {
-- pa_xfree(c);
-- pa_namereg_unregister(core, name);
-- return NULL;
-- }
--
- c->core = core;
- c->name = pa_xstrdup(data->name);
- c->proplist = pa_proplist_copy(data->proplist);
-@@ -184,38 +179,43 @@ pa_card *pa_card_new(pa_core *core, pa_card_new_data *data) {
- PA_HASHMAP_FOREACH(port, c->ports, state)
- port->card = c;
+@@ -176,38 +176,56 @@ pa_card *pa_card_new(pa_core *core, pa_card_new_data *data) {
+ c->preferred_input_port = data->preferred_input_port;
+ c->preferred_output_port = data->preferred_output_port;
- if (data->active_profile)
- if ((c->active_profile = pa_hashmap_get(c->profiles, data->active_profile)))
@@ -252,50 +273,85 @@ index f92ac87..1a6e705 100644
- PA_HASHMAP_FOREACH(profile, c->profiles, state)
- if (!c->active_profile || profile->priority > c->active_profile->priority)
- c->active_profile = profile;
-- }
-- pa_assert(c->active_profile);
-+void pa_card_put(pa_card *card) {
++void pa_card_choose_initial_profile(pa_card *card) {
+ pa_card_profile *profile;
+ void *state;
++ pa_card_profile *best = NULL;
+
+ pa_assert(card);
+
++ /* By default, pick the highest priority profile that is not unavailable,
++ * or if all profiles are unavailable, pick the profile with the highest
++ * priority regardless of its availability. */
++
+ PA_HASHMAP_FOREACH(profile, card->profiles, state) {
+ if (profile->available == PA_AVAILABLE_NO)
+ continue;
+
-+ if (!card->active_profile || profile->priority > card->active_profile->priority)
-+ card->active_profile = profile;
++ if (!best || profile->priority > best->priority)
++ best = profile;
++ }
++
++ if (!best) {
++ PA_HASHMAP_FOREACH(profile, card->profiles, state) {
++ if (!best || profile->priority > best->priority)
++ best = profile;
+ }
+- pa_assert(c->active_profile);
}
++ pa_assert(best);
- pa_device_init_description(c->proplist, c);
- pa_device_init_icon(c->proplist, true);
- pa_device_init_intended_roles(c->proplist);
-+ /* If all profiles are unavailable, then we still need to pick one */
-+ if (!card->active_profile) {
-+ PA_HASHMAP_FOREACH(profile, card->profiles, state)
-+ if (!card->active_profile || profile->priority > card->active_profile->priority)
-+ card->active_profile = profile;
-+ }
-+ pa_assert(card->active_profile);
++ card->active_profile = best;
++ card->save_profile = false;
- pa_assert_se(pa_idxset_put(core->cards, c, &c->index) >= 0);
-+ pa_hook_fire(&card->core->hooks[PA_CORE_HOOK_CARD_NEW], card);
++ /* Let policy modules override the default. */
++ pa_hook_fire(&card->core->hooks[PA_CORE_HOOK_CARD_CHOOSE_INITIAL_PROFILE], card);
++}
- pa_log_info("Created %u \"%s\"", c->index, c->name);
- pa_subscription_post(core, PA_SUBSCRIPTION_EVENT_CARD|PA_SUBSCRIPTION_EVENT_NEW, c->index);
-+ pa_assert_se(pa_idxset_put(card->core->cards, card, &card->index) >= 0);
-+ card->state = PA_CARD_STATE_LINKED;
++void pa_card_put(pa_card *card) {
++ pa_assert(card);
- pa_hook_fire(&core->hooks[PA_CORE_HOOK_CARD_PUT], c);
- return c;
++ pa_assert_se(pa_idxset_put(card->core->cards, card, &card->index) >= 0);
++ card->linked = true;
++
+ pa_log_info("Created %u \"%s\"", card->index, card->name);
+ pa_hook_fire(&card->core->hooks[PA_CORE_HOOK_CARD_PUT], card);
+ pa_subscription_post(card->core, PA_SUBSCRIPTION_EVENT_CARD|PA_SUBSCRIPTION_EVENT_NEW, card->index);
}
void pa_card_free(pa_card *c) {
-@@ -306,20 +306,27 @@ int pa_card_set_profile(pa_card *c, pa_card_profile *profile, bool save) {
+@@ -218,15 +236,15 @@ void pa_card_free(pa_card *c) {
+
+ core = c->core;
+
+- pa_hook_fire(&core->hooks[PA_CORE_HOOK_CARD_UNLINK], c);
+-
+- pa_namereg_unregister(core, c->name);
+-
+- pa_idxset_remove_by_data(c->core->cards, c, NULL);
++ if (c->linked) {
++ pa_hook_fire(&core->hooks[PA_CORE_HOOK_CARD_UNLINK], c);
+
+- pa_log_info("Freed %u \"%s\"", c->index, c->name);
++ pa_idxset_remove_by_data(c->core->cards, c, NULL);
++ pa_log_info("Freed %u \"%s\"", c->index, c->name);
++ pa_subscription_post(c->core, PA_SUBSCRIPTION_EVENT_CARD|PA_SUBSCRIPTION_EVENT_REMOVE, c->index);
++ }
+
+- pa_subscription_post(c->core, PA_SUBSCRIPTION_EVENT_CARD|PA_SUBSCRIPTION_EVENT_REMOVE, c->index);
++ pa_namereg_unregister(core, c->name);
+
+ pa_assert(pa_idxset_isempty(c->sinks));
+ pa_idxset_free(c->sinks, NULL);
+@@ -298,20 +316,27 @@ int pa_card_set_profile(pa_card *c, pa_card_profile *profile, bool save) {
return 0;
}
@@ -307,7 +363,7 @@ index f92ac87..1a6e705 100644
+ * be probably good to change this so that also the initial profile can be
+ * set up in set_profile(), but if set_profile() fails, that would need
+ * some better handling than what we do here currently. */
-+ if (c->state != PA_CARD_STATE_INIT && (r = c->set_profile(c, profile)) < 0)
++ if (c->linked && (r = c->set_profile(c, profile)) < 0)
return r;
- pa_subscription_post(c->core, PA_SUBSCRIPTION_EVENT_CARD|PA_SUBSCRIPTION_EVENT_CHANGE, c->index);
@@ -321,7 +377,7 @@ index f92ac87..1a6e705 100644
update_port_preferred_profile(c);
- pa_hook_fire(&c->core->hooks[PA_CORE_HOOK_CARD_PROFILE_CHANGED], c);
-+ if (c->state != PA_CARD_STATE_INIT) {
++ if (c->linked) {
+ pa_log_info("Changed profile of card %u \"%s\" to %s", c->index, c->name, profile->name);
+ pa_hook_fire(&c->core->hooks[PA_CORE_HOOK_CARD_PROFILE_CHANGED], c);
+ pa_subscription_post(c->core, PA_SUBSCRIPTION_EVENT_CARD|PA_SUBSCRIPTION_EVENT_CHANGE, c->index);
@@ -330,37 +386,44 @@ index f92ac87..1a6e705 100644
return 0;
}
diff --git a/src/pulsecore/card.h b/src/pulsecore/card.h
-index fff9057..a944301 100644
+index d4970e3..fd1fe0a 100644
--- a/src/pulsecore/card.h
+++ b/src/pulsecore/card.h
-@@ -34,6 +34,11 @@ typedef enum pa_available {
- PA_AVAILABLE_YES = 2,
- } pa_available_t;
-
-+typedef enum pa_card_state {
-+ PA_CARD_STATE_INIT,
-+ PA_CARD_STATE_LINKED,
-+} pa_card_state_t;
+@@ -86,6 +86,8 @@ struct pa_card {
+
+ pa_suspend_cause_t suspend_cause;
+
++ bool linked;
+
- struct pa_card_profile {
- pa_card *card;
- char *name;
-@@ -66,6 +71,7 @@ struct pa_card_profile {
-
- struct pa_card {
- uint32_t index;
-+ pa_card_state_t state;
- pa_core *core;
-
- char *name;
-@@ -120,6 +126,7 @@ void pa_card_new_data_set_profile(pa_card_new_data *data, const char *profile);
+ void *userdata;
+
+ int (*set_profile)(pa_card *c, pa_card_profile *profile);
+@@ -128,6 +130,13 @@ void pa_card_new_data_set_preferred_port(pa_card_new_data *data, pa_direction_t
void pa_card_new_data_done(pa_card_new_data *data);
pa_card *pa_card_new(pa_core *c, pa_card_new_data *data);
++
++/* Select the initial card profile according to the configured policies. This
++ * must be called between pa_card_new() and pa_card_put(), after the port and
++ * profile availablities have been initialized. */
++void pa_card_choose_initial_profile(pa_card *card);
++
+void pa_card_put(pa_card *c);
void pa_card_free(pa_card *c);
void pa_card_add_profile(pa_card *c, pa_card_profile *profile);
+diff --git a/src/pulsecore/core.h b/src/pulsecore/core.h
+index 00d7f2f..802111b 100644
+--- a/src/pulsecore/core.h
++++ b/src/pulsecore/core.h
+@@ -118,6 +118,7 @@ typedef enum pa_core_hook {
+ PA_CORE_HOOK_CLIENT_PROPLIST_CHANGED,
+ PA_CORE_HOOK_CLIENT_SEND_EVENT,
+ PA_CORE_HOOK_CARD_NEW,
++ PA_CORE_HOOK_CARD_CHOOSE_INITIAL_PROFILE,
+ PA_CORE_HOOK_CARD_PUT,
+ PA_CORE_HOOK_CARD_UNLINK,
+ PA_CORE_HOOK_CARD_PREFERRED_PORT_CHANGED,
--
-2.7.0
+2.8.1
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0004-card-remove-pa_card_new_data.active_profile.patch b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0004-card-remove-pa_card_new_data.active_profile.patch
new file mode 100644
index 000000000..480f2cea4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0004-card-remove-pa_card_new_data.active_profile.patch
@@ -0,0 +1,72 @@
+From 375bc56fd3d66f40a9650224e5bfea4002494ade Mon Sep 17 00:00:00 2001
+From: Tanu Kaskinen <tanuk@iki.fi>
+Date: Fri, 23 Oct 2015 13:50:35 +0300
+Subject: [PATCH 4/5] card: remove pa_card_new_data.active_profile
+
+It's not being used any more.
+
+Upstream-Status: Accepted [expected in 10.0]
+
+Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
+---
+ src/pulsecore/card.c | 8 --------
+ src/pulsecore/card.h | 5 -----
+ 2 files changed, 13 deletions(-)
+
+diff --git a/src/pulsecore/card.c b/src/pulsecore/card.c
+index a0c3d93..bc5b75b 100644
+--- a/src/pulsecore/card.c
++++ b/src/pulsecore/card.c
+@@ -96,13 +96,6 @@ void pa_card_new_data_set_name(pa_card_new_data *data, const char *name) {
+ data->name = pa_xstrdup(name);
+ }
+
+-void pa_card_new_data_set_profile(pa_card_new_data *data, const char *profile) {
+- pa_assert(data);
+-
+- pa_xfree(data->active_profile);
+- data->active_profile = pa_xstrdup(profile);
+-}
+-
+ void pa_card_new_data_set_preferred_port(pa_card_new_data *data, pa_direction_t direction, pa_device_port *port) {
+ pa_assert(data);
+
+@@ -125,7 +118,6 @@ void pa_card_new_data_done(pa_card_new_data *data) {
+ pa_hashmap_free(data->ports);
+
+ pa_xfree(data->name);
+- pa_xfree(data->active_profile);
+ }
+
+ pa_card *pa_card_new(pa_core *core, pa_card_new_data *data) {
+diff --git a/src/pulsecore/card.h b/src/pulsecore/card.h
+index fd1fe0a..5699475 100644
+--- a/src/pulsecore/card.h
++++ b/src/pulsecore/card.h
+@@ -101,15 +101,11 @@ typedef struct pa_card_new_data {
+ pa_module *module;
+
+ pa_hashmap *profiles;
+- char *active_profile;
+-
+ pa_hashmap *ports;
+ pa_device_port *preferred_input_port;
+ pa_device_port *preferred_output_port;
+
+ bool namereg_fail:1;
+-
+- bool save_profile:1;
+ } pa_card_new_data;
+
+ typedef struct {
+@@ -125,7 +121,6 @@ void pa_card_profile_set_available(pa_card_profile *c, pa_available_t available)
+
+ pa_card_new_data *pa_card_new_data_init(pa_card_new_data *data);
+ void pa_card_new_data_set_name(pa_card_new_data *data, const char *name);
+-void pa_card_new_data_set_profile(pa_card_new_data *data, const char *profile);
+ void pa_card_new_data_set_preferred_port(pa_card_new_data *data, pa_direction_t direction, pa_device_port *port);
+ void pa_card_new_data_done(pa_card_new_data *data);
+
+--
+2.8.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0004-alsa-set-availability-for-some-unavailable-profiles.patch b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0005-alsa-set-availability-for-some-unavailable-profiles.patch
index e0efa70f3..5563d2c35 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0004-alsa-set-availability-for-some-unavailable-profiles.patch
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0005-alsa-set-availability-for-some-unavailable-profiles.patch
@@ -1,7 +1,7 @@
-From 690d567e298f6687b61c82660b051df5b25482ee Mon Sep 17 00:00:00 2001
+From ae6a01ba204b480bda6a5b4431be3d22e53a7006 Mon Sep 17 00:00:00 2001
From: Tanu Kaskinen <tanuk@iki.fi>
Date: Fri, 23 Oct 2015 13:37:11 +0300
-Subject: [PATCH 4/4] alsa: set availability for (some) unavailable profiles
+Subject: [PATCH 5/5] alsa: set availability for (some) unavailable profiles
The alsa card hasn't so far set any availability for profiles. That
caused an issue with some HDMI hardware: the sound card has two HDMI
@@ -22,50 +22,46 @@ pa_card_profile, however.
BugLink: https://bugzilla.yoctoproject.org/show_bug.cgi?id=8448
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-
-Rebased on 8.0.
-
-Upstream-Status: Denied [The patch set needs some work to be accepted.
-The review thread:
-http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/24301]
+Upstream-Status: Accepted [expected in 10.0]
Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
---
- src/modules/alsa/module-alsa-card.c | 25 +++++++++++++++++++++++++
- 1 file changed, 25 insertions(+)
+ src/modules/alsa/module-alsa-card.c | 27 +++++++++++++++++++++++++++
+ 1 file changed, 27 insertions(+)
diff --git a/src/modules/alsa/module-alsa-card.c b/src/modules/alsa/module-alsa-card.c
-index fe240f0..bdbdc12 100644
+index 1976230..323e08a 100644
--- a/src/modules/alsa/module-alsa-card.c
+++ b/src/modules/alsa/module-alsa-card.c
-@@ -366,6 +366,8 @@ static int report_jack_state(snd_mixer_elem_t *melem, unsigned int mask) {
+@@ -366,6 +366,7 @@ static int report_jack_state(snd_mixer_elem_t *melem, unsigned int mask) {
void *state;
pa_alsa_jack *jack;
struct temp_port_avail *tp, *tports;
-+ pa_device_port *port;
+ pa_card_profile *profile;
pa_assert(u);
-@@ -412,6 +414,29 @@ static int report_jack_state(snd_mixer_elem_t *melem, unsigned int mask) {
+@@ -426,6 +427,32 @@ static int report_jack_state(snd_mixer_elem_t *melem, unsigned int mask) {
+ if (tp->avail == PA_AVAILABLE_NO)
pa_device_port_set_available(tp->port, tp->avail);
- pa_xfree(tports);
-+
+ /* Update profile availabilities. The logic could be improved; for now we
+ * only set obviously unavailable profiles (those that contain only
+ * unavailable ports) to PA_AVAILABLE_NO and all others to
+ * PA_AVAILABLE_UNKNOWN. */
+ PA_HASHMAP_FOREACH(profile, u->card->profiles, state) {
++ pa_device_port *port;
+ void *state2;
+ pa_available_t available = PA_AVAILABLE_NO;
+
+ /* Don't touch the "off" profile. */
-+ if (pa_hashmap_size(profile->ports) == 0)
++ if (profile->n_sources == 0 && profile->n_sinks == 0)
+ continue;
+
-+ PA_HASHMAP_FOREACH(port, profile->ports, state2) {
++ PA_HASHMAP_FOREACH(port, u->card->ports, state2) {
++ if (!pa_hashmap_get(port->profiles, profile->name))
++ continue;
++
+ if (port->available != PA_AVAILABLE_NO) {
+ available = PA_AVAILABLE_UNKNOWN;
+ break;
@@ -75,9 +71,9 @@ index fe240f0..bdbdc12 100644
+ pa_card_profile_set_available(profile, available);
+ }
+
+ pa_xfree(tports);
return 0;
}
-
--
-2.7.0
+2.8.1
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio_8.0.bb b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio_9.0.bb
index b01ba8f68..00f5442b8 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio_8.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio_9.0.bb
@@ -3,15 +3,15 @@ require pulseaudio.inc
SRC_URI = "http://freedesktop.org/software/pulseaudio/releases/${BP}.tar.xz \
file://0001-padsp-Make-it-compile-on-musl.patch \
file://0001-client-conf-Add-allow-autospawn-for-root.patch \
- file://volatiles.04_pulse \
- file://0001-card-add-pa_card_profile.ports.patch \
- file://0002-alsa-bluetooth-fail-if-user-requested-profile-doesn-.patch \
+ file://0001-alsa-bluetooth-fail-if-user-requested-profile-doesn-.patch \
+ file://0002-card-don-t-allow-the-CARD_NEW-hook-to-fail.patch \
file://0003-card-move-profile-selection-after-pa_card_new.patch \
- file://0004-alsa-set-availability-for-some-unavailable-profiles.patch \
- file://0001-Revert-module-switch-on-port-available-Route-to-pref.patch \
+ file://0004-card-remove-pa_card_new_data.active_profile.patch \
+ file://0005-alsa-set-availability-for-some-unavailable-profiles.patch \
+ file://volatiles.04_pulse \
"
-SRC_URI[md5sum] = "8678442ba0bb4b4c33ac6f62542962df"
-SRC_URI[sha256sum] = "690eefe28633466cfd1ab9d85ebfa9376f6b622deec6bfee5091ac9737cd1989"
+SRC_URI[md5sum] = "da7162541b3a9bc20576dbd0d7d1489a"
+SRC_URI[sha256sum] = "c3d3d66b827f18fbe903fe3df647013f09fc1e2191c035be1ee2d82a9e404686"
do_compile_prepend() {
mkdir -p ${S}/libltdl
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/webp/libwebp_0.5.0.bb b/import-layers/yocto-poky/meta/recipes-multimedia/webp/libwebp_0.5.1.bb
index c89adac5d..b882db75b 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/webp/libwebp_0.5.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/webp/libwebp_0.5.1.bb
@@ -14,8 +14,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=6e8dee932c26f2dab503abf70c96d8bb \
file://PATENTS;md5=c6926d0cb07d296f886ab6e0cc5a85b7"
SRC_URI = "http://downloads.webmproject.org/releases/webp/${BP}.tar.gz"
-SRC_URI[md5sum] = "ba81eb9bf23e3c69a2f5cc8dcdb5938f"
-SRC_URI[sha256sum] = "5cd3bb7b623aff1f4e70bd611dc8dbabbf7688fd5eb225b32e02e09e37dfb274"
+SRC_URI[md5sum] = "3d7db92ebba5b4f679413d25c6040881"
+SRC_URI[sha256sum] = "6ad66c6fcd60a023de20b6856b03da8c7d347269d76b1fd9c3287e8b5e8813df"
UPSTREAM_CHECK_URI = "http://downloads.webmproject.org/releases/webp/index.html"
@@ -26,6 +26,11 @@ EXTRA_OECONF = " \
--enable-libwebpdemux \
--enable-threading \
"
+# Do not trust configure to determine if neon is available.
+#
+EXTRA_OECONF_append_arm = " \
+ ${@bb.utils.contains("TUNE_FEATURES","neon","--enable-neon","--disable-neon",d)} \
+"
inherit autotools lib_package
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/x264/x264_git.bb b/import-layers/yocto-poky/meta/recipes-multimedia/x264/x264_git.bb
index 0a6990980..393310f68 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/x264/x264_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/x264/x264_git.bb
@@ -42,14 +42,12 @@ do_configure() {
./configure ${EXTRA_OECONF}
}
-# Get rid of -e
-EXTRA_OEMAKE = ""
AS = "${TARGET_PREFIX}gcc"
do_install() {
oe_runmake install DESTDIR=${D}
}
-# PIC can't be enabled for 32-bit x86
-INSANE_SKIP_${PN}_append_x86 = " textrel"
+# PIC can't be enabled for few BSP's
+INSANE_SKIP_${PN}_append = " textrel"
OpenPOWER on IntegriCloud