[meta-freescale] [PATCH v3 6/6] gstreamer1.0-libav: Add NXP specific patches

Stefan Agner stefan at agner.ch
Wed Dec 20 09:09:50 PST 2017


From: Stefan Agner <stefan.agner at toradex.com>

Add NXP specific patches from morty-4.9.51-mx8_beta branch. This
allows to use imx-gst1.0-plugin 4.3.1 with gstreamer 1.12.2.

Signed-off-by: Stefan Agner <stefan.agner at toradex.com>
---
 ...tavcodecmap-Do-not-require-a-channel-mask.patch | 46 ++++++++++++++++++++++
 .../gstreamer/gstreamer1.0-libav_1.12.%.bbappend   |  8 ++++
 2 files changed, 54 insertions(+)
 create mode 100644 recipes-multimedia/gstreamer/gstreamer1.0-libav/0002-gstavcodecmap-Do-not-require-a-channel-mask.patch
 create mode 100644 recipes-multimedia/gstreamer/gstreamer1.0-libav_1.12.%.bbappend

diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-libav/0002-gstavcodecmap-Do-not-require-a-channel-mask.patch b/recipes-multimedia/gstreamer/gstreamer1.0-libav/0002-gstavcodecmap-Do-not-require-a-channel-mask.patch
new file mode 100644
index 00000000..b499d213
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-libav/0002-gstavcodecmap-Do-not-require-a-channel-mask.patch
@@ -0,0 +1,46 @@
+From 1553cc0f1843213801767dedb973e30db2d23855 Mon Sep 17 00:00:00 2001
+From: Mathieu Duponchelle <mathieu.duponchelle at opencreed.com>
+Date: Thu, 17 Aug 2017 14:28:22 +0200
+Subject: [PATCH] gstavcodecmap: Do not require a channel-mask
+
+.. for mono or stereo input.
+
+Upstream-Status: Backport [1.13.1]
+
+https://bugzilla.gnome.org/show_bug.cgi?id=786401
+---
+ ext/libav/gstavcodecmap.c | 17 ++++++++++++-----
+ 1 file changed, 12 insertions(+), 5 deletions(-)
+
+diff --git a/ext/libav/gstavcodecmap.c b/ext/libav/gstavcodecmap.c
+index 35a2ca0..7033f54 100644
+--- a/ext/libav/gstavcodecmap.c
++++ b/ext/libav/gstavcodecmap.c
+@@ -651,12 +651,19 @@ gst_ff_aud_caps_new (AVCodecContext * context, AVCodec * codec,
+ 
+           if (gst_audio_channel_positions_to_mask (pos, nbits_set, FALSE,
+                   &mask)) {
+-            GstCaps *tmp =
+-                gst_caps_new_simple (mimetype, "channel-mask", GST_TYPE_BITMASK,
+-                mask,
+-                "channels", G_TYPE_INT, nbits_set, NULL);
++            GstStructure *s =
++                gst_structure_new (mimetype, "channels", G_TYPE_INT, nbits_set,
++                NULL);
++
++            /* No need to require a channel mask for mono or stereo */
++            if (!(nbits_set == 1 && pos[0] == GST_AUDIO_CHANNEL_POSITION_MONO)
++                && !(nbits_set == 2
++                    && pos[0] == GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT
++                    && pos[1] == GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT))
++              gst_structure_set (s, "channel-mask", GST_TYPE_BITMASK, mask,
++                  NULL);
+ 
+-            gst_caps_append (caps, tmp);
++            gst_caps_append_structure (caps, s);
+           }
+         }
+         layouts++;
+-- 
+1.9.1
+
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.12.%.bbappend b/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.12.%.bbappend
new file mode 100644
index 00000000..b51d88be
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.12.%.bbappend
@@ -0,0 +1,8 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI_IMX_PATCHES = " \
+    file://0002-gstavcodecmap-Do-not-require-a-channel-mask.patch \
+"
+
+SRC_URI_append_mx6 = "${SRC_URI_IMX_PATCHES}"
+SRC_URI_append_mx7 = "${SRC_URI_IMX_PATCHES}"
-- 
2.13.6



More information about the meta-freescale mailing list