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

Otavio Salvador otavio.salvador at ossystems.com.br
Tue Dec 19 08:37:37 PST 2017


same.

On Mon, Dec 18, 2017 at 3:20 PM, Stefan Agner <stefan at agner.ch> wrote:
> 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   |  3 ++
>  2 files changed, 49 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..87ccb1ac
> --- /dev/null
> +++ b/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.12.%.bbappend
> @@ -0,0 +1,3 @@
> +SRC_URI_append = " \
> +    file://0002-gstavcodecmap-Do-not-require-a-channel-mask.patch \
> +"
> --
> 2.13.6
>
> --
> _______________________________________________
> meta-freescale mailing list
> meta-freescale at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-freescale



-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


More information about the meta-freescale mailing list