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-fpu.inc6
-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/Check-if-wordexp-function-is-supported.patch51
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/avoid-including-sys-poll.h-directly.patch183
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib_1.1.0.bb51
-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.0.bb105
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/0001-as10k1-Make-output_tram_line-static-inline.patch31
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/autotools.patch32
-rwxr-xr-ximport-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/gitcompile_hdajacksensetest13
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/makefile_no_gtk.patch29
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools_1.1.0.bb42
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.0.bb21
-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/0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch56
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils_1.1.0.bb102
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg_3.0.bb139
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/flac/flac_1.3.1.bb42
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/files/0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch42
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/Add-error-signal-emission-for-missing-plugins.patch252
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/Fix-pause-play.patch107
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/filechooser.patch54
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/gst-player.desktop10
-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.bb39
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc56
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav.inc46
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-Disable-yasm-for-libav-when-disable-yasm.patch33
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/workaround-to-build-gst-libav-for-i586-with-gcc.patch26
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.6.3.bb20
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb38
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb68
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx.inc43
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx/0001-omx-fixed-type-error-in-printf-call.patch30
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.2.0.bb11
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb25
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc148
-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.patch57
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-glimagesink-Downrank-to-marginal.patch32
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch27
-rwxr-xr-ximport-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-glwindow-fix-memory-leak-of-navigation-thre.patch35
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/avoid-including-sys-poll.h-directly.patch30
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch64
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch86
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch28
-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_git.bb65
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base.inc50
-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.patch168
-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.patch298
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-riff-add-missing-include-directories-when-calling-in.patch28
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch225
-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.patch27
-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.patch69
-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.patch32
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/get-caps-from-src-pad-when-query-caps.patch44
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/make-gio_unix_2_0-dependency-configurable.patch47
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.6.3.bb25
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb27
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good.inc53
-rwxr-xr-ximport-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch62
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/avoid-including-sys-poll.h-directly.patch44
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/ensure-valid-sentinel-for-gst_structure_get.patch40
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.6.3.bb15
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb28
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly.inc31
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.6.3.bb13
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb41
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc40
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server.inc24
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server/0001-Don-t-hardcode-libtool-name-when-using-introspection.patch27
-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.inc58
-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.6.3.bb14
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb30
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/lame/lame/lame-3.99.5_fix_for_automake-1.12.x.patch59
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/lame/lame/no-gtk1.patch20
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/lame/lame_3.99.5.bb30
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/liba52/liba52/buildcleanup.patch89
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/liba52/liba52_0.7.4.bb26
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libid3tag/libid3tag/addpkgconfig.patch43
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libid3tag/libid3tag/obsolete_automake_macros.patch15
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb22
-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/libogg/libogg_1.3.2.bb17
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libomxil/libomxil-0.9.3/configure-fix.patch58
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libomxil/libomxil-0.9.3/disable-so-versioning.patch36
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libomxil/libomxil-0.9.3/dynamicloader-linking.patch20
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libomxil/libomxil-0.9.3/makefile-docdir-fix.patch19
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libomxil/libomxil-0.9.3/parallel-make.patch18
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libomxil/libomxil_0.9.3.bb37
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libpng/libpng_1.6.21.bb25
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.1.8.bb21
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.26.bb26
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libtheora/libtheora-1.1.1/no-docs.patch15
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libtheora/libtheora_1.1.1.bb22
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/libtool2.patch19
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libtiff/tiff_4.0.6.bb47
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libvorbis/libvorbis_1.3.5.bb17
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/mpeg2dec/mpeg2dec-0.4.1/altivec_h_needed.patch43
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.4.1.bb40
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio.inc200
-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-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.patch97
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-padsp-Make-it-compile-on-musl.patch70
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-alsa-bluetooth-fail-if-user-requested-profile-doesn-.patch65
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0003-card-move-profile-selection-after-pa_card_new.patch366
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0004-alsa-set-availability-for-some-unavailable-profiles.patch83
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/volatiles.04_pulse2
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio_8.0.bb19
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/sbc/sbc_1.3.bb16
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/speex/speex_1.2rc2.bb19
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/speex/speexdsp/0001-Don-t-rely-on-HAVE_STDINT_H-et-al.-being-defined.patch63
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/speex/speexdsp_1.2rc3.bb39
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/tremor/tremor/obsolete_automake_macros.patch15
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/tremor/tremor/tremor-arm-thumb2.patch104
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/tremor/tremor_20150107.bb27
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/webp/libwebp_0.5.0.bb49
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/x264/x264/don-t-default-to-cortex-a9-with-neon.patch29
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/x264/x264_git.bb55
128 files changed, 7205 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-fpu.inc b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-fpu.inc
new file mode 100644
index 000000000..50402307c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-fpu.inc
@@ -0,0 +1,6 @@
+
+def get_alsa_fpu_setting(bb, d):
+ if d.getVar('TARGET_FPU', True) in [ 'soft' ]:
+ return "--with-softfloat"
+ return ""
+
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
new file mode 100644
index 000000000..0ead0cdaf
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/0001-topology-Add-missing-include-sys-stat.h.patch
@@ -0,0 +1,35 @@
+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/Check-if-wordexp-function-is-supported.patch b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch
new file mode 100644
index 000000000..795e48ab2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch
@@ -0,0 +1,51 @@
+From 3408f8e78776b12f131e433749721602f87e0a70 Mon Sep 17 00:00:00 2001
+From: "Hong H. Pham" <hong.pham@windriver.com>
+Date: Fri, 29 Aug 2014 17:13:55 +0300
+Subject: [PATCH] Check if wordexp function is supported
+
+eglibc could be configured to build without wordexp, so it is not enough
+to check if wordexp.h exists (the header file could be installed, but it's
+possible that the wordexp() function is not supported). An additional
+check if wordexp() is supported by the system C library is needed.
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Hong H. Pham <hong.pham@windriver.com>
+Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
+---
+ configure.ac | 5 ++++-
+ src/userfile.c | 2 +-
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 9490d39..b08a90a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -295,7 +295,10 @@ fi
+ AC_SUBST(ALSA_DEPLIBS)
+
+ dnl Check for headers
+-AC_CHECK_HEADERS([wordexp.h endian.h sys/endian.h sys/shm.h])
++AC_CHECK_HEADERS([wordexp.h endian.h sys/endian.h sys/shm.h],
++ dnl Make sure wordexp is supported by the C library
++ AC_CHECK_FUNCS([wordexp])
++)
+
+ dnl Check for resmgr support...
+ AC_MSG_CHECKING(for resmgr support)
+diff --git a/src/userfile.c b/src/userfile.c
+index 72779da..e9d13e6 100644
+--- a/src/userfile.c
++++ b/src/userfile.c
+@@ -32,7 +32,7 @@
+ * stores the first matchine one. The returned string is strdup'ed.
+ */
+
+-#ifdef HAVE_WORDEXP_H
++#if (defined(HAVE_WORDEXP_H) && defined(HAVE_WORDEXP))
+ #include <wordexp.h>
+ #include <assert.h>
+ int snd_user_file(const char *file, char **result)
+--
+2.6.4
+
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
new file mode 100644
index 000000000..161619b27
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/avoid-including-sys-poll.h-directly.patch
@@ -0,0 +1,183 @@
+From 7dcf46969e85c881c901df4b49309e9091cad16a 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
+
+Fixes compiler warnings when building with musl libc.
+
+Upstream-Status: Pending
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ aserver/aserver.c | 2 +-
+ include/asoundlib-head.h | 2 +-
+ include/asoundlib.h | 2 +-
+ include/local.h | 2 +-
+ src/control/control.c | 2 +-
+ src/control/control_shm.c | 2 +-
+ src/pcm/pcm_direct.c | 2 +-
+ src/pcm/pcm_mmap.c | 2 +-
+ src/pcm/pcm_share.c | 2 +-
+ src/pcm/pcm_shm.c | 2 +-
+ src/seq/seq.c | 2 +-
+ src/shmarea.c | 2 +-
+ 12 files changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/aserver/aserver.c b/aserver/aserver.c
+index 1579da7..ef64248 100644
+--- a/aserver/aserver.c
++++ b/aserver/aserver.c
+@@ -20,7 +20,7 @@
+
+ #include <sys/shm.h>
+ #include <sys/socket.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <sys/un.h>
+ #include <sys/uio.h>
+ #include <stdio.h>
+diff --git a/include/asoundlib-head.h b/include/asoundlib-head.h
+index 1ec611e..21e32c6 100644
+--- a/include/asoundlib-head.h
++++ b/include/asoundlib-head.h
+@@ -35,6 +35,6 @@
+ #include <string.h>
+ #include <fcntl.h>
+ #include <assert.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <errno.h>
+ #include <stdarg.h>
+diff --git a/include/asoundlib.h b/include/asoundlib.h
+index 3c2766e..a546194 100644
+--- a/include/asoundlib.h
++++ b/include/asoundlib.h
+@@ -35,7 +35,7 @@
+ #include <string.h>
+ #include <fcntl.h>
+ #include <assert.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <errno.h>
+ #include <stdarg.h>
+ #include <endian.h>
+diff --git a/include/local.h b/include/local.h
+index b429f5d..e05898f 100644
+--- a/include/local.h
++++ b/include/local.h
+@@ -47,7 +47,7 @@
+ #error Header defining endianness not defined
+ #endif
+ #include <stdarg.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <sys/types.h>
+ #include <errno.h>
+ #include <linux/types.h>
+diff --git a/src/control/control.c b/src/control/control.c
+index 4a28cf6..071c5db 100644
+--- a/src/control/control.c
++++ b/src/control/control.c
+@@ -48,7 +48,7 @@ and IEC958 structure.
+ #include <string.h>
+ #include <fcntl.h>
+ #include <signal.h>
+-#include <sys/poll.h>
++#include <poll.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
++++ b/src/control/control_shm.c
+@@ -27,7 +27,7 @@
+ #include <fcntl.h>
+ #include <sys/shm.h>
+ #include <sys/socket.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <sys/un.h>
+ #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
+--- a/src/pcm/pcm_direct.c
++++ b/src/pcm/pcm_direct.c
+@@ -30,7 +30,7 @@
+ #include <grp.h>
+ #include <sys/ioctl.h>
+ #include <sys/mman.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <sys/shm.h>
+ #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
+--- a/src/pcm/pcm_mmap.c
++++ b/src/pcm/pcm_mmap.c
+@@ -22,7 +22,7 @@
+ #include <stdio.h>
+ #include <malloc.h>
+ #include <string.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <sys/mman.h>
+ #ifdef HAVE_SYS_SHM_H
+ #include <sys/shm.h>
+diff --git a/src/pcm/pcm_share.c b/src/pcm/pcm_share.c
+index 5d8aaf2..21a57fc 100644
+--- a/src/pcm/pcm_share.c
++++ b/src/pcm/pcm_share.c
+@@ -34,7 +34,7 @@
+ #include <signal.h>
+ #include <math.h>
+ #include <sys/socket.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <pthread.h>
+ #include "pcm_local.h"
+
+diff --git a/src/pcm/pcm_shm.c b/src/pcm/pcm_shm.c
+index a815ac6..4ee958c 100644
+--- a/src/pcm/pcm_shm.c
++++ b/src/pcm/pcm_shm.c
+@@ -36,7 +36,7 @@
+ #include <sys/ioctl.h>
+ #include <sys/shm.h>
+ #include <sys/socket.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <sys/un.h>
+ #include <sys/mman.h>
+ #include <netinet/in.h>
+diff --git a/src/seq/seq.c b/src/seq/seq.c
+index 620ca3f..681cef1 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)
+
+ */
+
+-#include <sys/poll.h>
++#include <poll.h>
+ #include "seq_local.h"
+
+ /****************************************************************************
+diff --git a/src/shmarea.c b/src/shmarea.c
+index 9843aa8..eaa71f0 100644
+--- a/src/shmarea.c
++++ b/src/shmarea.c
+@@ -27,7 +27,7 @@
+ #include <malloc.h>
+ #include <string.h>
+ #include <errno.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <sys/mman.h>
+ #include <sys/shm.h>
+ #include "list.h"
+--
+1.9.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.0.bb
new file mode 100644
index 000000000..a73da2882
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib_1.1.0.bb
@@ -0,0 +1,51 @@
+SUMMARY = "ALSA sound library"
+HOMEPAGE = "http://www.alsa-project.org"
+BUGTRACKER = "https://bugtrack.alsa-project.org/alsa-bug/login_page.php"
+SECTION = "libs/multimedia"
+LICENSE = "LGPLv2.1 & GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34 \
+ file://src/socket.c;beginline=1;endline=26;md5=11ff89a8a7a4a690a5c78effe8159545"
+
+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"
+
+inherit autotools pkgconfig
+
+require alsa-fpu.inc
+EXTRA_OECONF += "${@get_alsa_fpu_setting(bb, d)} "
+
+EXTRA_OECONF = "--disable-python"
+
+EXTRA_OECONF_append_libc-uclibc = " --with-versioned=no "
+
+PACKAGES =+ "alsa-server libasound alsa-conf-base alsa-conf alsa-doc"
+FILES_${PN} += "${libdir}/${BPN}/smixer/*.so"
+FILES_${PN}-dev += "${libdir}/${BPN}/smixer/*.la"
+FILES_libasound = "${libdir}/libasound.so.*"
+FILES_alsa-server = "${bindir}/*"
+FILES_alsa-conf = "${datadir}/alsa/"
+FILES_alsa-conf-base = "\
+${datadir}/alsa/alsa.conf \
+${datadir}/alsa/cards/aliases.conf \
+${datadir}/alsa/pcm/default.conf \
+${datadir}/alsa/pcm/dmix.conf \
+${datadir}/alsa/pcm/dsnoop.conf"
+
+RDEPENDS_libasound = "alsa-conf-base alsa-conf"
+# upgrade path
+RPROVIDES_${PN}-dev = "alsa-dev"
+RREPLACES_${PN}-dev = "alsa-dev"
+RCONFLICTS_${PN}-dev = "alsa-dev"
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
new file mode 100644
index 000000000..8e5b6a2a2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins/0001-pph-include-config.h-from-rate_speexrate.c.patch
@@ -0,0 +1,35 @@
+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.0.bb
new file mode 100644
index 000000000..fec657530
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins_1.1.0.bb
@@ -0,0 +1,105 @@
+SUMMARY = "ALSA Plugins"
+HOMEPAGE = "http://alsa-project.org"
+SECTION = "multimedia"
+
+# The primary license of alsa-plugins is LGPLv2.1.
+#
+# m4/attributes.m4 is licensed under GPLv2+. m4/attributes.m4 is part of the
+# build system, and doesn't affect the licensing of the build result.
+#
+# The samplerate plugin source code is licensed under GPLv2+ to be consistent
+# with the libsamplerate license. However, if the licensee has a commercial
+# license for libsamplerate, the samplerate plugin may be used under the terms
+# of LGPLv2.1 like the rest of the plugins.
+LICENSE = "LGPLv2.1 & GPLv2+"
+LIC_FILES_CHKSUM = "\
+ file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34 \
+ file://COPYING.GPL;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://m4/attributes.m4;endline=33;md5=b25958da44c02231e3641f1bccef53eb \
+ 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"
+
+DEPENDS += "alsa-lib"
+
+inherit autotools pkgconfig
+
+PACKAGECONFIG ??= "\
+ samplerate \
+ speexdsp \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)} \
+"
+PACKAGECONFIG[avcodec] = "--enable-avcodec,--disable-avcodec,libav"
+PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack"
+PACKAGECONFIG[maemo-plugin] = "--enable-maemo-plugin,--disable-maemo-plugin"
+PACKAGECONFIG[maemo-resource-manager] = "--enable-maemo-resource-manager,--disable-maemo-resource-manager,dbus"
+PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio"
+PACKAGECONFIG[samplerate] = "--enable-samplerate,--disable-samplerate,libsamplerate0"
+PACKAGECONFIG[speexdsp] = "--with-speex=lib,--with-speex=no,speexdsp"
+
+PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'alsa-plugins-pulseaudio-conf', '', d)}"
+
+PACKAGES_DYNAMIC = "^libasound-module-.*"
+
+# The alsa-plugins package doesn't itself contain anything, it just depends on
+# all built plugins.
+ALLOW_EMPTY_${PN} = "1"
+
+do_install_append() {
+ rm ${D}${libdir}/alsa-lib/*.la
+
+ # We use the example as is, so just drop the .example suffix.
+ if [ "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'yes', 'no', d)}" = "yes" ]; then
+ mv ${D}${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf.example ${D}${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf
+ fi
+}
+
+python populate_packages_prepend() {
+ plugindir = bb.data.expand('${libdir}/alsa-lib/', d)
+ packages = " ".join(do_split_packages(d, plugindir, '^libasound_module_(.*)\.so$', 'libasound-module-%s', 'Alsa plugin for %s', extra_depends=''))
+ d.setVar("RDEPENDS_alsa-plugins", packages)
+}
+
+# The rate plugins create some symlinks. For example, the samplerate plugin
+# creates these links to the main plugin file:
+#
+# libasound_module_rate_samplerate_best.so
+# libasound_module_rate_samplerate_linear.so
+# libasound_module_rate_samplerate_medium.so
+# libasound_module_rate_samplerate_order.so
+#
+# The other rate plugins create similar links. We have to add the links to
+# FILES manually, because do_split_packages() skips the links (which is good,
+# because we wouldn't want do_split_packages() to create separate packages for
+# the symlinks).
+#
+# The symlinks cause QA errors, because usually it's a bug if a non
+# -dev/-dbg/-nativesdk package contains links to .so files, but in this case
+# the errors are false positives, so we disable the QA checks.
+FILES_${MLPREFIX}libasound-module-rate-lavcrate += "${libdir}/alsa-lib/*rate_lavcrate_*.so"
+FILES_${MLPREFIX}libasound-module-rate-samplerate += "${libdir}/alsa-lib/*rate_samplerate_*.so"
+FILES_${MLPREFIX}libasound-module-rate-speexrate += "${libdir}/alsa-lib/*rate_speexrate_*.so"
+INSANE_SKIP_${MLPREFIX}libasound-module-rate-lavcrate = "dev-so"
+INSANE_SKIP_${MLPREFIX}libasound-module-rate-samplerate = "dev-so"
+INSANE_SKIP_${MLPREFIX}libasound-module-rate-speexrate = "dev-so"
+
+# 50-pulseaudio.conf defines a device named "pulse" that applications can use
+# if they explicitly want to use the PulseAudio plugin.
+# 99-pulseaudio-default.conf configures the "default" device to use the
+# PulseAudio plugin.
+FILES_${PN}-pulseaudio-conf += "\
+ ${datadir}/alsa/alsa.conf.d/50-pulseaudio.conf \
+ ${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf \
+"
+
+RDEPENDS_${PN}-pulseaudio-conf += "\
+ libasound-module-conf-pulse \
+ libasound-module-ctl-pulse \
+ libasound-module-pcm-pulse \
+"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/0001-as10k1-Make-output_tram_line-static-inline.patch b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/0001-as10k1-Make-output_tram_line-static-inline.patch
new file mode 100644
index 000000000..d049a30d2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/0001-as10k1-Make-output_tram_line-static-inline.patch
@@ -0,0 +1,31 @@
+From 1e5926df74a35fe2cd90bc59f5264a8715c94048 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 7 Sep 2015 08:16:59 +0000
+Subject: [PATCH] as10k1: Make output_tram_line() static inline
+
+The function is not used in any other file, its better to make it static
+inline so compiler has a better chance of optimizing here
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ as10k1/as10k1.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/as10k1/as10k1.c b/as10k1/as10k1.c
+index 96af0c3..d0766fd 100644
+--- a/as10k1/as10k1.c
++++ b/as10k1/as10k1.c
+@@ -366,7 +366,7 @@ void as_exit(const char *message)
+ exit(1);
+ }
+
+-inline void output_tram_line( struct list_head *line_head, int type){
++static inline void output_tram_line( struct list_head *line_head, int type){
+
+ struct tram *tram_sym;
+ struct list_head *entry;
+--
+2.5.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/autotools.patch b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/autotools.patch
new file mode 100644
index 000000000..319f25d27
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/autotools.patch
@@ -0,0 +1,32 @@
+Add parameters to autoreconf to support cross compile.
+Remove some sub-components which needs further recipe support.
+
+Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
+
+Upstream-Status: Inappropriate [configuration]
+
+diff -ruN alsa-tools-1.0.24.1-orig//ld10k1/gitcompile alsa-tools-1.0.24.1/ld10k1/gitcompile
+--- alsa-tools-1.0.24.1-orig//ld10k1/gitcompile 2011-07-06 11:27:40.227665002 +0800
++++ alsa-tools-1.0.24.1/ld10k1/gitcompile 2011-07-14 13:26:18.017665004 +0800
+@@ -1,6 +1,6 @@
+ #!/bin/bash
+
+-autoreconf -fi || exit 1
++autoreconf $ACLOCAL_FLAGS -fi || exit 1
+ export CFLAGS='-O2 -Wall -pipe -g'
+ echo "CFLAGS=$CFLAGS"
+ echo "./configure $@"
+diff -ruN alsa-tools-1.0.24.1-orig//Makefile alsa-tools-1.0.24.1/Makefile
+--- alsa-tools-1.0.24.1-orig//Makefile 2011-07-06 11:27:40.207665000 +0800
++++ alsa-tools-1.0.24.1/Makefile 2011-07-14 15:08:08.877665009 +0800
+@@ -1,8 +1,8 @@
+ VERSION = 1.1.0
+ TOP = .
+-SUBDIRS = as10k1 envy24control hdsploader hdspconf hdspmixer \
++SUBDIRS = as10k1 envy24control \
+ mixartloader pcxhrloader rmedigicontrol sb16_csp seq sscape_ctl \
+- us428control usx2yloader vxloader echomixer ld10k1 qlo10k1 \
++ us428control usx2yloader vxloader echomixer \
+ hwmixvolume hdajackretask hda-verb hdajacksensetest
+
+ all:
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/gitcompile_hdajacksensetest b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/gitcompile_hdajacksensetest
new file mode 100755
index 000000000..58328bd3a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/gitcompile_hdajacksensetest
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+aclocal $ACLOCAL_FLAGS || exit 1
+automake --foreign --add-missing || exit 1
+autoconf || exit 1
+export CFLAGS='-O2 -Wall -pipe -g'
+echo "CFLAGS=$CFLAGS"
+echo "./configure $@"
+./configure $@ || exit 1
+unset CFLAGS
+if [ -z "$GITCOMPILE_NO_MAKE" ]; then
+ make || exit 1
+fi
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/makefile_no_gtk.patch b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/makefile_no_gtk.patch
new file mode 100644
index 000000000..9bd6848ed
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/makefile_no_gtk.patch
@@ -0,0 +1,29 @@
+Remove some sub-components which need gtk+.
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Rogerio Nunes <ronunes@gmail.com>
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+
+Update patch for alsa-tools 1.0.29
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+
+diff --git a/Makefile b/Makefile
+index 2457a1c..72346d9 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,9 +1,9 @@
+ VERSION = 1.1.0
+ TOP = .
+-SUBDIRS = as10k1 envy24control \
+- mixartloader pcxhrloader rmedigicontrol sb16_csp seq sscape_ctl \
+- us428control usx2yloader vxloader echomixer \
+- hwmixvolume hdajackretask hda-verb hdajacksensetest
++SUBDIRS = as10k1 \
++ mixartloader pcxhrloader sb16_csp seq sscape_ctl \
++ us428control usx2yloader vxloader \
++ hwmixvolume hda-verb hdajacksensetest
+
+ all:
+ @for i in $(SUBDIRS); do \
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
new file mode 100644
index 000000000..9e633f1f7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools_1.1.0.bb
@@ -0,0 +1,42 @@
+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"
+SECTION = "console/utils"
+LICENSE = "GPLv2 & LGPLv2+"
+DEPENDS = "alsa-lib ncurses glib-2.0"
+
+LIC_FILES_CHKSUM = "file://hdsploader/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://ld10k1/COPYING.LIB;md5=7fbc338309ac38fefcd64b04bb903e34"
+
+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)} \
+ file://gitcompile_hdajacksensetest \
+ file://0001-as10k1-Make-output_tram_line-static-inline.patch \
+ "
+
+SRC_URI[md5sum] = "b476a5afaa3ea3230855553ad59d259d"
+SRC_URI[sha256sum] = "7d34558c590a50294b36576d257316a1ac5cd951eb8cd7d330e09f8cc757ab51"
+
+inherit autotools-brokensep pkgconfig
+
+CLEANBROKEN = "1"
+
+EXTRA_OEMAKE += "GITCOMPILE_ARGS='--host=${HOST_SYS} --build=${BUILD_SYS} --target=${TARGET_SYS} --with-libtool-sysroot=${STAGING_DIR_HOST} --prefix=${prefix}'"
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gtk+', '', d)}"
+PACKAGECONFIG[gtk+] = ",,gtk+ gtk+3,"
+
+# configure.ac/.in doesn't exist so force copy
+AUTOTOOLS_COPYACLOCAL = "1"
+
+do_compile_prepend () {
+ #Automake dir is not correctly detected in cross compilation case
+ export AUTOMAKE_DIR="$(automake --print-libdir)"
+ export ACLOCAL_FLAGS="--system-acdir=${ACLOCALDIR}/"
+
+ cp ${WORKDIR}/gitcompile_hdajacksensetest ${S}/hdajacksensetest/gitcompile
+}
+
+FILES_${PN} += "${datadir}/ld10k1"
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.0.bb
new file mode 100644
index 000000000..a98f9b90b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.0.bb
@@ -0,0 +1,21 @@
+require alsa-utils_${PV}.bb
+
+SUMMARY = "Shell scripts that show help info and create ALSA configuration files"
+PROVIDES = "alsa-utils-alsaconf"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/alsa-utils:"
+
+PACKAGES = "${PN}"
+RDEPENDS_${PN} += "bash"
+
+FILES_${PN} = "${sbindir}/alsaconf \
+ ${sbindir}/alsa-info.sh \
+ "
+
+S = "${WORKDIR}/alsa-utils-${PV}"
+
+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}/
+}
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
new file mode 100644
index 000000000..b6d7d4f0d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils/0001-alsabat-rename-to-avoid-naming-conflict.patch
@@ -0,0 +1,153 @@
+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/0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch
new file mode 100644
index 000000000..e578dfe74
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch
@@ -0,0 +1,56 @@
+From 8c3e0ef9625066c2bb67ee3d2b8cd37fd44eadac Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen@dominion.thruhere.net>
+Date: Fri, 29 Aug 2014 18:58:56 +0300
+Subject: [PATCH] alsactl: don't let systemd unit restore the volume when
+ asound.state is missing
+
+This avoids an error on bootup
+
+Filed as https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5459
+
+Upstream-Status: Pending
+
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
+
+Rebased on 1.1.0.
+
+Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
+---
+ alsactl/Makefile.am | 7 ++++---
+ alsactl/alsa-restore.service.in | 1 +
+ 2 files changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/alsactl/Makefile.am b/alsactl/Makefile.am
+index cac8094..ff865dc 100644
+--- a/alsactl/Makefile.am
++++ b/alsactl/Makefile.am
+@@ -38,9 +38,10 @@ install-data-hook:
+ endif
+
+ edit = \
+- $(SED) -r -e 's,@sbindir\@,$(sbindir),g' \
+- -e 's,@mydatadir\@,$(mydatadir),g' \
+- -e 's,@daemonswitch\@,$(ALSACTL_DAEMONSWITCH),g' \
++ $(SED) -e 's,@localstatedir\@,$(localstatedir),g' \
++ -e 's,@sbindir\@,$(sbindir),g' \
++ -e 's,@mydatadir\@,$(mydatadir),g' \
++ -e 's,@daemonswitch\@,$(ALSACTL_DAEMONSWITCH),g' \
+ < $< > $@ || rm $@
+
+ alsa-state.service: alsa-state.service.in
+diff --git a/alsactl/alsa-restore.service.in b/alsactl/alsa-restore.service.in
+index 2884098..bac3ccc 100644
+--- a/alsactl/alsa-restore.service.in
++++ b/alsactl/alsa-restore.service.in
+@@ -8,6 +8,7 @@ Description=Save/Restore Sound Card State
+ ConditionPathExists=!@daemonswitch@
+ ConditionPathExistsGlob=/dev/snd/control*
+ After=alsa-state.service
++ConditionPathExists=@localstatedir@/lib/alsa/asound.state
+
+ [Service]
+ Type=oneshot
+--
+2.7.0.rc3
+
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.0.bb
new file mode 100644
index 000000000..af4048818
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils_1.1.0.bb
@@ -0,0 +1,102 @@
+SUMMARY = "ALSA sound utilities"
+HOMEPAGE = "http://www.alsa-project.org"
+BUGTRACKER = "https://bugtrack.alsa-project.org/alsa-bug/login_page.php"
+SECTION = "console/utils"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
+ file://alsactl/utils.c;beginline=1;endline=20;md5=fe9526b055e246b5558809a5ae25c0b9"
+DEPENDS = "alsa-lib ncurses libsamplerate0"
+
+PACKAGECONFIG ??= "udev"
+PACKAGECONFIG[bat] = "--enable-bat,--disable-bat,fftw"
+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"
+
+# lazy hack. needs proper fixing in gettext.m4, see
+# http://bugs.openembedded.org/show_bug.cgi?id=2348
+# please close bug and remove this comment when properly fixed
+#
+EXTRA_OECONF_append_libc-uclibc = " --disable-nls"
+
+inherit autotools gettext pkgconfig
+
+# This are all packages that we need to make. Also, the now empty alsa-utils
+# ipk depends on them.
+
+ALSA_UTILS_PKGS = "\
+ ${@bb.utils.contains('PACKAGECONFIG', 'bat', 'alsa-utils-alsabat', '', d)} \
+ alsa-utils-alsamixer \
+ alsa-utils-alsatplg \
+ alsa-utils-midi \
+ alsa-utils-aplay \
+ alsa-utils-amixer \
+ alsa-utils-aconnect \
+ alsa-utils-iecset \
+ alsa-utils-speakertest \
+ alsa-utils-aseqnet \
+ alsa-utils-aseqdump \
+ alsa-utils-alsactl \
+ alsa-utils-alsaloop \
+ alsa-utils-alsaucm \
+ "
+
+PACKAGES += "${ALSA_UTILS_PKGS}"
+RDEPENDS_${PN} += "${ALSA_UTILS_PKGS}"
+
+FILES_${PN} = ""
+FILES_alsa-utils-alsabat = "${bindir}/alsabat"
+FILES_alsa-utils-alsatplg = "${bindir}/alsatplg"
+FILES_alsa-utils-aplay = "${bindir}/aplay ${bindir}/arecord"
+FILES_alsa-utils-amixer = "${bindir}/amixer"
+FILES_alsa-utils-alsamixer = "${bindir}/alsamixer"
+FILES_alsa-utils-speakertest = "${bindir}/speaker-test ${datadir}/sounds/alsa/ ${datadir}/alsa/speaker-test/"
+FILES_alsa-utils-midi = "${bindir}/aplaymidi ${bindir}/arecordmidi ${bindir}/amidi"
+FILES_alsa-utils-aconnect = "${bindir}/aconnect"
+FILES_alsa-utils-aseqnet = "${bindir}/aseqnet"
+FILES_alsa-utils-iecset = "${bindir}/iecset"
+FILES_alsa-utils-alsactl = "${sbindir}/alsactl */udev/rules.d */*/udev/rules.d ${systemd_unitdir} ${localstatedir}/lib/alsa ${datadir}/alsa/init/"
+FILES_alsa-utils-aseqdump = "${bindir}/aseqdump"
+FILES_alsa-utils-alsaloop = "${bindir}/alsaloop"
+FILES_alsa-utils-alsaucm = "${bindir}/alsaucm"
+
+SUMMARY_alsa-utils-alsabat = "Command-line sound tester for ALSA sound card driver"
+SUMMARY_alsa-utils-alsatplg = "Converts topology text files into binary format for kernel"
+SUMMARY_alsa-utils-aplay = "Play (and record) sound files using ALSA"
+SUMMARY_alsa-utils-amixer = "Command-line control for ALSA mixer and settings"
+SUMMARY_alsa-utils-alsamixer = "ncurses-based control for ALSA mixer and settings"
+SUMMARY_alsa-utils-speakertest = "ALSA surround speaker test utility"
+SUMMARY_alsa-utils-midi = "Miscellaneous MIDI utilities for ALSA"
+SUMMARY_alsa-utils-aconnect = "ALSA sequencer connection manager"
+SUMMARY_alsa-utils-aseqnet = "Network client/server for ALSA sequencer"
+SUMMARY_alsa-utils-iecset = "ALSA utility for setting/showing IEC958 (S/PDIF) status bits"
+SUMMARY_alsa-utils-alsactl = "Saves/restores ALSA-settings in /etc/asound.state"
+SUMMARY_alsa-utils-aseqdump = "Shows the events received at an ALSA sequencer port"
+SUMMARY_alsa-utils-alsaloop = "ALSA PCM loopback utility"
+SUMMARY_alsa-utils-alsaucm = "ALSA Use Case Manager"
+
+RRECOMMENDS_alsa-utils-alsactl = "alsa-states"
+
+ALLOW_EMPTY_alsa-utils = "1"
+
+do_install() {
+ autotools_do_install
+
+ # We don't ship this here because it requires a dependency on bash.
+ # See alsa-utils-scripts_${PV}.bb
+ rm ${D}${sbindir}/alsaconf
+ rm ${D}${sbindir}/alsa-info.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
+ 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.0.bb
new file mode 100644
index 000000000..1dfbb9b04
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg_3.0.bb
@@ -0,0 +1,139 @@
+SUMMARY = "A complete, cross-platform solution to record, convert and stream audio and video."
+DESCRIPTION = "FFmpeg is the leading multimedia framework, able to decode, encode, transcode, \
+ mux, demux, stream, filter and play pretty much anything that humans and machines \
+ have created. It supports the most obscure ancient formats up to the cutting edge."
+HOMEPAGE = "https://www.ffmpeg.org/"
+SECTION = "libs"
+
+LICENSE = "GPLv2+"
+LICENSE_FLAGS = "commercial"
+
+LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
+ 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"
+
+# Build fails when thumb is enabled: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717
+ARM_INSTRUCTION_SET = "arm"
+
+# Should be API compatible with libav (which was a fork of ffmpeg)
+# libpostproc was previously packaged from a separate recipe
+PROVIDES = "libav libpostproc"
+
+DEPENDS = "alsa-lib zlib libogg yasm-native"
+
+inherit autotools pkgconfig
+
+PACKAGECONFIG ??= "avdevice avfilter avcodec avformat swresample swscale postproc \
+ bzlib gpl lzma theora x264 \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xv', '', d)}"
+
+# libraries to build in addition to avutil
+PACKAGECONFIG[avdevice] = "--enable-avdevice,--disable-avdevice"
+PACKAGECONFIG[avfilter] = "--enable-avfilter,--disable-avfilter"
+PACKAGECONFIG[avcodec] = "--enable-avcodec,--disable-avcodec"
+PACKAGECONFIG[avformat] = "--enable-avformat,--disable-avformat"
+PACKAGECONFIG[swresample] = "--enable-swresample,--disable-swresample"
+PACKAGECONFIG[swscale] = "--enable-swscale,--disable-swscale"
+PACKAGECONFIG[postproc] = "--enable-postproc,--disable-postproc"
+PACKAGECONFIG[avresample] = "--enable-avresample,--disable-avresample"
+
+# features to support
+PACKAGECONFIG[bzlib] = "--enable-bzlib,--disable-bzlib,bzip2"
+PACKAGECONFIG[faac] = "--enable-libfaac,--disable-libfaac,faac"
+PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl"
+PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm"
+PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack"
+PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis"
+PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz"
+PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame"
+PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
+PACKAGECONFIG[schroedinger] = "--enable-libschroedinger,--disable-libschroedinger,schroedinger"
+PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex"
+PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora"
+PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva"
+PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx"
+PACKAGECONFIG[x11] = "--enable-x11grab,--disable-x11grab,virtual/libx11 libxfixes libxext xproto virtual/libsdl"
+PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264"
+PACKAGECONFIG[xv] = "--enable-outdev=xv,--disable-outdev=xv,libxv"
+
+# Check codecs that require --enable-nonfree
+USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'faac', 'openssl' ], 'yes', '', d)}"
+
+EXTRA_OECONF = " \
+ --disable-stripping \
+ --enable-pic \
+ --enable-shared \
+ --enable-pthreads \
+ ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \
+ \
+ --cross-prefix=${TARGET_PREFIX} \
+ \
+ --ld="${CCLD}" \
+ --arch=${TARGET_ARCH} \
+ --target-os="linux" \
+ --enable-cross-compile \
+ --extra-cflags="${TARGET_CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \
+ --extra-ldflags="${TARGET_LDFLAGS}" \
+ --sysroot="${STAGING_DIR_TARGET}" \
+ --enable-hardcoded-tables \
+ ${EXTRA_FFCONF} \
+ --libdir=${libdir} \
+ --shlibdir=${libdir} \
+ --datadir=${datadir}/ffmpeg \
+"
+
+do_configure() {
+ ${S}/configure ${EXTRA_OECONF}
+}
+
+PACKAGES_DYNAMIC += "^lib(av(codec|device|filter|format|util|resample)|swscale|swresample|postproc).*"
+
+# ffmpeg disables PIC on some platforms (e.g. x86-32)
+INSANE_SKIP_${MLPREFIX}libavcodec = "textrel"
+INSANE_SKIP_${MLPREFIX}libavdevice = "textrel"
+INSANE_SKIP_${MLPREFIX}libavfilter = "textrel"
+INSANE_SKIP_${MLPREFIX}libavformat = "textrel"
+INSANE_SKIP_${MLPREFIX}libavutil = "textrel"
+INSANE_SKIP_${MLPREFIX}libavresample = "textrel"
+INSANE_SKIP_${MLPREFIX}libswscale = "textrel"
+INSANE_SKIP_${MLPREFIX}libswresample = "textrel"
+INSANE_SKIP_${MLPREFIX}libpostproc = "textrel"
+
+python populate_packages_prepend() {
+ av_libdir = d.expand('${libdir}')
+ av_pkgconfig = d.expand('${libdir}/pkgconfig')
+
+ # Runtime package
+ do_split_packages(d, av_libdir, '^lib(.*)\.so\..*',
+ output_pattern='lib%s',
+ description='libav %s library',
+ extra_depends='',
+ prepend=True,
+ allow_links=True)
+
+ # Development packages (-dev, -staticdev)
+ do_split_packages(d, av_libdir, '^lib(.*)\.so$',
+ output_pattern='lib%s-dev',
+ description='libav %s development package',
+ extra_depends='${PN}-dev',
+ prepend=True,
+ allow_links=True)
+ do_split_packages(d, av_pkgconfig, '^lib(.*)\.pc$',
+ output_pattern='lib%s-dev',
+ description='libav %s development package',
+ extra_depends='${PN}-dev',
+ prepend=True)
+ do_split_packages(d, av_libdir, '^lib(.*)\.a$',
+ output_pattern='lib%s-staticdev',
+ description='libav %s development package - static library',
+ extra_depends='${PN}-dev',
+ prepend=True,
+ allow_links=True)
+
+}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/flac/flac_1.3.1.bb b/import-layers/yocto-poky/meta/recipes-multimedia/flac/flac_1.3.1.bb
new file mode 100644
index 000000000..f25271f87
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/flac/flac_1.3.1.bb
@@ -0,0 +1,42 @@
+SUMMARY = "Free Lossless Audio Codec"
+DESCRIPTION = "FLAC stands for Free Lossless Audio Codec, a lossless audio compression format."
+HOMEPAGE = "https://xiph.org/flac/"
+BUGTRACKER = "http://sourceforge.net/p/flac/bugs/"
+SECTION = "libs"
+LICENSE = "GFDL-1.2 & GPLv2+ & LGPLv2.1+ & BSD"
+LIC_FILES_CHKSUM = "file://COPYING.FDL;md5=ad1419ecc56e060eccf8184a87c4285f \
+ file://src/Makefile.am;beginline=1;endline=17;md5=0a853b81d9d43d8aad3b53b05cfcc37e \
+ file://COPYING.GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://src/flac/main.c;beginline=1;endline=18;md5=d03a766558d233f9cc3ac5dfafd49deb \
+ file://COPYING.LGPL;md5=fbc093901857fcd118f065f900982c24 \
+ file://src/plugin_common/all.h;beginline=1;endline=18;md5=7c8a3b9e1e66ed0aba765bc6f35da85d \
+ file://COPYING.Xiph;md5=a2c4b71c0198682376d483eb5bcc9197 \
+ file://include/FLAC/all.h;beginline=65;endline=70;md5=64474f2b22e9e77b28d8b8b25c983a48"
+DEPENDS = "libogg"
+
+SRC_URI = "http://downloads.xiph.org/releases/flac/${BP}.tar.xz"
+
+SRC_URI[md5sum] = "b9922c9a0378c88d3e901b234f852698"
+SRC_URI[sha256sum] = "4773c0099dba767d963fd92143263be338c48702172e8754b9bc5103efe1c56c"
+
+inherit autotools gettext
+
+EXTRA_OECONF = "--disable-oggtest \
+ --with-ogg-libraries=${STAGING_LIBDIR} \
+ --with-ogg-includes=${STAGING_INCDIR} \
+ --disable-xmms-plugin \
+ --without-libiconv-prefix \
+ ac_cv_prog_NASM="" \
+ "
+
+EXTRA_OECONF += "${@bb.utils.contains("TUNE_FEATURES", "altivec", " --enable-altivec", " --disable-altivec", d)}"
+EXTRA_OECONF += "${@bb.utils.contains("TUNE_FEATURES", "core2", " --enable-sse", "", d)}"
+EXTRA_OECONF += "${@bb.utils.contains("TUNE_FEATURES", "corei7", " --enable-sse", "", d)}"
+
+PACKAGES += "libflac libflac++ liboggflac liboggflac++"
+FILES_${PN} = "${bindir}/*"
+FILES_libflac = "${libdir}/libFLAC.so.*"
+FILES_libflac++ = "${libdir}/libFLAC++.so.*"
+FILES_liboggflac = "${libdir}/libOggFLAC.so.*"
+FILES_liboggflac++ = "${libdir}/libOggFLAC++.so.*"
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/files/0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/files/0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch
new file mode 100644
index 000000000..2cab87f9e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/files/0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch
@@ -0,0 +1,42 @@
+From 90916f96262fa7b27a0a99788c69f9fd6df11000 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 24 Nov 2015 16:46:27 +0200
+Subject: [PATCH] introspection.m4: prefix pkgconfig paths with
+ PKG_CONFIG_SYSROOT_DIR
+
+We can't use our tweaked introspection.m4 from gobject-introspection tarball
+because gstreamer also defines INTROSPECTION_INIT in its introspection.m4, which
+is later supplied to g-ir-scanner.
+
+Upstream-Status: Pending [review on oe-core list]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ common/m4/introspection.m4 | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/common/m4/introspection.m4 b/common/m4/introspection.m4
+index 162be57..217a6ae 100644
+--- a/common/m4/introspection.m4
++++ b/common/m4/introspection.m4
+@@ -54,14 +54,14 @@ m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
+ INTROSPECTION_GIRDIR=
+ INTROSPECTION_TYPELIBDIR=
+ if test "x$found_introspection" = "xyes"; then
+- INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
+- INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
+- INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
++ INTROSPECTION_SCANNER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
++ INTROSPECTION_COMPILER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
++ INTROSPECTION_GENERATE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
+ INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
+ INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
+ INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
+ INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
+- INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
++ INTROSPECTION_MAKEFILE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
+ INTROSPECTION_INIT="extern void gst_init(gint*,gchar**); gst_init(NULL,NULL);"
+ fi
+ AC_SUBST(INTROSPECTION_SCANNER)
+--
+2.6.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/Add-error-signal-emission-for-missing-plugins.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/Add-error-signal-emission-for-missing-plugins.patch
new file mode 100644
index 000000000..712d46daa
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/Add-error-signal-emission-for-missing-plugins.patch
@@ -0,0 +1,252 @@
+From d64c7edb66f4a64ff49c4306cf77fd269b7079ab Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Mon, 16 Mar 2015 13:45:30 +0200
+Subject: [PATCH] Add error signal emission for missing plugins
+
+Add a missing plugins error signal to gst-player. Note that this error
+does not necessarily mean the playback has completely failed, but in
+practice the user experience will be bad (think, e.g. of a mp4 file
+where H.264 codec is missing: AAC playback still works...).
+
+Use the signal in gtk-play to show a infobar if plugins are missing.
+
+Submitted upstream at https://github.com/sdroege/gst-player/pull/11
+
+Upstream-Status: Submitted
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ configure.ac | 2 +-
+ gtk/gtk-play.c | 54 +++++++++++++++++++++++++++++++++++++++++++++-
+ lib/gst/player/gstplayer.c | 22 +++++++++++++++++++
+ lib/gst/player/gstplayer.h | 3 ++-
+ 4 files changed, 78 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 90ab74c..6cdb4eb 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -53,7 +53,7 @@ AC_SUBST(LT_AGE)
+ PKG_PROG_PKG_CONFIG
+
+ PKG_CHECK_MODULES(GLIB, [glib-2.0 gobject-2.0])
+-PKG_CHECK_MODULES(GSTREAMER, [gstreamer-1.0 >= 1.4 gstreamer-video-1.0 >= 1.4])
++PKG_CHECK_MODULES(GSTREAMER, [gstreamer-1.0 >= 1.4 gstreamer-video-1.0 >= 1.4 gstreamer-pbutils-1.0])
+
+ GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
+ AC_SUBST(GLIB_PREFIX)
+diff --git a/gtk/gtk-play.c b/gtk/gtk-play.c
+index b92773b..e2b605a 100644
+--- a/gtk/gtk-play.c
++++ b/gtk/gtk-play.c
+@@ -30,6 +30,8 @@ typedef struct
+ GtkWidget *prev_button, *next_button;
+ GtkWidget *seekbar;
+ GtkWidget *video_area;
++ GtkWidget *info_label;
++ GtkWidget *info_bar;
+ GtkWidget *volume_button;
+ gulong seekbar_value_changed_signal_id;
+ gboolean playing;
+@@ -141,6 +143,13 @@ play_pause_clicked_cb (GtkButton * button, GtkPlay * play)
+ }
+
+ static void
++clear_missing_plugins (GtkPlay * play)
++{
++ gtk_label_set_text (GTK_LABEL (play->info_label), "");
++ gtk_widget_hide (play->info_bar);
++}
++
++static void
+ skip_prev_clicked_cb (GtkButton * button, GtkPlay * play)
+ {
+ GList *prev;
+@@ -155,6 +164,7 @@ skip_prev_clicked_cb (GtkButton * button, GtkPlay * play)
+
+ gtk_widget_set_sensitive (play->next_button, TRUE);
+ gst_player_set_uri (play->player, prev->data);
++ clear_missing_plugins (play);
+ gst_player_play (play->player);
+ set_title (play, prev->data);
+ gtk_widget_set_sensitive (play->prev_button, g_list_previous (prev) != NULL);
+@@ -175,6 +185,7 @@ skip_next_clicked_cb (GtkButton * button, GtkPlay * play)
+
+ gtk_widget_set_sensitive (play->prev_button, TRUE);
+ gst_player_set_uri (play->player, next->data);
++ clear_missing_plugins (play);
+ gst_player_play (play->player);
+ set_title (play, next->data);
+ gtk_widget_set_sensitive (play->next_button, g_list_next (next) != NULL);
+@@ -193,10 +204,16 @@ volume_changed_cb (GtkScaleButton * button, gdouble value, GtkPlay * play)
+ gst_player_set_volume (play->player, value);
+ }
+
++void
++info_bar_response_cb (GtkInfoBar * bar, gint response, GtkPlay * play)
++{
++ gtk_widget_hide (GTK_WIDGET (bar));
++}
++
+ static void
+ create_ui (GtkPlay * play)
+ {
+- GtkWidget *controls, *main_hbox, *main_vbox;
++ GtkWidget *controls, *main_hbox, *main_vbox, *info_bar, *content_area;
+
+ play->window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ g_signal_connect (G_OBJECT (play->window), "delete-event",
+@@ -208,6 +225,20 @@ create_ui (GtkPlay * play)
+ g_signal_connect (play->video_area, "realize",
+ G_CALLBACK (video_area_realize_cb), play);
+
++ play->info_bar = gtk_info_bar_new ();
++ gtk_info_bar_set_message_type (GTK_INFO_BAR (play->info_bar),
++ GTK_MESSAGE_WARNING);
++ //gtk_info_bar_set_show_close_button (GTK_INFO_BAR (play->info_bar),
++ // TRUE);
++ gtk_widget_set_no_show_all (play->info_bar, TRUE);
++ g_signal_connect (play->info_bar, "response",
++ G_CALLBACK (info_bar_response_cb), play);
++
++ content_area = gtk_info_bar_get_content_area (GTK_INFO_BAR (play->info_bar));
++ play->info_label = gtk_label_new ("");
++ gtk_container_add (GTK_CONTAINER (content_area), play->info_label);
++ gtk_widget_show (play->info_label);
++
+ /* Unified play/pause button */
+ play->play_pause_button =
+ gtk_button_new_from_icon_name ("media-playback-pause",
+@@ -258,6 +289,7 @@ create_ui (GtkPlay * play)
+
+ main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+ gtk_box_pack_start (GTK_BOX (main_vbox), main_hbox, TRUE, TRUE, 0);
++ gtk_box_pack_start (GTK_BOX (main_vbox), play->info_bar, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (main_vbox), controls, FALSE, FALSE, 0);
+ gtk_container_add (GTK_CONTAINER (play->window), main_vbox);
+
+@@ -322,6 +354,7 @@ eos_cb (GstPlayer * unused, GtkPlay * play)
+ gtk_widget_set_sensitive (play->next_button, g_list_next (next) != NULL);
+
+ gst_player_set_uri (play->player, next->data);
++ clear_missing_plugins (play);
+ gst_player_play (play->player);
+ set_title (play, next->data);
+ } else {
+@@ -330,6 +363,24 @@ eos_cb (GstPlayer * unused, GtkPlay * play)
+ }
+ }
+
++static void
++error_cb (GstPlayer * player, GError * err, GtkPlay * play)
++{
++ char *message;
++
++ if (g_error_matches (err, gst_player_error_quark (),
++ GST_PLAYER_ERROR_MISSING_PLUGIN)) {
++ // add message to end of any existing message: there may be
++ // multiple missing plugins.
++ message = g_strdup_printf ("%s%s. ",
++ gtk_label_get_text (GTK_LABEL (play->info_label)), err->message);
++ gtk_label_set_text (GTK_LABEL (play->info_label), message);
++ g_free (message);
++
++ gtk_widget_show (play->info_bar);
++ }
++}
++
+ int
+ main (gint argc, gchar ** argv)
+ {
+@@ -422,6 +473,7 @@ main (gint argc, gchar ** argv)
+ g_signal_connect (play.player, "video-dimensions-changed",
+ G_CALLBACK (video_dimensions_changed_cb), &play);
+ g_signal_connect (play.player, "end-of-stream", G_CALLBACK (eos_cb), &play);
++ g_signal_connect (play.player, "error", G_CALLBACK (error_cb), &play);
+
+ /* We have file(s) that need playing. */
+ set_title (&play, g_list_first (play.uris)->data);
+diff --git a/lib/gst/player/gstplayer.c b/lib/gst/player/gstplayer.c
+index bd682d9..78e7ba1 100644
+--- a/lib/gst/player/gstplayer.c
++++ b/lib/gst/player/gstplayer.c
+@@ -47,6 +47,7 @@
+
+ #include <gst/gst.h>
+ #include <gst/video/video.h>
++#include <gst/pbutils/missing-plugins.h>
+
+ GST_DEBUG_CATEGORY_STATIC (gst_player_debug);
+ #define GST_CAT_DEFAULT gst_player_debug
+@@ -238,6 +239,7 @@ gst_player_class_init (GstPlayerClass * klass)
+ g_signal_new ("video-dimensions-changed", G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST | G_SIGNAL_NO_RECURSE | G_SIGNAL_NO_HOOKS, 0, NULL,
+ NULL, NULL, G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT);
++
+ }
+
+ static void
+@@ -619,6 +621,21 @@ error_cb (GstBus * bus, GstMessage * msg, gpointer user_data)
+ g_mutex_unlock (&self->priv->lock);
+ }
+
++static void
++element_cb (GstBus * bus, GstMessage * msg, gpointer user_data)
++{
++ GstPlayer *self = GST_PLAYER (user_data);
++
++ if (gst_is_missing_plugin_message (msg)) {
++ gchar *desc;
++
++ desc = gst_missing_plugin_message_get_description (msg);
++ emit_error (self, g_error_new (GST_PLAYER_ERROR,
++ GST_PLAYER_ERROR_MISSING_PLUGIN, "Missing plugin '%s'", desc));
++ g_free (desc);
++ }
++}
++
+ static gboolean
+ eos_dispatch (gpointer user_data)
+ {
+@@ -1059,6 +1076,8 @@ gst_player_main (gpointer data)
+ NULL, NULL);
+ g_source_attach (bus_source, self->priv->context);
+
++ g_signal_connect (G_OBJECT (bus), "message::element",
++ G_CALLBACK (element_cb), self);
+ g_signal_connect (G_OBJECT (bus), "message::error", G_CALLBACK (error_cb),
+ self);
+ g_signal_connect (G_OBJECT (bus), "message::eos", G_CALLBACK (eos_cb), self);
+@@ -1560,6 +1579,7 @@ gst_player_error_get_type (void)
+ static gsize id = 0;
+ static const GEnumValue values[] = {
+ {C_ENUM (GST_PLAYER_ERROR_FAILED), "GST_PLAYER_ERROR_FAILED", "failed"},
++ {C_ENUM (GST_PLAYER_ERROR_MISSING_PLUGIN), "GST_PLAYER_ERROR_MISSING_PLUGIN", "missing-plugin"},
+ {0, NULL, NULL}
+ };
+
+@@ -1577,6 +1597,8 @@ gst_player_error_get_name (GstPlayerError error)
+ switch (error) {
+ case GST_PLAYER_ERROR_FAILED:
+ return "failed";
++ case GST_PLAYER_ERROR_MISSING_PLUGIN:
++ return "missing-plugin";
+ }
+
+ g_assert_not_reached ();
+diff --git a/lib/gst/player/gstplayer.h b/lib/gst/player/gstplayer.h
+index c438513..35fb5bb 100644
+--- a/lib/gst/player/gstplayer.h
++++ b/lib/gst/player/gstplayer.h
+@@ -44,7 +44,8 @@ GType gst_player_error_get_type (void);
+ #define GST_TYPE_PLAYER_ERROR (gst_player_error_get_type ())
+
+ typedef enum {
+- GST_PLAYER_ERROR_FAILED = 0
++ GST_PLAYER_ERROR_FAILED = 0,
++ GST_PLAYER_ERROR_MISSING_PLUGIN
+ } GstPlayerError;
+
+ const gchar *gst_player_error_get_name (GstPlayerError error);
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/Fix-pause-play.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/Fix-pause-play.patch
new file mode 100644
index 000000000..783c42ad7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/Fix-pause-play.patch
@@ -0,0 +1,107 @@
+Fix pause/play
+
+The current player state is now notified via the state-changed signal,
+and in the GTK UI it was only used to keep track of the desired state.
+
+This is a backport of upstream commit 738479c7a0.
+
+Upstream-Status: Backport
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+
+---
+ gtk/gtk-play.c | 8 ++++++--
+ lib/gst/player/gstplayer.c | 12 ------------
+ lib/gst/player/gstplayer.h | 2 --
+ 3 files changed, 6 insertions(+), 16 deletions(-)
+
+diff --git a/gtk/gtk-play.c b/gtk/gtk-play.c
+index 6e7a098..e2b605a 100644
+--- a/gtk/gtk-play.c
++++ b/gtk/gtk-play.c
+@@ -34,6 +34,7 @@ typedef struct
+ GtkWidget *info_bar;
+ GtkWidget *volume_button;
+ gulong seekbar_value_changed_signal_id;
++ gboolean playing;
+ } GtkPlay;
+
+ /* Compat stubs */
+@@ -118,12 +119,13 @@ play_pause_clicked_cb (GtkButton * button, GtkPlay * play)
+ {
+ GtkWidget *image;
+
+- if (gst_player_is_playing (play->player)) {
++ if (play->playing) {
+ gst_player_pause (play->player);
+ image =
+ gtk_image_new_from_icon_name ("media-playback-start",
+ GTK_ICON_SIZE_BUTTON);
+ gtk_button_set_image (GTK_BUTTON (play->play_pause_button), image);
++ play->playing = FALSE;
+ } else {
+ gchar *title;
+
+@@ -136,6 +138,7 @@ play_pause_clicked_cb (GtkButton * button, GtkPlay * play)
+ title = gst_player_get_uri (play->player);
+ set_title (play, title);
+ g_free (title);
++ play->playing = TRUE;
+ }
+ }
+
+@@ -335,7 +338,7 @@ video_dimensions_changed_cb (GstPlayer * unused, gint width, gint height,
+ static void
+ eos_cb (GstPlayer * unused, GtkPlay * play)
+ {
+- if (gst_player_is_playing (play->player)) {
++ if (play->playing) {
+ GList *next = NULL;
+ gchar *uri;
+
+@@ -452,6 +455,7 @@ main (gint argc, gchar ** argv)
+ }
+
+ play.player = gst_player_new ();
++ play.playing = TRUE;
+
+ g_object_set (play.player, "dispatch-to-main-context", TRUE, NULL);
+
+diff --git a/lib/gst/player/gstplayer.c b/lib/gst/player/gstplayer.c
+index 069b284..78e7ba1 100644
+--- a/lib/gst/player/gstplayer.c
++++ b/lib/gst/player/gstplayer.c
+@@ -1422,18 +1422,6 @@ gst_player_set_uri (GstPlayer * self, const gchar * val)
+ g_object_set (self, "uri", val, NULL);
+ }
+
+-gboolean
+-gst_player_is_playing (GstPlayer * self)
+-{
+- gboolean val;
+-
+- g_return_val_if_fail (GST_IS_PLAYER (self), FALSE);
+-
+- g_object_get (self, "is-playing", &val, NULL);
+-
+- return val;
+-}
+-
+ GstClockTime
+ gst_player_get_position (GstPlayer * self)
+ {
+diff --git a/lib/gst/player/gstplayer.h b/lib/gst/player/gstplayer.h
+index 6933dd7..35fb5bb 100644
+--- a/lib/gst/player/gstplayer.h
++++ b/lib/gst/player/gstplayer.h
+@@ -93,8 +93,6 @@ gchar * gst_player_get_uri (GstPlayer * player);
+ void gst_player_set_uri (GstPlayer * player,
+ const gchar * uri);
+
+-gboolean gst_player_is_playing (GstPlayer * player);
+-
+ GstClockTime gst_player_get_position (GstPlayer * player);
+ GstClockTime gst_player_get_duration (GstPlayer * player);
+
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/filechooser.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/filechooser.patch
new file mode 100644
index 000000000..7bf1b034b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/filechooser.patch
@@ -0,0 +1,54 @@
+Upstream-Status: Submitted
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From 43d4b19ab611d844156e26c4840cc54ddb73ae03 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Thu, 26 Feb 2015 17:17:05 +0000
+Subject: [PATCH] gtk-play: show a file chooser if no URIs were passed
+
+---
+ gtk/gtk-play.c | 28 ++++++++++++++++++++++++++--
+ 1 file changed, 26 insertions(+), 2 deletions(-)
+
+diff --git a/gtk/gtk-play.c b/gtk/gtk-play.c
+index f015077..9766a72 100644
+--- a/gtk/gtk-play.c
++++ b/gtk/gtk-play.c
+@@ -319,8 +319,32 @@ main (gint argc, gchar ** argv)
+ // FIXME: Add support for playlists and stuff
+ /* Parse the list of the file names we have to play. */
+ if (!file_names) {
+- g_print ("Usage: %s FILE(s)|URI(s)\n", APP_NAME);
+- return 1;
++ GtkWidget *chooser;
++ int res;
++
++ chooser = gtk_file_chooser_dialog_new ("Select files to play", NULL,
++ GTK_FILE_CHOOSER_ACTION_OPEN,
++ "_Cancel", GTK_RESPONSE_CANCEL,
++ "_Open", GTK_RESPONSE_ACCEPT,
++ NULL);
++ g_object_set (chooser,
++ "local-only", FALSE,
++ "select-multiple", TRUE,
++ NULL);
++
++ res = gtk_dialog_run (GTK_DIALOG (chooser));
++ if (res == GTK_RESPONSE_ACCEPT) {
++ GSList *l;
++
++ l = gtk_file_chooser_get_uris (GTK_FILE_CHOOSER (chooser));
++ while (l) {
++ play.uris = g_list_append (play.uris, l->data);
++ l = g_slist_delete_link (l, l);
++ }
++ } else {
++ return 0;
++ }
++ gtk_widget_destroy (chooser);
+ } else {
+ guint i;
+
+--
+1.7.10.4
+
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
new file mode 100644
index 000000000..9fd207b38
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/gst-player.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=Media Player
+Comment=Basic media player
+Icon=audio-player
+TryExec=gtk-play
+Exec=gtk-play
+StartupNotify=true
+Terminal=false
+Type=Application
+Categories=GTK;AudioVideo;
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
new file mode 100644
index 000000000..2cd18bbc9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/gtk2.patch
@@ -0,0 +1,71 @@
+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
new file mode 100644
index 000000000..8129169c5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player_git.bb
@@ -0,0 +1,39 @@
+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"
+
+DEPENDS = "glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base gtk+"
+
+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://gst-player.desktop"
+
+SRCREV = "5386c5b984d40ef5434673ed62204e69aaf52645"
+
+S = "${WORKDIR}/git"
+
+inherit autotools gtk-doc lib_package pkgconfig distro_features_check gobject-introspection
+
+ANY_OF_DISTRO_FEATURES = "${GTK2DISTROFEATURES}"
+
+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)}"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc
new file mode 100644
index 000000000..c24493e1e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc
@@ -0,0 +1,56 @@
+PACKAGESPLITFUNCS_prepend = " split_gstreamer10_packages "
+PACKAGESPLITFUNCS_append = " set_metapkg_rdepends "
+
+python split_gstreamer10_packages () {
+ gst_libdir = d.expand('${libdir}/gstreamer-${LIBV}')
+ postinst = d.getVar('plugin_postinst', True)
+ glibdir = d.getVar('libdir', True)
+
+ do_split_packages(d, glibdir, '^lib(.*)\.so\.*', 'lib%s', 'gstreamer %s library', extra_depends='', allow_links=True)
+ do_split_packages(d, gst_libdir, 'libgst(.*)\.so$', d.expand('${PN}-%s'), 'GStreamer plugin for %s', postinst=postinst, extra_depends='')
+ do_split_packages(d, glibdir+'/girepository-1.0', 'Gst(.*)-1.0\.typelib$', d.expand('${PN}-%s-typelib'), 'GStreamer typelib file for %s', postinst=postinst, extra_depends='')
+ do_split_packages(d, gst_libdir, 'libgst(.*)\.la$', d.expand('${PN}-%s-dev'), 'GStreamer plugin for %s (development files)', extra_depends='${PN}-dev')
+ do_split_packages(d, gst_libdir, 'libgst(.*)\.a$', d.expand('${PN}-%s-staticdev'), 'GStreamer plugin for %s (static development files)', extra_depends='${PN}-staticdev')
+}
+
+python set_metapkg_rdepends () {
+ import os
+
+ pn = d.getVar('PN', True)
+ metapkg = pn + '-meta'
+ d.setVar('ALLOW_EMPTY_' + metapkg, "1")
+ d.setVar('FILES_' + metapkg, "")
+ blacklist = [ pn, pn + '-locale', pn + '-dev', pn + '-dbg', pn + '-doc', pn + '-meta' ]
+ metapkg_rdepends = []
+ packages = d.getVar('PACKAGES', True).split()
+ pkgdest = d.getVar('PKGDEST', True)
+ for pkg in packages[1:]:
+ if not pkg in blacklist and not pkg in metapkg_rdepends and not pkg.endswith('-dev') and not pkg.endswith('-dbg') and not pkg.count('locale') and not pkg.count('-staticdev'):
+ # See if the package is empty by looking at the contents of its PKGDEST subdirectory.
+ # If this subdirectory is empty, then the package is.
+ # Empty packages do not get added to the meta package's RDEPENDS
+ pkgdir = os.path.join(pkgdest, pkg)
+ if os.path.exists(pkgdir):
+ dir_contents = os.listdir(pkgdir) or []
+ else:
+ dir_contents = []
+ is_empty = len(dir_contents) == 0
+ if not is_empty:
+ metapkg_rdepends.append(pkg)
+ d.setVar('RDEPENDS_' + metapkg, ' '.join(metapkg_rdepends))
+ d.setVar('DESCRIPTION_' + metapkg, pn + ' meta package')
+}
+
+# each plugin-dev depends on PN-dev, plugin-staticdev on PN-staticdev
+# so we need them even when empty (like in gst-plugins-good case)
+ALLOW_EMPTY_${PN} = "1"
+ALLOW_EMPTY_${PN}-dev = "1"
+ALLOW_EMPTY_${PN}-staticdev = "1"
+
+PACKAGES += "${PN}-apps ${PN}-meta ${PN}-glib"
+
+FILES_${PN} = ""
+FILES_${PN}-apps = "${bindir}"
+FILES_${PN}-glib = "${datadir}/glib-2.0"
+
+RRECOMMENDS_${PN} += "${PN}-meta"
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
new file mode 100644
index 000000000..363101e1a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav.inc
@@ -0,0 +1,46 @@
+SUMMARY = "Libav-based GStreamer 1.x plugin"
+HOMEPAGE = "http://gstreamer.freedesktop.org/"
+SECTION = "multimedia"
+
+LICENSE = "GPLv2+ & LGPLv2+ & ( (GPLv2+ & LGPLv2.1+) | (GPLv3+ & LGPLv3+) )"
+LICENSE_FLAGS = "commercial"
+
+DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base zlib bzip2 xz"
+
+inherit autotools pkgconfig upstream-version-is-even
+
+# 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
+# libav copy included in the gst-libav package.
+PACKAGECONFIG ??= "orc yasm"
+
+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"
+
+GSTREAMER_1_0_DEBUG ?= "--disable-debug"
+
+LIBAV_EXTRA_CONFIGURE = "--with-libav-extra-configure"
+
+LIBAV_EXTRA_CONFIGURE_COMMON_ARG = "--target-os=linux \
+ --cc='${CC}' --as='${CC}' --ld='${CC}' --nm='${NM}' --ar='${AR}' \
+ --ranlib='${RANLIB}' \
+ ${GSTREAMER_1_0_DEBUG} \
+ --cross-prefix='${HOST_PREFIX}'"
+
+LIBAV_EXTRA_CONFIGURE_COMMON = \
+'${LIBAV_EXTRA_CONFIGURE}="${LIBAV_EXTRA_CONFIGURE_COMMON_ARG}"'
+
+EXTRA_OECONF = "${LIBAV_EXTRA_CONFIGURE_COMMON}"
+
+FILES_${PN} += "${libdir}/gstreamer-1.0/*.so"
+FILES_${PN}-dev += "${libdir}/gstreamer-1.0/*.la"
+FILES_${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a"
+
+# http://errors.yoctoproject.org/Errors/Details/20493/
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
+
+# ffmpeg/libav disables PIC on some platforms (e.g. x86-32)
+INSANE_SKIP_${PN} = "textrel"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-Disable-yasm-for-libav-when-disable-yasm.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-Disable-yasm-for-libav-when-disable-yasm.patch
new file mode 100644
index 000000000..1d99ad125
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-Disable-yasm-for-libav-when-disable-yasm.patch
@@ -0,0 +1,33 @@
+From 54bba228ea52d01fd84941d97be23c03f9862b64 Mon Sep 17 00:00:00 2001
+From: Carlos Rafael Giani <dv@pseudoterminal.org>
+Date: Sat, 6 Apr 2013 01:22:22 +0200
+Subject: [PATCH] Disable yasm for libav when --disable-yasm
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Shane Wang <shane.wang@intel.com>
+Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
+---
+ configure.ac | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 22ede88..ef3c050 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -305,6 +305,12 @@ else
+ emblibav_configure_args="$emblibav_configure_args --enable-gpl"
+ fi
+
++ AC_ARG_ENABLE(yasm,
++ [AC_HELP_STRING([--disable-yasm], [disable use of yasm assembler])])
++ if test "x$enable_yasm" = "xno"; then
++ emblibav_configure_args="$emblibav_configure_args --disable-yasm"
++ fi
++
+ # if we are cross-compiling, tell libav so
+ case $host in
+ *android*)
+--
+1.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/workaround-to-build-gst-libav-for-i586-with-gcc.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/workaround-to-build-gst-libav-for-i586-with-gcc.patch
new file mode 100644
index 000000000..36abf8607
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/workaround-to-build-gst-libav-for-i586-with-gcc.patch
@@ -0,0 +1,26 @@
+Description: Workaround to build libav for i586 with gcc 4.9.2 by avoiding memset
+Author: Bernhard Übelacker <bernhardu@vr-web.de>
+
+---
+Bug-Debian: https://bugs.debian.org/783082
+Last-Update: 2015-04-28
+
+Upstream-Status: Backport [debian]
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+
+--- gst-libav-1.4.5.orig/gst-libs/ext/libav/libavcodec/h264_cabac.c
++++ gst-libav-1.4.5/gst-libs/ext/libav/libavcodec/h264_cabac.c
+@@ -2020,7 +2020,11 @@ decode_intra_mb:
+ // In deblocking, the quantizer is 0
+ h->cur_pic.qscale_table[mb_xy] = 0;
+ // All coeffs are present
+- memset(h->non_zero_count[mb_xy], 16, 48);
++ /*memset(h->non_zero_count[mb_xy], 16, 48);*/
++ /* avoiding this memset because it leads at least with gcc4.9.2 to error: 'asm' operand has impossible constraints */
++ for (size_t i = 0; i < 48; i++) {
++ ( (unsigned char*)(h->non_zero_count[mb_xy]) ) [i] = 16;
++ }
+ h->cur_pic.mb_type[mb_xy] = mb_type;
+ sl->last_qscale_diff = 0;
+ return 0;
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.6.3.bb
new file mode 100644
index 000000000..687230a8f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.6.3.bb
@@ -0,0 +1,20 @@
+include gstreamer1.0-libav.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \
+ file://ext/libav/gstav.h;beginline=1;endline=18;md5=a752c35267d8276fd9ca3db6994fca9c \
+ file://gst-libs/ext/libav/COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://gst-libs/ext/libav/COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
+ file://gst-libs/ext/libav/COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \
+ file://gst-libs/ext/libav/COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
+
+SRC_URI = " \
+ http://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${PV}.tar.xz \
+ file://0001-Disable-yasm-for-libav-when-disable-yasm.patch \
+ file://workaround-to-build-gst-libav-for-i586-with-gcc.patch \
+"
+
+SRC_URI[md5sum] = "cfe9a06913d4fd4067e9e47f6e05fac2"
+SRC_URI[sha256sum] = "857b9c060a0337de38c6d26238c47352433c02eabf26c2f860c854dbc35bd4ab"
+
+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
new file mode 100644
index 000000000..ebc8a5ef2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb
@@ -0,0 +1,38 @@
+DEFAULT_PREFERENCE = "-1"
+
+include gstreamer1.0-libav.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \
+ file://ext/libav/gstav.h;beginline=1;endline=18;md5=a752c35267d8276fd9ca3db6994fca9c \
+ file://gst-libs/ext/libav/LICENSE.md;md5=acda96fe91ccaabc9cd9d541806a0d37 \
+ file://gst-libs/ext/libav/COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://gst-libs/ext/libav/COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
+ file://gst-libs/ext/libav/COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \
+ file://gst-libs/ext/libav/COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
+
+# To build using the system libav/ffmpeg, append "libav" to PACKAGECONFIG
+# and remove the ffmpeg sources from SRC_URI below. However, first note the
+# warnings in gstreamer1.0-libav.inc
+SRC_URI = " \
+ git://anongit.freedesktop.org/gstreamer/gst-libav;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}"
+
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
+
+SRCREV_base = "6c4878b6abc916b7f6f25b8926c4859119acf1ec"
+SRCREV_common = "b64f03f6090245624608beb5d2fff335e23a01c0"
+SRCREV_ffmpeg = "c40983a6f631d22fede713d535bb9c31d5c9740c"
+SRCREV_FORMAT = "base"
+
+S = "${WORKDIR}/git"
+
+do_configure_prepend() {
+ ${S}/autogen.sh --noconfigure
+}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb
new file mode 100644
index 000000000..c542b13f0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb
@@ -0,0 +1,68 @@
+SUMMARY = "Gstreamer1.0 package groups"
+LICENSE = "MIT"
+
+# Due to use of COMBINED_FEATURES
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+inherit packagegroup
+
+COMMERCIAL_PLUGINS = "${COMMERCIAL_AUDIO_PLUGINS} ${COMMERCIAL_VIDEO_PLUGINS}"
+DEPENDS_UGLY="${@'gstreamer1.0-plugins-ugly' if 'ugly' in COMMERCIAL_PLUGINS.split('-') else ''}"
+DEPENDS_BAD="${@'gstreamer1.0-plugins-bad' if 'bad' in COMMERCIAL_PLUGINS.split('-') else ''}"
+DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good ${DEPENDS_UGLY} ${DEPENDS_BAD}"
+
+PACKAGES = "\
+ gstreamer1.0-meta-base \
+ gstreamer1.0-meta-x11-base \
+ gstreamer1.0-meta-audio \
+ gstreamer1.0-meta-debug \
+ gstreamer1.0-meta-video"
+
+ALLOW_EMPTY_gstreamer1.0-meta-base = "1"
+ALLOW_EMPTY_gstreamer1.0-meta-x11-base = "1"
+ALLOW_EMPTY_gstreamer1.0-meta-audio = "1"
+ALLOW_EMPTY_gstreamer1.0-meta-debug = "1"
+ALLOW_EMPTY_gstreamer1.0-meta-video = "1"
+
+RDEPENDS_gstreamer1.0-meta-base = "\
+ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gstreamer1.0-meta-x11-base', '', d)} \
+ gstreamer1.0 \
+ gstreamer1.0-plugins-base-playback \
+ gstreamer1.0-plugins-base-gio \
+ ${@bb.utils.contains('COMBINED_FEATURES', 'alsa', 'gstreamer1.0-plugins-base-alsa', '',d)} \
+ gstreamer1.0-plugins-base-volume \
+ gstreamer1.0-plugins-base-audioconvert \
+ gstreamer1.0-plugins-base-audioresample \
+ gstreamer1.0-plugins-base-typefindfunctions \
+ gstreamer1.0-plugins-base-videoscale \
+ gstreamer1.0-plugins-base-videoconvert \
+ gstreamer1.0-plugins-good-autodetect \
+ gstreamer1.0-plugins-good-souphttpsrc"
+
+RRECOMMENDS_gstreamer1.0-meta-x11-base = "\
+ gstreamer1.0-plugins-base-ximagesink \
+ gstreamer1.0-plugins-base-xvimagesink"
+
+RDEPENDS_gstreamer1.0-meta-audio = "\
+ gstreamer1.0-meta-base \
+ gstreamer1.0-plugins-base-vorbis \
+ gstreamer1.0-plugins-base-ogg \
+ gstreamer1.0-plugins-good-wavparse \
+ gstreamer1.0-plugins-good-flac \
+ ${COMMERCIAL_AUDIO_PLUGINS}"
+
+RDEPENDS_gstreamer1.0-meta-debug = "\
+ gstreamer1.0-meta-base \
+ gstreamer1.0-plugins-good-debug \
+ gstreamer1.0-plugins-base-audiotestsrc \
+ gstreamer1.0-plugins-base-videotestsrc"
+
+RDEPENDS_gstreamer1.0-meta-video = "\
+ gstreamer1.0-meta-base \
+ gstreamer1.0-plugins-good-avi \
+ gstreamer1.0-plugins-good-matroska \
+ gstreamer1.0-plugins-base-theora \
+ ${COMMERCIAL_VIDEO_PLUGINS}"
+
+RRECOMMENDS_gstreamer1.0-meta-video = "\
+ gstreamer1.0-meta-audio"
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
new file mode 100644
index 000000000..0fff612ee
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx.inc
@@ -0,0 +1,43 @@
+SUMMARY = "OpenMAX IL plugins for GStreamer"
+HOMEPAGE = "http://gstreamer.freedesktop.org/"
+SECTION = "multimedia"
+
+LICENSE = "LGPLv2.1"
+LICENSE_FLAGS = "commercial"
+
+DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad"
+
+inherit autotools pkgconfig gettext
+
+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"
+
+EXTRA_OECONF += "--disable-valgrind --with-omx-target=${GSTREAMER_1_0_OMX_TARGET}"
+
+python __anonymous () {
+ omx_target = d.getVar("GSTREAMER_1_0_OMX_TARGET", True)
+ if omx_target in ['generic', 'bellagio']:
+ # Bellagio headers are incomplete (they are missing the OMX_VERSION_MAJOR,#
+ # OMX_VERSION_MINOR, OMX_VERSION_REVISION, and OMX_VERSION_STEP macros);
+ # appending a directory path to gst-omx' internal OpenMAX IL headers fixes this
+ d.appendVar("CFLAGS", " -I${S}/omx/openmax")
+ elif omx_target == "rpi":
+ # Dedicated Raspberry Pi OpenMAX IL support makes this package machine specific
+ d.setVar("PACKAGE_ARCH", d.getVar("MACHINE_ARCH", True))
+}
+
+set_omx_core_name() {
+ sed -i -e "s;^core-name=.*;core-name=${GSTREAMER_1_0_OMX_CORE_NAME};" "${D}${sysconfdir}/xdg/gstomx.conf"
+}
+
+do_install[postfuncs] += " set_omx_core_name "
+
+FILES_${PN} += "${libdir}/gstreamer-1.0/*.so"
+FILES_${PN}-dev += "${libdir}/gstreamer-1.0/*.la"
+FILES_${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a"
+
+RDEPENDS_${PN} = "libomxil"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx/0001-omx-fixed-type-error-in-printf-call.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx/0001-omx-fixed-type-error-in-printf-call.patch
new file mode 100644
index 000000000..a428ac9c9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx/0001-omx-fixed-type-error-in-printf-call.patch
@@ -0,0 +1,30 @@
+From f629e041e9f678fcd86ad764a15117dff63c271c Mon Sep 17 00:00:00 2001
+From: Carlos Rafael Giani <dv@pseudoterminal.org>
+Date: Sat, 27 Apr 2013 02:50:25 +0200
+Subject: [PATCH] omx: fixed type error in printf call
+
+%zu expects size_t
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=699008]
+
+Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
+---
+ omx/gstomx.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/omx/gstomx.c b/omx/gstomx.c
+index a2945ed..1eca7cc 100644
+--- a/omx/gstomx.c
++++ b/omx/gstomx.c
+@@ -1630,7 +1630,7 @@ gst_omx_port_allocate_buffers_unlocked (GstOMXPort * port,
+
+ GST_INFO_OBJECT (comp->parent,
+ "Allocating %d buffers of size %zu for %s port %u", n,
+- port->port_def.nBufferSize, comp->name, (guint) port->index);
++ (size_t) (port->port_def.nBufferSize), comp->name, (guint) port->index);
+
+ if (!port->buffers)
+ port->buffers = g_ptr_array_sized_new (n);
+--
+1.7.9.5
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.2.0.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.2.0.bb
new file mode 100644
index 000000000..74358a724
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.2.0.bb
@@ -0,0 +1,11 @@
+include gstreamer1.0-omx.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
+ file://omx/gstomx.h;beginline=1;endline=21;md5=5c8e1fca32704488e76d2ba9ddfa935f"
+
+SRC_URI = "http://gstreamer.freedesktop.org/src/gst-omx/gst-omx-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "d24e8c0153c35dfefee3e26b1c2c35f8"
+SRC_URI[sha256sum] = "0b4874961e6488ad9e5808114bd486ea981c540907262caab1419355fd82d745"
+
+S = "${WORKDIR}/gst-omx-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb
new file mode 100644
index 000000000..970554352
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb
@@ -0,0 +1,25 @@
+DEFAULT_PREFERENCE = "-1"
+
+include gstreamer1.0-omx.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
+ file://omx/gstomx.h;beginline=1;endline=21;md5=5c8e1fca32704488e76d2ba9ddfa935f"
+
+SRC_URI = " \
+ git://anongit.freedesktop.org/gstreamer/gst-omx;branch=master;name=gst-omx \
+ git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;branch=master;name=common \
+ file://0001-omx-fixed-type-error-in-printf-call.patch \
+"
+
+SRCREV_gst-omx = "a2db76b048db278ef0aa798e106b7594264e06c0"
+SRCREV_common = "5edcd857b2107cd8b78c16232dd10877513ec157"
+
+SRCREV_FORMAT = "gst-omx"
+
+S = "${WORKDIR}/git"
+
+do_configure_prepend() {
+ cd ${S}
+ ./autogen.sh --noconfigure
+ cd ${B}
+}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
new file mode 100644
index 000000000..9e2b94ede
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
@@ -0,0 +1,148 @@
+require gstreamer1.0-plugins.inc
+
+LICENSE = "GPLv2+ & LGPLv2+ & LGPLv2.1+"
+
+DEPENDS += "gstreamer1.0-plugins-base libpng jpeg"
+
+inherit gettext bluetooth
+
+SRC_URI_append = " \
+ file://0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch \
+"
+
+# opengl packageconfig factored out to make it easy for distros
+# and BSP layers to pick either (desktop) opengl, gles2, or no GL
+PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2', '', d)}"
+
+# gtk is not in the PACKAGECONFIG variable by default until
+# the transition to gtk+3 is finished
+PACKAGECONFIG ??= " \
+ ${GSTREAMER_ORC} \
+ ${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)} \
+ bz2 curl dash dtls hls neon rsvg sbc smoothstreaming sndfile uvch264 webp \
+"
+
+PACKAGECONFIG[assrender] = "--enable-assrender,--disable-assrender,libass"
+PACKAGECONFIG[bluez] = "--enable-bluez,--disable-bluez,${BLUEZ}"
+PACKAGECONFIG[bz2] = "--enable-bz2,--disable-bz2,bzip2"
+PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl"
+PACKAGECONFIG[dash] = "--enable-dash,--disable-dash,libxml2"
+PACKAGECONFIG[directfb] = "--enable-directfb,--disable-directfb,directfb"
+PACKAGECONFIG[dtls] = "--enable-dtls,--disable-dtls,openssl"
+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"
+PACKAGECONFIG[libmms] = "--enable-libmms,--disable-libmms,libmms"
+PACKAGECONFIG[libssh2] = "--enable-libssh2,--disable-libssh2,libssh2"
+PACKAGECONFIG[modplug] = "--enable-modplug,--disable-modplug,libmodplug"
+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"
+PACKAGECONFIG[resindvd] = "--enable-resindvd,--disable-resindvd,libdvdread libdvdnav"
+PACKAGECONFIG[rsvg] = "--enable-rsvg,--disable-rsvg,librsvg"
+PACKAGECONFIG[rtmp] = "--enable-rtmp,--disable-rtmp,rtmpdump"
+PACKAGECONFIG[sbc] = "--enable-sbc,--disable-sbc,sbc"
+PACKAGECONFIG[schroedinger] = "--enable-schro,--disable-schro,schroedinger"
+PACKAGECONFIG[smoothstreaming] = "--enable-smoothstreaming,--disable-smoothstreaming,libxml2"
+PACKAGECONFIG[sndfile] = "--enable-sndfile,--disable-sndfile,libsndfile1"
+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[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
+
+# these plugins have no corresponding library in OE-core or meta-openembedded:
+# openni2 winks direct3d directsound winscreencap
+# 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
+
+# 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).
+# This is better done in a separate qt5 layer (which then should add a "qt5" packageconfig
+# in a gstreamer1.0-plugins-bad bbappend).
+
+EXTRA_OECONF += " \
+ --enable-decklink \
+ --enable-dvb \
+ --enable-fbdev \
+ --enable-shm \
+ --enable-vcd \
+ --disable-acm \
+ --disable-android_media \
+ --disable-apexsink \
+ --disable-apple_media \
+ --disable-avc \
+ --disable-bs2b \
+ --disable-chromaprint \
+ --disable-cocoa \
+ --disable-daala \
+ --disable-dc1394 \
+ --disable-direct3d \
+ --disable-directsound \
+ --disable-dts \
+ --disable-gme \
+ --disable-gsm \
+ --disable-kate \
+ --disable-ladspa \
+ --disable-libde265 \
+ --disable-libvisual \
+ --disable-linsys \
+ --disable-lv2 \
+ --disable-mimic \
+ --disable-mpeg2enc \
+ --disable-mplex \
+ --disable-musepack \
+ --disable-nas \
+ --disable-ofa \
+ --disable-openexr \
+ --disable-openh264 \
+ --disable-openjpeg \
+ --disable-openni2 \
+ --disable-opensles \
+ --disable-pvr \
+ --disable-qt \
+ --disable-sdl \
+ --disable-sdltest \
+ --disable-sndio \
+ --disable-soundtouch \
+ --disable-spandsp \
+ --disable-spc \
+ --disable-teletextdec \
+ --disable-timidity \
+ --disable-vdpau \
+ --disable-wasapi \
+ --disable-wildmidi \
+ --disable-wininet \
+ --disable-winks \
+ --disable-winscreencap \
+ --disable-x265 \
+ --disable-xvid \
+ --disable-zbar \
+ ${@bb.utils.contains("TUNE_FEATURES", "mx32", "--disable-yadif", "", d)} \
+"
+
+export OPENCV_PREFIX = "${STAGING_DIR_TARGET}${prefix}"
+
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
+
+FILES_${PN}-dev += "${libdir}/gstreamer-${LIBV}/include/gst/gl/gstglconfig.h"
+FILES_${PN}-freeverb += "${datadir}/gstreamer-${LIBV}/presets/GstFreeverb.prs"
+FILES_${PN}-opencv += "${datadir}/gst-plugins-bad/${LIBV}/opencv*"
+FILES_${PN}-voamrwbenc += "${datadir}/gstreamer-${LIBV}/presets/GstVoAmrwbEnc.prs"
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
new file mode 100644
index 000000000..154d340e4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch
@@ -0,0 +1,57 @@
+From cff6fbf555a072408c21da1e818209c9d3814dd3 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 27 Oct 2015 14:36:58 +0200
+Subject: [PATCH] Makefile.am: don't hardcode libtool name when running
+ introspection tools
+
+Upstream-Status: Pending [review on oe-core list]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ gst-libs/gst/gl/Makefile.am | 2 +-
+ gst-libs/gst/insertbin/Makefile.am | 2 +-
+ gst-libs/gst/mpegts/Makefile.am | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/gst-libs/gst/gl/Makefile.am b/gst-libs/gst/gl/Makefile.am
+index f968357..7cc2c7a 100644
+--- a/gst-libs/gst/gl/Makefile.am
++++ b/gst-libs/gst/gl/Makefile.am
+@@ -149,7 +149,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@ \
+- --libtool="$(top_builddir)/libtool" \
++ --libtool="$(LIBTOOL)" \
+ --pkg gstreamer-@GST_API_VERSION@ \
+ --pkg gstreamer-base-@GST_API_VERSION@ \
+ --pkg gstreamer-video-@GST_API_VERSION@ \
+diff --git a/gst-libs/gst/insertbin/Makefile.am b/gst-libs/gst/insertbin/Makefile.am
+index 09eb97c..b746885 100644
+--- a/gst-libs/gst/insertbin/Makefile.am
++++ b/gst-libs/gst/insertbin/Makefile.am
+@@ -43,7 +43,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@ \
+- --libtool="$(top_builddir)/libtool" \
++ --libtool="$(LIBTOOL)" \
+ --pkg gstreamer-@GST_API_VERSION@ \
+ --pkg gstreamer-base-@GST_API_VERSION@ \
+ --pkg-export gstreamer-insertbin-@GST_API_VERSION@ \
+diff --git a/gst-libs/gst/mpegts/Makefile.am b/gst-libs/gst/mpegts/Makefile.am
+index 2511d49..c1cbce6 100644
+--- a/gst-libs/gst/mpegts/Makefile.am
++++ b/gst-libs/gst/mpegts/Makefile.am
+@@ -78,7 +78,7 @@ GstMpegts-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstmpegts-@GST_API_
+ --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-video-@GST_API_VERSION@` \
+ --library=libgstmpegts-@GST_API_VERSION@.la \
+ --include=Gst-@GST_API_VERSION@ \
+- --libtool="$(top_builddir)/libtool" \
++ --libtool="$(LIBTOOL)" \
+ --pkg gstreamer-@GST_API_VERSION@ \
+ --pkg gstreamer-video-@GST_API_VERSION@ \
+ --pkg-export gstreamer-mpegts-@GST_API_VERSION@ \
+--
+2.6.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-glimagesink-Downrank-to-marginal.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-glimagesink-Downrank-to-marginal.patch
new file mode 100644
index 000000000..1085e95e8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-glimagesink-Downrank-to-marginal.patch
@@ -0,0 +1,32 @@
+From c6b37a80806f9128de47f1ccc3f2354f8d436bb6 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 24 Sep 2015 19:47:32 +0300
+Subject: [PATCH] glimagesink: Downrank to marginal
+
+On desktop, where there is good OpenGL, xvimagesink will come up first,
+on other platforms, OpenGL can't be trusted because it's either software (like
+in a VM) or broken (like on embedded)., so let ximagesink come above.
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=751684]
+
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ ext/gl/gstopengl.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+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)
+ #endif
+
+ if (!gst_element_register (plugin, "glimagesink",
+- GST_RANK_SECONDARY, gst_gl_image_sink_bin_get_type ())) {
++ GST_RANK_MARGINAL, gst_gl_image_sink_bin_get_type ())) {
+ return FALSE;
+ }
+
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch
new file mode 100644
index 000000000..e81b06570
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch
@@ -0,0 +1,27 @@
+From a93ca63d01e7cd1e40b5be576992f77fac364bd5 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 21 Mar 2016 18:21:17 +0200
+Subject: [PATCH] gstreamer-gl.pc.in: don't append GL_CFLAGS to CFLAGS
+
+Dependencies' include directories should not be added in this way;
+it causes problems when cross-compiling in sysroot environments.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ pkgconfig/gstreamer-gl.pc.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pkgconfig/gstreamer-gl.pc.in b/pkgconfig/gstreamer-gl.pc.in
+index 5589e2a..b986450 100644
+--- a/pkgconfig/gstreamer-gl.pc.in
++++ b/pkgconfig/gstreamer-gl.pc.in
+@@ -10,4 +10,4 @@ Version: @VERSION@
+ Requires: gstreamer-base-@GST_API_VERSION@ gstreamer-@GST_API_VERSION@
+
+ Libs: -L${libdir} -lgstgl-@GST_API_VERSION@ @GL_LIBS@
+-Cflags: -I${includedir} @GL_CFLAGS@
++Cflags: -I${includedir}
+--
+2.7.0
+
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
new file mode 100755
index 000000000..3491a15e6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-glwindow-fix-memory-leak-of-navigation-thre.patch
@@ -0,0 +1,35 @@
+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/avoid-including-sys-poll.h-directly.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/avoid-including-sys-poll.h-directly.patch
new file mode 100644
index 000000000..357fd7800
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/avoid-including-sys-poll.h-directly.patch
@@ -0,0 +1,30 @@
+From 72561a0fca562d03567ace7b4cfc94992cd6525c Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Wed, 3 Feb 2016 18:05:41 -0800
+Subject: [PATCH] avoid including <sys/poll.h> directly
+
+musl libc generates warnings if <sys/poll.h> is included directly.
+
+Upstream-Status: Pending
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ sys/dvb/gstdvbsrc.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/sys/dvb/gstdvbsrc.c b/sys/dvb/gstdvbsrc.c
+index b93255f..49f145a 100644
+--- a/sys/dvb/gstdvbsrc.c
++++ b/sys/dvb/gstdvbsrc.c
+@@ -93,7 +93,7 @@
+ #include <gst/gst.h>
+ #include <gst/glib-compat-private.h>
+ #include <sys/ioctl.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <fcntl.h>
+ #include <errno.h>
+ #include <stdio.h>
+--
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch
new file mode 100644
index 000000000..d52afd5d5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch
@@ -0,0 +1,64 @@
+From f59c5269f92d59a5296cbfeeb682d42095cd88ad Mon Sep 17 00:00:00 2001
+From: Wenzong Fan <wenzong.fan@windriver.com>
+Date: Thu, 18 Sep 2014 02:24:07 -0400
+Subject: [PATCH] gstreamer1.0-plugins-bad: allow to disable libssh2
+
+libssh2 is automatically linked to if present, this undetermined
+dependency may cause build errors like:
+
+ .../x86_64-poky-linux/4.9.0/ld: cannot find -lssh2
+
+libssh2 isn't an oe-core recipe, so allow to disable it from
+configure.
+
+Upstream-Status: Pending
+
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+---
+ configure.ac | 23 +++++++++++++++++------
+ 1 file changed, 17 insertions(+), 6 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 0e95c5c..12153b4 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1901,6 +1901,15 @@ AG_GST_CHECK_FEATURE(CHROMAPRINT, [chromaprint], chromaprint, [
+ ])
+
+ dnl *** Curl ***
++AC_ARG_ENABLE([libssh2],
++ [ --enable-libssh2 enable LIBSSH2 support @<:@default=auto@:>@],
++ [case "${enableval}" in
++ yes) NEED_SSH2=yes ;;
++ no) NEED_SSH2=no ;;
++ auto) NEED_SSH2=auto ;;
++ *) AC_MSG_ERROR([bad value ${enableval} for --enable-libssh2]) ;;
++ esac],[NEED_SSH2=auto])
++
+ translit(dnm, m, l) AM_CONDITIONAL(USE_CURL, true)
+ AG_GST_CHECK_FEATURE(CURL, [Curl plugin], curl, [
+ PKG_CHECK_MODULES(CURL, libcurl >= 7.21.0, [
+@@ -1915,12 +1924,14 @@ AG_GST_CHECK_FEATURE(CURL, [Curl plugin], curl, [
+ ])
+ AC_SUBST(CURL_CFLAGS)
+ AC_SUBST(CURL_LIBS)
+- PKG_CHECK_MODULES(SSH2, libssh2 >= 1.4.3, [
+- HAVE_SSH2="yes"
+- AC_DEFINE(HAVE_SSH2, 1, [Define if libssh2 is available])
+- ], [
+- HAVE_SSH2="no"
+- ])
++ if test "x$NEED_SSH2" != "xno"; then
++ PKG_CHECK_MODULES(SSH2, libssh2 >= 1.4.3, [
++ HAVE_SSH2="yes"
++ AC_DEFINE(HAVE_SSH2, 1, [Define if libssh2 is available])
++ ], [
++ HAVE_SSH2="no"
++ ])
++ fi
+ AM_CONDITIONAL(USE_SSH2, test "x$HAVE_SSH2" = "xyes")
+ AC_SUBST(SSH2_CFLAGS)
+ AC_SUBST(SSH2_LIBS)
+--
+1.7.9.5
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch
new file mode 100644
index 000000000..369ff93ac
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch
@@ -0,0 +1,86 @@
+From 2262ba4b686d5cc0d3e894707fe1d31619a3a8f1 Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Tue, 9 Feb 2016 14:00:00 -0800
+Subject: [PATCH] ensure valid sentinals for gst_structure_get() etc
+
+For GStreamer functions declared with G_GNUC_NULL_TERMINATED,
+ie __attribute__((__sentinel__)), gcc will generate a warning if the
+last parameter passed to the function is not NULL (where a valid NULL
+in this context is defined as zero with any pointer type).
+
+The C callers to such functions within gst-plugins-bad use the C NULL
+definition (ie ((void*)0)), which is a valid sentinel.
+
+However the C++ NULL definition (ie 0L), is not a valid sentinel
+without an explicit cast to a pointer type.
+
+Upstream-Status: Pending
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ sys/decklink/gstdecklink.cpp | 10 +++++-----
+ sys/decklink/gstdecklinkaudiosrc.cpp | 2 +-
+ sys/decklink/gstdecklinkvideosink.cpp | 2 +-
+ 3 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/sys/decklink/gstdecklink.cpp b/sys/decklink/gstdecklink.cpp
+index 64637f1..bac956f 100644
+--- a/sys/decklink/gstdecklink.cpp
++++ b/sys/decklink/gstdecklink.cpp
+@@ -324,22 +324,22 @@ gst_decklink_mode_get_structure (GstDecklinkModeEnum e, BMDPixelFormat f)
+ "height", G_TYPE_INT, mode->height,
+ "pixel-aspect-ratio", GST_TYPE_FRACTION, mode->par_n, mode->par_d,
+ "interlace-mode", G_TYPE_STRING, mode->interlaced ? "interleaved" : "progressive",
+- "framerate", GST_TYPE_FRACTION, mode->fps_n, mode->fps_d, NULL);
++ "framerate", GST_TYPE_FRACTION, mode->fps_n, mode->fps_d, (void *) NULL);
+
+ switch (f) {
+ case bmdFormat8BitYUV: /* '2vuy' */
+ gst_structure_set (s, "format", G_TYPE_STRING, "UYVY",
+ "colorimetry", G_TYPE_STRING, mode->colorimetry,
+- "chroma-site", G_TYPE_STRING, "mpeg2", NULL);
++ "chroma-site", G_TYPE_STRING, "mpeg2", (void *) NULL);
+ break;
+ case bmdFormat10BitYUV: /* 'v210' */
+- gst_structure_set (s, "format", G_TYPE_STRING, "v210", NULL);
++ gst_structure_set (s, "format", G_TYPE_STRING, "v210", (void *) NULL);
+ break;
+ case bmdFormat8BitARGB: /* 'ARGB' */
+- gst_structure_set (s, "format", G_TYPE_STRING, "ARGB", NULL);
++ gst_structure_set (s, "format", G_TYPE_STRING, "ARGB", (void *) NULL);
+ break;
+ case bmdFormat8BitBGRA: /* 'BGRA' */
+- gst_structure_set (s, "format", G_TYPE_STRING, "BGRA", NULL);
++ gst_structure_set (s, "format", G_TYPE_STRING, "BGRA", (void *) NULL);
+ break;
+ case bmdFormat10BitRGB: /* 'r210' Big-endian RGB 10-bit per component with SMPTE video levels (64-960). Packed as 2:10:10:10 */
+ case bmdFormat12BitRGB: /* 'R12B' Big-endian RGB 12-bit per component with full range (0-4095). Packed as 12-bit per component */
+diff --git a/sys/decklink/gstdecklinkaudiosrc.cpp b/sys/decklink/gstdecklinkaudiosrc.cpp
+index 9a701ee..26fb7ec 100644
+--- a/sys/decklink/gstdecklinkaudiosrc.cpp
++++ b/sys/decklink/gstdecklinkaudiosrc.cpp
+@@ -312,7 +312,7 @@ gst_decklink_audio_src_set_caps (GstBaseSrc * bsrc, GstCaps * caps)
+ g_mutex_unlock (&self->input->lock);
+
+ if (videosrc) {
+- g_object_get (videosrc, "connection", &vconn, NULL);
++ g_object_get (videosrc, "connection", &vconn, (void *) NULL);
+ gst_object_unref (videosrc);
+
+ switch (vconn) {
+diff --git a/sys/decklink/gstdecklinkvideosink.cpp b/sys/decklink/gstdecklinkvideosink.cpp
+index eebeff3..da6e486 100644
+--- a/sys/decklink/gstdecklinkvideosink.cpp
++++ b/sys/decklink/gstdecklinkvideosink.cpp
+@@ -158,7 +158,7 @@ reset_framerate (GstCapsFeatures * features, GstStructure * structure,
+ gpointer user_data)
+ {
+ gst_structure_set (structure, "framerate", GST_TYPE_FRACTION_RANGE, 0, 1,
+- G_MAXINT, 1, NULL);
++ G_MAXINT, 1, (void *) NULL);
+
+ return TRUE;
+ }
+--
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch
new file mode 100644
index 000000000..5ce57714e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch
@@ -0,0 +1,28 @@
+From a67781000e82bd9ae3813da29401e8c0c852328a Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Tue, 26 Jan 2016 15:16:01 -0800
+Subject: [PATCH] fix maybe-uninitialized warnings when compiling with -Os
+
+Upstream-Status: Pending
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ gst-libs/gst/codecparsers/gstvc1parser.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gst-libs/gst/codecparsers/gstvc1parser.c b/gst-libs/gst/codecparsers/gstvc1parser.c
+index fd16ee0..ddb890c 100644
+--- a/gst-libs/gst/codecparsers/gstvc1parser.c
++++ b/gst-libs/gst/codecparsers/gstvc1parser.c
+@@ -1729,7 +1729,7 @@ gst_vc1_parse_sequence_layer (const guint8 * data, gsize size,
+ GstVC1SeqLayer * seqlayer)
+ {
+ guint32 tmp;
+- guint8 tmp8;
++ guint8 tmp8 = 0;
+ guint8 structA[8] = { 0, };
+ guint8 structB[12] = { 0, };
+ GstBitReader br;
+--
+1.9.1
+
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
new file mode 100644
index 000000000..8eb47c265
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bb
@@ -0,0 +1,28 @@
+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_git.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb
new file mode 100644
index 000000000..ef6581b2a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb
@@ -0,0 +1,65 @@
+DEFAULT_PREFERENCE = "-1"
+
+include gstreamer1.0-plugins-bad.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=73a5855a8119deb017f5f13cf327095d \
+ file://COPYING.LIB;md5=21682e4e8fea52413fd26c60acb907e5 \
+ file://gst/tta/crc32.h;beginline=12;endline=29;md5=27db269c575d1e5317fffca2d33b3b50 \
+ file://gst/tta/filters.h;beginline=12;endline=29;md5=8a08270656f2f8ad7bb3655b83138e5a"
+
+SRC_URI = " \
+ git://anongit.freedesktop.org/gstreamer/gst-plugins-bad;name=base \
+ git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;name=common \
+ file://configure-allow-to-disable-libssh2.patch \
+ file://fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch \
+ file://avoid-including-sys-poll.h-directly.patch \
+ file://ensure-valid-sentinels-for-gst_structure_get-etc.patch \
+ file://0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch \
+"
+
+PV = "1.7.2+git${SRCPV}"
+
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
+
+SRCREV_base = "50ae46cc0f8827bf966920d9c221e5cf86e811ba"
+SRCREV_common = "a25397448942079002622be231e9ec49b985745a"
+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
+}
+
+# In 1.6.2, the "--enable-hls" configure option generated an installable package
+# called "gstreamer1.0-plugins-bad-fragmented". In 1.7.1 that HLS plugin package
+# has become "gstreamer1.0-plugins-bad-hls". See:
+# http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=efe62292a3d045126654d93239fdf4cc8e48ae08
+
+PACKAGESPLITFUNCS_append = " handle_hls_rename "
+
+python handle_hls_rename () {
+ d.setVar('RPROVIDES_gstreamer1.0-plugins-bad-hls', 'gstreamer1.0-plugins-bad-fragmented')
+ d.setVar('RREPLACES_gstreamer1.0-plugins-bad-hls', 'gstreamer1.0-plugins-bad-fragmented')
+ d.setVar('RCONFLICTS_gstreamer1.0-plugins-bad-hls', 'gstreamer1.0-plugins-bad-fragmented')
+}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base.inc b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base.inc
new file mode 100644
index 000000000..7381458f4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base.inc
@@ -0,0 +1,50 @@
+require gstreamer1.0-plugins.inc
+
+SRC_URI_append = "\
+ file://0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch \
+ file://0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch \
+ file://0003-riff-add-missing-include-directories-when-calling-in.patch \
+ file://0004-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch \
+"
+
+LICENSE = "GPLv2+ & LGPLv2+"
+
+DEPENDS += "iso-codes util-linux zlib"
+
+inherit gettext
+
+PACKAGES_DYNAMIC =+ "^libgst.*"
+
+PACKAGECONFIG ??= " \
+ ${GSTREAMER_ORC} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
+ gio-unix-2.0 ivorbis ogg pango theora vorbis \
+"
+
+X11DEPENDS = "virtual/libx11 libsm libxrender libxv"
+X11ENABLEOPTS = "--enable-x --enable-xvideo --enable-xshm"
+X11DISABLEOPTS = "--disable-x --disable-xvideo --disable-xshm"
+
+PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib"
+PACKAGECONFIG[cdparanoia] = "--enable-cdparanoia,--disable-cdparanoia,cdparanoia"
+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[pango] = "--enable-pango,--disable-pango,pango"
+PACKAGECONFIG[theora] = "--enable-theora,--disable-theora,libtheora"
+PACKAGECONFIG[visual] = "--enable-libvisual,--disable-libvisual,libvisual"
+PACKAGECONFIG[vorbis] = "--enable-vorbis,--disable-vorbis,libvorbis"
+PACKAGECONFIG[x11] = "${X11ENABLEOPTS},${X11DISABLEOPTS},${X11DEPENDS}"
+
+EXTRA_OECONF += " \
+ --enable-zlib \
+"
+
+CACHED_CONFIGUREVARS_append_x86 = " ac_cv_header_emmintrin_h=no ac_cv_header_xmmintrin_h=no"
+
+FILES_${MLPREFIX}libgsttag-1.0 += "${datadir}/gst-plugins-base/1.0/license-translations.dict"
+
+do_compile_prepend() {
+ export GIR_EXTRA_LIBS_PATH="${B}/gst-libs/gst/tag/.libs:${B}/gst-libs/gst/video/.libs:${B}/gst-libs/gst/audio/.libs:${B}/gst-libs/gst/rtp/.libs"
+}
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
new file mode 100644
index 000000000..781e4d801
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch
@@ -0,0 +1,168 @@
+From f1d9652351e7754c63003104eceb526af424c7e0 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 20 Nov 2015 16:53:04 +0200
+Subject: [PATCH 1/4] Makefile.am: don't hardcode libtool name when running
+ introspection tools
+
+Upstream-Status: Pending [review on oe-core maillist]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ gst-libs/gst/allocators/Makefile.am | 2 +-
+ gst-libs/gst/app/Makefile.am | 2 +-
+ gst-libs/gst/audio/Makefile.am | 2 +-
+ gst-libs/gst/fft/Makefile.am | 2 +-
+ gst-libs/gst/pbutils/Makefile.am | 2 +-
+ gst-libs/gst/riff/Makefile.am | 2 +-
+ gst-libs/gst/rtp/Makefile.am | 2 +-
+ gst-libs/gst/rtsp/Makefile.am | 2 +-
+ gst-libs/gst/sdp/Makefile.am | 2 +-
+ gst-libs/gst/tag/Makefile.am | 2 +-
+ gst-libs/gst/video/Makefile.am | 2 +-
+ 11 files changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/gst-libs/gst/allocators/Makefile.am b/gst-libs/gst/allocators/Makefile.am
+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-@
+ --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@ \
+- --libtool="$(top_builddir)/libtool" \
++ --libtool="$(LIBTOOL)" \
+ --pkg gstreamer-@GST_API_VERSION@ \
+ --pkg-export gstreamer-allocators-@GST_API_VERSION@ \
+ --output $@ \
+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
+ --library=libgstapp-@GST_API_VERSION@.la \
+ --include=Gst-@GST_API_VERSION@ \
+ --include=GstBase-@GST_API_VERSION@ \
+- --libtool="$(top_builddir)/libtool" \
++ --libtool="$(LIBTOOL)" \
+ --pkg gstreamer-@GST_API_VERSION@ \
+ --pkg gstreamer-base-@GST_API_VERSION@ \
+ --pkg-export gstreamer-app-@GST_API_VERSION@ \
+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
+ --include=Gst-@GST_API_VERSION@ \
+ --include=GstBase-@GST_API_VERSION@ \
+ --include=GstTag-@GST_API_VERSION@ \
+- --libtool="$(top_builddir)/libtool" \
++ --libtool="$(LIBTOOL)" \
+ --pkg gstreamer-@GST_API_VERSION@ \
+ --pkg gstreamer-base-@GST_API_VERSION@ \
+ --pkg-export gstreamer-audio-@GST_API_VERSION@ \
+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
+ --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@ \
+- --libtool="$(top_builddir)/libtool" \
++ --libtool="$(LIBTOOL)" \
+ --pkg gstreamer-@GST_API_VERSION@ \
+ --pkg-export gstreamer-fft-@GST_API_VERSION@ \
+ --output $@ \
+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
+ --include=GstTag-@GST_API_VERSION@ \
+ --include=GstVideo-@GST_API_VERSION@ \
+ --include=GstAudio-@GST_API_VERSION@ \
+- --libtool="$(top_builddir)/libtool" \
++ --libtool="$(LIBTOOL)" \
+ --pkg gstreamer-@GST_API_VERSION@ \
+ --pkg gstreamer-tag-@GST_API_VERSION@ \
+ --pkg gstreamer-video-@GST_API_VERSION@ \
+diff --git a/gst-libs/gst/riff/Makefile.am b/gst-libs/gst/riff/Makefile.am
+index 83d83cb..3bd8fc0 100644
+--- a/gst-libs/gst/riff/Makefile.am
++++ b/gst-libs/gst/riff/Makefile.am
+@@ -47,7 +47,7 @@ libgstriff_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS)
+ # --include=GstAudio-@GST_API_VERSION@ \
+ # --include=GstTag-@GST_API_VERSION@ \
+ # --include=Gst-@GST_API_VERSION@ \
+-# --libtool="$(top_builddir)/libtool" \
++# --libtool="$(LIBTOOL)" \
+ # --pkg gstreamer-@GST_API_VERSION@ \
+ # --pkg gstreamer-tag-@GST_API_VERSION@ \
+ # --pkg gstreamer-audio-@GST_API_VERSION@ \
+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
+ --library=libgstrtp-@GST_API_VERSION@.la \
+ --include=Gst-@GST_API_VERSION@ \
+ --include=GstBase-@GST_API_VERSION@ \
+- --libtool="$(top_builddir)/libtool" \
++ --libtool="$(LIBTOOL)" \
+ --pkg gstreamer-@GST_API_VERSION@ \
+ --pkg gstreamer-base-@GST_API_VERSION@ \
+ --pkg-export gstreamer-rtp-@GST_API_VERSION@ \
+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
+ --include=Gio-2.0 \
+ --include=Gst-@GST_API_VERSION@ \
+ --include=GstSdp-@GST_API_VERSION@ \
+- --libtool="$(top_builddir)/libtool" \
++ --libtool="$(LIBTOOL)" \
+ --pkg gio-2.0 \
+ --pkg gstreamer-@GST_API_VERSION@ \
+ --pkg gstreamer-sdp-@GST_API_VERSION@ \
+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
+ --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@ \
+- --libtool="$(top_builddir)/libtool" \
++ --libtool="$(LIBTOOL)" \
+ --pkg gstreamer-@GST_API_VERSION@ \
+ --pkg-export gstreamer-sdp-@GST_API_VERSION@ \
+ --output $@ \
+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
+ --library=libgsttag-@GST_API_VERSION@.la \
+ --include=Gst-@GST_API_VERSION@ \
+ --include=GstBase-@GST_API_VERSION@ \
+- --libtool="$(top_builddir)/libtool" \
++ --libtool="$(LIBTOOL)" \
+ --pkg gstreamer-@GST_API_VERSION@ \
+ --pkg gstreamer-base-@GST_API_VERSION@ \
+ --pkg-export gstreamer-tag-@GST_API_VERSION@ \
+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
+ --library=libgstvideo-@GST_API_VERSION@.la \
+ --include=Gst-@GST_API_VERSION@ \
+ --include=GstBase-@GST_API_VERSION@ \
+- --libtool="$(top_builddir)/libtool" \
++ --libtool="$(LIBTOOL)" \
+ --pkg gstreamer-@GST_API_VERSION@ \
+ --pkg gstreamer-base-@GST_API_VERSION@ \
+ --pkg-export gstreamer-video-@GST_API_VERSION@ \
+--
+2.6.2
+
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
new file mode 100644
index 000000000..85fcacb55
--- /dev/null
+++ 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
@@ -0,0 +1,298 @@
+From 990b653c7b6de1937ec759019982d6c5f15770f7 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 26 Oct 2015 16:38:18 +0200
+Subject: [PATCH 2/4] Makefile.am: prefix calls to pkg-config with
+ PKG_CONFIG_SYSROOT_DIR
+
+Upstream-Status: Pending [review on oe-core maillist]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ gst-libs/gst/allocators/Makefile.am | 4 ++--
+ gst-libs/gst/app/Makefile.am | 4 ++--
+ gst-libs/gst/audio/Makefile.am | 12 ++++++------
+ gst-libs/gst/fft/Makefile.am | 4 ++--
+ gst-libs/gst/pbutils/Makefile.am | 12 ++++++------
+ gst-libs/gst/riff/Makefile.am | 8 ++++----
+ gst-libs/gst/rtp/Makefile.am | 8 ++++----
+ gst-libs/gst/rtsp/Makefile.am | 4 ++--
+ gst-libs/gst/sdp/Makefile.am | 4 ++--
+ gst-libs/gst/tag/Makefile.am | 8 ++++----
+ gst-libs/gst/video/Makefile.am | 8 ++++----
+ 11 files changed, 38 insertions(+), 38 deletions(-)
+
+diff --git a/gst-libs/gst/allocators/Makefile.am b/gst-libs/gst/allocators/Makefile.am
+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-@
+ --c-include "gst/allocators/allocators.h" \
+ -I$(top_srcdir)/gst-libs \
+ -I$(top_builddir)/gst-libs \
+- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`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@ \
+ --libtool="$(LIBTOOL)" \
+@@ -58,7 +58,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+ $(INTROSPECTION_COMPILER) \
+ --includedir=$(srcdir) \
+ --includedir=$(builddir) \
+- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+ $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
+
+ CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA)
+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
+ --c-include "gst/app/app.h" \
+ -I$(top_srcdir)/gst-libs \
+ -I$(top_builddir)/gst-libs \
+- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
++ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
+ --library=libgstapp-@GST_API_VERSION@.la \
+ --include=Gst-@GST_API_VERSION@ \
+ --include=GstBase-@GST_API_VERSION@ \
+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
+ -I$(top_srcdir)/gst-libs \
+ -I$(top_builddir)/gst-libs \
+ --c-include "gst/audio/audio.h" \
+- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
++ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
+ --add-include-path="$(top_builddir)/gst-libs/gst/tag/" \
+ --library=libgstaudio-@GST_API_VERSION@.la \
+- --library-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=libdir gstreamer-@GST_API_VERSION@` \
+- --library-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=libdir gstreamer-base-@GST_API_VERSION@` \
++ --library-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=libdir gstreamer-@GST_API_VERSION@` \
++ --library-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=libdir gstreamer-base-@GST_API_VERSION@` \
+ --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)
+ --includedir=$(srcdir) \
+ --includedir=$(builddir) \
+ --includedir="$(top_builddir)/gst-libs/gst/tag/" \
+- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
+- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
++ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+ $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
+
+ CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
+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
+ --c-include "gst/fft/fft.h" \
+ -I$(top_srcdir)/gst-libs \
+ -I$(top_builddir)/gst-libs \
+- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`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@ \
+ --libtool="$(LIBTOOL)" \
+@@ -85,7 +85,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+ $(INTROSPECTION_COMPILER) \
+ --includedir=$(srcdir) \
+ --includedir=$(builddir) \
+- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+ $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
+
+ CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA)
+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
+ --c-include "gst/pbutils/pbutils.h" \
+ -I$(top_srcdir)/gst-libs \
+ -I$(top_builddir)/gst-libs \
+- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
++ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
+ --add-include-path="$(top_builddir)/gst-libs/gst/tag/" \
+ --add-include-path="$(top_builddir)/gst-libs/gst/video/" \
+ --add-include-path="$(top_builddir)/gst-libs/gst/audio/" \
+ --library=libgstpbutils-@GST_API_VERSION@.la \
+- --library-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=libdir gstreamer-@GST_API_VERSION@` \
+- --library-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=libdir gstreamer-base-@GST_API_VERSION@` \
++ --library-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=libdir gstreamer-@GST_API_VERSION@` \
++ --library-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=libdir gstreamer-base-@GST_API_VERSION@` \
+ --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)
+ $(INTROSPECTION_COMPILER) \
+ --includedir=$(srcdir) \
+ --includedir=$(builddir) \
+- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
++ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
+ --includedir="$(top_builddir)/gst-libs/gst/tag/" \
+ --includedir="$(top_builddir)/gst-libs/gst/video/" \
+ --includedir="$(top_builddir)/gst-libs/gst/audio/" \
+diff --git a/gst-libs/gst/riff/Makefile.am b/gst-libs/gst/riff/Makefile.am
+index 3bd8fc0..0a115cc 100644
+--- a/gst-libs/gst/riff/Makefile.am
++++ b/gst-libs/gst/riff/Makefile.am
+@@ -41,8 +41,8 @@ libgstriff_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS)
+ # --c-include "gst/riff/riff.h" \
+ # --add-include-path=$(builddir)/../tag \
+ # --add-include-path=$(builddir)/../audio \
+-# --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+-# --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
++# --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++# --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
+ # --library=libgstriff-@GST_API_VERSION@.la \
+ # --include=GstAudio-@GST_API_VERSION@ \
+ # --include=GstTag-@GST_API_VERSION@ \
+@@ -73,8 +73,8 @@ libgstriff_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS)
+ # --includedir=$(builddir) \
+ # --includedir=$(builddir)/../tag \
+ # --includedir=$(builddir)/../audio \
+-# --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+-# --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
++# --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++# --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
+ # $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
+ #
+ #CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA)
+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
+ --c-include "gst/rtp/rtp.h" \
+ -I$(top_builddir)/gst-libs \
+ -I$(top_srcdir)/gst-libs \
+- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
++ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
+ --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)
+ $(INTROSPECTION_COMPILER) \
+ --includedir=$(srcdir) \
+ --includedir=$(builddir) \
+- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
++ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
+ $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
+
+ CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
+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
+ -I$(top_builddir)/gst-libs \
+ -I$(top_srcdir)/gst-libs \
+ --add-include-path=$(builddir)/../sdp \
+- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+ --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)
+ --includedir=$(srcdir) \
+ --includedir=$(builddir) \
+ --includedir=$(builddir)/../sdp \
+- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+ $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
+
+ CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
+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
+ --warn-all \
+ --c-include "gst/sdp/sdp.h" \
+ -I$(top_srcdir)/gst-libs \
+- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`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@ \
+ --libtool="$(LIBTOOL)" \
+@@ -52,7 +52,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+ $(INTROSPECTION_COMPILER) \
+ --includedir=$(srcdir) \
+ --includedir=$(builddir) \
+- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+ $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
+
+ CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA)
+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
+ --c-include "gst/tag/tag.h" \
+ -I$(top_srcdir)/gst-libs \
+ -I$(top_builddir)/gst-libs \
+- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
++ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
+ --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)
+ $(INTROSPECTION_COMPILER) \
+ --includedir=$(srcdir) \
+ --includedir=$(builddir) \
+- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
++ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
+ $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
+
+ CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA)
+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
+ --c-include "gst/video/video.h" \
+ -I$(top_srcdir)/gst-libs \
+ -I$(top_builddir)/gst-libs \
+- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
++ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
+ --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)
+ $(INTROSPECTION_COMPILER) \
+ --includedir=$(srcdir) \
+ --includedir=$(builddir) \
+- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
++ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
+ $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
+
+ CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
+--
+2.6.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-riff-add-missing-include-directories-when-calling-in.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-riff-add-missing-include-directories-when-calling-in.patch
new file mode 100644
index 000000000..9b66f7f49
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-riff-add-missing-include-directories-when-calling-in.patch
@@ -0,0 +1,28 @@
+From 3c2c2d5dd08aa30ed0e8acd8566ec99412bb8209 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 26 Oct 2015 17:29:37 +0200
+Subject: [PATCH 3/4] riff: add missing include directories when calling
+ introspection scanner
+
+Upstream-Status: Pending [review on oe-core maillist]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ gst-libs/gst/riff/Makefile.am | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/gst-libs/gst/riff/Makefile.am b/gst-libs/gst/riff/Makefile.am
+index 0a115cc..5057a58 100644
+--- a/gst-libs/gst/riff/Makefile.am
++++ b/gst-libs/gst/riff/Makefile.am
+@@ -39,6 +39,8 @@ libgstriff_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS)
+ # --strip-prefix=Gst \
+ # --warn-all \
+ # --c-include "gst/riff/riff.h" \
++# -I$(top_srcdir)/gst-libs \
++# -I$(top_builddir)/gst-libs \
+ # --add-include-path=$(builddir)/../tag \
+ # --add-include-path=$(builddir)/../audio \
+ # --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+--
+2.6.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch
new file mode 100644
index 000000000..9fbebd570
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch
@@ -0,0 +1,225 @@
+From be6163cfa3a255493f9d75bad9541cbfe1723fee Mon Sep 17 00:00:00 2001
+From: Mingke Wang <mingke.wang@freescale.com>
+Date: Thu, 19 Mar 2015 14:17:10 +0800
+Subject: [PATCH 3/4] ssaparse: enhance SSA text lines parsing.
+
+some parser will pass in the original ssa text line which starts with "Dialog:"
+and there's are maybe multiple Dialog lines in one input buffer.
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=747496]
+
+Signed-off-by: Mingke Wang <mingke.wang@freescale.com>
+
+diff --git a/gst/subparse/gstssaparse.c b/gst/subparse/gstssaparse.c
+old mode 100644
+new mode 100755
+index 06ecef9..0ab5dce
+--- a/gst/subparse/gstssaparse.c
++++ b/gst/subparse/gstssaparse.c
+@@ -260,6 +260,7 @@ gst_ssa_parse_remove_override_codes (GstSsaParse * parse, gchar * txt)
+ * gst_ssa_parse_push_line:
+ * @parse: caller element
+ * @txt: text to push
++ * @size: text size need to be parse
+ * @start: timestamp for the buffer
+ * @duration: duration for the buffer
+ *
+@@ -269,27 +270,133 @@ gst_ssa_parse_remove_override_codes (GstSsaParse * parse, gchar * txt)
+ * Returns: result of the push of the created buffer
+ */
+ static GstFlowReturn
+-gst_ssa_parse_push_line (GstSsaParse * parse, gchar * txt,
++gst_ssa_parse_push_line (GstSsaParse * parse, gchar * txt, gint size,
+ GstClockTime start, GstClockTime duration)
+ {
+ GstFlowReturn ret;
+ GstBuffer *buf;
+- gchar *t, *escaped;
++ gchar *t, *text, *p, *escaped, *p_start, *p_end;
+ gint num, i, len;
++ GstClockTime start_time = G_MAXUINT64, end_time = 0;
+
+- num = atoi (txt);
+- GST_LOG_OBJECT (parse, "Parsing line #%d at %" GST_TIME_FORMAT,
+- num, GST_TIME_ARGS (start));
+-
+- /* skip all non-text fields before the actual text */
++ p = text = g_malloc(size + 1);
++ *p = '\0';
+ t = txt;
+- for (i = 0; i < 8; ++i) {
+- t = strchr (t, ',');
++
++ /* there are may have multiple dialogue lines at a time */
++ while (*t) {
++ /* ignore leading white space characters */
++ while (isspace(*t))
++ t++;
++
++ /* ignore Format: and Style: lines */
++ if (strncmp(t, "Format:", 7) == 0 || strncmp(t, "Style:", 6) == 0) {
++ while (*t != '\0' && *t != '\n') {
++ t++;
++ }
++ }
++
++ if (*t == '\0')
++ break;
++
++ /* continue with next line */
++ if (*t == '\n') {
++ t++;
++ continue;
++ }
++
++ if(strncmp(t, "Dialogue:", 9) != 0) {
++ /* not started with "Dialogue:", it must be a line trimmed by demuxer */
++ num = atoi (t);
++ GST_LOG_OBJECT (parse, "Parsing line #%d at %" GST_TIME_FORMAT,
++ num, GST_TIME_ARGS (start));
++
++ /* skip all non-text fields before the actual text */
++ for (i = 0; i < 8; ++i) {
++ t = strchr (t, ',');
++ if (t == NULL)
++ break;
++ ++t;
++ }
++ } else {
++ /* started with "Dialogue:", update timestamp and duration */
++ /* time format are like Dialog:Mark,0:00:01.02,0:00:03.04,xx,xxx,... */
++ guint hour, min, sec, msec, len;
++ GstClockTime tmp;
++ gchar t_str[12] = {0};
++
++ /* find the first ',' */
++ p_start = strchr (t, ',');
++ if (p_start)
++ p_end = strchr (++p_start, ',');
++
++ if (p_start && p_end) {
++ /* copy text between first ',' and second ',' */
++ strncpy(t_str, p_start, p_end - p_start);
++ if (sscanf (t_str, "%u:%u:%u.%u", &hour, &min, &sec, &msec) == 4) {
++ tmp = ((hour*3600) + (min*60) + sec) * GST_SECOND + msec*GST_MSECOND;
++ GST_DEBUG_OBJECT (parse, "Get start time:%02d:%02d:%02d:%03d\n",
++ hour, min, sec, msec);
++ if (start_time > tmp)
++ start_time = tmp;
++ } else {
++ GST_WARNING_OBJECT (parse,
++ "failed to parse ssa start timestamp string :%s", t_str);
++ }
++
++ p_start = p_end;
++ p_end = strchr (++p_start, ',');
++ if (p_end) {
++ /* copy text between second ',' and third ',' */
++ strncpy(t_str, p_start, p_end - p_start);
++ if (sscanf (t_str, "%u:%u:%u.%u", &hour, &min, &sec, &msec) == 4) {
++ tmp = ((hour*3600) + (min*60) + sec)*GST_SECOND + msec*GST_MSECOND;
++ GST_DEBUG_OBJECT(parse, "Get end time:%02d:%02d:%02d:%03d\n",
++ hour, min, sec, msec);
++ if (end_time < tmp)
++ end_time = tmp;
++ } else {
++ GST_WARNING_OBJECT (parse,
++ "failed to parse ssa end timestamp string :%s", t_str);
++ }
++ }
++ }
++
++ /* now skip all non-text fields before the actual text */
++ for (i = 0; i <= 8; ++i) {
++ t = strchr (t, ',');
++ if (t == NULL)
++ break;
++ ++t;
++ }
++ }
++
++ /* line end before expected number of ',', not a Dialogue line */
+ if (t == NULL)
+- return GST_FLOW_ERROR;
+- ++t;
++ break;
++
++ /* if not the first line, and the last character of previous line is '\0',
++ * then replace it with '\N' */
++ if (p != text && *p == '\0') {
++ *p++ = '\\';
++ *p++ = 'N';
++ }
++
++ /* copy all actual text of this line */
++ while ((*t != '\0') && (*t != '\n'))
++ *p++ = *t++;
++
++ /* add a terminator at the end */
++ *p = '\0';
++ }
++
++ /* not valid text found in this buffer return OK to let caller unref buffer */
++ if (strlen(text) <= 0) {
++ GST_WARNING_OBJECT (parse, "Not valid text found in this buffer\n");
++ return GST_FLOW_ERROR;
+ }
+
++ t = text;
+ GST_LOG_OBJECT (parse, "Text : %s", t);
+
+ if (gst_ssa_parse_remove_override_codes (parse, t)) {
+@@ -307,13 +414,22 @@ gst_ssa_parse_push_line (GstSsaParse * parse, gchar * txt,
+ gst_buffer_fill (buf, 0, escaped, len + 1);
+ gst_buffer_set_size (buf, len);
+ g_free (escaped);
++ g_free(t);
++
++ if (start_time != G_MAXUINT64)
++ GST_BUFFER_TIMESTAMP (buf) = start_time;
++ else
++ GST_BUFFER_TIMESTAMP (buf) = start;
+
+- GST_BUFFER_TIMESTAMP (buf) = start;
+- GST_BUFFER_DURATION (buf) = duration;
++ if (end_time > start_time)
++ GST_BUFFER_DURATION (buf) = end_time - start_time;
++ else
++ GST_BUFFER_DURATION (buf) = duration;
+
+ GST_LOG_OBJECT (parse, "Pushing buffer with timestamp %" GST_TIME_FORMAT
+- " and duration %" GST_TIME_FORMAT, GST_TIME_ARGS (start),
+- GST_TIME_ARGS (duration));
++ " and duration %" GST_TIME_FORMAT,
++ GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)),
++ GST_TIME_ARGS (GST_BUFFER_DURATION (buf)));
+
+ ret = gst_pad_push (parse->srcpad, buf);
+
+@@ -333,6 +449,7 @@ gst_ssa_parse_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buf)
+ GstClockTime ts;
+ gchar *txt;
+ GstMapInfo map;
++ gint size;
+
+ if (G_UNLIKELY (!parse->framed))
+ goto not_framed;
+@@ -350,13 +467,14 @@ gst_ssa_parse_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buf)
+ /* make double-sure it's 0-terminated and all */
+ gst_buffer_map (buf, &map, GST_MAP_READ);
+ txt = g_strndup ((gchar *) map.data, map.size);
++ size = map.size;
+ gst_buffer_unmap (buf, &map);
+
+ if (txt == NULL)
+ goto empty_text;
+
+ ts = GST_BUFFER_TIMESTAMP (buf);
+- ret = gst_ssa_parse_push_line (parse, txt, ts, GST_BUFFER_DURATION (buf));
++ ret = gst_ssa_parse_push_line (parse, txt, size, ts, GST_BUFFER_DURATION (buf));
+
+ if (ret != GST_FLOW_OK && GST_CLOCK_TIME_IS_VALID (ts)) {
+ GstSegment segment;
+--
+1.7.9.5
+
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
new file mode 100644
index 000000000..42d99c1db
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch
@@ -0,0 +1,27 @@
+From 4330915d88dc4dd46eb4c28d756482b767c2747f Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 26 Oct 2015 17:30:14 +0200
+Subject: [PATCH 4/4] rtsp: drop incorrect reference to gstreamer-sdp in
+ Makefile.am
+
+Upstream-Status: Pending [review on oe-core maillist]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ gst-libs/gst/rtsp/Makefile.am | 1 -
+ 1 file changed, 1 deletion(-)
+
+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
+ --libtool="$(LIBTOOL)" \
+ --pkg gio-2.0 \
+ --pkg gstreamer-@GST_API_VERSION@ \
+- --pkg gstreamer-sdp-@GST_API_VERSION@ \
+ --pkg-export gstreamer-rtsp-@GST_API_VERSION@ \
+ --add-init-section="$(INTROSPECTION_INIT)" \
+ --output $@ \
+--
+2.6.2
+
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
new file mode 100644
index 000000000..7813915d8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch
@@ -0,0 +1,69 @@
+From ed09c8fd2c9c2b5384b72cc70af3728be6694e64 Mon Sep 17 00:00:00 2001
+From: Mingke Wang <mingke.wang@freescale.com>
+Date: Thu, 19 Mar 2015 14:20:26 +0800
+Subject: [PATCH 4/4] subparse: set need_segment after sink pad received
+ GST_EVENT_SEGMENT
+
+subparse works in push mode, chain funciton will be called once
+up stream element finished the seeking and flushing.
+if set need_segment flag in src pad event handler, the segment
+event will be pushed earlier, result in the subtitle text will
+be send out to down stream from the beginning.
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=747498]
+
+Signed-off-by: Mingke Wang <mingke.wang@freescale.com>
+
+diff --git a/gst/subparse/gstsubparse.c b/gst/subparse/gstsubparse.c
+old mode 100644
+new mode 100755
+index b565e93..7741ccc
+--- a/gst/subparse/gstsubparse.c
++++ b/gst/subparse/gstsubparse.c
+@@ -266,22 +266,20 @@ gst_sub_parse_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
+ goto beach;
+ }
+
++ /* Apply the seek to our segment */
++ gst_segment_do_seek (&self->segment, rate, format, flags,
++ start_type, start, stop_type, stop, &update);
++
++ GST_DEBUG_OBJECT (self, "segment after seek: %" GST_SEGMENT_FORMAT,
++ &self->segment);
++
+ /* Convert that seek to a seeking in bytes at position 0,
+ FIXME: could use an index */
+ ret = gst_pad_push_event (self->sinkpad,
+ gst_event_new_seek (rate, GST_FORMAT_BYTES, flags,
+ GST_SEEK_TYPE_SET, 0, GST_SEEK_TYPE_NONE, 0));
+
+- if (ret) {
+- /* Apply the seek to our segment */
+- gst_segment_do_seek (&self->segment, rate, format, flags,
+- start_type, start, stop_type, stop, &update);
+-
+- GST_DEBUG_OBJECT (self, "segment after seek: %" GST_SEGMENT_FORMAT,
+- &self->segment);
+-
+- self->need_segment = TRUE;
+- } else {
++ if (!ret) {
+ GST_WARNING_OBJECT (self, "seek to 0 bytes failed");
+ }
+
+@@ -1632,8 +1630,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);
+- GST_DEBUG_OBJECT (self, "newsegment (%s)",
+- gst_format_get_name (self->segment.format));
++ GST_DEBUG_OBJECT (self, "newsegment (%s) %" GST_SEGMENT_FORMAT,
++ gst_format_get_name (self->segment.format), &self->segment);
++
++ self->need_segment = TRUE;
+
+ /* if not time format, we'll either start with a 0 timestamp anyway or
+ * it's following a seek in which case we'll have saved the requested
+--
+1.7.9.5
+
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
new file mode 100755
index 000000000..096a6f4cb
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-convertframe-Support-video-crop-when-convert-frame.patch
@@ -0,0 +1,143 @@
+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
new file mode 100644
index 000000000..325671721
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch
@@ -0,0 +1,32 @@
+From 540e02c92c75e08b90326863dc787fa5cadf9da6 Mon Sep 17 00:00:00 2001
+From: Song Bing <b06498@freescale.com>
+Date: Fri, 13 Mar 2015 18:04:31 +0800
+Subject: [PATCH] encodebin: Need more buffers in output queue for better
+ performance
+
+Need more buffers in output queue for better performance
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=744191]
+
+Signed-off-by: Song Bing <b06498@freescale.com>
+---
+ gst/encoding/gstencodebin.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+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,
+ * 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);
+- g_object_set (sgroup->outqueue, "max-size-buffers", (guint32) 1,
+- "max-size-bytes", (guint32) 0, "max-size-time", (guint64) 0,
++ g_object_set (sgroup->outqueue, "max-size-time", (guint64) 0,
+ "silent", TRUE, NULL);
+
+ gst_bin_add (GST_BIN (ebin), sgroup->outqueue);
+--
+1.7.9.5
+
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
new file mode 100644
index 000000000..284abbe94
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/get-caps-from-src-pad-when-query-caps.patch
@@ -0,0 +1,44 @@
+From af0dac26f62aaceb4bf266720911953793e0fc5d Mon Sep 17 00:00:00 2001
+From: zhouming <b42586@freescale.com>
+Date: Wed, 14 May 2014 10:16:20 +0800
+Subject: [PATCH] ENGR00312515: get caps from src pad when query caps
+
+https://bugzilla.gnome.org/show_bug.cgi?id=728312
+
+Upstream-Status: Pending
+
+Signed-off-by: zhouming <b42586@freescale.com>
+---
+ gst-libs/gst/tag/gsttagdemux.c | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+ mode change 100644 => 100755 gst-libs/gst/tag/gsttagdemux.c
+
+diff --git a/gst-libs/gst/tag/gsttagdemux.c b/gst-libs/gst/tag/gsttagdemux.c
+old mode 100644
+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)
+ }
+ break;
+ }
++ case GST_QUERY_CAPS:
++ {
++
++ /* We can hijack caps query if we typefind already */
++ if (demux->priv->src_caps) {
++ gst_query_set_caps_result (query, demux->priv->src_caps);
++ res = TRUE;
++ } else {
++ res = gst_pad_query_default (pad, parent, query);
++ }
++ break;
++ }
++
+ default:
+ res = gst_pad_query_default (pad, parent, query);
+ break;
+--
+1.7.9.5
+
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
new file mode 100644
index 000000000..01e944ddd
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/make-gio_unix_2_0-dependency-configurable.patch
@@ -0,0 +1,47 @@
+From 10d2a977ee1d469f0bf9059bb2d0b55fd2eecbac Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Wed, 20 Jan 2016 13:00:00 -0800
+Subject: [PATCH] make gio_unix_2_0 dependency configurable
+
+Prior to 1.7.1, gst-plugins-base accepted a configure option to
+disable gio_unix_2_0, however it was implemented incorrectly using
+AG_GST_CHECK_FEATURE. That was fixed in 1.7.1 by making the
+dependency unconditional.
+
+ http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=aadefefba88afe4acbe64454650f24e7ce7c8d70
+
+To make builds deterministic, re-instate support for
+--disable-gio_unix_2_0, but implement it using the AC_ARG_ENABLE
+instead of AG_GST_CHECK_FEATURE.
+
+Upstream-Status: Pending
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ configure.ac | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+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)
+
+ dnl *** gio-unix-2.0 for tests/check/pipelines/tcp.c ***
++AC_ARG_ENABLE([gio_unix_2_0],
++ [AS_HELP_STRING([--disable-gio_unix_2_0],[disable use of gio_unix_2_0])],
++ [],
++ [enable_gio_unix_2_0=yes])
++
++if test "x${enable_gio_unix_2_0}" != "xno"; then
+ PKG_CHECK_MODULES(GIO_UNIX_2_0, gio-unix-2.0 >= 2.24,
+ HAVE_GIO_UNIX_2_0="yes",
+ HAVE_GIO_UNIX_2_0="no")
++fi
+ AM_CONDITIONAL(USE_GIO_UNIX_2_0, test "x$HAVE_GIO_UNIX_2_0" = "xyes")
+
+ dnl *** finalize CFLAGS, LDFLAGS, LIBS
+--
+1.9.1
+
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.6.3.bb
new file mode 100644
index 000000000..429dc9338
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.6.3.bb
@@ -0,0 +1,25 @@
+include gstreamer1.0-plugins-base.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=c54ce9345727175ff66d17b67ff51f58 \
+ file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \
+ file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607"
+
+# 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 \
+"
+
+SRC_URI[md5sum] = "3ddde0ad598ef69f58d6a2e87f8b460f"
+SRC_URI[sha256sum] = "b6154f8fdba4877e95efd94610ef0ada4f0171cd12eb829a3c3c97345d9c7a75"
+
+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
new file mode 100644
index 000000000..38a9fcc29
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb
@@ -0,0 +1,27 @@
+DEFAULT_PREFERENCE = "-1"
+
+include gstreamer1.0-plugins-base.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=c54ce9345727175ff66d17b67ff51f58 \
+ file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \
+ file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607"
+
+SRC_URI = " \
+ git://anongit.freedesktop.org/gstreamer/gst-plugins-base;name=base \
+ git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;name=common \
+ file://make-gio_unix_2_0-dependency-configurable.patch \
+"
+
+PV = "1.7.2+git${SRCPV}"
+
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
+
+SRCREV_base = "97e108bebaa58821f4566a74cbf0135e93407c01"
+SRCREV_common = "b64f03f6090245624608beb5d2fff335e23a01c0"
+SRCREV_FORMAT = "base"
+
+S = "${WORKDIR}/git"
+
+do_configure_prepend() {
+ ${S}/autogen.sh --noconfigure
+}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good.inc b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good.inc
new file mode 100644
index 000000000..4621bf894
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good.inc
@@ -0,0 +1,53 @@
+require gstreamer1.0-plugins.inc
+
+LICENSE = "GPLv2+ & LGPLv2.1+"
+
+DEPENDS += "gstreamer1.0-plugins-base libcap zlib bzip2"
+
+inherit gettext
+
+PACKAGECONFIG ??= " \
+ ${GSTREAMER_ORC} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
+ cairo flac gdk-pixbuf gudev jpeg libpng soup speex taglib v4l2 \
+"
+
+X11DEPENDS = "virtual/libx11 libsm libxrender libxfixes libxdamage"
+
+PACKAGECONFIG[cairo] = "--enable-cairo,--disable-cairo,cairo"
+PACKAGECONFIG[dv1394] = "--enable-dv1394,--disable-dv1394,libiec61883 libavc1394 libraw1394"
+PACKAGECONFIG[flac] = "--enable-flac,--disable-flac,flac"
+PACKAGECONFIG[gdk-pixbuf] = "--enable-gdk_pixbuf,--disable-gdk_pixbuf,gdk-pixbuf"
+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[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[vpx] = "--enable-vpx,--disable-vpx,libvpx"
+PACKAGECONFIG[wavpack] = "--enable-wavpack,--disable-wavpack,wavpack"
+PACKAGECONFIG[x11] = "--enable-x,--disable-x,${X11DEPENDS}"
+
+EXTRA_OECONF += " \
+ --enable-bz2 \
+ --enable-oss \
+ --enable-zlib \
+ --disable-aalib \
+ --disable-aalibtest \
+ --disable-directsound \
+ --disable-libcaca \
+ --disable-libdv \
+ --disable-oss4 \
+ --disable-osx_audio \
+ --disable-osx_video \
+ --disable-shout2 \
+ --disable-sunaudio \
+ --disable-waveform \
+"
+
+FILES_${PN}-equalizer += "${datadir}/gstreamer-1.0/presets/*.prs"
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
new file mode 100755
index 000000000..d1973d439
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch
@@ -0,0 +1,62 @@
+From c782a30482908a4b4dd9cd4abff9f9bc4016698f Mon Sep 17 00:00:00 2001
+From: Song Bing <b06498@freescale.com>
+Date: Tue, 5 Aug 2014 14:40:46 +0800
+Subject: [PATCH] gstrtpmp4gpay: set dafault value for MPEG4 without codec
+ data in caps.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=734263
+
+Upstream-Status: Submitted
+
+Signed-off-by: Song Bing <b06498@freescale.com>
+---
+ gst/rtp/gstrtpmp4gpay.c | 19 ++++++++++++++++++-
+ 1 file changed, 18 insertions(+), 1 deletion(-)
+
+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)
+ const GValue *codec_data;
+ const gchar *media_type = NULL;
+ gboolean res;
++ const gchar *name;
+
+ rtpmp4gpay = GST_RTP_MP4G_PAY (payload);
+
+@@ -400,7 +401,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;
+- const gchar *name;
+
+ 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)
+
+ rtpmp4gpay->config = gst_buffer_copy (buffer);
+ }
++ } else {
++ name = gst_structure_get_name (structure);
++
++ if (!strcmp (name, "video/mpeg")) {
++ rtpmp4gpay->profile = g_strdup ("1");
++
++ /* fixed rate */
++ rtpmp4gpay->rate = 90000;
++ /* video stream type */
++ rtpmp4gpay->streamtype = "4";
++ /* no params for video */
++ rtpmp4gpay->params = NULL;
++ /* mode */
++ rtpmp4gpay->mode = "generic";
++
++ media_type = "video";
++ }
+ }
+ if (media_type == NULL)
+ goto config_failed;
+--
+1.7.9.5
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/avoid-including-sys-poll.h-directly.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/avoid-including-sys-poll.h-directly.patch
new file mode 100644
index 000000000..c7f3630ec
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/avoid-including-sys-poll.h-directly.patch
@@ -0,0 +1,44 @@
+From 4bfe2c8570a4a7080ec662504882969054d8a072 Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Wed, 3 Feb 2016 18:12:38 -0800
+Subject: [PATCH] avoid including <sys/poll.h> directly
+
+musl libc generates warnings if <sys/poll.h> is included directly.
+
+Upstream-Status: Pending
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ ext/raw1394/gstdv1394src.c | 2 +-
+ ext/raw1394/gsthdv1394src.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/ext/raw1394/gstdv1394src.c b/ext/raw1394/gstdv1394src.c
+index dbc7607..3c42b41 100644
+--- a/ext/raw1394/gstdv1394src.c
++++ b/ext/raw1394/gstdv1394src.c
+@@ -37,7 +37,7 @@
+ #include "config.h"
+ #endif
+ #include <unistd.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <sys/socket.h>
+ #include <errno.h>
+ #include <fcntl.h>
+diff --git a/ext/raw1394/gsthdv1394src.c b/ext/raw1394/gsthdv1394src.c
+index 0b07a37..9785a15 100644
+--- a/ext/raw1394/gsthdv1394src.c
++++ b/ext/raw1394/gsthdv1394src.c
+@@ -36,7 +36,7 @@
+ #include "config.h"
+ #endif
+ #include <unistd.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <sys/socket.h>
+ #include <errno.h>
+ #include <fcntl.h>
+--
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/ensure-valid-sentinel-for-gst_structure_get.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/ensure-valid-sentinel-for-gst_structure_get.patch
new file mode 100644
index 000000000..bc7ac0b6a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/ensure-valid-sentinel-for-gst_structure_get.patch
@@ -0,0 +1,40 @@
+From 2169f2205c0205a220d826d7573e5a863bd36e0a Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Tue, 9 Feb 2016 14:00:00 -0800
+Subject: [PATCH] ensure valid sentinal for gst_structure_get()
+
+gst_structure_get() is declared with G_GNUC_NULL_TERMINATED, ie
+__attribute__((__sentinel__)), which means gcc will generate a
+warning if the last parameter passed to the function is not NULL
+(where a valid NULL in this context is defined as zero with any
+pointer type).
+
+The C code callers to gst_structure_get() within gst-plugins-good
+use the C NULL definition (ie ((void*)0)), which is a valid sentinel.
+
+However gstid3v2mux.cc uses the C++ NULL definition (ie 0L), which
+is not a valid sentinel without an explicit cast to a pointer type.
+
+Upstream-Status: Pending
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ ext/taglib/gstid3v2mux.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ext/taglib/gstid3v2mux.cc b/ext/taglib/gstid3v2mux.cc
+index 8651e77..a87234f 100644
+--- a/ext/taglib/gstid3v2mux.cc
++++ b/ext/taglib/gstid3v2mux.cc
+@@ -465,7 +465,7 @@ add_image_tag (ID3v2::Tag * id3v2tag, const GstTagList * list,
+
+ if (info_struct) {
+ if (gst_structure_get (info_struct, "image-type",
+- GST_TYPE_TAG_IMAGE_TYPE, &image_type, NULL)) {
++ GST_TYPE_TAG_IMAGE_TYPE, &image_type, (void *) NULL)) {
+ if (image_type > 0 && image_type <= 18) {
+ image_type += 2;
+ } else {
+--
+1.9.1
+
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.6.3.bb
new file mode 100644
index 000000000..0b4f43690
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.6.3.bb
@@ -0,0 +1,15 @@
+include gstreamer1.0-plugins-good.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
+ file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607 \
+ file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe"
+
+SRC_URI = " \
+ 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 \
+"
+
+SRC_URI[md5sum] = "a1958df7aa498b42793e2f2048673815"
+SRC_URI[sha256sum] = "24b19db70b2a83461ebddfe20033db432dadfdb5d4b54ffb1dfa0d830134a177"
+
+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
new file mode 100644
index 000000000..9cadc9afc
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb
@@ -0,0 +1,28 @@
+DEFAULT_PREFERENCE = "-1"
+
+include gstreamer1.0-plugins-good.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
+ file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607 \
+ file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe"
+
+SRC_URI = " \
+ git://anongit.freedesktop.org/gstreamer/gst-plugins-good;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 \
+"
+
+PV = "1.7.2+git${SRCPV}"
+
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
+
+SRCREV_base = "1b6fdce67c15d59957e395b1957aa625322092d4"
+SRCREV_common = "b64f03f6090245624608beb5d2fff335e23a01c0"
+SRCREV_FORMAT = "base"
+
+S = "${WORKDIR}/git"
+
+do_configure_prepend() {
+ ${S}/autogen.sh --noconfigure
+}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly.inc b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly.inc
new file mode 100644
index 000000000..aff223072
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly.inc
@@ -0,0 +1,31 @@
+require gstreamer1.0-plugins.inc
+
+LICENSE = "GPLv2+ & LGPLv2.1+ & LGPLv2+"
+LICENSE_FLAGS = "commercial"
+
+DEPENDS += "gstreamer1.0-plugins-base libid3tag"
+
+inherit gettext
+
+PACKAGECONFIG ??= " \
+ ${GSTREAMER_ORC} \
+ a52dec lame mad mpeg2dec \
+"
+
+PACKAGECONFIG[a52dec] = "--enable-a52dec,--disable-a52dec,liba52"
+PACKAGECONFIG[amrnb] = "--enable-amrnb,--disable-amrnb,opencore-amr"
+PACKAGECONFIG[amrwb] = "--enable-amrwb,--disable-amrwb,opencore-amr"
+PACKAGECONFIG[cdio] = "--enable-cdio,--disable-cdio,libcdio"
+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[x264] = "--enable-x264,--disable-x264,x264"
+
+EXTRA_OECONF += " \
+ --disable-sidplay \
+ --disable-twolame \
+"
+
+FILES_${PN}-amrnb += "${datadir}/gstreamer-1.0/presets/GstAmrnbEnc.prs"
+FILES_${PN}-x264 += "${datadir}/gstreamer-1.0/presets/GstX264Enc.prs"
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.6.3.bb
new file mode 100644
index 000000000..7edfb81d2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.6.3.bb
@@ -0,0 +1,13 @@
+include gstreamer1.0-plugins-ugly.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
+ file://tests/check/elements/xingmux.c;beginline=1;endline=21;md5=4c771b8af188724855cb99cadd390068"
+
+SRC_URI = " \
+ http://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-${PV}.tar.xz \
+"
+
+SRC_URI[md5sum] = "dbd92afb3816cbfa90ab1f197144a2e2"
+SRC_URI[sha256sum] = "2fecf7b7c7882f8f62f1900048f4013f98c214fb3d3303d8d812245bb41fd064"
+
+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
new file mode 100644
index 000000000..69afe4cfb
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb
@@ -0,0 +1,41 @@
+DEFAULT_PREFERENCE = "-1"
+
+include gstreamer1.0-plugins-ugly.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
+ file://tests/check/elements/xingmux.c;beginline=1;endline=21;md5=4c771b8af188724855cb99cadd390068"
+
+SRC_URI = " \
+ git://anongit.freedesktop.org/gstreamer/gst-plugins-ugly;name=base \
+ git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;name=common \
+"
+
+PV = "1.7.2+git${SRCPV}"
+
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
+
+SRCREV_base = "8bdb68edbc605e21314b608e7a39bdbaab7302b8"
+SRCREV_common = "b64f03f6090245624608beb5d2fff335e23a01c0"
+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
+}
+
+# In 1.7.2, the mpg123 plugin was moved from -bad to -ugly
+# https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=08d8aefcdaaf89ecb6dd53ec1e4f95cd42d01664
+# https://cgit.freedesktop.org/gstreamer/gst-plugins-ugly/commit/?id=43bd45ba991ef3247957ca37cdcb52f4b8c0acb1
+
+PACKAGESPLITFUNCS_append = " handle_mpg123_rename "
+
+python handle_mpg123_rename () {
+ d.setVar('RPROVIDES_gstreamer1.0-plugins-ugly-mpg123', 'gstreamer1.0-plugins-bad-mpg123')
+ d.setVar('RREPLACES_gstreamer1.0-plugins-ugly-mpg123', 'gstreamer1.0-plugins-bad-mpg123')
+ d.setVar('RCONFLICTS_gstreamer1.0-plugins-ugly-mpg123', 'gstreamer1.0-plugins-bad-mpg123')
+}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc
new file mode 100644
index 000000000..2dcec509d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc
@@ -0,0 +1,40 @@
+SUMMARY = "Plugins for the GStreamer multimedia framework 1.x"
+HOMEPAGE = "http://gstreamer.freedesktop.org/"
+BUGTRACKER = "https://bugzilla.gnome.org/enter_bug.cgi?product=Gstreamer"
+SECTION = "multimedia"
+
+DEPENDS = "gstreamer1.0 glib-2.0-native"
+
+inherit autotools pkgconfig upstream-version-is-even gobject-introspection
+
+acpaths = "-I ${S}/common/m4 -I ${S}/m4"
+
+LIBV = "1.0"
+require gst-plugins-package.inc
+
+# Orc enables runtime JIT compilation of data processing routines from Orc
+# bytecode to SIMD instructions for various architectures (currently SSE, MMX,
+# MIPS, Altivec and NEON are supported).
+
+GSTREAMER_ORC ?= "orc"
+
+PACKAGECONFIG[debug] = "--enable-debug,--disable-debug"
+PACKAGECONFIG[orc] = "--enable-orc,--disable-orc,orc orc-native"
+PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind"
+
+export ORCC = "${STAGING_DIR_NATIVE}${bindir}/orcc"
+
+EXTRA_OECONF = " \
+ --disable-examples \
+"
+
+SRC_URI_append = " file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch"
+
+delete_pkg_m4_file() {
+ # This m4 file is out of date and is missing PKG_CONFIG_SYSROOT_PATH tweaks which we need for introspection
+ rm "${S}/common/m4/pkg.m4" || true
+}
+
+do_configure[prefuncs] += " delete_pkg_m4_file"
+
+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
new file mode 100644
index 000000000..ae6d36477
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server.inc
@@ -0,0 +1,24 @@
+SUMMARY = "A library on top of GStreamer for building an RTSP server"
+HOMEPAGE = "http://cgit.freedesktop.org/gstreamer/gst-rtsp-server/"
+SECTION = "multimedia"
+LICENSE = "LGPLv2"
+
+DEPENDS = "gstreamer1.0 libcgroup gstreamer1.0-plugins-base"
+
+PNREAL = "gst-rtsp-server"
+
+SRC_URI = "http://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz \
+ file://0001-Don-t-hardcode-libtool-name-when-using-introspection.patch \
+ file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch"
+
+S = "${WORKDIR}/${PNREAL}-${PV}"
+
+inherit autotools pkgconfig upstream-version-is-even gobject-introspection
+
+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"
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server/0001-Don-t-hardcode-libtool-name-when-using-introspection.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server/0001-Don-t-hardcode-libtool-name-when-using-introspection.patch
new file mode 100644
index 000000000..89d6384ad
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server/0001-Don-t-hardcode-libtool-name-when-using-introspection.patch
@@ -0,0 +1,27 @@
+From 4a12569e5ae5be63cd92a9b178860026a99746b1 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 27 Oct 2015 16:55:45 +0200
+Subject: [PATCH] Don't hardcode libtool name when using introspection
+
+Upstream-Status: Pending [review on oe-core maillist]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ gst/rtsp-server/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gst/rtsp-server/Makefile.am b/gst/rtsp-server/Makefile.am
+index 4fcd366..c67f5ab 100644
+--- a/gst/rtsp-server/Makefile.am
++++ b/gst/rtsp-server/Makefile.am
+@@ -87,7 +87,7 @@ GstRtspServer-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtspserver-@
+ --include=Gst-@GST_API_VERSION@ \
+ --include=GstRtsp-@GST_API_VERSION@ \
+ --include=GstNet-@GST_API_VERSION@ \
+- --libtool="$(top_builddir)/libtool" \
++ --libtool="$(LIBTOOL)" \
+ --pkg gstreamer-@GST_API_VERSION@ \
+ --pkg gstreamer-rtsp-@GST_API_VERSION@ \
+ --pkg gstreamer-net-@GST_API_VERSION@ \
+--
+2.1.4
+
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
new file mode 100644
index 000000000..5bdae6cf9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.6.2.bb
@@ -0,0 +1,6 @@
+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.inc b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
new file mode 100644
index 000000000..10b4668e5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
@@ -0,0 +1,58 @@
+SUMMARY = "GStreamer 1.0 multimedia framework"
+DESCRIPTION = "GStreamer is a multimedia framework for encoding and decoding video and sound. \
+It supports a wide range of formats including mp3, ogg, avi, mpeg and quicktime."
+HOMEPAGE = "http://gstreamer.freedesktop.org/"
+BUGTRACKER = "https://bugzilla.gnome.org/enter_bug.cgi?product=Gstreamer"
+SECTION = "multimedia"
+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
+
+# 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)
+acpaths = "-I ${S}/common/m4 -I ${S}/m4"
+
+SRC_URI_append = " \
+ file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
+"
+
+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,"
+
+EXTRA_OECONF = " \
+ --disable-dependency-tracking \
+ --disable-docbook \
+ --disable-examples \
+ --disable-gtk-doc \
+"
+
+CACHED_CONFIGUREVARS += "ac_cv_header_valgrind_valgrind_h=no"
+
+# musl libc generates warnings if <sys/poll.h> is included directly
+CACHED_CONFIGUREVARS += "ac_cv_header_sys_poll_h=no"
+
+PACKAGES += "${PN}-bash-completion"
+
+FILES_${PN} += "${libdir}/gstreamer-1.0/*.so"
+FILES_${PN}-dev += "${libdir}/gstreamer-1.0/*.la ${libdir}/gstreamer-1.0/*.a ${libdir}/gstreamer-1.0/include"
+FILES_${PN}-bash-completion += "${datadir}/bash-completion/completions/ ${datadir}/bash-completion/helpers/gst*"
+
+RRECOMMENDS_${PN}_qemux86 += "kernel-module-snd-ens1370 kernel-module-snd-rawmidi"
+RRECOMMENDS_${PN}_qemux86-64 += "kernel-module-snd-ens1370 kernel-module-snd-rawmidi"
+
+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"
+
+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
new file mode 100644
index 000000000..94f5cc56e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-Fix-crash-with-gst-inspect.patch
@@ -0,0 +1,28 @@
+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.6.3.bb
new file mode 100644
index 000000000..ba1b83b08
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.6.3.bb
@@ -0,0 +1,14 @@
+include gstreamer1.0.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \
+ file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d"
+
+SRC_URI = " \
+ http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz \
+ file://0001-Fix-crash-with-gst-inspect.patch \
+"
+
+SRC_URI[md5sum] = "b4cdeb2b9cb20dd6ac022a4f417eae0d"
+SRC_URI[sha256sum] = "22f9568d67b87cf700a111f381144bd37cb93790a77e4e331db01fe854a37f24"
+
+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
new file mode 100644
index 000000000..7715bb202
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb
@@ -0,0 +1,30 @@
+DEFAULT_PREFERENCE = "-1"
+
+include gstreamer1.0.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \
+ file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d"
+
+SRC_URI = " \
+ git://anongit.freedesktop.org/gstreamer/gstreamer;name=base \
+ git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;name=common \
+"
+
+PV = "1.7.2+git${SRCPV}"
+
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
+
+SRCREV_base = "9e33bfa2c7a5f43da2c49b0a8235fd43cba9feaf"
+SRCREV_common = "b64f03f6090245624608beb5d2fff335e23a01c0"
+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
new file mode 100644
index 000000000..571a1d07a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/lame/lame/lame-3.99.5_fix_for_automake-1.12.x.patch
@@ -0,0 +1,59 @@
+Upstream-Status: Pending
+
+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>
+2012/07/13
+
+Index: lame-3.99.5/configure.in
+===================================================================
+--- lame-3.99.5.orig/configure.in
++++ lame-3.99.5/configure.in
+@@ -77,9 +77,6 @@ if test "${GCC}" = "yes"; then
+ AC_MSG_RESULT(${GCC_version})
+ fi
+
+-dnl more automake stuff
+-AM_C_PROTOTYPES
+-
+ AC_CHECK_HEADER(dmalloc.h)
+ if test "${ac_cv_header_dmalloc_h}" = "yes"; then
+ AM_WITH_DMALLOC
+Index: lame-3.99.5/doc/html/Makefile.am
+===================================================================
+--- lame-3.99.5.orig/doc/html/Makefile.am
++++ lame-3.99.5/doc/html/Makefile.am
+@@ -1,6 +1,6 @@
+ ## $Id: Makefile.am,v 1.7 2010/09/30 20:58:40 jaz001 Exp $
+
+-AUTOMAKE_OPTIONS = foreign ansi2knr
++AUTOMAKE_OPTIONS = foreign
+
+ docdir = $(datadir)/doc
+ pkgdocdir = $(docdir)/$(PACKAGE)
+Index: lame-3.99.5/libmp3lame/i386/Makefile.am
+===================================================================
+--- lame-3.99.5.orig/libmp3lame/i386/Makefile.am
++++ lame-3.99.5/libmp3lame/i386/Makefile.am
+@@ -1,6 +1,6 @@
+ ## $Id: Makefile.am,v 1.26 2011/04/04 09:42:34 aleidinger Exp $
+
+-AUTOMAKE_OPTIONS = foreign $(top_srcdir)/ansi2knr
++AUTOMAKE_OPTIONS = foreign
+
+ DEFS = @DEFS@ @CONFIG_DEFS@
+
+Index: lame-3.99.5/doc/man/Makefile.am
+===================================================================
+--- lame-3.99.5.orig/doc/man/Makefile.am
++++ lame-3.99.5/doc/man/Makefile.am
+@@ -1,6 +1,6 @@
+ ## $Id: Makefile.am,v 1.1 2000/10/22 11:39:44 aleidinger Exp $
+
+-AUTOMAKE_OPTIONS = foreign ansi2knr
++AUTOMAKE_OPTIONS = foreign
+
+ man_MANS = lame.1
+ EXTRA_DIST = ${man_MANS}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/lame/lame/no-gtk1.patch b/import-layers/yocto-poky/meta/recipes-multimedia/lame/lame/no-gtk1.patch
new file mode 100644
index 000000000..e88d7f1bb
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/lame/lame/no-gtk1.patch
@@ -0,0 +1,20 @@
+Upstream-Status: Inappropriate [configuration]
+
+# Acquired from OpenEmbedded
+
+--- lame-3.96.1/configure.in~no-gtk1.patch 2004-07-25 15:52:12.000000000 +0100
++++ lame-3.96.1/configure.in 2004-09-10 15:54:39.000000000 +0100
+@@ -363,7 +363,12 @@
+
+ dnl configure use of features
+
+-AM_PATH_GTK(1.2.0, HAVE_GTK="yes", HAVE_GTK="no")
++#AM_PATH_GTK(1.2.0, HAVE_GTK="yes", HAVE_GTK="no")
++HAVE_GTK="no"
++GTK_CFLAGS=""
++GTK_LIBS=""
++AC_SUBST(GTK_CFLAGS)
++AC_SUBST(GTK_LIBS)
+
+ dnl ElectricFence malloc debugging
+ AC_MSG_CHECKING(use of ElectricFence malloc debugging)
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/lame/lame_3.99.5.bb b/import-layers/yocto-poky/meta/recipes-multimedia/lame/lame_3.99.5.bb
new file mode 100644
index 000000000..047761153
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/lame/lame_3.99.5.bb
@@ -0,0 +1,30 @@
+SUMMARY = "High quality MP3 audio encoder"
+HOMEPAGE = "http://lame.sourceforge.net/"
+BUGTRACKER = "http://sourceforge.net/tracker/?group_id=290&atid=100290"
+SECTION = "console/utils"
+LICENSE = "LGPLv2+"
+LICENSE_FLAGS = "commercial"
+
+DEPENDS = "ncurses gettext-native"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=c46bda00ffbb0ba1dac22f8d087f54d9 \
+ file://include/lame.h;beginline=1;endline=20;md5=a2258182c593c398d15a48262130a92b \
+"
+PR = "r1"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/lame/lame-${PV}.tar.gz \
+ file://no-gtk1.patch \
+ file://lame-3.99.5_fix_for_automake-1.12.x.patch "
+
+SRC_URI[md5sum] = "84835b313d4a8b68f5349816d33e07ce"
+SRC_URI[sha256sum] = "24346b4158e4af3bd9f2e194bb23eb473c75fb7377011523353196b19b9a23ff"
+
+inherit autotools pkgconfig
+
+PACKAGES += "libmp3lame libmp3lame-dev"
+FILES_${PN} = "${bindir}/lame"
+FILES_libmp3lame = "${libdir}/libmp3lame.so.*"
+FILES_libmp3lame-dev = "${includedir} ${libdir}/*"
+FILES_${PN}-dev = ""
+
+CACHED_CONFIGUREVARS_append_x86 = " ac_cv_header_emmintrin_h=no ac_cv_header_xmmintrin_h=no"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/liba52/liba52/buildcleanup.patch b/import-layers/yocto-poky/meta/recipes-multimedia/liba52/liba52/buildcleanup.patch
new file mode 100644
index 000000000..5168100f3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/liba52/liba52/buildcleanup.patch
@@ -0,0 +1,89 @@
+It makes much more sense to control our own CFLAGS and avoiding fPIC breaks
+some arches too. Assume we know what we're doing and remove all the messing
+around.
+
+RP 23/2/10
+
+Upstream-Status: Inappropriate [configuration]
+
+Index: a52dec-0.7.4/configure.in
+===================================================================
+--- a52dec-0.7.4.orig/configure.in 2010-02-23 14:51:50.000000000 +0000
++++ a52dec-0.7.4/configure.in 2010-02-23 14:52:36.000000000 +0000
+@@ -14,62 +14,6 @@
+ AC_PROG_CC
+ AC_PROG_GCC_TRADITIONAL
+
+-if test x"$GCC" = x"yes"; then
+-
+- dnl GCC-specific flags - try to optimize them sometime
+- dnl -Wall -Werror moved to the end to not disturb the configure script
+-
+- dnl -O3
+- changequote(<<,>>)
+- OPT_CFLAGS=`echo "$CFLAGS"|sed "s/-O[0-9]*//g"`
+- changequote([,])
+- OPT_CFLAGS="$OPT_CFLAGS -O3"
+- AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS])
+-
+- dnl -fomit-frame-pointer
+- OPT_CFLAGS="$CFLAGS -fomit-frame-pointer"
+- AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS])
+-
+- dnl arch-specific flags
+- case "$host" in
+- i?86-* | k?-*)
+- case "$host" in
+- i386-*) OPT_CFLAGS="$CFLAGS -mcpu=i386";;
+- i486-*) OPT_CFLAGS="$CFLAGS -mcpu=i486";;
+- i586-*) OPT_CFLAGS="$CFLAGS -mcpu=pentium";;
+- i686-*) OPT_CFLAGS="$CFLAGS -mcpu=pentiumpro";;
+- k6-*) OPT_CFLAGS="$CFLAGS -mcpu=k6";;
+- esac
+- AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]);;
+- sparc-* | sparc64-*)
+- OPT_CFLAGS="$CFLAGS -mtune=ultrasparc"
+- AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]);;
+- mips-sgi-irix6.*) dnl do we need to be that specific ?
+- OPT_CFLAGS="$CFLAGS -mabi=64"
+- AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]);;
+- esac
+-elif test x"$CC" = x"tcc" -a x"`$CC -version 2>&1 | grep TenDRA`" != x""; then
+- dnl TenDRA portability checking compiler
+- TENDRA=yes
+- CFLAGS="-Xp -Yansi -f`pwd`/include/tendra.h -DELIDE_CODE"
+- enable_mlib=no
+- enable_oss=no
+- enable_solaris_audio=no
+-elif test x"$CC" = x"icc" -a x"`$CC -V 2>&1 | grep Intel`" != x""; then
+- dnl Intel C++ compiler
+- CFLAGS="-g -O3 -unroll -ip"
+-else
+- dnl non-gcc flags - we probably need exact configuration triplets here.
+- case "$host" in
+- mips-sgi-irix6.*)
+- OPT_CFLAGS="$CFLAGS -64"
+- AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]);;
+- sparc-sun-solaris*)
+- OPT_CFLAGS="$CFLAGS -xCC -fast -xO5"
+- AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]);;
+- esac
+-fi
+-
+ dnl Checks for libtool - this must be done after we set cflags
+ AC_DISABLE_SHARED
+ AC_LIBTOOL_WIN32_DLL
+Index: a52dec-0.7.4/liba52/configure.incl
+===================================================================
+--- a52dec-0.7.4.orig/liba52/configure.incl 2010-02-23 14:51:44.000000000 +0000
++++ a52dec-0.7.4/liba52/configure.incl 2010-02-23 14:51:59.000000000 +0000
+@@ -1,9 +1,6 @@
+ AC_SUBST([LIBA52_CFLAGS])
+ AC_SUBST([LIBA52_LIBS])
+
+-dnl avoid -fPIC when possible
+-LIBA52_CFLAGS="$LIBA52_CFLAGS -prefer-non-pic"
+-
+ AC_ARG_ENABLE([double],
+ [ --enable-double use double-precision samples])
+ if test x"$enable_double" = x"yes"; then
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/liba52/liba52_0.7.4.bb b/import-layers/yocto-poky/meta/recipes-multimedia/liba52/liba52_0.7.4.bb
new file mode 100644
index 000000000..8ff8889b6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/liba52/liba52_0.7.4.bb
@@ -0,0 +1,26 @@
+SUMMARY = "ATSC A/52 surround sound stream decoder"
+HOMEPAGE = "http://liba52.sourceforge.net/"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
+ file://include/a52.h;beginline=1;endline=12;md5=81152ceb3562bf20a60d1b6018175dd1"
+SECTION = "libs"
+PR = "r4"
+
+inherit autotools
+
+SRC_URI = "http://liba52.sourceforge.net/files/a52dec-${PV}.tar.gz \
+ file://buildcleanup.patch"
+
+SRC_URI[md5sum] = "caa9f5bc44232dc8aeea773fea56be80"
+SRC_URI[sha256sum] = "a21d724ab3b3933330194353687df82c475b5dfb997513eef4c25de6c865ec33"
+
+UPSTREAM_CHECK_URI = "http://liba52.sourceforge.net/downloads.html"
+
+S = "${WORKDIR}/a52dec-${PV}"
+
+EXTRA_OECONF = " --enable-shared "
+
+PACKAGES =+ "a52dec a52dec-doc"
+
+FILES_a52dec = " ${bindir}/* "
+FILES_a52dec-doc = " ${mandir}/man1/* "
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libid3tag/libid3tag/addpkgconfig.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libid3tag/libid3tag/addpkgconfig.patch
new file mode 100644
index 000000000..38d40c363
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libid3tag/libid3tag/addpkgconfig.patch
@@ -0,0 +1,43 @@
+Upstream-Status: Inappropriate [configuration]
+
+Index: libid3tag-0.15.1b/Makefile.am
+===================================================================
+--- libid3tag-0.15.1b.orig/Makefile.am 2009-07-29 09:29:20.000000000 +0100
++++ libid3tag-0.15.1b/Makefile.am 2009-07-29 09:29:47.000000000 +0100
+@@ -27,6 +27,9 @@
+ lib_LTLIBRARIES = libid3tag.la
+ include_HEADERS = id3tag.h
+
++pkgconfigdir = $(libdir)/pkgconfig
++pkgconfig_DATA = id3tag.pc
++
+ ## From the libtool documentation on library versioning:
+ ##
+ ## CURRENT
+Index: libid3tag-0.15.1b/configure.ac
+===================================================================
+--- libid3tag-0.15.1b.orig/configure.ac 2009-07-29 09:27:15.000000000 +0100
++++ libid3tag-0.15.1b/configure.ac 2009-07-29 09:27:45.000000000 +0100
+@@ -201,5 +201,5 @@
+ dnl AC_SUBST(LTLIBOBJS)
+
+ AC_CONFIG_FILES([Makefile msvc++/Makefile \
+- libid3tag.list])
++ libid3tag.list id3tag.pc])
+ AC_OUTPUT
+Index: libid3tag-0.15.1b/id3tag.pc.in
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ libid3tag-0.15.1b/id3tag.pc.in 2009-07-29 09:29:10.000000000 +0100
+@@ -0,0 +1,11 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: id3tag
++Description: ID3 tag reading library
++Requires:
++Version: @VERSION@
++Libs: -L${libdir} -lid3tag -lz
++Cflags: -I${includedir}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libid3tag/libid3tag/obsolete_automake_macros.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libid3tag/libid3tag/obsolete_automake_macros.patch
new file mode 100644
index 000000000..2845fb1d3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libid3tag/libid3tag/obsolete_automake_macros.patch
@@ -0,0 +1,15 @@
+Upstream-Status: Submitted [https://sourceforge.net/tracker/?func=detail&aid=3599280&group_id=12349&atid=112349]
+
+Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
+diff -Nurd libid3tag-0.15.1b/configure.ac libid3tag-0.15.1b/configure.ac
+--- libid3tag-0.15.1b/configure.ac 2004-01-24 01:22:46.000000000 +0200
++++ libid3tag-0.15.1b/configure.ac 2013-01-03 06:41:02.734835014 +0200
+@@ -28,7 +28,7 @@
+
+-AM_INIT_AUTOMAKE
++AM_INIT_AUTOMAKE([foreign])
+
+-AM_CONFIG_HEADER([config.h])
++AC_CONFIG_HEADERS([config.h])
+
+ dnl System type.
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb b/import-layers/yocto-poky/meta/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb
new file mode 100644
index 000000000..05a8a4763
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Library for interacting with ID3 tags in MP3 files"
+HOMEPAGE = "http://sourceforge.net/projects/mad/"
+BUGTRACKER = "http://sourceforge.net/tracker/?group_id=12349&atid=112349"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://COPYRIGHT;md5=5e6279efb87c26c6e5e7a68317a6a87a \
+ file://version.h;beginline=1;endline=8;md5=86ac68b67f054b7afde9e149bbc3fe63"
+SECTION = "libs"
+DEPENDS = "zlib gperf-native"
+PR = "r7"
+
+SRC_URI = "ftp://ftp.mars.org/pub/mpeg/libid3tag-${PV}.tar.gz \
+ file://addpkgconfig.patch \
+ file://obsolete_automake_macros.patch \
+"
+
+SRC_URI[md5sum] = "e5808ad997ba32c498803822078748c3"
+SRC_URI[sha256sum] = "63da4f6e7997278f8a3fef4c6a372d342f705051d1eeb6a46a86b03610e26151"
+
+S = "${WORKDIR}/libid3tag-${PV}"
+
+inherit autotools pkgconfig
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
new file mode 100644
index 000000000..b49dc8c98
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/add-pkgconfig.patch
@@ -0,0 +1,70 @@
+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
new file mode 100644
index 000000000..3e544248d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/automake-foreign.patch
@@ -0,0 +1,12 @@
+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
new file mode 100644
index 000000000..01c7aa3c8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/fix_for_mips_with_gcc-4.5.0.patch
@@ -0,0 +1,33 @@
+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
new file mode 100644
index 000000000..d5e6d206e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/no-force-mem.patch
@@ -0,0 +1,18 @@
+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
new file mode 100644
index 000000000..cc87d299e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/obsolete_automake_macros.patch
@@ -0,0 +1,14 @@
+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
new file mode 100644
index 000000000..d431abdaa
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad_0.15.1b.bb
@@ -0,0 +1,36 @@
+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/libogg/libogg_1.3.2.bb b/import-layers/yocto-poky/meta/recipes-multimedia/libogg/libogg_1.3.2.bb
new file mode 100644
index 000000000..0142e0f4f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libogg/libogg_1.3.2.bb
@@ -0,0 +1,17 @@
+SUMMARY = "Ogg bitstream and framing libary"
+DESCRIPTION = "libogg is the bitstream and framing library \
+for the Ogg project. It provides functions which are \
+necessary to codec libraries like libvorbis."
+HOMEPAGE = "http://xiph.org/"
+BUGTRACKER = "https://trac.xiph.org/newticket"
+SECTION = "libs"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=db1b7a668b2a6f47b2af88fb008ad555 \
+ file://include/ogg/ogg.h;beginline=1;endline=11;md5=eda812856f13a3b1326eb8f020cc3b0b"
+
+SRC_URI = "http://downloads.xiph.org/releases/ogg/${BP}.tar.xz"
+
+SRC_URI[md5sum] = "5c3a34309d8b98640827e5d0991a4015"
+SRC_URI[sha256sum] = "3f687ccdd5ac8b52d76328fbbfebc70c459a40ea891dbf3dccb74a210826e79b"
+
+inherit autotools pkgconfig
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libomxil/libomxil-0.9.3/configure-fix.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libomxil/libomxil-0.9.3/configure-fix.patch
new file mode 100644
index 000000000..876e80ef7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libomxil/libomxil-0.9.3/configure-fix.patch
@@ -0,0 +1,58 @@
+To enable --disable-Werror for libomxil to avoid some compilers which check code strictly.
+
+For example, at least the following errors happened to some compilers:
+
+1) OMX_INDEXTYPE in include/OMX_Index.h IS NOT OMX_INDEXVENDORTYPE in src/base/omx_base_component.h
+| i586-poky-linux-libtool: compile: i586-poky-linux-gcc -m32 -march=i586 --sysroot=/home/yocto-build5/poky/build/tmp/sysroots/qemux86 -DHAVE_Climinate-unused-debug-types -Wall -Werror -DCONFIG_DEBUG_LEVEL=0 -c OMXComponentRMExt.c -fPIC -DPIC -o .libs/libomxbase_la-OMXComponentRMExt.o
+| omx_base_component.c: In function 'omx_base_component_GetParameter':
+| omx_base_component.c:991:3: error: case value '2130706435' not in enumerated type 'OMX_INDEXTYPE' [-Werror=switch]
+| omx_base_component.c:918:3: error: case value '2130706436' not in enumerated type 'OMX_INDEXTYPE' [-Werror=switch]
+
+2)
+| i586-poky-linux-gcc -m32 -march=i586 --sysroot=/home/yocto-build5/poky/build/tmp/sysroots/qemux86 -DHAVE_CONFIG_H -I. -I.. -DOMXILCOMPOminate-unused-debug-types -Wall -Werror -DCONFIG_DEBUG_LEVEL=0 -c -o omxregister_bellagio-omxregister.o `test -f 'omxregister.c' || echo './'`o
+| omxregister.c: In function 'buildComponentsList':
+| omxregister.c:175:7: error: variable 'err' set but not used [-Werror=unused-but-set-variable]
+| cc1: all warnings being treated as errors
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Shane Wang <shane.wang@intel.com>
+
+diff -r 82d742d3ea90 configure.ac
+--- a/configure.ac Tue Dec 27 15:30:35 2011 +0800
++++ b/configure.ac Tue Dec 27 16:26:03 2011 +0800
+@@ -5,7 +5,7 @@
+ AC_PREREQ([2.59])
+
+ AC_CONFIG_HEADERS([config.h])
+-CFLAGS="${CFLAGS} -Wall -Werror"
++CFLAGS="${CFLAGS} -Wall"
+
+ ################################################################################
+ # Set the shared versioning info, according to section 6.3 of the libtool info #
+@@ -122,6 +122,14 @@
+ [with_android=$enableval],
+ [with_android=no])
+
++AC_ARG_ENABLE(
++ [Werror],
++ [AC_HELP_STRING(
++ [--disable-Werror],
++ [whether to diable treating gcc warnings as errors])],
++ [with_Werror=$enableval],
++ [with_Werror=yes])
++
+ ################################################################################
+ # Check for programs #
+ ################################################################################
+@@ -193,6 +201,10 @@
+ CFG_DEBUG_LEVEL=255
+ fi
+
++if test "x$with_Werror" = "xyes"; then
++ CFLAGS="${CFLAGS} -Werror"
++fi
++
+ AC_SUBST(CFG_DEBUG_LEVEL)
+ CFLAGS="${CFLAGS} -DCONFIG_DEBUG_LEVEL=$CFG_DEBUG_LEVEL"
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libomxil/libomxil-0.9.3/disable-so-versioning.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libomxil/libomxil-0.9.3/disable-so-versioning.patch
new file mode 100644
index 000000000..f408e4a62
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libomxil/libomxil-0.9.3/disable-so-versioning.patch
@@ -0,0 +1,36 @@
+Disable so versioning since they are really not a versioned shared lib.
+
+Upstream-Status: Submitted @ https://sourceforge.net/p/omxil/bugs/59/
+
+Signed-off-by: Drew Moseley <drew_moseley@mentor.com>
+
+diff -rub libomxil-bellagio-0.9.3-orig/src/components/audio_effects/Makefile.am libomxil-bellagio-0.9.3/src/components/audio_effects/Makefile.am
+--- libomxil-bellagio-0.9.3-orig/src/components/audio_effects/Makefile.am 2014-07-20 15:22:00.858425234 -0400
++++ libomxil-bellagio-0.9.3/src/components/audio_effects/Makefile.am 2014-07-20 15:25:42.687525225 -0400
+@@ -10,4 +10,5 @@
+ libomxaudio_effects_la_CFLAGS = -I$(top_srcdir)/include \
+ -I$(top_srcdir)/src \
+ -I$(top_srcdir)/src/base
++libomxaudio_effects_la_LDFLAGS = -avoid-version
+
+diff -rub libomxil-bellagio-0.9.3-orig/src/components/clocksrc/Makefile.am libomxil-bellagio-0.9.3/src/components/clocksrc/Makefile.am
+--- libomxil-bellagio-0.9.3-orig/src/components/clocksrc/Makefile.am 2014-07-20 15:22:00.858425234 -0400
++++ libomxil-bellagio-0.9.3/src/components/clocksrc/Makefile.am 2014-07-20 15:24:49.151259753 -0400
+@@ -10,4 +10,4 @@
+ -I$(top_srcdir)/include \
+ -I$(top_srcdir)/src \
+ -I$(top_srcdir)/src/base
+-
++libomxclocksrc_la_LDFLAGS = -avoid-version
+diff -rub libomxil-bellagio-0.9.3-orig/src/components/videoscheduler/Makefile.am libomxil-bellagio-0.9.3/src/components/videoscheduler/Makefile.am
+--- libomxil-bellagio-0.9.3-orig/src/components/videoscheduler/Makefile.am 2014-07-20 15:22:00.862425254 -0400
++++ libomxil-bellagio-0.9.3/src/components/videoscheduler/Makefile.am 2014-07-20 15:22:36.462601786 -0400
+@@ -6,7 +6,7 @@
+ library_entry_point.c
+
+ libomxvideosched_la_LIBADD = $(top_builddir)/src/libomxil-bellagio.la
+-libomxvideosched_la_LDFLAGS =
++libomxvideosched_la_LDFLAGS = -avoid-version
+ libomxvideosched_la_CFLAGS = -I$(top_srcdir)/include \
+ -I$(top_srcdir)/src \
+ -I$(top_srcdir)/src/base
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libomxil/libomxil-0.9.3/dynamicloader-linking.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libomxil/libomxil-0.9.3/dynamicloader-linking.patch
new file mode 100644
index 000000000..787953a99
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libomxil/libomxil-0.9.3/dynamicloader-linking.patch
@@ -0,0 +1,20 @@
+This patch fixes link issue when libomxdynamicloader.so is loaded :
+Missing symbol RM_Deinit.
+
+This patch comes from "http://pkgs.fedoraproject.org/cgit/libomxil-bellagio.git/commit/?h=f17&id=4996a95828943d345e51ded6876c3103653eecf8"
+
+Upstream-Status: Pending
+
+Signed-off-by: Sébastien Mennetrier <s.mennetrier@innotis.org>
+
+--- a/src/dynamic_loader/Makefile.am 2014-02-25 15:29:10.128549636 +0100
++++ b/src/dynamic_loader/Makefile.am 2014-02-25 15:30:15.756548808 +0100
+@@ -3,7 +3,7 @@
+ omxdynamicloader_LTLIBRARIES = libomxdynamicloader.la
+ libomxdynamicloader_la_SOURCES = ste_dynamic_component_loader.c ste_dynamic_component_loader.h
+
+-libomxdynamicloader_la_LDFLAGS =
++libomxdynamicloader_la_LDFLAGS = -lomxil-bellagio -L$(top_builddir)/src/.libs
+ libomxdynamicloader_la_CFLAGS = -I$(top_srcdir)/include \
+ -I$(top_srcdir)/src \
+ -I$(top_srcdir)/src/base \
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libomxil/libomxil-0.9.3/makefile-docdir-fix.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libomxil/libomxil-0.9.3/makefile-docdir-fix.patch
new file mode 100644
index 000000000..dbe8c41f7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libomxil/libomxil-0.9.3/makefile-docdir-fix.patch
@@ -0,0 +1,19 @@
+This patch is to remove DESTDIR in docdir.
+Otherwise, when users install by running `make install DESTDIR=/alternate/directory' specified in the file INSTALL, the doc will go into /alternate/directory/alternate/directory, which is not expected.
+
+Upstream-Status: Pending
+
+Signed-off-by: Shane Wang <shane.wang@intel.com>
+
+diff -r 30b597e4e70d Makefile.am
+--- a/Makefile.am Wed Dec 28 15:38:35 2011 +0800
++++ b/Makefile.am Wed Dec 28 15:39:25 2011 +0800
+@@ -7,7 +7,7 @@
+ pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = libomxil-bellagio.pc
+
+-docdir = $(DESTDIR)$(prefix)/share/doc/@PACKAGE@
++docdir = $(prefix)/share/doc/@PACKAGE@
+ doc_DATA = README \
+ ChangeLog \
+ TODO
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libomxil/libomxil-0.9.3/parallel-make.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libomxil/libomxil-0.9.3/parallel-make.patch
new file mode 100644
index 000000000..483ca1328
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libomxil/libomxil-0.9.3/parallel-make.patch
@@ -0,0 +1,18 @@
+This patch is to make libomxil Makefile support "make -jN".
+The omxregister_bellagio stuffs depend on libomxil_bellagio library.
+
+Upstream-Status: Pending
+
+Signed-off-by: Shane Wang <shane.wang@intel.com>
+
+diff -r f59d077d3dd5 Makefile.am
+--- a/src/Makefile.am Wed Dec 28 10:54:36 2011 +0800
++++ b/src/Makefile.am Wed Dec 28 10:55:46 2011 +0800
+@@ -7,6 +7,7 @@
+ omxregister_bellagio_SOURCES = omxregister.c common.c common.h
+ omxregister_bellagio_CFLAGS = -DOMXILCOMPONENTSPATH=\"$(plugindir)/\" \
+ -I$(top_srcdir)/include
++omxregister_bellagio_LDADD = $(lib_LTLIBRARIES)
+ omxregister_bellagio_LDFLAGS = -lomxil-bellagio -L$(builddir)
+
+ lib_LTLIBRARIES = libomxil-bellagio.la
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libomxil/libomxil_0.9.3.bb b/import-layers/yocto-poky/meta/recipes-multimedia/libomxil/libomxil_0.9.3.bb
new file mode 100644
index 000000000..d83eb4570
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libomxil/libomxil_0.9.3.bb
@@ -0,0 +1,37 @@
+SUMMARY = "Bellagio OpenMAX Integration Layer (IL)"
+DESCRIPTION = "Bellagio is an opensource implementation of the Khronos OpenMAX \
+ Integration Layer API to access multimedia components."
+HOMEPAGE = "http://omxil.sourceforge.net/"
+
+LICENSE = "LGPLv2.1+"
+LICENSE_FLAGS = "commercial"
+LIC_FILES_CHKSUM = "file://COPYING;md5=ae6f0f4dbc7ac193b50f323a6ae191cb \
+ file://src/omxcore.h;beginline=1;endline=27;md5=806b1e5566c06486fe8e42b461e03a90"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/omxil/libomxil-bellagio-${PV}.tar.gz \
+ file://configure-fix.patch \
+ file://parallel-make.patch \
+ file://makefile-docdir-fix.patch \
+ file://dynamicloader-linking.patch \
+ file://disable-so-versioning.patch"
+
+SRC_URI[md5sum] = "a1de827fdb75c02c84e55f740ca27cb8"
+SRC_URI[sha256sum] = "593c0729c8ef8c1467b3bfefcf355ec19a46dd92e31bfc280e17d96b0934d74c"
+
+S = "${WORKDIR}/${BPN}-bellagio-${PV}"
+
+inherit autotools
+
+EXTRA_OECONF += "--disable-doc --disable-Werror"
+
+#
+# The .so files under ${libdir}/bellagio are not intended to be versioned and symlinked.
+# Make sure they get packaged in the main package.
+#
+FILES_${PN} += "${libdir}/bellagio/*.so \
+ ${libdir}/omxloaders/*${SOLIBS}"
+FILES_${PN}-staticdev += "${libdir}/bellagio/*.a \
+ ${libdir}/omxloaders/*.a"
+FILES_${PN}-dev += "${libdir}/bellagio/*.la \
+ ${libdir}/omxloaders/*.la \
+ ${libdir}/omxloaders/*${SOLIBSDEV}"
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.21.bb
new file mode 100644
index 000000000..58cef1ff3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libpng/libpng_1.6.21.bb
@@ -0,0 +1,25 @@
+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"
+DEPENDS = "zlib"
+
+SRC_URI = "${GENTOO_MIRROR}/libpng-${PV}.tar.xz \
+ "
+SRC_URI[md5sum] = "3bacb4728f6694a64ad9052769d6a4ce"
+SRC_URI[sha256sum] = "6c8f1849eb9264219bf5d703601e5abe92a58651ecae927a03d1a1aa15ee2083"
+
+BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config"
+
+inherit autotools binconfig-disabled pkgconfig
+
+# Work around missing symbols
+EXTRA_OECONF_append_class-target = " ${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off" ,d)}"
+
+PACKAGES =+ "${PN}-tools"
+
+FILES_${PN}-tools = "${bindir}/png-fix-itxt ${bindir}/pngfix"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.1.8.bb b/import-layers/yocto-poky/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.1.8.bb
new file mode 100644
index 000000000..1c3768196
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.1.8.bb
@@ -0,0 +1,21 @@
+SUMMARY = "Audio Sample Rate Conversion library"
+HOMEPAGE = "http://www.mega-nerd.com/SRC/"
+SECTION = "libs"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://src/samplerate.c;beginline=1;endline=17;md5=d0807c35fc906466d24a50463534815a"
+DEPENDS = "flac libsndfile1"
+PR = "r1"
+
+SRC_URI = "http://www.mega-nerd.com/SRC/libsamplerate-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "1c7fb25191b4e6e3628d198a66a84f47"
+SRC_URI[sha256sum] = "93b54bdf46d5e6d2354b7034395fe329c222a966790de34520702bb9642f1c06"
+
+UPSTREAM_CHECK_URI = "http://www.mega-nerd.com/SRC/download.html"
+
+S = "${WORKDIR}/libsamplerate-${PV}"
+
+inherit autotools pkgconfig
+
+PACKAGECONFIG[fftw] = ",--disable-fftw,fftw"
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.26.bb
new file mode 100644
index 000000000..80435d4b5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.26.bb
@@ -0,0 +1,26 @@
+SUMMARY = "Audio format Conversion library"
+HOMEPAGE = "http://www.mega-nerd.com/libsndfile"
+AUTHOR = "Erik de Castro Lopo"
+DEPENDS = "flac libogg libvorbis sqlite3"
+SECTION = "libs/multimedia"
+LICENSE = "LGPLv2.1"
+
+SRC_URI = "http://www.mega-nerd.com/libsndfile/files/libsndfile-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "ec810a0c60c08772a8a5552704b63393"
+SRC_URI[sha256sum] = "cd6520ec763d1a45573885ecb1f8e4e42505ac12180268482a44b28484a25092"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=e77fe93202736b47c07035910f47974a"
+
+S = "${WORKDIR}/libsndfile-${PV}"
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)}"
+PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib"
+
+inherit autotools lib_package pkgconfig
+
+do_configure_prepend_arm() {
+ export ac_cv_sys_largefile_source=1
+ export ac_cv_sys_file_offset_bits=64
+}
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libtheora/libtheora-1.1.1/no-docs.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libtheora/libtheora-1.1.1/no-docs.patch
new file mode 100644
index 000000000..359f3d1a7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libtheora/libtheora-1.1.1/no-docs.patch
@@ -0,0 +1,15 @@
+Upstream-Status: Inappropriate [configuration]
+
+Index: libtheora-1.1.1/Makefile.am
+===================================================================
+--- libtheora-1.1.1.orig/Makefile.am 2009-11-25 22:01:53.593775926 +0100
++++ libtheora-1.1.1/Makefile.am 2009-11-25 22:02:00.777524017 +0100
+@@ -8,7 +8,7 @@
+ EXAMPLES_DIR =
+ endif
+
+-SUBDIRS = lib include doc tests m4 $(EXAMPLES_DIR)
++SUBDIRS = lib include tests m4 $(EXAMPLES_DIR)
+
+
+ # we include the whole debian/ dir in EXTRA_DIST because there's a problem
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libtheora/libtheora_1.1.1.bb b/import-layers/yocto-poky/meta/recipes-multimedia/libtheora/libtheora_1.1.1.bb
new file mode 100644
index 000000000..664d8480a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libtheora/libtheora_1.1.1.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Theora Video Codec"
+DESCRIPTION = "The libtheora reference implementation provides the standard encoder and decoder under a BSD license."
+HOMEPAGE = "http://xiph.org/"
+BUGTRACKER = "https://trac.xiph.org/newticket"
+SECTION = "libs"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=cf91718f59eb6a83d06dc7bcaf411132"
+DEPENDS = "libogg"
+
+PR = "r1"
+
+SRC_URI = "http://downloads.xiph.org/releases/theora/libtheora-${PV}.tar.bz2 \
+ file://no-docs.patch"
+
+SRC_URI[md5sum] = "292ab65cedd5021d6b7ddd117e07cd8e"
+SRC_URI[sha256sum] = "b6ae1ee2fa3d42ac489287d3ec34c5885730b1296f0801ae577a35193d3affbc"
+
+UPSTREAM_CHECK_REGEX = "libtheora-(?P<pver>\d+(\.\d)+)\.(tar\.gz|tgz)"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--disable-examples"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/libtool2.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/libtool2.patch
new file mode 100644
index 000000000..457202eae
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/libtool2.patch
@@ -0,0 +1,19 @@
+Upstream-Status: Inappropriate [configuration]
+
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: tiff-3.9.5/configure.ac
+===================================================================
+--- tiff-3.9.5.orig/configure.ac
++++ tiff-3.9.5/configure.ac
+@@ -27,7 +27,7 @@ dnl Process this file with autoconf to p
+ AC_PREREQ(2.64)
+ AC_INIT([LibTIFF Software],[3.9.5],[tiff@lists.maptools.org],[tiff])
+ AC_CONFIG_AUX_DIR(config)
+-AC_CONFIG_MACRO_DIR(m4)
++dnl AC_CONFIG_MACRO_DIR(m4)
+ AC_LANG(C)
+
+ dnl Compute the canonical host (run-time) system type variable
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
new file mode 100644
index 000000000..e2e24e0fb
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/tiff_4.0.6.bb
@@ -0,0 +1,47 @@
+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 \
+ file://libtool2.patch \
+ "
+
+SRC_URI[md5sum] = "d1d2e940dea0b5ad435f21f03d96dd72"
+SRC_URI[sha256sum] = "4d57a50907b510e3049a4bba0d7888930fdfc16ce49f1bf693e5b6247370d68c"
+
+# exclude betas
+UPSTREAM_CHECK_REGEX = "tiff-(?P<pver>\d+(\.\d+)+).tar"
+
+inherit autotools
+
+CACHED_CONFIGUREVARS = "ax_cv_check_gl_libgl=no"
+
+PACKAGECONFIG ?= "cxx jpeg zlib lzma \
+ strip-chopping extrasample-as-alpha check-ycbcr-subsampling"
+
+PACKAGECONFIG[cxx] = "--enable-cxx,--disable-cxx,,"
+PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg,"
+PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib,"
+PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz,"
+
+# Convert single-strip uncompressed images to multiple strips of specified
+# size (default: 8192) to reduce memory usage
+PACKAGECONFIG[strip-chopping] = "--enable-strip-chopping,--disable-strip-chopping,,"
+
+# Treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA
+PACKAGECONFIG[extrasample-as-alpha] = "--enable-extrasample-as-alpha,--disable-extrasample-as-alpha,,"
+
+# Control picking up YCbCr subsample info. Disable to support files lacking
+# the tag
+PACKAGECONFIG[check-ycbcr-subsampling] = "--enable-check-ycbcr-subsampling,--disable-check-ycbcr-subsampling,,"
+
+# Support a mechanism allowing reading large strips (usually one strip files)
+# in chunks when using TIFFReadScanline. Experimental 4.0+ feature
+PACKAGECONFIG[chunky-strip-read] = "--enable-chunky-strip-read,--disable-chunky-strip-read,,"
+
+PACKAGES =+ "tiffxx tiff-utils"
+FILES_tiffxx = "${libdir}/libtiffxx.so.*"
+FILES_tiff-utils = "${bindir}/*"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libvorbis/libvorbis_1.3.5.bb b/import-layers/yocto-poky/meta/recipes-multimedia/libvorbis/libvorbis_1.3.5.bb
new file mode 100644
index 000000000..636e0f307
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libvorbis/libvorbis_1.3.5.bb
@@ -0,0 +1,17 @@
+SUMMARY = "Ogg Vorbis Audio Codec"
+DESCRIPTION = "Ogg Vorbis is a high-quality lossy audio codec \
+that is free of intellectual property restrictions. libvorbis \
+is the main vorbis codec library."
+HOMEPAGE = "http://www.vorbis.com/"
+BUGTRACKER = "https://trac.xiph.org"
+SECTION = "libs"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=7d2c487d2fc7dd3e3c7c465a5b7f6217 \
+ file://include/vorbis/vorbisenc.h;beginline=1;endline=11;md5=d1c1d138863d6315131193d4046d81cb"
+DEPENDS = "libogg"
+
+SRC_URI = "http://downloads.xiph.org/releases/vorbis/${BP}.tar.xz"
+SRC_URI[md5sum] = "28cb28097c07a735d6af56e598e1c90f"
+SRC_URI[sha256sum] = "54f94a9527ff0a88477be0a71c0bab09a4c3febe0ed878b24824906cd4b0e1d1"
+
+inherit autotools pkgconfig
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/mpeg2dec/mpeg2dec-0.4.1/altivec_h_needed.patch b/import-layers/yocto-poky/meta/recipes-multimedia/mpeg2dec/mpeg2dec-0.4.1/altivec_h_needed.patch
new file mode 100644
index 000000000..7dc56436f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/mpeg2dec/mpeg2dec-0.4.1/altivec_h_needed.patch
@@ -0,0 +1,43 @@
+Add new method to judge whether <altivec.h> is needed
+
+The original logic will use "typedef vector int t;" to judge
+whether <altivec.h> is needed. altivec.h contains the following
+statement:
+
+ #if !defined(__APPLE_ALTIVEC__)
+ #define vector __vector
+ #define pixel __pixel
+ #define bool
+ #endif
+
+In gcc-4.3.3, __APPLE_ALTIVEC__ is not defined by compiler, neither
+as vector, pixel, and bool. In order to make "typedef vector int t;"
+pass the compilation, we need to include altivec.h.
+
+However in gcc-4.5.0, __APPLE_ALTIVEC__ is defined by compiler,
+so as vector, pixel, and bool. We could not judge whether
+altivec.h is needed by "typedef vector int t;".
+Here we include another statement "int tmp = __CR6_EQ;", in
+which __CR6_EQ is defined in altivec.h.
+
+Upstream-Status: Pending
+
+Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
+
+diff -ruN mpeg2dec-0.4.1-orig/configure.in mpeg2dec-0.4.1/configure.in
+--- mpeg2dec-0.4.1-orig/configure.in 2010-09-14 20:55:42.399687663 +0800
++++ mpeg2dec-0.4.1/configure.in 2010-09-14 20:56:43.403204648 +0800
+@@ -75,11 +75,11 @@
+ CFLAGS="$OPT_CFLAGS $TRY_CFLAGS $CFLAGS"
+ AC_MSG_CHECKING([if <altivec.h> is needed])
+ AC_TRY_COMPILE([],
+- [typedef vector int t;
++ [typedef vector int t; int tmp = __CR6_EQ;
+ vec_ld(0, (unsigned char *)0);],
+ [have_altivec=yes; AC_MSG_RESULT(no)],
+ [AC_TRY_COMPILE([#include <altivec.h>],
+- [typedef vector int t; vec_ld(0, (unsigned char *)0);],
++ [typedef vector int t; int tmp = __CR6_EQ; vec_ld(0, (unsigned char *)0);],
+ [AC_DEFINE([HAVE_ALTIVEC_H],,
+ [Define to 1 if you have the <altivec.h> header.])
+ have_altivec=yes; AC_MSG_RESULT(yes)],
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.4.1.bb b/import-layers/yocto-poky/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.4.1.bb
new file mode 100644
index 000000000..16669947f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.4.1.bb
@@ -0,0 +1,40 @@
+SUMMARY = "Library and test program for decoding MPEG-2 and MPEG-1 video streams"
+HOMEPAGE = "http://libmpeg2.sourceforge.net/"
+SECTION = "libs"
+LICENSE = "GPLv2+"
+LICENSE_FLAGS = "commercial"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://include/mpeg2.h;beginline=1;endline=22;md5=ead62602d4638329d3b5b86a55803154"
+
+PR = "r2"
+
+SRC_URI = "http://libmpeg2.sourceforge.net/files/mpeg2dec-${PV}.tar.gz \
+ file://altivec_h_needed.patch"
+
+SRC_URI[md5sum] = "7631b0a4bcfdd0d78c0bb0083080b0dc"
+SRC_URI[sha256sum] = "c74a76068f8ec36d4bb59a03bf1157be44118ca02252180e8b358b0b5e3edeee"
+
+UPSTREAM_CHECK_URI = "http://libmpeg2.sourceforge.net/downloads.html"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--enable-shared --disable-sdl"
+
+PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
+PACKAGECONFIG[x11] = "--with-x,--without-x,virtual/libx11 libxext libxv"
+
+PACKAGES = "mpeg2dec-dbg mpeg2dec mpeg2dec-doc libmpeg2 libmpeg2-dev libmpeg2convert libmpeg2convert-dev libmpeg2-staticdev libmpeg2convert-staticdev"
+
+FILES_${PN} = "${bindir}/*"
+FILES_libmpeg2 = "${libdir}/libmpeg2.so.*"
+FILES_libmpeg2convert = "${libdir}/libmpeg2convert.so.*"
+FILES_libmpeg2-dev = "${libdir}/libmpeg2.so \
+ ${libdir}/libmpeg2.la \
+ ${libdir}/pkgconfig/libmpeg2.pc \
+ ${includedir}/mpeg2dec/mpeg2.h"
+FILES_libmpeg2-staticdev = "${libdir}/libmpeg2.a"
+FILES_libmpeg2convert-dev = "${libdir}/libmpeg2convert.so \
+ ${libdir}/libmpeg2convert.la \
+ ${libdir}/pkgconfig/libmpeg2convert.pc \
+ ${includedir}/mpeg2dec/mpeg2convert.h"
+FILES_libmpeg2convert-staticdev = "${libdir}/libmpeg2convert.a"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio.inc b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
new file mode 100644
index 000000000..0b05ce4ca
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
@@ -0,0 +1,200 @@
+SUMMARY = "Sound server for Linux and Unix-like operating systems"
+HOMEPAGE = "http://www.pulseaudio.org"
+AUTHOR = "Lennart Poettering"
+SECTION = "libs/multimedia"
+LICENSE = "GPLv2+ & LGPLv2.1"
+LIC_FILES_CHKSUM = "file://GPL;md5=4325afd396febcb659c36b49533135d4 \
+ file://LGPL;md5=2d5025d4aa3495befef8f17206a5b0a1 \
+ file://src/pulsecore/resampler.h;beginline=4;endline=21;md5=09794012ae16912c0270f3280cc8ff84"
+
+DEPENDS = "libatomic-ops libsndfile1 libtool"
+# optional
+DEPENDS += "udev alsa-lib glib-2.0 gconf"
+DEPENDS += "json-c gdbm speexdsp libxml-parser-perl-native libcap"
+
+inherit autotools bash-completion pkgconfig useradd gettext perlnative bluetooth systemd
+
+# *.desktop rules wont be generated during configure and build will fail
+# if using --disable-nls
+USE_NLS = "yes"
+
+EXTRA_OECONF = "\
+ --disable-hal-compat \
+ --disable-orc \
+ --enable-tcpwrap=no \
+ --with-access-group=audio \
+ --disable-openssl \
+ --disable-xen \
+ --with-database=simple \
+ --without-fftw \
+ --without-zsh-completion-dir \
+ --with-udev-rules-dir=`pkg-config --variable=udevdir udev`/rules.d \
+ ac_cv_header_valgrind_memcheck_h=no \
+"
+
+# soxr (the SoX Resampler library) doesn't seem to be currently packaged in
+# oe-core nor meta-oe, so let's not add a PACKAGECONFIG entry for it for now.
+EXTRA_OECONF += "--without-soxr"
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', '3g', 'ofono', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
+ dbus \
+ "
+
+PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus"
+PACKAGECONFIG[bluez4] = "--enable-bluez4,--disable-bluez4,bluez4 sbc"
+PACKAGECONFIG[bluez5] = "--enable-bluez5,--disable-bluez5,bluez5 sbc"
+PACKAGECONFIG[ofono] = "--enable-bluez5-ofono-headset,--disable-bluez5-ofono-headset,ofono"
+PACKAGECONFIG[gtk] = "--enable-gtk3,--disable-gtk3,gtk+3"
+PACKAGECONFIG[systemd] = "--enable-systemd-daemon --enable-systemd-login --enable-systemd-journal --with-systemduserunitdir=${systemd_user_unitdir},--disable-systemd-daemon --disable-systemd-login --disable-systemd-journal,systemd"
+PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11 libxtst libice libsm libxcb"
+PACKAGECONFIG[avahi] = "--enable-avahi,--disable-avahi,avahi"
+PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack"
+# Since many embedded systems don't have non-root users, it's useful to be
+# able to use pulseaudio autospawn for root as well.
+PACKAGECONFIG[autospawn-for-root] = ",,,"
+PACKAGECONFIG[lirc] = "--enable-lirc,--disable-lirc,lirc"
+
+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)}"
+
+
+export TARGET_PFPU = "${TARGET_FPU}"
+
+# TODO: Use more fine granular version
+#OE_LT_RPATH_ALLOW=":${libdir}/pulse-0.9:"
+OE_LT_RPATH_ALLOW = "any"
+OE_LT_RPATH_ALLOW[export]="1"
+
+set_cfg_value () {
+ sed -i -e "s/\(; *\)\?$2 =.*/$2 = $3/" "$1"
+ if ! grep -q "^$2 = $3\$" "$1"; then
+ die "Use of sed to set '$2' to '$3' in '$1' failed"
+ fi
+}
+
+do_compile_append () {
+ if ${@bb.utils.contains('PACKAGECONFIG', 'autospawn-for-root', 'true', 'false', d)}; then
+ set_cfg_value src/client.conf allow-autospawn-for-root yes
+ fi
+}
+
+do_install_append() {
+ install -d ${D}${sysconfdir}/default/volatiles
+ install -m 0644 ${WORKDIR}/volatiles.04_pulse ${D}${sysconfdir}/default/volatiles/volatiles.04_pulse
+}
+
+USERADD_PACKAGES = "pulseaudio-server"
+GROUPADD_PARAM_pulseaudio-server = "pulse"
+USERADD_PARAM_pulseaudio-server = "--system --home /var/run/pulse \
+ --no-create-home --shell /bin/false \
+ --groups audio,pulse --gid pulse pulse"
+
+# The console-kit module is included here explicitly so bitbake can map to the
+# RDEPENDS we define for it in this recipe, and thereby ensure that when
+# adding the console-kit module to an image, we also get the necessary
+# consolekit package produced.
+PACKAGES =+ "libpulsecore libpulsecommon libpulse libpulse-simple libpulse-mainloop-glib \
+ pulseaudio-server pulseaudio-misc ${@bb.utils.contains('PACKAGECONFIG', 'dbus', 'pulseaudio-module-console-kit', '', d)}"
+
+#upgrade path:
+RREPLACES_pulseaudio-server = "libpulse-bin libpulse-conf"
+
+PACKAGES_DYNAMIC += "^pulseaudio-lib-.* ^pulseaudio-module-.*"
+
+FILES_libpulsecore = "${libdir}/pulseaudio/libpulsecore*.so"
+FILES_libpulsecommon = "${libdir}/pulseaudio/libpulsecommon*.so"
+
+# client.conf configures the behaviour of libpulse, so it belongs in the same
+# package.
+FILES_libpulse = "${libdir}/libpulse.so.* ${sysconfdir}/pulse/client.conf"
+
+FILES_libpulse-simple = "${libdir}/libpulse-simple.so.*"
+FILES_libpulse-mainloop-glib = "${libdir}/libpulse-mainloop-glib.so.*"
+
+FILES_${PN}-dev += "${libdir}/pulse-${PV}/modules/*.la ${datadir}/vala ${libdir}/cmake"
+FILES_${PN}-conf = "${sysconfdir}"
+FILES_${PN}-bin += "${sysconfdir}/default/volatiles/volatiles.04_pulse"
+FILES_${PN}-server = "${bindir}/pulseaudio ${bindir}/start-* ${sysconfdir} ${bindir}/pactl */udev/rules.d/*.rules */*/udev/rules.d/*.rules ${systemd_user_unitdir}/*"
+
+#SYSTEMD_PACKAGES = "${PN}-server"
+SYSTEMD_SERVICE_${PN}-server = "pulseaudio.service"
+
+FILES_${PN}-misc = "${bindir}/* ${libdir}/pulseaudio/libpulsedsp.so"
+
+# Allow the pulseaudio package to be created empty as a placeholder (-dbg and -dev depend on it)
+ALLOW_EMPTY_${PN} = "1"
+
+CONFFILES_libpulse = "${sysconfdir}/pulse/client.conf"
+
+CONFFILES_pulseaudio-server = "\
+ ${sysconfdir}/pulse/default.pa \
+ ${sysconfdir}/pulse/daemon.conf \
+ ${sysconfdir}/pulse/system.pa \
+ "
+
+pkg_postinst_${PN}-server() {
+ if [ -z "$D" ] && [ -e ${sysconfdir}/init.d/populate-volatile.sh ] ; then
+ ${sysconfdir}/init.d/populate-volatile.sh update
+ fi
+}
+
+python populate_packages_prepend() {
+ #d.setVar('PKG_pulseaudio', 'pulseaudio')
+
+ plugindir = d.expand('${libdir}/pulse-${PV}/modules/')
+ do_split_packages(d, plugindir, '^module-(.*)\.so$', 'pulseaudio-module-%s', 'PulseAudio module for %s', extra_depends='', prepend=True)
+ do_split_packages(d, plugindir, '^lib(.*)\.so$', 'pulseaudio-lib-%s', 'PulseAudio library for %s', extra_depends='', prepend=True)
+}
+
+RDEPENDS_pulseaudio-server = " \
+ pulseaudio-module-filter-apply \
+ pulseaudio-module-filter-heuristics \
+ pulseaudio-module-udev-detect \
+ pulseaudio-module-null-sink \
+ pulseaudio-module-device-restore \
+ pulseaudio-module-stream-restore \
+ pulseaudio-module-card-restore \
+ pulseaudio-module-augment-properties \
+ pulseaudio-module-detect \
+ pulseaudio-module-alsa-sink \
+ pulseaudio-module-alsa-source \
+ pulseaudio-module-alsa-card \
+ pulseaudio-module-native-protocol-unix \
+ pulseaudio-module-default-device-restore \
+ pulseaudio-module-intended-roles \
+ pulseaudio-module-rescue-streams \
+ pulseaudio-module-always-sink \
+ pulseaudio-module-suspend-on-idle \
+ pulseaudio-module-position-event-sounds \
+ pulseaudio-module-role-cork \
+ pulseaudio-module-switch-on-port-available"
+
+# If the server is installed, it's usually desirable to make ALSA applications
+# use PulseAudio. alsa-plugins-pulseaudio-conf will install the configuration
+# that makes the PulseAudio plugin the default ALSA device.
+RDEPENDS_pulseaudio-server += "alsa-plugins-pulseaudio-conf"
+
+# pulseaudio-module-console-kit is built whenever dbus is enabled by PACKAGECONFIG
+# but consolekit depends on libx11 and is available only for DISTRO with x11 in DISTRO_FEATURES
+RDEPENDS_pulseaudio-module-console-kit =+ "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d)}"
+RDEPENDS_pulseaudio-misc += "pulseaudio-module-cli-protocol-unix"
+
+FILES_pulseaudio-module-gconf += "${libexecdir}/pulse/gconf-helper"
+FILES_pulseaudio-module-alsa-card += "${datadir}/pulseaudio/alsa-mixer"
+
+# The console-kit module is good to have on X11 systems (it keeps PulseAudio
+# running for the duration of the user login session). The device-manager and
+# x11-* modules are referenced from the start-pulseaudio-x11 script, so those
+# modules must be installed when X11 is enabled.
+RDEPENDS_pulseaudio-server += "\
+ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '\
+ pulseaudio-module-console-kit \
+ pulseaudio-module-device-manager \
+ pulseaudio-module-x11-cork-request \
+ pulseaudio-module-x11-publish \
+ pulseaudio-module-x11-xsmp \
+ ', '', 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
new file mode 100644
index 000000000..1c1e2fbdb
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-Revert-module-switch-on-port-available-Route-to-pref.patch
@@ -0,0 +1,268 @@
+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/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
new file mode 100644
index 000000000..84c951940
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-card-add-pa_card_profile.ports.patch
@@ -0,0 +1,218 @@
+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
new file mode 100644
index 000000000..bc3277583
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-client-conf-Add-allow-autospawn-for-root.patch
@@ -0,0 +1,97 @@
+From 1cb5647f76dc8cd7bacbce2a64fac9e6c2dc3b16 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
+
+Usually autospawning for root is a bad idea, since it can easily
+interfere with other users' PulseAudio instances, but in embedded
+environments where only root exists, autospawning is fine.
+
+Upstream-Status: Denied [Upstream hasn't so far been convinced that
+this feature is needed. The view is that running the graphical session
+as root doesn't make sense even on embedded systems, or if it does,
+running PulseAudio in the system mode should be a good solution for
+that use case. If someone can prove otherwise, the patch would
+probably be accepted.]
+
+Signed-off-by: Tanu Kaskinen <tanu.kaskinen@linux.intel.com>
+---
+ man/pulse-client.conf.5.xml.in | 9 +++++++++
+ src/pulse/client-conf.c | 1 +
+ src/pulse/client-conf.h | 1 +
+ src/pulse/client.conf.in | 1 +
+ src/pulse/context.c | 2 +-
+ 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
+--- 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/>.
+ </option>
+
+ <option>
++ <p><opt>allow-autospawn-for-root=</opt> Allow autospawning also for root.
++ Takes a boolean value, defaults to <opt>no</opt>. If the <opt>autospawn
++ </opt> option is disabled, this option has no effect. Autospawning for
++ root is disabled by default, because running PulseAudio as root will
++ interfere with regular users' PulseAudio instances. This option should be
++ enabled only in environments where there are no regular users at all.</p>
++ </option>
++
++ <option>
+ <p><opt>daemon-binary=</opt> Path to the PulseAudio daemon to
+ 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
+--- 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
+ { "default-server", pa_config_parse_string, &c->default_server, NULL },
+ { "default-dbus-server", pa_config_parse_string, &c->default_dbus_server, NULL },
+ { "autospawn", pa_config_parse_bool, &c->autospawn, NULL },
++ { "allow-autospawn-for-root", pa_config_parse_bool, &c->allow_autospawn_for_root, NULL },
+ { "cookie-file", pa_config_parse_string, &c->cookie_file_from_client_conf, NULL },
+ { "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
+--- 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 allow_autospawn_for_root;
+ size_t shm_size;
+ } pa_client_conf;
+
+diff --git a/src/pulse/client.conf.in b/src/pulse/client.conf.in
+index 26b7790..69830ef 100644
+--- a/src/pulse/client.conf.in
++++ b/src/pulse/client.conf.in
+@@ -23,6 +23,7 @@
+ ; default-dbus-server =
+
+ ; autospawn = yes
++; allow-autospawn-for-root = no
+ ; daemon-binary = @PA_BINARY@
+ ; extra-arguments = --log-target=syslog
+
+diff --git a/src/pulse/context.c b/src/pulse/context.c
+index 4bc445f..d6c3f6d 100644
+--- a/src/pulse/context.c
++++ b/src/pulse/context.c
+@@ -976,7 +976,7 @@ int pa_context_connect(
+ if (!(flags & PA_CONTEXT_NOAUTOSPAWN) && c->conf->autospawn) {
+
+ #ifdef HAVE_GETUID
+- if (getuid() == 0)
++ if (!c->conf->allow_autospawn_for_root && getuid() == 0)
+ pa_log_debug("Not doing autospawn since we are root.");
+ else {
+ c->do_autospawn = true;
+--
+1.9.3
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-padsp-Make-it-compile-on-musl.patch b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-padsp-Make-it-compile-on-musl.patch
new file mode 100644
index 000000000..85559950e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-padsp-Make-it-compile-on-musl.patch
@@ -0,0 +1,70 @@
+From f6ab3c3aa7a1841c8add04828029356d2a8c88e7 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 6 Apr 2015 21:56:31 -0700
+Subject: [PATCH] padsp: Make it compile on musl
+
+break assumptions on glibc and there is no stat64 on non
+glibc C libraries
+
+See pulseaudio bug
+
+https://bugs.freedesktop.org/show_bug.cgi?id=85319
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/utils/padsp.c | 15 +++++++++------
+ 1 file changed, 9 insertions(+), 6 deletions(-)
+
+diff --git a/src/utils/padsp.c b/src/utils/padsp.c
+index e61373c..684721a 100644
+--- a/src/utils/padsp.c
++++ b/src/utils/padsp.c
+@@ -2368,7 +2368,7 @@ fail:
+ return ret;
+ }
+
+-#ifdef sun
++#ifndef __GLIBC__
+ int ioctl(int fd, int request, ...) {
+ #else
+ int ioctl(int fd, unsigned long request, ...) {
+@@ -2508,10 +2508,13 @@ int stat(const char *pathname, struct stat *buf) {
+
+ return 0;
+ }
+-
+ #ifdef HAVE_OPEN64
+-
++#undef stat64
++#ifdef __GLIBC__
+ int stat64(const char *pathname, struct stat64 *buf) {
++#else
++int stat64(const char *pathname, struct stat *buf) {
++#endif
+ struct stat oldbuf;
+ int ret;
+
+@@ -2544,7 +2547,7 @@ int stat64(const char *pathname, struct stat64 *buf) {
+
+ return 0;
+ }
+-
++#undef open64
+ int open64(const char *filename, int flags, ...) {
+ va_list args;
+ mode_t mode = 0;
+@@ -2670,8 +2673,8 @@ FILE* fopen(const char *filename, const char *mode) {
+ }
+
+ #ifdef HAVE_OPEN64
+-
+-FILE *fopen64(const char *filename, const char *mode) {
++#undef fopen64
++FILE *fopen64(const char *__restrict filename, const char *__restrict mode) {
+
+ debug(DEBUG_LEVEL_VERBOSE, __FILE__": fopen64(%s)\n", filename?filename:"NULL");
+
+--
+2.1.4
+
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/0002-alsa-bluetooth-fail-if-user-requested-profile-doesn-.patch
new file mode 100644
index 000000000..be3655b23
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-alsa-bluetooth-fail-if-user-requested-profile-doesn-.patch
@@ -0,0 +1,65 @@
+From 339eb179baa7810113f6456accc05b3a32c1cdba 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
+ 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]
+
+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(-)
+
+diff --git a/src/modules/alsa/module-alsa-card.c b/src/modules/alsa/module-alsa-card.c
+index a7fec04..32f517e 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) {
+ goto fail;
+ }
+
+- if ((profile = pa_modargs_get_value(u->modargs, "profile", NULL)))
+- pa_card_new_data_set_profile(&data, profile);
++ if ((profile = pa_modargs_get_value(u->modargs, "profile", NULL))) {
++ if (pa_hashmap_get(data.profiles, profile))
++ pa_card_new_data_set_profile(&data, profile);
++ else {
++ pa_log("No such profile: %s", profile);
++ goto fail;
++ }
++ }
+
+ 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
+--- 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) {
+ 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);
+- else
+- 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);
++ return -1;
++ }
+ }
+
+ u->card = pa_card_new(u->core, &data);
+--
+2.1.4
+
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
new file mode 100644
index 000000000..0e7780154
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0003-card-move-profile-selection-after-pa_card_new.patch
@@ -0,0 +1,366 @@
+From 13e85dd1763e99d21a60323671b9a5df08bdae75 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()
+
+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.
+
+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]
+
+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(-)
+
+diff --git a/src/modules/alsa/module-alsa-card.c b/src/modules/alsa/module-alsa-card.c
+index 9e8cde2..fe240f0 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) {
+ goto fail;
+ }
+
+- if ((profile = pa_modargs_get_value(u->modargs, "profile", NULL))) {
+- if (pa_hashmap_get(data.profiles, profile))
+- pa_card_new_data_set_profile(&data, profile);
+- else {
+- pa_log("No such profile: %s", profile);
+- goto fail;
+- }
+- }
+-
+ 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;
+
+ 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);
++ goto fail;
++ }
++ }
++
+ 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
+--- 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) {
+ *d = PA_BLUEZ4_PROFILE_OFF;
+ pa_hashmap_put(data.profiles, p->name, p);
+
+- 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);
+- else {
+- pa_log("Profile '%s' not valid or not supported by device.", default_profile);
+- return -1;
+- }
+- }
+-
+ 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) {
+
+ u->card->userdata = u;
+ u->card->set_profile = card_set_profile;
++ pa_card_put(u->card);
++
++ 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);
++ return -1;
++ }
++ }
+
+ d = PA_CARD_PROFILE_DATA(u->card->active_profile);
+
+diff --git a/src/modules/bluetooth/module-bluez5-device.c b/src/modules/bluetooth/module-bluez5-device.c
+index b015c67..7b90a31 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) {
+
+ u->card->userdata = u;
+ u->card->set_profile = set_profile_cb;
++ 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
+--- 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) {
+ pa_card_new_data_done(&card_new_data);
+ u->card->userdata = u;
+ u->card->set_profile = card_set_profile;
++ 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
+--- 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)))
+ return PA_HOOK_OK;
+
+ 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;
+
++ profile = pa_hashmap_get(card->profiles, e->profile);
++ if (profile) {
++ 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);
++ 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);
+diff --git a/src/pulsecore/card.c b/src/pulsecore/card.c
+index f92ac87..1a6e705 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;
+
+- if (data->active_profile)
+- if ((c->active_profile = pa_hashmap_get(c->profiles, data->active_profile)))
+- c->save_profile = data->save_profile;
++ pa_device_init_description(c->proplist, c);
++ pa_device_init_icon(c->proplist, true);
++ pa_device_init_intended_roles(c->proplist);
+
+- if (!c->active_profile) {
+- PA_HASHMAP_FOREACH(profile, c->profiles, state) {
+- if (profile->available == PA_AVAILABLE_NO)
+- continue;
++ return c;
++}
+
+- if (!c->active_profile || profile->priority > c->active_profile->priority)
+- c->active_profile = profile;
+- }
+- /* If all profiles are not available, then we still need to pick one */
+- if (!c->active_profile) {
+- 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) {
++ pa_card_profile *profile;
++ void *state;
++
++ pa_assert(card);
++
++ 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;
+ }
+
+- 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);
+
+- pa_assert_se(pa_idxset_put(core->cards, c, &c->index) >= 0);
++ pa_hook_fire(&card->core->hooks[PA_CORE_HOOK_CARD_NEW], 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;
+
+- pa_hook_fire(&core->hooks[PA_CORE_HOOK_CARD_PUT], c);
+- return c;
++ 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) {
+ return 0;
+ }
+
+- if ((r = c->set_profile(c, profile)) < 0)
++ /* If we're setting the initial profile, we shouldn't call set_profile(),
++ * because the implementations don't expect that (for historical reasons).
++ * We should just set c->active_profile, and the implementations will
++ * properly set up that profile after pa_card_put() has returned. It would
++ * 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)
+ return r;
+
+- pa_subscription_post(c->core, PA_SUBSCRIPTION_EVENT_CARD|PA_SUBSCRIPTION_EVENT_CHANGE, c->index);
+-
+- pa_log_info("Changed profile of card %u \"%s\" to %s", c->index, c->name, profile->name);
+-
+ c->active_profile = profile;
+ c->save_profile = save;
+
+ if (save)
+ 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) {
++ 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);
++ }
+
+ return 0;
+ }
+diff --git a/src/pulsecore/card.h b/src/pulsecore/card.h
+index fff9057..a944301 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;
++
+ 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 pa_card_new_data_done(pa_card_new_data *data);
+
+ pa_card *pa_card_new(pa_core *c, pa_card_new_data *data);
++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);
+--
+2.7.0
+
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/0004-alsa-set-availability-for-some-unavailable-profiles.patch
new file mode 100644
index 000000000..e0efa70f3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0004-alsa-set-availability-for-some-unavailable-profiles.patch
@@ -0,0 +1,83 @@
+From 690d567e298f6687b61c82660b051df5b25482ee 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
+
+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
+outputs, but only the second of them is actually usable. The
+unavailable port is marked as unavailable and the available port is
+marked as available, but this information isn't propagated to the
+profile availability. Without profile availability information, the
+initial profile policy picks the unavailable one, since it has a
+higher priority value.
+
+This patch adds simple logic for marking some profiles unavailable:
+if the profile only contains unavailable ports, the profile is
+unavailable too. This can be improved in the future so that if a
+profile contains sinks or sources that only contain unavailable ports,
+the profile should be marked as unavailable. Implementing that
+requires adding more information about the sinks and sources to
+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]
+
+Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
+---
+ src/modules/alsa/module-alsa-card.c | 25 +++++++++++++++++++++++++
+ 1 file changed, 25 insertions(+)
+
+diff --git a/src/modules/alsa/module-alsa-card.c b/src/modules/alsa/module-alsa-card.c
+index fe240f0..bdbdc12 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) {
+ 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) {
+ 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) {
++ void *state2;
++ pa_available_t available = PA_AVAILABLE_NO;
++
++ /* Don't touch the "off" profile. */
++ if (pa_hashmap_size(profile->ports) == 0)
++ continue;
++
++ PA_HASHMAP_FOREACH(port, profile->ports, state2) {
++ if (port->available != PA_AVAILABLE_NO) {
++ available = PA_AVAILABLE_UNKNOWN;
++ break;
++ }
++ }
++
++ pa_card_profile_set_available(profile, available);
++ }
++
+ return 0;
+ }
+
+--
+2.7.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/volatiles.04_pulse b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/volatiles.04_pulse
new file mode 100644
index 000000000..5b1998032
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/volatiles.04_pulse
@@ -0,0 +1,2 @@
+# <type> <owner> <group> <mode> <path> <linksource>
+d pulse pulse 0755 /var/run/pulse none
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_8.0.bb
new file mode 100644
index 000000000..b01ba8f68
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio_8.0.bb
@@ -0,0 +1,19 @@
+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://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 \
+"
+SRC_URI[md5sum] = "8678442ba0bb4b4c33ac6f62542962df"
+SRC_URI[sha256sum] = "690eefe28633466cfd1ab9d85ebfa9376f6b622deec6bfee5091ac9737cd1989"
+
+do_compile_prepend() {
+ mkdir -p ${S}/libltdl
+ cp ${STAGING_LIBDIR}/libltdl* ${S}/libltdl
+}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/sbc/sbc_1.3.bb b/import-layers/yocto-poky/meta/recipes-multimedia/sbc/sbc_1.3.bb
new file mode 100644
index 000000000..2d7f31bc1
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/sbc/sbc_1.3.bb
@@ -0,0 +1,16 @@
+SUMMARY = "SBC Audio Codec"
+DESCRIPTION = "Bluetooth low-complexity, subband codec (SBC) library."
+HOMEPAGE = "https://www.bluez.org"
+SECTION = "libs"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
+ file://sbc/sbc.h;beginline=1;endline=26;md5=0f57d0df22b0d40746bdd29805a4361b"
+
+DEPENDS = "libsndfile1"
+
+SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/${BP}.tar.xz"
+
+SRC_URI[md5sum] = "2d8b7841f2c11ab287718d562f2b981c"
+SRC_URI[sha256sum] = "e61022cf576f14190241e7071753fdacdce5d1dea89ffd704110fc50be689309"
+
+inherit autotools pkgconfig
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/speex/speex_1.2rc2.bb b/import-layers/yocto-poky/meta/recipes-multimedia/speex/speex_1.2rc2.bb
new file mode 100644
index 000000000..f7d23dbd7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/speex/speex_1.2rc2.bb
@@ -0,0 +1,19 @@
+SUMMARY = "Speech Audio Codec"
+DESCRIPTION = "Speex is an Open Source/Free Software patent-free audio compression format designed for speech."
+HOMEPAGE = "http://www.speex.org"
+SECTION = "libs"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=314649d8ba9dd7045dfb6683f298d0a8 \
+ file://include/speex/speex.h;beginline=1;endline=34;md5=ef8c8ea4f7198d71cf3509c6ed05ea50"
+DEPENDS = "libogg speexdsp"
+
+SRC_URI = "http://downloads.us.xiph.org/releases/speex/speex-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "6ae7db3bab01e1d4b86bacfa8ca33e81"
+SRC_URI[sha256sum] = "caa27c7247ff15c8521c2ae0ea21987c9e9710a8f2d3448e8b79da9806bce891"
+
+inherit autotools pkgconfig lib_package
+
+EXTRA_OECONF = "\
+ ${@bb.utils.contains('TARGET_FPU', 'soft', '--enable-fixed-point --disable-float-api --disable-vbr', '', d)} \
+"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/speex/speexdsp/0001-Don-t-rely-on-HAVE_STDINT_H-et-al.-being-defined.patch b/import-layers/yocto-poky/meta/recipes-multimedia/speex/speexdsp/0001-Don-t-rely-on-HAVE_STDINT_H-et-al.-being-defined.patch
new file mode 100644
index 000000000..c7067daaa
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/speex/speexdsp/0001-Don-t-rely-on-HAVE_STDINT_H-et-al.-being-defined.patch
@@ -0,0 +1,63 @@
+From c73370ceafd138becee8ca3c688ba75756830bfe Mon Sep 17 00:00:00 2001
+From: Tanu Kaskinen <tanu.kaskinen@linux.intel.com>
+Date: Sun, 5 Jul 2015 17:48:16 +0300
+Subject: [PATCH] Don't rely on HAVE_STDINT_H et al. being defined
+
+Not everyone who includes speexdsp_config_types.h will have a test
+which defines those, and if we've chosen to use the stdint types at
+configure time then we know exactly which header(s) are available, so
+just choose the best one then and generate the header to use it.
+
+This patch, including the above text, is copied from a commit in the
+speex repository[1]. The original commit for speex was made by Ron
+<ron@debian.org>.
+
+[1] https://git.xiph.org/?p=speex.git;a=commitdiff;h=774c87d6cb7dd8dabdd17677fc6da753ecf4aa87
+
+Upstream-Status: Backport
+
+Signed-off-by: Tanu Kaskinen <tanu.kaskinen@linux.intel.com>
+---
+ configure.ac | 6 ++++++
+ include/speex/speexdsp_config_types.h.in | 8 +-------
+ 2 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 2cd2d1e..1de0c23 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -334,6 +334,12 @@ AC_SUBST([USIZE16])
+ AC_SUBST([SIZE32])
+ AC_SUBST([USIZE32])
+
++AS_IF([test "$ac_cv_header_stdint_h" = "yes"], [INCLUDE_STDINT="#include <stdint.h>"],
++ [test "$ac_cv_header_inttypes_h" = "yes"], [INCLUDE_STDINT="#include <inttypes.h>"],
++ [test "$ac_cv_header_sys_types_h" = "yes"], [INCLUDE_STDINT="#include <sys/types.h>"])
++
++AC_SUBST([INCLUDE_STDINT])
++
+ AC_CONFIG_FILES([
+ Makefile libspeexdsp/Makefile doc/Makefile SpeexDSP.spec
+ include/Makefile include/speex/Makefile speexdsp.pc
+diff --git a/include/speex/speexdsp_config_types.h.in b/include/speex/speexdsp_config_types.h.in
+index 02b82fd..5ea7b55 100644
+--- a/include/speex/speexdsp_config_types.h.in
++++ b/include/speex/speexdsp_config_types.h.in
+@@ -1,13 +1,7 @@
+ #ifndef __SPEEX_TYPES_H__
+ #define __SPEEX_TYPES_H__
+
+-#if defined HAVE_STDINT_H
+-# include <stdint.h>
+-#elif defined HAVE_INTTYPES_H
+-# include <inttypes.h>
+-#elif defined HAVE_SYS_TYPES_H
+-# include <sys/types.h>
+-#endif
++@INCLUDE_STDINT@
+
+ typedef @SIZE16@ spx_int16_t;
+ typedef @USIZE16@ spx_uint16_t;
+--
+1.9.3
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/speex/speexdsp_1.2rc3.bb b/import-layers/yocto-poky/meta/recipes-multimedia/speex/speexdsp_1.2rc3.bb
new file mode 100644
index 000000000..6b1acedbe
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/speex/speexdsp_1.2rc3.bb
@@ -0,0 +1,39 @@
+SUMMARY = "A patent-free DSP library"
+DESCRIPTION = "SpeexDSP is a patent-free, Open Source/Free Software DSP library."
+HOMEPAGE = "http://www.speex.org"
+SECTION = "libs"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=314649d8ba9dd7045dfb6683f298d0a8"
+
+SRC_URI = "http://downloads.xiph.org/releases/speex/speexdsp-${PV}.tar.gz \
+ file://0001-Don-t-rely-on-HAVE_STDINT_H-et-al.-being-defined.patch"
+
+SRC_URI[md5sum] = "70d9d31184f7eb761192fd1ef0b73333"
+SRC_URI[sha256sum] = "4ae688600039f5d224bdf2e222d2fbde65608447e4c2f681585e4dca6df692f1"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "\
+ --disable-examples \
+ ${@bb.utils.contains('TARGET_FPU', 'soft', '--enable-fixed-point --disable-float-api', '', d)} \
+"
+
+# Workaround for a build failure when building with MACHINE=qemuarm64. I think
+# aarch64 is supposed to support NEON just fine, but building for qemuarm64
+# fails in NEON code:
+#
+# .../speexdsp-1.2rc3/libspeexdsp/resample_neon.h:148:5: error: impossible constraint in 'asm'
+# asm volatile (" cmp %[len], #0\n"
+# ^
+#
+# I sent an email about the issue to speex-dev. At the time of writing there
+# are no responses yet:
+# http://thread.gmane.org/gmane.comp.audio.compression.speex.devel/7360
+EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'aarch64', '--disable-neon', '', d)}"
+
+# speexdsp was split off from speex in 1.2rc2. Older versions of speex can't
+# be installed together with speexdsp, since they contain overlapping files.
+RCONFLICTS_${PN} = "speex (< 1.2rc2)"
+RCONFLICTS_${PN}-dbg = "speex-dbg (< 1.2rc2)"
+RCONFLICTS_${PN}-dev = "speex-dev (< 1.2rc2)"
+RCONFLICTS_${PN}-staticdev = "speex-staticdev (< 1.2rc2)"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/tremor/tremor/obsolete_automake_macros.patch b/import-layers/yocto-poky/meta/recipes-multimedia/tremor/tremor/obsolete_automake_macros.patch
new file mode 100644
index 000000000..7e5102903
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/tremor/tremor/obsolete_automake_macros.patch
@@ -0,0 +1,15 @@
+Upstream-Status: Submitted [https://trac.xiph.org/ticket/1922]
+
+Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
+Index: configure.in
+===================================================================
+--- configure.in (revision 18764)
++++ configure.in (working copy)
+@@ -9,7 +9,7 @@
+ AC_CANONICAL_HOST
+ AC_CANONICAL_TARGET
+
+-AM_CONFIG_HEADER([config.h])
++AC_CONFIG_HEADERS([config.h])
+
+ AM_INIT_AUTOMAKE(libvorbisidec,1.2.1)
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/tremor/tremor/tremor-arm-thumb2.patch b/import-layers/yocto-poky/meta/recipes-multimedia/tremor/tremor/tremor-arm-thumb2.patch
new file mode 100644
index 000000000..204954222
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/tremor/tremor/tremor-arm-thumb2.patch
@@ -0,0 +1,104 @@
+From: Xin Ouyang <Xin.Ouyang@windriver.com>
+Date: Mon, 16 Jul 2012 13:29:34 +0800
+Subject: [PATCH] tremor: add IT instructions for arm thumb2 tune flags.
+
+Upstream-Status: Pending
+
+In Thumb-2, most instructions do not have a built in condition code (except for
+conditional branches). Instead, short sequences of instructions which are to be
+executed conditionally can be preceded by a special "IT instruction" which
+describes the condition and which of the following instructions should be
+executed if the condition is false respectively.
+
+For the ARM/Thumb IT(If-Then) instruction:
+http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0489c/Cjabicci.html
+
+Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
+---
+ asm_arm.h | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+diff --git a/asm_arm.h b/asm_arm.h
+index c3bda00..823c54f 100755
+--- a/asm_arm.h
++++ b/asm_arm.h
+@@ -108,9 +108,11 @@ static inline void XNPROD31(ogg_int32_t a, ogg_int32_t b,
+ static inline ogg_int32_t CLIP_TO_15(ogg_int32_t x) {
+ int tmp;
+ asm volatile("subs %1, %0, #32768\n\t"
++ "itt pl\n\t"
+ "movpl %0, #0x7f00\n\t"
+ "orrpl %0, %0, #0xff\n"
+ "adds %1, %0, #32768\n\t"
++ "it mi\n\t"
+ "movmi %0, #0x8000"
+ : "+r"(x),"=r"(tmp)
+ :
+@@ -139,10 +141,12 @@ static inline void lsp_loop_asm(ogg_uint32_t *qip,ogg_uint32_t *pip,
+
+ "ldmdb r0!,{r1,r3};"
+ "subs r1,r1,%4;" //ilsp[j]-wi
++ "it mi;"
+ "rsbmi r1,r1,#0;" //labs(ilsp[j]-wi)
+ "umull %0,r2,r1,%0;" //qi*=labs(ilsp[j]-wi)
+
+ "subs r1,r3,%4;" //ilsp[j+1]-wi
++ "it mi;"
+ "rsbmi r1,r1,#0;" //labs(ilsp[j+1]-wi)
+ "umull %1,r3,r1,%1;" //pi*=labs(ilsp[j+1]-wi)
+
+@@ -167,6 +171,7 @@ static inline void lsp_loop_asm(ogg_uint32_t *qip,ogg_uint32_t *pip,
+ "mov r0,#0x4000;\n"
+
+ "subs r1,r1,%4;\n" //ilsp[j]-wi
++ "it mi;\n"
+ "rsbmi r1,r1,#0;\n" //labs(ilsp[j]-wi)
+ "umull %0,r2,r1,%0;\n" //qi*=labs(ilsp[j]-wi)
+ "umull %1,r3,r0,%1;\n" //pi*=labs(ilsp[j+1]-wi)
+@@ -190,18 +195,23 @@ static inline void lsp_loop_asm(ogg_uint32_t *qip,ogg_uint32_t *pip,
+ "mov r2,#0;"
+ "orr r1,%0,%1;"
+ "tst r1,#0xff000000;"
++ "itt ne;"
+ "addne r2,r2,#8;"
+ "movne r1,r1,lsr #8;"
+ "tst r1,#0x00f00000;"
++ "itt ne;"
+ "addne r2,r2,#4;"
+ "movne r1,r1,lsr #4;"
+ "tst r1,#0x000c0000;"
++ "itt ne;"
+ "addne r2,r2,#2;"
+ "movne r1,r1,lsr #2;"
+ "tst r1,#0x00020000;"
++ "itt ne;"
+ "addne r2,r2,#1;"
+ "movne r1,r1,lsr #1;"
+ "tst r1,#0x00010000;"
++ "it ne;"
+ "addne r2,r2,#1;"
+ "mov %0,%0,lsr r2;"
+ "mov %1,%1,lsr r2;"
+@@ -222,15 +232,19 @@ static inline void lsp_norm_asm(ogg_uint32_t *qip,ogg_int32_t *qexpp){
+ ogg_int32_t qexp=*qexpp;
+
+ asm("tst %0,#0x0000ff00;"
++ "itt eq;"
+ "moveq %0,%0,lsl #8;"
+ "subeq %1,%1,#8;"
+ "tst %0,#0x0000f000;"
++ "itt eq;"
+ "moveq %0,%0,lsl #4;"
+ "subeq %1,%1,#4;"
+ "tst %0,#0x0000c000;"
++ "itt eq;"
+ "moveq %0,%0,lsl #2;"
+ "subeq %1,%1,#2;"
+ "tst %0,#0x00008000;"
++ "itt eq;"
+ "moveq %0,%0,lsl #1;"
+ "subeq %1,%1,#1;"
+ : "+r"(qi),"+r"(qexp)
+--
+1.7.9.5
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/tremor/tremor_20150107.bb b/import-layers/yocto-poky/meta/recipes-multimedia/tremor/tremor_20150107.bb
new file mode 100644
index 000000000..937894a73
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/tremor/tremor_20150107.bb
@@ -0,0 +1,27 @@
+SUMMARY = "Fixed-point decoder"
+DESCRIPTION = "tremor is a fixed point implementation of the vorbis codec."
+SECTION = "libs"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=db1b7a668b2a6f47b2af88fb008ad555 \
+ file://os.h;beginline=3;endline=14;md5=5c0af5e1bedef3ce8178c89f48cd6f1f"
+DEPENDS = "libogg"
+SRCDATE = "${PV}"
+PR = "r1"
+
+# SVN support for upstream version check isn't implemented yet
+RECIPE_UPSTREAM_VERSION = "20150107"
+RECIPE_UPSTREAM_DATE = "Jan 07, 2015"
+CHECK_DATE = "Aug 12, 2015"
+
+SRC_URI = "svn://svn.xiph.org/trunk;module=Tremor;rev=19427;protocol=http \
+ file://obsolete_automake_macros.patch;striplevel=0 \
+ file://tremor-arm-thumb2.patch \
+"
+
+S = "${WORKDIR}/Tremor"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--enable-shared"
+
+ARM_INSTRUCTION_SET = "arm"
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.0.bb
new file mode 100644
index 000000000..c89adac5d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/webp/libwebp_0.5.0.bb
@@ -0,0 +1,49 @@
+SUMMARY = "WebP is an image format designed for the Web"
+DESCRIPTION = "WebP is a method of lossy and lossless compression that can be \
+ used on a large variety of photographic, translucent and \
+ graphical images found on the web. The degree of lossy \
+ compression is adjustable so a user can choose the trade-off \
+ between file size and image quality. WebP typically achieves \
+ an average of 30% more compression than JPEG and JPEG 2000, \
+ without loss of image quality."
+HOMEPAGE = "https://developers.google.com/speed/webp/"
+SECTION = "libs"
+
+LICENSE = "BSD"
+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"
+
+UPSTREAM_CHECK_URI = "http://downloads.webmproject.org/releases/webp/index.html"
+
+EXTRA_OECONF = " \
+ --disable-experimental \
+ --disable-wic \
+ --enable-libwebpmux \
+ --enable-libwebpdemux \
+ --enable-threading \
+"
+
+inherit autotools lib_package
+
+PACKAGECONFIG ??= ""
+
+# libwebpdecoder is a subset of libwebp, don't build it unless requested
+PACKAGECONFIG[decoder] = "--enable-libwebpdecoder,--disable-libwebpdecoder"
+
+# Apply for examples programs: cwebp and dwebp
+PACKAGECONFIG[gif] = "--enable-gif,--disable-gif,giflib"
+PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg"
+PACKAGECONFIG[png] = "--enable-png,--disable-png,,libpng"
+PACKAGECONFIG[tiff] = "--enable-tiff,--disable-tiff,tiff"
+
+# Apply only for example program vwebp
+PACKAGECONFIG[gl] = "--enable-gl,--disable-gl,mesa-glut"
+
+PACKAGES =+ "${PN}-gif2webp"
+
+DESCRIPTION_${PN}-gif2webp = "Simple tool to convert animated GIFs to WebP"
+FILES_${PN}-gif2webp = "${bindir}/gif2webp"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/x264/x264/don-t-default-to-cortex-a9-with-neon.patch b/import-layers/yocto-poky/meta/recipes-multimedia/x264/x264/don-t-default-to-cortex-a9-with-neon.patch
new file mode 100644
index 000000000..bf72fca68
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/x264/x264/don-t-default-to-cortex-a9-with-neon.patch
@@ -0,0 +1,29 @@
+-march flag is not in CFLAGS so this will always default to -mcpu=cortex-a8
+-mfpu=neon.
+
+Upstream-Status: Pending
+Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
+
+diff --git a/configure b/configure
+index 2916036..f4ece40 100755
+--- a/configure
++++ b/configure
+@@ -773,9 +773,6 @@ if [ $asm = auto -a \( $ARCH = X86 -o $ARCH = X86_64 \) ] ; then
+ fi
+
+ if [ $asm = auto -a $ARCH = ARM ] ; then
+- # set flags so neon is built by default
+- echo $CFLAGS | grep -Eq '(-mcpu|-march|-mfpu)' || CFLAGS="$CFLAGS -mcpu=cortex-a8 -mfpu=neon"
+-
+ if cc_check '' '' '__asm__("rev ip, ip");' ; then define HAVE_ARMV6
+ cc_check '' '' '__asm__("movt r0, #0");' && define HAVE_ARMV6T2
+ cc_check '' '' '__asm__("vadd.i16 q0, q0, q0");' && define HAVE_NEON
+@@ -788,8 +785,6 @@ if [ $asm = auto -a $ARCH = ARM ] ; then
+ fi
+
+ if [ $asm = auto -a $ARCH = AARCH64 ] ; then
+- # set flags so neon is built by default
+- echo $CFLAGS | grep -Eq '(-mcpu|-march|-mfpu|-arch)' || CFLAGS="$CFLAGS -arch arm64 -mfpu=neon"
+
+ if cc_check '' '' '__asm__("cmeq v0.8h, v0.8h, #0");' ; then define HAVE_NEON
+ ASFLAGS="$ASFLAGS -c"
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
new file mode 100644
index 000000000..0a6990980
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/x264/x264_git.bb
@@ -0,0 +1,55 @@
+SUMMARY = "H.264/MPEG-4 AVC video encoder"
+DESCRIPTION = "A free software library and application for encoding video streams into the H.264/MPEG-4 AVC format."
+HOMEPAGE = "http://www.videolan.org/developers/x264.html"
+
+LICENSE = "GPLv2"
+LICENSE_FLAGS = "commercial"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+DEPENDS = "yasm-native"
+
+SRC_URI = "git://git.videolan.org/x264.git \
+ file://don-t-default-to-cortex-a9-with-neon.patch \
+ "
+
+SRCREV = "c8a773ebfca148ef04f5a60d42cbd7336af0baf6"
+
+PV = "r2491+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+inherit lib_package pkgconfig perlnative
+
+X264_DISABLE_ASM = ""
+X264_DISABLE_ASM_armv4 = "--disable-asm"
+X264_DISABLE_ASM_armv5 = "--disable-asm"
+X264_DISABLE_ASM_powerpc = "${@bb.utils.contains("TUNE_FEATURES", "spe", "--disable-asm", "", d)}"
+
+EXTRA_OECONF = '--prefix=${prefix} \
+ --host=${HOST_SYS} \
+ --libdir=${libdir} \
+ --cross-prefix=${TARGET_PREFIX} \
+ --sysroot=${STAGING_DIR_TARGET} \
+ --enable-shared \
+ --enable-static \
+ --disable-lavf \
+ --disable-swscale \
+ --enable-pic \
+ ${X264_DISABLE_ASM} \
+ '
+
+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"
+
OpenPOWER on IntegriCloud