aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-multimedia
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-multimedia')
-rw-r--r--recipes-multimedia/alsa/alsa-lib/0001-add-conf-for-multichannel-support-in-imx.patch18
-rw-r--r--recipes-multimedia/alsa/alsa-lib/0001-pcm-rate-fix-the-crash-in-snd_pcm_rate_may_wait_for_.patch41
-rwxr-xr-xrecipes-multimedia/alsa/alsa-lib/0004-pcm-Don-t-store-the-state-for-SND_PCM_STATE_SUSPENDE.patch69
-rw-r--r--recipes-multimedia/alsa/alsa-lib/0005-add-ak4458-conf-for-multichannel-support.patch35
-rw-r--r--recipes-multimedia/alsa/alsa-lib/0006-add-conf-for-iMX-XCVR-sound-card.patch117
-rw-r--r--recipes-multimedia/alsa/alsa-lib/0007-add-conf-for-imx-cs42448-sound-card.patch107
-rw-r--r--recipes-multimedia/alsa/alsa-lib_%.bbappend13
-rw-r--r--recipes-multimedia/alsa/imx-alsa-plugins_1.0.26.bb36
-rw-r--r--recipes-multimedia/alsa/imx-alsa-plugins_git.bb44
-rw-r--r--recipes-multimedia/ffmpeg/ffmpeg/0001-libavutil-include-assembly-with-full-path-from-sourc.patch97
-rw-r--r--recipes-multimedia/ffmpeg/ffmpeg_4.4.1.bb185
-rw-r--r--recipes-multimedia/gstreamer/files/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch35
-rw-r--r--recipes-multimedia/gstreamer/files/0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch42
-rw-r--r--recipes-multimedia/gstreamer/files/gtk-doc-tweaks.patch47
-rw-r--r--recipes-multimedia/gstreamer/gst-devtools/0001-connect-has-a-different-signature-on-musl.patch38
-rw-r--r--recipes-multimedia/gstreamer/gst-devtools_1.22.0.imx.bb56
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-Disable-yasm-for-libav-when-disable-yasm.patch33
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-configure-check-for-armv7ve-variant.patch35
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-fix-host-contamination.patch36
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-libav/ffmpeg-6.0.patch49
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-libav/mips64_cpu_detection.patch32
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-libav/workaround-to-build-gst-libav-for-i586-with-gcc.patch26
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-libav_1.16.0.bb70
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-libav_1.22.0.imx.bb36
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-omx_%.bbappend1
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-omx_1.22.0.imx.bb52
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch33
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/avoid-including-sys-poll.h-directly.patch30
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch61
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch85
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch28
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.imx.bb171
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.22.5.imx.bb223
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch301
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-gstallocator-Fix-typcasts.patch47
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch35
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-riff-add-missing-include-directories-when-calling-in.patch28
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/make-gio_unix_2_0-dependency-configurable.patch45
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.%.bbappend3
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.imx.bb84
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.22.%.bbappend17
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.22.5.imx.bb146
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-common.inc47
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.%.bbappend3
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.imx.bb83
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.22.5.imx.bb127
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_2.2.0.bb68
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_git.bb71
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-license.inc19
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc73
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.16.0.bb40
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.22.0.imx.bb52
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-python_1.22.0.imx.bb32
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.16.0.bb34
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.22.0.imx.bb37
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-vaapi_%.bbappend1
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.22.0.imx.bb64
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0/0001-tests-respect-the-idententaion-used-in-meson.patch34
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0/0002-tests-add-support-for-install-the-tests.patch107
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-use-a-dictionaries-for-environment.patch50
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-add-helper-script-to-run-the-installed_tests.patch74
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-remove-gstbin-test_watch_for_state_change-test.patch107
-rwxr-xr-xrecipes-multimedia/gstreamer/gstreamer1.0/run-ptest2
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0_1.16.imx.bb77
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0_1.22.5.imx.bb105
-rw-r--r--recipes-multimedia/gstreamer/imx-gst1.0-plugin/0001-aiurdemux-Fix-type-of-USER_DATA_LOCATION.patch33
-rw-r--r--recipes-multimedia/gstreamer/imx-gst1.0-plugin/0002-aiurdemux.h-Include-glib-gprintf.h-for-g_printf-prot.patch28
-rw-r--r--recipes-multimedia/gstreamer/imx-gst1.0-plugin/0003-grecorder-Fix-build-with-clang.patch44
-rw-r--r--recipes-multimedia/gstreamer/imx-gst1.0-plugin/0004-gstimxcommon-Return-0-instead-of-NULL-for-a-function.patch87
-rw-r--r--recipes-multimedia/gstreamer/imx-gst1.0-plugin/0005-aiurstreamcache-Include-gst-gstinfo.h.patch28
-rw-r--r--recipes-multimedia/gstreamer/imx-gst1.0-plugin/0006-Fix-typecast-warnings-found-with-clang.patch61
-rw-r--r--recipes-multimedia/gstreamer/imx-gst1.0-plugin/0007-gstimxv4l2-Fix-typecasting-errors.patch30
-rw-r--r--recipes-multimedia/gstreamer/imx-gst1.0-plugin/0008-beepdec-Declare-beep_register_external_typefinders.patch32
-rw-r--r--recipes-multimedia/gstreamer/imx-gst1.0-plugin/0009-gstimxv4l2.c-Fix-incompatible-integer-to-pointer-con.patch41
-rw-r--r--recipes-multimedia/gstreamer/imx-gst1.0-plugin/0010-provide-declaration-for-aiur_register_external_typef.patch28
-rw-r--r--recipes-multimedia/gstreamer/imx-gst1.0-plugin/0011-meson-Undef-_TIME_BITS-along-with-_FILE_OFFSET_BITS.patch34
-rw-r--r--recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.5.1.bb83
-rw-r--r--recipes-multimedia/gstreamer/imx-gst1.0-plugin_git.bb110
-rw-r--r--recipes-multimedia/imx-codec/imx-codec_4.8.3.bb (renamed from recipes-multimedia/imx-codec/imx-codec_4.5.1.bb)72
-rw-r--r--recipes-multimedia/imx-dsp/imx-dsp-codec-ext_2.1.7.bb27
-rw-r--r--recipes-multimedia/imx-dsp/imx-dsp_2.1.7.bb57
-rw-r--r--recipes-multimedia/imx-dspc-asrc/imx-dspc-asrc_1.0.1.bb6
-rw-r--r--recipes-multimedia/imx-opencl-converter/imx-opencl-converter_0.2.0.bb18
-rw-r--r--recipes-multimedia/imx-parser/imx-parser_4.8.3.bb (renamed from recipes-multimedia/imx-parser/imx-parser_4.5.1.bb)24
-rw-r--r--recipes-multimedia/imx-sw-pdm/imx-sw-pdm_1.0.3.bb22
-rw-r--r--recipes-multimedia/imx-vpuwrap/imx-vpuwrap_4.5.1.bb32
-rw-r--r--recipes-multimedia/imx-vpuwrap/imx-vpuwrap_git.bb28
-rw-r--r--recipes-multimedia/libimxvpuapi/libimxvpuapi2_2.3.0.bb (renamed from recipes-multimedia/libimxvpuapi/libimxvpuapi2_git.bb)18
-rw-r--r--recipes-multimedia/libimxvpuapi/libimxvpuapi_git.bb6
-rw-r--r--recipes-multimedia/pipewire/pipewire/0001-launch-allow-pipewire-pulse-can-be-started-by-root.patch41
-rw-r--r--recipes-multimedia/pipewire/pipewire_%.bbappend14
-rw-r--r--recipes-multimedia/pulseaudio/pulseaudio/imx-nxp-bsp/0001-Fix-pulseaudio-mutex-issue-when-do-pause-in-gstreame.patch32
-rw-r--r--recipes-multimedia/pulseaudio/pulseaudio/imx-nxp-bsp/0100-pulseaudio-remove-the-control-for-speaker-headphone-widge.patch (renamed from recipes-multimedia/pulseaudio/pulseaudio/imx/pulseaudio-remove-the-control-for-speaker-headphone-widge.patch)22
-rw-r--r--recipes-multimedia/pulseaudio/pulseaudio/imx-nxp-bsp/daemon.conf (renamed from recipes-multimedia/pulseaudio/pulseaudio/imx/daemon.conf)2
-rw-r--r--recipes-multimedia/pulseaudio/pulseaudio/imx-nxp-bsp/default.pa (renamed from recipes-multimedia/pulseaudio/pulseaudio/imx/default.pa)2
-rw-r--r--recipes-multimedia/pulseaudio/pulseaudio_%.bbappend32
-rwxr-xr-xrecipes-multimedia/tinycompress/tinycompress/0001-tinycompress-Add-id3-decoding.patch1002
-rwxr-xr-xrecipes-multimedia/tinycompress/tinycompress/0002-cplay-Support-wave-file.patch215
-rwxr-xr-xrecipes-multimedia/tinycompress/tinycompress/0003-cplay-Add-pause-feature.patch146
-rwxr-xr-xrecipes-multimedia/tinycompress/tinycompress/0004-tinycompress-pass-NULL-buffer-with-0-size-to-driver.patch40
-rwxr-xr-xrecipes-multimedia/tinycompress/tinycompress/0005-cplay-Support-aac-streams.patch251
-rw-r--r--recipes-multimedia/tinycompress/tinycompress_1.1.6.bb16
102 files changed, 4889 insertions, 1869 deletions
diff --git a/recipes-multimedia/alsa/alsa-lib/0001-add-conf-for-multichannel-support-in-imx.patch b/recipes-multimedia/alsa/alsa-lib/0001-add-conf-for-multichannel-support-in-imx.patch
index 747b62c5..7d20c678 100644
--- a/recipes-multimedia/alsa/alsa-lib/0001-add-conf-for-multichannel-support-in-imx.patch
+++ b/recipes-multimedia/alsa/alsa-lib/0001-add-conf-for-multichannel-support-in-imx.patch
@@ -1,14 +1,15 @@
-From cc06048dcd722049f92ab17958760bd798fb4781 Mon Sep 17 00:00:00 2001
+From 49a7eac8e02c33cae8a168e6d22d9ff8aaf86d44 Mon Sep 17 00:00:00 2001
From: Shengjiu Wang <b02247@freescale.com>
Date: Thu, 5 Jun 2014 17:37:47 +0800
Subject: [PATCH] add conf for multichannel support in imx
-Upstream Status: Inappropriate [platform specific]
+Upstream-Status: Inappropriate [platform specific]
Signed-off-by: Shengjiu Wang <b02247@freescale.com>
+
---
- src/conf/cards/CS42888.conf | 94 ++++++++++++++++++++++++++++++++++++++++++++
- src/conf/cards/IMX-HDMI.conf | 67 +++++++++++++++++++++++++++++++
+ src/conf/cards/CS42888.conf | 94 ++++++++++++++++++++++++++++++++++++
+ src/conf/cards/IMX-HDMI.conf | 67 +++++++++++++++++++++++++
src/conf/cards/Makefile.am | 4 +-
src/conf/cards/aliases.conf | 2 +
4 files changed, 166 insertions(+), 1 deletion(-)
@@ -204,18 +205,15 @@ index 00999f0..fbf0697 100644
if BUILD_ALISP
cfg_files += aliases.alisp
diff --git a/src/conf/cards/aliases.conf b/src/conf/cards/aliases.conf
-index 18a920f..2c422ee 100644
+index 7e352f7..a9e6d76 100644
--- a/src/conf/cards/aliases.conf
+++ b/src/conf/cards/aliases.conf
@@ -57,6 +57,8 @@ CMI8786 cards.CMI8788
CMI8787 cards.CMI8788
pistachio cards.pistachio-card
VC4-HDMI cards.vc4-hdmi
-+cs42888-audio cards.CS42888
++imx-cs42888 cards.CS42888
+imx-hdmi-soc cards.IMX-HDMI
+ <confdir:ctl/default.conf>
<confdir:pcm/default.conf>
- <confdir:pcm/dmix.conf>
---
-2.7.4
-
diff --git a/recipes-multimedia/alsa/alsa-lib/0001-pcm-rate-fix-the-crash-in-snd_pcm_rate_may_wait_for_.patch b/recipes-multimedia/alsa/alsa-lib/0001-pcm-rate-fix-the-crash-in-snd_pcm_rate_may_wait_for_.patch
new file mode 100644
index 00000000..5ec0d2e9
--- /dev/null
+++ b/recipes-multimedia/alsa/alsa-lib/0001-pcm-rate-fix-the-crash-in-snd_pcm_rate_may_wait_for_.patch
@@ -0,0 +1,41 @@
+From aa4f56c3c952269c36464cc0da9db5a1381648fa Mon Sep 17 00:00:00 2001
+From: Jaroslav Kysela <perex@perex.cz>
+Date: Wed, 9 Nov 2022 08:11:42 +0100
+Subject: [PATCH] pcm: rate - fix the crash in
+
+Upstream-Status: Backport
+
+ snd_pcm_rate_may_wait_for_avail_min()
+
+The pcm argument passed to the conversion function in
+snd_pcm_plugin_may_wait_for_avail_min_conv() should be
+pcm->fast_op_arg.
+
+Test command: arecord -Dplughw:x -r12000 -c2 -fS16_LE -M temp.wav
+
+Fixes: d9dbb57b ("pcm: rate - rewrite the may_wait_for_avail_min callback for the rate plugin")
+
+BugLink: https://lore.kernel.org/alsa-devel/1667793912-18957-1-git-send-email-shengjiu.wang@nxp.com/
+Fixes: https://github.com/alsa-project/alsa-lib/issues/282
+Reported-by: Shengjiu Wang <shengjiu.wang@nxp.com>
+Signed-off-by: Jaroslav Kysela <perex@perex.cz>
+---
+ src/pcm/pcm_plugin.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/pcm/pcm_plugin.c b/src/pcm/pcm_plugin.c
+index 6bb90b8b..ec64604c 100644
+--- a/src/pcm/pcm_plugin.c
++++ b/src/pcm/pcm_plugin.c
+@@ -622,7 +622,7 @@ int snd_pcm_plugin_may_wait_for_avail_min_conv(
+ * This code is also used by extplug, but extplug does not allow to alter the sampling rate.
+ */
+ if (conv)
+- needed_slave_avail_min = conv(pcm, needed_slave_avail_min);
++ needed_slave_avail_min = conv(pcm->fast_op_arg, needed_slave_avail_min);
+
+ if (slave->avail_min != needed_slave_avail_min) {
+ snd_pcm_sw_params_t *swparams;
+--
+2.34.1
+
diff --git a/recipes-multimedia/alsa/alsa-lib/0004-pcm-Don-t-store-the-state-for-SND_PCM_STATE_SUSPENDE.patch b/recipes-multimedia/alsa/alsa-lib/0004-pcm-Don-t-store-the-state-for-SND_PCM_STATE_SUSPENDE.patch
deleted file mode 100755
index 4d28a77f..00000000
--- a/recipes-multimedia/alsa/alsa-lib/0004-pcm-Don-t-store-the-state-for-SND_PCM_STATE_SUSPENDE.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From 93607819d90ddf9bbdad8bbbe4af5d917ca572dc Mon Sep 17 00:00:00 2001
-From: Shengjiu Wang <shengjiu.wang@freescale.com>
-Date: Tue, 10 May 2016 15:09:26 +0800
-Subject: [PATCH 2/2] pcm: Don't store the state for SND_PCM_STATE_SUSPENDED
-
-The resume function don't update the dmix->state, if store SUSPENDED
-state in snd_pcm_dmix_state, the write function after resume will
-return error -ESTRPIPE, because the snd_pcm_write_areas() will check
-the state of the pcm device.
-This patch remove the store SND_PCM_STATE_SUSPENDED state operation
-for dmix,dshare,dsnoop.
-
-Upstream-Status: Pending
-
-Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
----
- src/pcm/pcm_dmix.c | 2 +-
- src/pcm/pcm_dshare.c | 2 +-
- src/pcm/pcm_dsnoop.c | 2 +-
- 3 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/pcm/pcm_dmix.c b/src/pcm/pcm_dmix.c
-index a6a8f3a..89c07d1 100644
---- a/src/pcm/pcm_dmix.c
-+++ b/src/pcm/pcm_dmix.c
-@@ -466,9 +466,9 @@ static snd_pcm_state_t snd_pcm_dmix_state(snd_pcm_t *pcm)
- snd_pcm_state_t state;
- state = snd_pcm_state(dmix->spcm);
- switch (state) {
-- case SND_PCM_STATE_SUSPENDED:
- case SND_PCM_STATE_DISCONNECTED:
- dmix->state = state;
-+ case SND_PCM_STATE_SUSPENDED:
- return state;
- case SND_PCM_STATE_XRUN:
- if ((err = snd_pcm_direct_slave_recover(dmix)) < 0)
-diff --git a/src/pcm/pcm_dshare.c b/src/pcm/pcm_dshare.c
-index 7cdfea2..e0b4ea7 100644
---- a/src/pcm/pcm_dshare.c
-+++ b/src/pcm/pcm_dshare.c
-@@ -261,9 +261,9 @@ static snd_pcm_state_t snd_pcm_dshare_state(snd_pcm_t *pcm)
- snd_pcm_state_t state;
- state = snd_pcm_state(dshare->spcm);
- switch (state) {
-- case SND_PCM_STATE_SUSPENDED:
- case SND_PCM_STATE_DISCONNECTED:
- dshare->state = state;
-+ case SND_PCM_STATE_SUSPENDED:
- return state;
- case SND_PCM_STATE_XRUN:
- if ((err = snd_pcm_direct_slave_recover(dshare)) < 0)
-diff --git a/src/pcm/pcm_dsnoop.c b/src/pcm/pcm_dsnoop.c
-index 539b671..03df6ff 100644
---- a/src/pcm/pcm_dsnoop.c
-+++ b/src/pcm/pcm_dsnoop.c
-@@ -212,9 +212,9 @@ static snd_pcm_state_t snd_pcm_dsnoop_state(snd_pcm_t *pcm)
- snd_pcm_state_t state;
- state = snd_pcm_state(dsnoop->spcm);
- switch (state) {
-- case SND_PCM_STATE_SUSPENDED:
- case SND_PCM_STATE_DISCONNECTED:
- dsnoop->state = state;
-+ case SND_PCM_STATE_SUSPENDED:
- return state;
- case SND_PCM_STATE_XRUN:
- if ((err = snd_pcm_direct_slave_recover(dsnoop)) < 0)
---
-2.7.4
-
diff --git a/recipes-multimedia/alsa/alsa-lib/0005-add-ak4458-conf-for-multichannel-support.patch b/recipes-multimedia/alsa/alsa-lib/0005-add-ak4458-conf-for-multichannel-support.patch
index a07f60d6..b25aa910 100644
--- a/recipes-multimedia/alsa/alsa-lib/0005-add-ak4458-conf-for-multichannel-support.patch
+++ b/recipes-multimedia/alsa/alsa-lib/0005-add-ak4458-conf-for-multichannel-support.patch
@@ -1,7 +1,10 @@
-From 1641ce8c724018365d7fa598f9a70c6492e7c271 Mon Sep 17 00:00:00 2001
+From d78b7e2b964c9713c2e9889f4ec85922528ba971 Mon Sep 17 00:00:00 2001
From: Shengjiu Wang <shengjiu.wang@nxp.com>
Date: Wed, 31 Jan 2018 15:06:53 +0800
Subject: [PATCH] add ak4458 conf for multichannel support
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
one limitation is that ALSA and pulseaudio only support
maximum 8 channels, but ak4458 may support 16 channels
@@ -9,17 +12,19 @@ maximum 8 channels, but ak4458 may support 16 channels
Upstream-Status: Inappropriate [i.MX specific]
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
+
---
- src/conf/cards/AK4458.conf | 74 +++++++++++++++++++++++++++++++++++++++++++++
+ src/conf/cards/AK4458.conf | 74 +++++++++++++++++++++++++++++++++++++
src/conf/cards/Makefile.am | 3 +-
src/conf/cards/aliases.conf | 1 +
3 files changed, 77 insertions(+), 1 deletion(-)
create mode 100644 src/conf/cards/AK4458.conf
-Index: alsa-lib-1.1.6/src/conf/cards/AK4458.conf
-===================================================================
+diff --git a/src/conf/cards/AK4458.conf b/src/conf/cards/AK4458.conf
+new file mode 100644
+index 0000000..3b5b195
--- /dev/null
-+++ alsa-lib-1.1.6/src/conf/cards/AK4458.conf
++++ b/src/conf/cards/AK4458.conf
@@ -0,0 +1,74 @@
+#
+# Configuration for the AK4458 chip
@@ -95,10 +100,10 @@ Index: alsa-lib-1.1.6/src/conf/cards/AK4458.conf
+ }
+ slave.channels 8
+}
-Index: alsa-lib-1.1.6/src/conf/cards/Makefile.am
-===================================================================
---- alsa-lib-1.1.6.orig/src/conf/cards/Makefile.am
-+++ alsa-lib-1.1.6/src/conf/cards/Makefile.am
+diff --git a/src/conf/cards/Makefile.am b/src/conf/cards/Makefile.am
+index fbf0697..34fa5a3 100644
+--- a/src/conf/cards/Makefile.am
++++ b/src/conf/cards/Makefile.am
@@ -60,7 +60,8 @@ cfg_files = aliases.conf \
VXPocket.conf \
VXPocket440.conf \
@@ -109,15 +114,15 @@ Index: alsa-lib-1.1.6/src/conf/cards/Makefile.am
if BUILD_ALISP
cfg_files += aliases.alisp
-Index: alsa-lib-1.1.6/src/conf/cards/aliases.conf
-===================================================================
---- alsa-lib-1.1.6.orig/src/conf/cards/aliases.conf
-+++ alsa-lib-1.1.6/src/conf/cards/aliases.conf
+diff --git a/src/conf/cards/aliases.conf b/src/conf/cards/aliases.conf
+index a9e6d76..2f0a22a 100644
+--- a/src/conf/cards/aliases.conf
++++ b/src/conf/cards/aliases.conf
@@ -59,6 +59,7 @@ pistachio cards.pistachio-card
VC4-HDMI cards.vc4-hdmi
- cs42888-audio cards.CS42888
+ imx-cs42888 cards.CS42888
imx-hdmi-soc cards.IMX-HDMI
+ak4458-audio cards.AK4458
+ <confdir:ctl/default.conf>
<confdir:pcm/default.conf>
- <confdir:pcm/dmix.conf>
diff --git a/recipes-multimedia/alsa/alsa-lib/0006-add-conf-for-iMX-XCVR-sound-card.patch b/recipes-multimedia/alsa/alsa-lib/0006-add-conf-for-iMX-XCVR-sound-card.patch
new file mode 100644
index 00000000..f801309e
--- /dev/null
+++ b/recipes-multimedia/alsa/alsa-lib/0006-add-conf-for-iMX-XCVR-sound-card.patch
@@ -0,0 +1,117 @@
+From cfbe756d55a303803805d3e8e3d3cf3b97866964 Mon Sep 17 00:00:00 2001
+From: Viorel Suman <viorel.suman@nxp.com>
+Date: Mon, 9 Mar 2020 14:25:46 +0200
+Subject: [PATCH] add conf for iMX XCVR sound card
+
+Upstream-Status: Pending
+
+Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
+
+---
+ src/conf/cards/IMX-XCVR.conf | 69 ++++++++++++++++++++++++++++++++++++
+ src/conf/cards/Makefile.am | 3 +-
+ src/conf/cards/aliases.conf | 1 +
+ 3 files changed, 72 insertions(+), 1 deletion(-)
+ create mode 100755 src/conf/cards/IMX-XCVR.conf
+
+diff --git a/src/conf/cards/IMX-XCVR.conf b/src/conf/cards/IMX-XCVR.conf
+new file mode 100755
+index 0000000..ee323c7
+--- /dev/null
++++ b/src/conf/cards/IMX-XCVR.conf
+@@ -0,0 +1,69 @@
++#
++# Configuration for the IMX-XCVR sound card using software IEC958
++# subframe conversion
++#
++IMX-XCVR.pcm.default {
++ @args [ CARD ]
++ @args.CARD { type string }
++ type asym
++ playback.pcm {
++ type linear
++ slave.pcm {
++ @func concat
++ strings [ "iec958:" $CARD ]
++ }
++ slave.format S24_LE
++ }
++ capture.pcm {
++ type plug
++ slave.pcm {
++ @func concat
++ strings [ "iec958:" $CARD ]
++ }
++ }
++}
++
++<confdir:pcm/iec958.conf>
++
++IMX-XCVR.pcm.iec958.0 {
++ @args [ CARD AES0 AES1 AES2 AES3 ]
++ @args.CARD { type string }
++ @args.AES0 { type integer }
++ @args.AES1 { type integer }
++ @args.AES2 { type integer }
++ @args.AES3 { type integer }
++ type asym
++ playback.pcm {
++ type hooks
++ slave.pcm {
++ type hw
++ card $CARD
++ }
++ hooks.0 {
++ type ctl_elems
++ hook_args [
++ {
++ interface PCM
++ name "IEC958 Playback Default"
++ preserve true
++ optional true
++ value [ $AES0 $AES1 $AES2 $AES3 ]
++ }
++ ]
++ }
++ }
++ capture.pcm {
++ type iec958
++ slave {
++ format IEC958_SUBFRAME_LE
++ pcm {
++ type plug
++ slave.pcm {
++ type hw
++ card $CARD
++ }
++ }
++ }
++ status [ $AES0 $AES1 $AES2 $AES3 ]
++ }
++}
+diff --git a/src/conf/cards/Makefile.am b/src/conf/cards/Makefile.am
+index 34fa5a3..70b9bab 100644
+--- a/src/conf/cards/Makefile.am
++++ b/src/conf/cards/Makefile.am
+@@ -61,7 +61,8 @@ cfg_files = aliases.conf \
+ VXPocket440.conf \
+ CS42888.conf \
+ IMX-HDMI.conf \
+- AK4458.conf
++ AK4458.conf \
++ IMX-XCVR.conf
+
+ if BUILD_ALISP
+ cfg_files += aliases.alisp
+diff --git a/src/conf/cards/aliases.conf b/src/conf/cards/aliases.conf
+index 2f0a22a..e824145 100644
+--- a/src/conf/cards/aliases.conf
++++ b/src/conf/cards/aliases.conf
+@@ -60,6 +60,7 @@ VC4-HDMI cards.vc4-hdmi
+ imx-cs42888 cards.CS42888
+ imx-hdmi-soc cards.IMX-HDMI
+ ak4458-audio cards.AK4458
++imx-audio-xcvr cards.IMX-XCVR
+
+ <confdir:ctl/default.conf>
+ <confdir:pcm/default.conf>
diff --git a/recipes-multimedia/alsa/alsa-lib/0007-add-conf-for-imx-cs42448-sound-card.patch b/recipes-multimedia/alsa/alsa-lib/0007-add-conf-for-imx-cs42448-sound-card.patch
new file mode 100644
index 00000000..64e15be4
--- /dev/null
+++ b/recipes-multimedia/alsa/alsa-lib/0007-add-conf-for-imx-cs42448-sound-card.patch
@@ -0,0 +1,107 @@
+From 97d5e09a4166b45c567026e51b8a25ef5d7d587d Mon Sep 17 00:00:00 2001
+From: Chancel Liu <chancel.liu@nxp.com>
+Date: Fri, 29 Jul 2022 16:12:37 +0800
+Subject: [PATCH] add conf for imx-cs42448 sound card
+
+Upstream-Status: Inappropriate [i.MX specific]
+
+Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
+---
+ src/conf/cards/CS42448.conf | 58 +++++++++++++++++++++++++++++++++++++
+ src/conf/cards/Makefile.am | 3 +-
+ src/conf/cards/aliases.conf | 1 +
+ 3 files changed, 61 insertions(+), 1 deletion(-)
+ create mode 100644 src/conf/cards/CS42448.conf
+
+diff --git a/src/conf/cards/CS42448.conf b/src/conf/cards/CS42448.conf
+new file mode 100644
+index 00000000..28ba5c48
+--- /dev/null
++++ b/src/conf/cards/CS42448.conf
+@@ -0,0 +1,58 @@
++#
++# Configuration for the CS42448 chip
++#
++
++# default with dmix & dsnoop
++CS42448.pcm.default {
++ @args [ CARD ]
++ @args.CARD {
++ type string
++ }
++ type asym
++ playback.pcm {
++ type plug
++ slave.pcm {
++ @func concat
++ strings [ "dmix:" $CARD ",FORMAT=S32_LE" ]
++ }
++ }
++ capture.pcm {
++ type plug
++ slave.pcm {
++ @func concat
++ strings [ "dsnoop:" $CARD ",FORMAT=S32_LE" ]
++ }
++ }
++}
++
++<confdir:pcm/surround51.conf>
++
++CS42448.pcm.surround51.0 {
++ @args [ CARD ]
++ @args.CARD {
++ type string
++ }
++ type plug
++ slave.pcm {
++ type hw
++ card $CARD
++ }
++ slave.channels 6
++}
++
++<confdir:pcm/surround71.conf>
++
++CS42448.pcm.surround71.0 {
++ @args [ CARD ]
++ @args.CARD {
++ type string
++ }
++ type plug
++ slave.pcm {
++ type hw
++ card $CARD
++ }
++ slave.channels 8
++}
++
++# vim: ft=alsaconf
+diff --git a/src/conf/cards/Makefile.am b/src/conf/cards/Makefile.am
+index 70b9bab3..6aba20b4 100644
+--- a/src/conf/cards/Makefile.am
++++ b/src/conf/cards/Makefile.am
+@@ -62,7 +62,8 @@ cfg_files = aliases.conf \
+ CS42888.conf \
+ IMX-HDMI.conf \
+ AK4458.conf \
+- IMX-XCVR.conf
++ IMX-XCVR.conf \
++ CS42448.conf
+
+ if BUILD_ALISP
+ cfg_files += aliases.alisp
+diff --git a/src/conf/cards/aliases.conf b/src/conf/cards/aliases.conf
+index e824145d..a40d3731 100644
+--- a/src/conf/cards/aliases.conf
++++ b/src/conf/cards/aliases.conf
+@@ -61,6 +61,7 @@ imx-cs42888 cards.CS42888
+ imx-hdmi-soc cards.IMX-HDMI
+ ak4458-audio cards.AK4458
+ imx-audio-xcvr cards.IMX-XCVR
++imx-cs42448 cards.CS42448
+
+ <confdir:ctl/default.conf>
+ <confdir:pcm/default.conf>
+--
+2.17.1
diff --git a/recipes-multimedia/alsa/alsa-lib_%.bbappend b/recipes-multimedia/alsa/alsa-lib_%.bbappend
index 3bf3abff..65498aed 100644
--- a/recipes-multimedia/alsa/alsa-lib_%.bbappend
+++ b/recipes-multimedia/alsa/alsa-lib_%.bbappend
@@ -1,10 +1,15 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
IMX_PATCH = " \
file://0001-add-conf-for-multichannel-support-in-imx.patch \
- file://0004-pcm-Don-t-store-the-state-for-SND_PCM_STATE_SUSPENDE.patch \
file://0005-add-ak4458-conf-for-multichannel-support.patch \
+ file://0006-add-conf-for-iMX-XCVR-sound-card.patch \
+ file://0007-add-conf-for-imx-cs42448-sound-card.patch \
+ file://0001-pcm-rate-fix-the-crash-in-snd_pcm_rate_may_wait_for_.patch \
"
-SRC_URI_append_imx = "${IMX_PATCH}"
+SRC_URI:append:imx-nxp-bsp = "${IMX_PATCH}"
-PACKAGE_ARCH_imx = "${MACHINE_SOCARCH}"
+PACKAGE_ARCH:imx-nxp-bsp = "${MACHINE_SOCARCH}"
+
+GLIBC_64BIT_TIME_FLAGS = ""
+INSANE_SKIP:append = " 32bit-time"
diff --git a/recipes-multimedia/alsa/imx-alsa-plugins_1.0.26.bb b/recipes-multimedia/alsa/imx-alsa-plugins_1.0.26.bb
deleted file mode 100644
index db2f71fd..00000000
--- a/recipes-multimedia/alsa/imx-alsa-plugins_1.0.26.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright (C) 2013-2016 Freescale Semiconductor
-# Copyright (C) 2017-2019 NXP
-# Released under the MIT license (see COPYING.MIT for the terms)
-
-DESCRIPTION = "Freescale alsa-lib plugins"
-LICENSE = "GPLv2"
-SECTION = "multimedia"
-DEPENDS = "alsa-lib"
-
-# For backwards compatibility
-PROVIDES += "fsl-alsa-plugins"
-RREPLACES_${PN} = "fsl-alsa-plugins"
-RPROVIDES_${PN} = "fsl-alsa-plugins"
-RCONFLICTS_${PN} = "fsl-alsa-plugins"
-
-LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=94d55d512a9ba36caa9b7df079bae19f"
-
-inherit autotools pkgconfig use-imx-headers
-
-SRCBRANCH = "MM_04.05.01_1909_L4.19.35"
-SRC_URI = "git://source.codeaurora.org/external/imx/imx-alsa-plugins.git;protocol=https;branch=${SRCBRANCH}"
-SRCREV = "cde60d68ab2acee913dbfacb8aabb53d87dd3e38"
-
-S = "${WORKDIR}/git"
-
-INCLUDE_DIR = "-I${STAGING_INCDIR_IMX}"
-
-EXTRA_OECONF = "CFLAGS="${INCLUDE_DIR}""
-
-INSANE_SKIP_${PN} = "dev-so"
-
-FILES_${PN} += "${libdir}/alsa-lib/libasound_*.so"
-FILES_${PN}-dbg += "${libdir}/alsa-lib/.debug"
-FILES_${PN}-dev += "${libdir}/alsa-lib/*.la"
-
-COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"
diff --git a/recipes-multimedia/alsa/imx-alsa-plugins_git.bb b/recipes-multimedia/alsa/imx-alsa-plugins_git.bb
new file mode 100644
index 00000000..e2acf767
--- /dev/null
+++ b/recipes-multimedia/alsa/imx-alsa-plugins_git.bb
@@ -0,0 +1,44 @@
+# Copyright 2013-2016 Freescale Semiconductor
+# Copyright 2017-2023 NXP
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "Freescale alsa-lib plugins"
+LICENSE = "GPL-2.0-only"
+SECTION = "multimedia"
+DEPENDS = "alsa-lib"
+
+# For backwards compatibility
+PROVIDES += "fsl-alsa-plugins"
+RREPLACES:${PN} = "fsl-alsa-plugins"
+RPROVIDES:${PN} = "fsl-alsa-plugins"
+RCONFLICTS:${PN} = "fsl-alsa-plugins"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+inherit autotools pkgconfig use-imx-headers
+
+PV = "1.0.26+${SRCPV}"
+
+SRC_URI = "git://github.com/nxp-imx/imx-alsa-plugins.git;protocol=https;branch=${SRCBRANCH}"
+SRCBRANCH = "MM_04.08.03_2312_L6.6.y"
+SRCREV = "b2ba082e70333f187972ee4e85f63f9d2f608331"
+
+S = "${WORKDIR}/git"
+
+INCLUDE_DIR = "-I${STAGING_INCDIR_IMX}"
+
+EXTRA_OECONF = "CFLAGS="${INCLUDE_DIR}""
+
+PACKAGECONFIG ??= "${PACKAGECONFIG_SWPDM}"
+PACKAGECONFIG_SWPDM = ""
+PACKAGECONFIG_SWPDM:mx8-nxp-bsp = "swpdm"
+
+PACKAGECONFIG[swpdm] = "--enable-swpdm,--disable-swpdm,imx-sw-pdm"
+
+INSANE_SKIP:${PN} = "dev-so"
+
+FILES:${PN} += "${libdir}/alsa-lib/libasound_*.so"
+FILES:${PN}-dbg += "${libdir}/alsa-lib/.debug"
+FILES:${PN}-dev += "${libdir}/alsa-lib/*.la"
+
+COMPATIBLE_MACHINE = "(imx-nxp-bsp)"
diff --git a/recipes-multimedia/ffmpeg/ffmpeg/0001-libavutil-include-assembly-with-full-path-from-sourc.patch b/recipes-multimedia/ffmpeg/ffmpeg/0001-libavutil-include-assembly-with-full-path-from-sourc.patch
new file mode 100644
index 00000000..2b4ca0e9
--- /dev/null
+++ b/recipes-multimedia/ffmpeg/ffmpeg/0001-libavutil-include-assembly-with-full-path-from-sourc.patch
@@ -0,0 +1,97 @@
+From 24a58d70cbb3997e471366bd5afe54be9007bfb1 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 10 Nov 2020 15:32:14 +0000
+Subject: [PATCH] libavutil: include assembly with full path from source root
+
+Otherwise nasm writes the full host-specific paths into .o
+output, which breaks binary reproducibility.
+
+Upstream-Status: Submitted [by email to jamrial@gmail.com,ffmpeg-devel@ffmpeg.org]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ libavutil/x86/cpuid.asm | 2 +-
+ libavutil/x86/emms.asm | 2 +-
+ libavutil/x86/fixed_dsp.asm | 2 +-
+ libavutil/x86/float_dsp.asm | 2 +-
+ libavutil/x86/lls.asm | 2 +-
+ libavutil/x86/pixelutils.asm | 2 +-
+ 6 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/libavutil/x86/cpuid.asm b/libavutil/x86/cpuid.asm
+index c3f7866..766f77f 100644
+--- a/libavutil/x86/cpuid.asm
++++ b/libavutil/x86/cpuid.asm
+@@ -21,7 +21,7 @@
+ ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ ;******************************************************************************
+
+-%include "x86util.asm"
++%include "libavutil/x86/x86util.asm"
+
+ SECTION .text
+
+diff --git a/libavutil/x86/emms.asm b/libavutil/x86/emms.asm
+index 8611762..df84f22 100644
+--- a/libavutil/x86/emms.asm
++++ b/libavutil/x86/emms.asm
+@@ -18,7 +18,7 @@
+ ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ ;******************************************************************************
+
+-%include "x86util.asm"
++%include "libavutil/x86/x86util.asm"
+
+ SECTION .text
+
+diff --git a/libavutil/x86/fixed_dsp.asm b/libavutil/x86/fixed_dsp.asm
+index 979dd5c..2f41185 100644
+--- a/libavutil/x86/fixed_dsp.asm
++++ b/libavutil/x86/fixed_dsp.asm
+@@ -20,7 +20,7 @@
+ ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ ;******************************************************************************
+
+-%include "x86util.asm"
++%include "libavutil/x86/x86util.asm"
+
+ SECTION .text
+
+diff --git a/libavutil/x86/float_dsp.asm b/libavutil/x86/float_dsp.asm
+index 517fd63..b773e61 100644
+--- a/libavutil/x86/float_dsp.asm
++++ b/libavutil/x86/float_dsp.asm
+@@ -20,7 +20,7 @@
+ ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ ;******************************************************************************
+
+-%include "x86util.asm"
++%include "libavutil/x86/x86util.asm"
+
+ SECTION_RODATA 32
+ pd_reverse: dd 7, 6, 5, 4, 3, 2, 1, 0
+diff --git a/libavutil/x86/lls.asm b/libavutil/x86/lls.asm
+index 317fba6..d2526d1 100644
+--- a/libavutil/x86/lls.asm
++++ b/libavutil/x86/lls.asm
+@@ -20,7 +20,7 @@
+ ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ ;******************************************************************************
+
+-%include "x86util.asm"
++%include "libavutil/x86/x86util.asm"
+
+ SECTION .text
+
+diff --git a/libavutil/x86/pixelutils.asm b/libavutil/x86/pixelutils.asm
+index 36c57c5..8b45ead 100644
+--- a/libavutil/x86/pixelutils.asm
++++ b/libavutil/x86/pixelutils.asm
+@@ -21,7 +21,7 @@
+ ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ ;******************************************************************************
+
+-%include "x86util.asm"
++%include "libavutil/x86/x86util.asm"
+
+ SECTION .text
+
diff --git a/recipes-multimedia/ffmpeg/ffmpeg_4.4.1.bb b/recipes-multimedia/ffmpeg/ffmpeg_4.4.1.bb
new file mode 100644
index 00000000..5b1dedcd
--- /dev/null
+++ b/recipes-multimedia/ffmpeg/ffmpeg_4.4.1.bb
@@ -0,0 +1,185 @@
+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 = "GPL-2.0-or-later & LGPL-2.1-or-later & ISC & MIT & BSD-2-Clause & BSD-3-Clause & IJG"
+LICENSE:${PN} = "GPL-2.0-or-later"
+LICENSE:libavcodec = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}"
+LICENSE:libavdevice = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}"
+LICENSE:libavfilter = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}"
+LICENSE:libavformat = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}"
+LICENSE:libavresample = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}"
+LICENSE:libavutil = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}"
+LICENSE:libpostproc = "GPL-2.0-or-later"
+LICENSE:libswresample = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}"
+LICENSE:libswscale = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}"
+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 \
+ file://0001-libavutil-include-assembly-with-full-path-from-sourc.patch \
+ "
+SRC_URI[sha256sum] = "eadbad9e9ab30b25f5520fbfde99fae4a92a1ae3c0257a8d68569a4651e30e02"
+
+# Build fails when thumb is enabled: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717
+ARM_INSTRUCTION_SET:armv4 = "arm"
+ARM_INSTRUCTION_SET:armv5 = "arm"
+ARM_INSTRUCTION_SET:armv6 = "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 = "nasm-native"
+
+inherit autotools pkgconfig
+
+PACKAGECONFIG ??= "avdevice avfilter avcodec avformat swresample swscale postproc avresample \
+ alsa bzlib lzma pic pthreads shared theora zlib \
+ ${@bb.utils.contains('AVAILTUNES', 'mips32r2', 'mips32r2', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xv xcb', '', 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[alsa] = "--enable-alsa,--disable-alsa,alsa-lib"
+PACKAGECONFIG[altivec] = "--enable-altivec,--disable-altivec,"
+PACKAGECONFIG[bzlib] = "--enable-bzlib,--disable-bzlib,bzip2"
+PACKAGECONFIG[fdk-aac] = "--enable-libfdk-aac --enable-nonfree,--disable-libfdk-aac,fdk-aac"
+PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl"
+PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm"
+PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack"
+PACKAGECONFIG[libopus] = "--enable-libopus,--disable-libopus,libopus"
+PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis"
+PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz"
+PACKAGECONFIG[mfx] = "--enable-libmfx,--disable-libmfx,intel-mediasdk"
+PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame"
+PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
+PACKAGECONFIG[sdl2] = "--enable-sdl2,--disable-sdl2,virtual/libsdl2"
+PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex"
+PACKAGECONFIG[srt] = "--enable-libsrt,--disable-libsrt,srt"
+PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora libogg"
+PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva"
+PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau"
+PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx"
+PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264"
+PACKAGECONFIG[x265] = "--enable-libx265,--disable-libx265,x265"
+PACKAGECONFIG[xcb] = "--enable-libxcb,--disable-libxcb,libxcb"
+PACKAGECONFIG[xv] = "--enable-outdev=xv,--disable-outdev=xv,libxv"
+PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib"
+
+# other configuration options
+PACKAGECONFIG[mips32r2] = ",--disable-mipsdsp --disable-mipsdspr2"
+PACKAGECONFIG[pic] = "--enable-pic"
+PACKAGECONFIG[pthreads] = "--enable-pthreads,--disable-pthreads"
+PACKAGECONFIG[shared] = "--enable-shared"
+PACKAGECONFIG[strip] = ",--disable-stripping"
+
+# Check codecs that require --enable-nonfree
+USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'openssl' ], 'yes', '', d)}"
+
+def cpu(d):
+ for arg in (d.getVar('TUNE_CCARGS') or '').split():
+ if arg.startswith('-mcpu='):
+ return arg[6:]
+ return 'generic'
+
+EXTRA_OECONF = " \
+ ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \
+ \
+ --cross-prefix=${TARGET_PREFIX} \
+ \
+ --ld='${CCLD}' \
+ --cc='${CC}' \
+ --cxx='${CXX}' \
+ --arch=${TARGET_ARCH} \
+ --target-os='linux' \
+ --enable-cross-compile \
+ --extra-cflags='${CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}' \
+ --extra-ldflags='${LDFLAGS}' \
+ --sysroot='${STAGING_DIR_TARGET}' \
+ ${EXTRA_FFCONF} \
+ --libdir=${libdir} \
+ --shlibdir=${libdir} \
+ --datadir=${datadir}/ffmpeg \
+ --cpu=${@cpu(d)} \
+ --pkg-config=pkg-config \
+"
+
+EXTRA_OECONF:append:linux-gnux32 = " --disable-asm"
+
+EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa64r6', '--disable-mips64r2 --disable-mips32r2', '', d)}"
+EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa64r2', '--disable-mips64r6 --disable-mips32r6', '', d)}"
+EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mips32r2', '--disable-mips64r6 --disable-mips32r6', '', d)}"
+EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mips32r6', '--disable-mips64r2 --disable-mips32r2', '', d)}"
+EXTRA_OECONF:append:mips = " --extra-libs=-latomic --disable-mips32r5 --disable-mipsdsp --disable-mipsdspr2 \
+ --disable-loongson2 --disable-loongson3 --disable-mmi --disable-msa --disable-msa2"
+EXTRA_OECONF:append:riscv32 = " --extra-libs=-latomic"
+EXTRA_OECONF:append:armv5 = " --extra-libs=-latomic"
+EXTRA_OECONF:append:powerpc = " --extra-libs=-latomic"
+
+# gold crashes on x86, another solution is to --disable-asm but thats more hacky
+# ld.gold: internal error in relocate_section, at ../../gold/i386.cc:3684
+
+LDFLAGS:append:x86 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
+
+EXTRA_OEMAKE = "V=1"
+
+do_configure() {
+ ${S}/configure ${EXTRA_OECONF}
+}
+
+# patch out build host paths for reproducibility
+do_compile:prepend:class-target() {
+ sed -i -e "s,${WORKDIR},,g" ${B}/config.h
+}
+
+PACKAGES =+ "libavcodec \
+ libavdevice \
+ libavfilter \
+ libavformat \
+ libavresample \
+ libavutil \
+ libpostproc \
+ libswresample \
+ libswscale"
+
+FILES:libavcodec = "${libdir}/libavcodec${SOLIBS}"
+FILES:libavdevice = "${libdir}/libavdevice${SOLIBS}"
+FILES:libavfilter = "${libdir}/libavfilter${SOLIBS}"
+FILES:libavformat = "${libdir}/libavformat${SOLIBS}"
+FILES:libavresample = "${libdir}/libavresample${SOLIBS}"
+FILES:libavutil = "${libdir}/libavutil${SOLIBS}"
+FILES:libpostproc = "${libdir}/libpostproc${SOLIBS}"
+FILES:libswresample = "${libdir}/libswresample${SOLIBS}"
+FILES:libswscale = "${libdir}/libswscale${SOLIBS}"
+
+# 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"
+
+# Downgrade for NXP BSP
+DEFAULT_PREFERENCE = "-1"
+COMPATIBLE_MACHINE = "(imx-nxp-bsp)"
diff --git a/recipes-multimedia/gstreamer/files/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch b/recipes-multimedia/gstreamer/files/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch
deleted file mode 100644
index 67a872cd..00000000
--- a/recipes-multimedia/gstreamer/files/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From a1d7c582392c8bc87fa9411af77b20e011944357 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Thu, 25 Jan 2018 17:55:02 +0200
-Subject: [PATCH] gst/gstpluginloader.c: when env var is set do not fall
- through to system plugin scanner
-
-If we set a custom GST_PLUGIN_SCANNER env var, then we probably want to use that and only that.
-
-Falling through to the one installed on the system is problamatic in cross-compilation
-environemnts, regardless of whether one pointed to by the env var succeeded or failed.
-
-Upstream-Status: Pending
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- gst/gstpluginloader.c | 4 +---
- 1 file changed, 1 insertion(+), 3 deletions(-)
-
-diff --git a/gst/gstpluginloader.c b/gst/gstpluginloader.c
-index 430829d..3a75731 100644
---- a/gst/gstpluginloader.c
-+++ b/gst/gstpluginloader.c
-@@ -471,9 +471,7 @@ gst_plugin_loader_spawn (GstPluginLoader * loader)
- helper_bin = g_strdup (env);
- res = gst_plugin_loader_try_helper (loader, helper_bin);
- g_free (helper_bin);
-- }
--
-- if (!res) {
-+ } else {
- GST_LOG ("Trying installed plugin scanner");
-
- #ifdef G_OS_WIN32
---
-2.15.1
-
diff --git a/recipes-multimedia/gstreamer/files/0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch b/recipes-multimedia/gstreamer/files/0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch
deleted file mode 100644
index 2cab87f9..00000000
--- a/recipes-multimedia/gstreamer/files/0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-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/recipes-multimedia/gstreamer/files/gtk-doc-tweaks.patch b/recipes-multimedia/gstreamer/files/gtk-doc-tweaks.patch
deleted file mode 100644
index d86c78d7..00000000
--- a/recipes-multimedia/gstreamer/files/gtk-doc-tweaks.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 7018ca1c4bf26c8317e7fcd2e7e4e648195f42ca Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross.burton@intel.com>
-Date: Wed, 20 Dec 2017 13:03:03 +0000
-Subject: [PATCH] gstreamer: use a patch instead of sed to fix gtk-doc
-
-Patch the gtk-doc makefiles so that the qemu wrapper is used to run transient
-binaries instead of libtool wrapper or running them directly.
-
-Also substitute a bogus plugin scanner, as trying to run the real one is causing
-issues during build on x86_64.
-
-Upstream-Status: Inappropriate
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
----
- common/gtk-doc.mak | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/common/gtk-doc.mak b/common/gtk-doc.mak
-index 3f83491..e5cb0d1 100644
---- a/common/gtk-doc.mak
-+++ b/common/gtk-doc.mak
-@@ -6,11 +6,11 @@
- if GTK_DOC_USE_LIBTOOL
- GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
- GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
--GTKDOC_RUN = $(LIBTOOL) --mode=execute
-+GTKDOC_RUN = $(top_builddir)/gtkdoc-qemuwrapper
- else
- GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
- GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
--GTKDOC_RUN =
-+GTKDOC_RUN = $(top_builddir)/gtkdoc-qemuwrapper
- endif
-
- # We set GPATH here; this gives us semantics for GNU make
-@@ -101,6 +101,7 @@ scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
- GST_PLUGIN_PATH_1_0= \
- GST_REGISTRY_1_0=doc-registry.xml \
- $(GTKDOC_EXTRA_ENVIRONMENT) \
-+ GST_PLUGIN_SCANNER_1_0="$(top_builddir)/libs/gst/helpers/gst-plugin-scanner-dummy" \
- CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" \
- CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" \
- LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \
---
-2.15.1
-
diff --git a/recipes-multimedia/gstreamer/gst-devtools/0001-connect-has-a-different-signature-on-musl.patch b/recipes-multimedia/gstreamer/gst-devtools/0001-connect-has-a-different-signature-on-musl.patch
new file mode 100644
index 00000000..c0e45813
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gst-devtools/0001-connect-has-a-different-signature-on-musl.patch
@@ -0,0 +1,38 @@
+From 73b1002eda17451db1f58431b42c25203f1d3097 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 9 Sep 2018 17:38:10 -0700
+Subject: [PATCH] connect has a different signature on musl
+
+On linux when not using glibc and using musl for C library, connect
+API has a different signature, this patch fixes this so it can compile
+on musl, the functionality should remain same as it is immediately
+typcasted to struct sockaddr_in* type inside the function before use
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ validate/plugins/fault_injection/socket_interposer.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/validate/plugins/fault_injection/socket_interposer.c b/validate/plugins/fault_injection/socket_interposer.c
+index 53c1ebb..ad7adf8 100644
+--- a/validate/plugins/fault_injection/socket_interposer.c
++++ b/validate/plugins/fault_injection/socket_interposer.c
+@@ -100,10 +100,15 @@ socket_interposer_set_callback (struct sockaddr_in *addrin,
+ }
+
+ int
+-connect (int socket, const struct sockaddr_in *addrin, socklen_t address_len)
++#if defined(__linux__) && !defined(__GLIBC__)
++connect (int socket, const struct sockaddr *addr, socklen_t address_len)
++#else
++connect (int socket, const struct sockaddr_in *addr, socklen_t address_len)
++#endif
+ {
+ size_t i;
+ int override_errno = 0;
++ struct sockaddr_in* addrin = (struct sockaddr_in*)addr;
+ typedef ssize_t (*real_connect_fn) (int, const struct sockaddr_in *,
+ socklen_t);
+ static real_connect_fn real_connect = 0;
diff --git a/recipes-multimedia/gstreamer/gst-devtools_1.22.0.imx.bb b/recipes-multimedia/gstreamer/gst-devtools_1.22.0.imx.bb
new file mode 100644
index 00000000..4006f3eb
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gst-devtools_1.22.0.imx.bb
@@ -0,0 +1,56 @@
+SUMMARY = "Gstreamer validation tool"
+DESCRIPTION = "A Tool to test GStreamer components"
+HOMEPAGE = "https://gstreamer.freedesktop.org/documentation/gst-devtools/index.html"
+SECTION = "multimedia"
+
+LICENSE = "LGPL-2.1-or-later"
+LIC_FILES_CHKSUM = "file://validate/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343"
+
+S = "${WORKDIR}/gst-devtools-${@get_gst_ver('${PV}')}"
+
+SRC_URI = "https://gstreamer.freedesktop.org/src/gst-devtools/gst-devtools-${@get_gst_ver('${PV}')}.tar.xz \
+ file://0001-connect-has-a-different-signature-on-musl.patch \
+ "
+
+SRC_URI[sha256sum] = "4d21fee5c15f2877c0b1f6c2da0cdba67ce7caab2c199ab27e91a1394d5ba195"
+
+DEPENDS = "json-glib glib-2.0 glib-2.0-native gstreamer1.0 gstreamer1.0-plugins-base"
+RRECOMMENDS:${PN} = "git"
+
+FILES:${PN} += "${datadir}/gstreamer-1.0/* ${libdir}/gst-validate-launcher/* ${libdir}/gstreamer-1.0/*"
+
+inherit meson pkgconfig gettext upstream-version-is-even gobject-introspection
+
+# Drop .imx from PV
+def get_gst_ver(v):
+ return oe.utils.trim_version(v, 3)
+
+# TODO: put this in a gettext.bbclass patch
+def gettext_oemeson(d):
+ if d.getVar('USE_NLS') == 'no':
+ return '-Dnls=disabled'
+ # Remove the NLS bits if USE_NLS is no or INHIBIT_DEFAULT_DEPS is set
+ if d.getVar('INHIBIT_DEFAULT_DEPS') and not oe.utils.inherits(d, 'cross-canadian'):
+ return '-Dnls=disabled'
+ return '-Dnls=enabled'
+
+# Build GstValidateVideo
+PACKAGECONFIG[cairo] = "-Dcairo=enabled,-Dcairo=disabled,cairo"
+
+EXTRA_OEMESON += " \
+ -Ddoc=disabled \
+ -Ddebug_viewer=disabled \
+ -Dtests=disabled \
+ -Dvalidate=enabled \
+ ${@gettext_oemeson(d)} \
+"
+
+do_install:append () {
+ for fn in ${bindir}/gst-validate-launcher \
+ ${libdir}/gst-validate-launcher/python/launcher/config.py; do
+ sed -i -e 's,${B},/usr/src/debug/${PN},g' -e 's,${S},/usr/src/debug/${PN},g' ${D}$fn
+ done
+}
+
+GIR_MESON_ENABLE_FLAG = "enabled"
+GIR_MESON_DISABLE_FLAG = "disabled"
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-Disable-yasm-for-libav-when-disable-yasm.patch b/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-Disable-yasm-for-libav-when-disable-yasm.patch
deleted file mode 100644
index 1d99ad12..00000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-Disable-yasm-for-libav-when-disable-yasm.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-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/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-configure-check-for-armv7ve-variant.patch b/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-configure-check-for-armv7ve-variant.patch
deleted file mode 100644
index b80d0739..00000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-configure-check-for-armv7ve-variant.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From aac5902d3c9cb35c771e760d0e487622aa2e116a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 20 Apr 2017 10:38:18 -0700
-Subject: [PATCH] configure: check for armv7ve variant
-
-OE passes -mcpu and -march via cmdline and if
-package tries to detect one of it own then it
-should be compatible otherwise, newer gcc7+ will
-error out
-
-Check for relevant preprocessor macro to determine
-armv7ve architecture
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gst-libs/ext/libav/configure | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/gst-libs/ext/libav/configure b/gst-libs/ext/libav/configure
-index 4a5e477..727818e 100755
---- a/gst-libs/ext/libav/configure
-+++ b/gst-libs/ext/libav/configure
-@@ -4295,6 +4295,7 @@ elif enabled arm; then
- elif check_arm_arch 6Z; then echo armv6z
- elif check_arm_arch 6ZK; then echo armv6zk
- elif check_arm_arch 6T2; then echo armv6t2
-+ elif check_arm_arch EXT_IDIV; then echo armv7ve
- elif check_arm_arch 7; then echo armv7
- elif check_arm_arch 7A 7_A; then echo armv7-a
- elif check_arm_arch 7S; then echo armv7-a
---
-2.12.2
-
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-fix-host-contamination.patch b/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-fix-host-contamination.patch
deleted file mode 100644
index 120c0798..00000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-fix-host-contamination.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From c1700f867f876ee33c130a8e28b688e2b1d89663 Mon Sep 17 00:00:00 2001
-From: Anuj Mittal <anuj.mittal@intel.com>
-Date: Wed, 11 Apr 2018 17:14:55 +0800
-Subject: [PATCH] Prevent host contamination
-
-Remove reference to host $(libdir) from .la files.
-
-Upstream-Status: Inappropriate [cross-compile specific]
-
-Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
----
- gst-libs/ext/Makefile.am | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gst-libs/ext/Makefile.am b/gst-libs/ext/Makefile.am
-index 6cdc048..a19d255 100644
---- a/gst-libs/ext/Makefile.am
-+++ b/gst-libs/ext/Makefile.am
-@@ -49,7 +49,7 @@ echo " GEN $1.la" && \
- echo "library_names=''" && \
- echo "old_library='$1.a'" && \
- echo "inherited_linker_flags=''" && \
-- echo "dependency_libs=' -L$(libdir) $(if $2,$(foreach dep,$2,$(abs_builddir)/$(dep).la)) $(call find_library_la,$3 $(LIBM),$(LDFLAGS)) '" && \
-+ echo "dependency_libs=' -L $(if $2,$(foreach dep,$2,$(abs_builddir)/$(dep).la)) $(call find_library_la,$3 $(LIBM),$(LDFLAGS)) '" && \
- echo "weak_library_names=''" && \
- echo "current=" && \
- echo "age=" && \
-@@ -58,7 +58,7 @@ echo " GEN $1.la" && \
- echo "shouldnotlink=no" && \
- echo "dlopen=''" && \
- echo "dlpreopen=''" && \
-- echo "libdir='$(libdir)'") > $1.la
-+ echo "libdir=''") > $1.la
- endef
-
- libavutil.la:
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-libav/ffmpeg-6.0.patch b/recipes-multimedia/gstreamer/gstreamer1.0-libav/ffmpeg-6.0.patch
new file mode 100644
index 00000000..0a06540f
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-libav/ffmpeg-6.0.patch
@@ -0,0 +1,49 @@
+From cde31d23c071ee93fae96331805f696856084254 Mon Sep 17 00:00:00 2001
+From: "U. Artie Eoff" <ullysses.a.eoff@intel.com>
+Date: Mon, 13 Feb 2023 17:02:01 -0500
+Subject: [PATCH] avviddec: change
+ AV_CODEC_CAP_AUTO_THREADS->AV_CODEC_CAP_OTHER_THREADS
+
+This fixes a compile error with recent upstream FFmpeg.
+
+The AV_CODEC_CAP_AUTO_THREADS was deprecated and renamed to
+AV_CODEC_CAP_OTHER_THREADS in FFmpeg upstream commit
+7d09579190de (lavc 58.132.100).
+
+The AV_CODEC_CAP_AUTO_THREADS was finally removed in FFmpeg upstream
+commit 10c9a0874cb3 (lavc 59.63.100).
+
+Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3964>
+
+Upstream-Status: Backport [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/commit/cde31d23c071ee93fae96331805f696856084254?merge_request_iid=3964]
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+---
+ ext/libav/gstavviddec.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/ext/libav/gstavviddec.c b/ext/libav/gstavviddec.c
+index 43cea456ae8..6d7c4cd0de8 100644
+--- a/ext/libav/gstavviddec.c
++++ b/ext/libav/gstavviddec.c
+@@ -35,6 +35,10 @@
+
+ GST_DEBUG_CATEGORY_STATIC (GST_CAT_PERFORMANCE);
+
++#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58,132,100)
++#define AV_CODEC_CAP_OTHER_THREADS AV_CODEC_CAP_AUTO_THREADS
++#endif
++
+ #define GST_FFMPEG_VIDEO_CODEC_FRAME_FLAG_ALLOCATED (1<<15)
+
+ #define MAX_TS_MASK 0xff
+@@ -615,7 +619,7 @@ gst_ffmpegviddec_set_format (GstVideoDecoder * decoder,
+ if (ffmpegdec->max_threads == 0) {
+ /* When thread type is FF_THREAD_FRAME, extra latency is introduced equal
+ * to one frame per thread. We thus need to calculate the thread count ourselves */
+- if ((!(oclass->in_plugin->capabilities & AV_CODEC_CAP_AUTO_THREADS)) ||
++ if ((!(oclass->in_plugin->capabilities & AV_CODEC_CAP_OTHER_THREADS)) ||
+ (ffmpegdec->context->thread_type & FF_THREAD_FRAME))
+ ffmpegdec->context->thread_count =
+ MIN (gst_ffmpeg_auto_max_threads (), 16);
+--
+GitLab
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-libav/mips64_cpu_detection.patch b/recipes-multimedia/gstreamer/gstreamer1.0-libav/mips64_cpu_detection.patch
deleted file mode 100644
index 7a0b4488..00000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0-libav/mips64_cpu_detection.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-It will add -mips64r6 and -mips64r2 to cmdline which will
-cause conflicts
-
-in OE we user mips32r2 and mips64r2 for mips arch versions
-so there is no benefit of detecting it automatically by
-poking at tools especially in cross env
-
-Fixes errors like
-
-linking -mnan=2008 module with previous -mnan=legacy modules
-failed to merge target specific data of file
-
--Khem
-Upstream-Status: Inappropriate [OE-Specific]
-
-Index: gst-libav-1.10.1/gst-libs/ext/libav/configure
-===================================================================
---- gst-libav-1.10.1.orig/gst-libs/ext/libav/configure
-+++ gst-libav-1.10.1/gst-libs/ext/libav/configure
-@@ -5269,12 +5269,9 @@ elif enabled mips; then
-
- # Enable minimum ISA based on selected options
- if enabled mips64; then
-- enabled mips64r6 && check_inline_asm_flags mips64r6 '"dlsa $0, $0, $0, 1"' '-mips64r6'
- enabled mips64r2 && check_inline_asm_flags mips64r2 '"dext $0, $0, 0, 1"' '-mips64r2'
- disabled mips64r6 && disabled mips64r2 && check_inline_asm_flags mips64r1 '"daddi $0, $0, 0"' '-mips64'
- else
-- enabled mips32r6 && check_inline_asm_flags mips32r6 '"aui $0, $0, 0"' '-mips32r6'
-- enabled mips32r5 && check_inline_asm_flags mips32r5 '"eretnc"' '-mips32r5'
- enabled mips32r2 && check_inline_asm_flags mips32r2 '"ext $0, $0, 0, 1"' '-mips32r2'
- disabled mips32r6 && disabled mips32r5 && disabled mips32r2 && check_inline_asm_flags mips32r1 '"addi $0, $0, 0"' '-mips32'
- fi
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-libav/workaround-to-build-gst-libav-for-i586-with-gcc.patch b/recipes-multimedia/gstreamer/gstreamer1.0-libav/workaround-to-build-gst-libav-for-i586-with-gcc.patch
deleted file mode 100644
index 36abf860..00000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0-libav/workaround-to-build-gst-libav-for-i586-with-gcc.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-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/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.16.0.bb b/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.16.0.bb
deleted file mode 100644
index 3f1ec99d..00000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.16.0.bb
+++ /dev/null
@@ -1,70 +0,0 @@
-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"
-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 \
- file://mips64_cpu_detection.patch \
- file://0001-configure-check-for-armv7ve-variant.patch \
- file://0001-fix-host-contamination.patch \
- "
-SRC_URI[md5sum] = "e3a201a45985ddc1327cd496046ca818"
-SRC_URI[sha256sum] = "dfac119043a9cfdcacd7acde77f674ab172cf2537b5812be52f49e9cddc53d9a"
-
-S = "${WORKDIR}/gst-libav-${PV}"
-
-DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base zlib bzip2 xz"
-
-inherit autotools pkgconfig upstream-version-is-even gtk-doc
-
-# CAUTION: Using the system libav is not recommended. Since the libav API is changing all the time,
-# compilation errors (and other, more subtle bugs) can happen. It is usually better to rely on the
-# 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,nasm-native"
-PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind"
-
-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}'"
-
-# Disable assembly optimizations for X32, as this libav lacks the support
-PACKAGECONFIG_remove_linux-gnux32 = "yasm"
-LIBAV_EXTRA_CONFIGURE_COMMON_ARG_append_linux-gnux32 = " --disable-asm"
-
-LIBAV_EXTRA_CONFIGURE_COMMON = \
-'${LIBAV_EXTRA_CONFIGURE}="${LIBAV_EXTRA_CONFIGURE_COMMON_ARG}"'
-
-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/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.22.0.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.22.0.imx.bb
new file mode 100644
index 00000000..742004d8
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.22.0.imx.bb
@@ -0,0 +1,36 @@
+SUMMARY = "Libav-based GStreamer 1.x plugin"
+DESCRIPTION = "Contains a GStreamer plugin for using the encoders, decoders, \
+muxers, and demuxers provided by FFmpeg."
+HOMEPAGE = "http://gstreamer.freedesktop.org/"
+SECTION = "multimedia"
+
+# ffmpeg has comercial license flags so add it as we need ffmpeg as a dependency
+LICENSE_FLAGS = "commercial"
+LICENSE = "LGPL-2.1-or-later"
+LIC_FILES_CHKSUM = "file://COPYING;md5=69333daa044cb77e486cc36129f7a770 \
+ file://ext/libav/gstav.h;beginline=1;endline=18;md5=a752c35267d8276fd9ca3db6994fca9c \
+ "
+
+SRC_URI = "https://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${@get_gst_ver('${PV}')}.tar.xz \
+ file://ffmpeg-6.0.patch \
+ "
+SRC_URI[sha256sum] = "0e48407b4905227a260213dbda84cba3812f0530fc7a75b43829102ef82810f1"
+
+S = "${WORKDIR}/gst-libav-${@get_gst_ver('${PV}')}"
+
+DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base ffmpeg"
+
+inherit meson pkgconfig upstream-version-is-even
+
+EXTRA_OEMESON += " \
+ -Dtests=disabled \
+"
+
+# Drop .imx from PV
+def get_gst_ver(v):
+ return oe.utils.trim_version(v, 3)
+
+FILES:${PN} += "${libdir}/gstreamer-1.0/*.so"
+FILES:${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a"
+
+COMPATIBLE_MACHINE = "(imx-nxp-bsp)"
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-omx_%.bbappend b/recipes-multimedia/gstreamer/gstreamer1.0-omx_%.bbappend
new file mode 100644
index 00000000..18847603
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-omx_%.bbappend
@@ -0,0 +1 @@
+EXTRA_OEMESON:append:imx-nxp-bsp = " -Dtests=disabled -Dexamples=disabled"
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.22.0.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.22.0.imx.bb
new file mode 100644
index 00000000..dc4bccd7
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.22.0.imx.bb
@@ -0,0 +1,52 @@
+SUMMARY = "OpenMAX IL plugins for GStreamer"
+DESCRIPTION = "Wraps available OpenMAX IL components and makes them available as standard GStreamer elements."
+HOMEPAGE = "http://gstreamer.freedesktop.org/"
+SECTION = "multimedia"
+
+LICENSE = "LGPL-2.1-or-later"
+LICENSE_FLAGS = "commercial"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
+ file://omx/gstomx.h;beginline=1;endline=21;md5=5c8e1fca32704488e76d2ba9ddfa935f"
+
+SRC_URI = "https://gstreamer.freedesktop.org/src/gst-omx/gst-omx-${@get_gst_ver('${PV}')}.tar.xz"
+
+SRC_URI[sha256sum] = "dbc951a99af532380e599aa8acd9e1385fdb299b46b5868cd2be4230ad888341"
+
+S = "${WORKDIR}/gst-omx-${@get_gst_ver('${PV}')}"
+
+DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad virtual/libomxil"
+
+inherit meson pkgconfig upstream-version-is-even
+
+GSTREAMER_1_0_OMX_TARGET ?= "bellagio"
+GSTREAMER_1_0_OMX_CORE_NAME ?= "${libdir}/libomxil-bellagio.so.0"
+
+EXTRA_OEMESON += "-Dtarget=${GSTREAMER_1_0_OMX_TARGET}"
+
+python __anonymous () {
+ omx_target = d.getVar("GSTREAMER_1_0_OMX_TARGET")
+ if omx_target in ['generic', 'bellagio']:
+ # Bellagio headers are incomplete (they are missing the OMX_VERSION_MAJOR,#
+ # OMX_VERSION_MINOR, OMX_VERSION_REVISION, and OMX_VERSION_STEP macros);
+ # 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"))
+}
+
+set_omx_core_name() {
+ sed -i -e "s;^core-name=.*;core-name=${GSTREAMER_1_0_OMX_CORE_NAME};" "${D}${sysconfdir}/xdg/gstomx.conf"
+}
+
+# Drop .imx from PV
+def get_gst_ver(v):
+ return oe.utils.trim_version(v, 3)
+
+do_install[postfuncs] += " set_omx_core_name "
+
+FILES:${PN} += "${libdir}/gstreamer-1.0/*.so"
+FILES:${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a"
+
+VIRTUAL-RUNTIME_libomxil ?= "libomxil"
+RDEPENDS:${PN} = "${VIRTUAL-RUNTIME_libomxil}"
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch
new file mode 100644
index 00000000..029b80e1
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch
@@ -0,0 +1,33 @@
+From 3bc5d48257032b6bbee532aad15062fbbcc43bfe Mon Sep 17 00:00:00 2001
+From: Andrey Zhizhikin <andrey.z@gmail.com>
+Date: Mon, 27 Jan 2020 10:22:35 +0000
+Subject: [PATCH] opencv: resolve missing opencv data dir in yocto build
+
+When Yocto build is performed, opencv searches for data dir using simple
+'test' command, this fails because pkg-config provides an absolute
+path on the target which needs to be prepended by PKG_CONFIG_SYSROOT_DIR
+in order for the 'test' utility to pick up the absolute path.
+
+Upstream-Status: Inappropriate [OE-specific]
+
+Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
+Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
+
+---
+ ext/opencv/meson.build | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/ext/opencv/meson.build b/ext/opencv/meson.build
+index 1d86b90..b5c8b95 100644
+--- a/ext/opencv/meson.build
++++ b/ext/opencv/meson.build
+@@ -87,6 +87,9 @@ if opencv_found
+ opencv_prefix = opencv_dep.get_variable('prefix')
+ gstopencv_cargs += ['-DOPENCV_PREFIX="' + opencv_prefix + '"']
+
++ pkgconf_sysroot = run_command(python3, '-c', 'import os; print(os.environ.get("PKG_CONFIG_SYSROOT_DIR"))').stdout().strip()
++ opencv_prefix = pkgconf_sysroot + opencv_prefix
++
+ # Check the data dir used by opencv for its xml data files
+ # Use prefix from pkg-config to be compatible with cross-compilation
+ r = run_command('test', '-d', opencv_prefix + '/share/opencv', check: false)
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/avoid-including-sys-poll.h-directly.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/avoid-including-sys-poll.h-directly.patch
deleted file mode 100644
index 32261279..00000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/avoid-including-sys-poll.h-directly.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-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
-@@ -97,7 +97,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/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch
deleted file mode 100644
index 25861b6b..00000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-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(-)
-
-Index: gst-plugins-bad-1.12.3/configure.ac
-===================================================================
---- gst-plugins-bad-1.12.3.orig/configure.ac
-+++ gst-plugins-bad-1.12.3/configure.ac
-@@ -1202,6 +1202,15 @@ AG_GST_CHECK_FEATURE(CHROMAPRINT, [chrom
- ])
-
- 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.35.0, [
-@@ -1224,12 +1233,14 @@ AG_GST_CHECK_FEATURE(CURL, [Curl plugin]
- ])
- 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)
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch
deleted file mode 100644
index 2d5389d9..00000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-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(-)
-
-Index: gst-plugins-bad-1.10.2/sys/decklink/gstdecklink.cpp
-===================================================================
---- gst-plugins-bad-1.10.2.orig/sys/decklink/gstdecklink.cpp
-+++ gst-plugins-bad-1.10.2/sys/decklink/gstdecklink.cpp
-@@ -617,7 +617,7 @@ gst_decklink_mode_get_structure (GstDeck
- "pixel-aspect-ratio", GST_TYPE_FRACTION, mode->par_n, mode->par_d,
- "interlace-mode", G_TYPE_STRING,
- mode->interlaced ? "interleaved" : "progressive",
-- "framerate", GST_TYPE_FRACTION, mode->fps_n, mode->fps_d, NULL);
-+ "framerate", GST_TYPE_FRACTION, mode->fps_n, mode->fps_d, (void*)NULL);
-
- if (input && mode->interlaced) {
- if (mode->tff)
-@@ -632,16 +632,16 @@ gst_decklink_mode_get_structure (GstDeck
- case bmdFormat8BitYUV: /* '2vuy' */
- gst_structure_set (s, "format", G_TYPE_STRING, "UYVY",
- "colorimetry", G_TYPE_STRING, mode->colorimetry,
-- "chroma-site", G_TYPE_STRING, "mpeg2", NULL);
-+ "chroma-site", G_TYPE_STRING, "mpeg2", (void*)NULL);
- 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 */
-Index: gst-plugins-bad-1.10.2/sys/decklink/gstdecklinkaudiosrc.cpp
-===================================================================
---- gst-plugins-bad-1.10.2.orig/sys/decklink/gstdecklinkaudiosrc.cpp
-+++ gst-plugins-bad-1.10.2/sys/decklink/gstdecklinkaudiosrc.cpp
-@@ -387,7 +387,7 @@ gst_decklink_audio_src_set_caps (GstBase
- 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) {
-Index: gst-plugins-bad-1.10.2/sys/decklink/gstdecklinkvideosink.cpp
-===================================================================
---- gst-plugins-bad-1.10.2.orig/sys/decklink/gstdecklinkvideosink.cpp
-+++ gst-plugins-bad-1.10.2/sys/decklink/gstdecklinkvideosink.cpp
-@@ -285,7 +285,7 @@ reset_framerate (GstCapsFeatures * featu
- 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;
- }
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch
deleted file mode 100644
index 73681f10..00000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-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
-@@ -1730,7 +1730,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/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.imx.bb
deleted file mode 100644
index f18a70d1..00000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.imx.bb
+++ /dev/null
@@ -1,171 +0,0 @@
-require recipes-multimedia/gstreamer/gstreamer1.0-plugins-common.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=73a5855a8119deb017f5f13cf327095d \
- file://COPYING.LIB;md5=21682e4e8fea52413fd26c60acb907e5 "
-
-DEPENDS_append_imxgpu2d = " virtual/libg2d"
-DEPENDS_append_mx8 = " libdrm"
-
-PACKAGECONFIG_append_mx6q = " opencv"
-PACKAGECONFIG_append_mx6qp = " opencv"
-PACKAGECONFIG_append_mx8 = " opencv kms"
-
-GST1.0-PLUGINS-BAD_SRC ?= "gitsm://source.codeaurora.org/external/imx/gst-plugins-bad.git;protocol=https"
-SRCBRANCH = "MM_04.05.01_1909_L4.19.35"
-
-SRC_URI = " \
- ${GST1.0-PLUGINS-BAD_SRC};branch=${SRCBRANCH} \
- 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-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
-"
-
-SRCREV = "eba3db4034fc17b712808d5e90ed5ff22ef490ca"
-
-DEFAULT_PREFERENCE = "-1"
-
-# This remove "--exclude=autopoint" option from autoreconf argument to avoid
-# configure.ac:30: error: required file './ABOUT-NLS' not found
-EXTRA_AUTORECONF = ""
-
-# include fragment shaders
-FILES_${PN}-opengl += "/usr/share/*.fs"
-
-PACKAGE_ARCH_imxpxp = "${MACHINE_SOCARCH}"
-PACKAGE_ARCH_mx8 = "${MACHINE_SOCARCH}"
-
-S = "${WORKDIR}/git"
-
-LICENSE = "GPLv2+ & LGPLv2+ & LGPLv2.1+"
-
-DEPENDS += "gstreamer1.0-plugins-base jpeg"
-
-inherit gettext
-
-PACKAGECONFIG ??= " \
- ${GSTREAMER_ORC} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
- ${@bb.utils.filter('DISTRO_FEATURES', 'directfb vulkan', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gl', '', d)} \
- bz2 curl dash dtls hls rsvg sbc smoothstreaming sndfile ttml uvch264 webp \
-"
-
-# the gl packageconfig enables OpenGL elements that haven't been ported
-# to -base yet. They depend on the gstgl library in -base, so we do
-# not add GL dependencies here, since these are taken care of in -base.
-
-PACKAGECONFIG[assrender] = "--enable-assrender,--disable-assrender,libass"
-PACKAGECONFIG[bluez] = "--enable-bluez,--disable-bluez,bluez5"
-PACKAGECONFIG[bz2] = "--enable-bz2,--disable-bz2,bzip2"
-PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl"
-PACKAGECONFIG[dash] = "--enable-dash,--disable-dash,libxml2"
-PACKAGECONFIG[dc1394] = "--enable-dc1394,--disable-dc1394,libdc1394"
-PACKAGECONFIG[directfb] = "--enable-directfb,--disable-directfb,directfb"
-PACKAGECONFIG[dtls] = "--enable-dtls,--disable-dtls,openssl"
-PACKAGECONFIG[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[hls] = "--enable-hls --with-hls-crypto=nettle,--disable-hls,nettle"
-PACKAGECONFIG[gl] = "--enable-gl,--disable-gl,"
-PACKAGECONFIG[kms] = "--enable-kms,--disable-kms,libdrm"
-PACKAGECONFIG[libde265] = "--enable-libde265,--disable-libde265,libde265"
-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[openh264] = "--enable-openh264,--disable-openh264,openh264"
-PACKAGECONFIG[openjpeg] = "--enable-openjpeg,--disable-openjpeg,openjpeg"
-# the opus encoder/decoder elements are now in the -base package,
-# but the opus parser remains in -bad
-PACKAGECONFIG[opusparse] = "--enable-opus,--disable-opus,libopus"
-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[smoothstreaming] = "--enable-smoothstreaming,--disable-smoothstreaming,libxml2"
-PACKAGECONFIG[sndfile] = "--enable-sndfile,--disable-sndfile,libsndfile1"
-PACKAGECONFIG[srtp] = "--enable-srtp,--disable-srtp,libsrtp"
-PACKAGECONFIG[tinyalsa] = "--enable-tinyalsa,--disable-tinyalsa,tinyalsa"
-PACKAGECONFIG[ttml] = "--enable-ttml,--disable-ttml,libxml2 pango cairo"
-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[vulkan] = "--enable-vulkan,--disable-vulkan,vulkan-headers"
-PACKAGECONFIG[lcms2] = "--enable-lcms2,--disable-lcms2,lcms"
-PACKAGECONFIG[openmpt] = "--enable-openmpt,--disable-openmpt,libopenmpt"
-PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,wayland-native wayland wayland-protocols libdrm"
-PACKAGECONFIG[webp] = "--enable-webp,--disable-webp,libwebp"
-PACKAGECONFIG[webrtc] = "--enable-webrtc,--disable-webrtc,libnice"
-PACKAGECONFIG[webrtcdsp] = "--enable-webrtcdsp,--disable-webrtcdsp,webrtc-audio-processing"
-
-# these plugins have no corresponding library in OE-core or meta-openembedded:
-# openni2 winks direct3d directsound winscreencap apple_media iqa
-# android_media avc bs2b chromaprint dts fdkaac gme gsm kate ladspa
-# lv2 mpeg2enc mplex msdk musepack nvenc ofa openmpt opensles soundtouch
-# spandsp teletextdec vdpau wasapi x265 zbar
-
-EXTRA_OECONF += " \
- --enable-decklink \
- --enable-dvb \
- --enable-fbdev \
- --enable-ipcpipeline \
- --enable-netsim \
- --enable-shm \
- --disable-android_media \
- --disable-aom \
- --disable-apple_media \
- --disable-avc \
- --disable-bs2b \
- --disable-chromaprint \
- --disable-direct3d \
- --disable-directsound \
- --disable-dts \
- --disable-fdk_aac \
- --disable-gme \
- --disable-gsm \
- --disable-iqa \
- --disable-kate \
- --disable-ladspa \
- --disable-lv2 \
- --disable-mpeg2enc \
- --disable-mplex \
- --disable-msdk \
- --disable-musepack \
- --disable-nvenc \
- --disable-ofa \
- --disable-openexr \
- --disable-openmpt \
- --disable-openni2 \
- --disable-opensles \
- --disable-soundtouch \
- --disable-spandsp \
- --disable-srt \
- --disable-teletextdec \
- --disable-vdpau \
- --disable-wasapi \
- --disable-wildmidi \
- --disable-winks \
- --disable-winscreencap \
- --disable-x265 \
- --disable-zbar \
- ${@bb.utils.contains("TUNE_FEATURES", "mx32", "--disable-yadif", "", d)} \
- --disable-introspection \
-"
-export OPENCV_PREFIX = "${STAGING_DIR_TARGET}${prefix}"
-
-ARM_INSTRUCTION_SET_armv4 = "arm"
-ARM_INSTRUCTION_SET_armv5 = "arm"
-
-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"
-# include fragment shaders
-FILES_${PN}-opengl += "/usr/share/*.fs"
-
-COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.22.5.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.22.5.imx.bb
new file mode 100644
index 00000000..3366a627
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.22.5.imx.bb
@@ -0,0 +1,223 @@
+# This recipe is for the i.MX fork of gstreamer1.0-plugins-bad. For ease of
+# maintenance, the top section is a verbatim copy of an OE-core
+# recipe. The second section customizes the recipe for i.MX.
+
+########### OE-core copy ##################
+# Upstream hash: 937817e5164f8af8452aec03ae3c45cb23d63df9
+
+require gstreamer1.0-plugins-common.inc
+require gstreamer1.0-plugins-license.inc
+
+SUMMARY = "'Bad' GStreamer plugins and helper libraries "
+HOMEPAGE = "https://gstreamer.freedesktop.org/"
+BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues"
+
+SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-${PV}.tar.xz \
+ file://0001-fix-maybe-uninitialized-warnings-when-compiling-with.patch \
+ file://0002-avoid-including-sys-poll.h-directly.patch \
+ file://0004-opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch \
+ "
+SRC_URI[sha256sum] = "e64e75cdafd7ff2fc7fc34e855b06b1e3ed227cc06fa378d17bbcd76780c338c"
+
+S = "${WORKDIR}/gst-plugins-bad-${PV}"
+
+LICENSE = "LGPL-2.1-or-later & GPL-2.0-or-later"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+DEPENDS += "gstreamer1.0-plugins-base"
+
+inherit gobject-introspection
+
+PACKAGECONFIG ??= " \
+ ${GSTREAMER_ORC} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'directfb vulkan x11', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gl', '', d)} \
+ bz2 closedcaption curl dash dtls hls openssl sbc smoothstreaming \
+ sndfile ttml uvch264 webp \
+ ${@bb.utils.contains('TUNE_FEATURES', 'mx32', '', 'rsvg', d)} \
+"
+
+PACKAGECONFIG[aom] = "-Daom=enabled,-Daom=disabled,aom"
+PACKAGECONFIG[assrender] = "-Dassrender=enabled,-Dassrender=disabled,libass"
+PACKAGECONFIG[avtp] = "-Davtp=enabled,-Davtp=disabled,libavtp"
+PACKAGECONFIG[bluez] = "-Dbluez=enabled,-Dbluez=disabled,bluez5"
+PACKAGECONFIG[bz2] = "-Dbz2=enabled,-Dbz2=disabled,bzip2"
+PACKAGECONFIG[closedcaption] = "-Dclosedcaption=enabled,-Dclosedcaption=disabled,pango cairo"
+PACKAGECONFIG[curl] = "-Dcurl=enabled,-Dcurl=disabled,curl"
+PACKAGECONFIG[dash] = "-Ddash=enabled,-Ddash=disabled,libxml2"
+PACKAGECONFIG[dc1394] = "-Ddc1394=enabled,-Ddc1394=disabled,libdc1394"
+PACKAGECONFIG[directfb] = "-Ddirectfb=enabled,-Ddirectfb=disabled,directfb"
+PACKAGECONFIG[dtls] = "-Ddtls=enabled,-Ddtls=disabled,openssl"
+PACKAGECONFIG[faac] = "-Dfaac=enabled,-Dfaac=disabled,faac"
+PACKAGECONFIG[faad] = "-Dfaad=enabled,-Dfaad=disabled,faad2"
+PACKAGECONFIG[fluidsynth] = "-Dfluidsynth=enabled,-Dfluidsynth=disabled,fluidsynth"
+PACKAGECONFIG[hls] = "-Dhls=enabled,-Dhls=disabled,"
+# Pick atleast one crypto backend below when enabling hls
+PACKAGECONFIG[nettle] = "-Dhls-crypto=nettle,,nettle"
+PACKAGECONFIG[openssl] = "-Dhls-crypto=openssl,,openssl"
+PACKAGECONFIG[gcrypt] = "-Dhls-crypto=libgcrypt,,libgcrypt"
+# the gl packageconfig enables OpenGL elements that haven't been ported
+# to -base yet. They depend on the gstgl library in -base, so we do
+# not add GL dependencies here, since these are taken care of in -base.
+PACKAGECONFIG[gl] = "-Dgl=enabled,-Dgl=disabled,"
+PACKAGECONFIG[kms] = "-Dkms=enabled,-Dkms=disabled,libdrm"
+PACKAGECONFIG[libde265] = "-Dlibde265=enabled,-Dlibde265=disabled,libde265"
+PACKAGECONFIG[libssh2] = "-Dcurl-ssh2=enabled,-Dcurl-ssh2=disabled,libssh2"
+PACKAGECONFIG[lcms2] = "-Dcolormanagement=enabled,-Dcolormanagement=disabled,lcms"
+PACKAGECONFIG[modplug] = "-Dmodplug=enabled,-Dmodplug=disabled,libmodplug"
+PACKAGECONFIG[msdk] = "-Dmsdk=enabled -Dmfx_api=oneVPL,-Dmsdk=disabled,onevpl-intel-gpu"
+PACKAGECONFIG[neon] = "-Dneon=enabled,-Dneon=disabled,neon"
+PACKAGECONFIG[openal] = "-Dopenal=enabled,-Dopenal=disabled,openal-soft"
+PACKAGECONFIG[opencv] = "-Dopencv=enabled,-Dopencv=disabled,opencv"
+PACKAGECONFIG[openh264] = "-Dopenh264=enabled,-Dopenh264=disabled,openh264"
+PACKAGECONFIG[openjpeg] = "-Dopenjpeg=enabled,-Dopenjpeg=disabled,openjpeg"
+PACKAGECONFIG[openmpt] = "-Dopenmpt=enabled,-Dopenmpt=disabled,libopenmpt"
+# the opus encoder/decoder elements are now in the -base package,
+# but the opus parser remains in -bad
+PACKAGECONFIG[opusparse] = "-Dopus=enabled,-Dopus=disabled,libopus"
+PACKAGECONFIG[resindvd] = "-Dresindvd=enabled,-Dresindvd=disabled,libdvdread libdvdnav"
+PACKAGECONFIG[rsvg] = "-Drsvg=enabled,-Drsvg=disabled,librsvg"
+PACKAGECONFIG[rtmp] = "-Drtmp=enabled,-Drtmp=disabled,rtmpdump"
+PACKAGECONFIG[sbc] = "-Dsbc=enabled,-Dsbc=disabled,sbc"
+PACKAGECONFIG[sctp] = "-Dsctp=enabled,-Dsctp=disabled"
+PACKAGECONFIG[smoothstreaming] = "-Dsmoothstreaming=enabled,-Dsmoothstreaming=disabled,libxml2"
+PACKAGECONFIG[sndfile] = "-Dsndfile=enabled,-Dsndfile=disabled,libsndfile1"
+PACKAGECONFIG[srt] = "-Dsrt=enabled,-Dsrt=disabled,srt"
+PACKAGECONFIG[srtp] = "-Dsrtp=enabled,-Dsrtp=disabled,libsrtp"
+PACKAGECONFIG[tinyalsa] = "-Dtinyalsa=enabled,-Dtinyalsa=disabled,tinyalsa"
+PACKAGECONFIG[ttml] = "-Dttml=enabled,-Dttml=disabled,libxml2 pango cairo"
+PACKAGECONFIG[uvch264] = "-Duvch264=enabled,-Duvch264=disabled,libusb1 libgudev"
+# this enables support for stateless V4L2 mem2mem codecs, which is a newer form of
+# V4L2 codec; the V4L2 code in -base supports the older stateful V4L2 mem2mem codecs
+PACKAGECONFIG[v4l2codecs] = "-Dv4l2codecs=enabled,-Dv4l2codecs=disabled,libgudev"
+PACKAGECONFIG[va] = "-Dva=enabled,-Dva=disabled,libva"
+PACKAGECONFIG[voaacenc] = "-Dvoaacenc=enabled,-Dvoaacenc=disabled,vo-aacenc"
+PACKAGECONFIG[voamrwbenc] = "-Dvoamrwbenc=enabled,-Dvoamrwbenc=disabled,vo-amrwbenc"
+PACKAGECONFIG[vulkan] = "-Dvulkan=enabled,-Dvulkan=disabled,vulkan-loader shaderc-native"
+PACKAGECONFIG[wayland] = "-Dwayland=enabled,-Dwayland=disabled,wayland-native wayland wayland-protocols libdrm"
+PACKAGECONFIG[webp] = "-Dwebp=enabled,-Dwebp=disabled,libwebp"
+PACKAGECONFIG[webrtc] = "-Dwebrtc=enabled,-Dwebrtc=disabled,libnice"
+PACKAGECONFIG[webrtcdsp] = "-Dwebrtcdsp=enabled,-Dwebrtcdsp=disabled,webrtc-audio-processing"
+PACKAGECONFIG[zbar] = "-Dzbar=enabled,-Dzbar=disabled,zbar"
+PACKAGECONFIG[x11] = "-Dx11=enabled,-Dx11=disabled,libxcb libxkbcommon"
+PACKAGECONFIG[x265] = "-Dx265=enabled,-Dx265=disabled,x265"
+
+GSTREAMER_GPL = "${@bb.utils.filter('PACKAGECONFIG', 'faad resindvd x265', d)}"
+
+EXTRA_OEMESON += " \
+ -Ddoc=disabled \
+ -Daes=enabled \
+ -Dcodecalpha=enabled \
+ -Ddecklink=enabled \
+ -Ddvb=enabled \
+ -Dfbdev=enabled \
+ -Dipcpipeline=enabled \
+ -Dshm=enabled \
+ -Dtranscode=enabled \
+ -Dandroidmedia=disabled \
+ -Dapplemedia=disabled \
+ -Dasio=disabled \
+ -Dbs2b=disabled \
+ -Dchromaprint=disabled \
+ -Dd3dvideosink=disabled \
+ -Dd3d11=disabled \
+ -Ddirectsound=disabled \
+ -Ddts=disabled \
+ -Dfdkaac=disabled \
+ -Dflite=disabled \
+ -Dgme=disabled \
+ -Dgs=disabled \
+ -Dgsm=disabled \
+ -Diqa=disabled \
+ -Dkate=disabled \
+ -Dladspa=disabled \
+ -Dldac=disabled \
+ -Dlv2=disabled \
+ -Dmagicleap=disabled \
+ -Dmediafoundation=disabled \
+ -Dmicrodns=disabled \
+ -Dmpeg2enc=disabled \
+ -Dmplex=disabled \
+ -Dmusepack=disabled \
+ -Dnvcodec=disabled \
+ -Dopenexr=disabled \
+ -Dopenni2=disabled \
+ -Dopenaptx=disabled \
+ -Dopensles=disabled \
+ -Donnx=disabled \
+ -Dqroverlay=disabled \
+ -Dsoundtouch=disabled \
+ -Dspandsp=disabled \
+ -Dsvthevcenc=disabled \
+ -Dteletext=disabled \
+ -Dwasapi=disabled \
+ -Dwasapi2=disabled \
+ -Dwildmidi=disabled \
+ -Dwinks=disabled \
+ -Dwinscreencap=disabled \
+ -Dwpe=disabled \
+ -Dzxing=disabled \
+"
+
+export OPENCV_PREFIX = "${STAGING_DIR_TARGET}${prefix}"
+
+ARM_INSTRUCTION_SET:armv4 = "arm"
+ARM_INSTRUCTION_SET:armv5 = "arm"
+
+FILES:${PN}-freeverb += "${datadir}/gstreamer-1.0/presets/GstFreeverb.prs"
+FILES:${PN}-opencv += "${datadir}/gst-plugins-bad/1.0/opencv*"
+FILES:${PN}-transcode += "${datadir}/gstreamer-1.0/encoding-profiles"
+FILES:${PN}-voamrwbenc += "${datadir}/gstreamer-1.0/presets/GstVoAmrwbEnc.prs"
+
+
+########### End of OE-core copy ###########
+
+########### i.MX overrides ################
+
+DEFAULT_PREFERENCE = "-1"
+
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=4fbd65380cdd255951079008b364516c"
+
+DEPENDS:append:imxgpu2d = " virtual/libg2d"
+
+SRC_URI:remove = "https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-${PV}.tar.xz \
+ file://0001-fix-maybe-uninitialized-warnings-when-compiling-with.patch \
+ file://0002-avoid-including-sys-poll.h-directly.patch"
+SRC_URI:prepend = "${GST1.0-PLUGINS-BAD_SRC};branch=${SRCBRANCH} "
+GST1.0-PLUGINS-BAD_SRC ?= "gitsm://github.com/nxp-imx/gst-plugins-bad.git;protocol=https"
+SRCBRANCH = "MM_04.08.03_2312_L6.6.y"
+SRCREV = "9de821c50b4dd7af2407d9c3d078020704510a20"
+
+S = "${WORKDIR}/git"
+
+inherit use-imx-headers
+
+PACKAGE_ARCH:imxpxp = "${MACHINE_SOCARCH}"
+PACKAGE_ARCH:mx8-nxp-bsp = "${MACHINE_SOCARCH}"
+
+PACKAGECONFIG_REMOVE ?= " \
+ dtls vulkan \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '', 'gl', d)} \
+"
+PACKAGECONFIG:remove = "${PACKAGECONFIG_REMOVE}"
+PACKAGECONFIG:append:mx8-nxp-bsp = " kms tinycompress"
+
+PACKAGECONFIG:append = " ${PACKAGECONFIG_G2D}"
+PACKAGECONFIG_G2D ??= ""
+PACKAGECONFIG_G2D:imxgpu2d ??= "g2d"
+
+PACKAGECONFIG[g2d] = ",,virtual/libg2d"
+PACKAGECONFIG[tinycompress] = "-Dtinycompress=enabled,-Dtinycompress=disabled,tinycompress"
+
+EXTRA_OEMESON += " \
+ -Dc_args="${CFLAGS} -I${STAGING_INCDIR_IMX}" \
+"
+
+COMPATIBLE_MACHINE = "(imx-nxp-bsp)"
+
+# it uses nested functions sadly, in ext/wayland/gstwaylandsink.c for GST_ELEMENT_REGISTER_DEFINE
+#
+TOOLCHAIN = "gcc"
+########### End of i.MX overrides #########
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch
deleted file mode 100644
index 4f141866..00000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch
+++ /dev/null
@@ -1,301 +0,0 @@
-From ae10bb875c88321a719a3dbcc94c78eb75b4b97f Mon Sep 17 00:00:00 2001
-From: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
-Date: Sun, 22 Dec 2019 14:34:16 +0000
-Subject: [PATCH 1/2] Makefile.am: prefix calls to pkg-config with
- PKG_CONFIG_SYSROOT_DIR
-
-Rebase following patch to match version 1.16.0 of gstreamer
-
-From: Yuqing Zhu <carol.zhu@nxp.com>
-Date: Fri, 20 Apr 2018 02:03:57 +0800
-Subject: [PATCH] Makefile.am: prefix calls to pkg-config with
- PKG_CONFIG_SYSROOT_DIR
-
-Do patch refine base on commit: 990b653c7b6de1937ec759019982d6c5f15770f7
-
-Upstream-Status: Pending [review on oe-core maillist]
-
-Signed-off-by: Yuqing Zhu <carol.zhu@nxp.com>
-Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
----
- gst-libs/gst/allocators/Makefile.am | 4 ++--
- gst-libs/gst/app/Makefile.am | 8 ++++----
- gst-libs/gst/audio/Makefile.am | 12 ++++++------
- 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 | 8 ++++----
- gst-libs/gst/sdp/Makefile.am | 4 ++--
- gst-libs/gst/tag/Makefile.am | 8 ++++----
- gst-libs/gst/video/Makefile.am | 8 ++++----
- 10 files changed, 40 insertions(+), 40 deletions(-)
-
-diff --git a/gst-libs/gst/allocators/Makefile.am b/gst-libs/gst/allocators/Makefile.am
-index 3e5f2a692..ca66056d3 100644
---- a/gst-libs/gst/allocators/Makefile.am
-+++ b/gst-libs/gst/allocators/Makefile.am
-@@ -55,7 +55,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}" \
-@@ -79,7 +79,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 11018b694..bd48a313c 100644
---- a/gst-libs/gst/app/Makefile.am
-+++ b/gst-libs/gst/app/Makefile.am
-@@ -51,8 +51,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@ \
-@@ -79,8 +79,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/audio/Makefile.am b/gst-libs/gst/audio/Makefile.am
-index f2d46e8a8..482902746 100644
---- a/gst-libs/gst/audio/Makefile.am
-+++ b/gst-libs/gst/audio/Makefile.am
-@@ -176,12 +176,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@ \
-@@ -210,8 +210,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/pbutils/Makefile.am b/gst-libs/gst/pbutils/Makefile.am
-index a771d5a8a..e926a5ef8 100644
---- a/gst-libs/gst/pbutils/Makefile.am
-+++ b/gst-libs/gst/pbutils/Makefile.am
-@@ -88,14 +88,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/" \
-@@ -128,8 +128,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 8f32b48d6..ecec07d1a 100644
---- a/gst-libs/gst/riff/Makefile.am
-+++ b/gst-libs/gst/riff/Makefile.am
-@@ -43,8 +43,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@ \
-@@ -75,8 +75,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 f6b996324..25122188f 100644
---- a/gst-libs/gst/rtp/Makefile.am
-+++ b/gst-libs/gst/rtp/Makefile.am
-@@ -66,8 +66,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@ \
-@@ -94,8 +94,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 02aaf4f9a..13ac1b395 100644
---- a/gst-libs/gst/rtsp/Makefile.am
-+++ b/gst-libs/gst/rtsp/Makefile.am
-@@ -71,8 +71,8 @@ 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_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=libgstrtsp-@GST_API_VERSION@.la \
- --include=Gio-2.0 \
- --include=Gst-@GST_API_VERSION@ \
-@@ -104,8 +104,8 @@ 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_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/sdp/Makefile.am b/gst-libs/gst/sdp/Makefile.am
-index cf8c001ad..61b8d83db 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
- --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}" \
-@@ -55,7 +55,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 83bda29eb..6c3accbe0 100644
---- a/gst-libs/gst/tag/Makefile.am
-+++ b/gst-libs/gst/tag/Makefile.am
-@@ -61,8 +61,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@ \
-@@ -89,8 +89,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 22c3f96f9..97342ef3c 100644
---- a/gst-libs/gst/video/Makefile.am
-+++ b/gst-libs/gst/video/Makefile.am
-@@ -126,8 +126,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@ \
-@@ -154,8 +154,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.17.1
-
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-gstallocator-Fix-typcasts.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-gstallocator-Fix-typcasts.patch
new file mode 100644
index 00000000..3ab4bab4
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-gstallocator-Fix-typcasts.patch
@@ -0,0 +1,47 @@
+From 90b94ff95c72487054fd283fb7cb5ebd13822b3f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 7 Aug 2023 18:56:05 -0700
+Subject: [PATCH] gstallocator: Fix typcasts
+
+These are found when building with clang+musl
+| ../git/gst-libs/gst/allocators/gstallocatorphymem.c:228:10: error: incompatible pointer to integer conversion returning 'gpointer' (aka 'void *') from a function with result type 'guintptr
+' (aka 'unsigned long') [-Wint-conversion]
+| 228 | return gst_phymem_get_phy (mem);
+| | ^~~~~~~~~~~~~~~~~~~~~~~~
+
+Upstream-Status: Submitted [https://github.com/nxp-imx/gst-plugins-base/pull/4]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gst-libs/gst/allocators/gstallocatorphymem.c | 2 +-
+ gst-libs/gst/gl/gstglphymemory.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/gst-libs/gst/allocators/gstallocatorphymem.c b/gst-libs/gst/allocators/gstallocatorphymem.c
+index f3c3306c7..f8a4511ab 100755
+--- a/gst-libs/gst/allocators/gstallocatorphymem.c
++++ b/gst-libs/gst/allocators/gstallocatorphymem.c
+@@ -225,7 +225,7 @@ static guintptr
+ gst_allocator_phymem_get_phys_addr (GstPhysMemoryAllocator * allocator,
+ GstMemory * mem)
+ {
+- return gst_phymem_get_phy (mem);
++ return (guintptr)gst_phymem_get_phy (mem);
+ }
+
+ static void
+diff --git a/gst-libs/gst/gl/gstglphymemory.c b/gst-libs/gst/gl/gstglphymemory.c
+index d82c9a66a..1d8be0a5d 100644
+--- a/gst-libs/gst/gl/gstglphymemory.c
++++ b/gst-libs/gst/gl/gstglphymemory.c
+@@ -337,7 +337,7 @@ gst_gl_physical_memory_setup_buffer (GstAllocator * allocator,
+ GST_VIDEO_INFO_HEIGHT (info),
+ viv_fmt,
+ memblk->vaddr,
+- memblk->paddr,
++ (guint)memblk->paddr,
+ FALSE
+ };
+
+--
+2.41.0
+
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch
deleted file mode 100644
index b3e4326b..00000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 836769c4a26231f36a48aeadb9e332bd7224c785 Mon Sep 17 00:00:00 2001
-From: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
-Date: Sun, 22 Dec 2019 14:49:57 +0000
-Subject: [PATCH 2/2] rtsp: drop incorrect reference to gstreamer-sdp in
- Makefile.am
-
-Rebase following patch from upstream to match NXP version 1.16:
-
-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>
-Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.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 13ac1b395..8b03125c7 100644
---- a/gst-libs/gst/rtsp/Makefile.am
-+++ b/gst-libs/gst/rtsp/Makefile.am
-@@ -82,7 +82,6 @@ GstRtsp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtsp-@GST_API_VERS
- --pkg gio-2.0 \
- --pkg gstreamer-@GST_API_VERSION@ \
- --pkg gstreamer-base-@GST_API_VERSION@ \
-- --pkg gstreamer-sdp-@GST_API_VERSION@ \
- --pkg-export gstreamer-rtsp-@GST_API_VERSION@ \
- --add-init-section="$(INTROSPECTION_INIT)" \
- --output $@ \
---
-2.17.1
-
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-riff-add-missing-include-directories-when-calling-in.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-riff-add-missing-include-directories-when-calling-in.patch
deleted file mode 100644
index 9b66f7f4..00000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-riff-add-missing-include-directories-when-calling-in.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-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/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/make-gio_unix_2_0-dependency-configurable.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/make-gio_unix_2_0-dependency-configurable.patch
deleted file mode 100644
index 23950b67..00000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/make-gio_unix_2_0-dependency-configurable.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 7ffa6e3d00e1d8a060f3f4c2bb9a72691af05d79 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 12807bc..35a0bf3 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -806,9 +806,16 @@ AM_CONDITIONAL(HAVE_PNG, test "x$HAVE_PNG" = "xyes")
- AM_CONDITIONAL(HAVE_JPEG, test "x$HAVE_JPEG" = "xyes")
-
- 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
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.%.bbappend b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.%.bbappend
deleted file mode 100644
index 8565c6a5..00000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.%.bbappend
+++ /dev/null
@@ -1,3 +0,0 @@
-PACKAGECONFIG_GL_imxgpu2d = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl x11', 'opengl', '', d)}"
-PACKAGECONFIG_GL_imxgpu3d = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}"
-PACKAGECONFIG_GL_use-mainline-bsp = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}"
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.imx.bb
deleted file mode 100644
index 1310d94d..00000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.imx.bb
+++ /dev/null
@@ -1,84 +0,0 @@
-require recipes-multimedia/gstreamer/gstreamer1.0-plugins-common.inc
-
-LICENSE = "GPLv2+ & LGPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \
- file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607"
-
-DEPENDS += "iso-codes util-linux"
-DEPENDS_append_imxgpu2d = " virtual/libg2d"
-
-GST1.0-PLUGINS-BASE_SRC ?= "gitsm://source.codeaurora.org/external/imx/gst-plugins-base.git;protocol=https"
-SRCBRANCH = "MM_04.05.01_1909_L4.19.35"
-SRCREV = "df30480711d68a1c1d2152bf4d6a7b245a85f967"
-SRC_URI = " \
- ${GST1.0-PLUGINS-BASE_SRC};branch=${SRCBRANCH} \
- file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
- file://make-gio_unix_2_0-dependency-configurable.patch \
- file://0001-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch \
- file://0003-riff-add-missing-include-directories-when-calling-in.patch \
- file://0002-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch \
-"
-
-S = "${WORKDIR}/git"
-
-inherit gettext use-imx-headers
-
-DEFAULT_PREFERENCE = "-1"
-
-EXTRA_AUTORECONF = ""
-
-# opengl packageconfig factored out to make it easy for distros
-# and BSP layers to pick either (desktop) opengl, gles2, or no GL
-PACKAGES_DYNAMIC =+ "^libgst.*"
-
-PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}"
-
-PACKAGECONFIG ??= " \
- ${GSTREAMER_ORC} \
- ${@bb.utils.filter('DISTRO_FEATURES', 'alsa x11', d)} \
- ogg pango theora vorbis \
- ${PACKAGECONFIG_GL} \
- gio-unix-2.0 zlib \
- ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland egl', '', d)} \
-"
-
-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[ivorbis] = "--enable-ivorbis,--disable-ivorbis,tremor"
-PACKAGECONFIG[ogg] = "--enable-ogg,--disable-ogg,libogg"
-PACKAGECONFIG[opus] = "--enable-opus,--disable-opus,libopus"
-PACKAGECONFIG[pango] = "--enable-pango,--disable-pango,pango"
-PACKAGECONFIG[theora] = "--enable-theora,--disable-theora,libtheora"
-PACKAGECONFIG[visual] = "--enable-libvisual,--disable-libvisual,libvisual"
-PACKAGECONFIG[vorbis] = "--enable-vorbis,--disable-vorbis,libvorbis"
-PACKAGECONFIG[x11] = "${X11ENABLEOPTS},${X11DISABLEOPTS},${X11DEPENDS}"
-PACKAGECONFIG[egl] = "--enable-egl,--disable-egl,virtual/egl"
-PACKAGECONFIG[gio-unix-2.0] = "--enable-gio_unix_2_0,--disable-gio_unix_2_0,glib-2.0"
-PACKAGECONFIG[gles2] = "--enable-gles2,--disable-gles2,virtual/libgles2"
-PACKAGECONFIG[opengl] = "--enable-opengl,--disable-opengl,virtual/libgl libglu"
-PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,wayland-native wayland wayland-protocols libdrm"
-PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib"
-
-# Disable introspection to fix [GstGL-1.0.gir] Error
-EXTRA_OECONF += " \
- --enable-zlib \
- CPPFLAGS="-I${STAGING_INCDIR_IMX}" \
- --disable-introspection \
- --disable-opengl \
- --enable-wayland \
-"
-
-FILES_${PN} += "${libdir}/gstreamer-1.0/include"
-FILES_${MLPREFIX}libgsttag-1.0 += "${datadir}/gst-plugins-base/1.0/license-translations.dict"
-
-CACHED_CONFIGUREVARS_append_x86 = " ac_cv_header_emmintrin_h=no ac_cv_header_xmmintrin_h=no"
-
-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"
-}
-
-COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.22.%.bbappend b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.22.%.bbappend
new file mode 100644
index 00000000..ca6636b8
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.22.%.bbappend
@@ -0,0 +1,17 @@
+PACKAGECONFIG_GL:imxgpu2d = \
+ "${@bb.utils.contains('DISTRO_FEATURES', 'opengl x11', 'opengl', '', d)}"
+PACKAGECONFIG_GL:imxgpu3d = \
+ "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}"
+PACKAGECONFIG_GL:use-mainline-bsp = \
+ "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl gbm', '', d)}"
+
+# The i.MX8 uses KMS instead of the Vivante specific framebuffer API.
+# The i.MX7 does not have a GPU, except for ULP.
+# This leaves the i.MX6 - with the vendor BSP - as the remaining use case for viv-fb.
+#
+# (Note that viv-fb is about the _windowing system_. Vivante direct texture support
+# does not depend on the viv-fb feature. It used to, but that was actually a bug
+# which was fixed in GStreamer 1.22.5. Since then, the direct texture support is
+# detected by Meson by checking for direct texture symbols like "glTexDirectVIV".)
+PACKAGECONFIG_GL:append:mx6-nxp-bsp = " viv-fb "
+PACKAGECONFIG_GL:append:mx7ulp-nxp-bsp = " viv-fb "
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.22.5.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.22.5.imx.bb
new file mode 100644
index 00000000..dd7869a9
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.22.5.imx.bb
@@ -0,0 +1,146 @@
+# This recipe is for the i.MX fork of gstreamer1.0-plugins-base. For ease of
+# maintenance, the top section is a verbatim copy of an OE-core
+# recipe. The second section customizes the recipe for i.MX.
+
+########### OE-core copy ##################
+# Upstream hash: 937817e5164f8af8452aec03ae3c45cb23d63df9
+
+require gstreamer1.0-plugins-common.inc
+
+SUMMARY = "'Base' GStreamer plugins and helper libraries"
+HOMEPAGE = "https://gstreamer.freedesktop.org/"
+BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues"
+LICENSE = "LGPL-2.1-or-later"
+LIC_FILES_CHKSUM = "file://COPYING;md5=69333daa044cb77e486cc36129f7a770"
+
+SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-${PV}.tar.xz \
+ file://0001-ENGR00312515-get-caps-from-src-pad-when-query-caps.patch \
+ file://0003-viv-fb-Make-sure-config.h-is-included.patch \
+ file://0002-ssaparse-enhance-SSA-text-lines-parsing.patch \
+ "
+SRC_URI[sha256sum] = "edd4338b45c26a9af28c0d35aab964a024c3884ba6f520d8428df04212c8c93a"
+
+S = "${WORKDIR}/gst-plugins-base-${PV}"
+
+DEPENDS += "iso-codes util-linux zlib"
+
+inherit gobject-introspection
+
+# opengl packageconfig factored out to make it easy for distros
+# and BSP layers to choose OpenGL APIs/platforms/window systems
+PACKAGECONFIG_X11 = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'opengl glx', '', d)}"
+PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl ${PACKAGECONFIG_X11}', '', d)}"
+
+PACKAGECONFIG ??= " \
+ ${GSTREAMER_ORC} \
+ ${PACKAGECONFIG_GL} \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'alsa x11', d)} \
+ jpeg ogg pango png theora vorbis \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland egl', '', d)} \
+"
+
+OPENGL_APIS = 'opengl gles2'
+OPENGL_PLATFORMS = 'egl glx'
+
+X11DEPENDS = "virtual/libx11 libsm libxrender libxv"
+X11ENABLEOPTS = "-Dx11=enabled -Dxvideo=enabled -Dxshm=enabled"
+X11DISABLEOPTS = "-Dx11=disabled -Dxvideo=disabled -Dxshm=disabled"
+
+PACKAGECONFIG[alsa] = "-Dalsa=enabled,-Dalsa=disabled,alsa-lib"
+PACKAGECONFIG[cdparanoia] = "-Dcdparanoia=enabled,-Dcdparanoia=disabled,cdparanoia"
+PACKAGECONFIG[graphene] = "-Dgl-graphene=enabled,-Dgl-graphene=disabled,graphene"
+PACKAGECONFIG[jpeg] = "-Dgl-jpeg=enabled,-Dgl-jpeg=disabled,jpeg"
+PACKAGECONFIG[ogg] = "-Dogg=enabled,-Dogg=disabled,libogg"
+PACKAGECONFIG[opus] = "-Dopus=enabled,-Dopus=disabled,libopus"
+PACKAGECONFIG[pango] = "-Dpango=enabled,-Dpango=disabled,pango"
+PACKAGECONFIG[png] = "-Dgl-png=enabled,-Dgl-png=disabled,libpng"
+# This enables Qt5 QML examples in -base. The Qt5 GStreamer
+# qmlglsink and qmlglsrc plugins still exist in -good.
+PACKAGECONFIG[qt5] = "-Dqt5=enabled,-Dqt5=disabled,qtbase qtdeclarative qtbase-native"
+PACKAGECONFIG[theora] = "-Dtheora=enabled,-Dtheora=disabled,libtheora"
+PACKAGECONFIG[tremor] = "-Dtremor=enabled,-Dtremor=disabled,tremor"
+PACKAGECONFIG[visual] = "-Dlibvisual=enabled,-Dlibvisual=disabled,libvisual"
+PACKAGECONFIG[vorbis] = "-Dvorbis=enabled,-Dvorbis=disabled,libvorbis"
+PACKAGECONFIG[x11] = "${X11ENABLEOPTS},${X11DISABLEOPTS},${X11DEPENDS}"
+
+# OpenGL API packageconfigs
+PACKAGECONFIG[opengl] = ",,virtual/libgl libglu"
+PACKAGECONFIG[gles2] = ",,virtual/libgles2"
+
+# OpenGL platform packageconfigs
+PACKAGECONFIG[egl] = ",,virtual/egl"
+PACKAGECONFIG[glx] = ",,virtual/libgl"
+
+# OpenGL window systems (except for X11)
+PACKAGECONFIG[gbm] = ",,virtual/libgbm libgudev libdrm"
+PACKAGECONFIG[wayland] = ",,wayland-native wayland wayland-protocols libdrm"
+PACKAGECONFIG[dispmanx] = ",,virtual/libomxil"
+PACKAGECONFIG[viv-fb] = ",,virtual/libgles2 virtual/libg2d"
+
+OPENGL_WINSYS = "${@bb.utils.filter('PACKAGECONFIG', 'x11 gbm wayland dispmanx egl viv-fb', d)}"
+
+EXTRA_OEMESON += " \
+ -Ddoc=disabled \
+ ${@get_opengl_cmdline_list('gl_api', d.getVar('OPENGL_APIS'), d)} \
+ ${@get_opengl_cmdline_list('gl_platform', d.getVar('OPENGL_PLATFORMS'), d)} \
+ ${@get_opengl_cmdline_list('gl_winsys', d.getVar('OPENGL_WINSYS'), d)} \
+"
+
+FILES:${PN}-dev += "${libdir}/gstreamer-1.0/include/gst/gl/gstglconfig.h"
+FILES:${MLPREFIX}libgsttag-1.0 += "${datadir}/gst-plugins-base/1.0/license-translations.dict"
+
+def get_opengl_cmdline_list(switch_name, options, d):
+ selected_options = []
+ if bb.utils.contains('DISTRO_FEATURES', 'opengl', True, False, d):
+ for option in options.split():
+ if bb.utils.contains('PACKAGECONFIG', option, True, False, d):
+ selected_options += [option]
+ if selected_options:
+ return '-D' + switch_name + '=' + ','.join(selected_options)
+ else:
+ return ''
+
+CVE_PRODUCT += "gst-plugins-base"
+
+########### End of OE-core copy ###########
+
+########### i.MX overrides ################
+
+DEFAULT_PREFERENCE = "-1"
+
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=69333daa044cb77e486cc36129f7a770"
+
+SRC_URI:remove = " \
+ https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-${PV}.tar.xz \
+ file://0001-ENGR00312515-get-caps-from-src-pad-when-query-caps.patch \
+ file://0003-viv-fb-Make-sure-config.h-is-included.patch \
+ file://0002-ssaparse-enhance-SSA-text-lines-parsing.patch"
+SRC_URI:prepend = "${GST1.0-PLUGINS-BASE_SRC};branch=${SRCBRANCH} "
+SRC_URI:append = " file://0001-gstallocator-Fix-typcasts.patch"
+GST1.0-PLUGINS-BASE_SRC ?= "gitsm://github.com/nxp-imx/gst-plugins-base.git;protocol=https"
+SRCBRANCH = "MM_04.08.03_2312_L6.6.y"
+SRCREV = "c4333767ea122c182ba4e14cababe8dbe2a1b882"
+
+S = "${WORKDIR}/git"
+
+inherit use-imx-headers
+
+PACKAGECONFIG:remove = "${PACKAGECONFIG_REMOVE}"
+PACKAGECONFIG_REMOVE ?= "jpeg"
+
+PACKAGECONFIG:append = " ${PACKAGECONFIG_G2D}"
+PACKAGECONFIG_G2D ??= ""
+PACKAGECONFIG_G2D:imxgpu2d ??= "g2d"
+
+PACKAGECONFIG[g2d] = ",,virtual/libg2d"
+PACKAGECONFIG[viv-fb] = ",,virtual/libgles2"
+
+EXTRA_OEMESON += "-Dc_args="${CFLAGS} -I${STAGING_INCDIR_IMX}""
+
+# links with imx-gpu libs which are pre-built for glibc
+# gcompat will address it during runtime
+LDFLAGS:append:imxgpu:libc-musl = " -Wl,--allow-shlib-undefined"
+
+COMPATIBLE_MACHINE = "(imx-nxp-bsp)"
+
+########### End of i.MX overrides #########
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-common.inc b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-common.inc
new file mode 100644
index 00000000..54dd9287
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-common.inc
@@ -0,0 +1,47 @@
+# This .inc file contains the common setup for the gstreamer1.0-plugins-*
+# plugin set recipes.
+
+# SUMMARY is set in the actual .bb recipes
+HOMEPAGE = "https://gstreamer.freedesktop.org/"
+BUGTRACKER = "https://bugzilla.gnome.org/enter_bug.cgi?product=Gstreamer"
+SECTION = "multimedia"
+
+DEPENDS = "gstreamer1.0 glib-2.0-native"
+
+inherit gettext meson pkgconfig upstream-version-is-even
+
+require gstreamer1.0-plugins-packaging.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).
+# This value is used in the PACKAGECONFIG values for each plugin set recipe.
+# By modifying it, Orc can be enabled/disabled in all of these recipes at once.
+GSTREAMER_ORC ?= "orc"
+# workaround to disable orc on mips to fix the build failure
+# {standard input}: Assembler messages:
+# {standard input}:46587: Error: branch out of range
+GSTREAMER_ORC:mips = ""
+PACKAGECONFIG[orc] = "-Dorc=enabled,-Dorc=disabled,orc orc-native"
+
+# TODO: put this in a gettext.bbclass patch (with variables to allow for
+# configuring the option name and the enabled/disabled values).
+def gettext_oemeson(d):
+ if d.getVar('USE_NLS') == 'no':
+ return '-Dnls=disabled'
+ # Remove the NLS bits if USE_NLS is no or INHIBIT_DEFAULT_DEPS is set
+ if d.getVar('INHIBIT_DEFAULT_DEPS') and not oe.utils.inherits(d, 'cross-canadian'):
+ return '-Dnls=disabled'
+ return '-Dnls=enabled'
+
+# Not all plugin sets contain examples, so the -Dexamples
+# option needs to be added conditionally.
+GST_PLUGIN_SET_HAS_EXAMPLES ?= "1"
+
+EXTRA_OEMESON += " \
+ ${@bb.utils.contains('GST_PLUGIN_SET_HAS_EXAMPLES', '1', '-Dexamples=disabled', '', d)} \
+ ${@gettext_oemeson(d)} \
+"
+
+GIR_MESON_ENABLE_FLAG = "enabled"
+GIR_MESON_DISABLE_FLAG = "disabled"
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.%.bbappend b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.%.bbappend
deleted file mode 100644
index 8565c6a5..00000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.%.bbappend
+++ /dev/null
@@ -1,3 +0,0 @@
-PACKAGECONFIG_GL_imxgpu2d = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl x11', 'opengl', '', d)}"
-PACKAGECONFIG_GL_imxgpu3d = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}"
-PACKAGECONFIG_GL_use-mainline-bsp = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}"
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.imx.bb
deleted file mode 100644
index d09be8dd..00000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.imx.bb
+++ /dev/null
@@ -1,83 +0,0 @@
-require recipes-multimedia/gstreamer/gstreamer1.0-plugins-common.inc
-
-LICENSE = "GPLv2+ & LGPLv2.1+"
-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"
-
-GST1.0-PLUGINS-GOOD_SRC ?= "gitsm://source.codeaurora.org/external/imx/gst-plugins-good.git;protocol=https"
-SRCBRANCH = "MM_04.05.01_1909_L4.19.35"
-
-SRC_URI = " \
- ${GST1.0-PLUGINS-GOOD_SRC};branch=${SRCBRANCH} \
- file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
-"
-SRCREV = "3bcc85705695ee629ac3fb687411bb196d231918"
-
-DEFAULT_PREFERENCE = "-1"
-
-EXTRA_AUTORECONF = ""
-
-S = "${WORKDIR}/git"
-
-DEPENDS += "gstreamer1.0-plugins-base libcap zlib bzip2"
-RPROVIDES_${PN}-soup += "${PN}-souphttpsrc"
-
-inherit gettext
-
-PACKAGECONFIG ??= " \
- ${GSTREAMER_ORC} \
- ${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio 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,v4l-utils"
-PACKAGECONFIG[pulseaudio] = "--enable-pulse,--disable-pulse,pulseaudio"
-PACKAGECONFIG[soup] = "--enable-soup,--disable-soup,libsoup-2.4"
-PACKAGECONFIG[speex] = "--enable-speex,--disable-speex,speex"
-PACKAGECONFIG[taglib] = "--enable-taglib,--disable-taglib,taglib"
-PACKAGECONFIG[v4l2] = "--enable-gst_v4l2 --enable-v4l2-probe,--disable-gst_v4l2,libdrm"
-PACKAGECONFIG[vpx] = "--enable-vpx,--disable-vpx,libvpx"
-PACKAGECONFIG[wavpack] = "--enable-wavpack,--disable-wavpack,wavpack"
-PACKAGECONFIG[x11] = "--enable-x,--disable-x,${X11DEPENDS}"
-PACKAGECONFIG[bz2] = "--enable-bz2,--disable-bz2,bzip2"
-PACKAGECONFIG[gtk] = "--enable-gtk3,--disable-gtk3,gtk+3"
-PACKAGECONFIG[lame] = "--enable-lame,--disable-lame,lame"
-PACKAGECONFIG[mpg123] = "--enable-mpg123,--disable-mpg123,mpg123"
-PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib"
-
-# 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-good bbappend).
-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-waveform \
- --disable-qt \
- --disable-twolame \
-"
-
-FILES_${PN}-equalizer += "${datadir}/gstreamer-1.0/presets/*.prs"
-
-COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.22.5.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.22.5.imx.bb
new file mode 100644
index 00000000..9e09ef93
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.22.5.imx.bb
@@ -0,0 +1,127 @@
+# This recipe is for the i.MX fork of gstreamer1.0-plugins-good. For ease of
+# maintenance, the top section is a verbatim copy of an OE-core
+# recipe. The second section customizes the recipe for i.MX.
+
+########### OE-core copy ##################
+# Upstream hash: 937817e5164f8af8452aec03ae3c45cb23d63df9
+
+require gstreamer1.0-plugins-common.inc
+
+SUMMARY = "'Good' GStreamer plugins"
+HOMEPAGE = "https://gstreamer.freedesktop.org/"
+BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues"
+
+SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-${PV}.tar.xz \
+ file://0001-qt-include-ext-qt-gstqtgl.h-instead-of-gst-gl-gstglf.patch \
+ file://0001-v4l2-Define-ioctl_req_t-for-posix-linux-case.patch"
+
+SRC_URI[sha256sum] = "b67b31313a54c6929b82969d41d3cfdf2f58db573fb5f491e6bba5d84aea0778"
+
+S = "${WORKDIR}/gst-plugins-good-${PV}"
+
+LICENSE = "LGPL-2.1-or-later"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
+ file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe"
+
+DEPENDS += "gstreamer1.0-plugins-base libcap zlib"
+RPROVIDES:${PN}-pulseaudio += "${PN}-pulse"
+RPROVIDES:${PN}-soup += "${PN}-souphttpsrc"
+RDEPENDS:${PN}-soup += "${MLPREFIX}${@bb.utils.contains('PACKAGECONFIG', 'soup2', 'libsoup-2.4', 'libsoup', d)}"
+
+PACKAGECONFIG_SOUP ?= "soup3"
+
+PACKAGECONFIG ??= " \
+ ${GSTREAMER_ORC} \
+ ${PACKAGECONFIG_SOUP} \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio x11', d)} \
+ ${@bb.utils.contains('TUNE_FEATURES', 'm64', 'asm', '', d)} \
+ bz2 cairo flac gdk-pixbuf gudev jpeg lame libpng mpg123 speex taglib v4l2 \
+"
+
+X11DEPENDS = "virtual/libx11 libsm libxrender libxfixes libxdamage"
+X11ENABLEOPTS = "-Dximagesrc=enabled -Dximagesrc-xshm=enabled -Dximagesrc-xfixes=enabled -Dximagesrc-xdamage=enabled"
+X11DISABLEOPTS = "-Dximagesrc=disabled -Dximagesrc-xshm=disabled -Dximagesrc-xfixes=disabled -Dximagesrc-xdamage=disabled"
+
+QT5WAYLANDDEPENDS = "${@bb.utils.contains("DISTRO_FEATURES", "wayland", "qtwayland", "", d)}"
+
+PACKAGECONFIG[asm] = "-Dasm=enabled,-Dasm=disabled,nasm-native"
+PACKAGECONFIG[bz2] = "-Dbz2=enabled,-Dbz2=disabled,bzip2"
+PACKAGECONFIG[cairo] = "-Dcairo=enabled,-Dcairo=disabled,cairo"
+PACKAGECONFIG[dv1394] = "-Ddv1394=enabled,-Ddv1394=disabled,libiec61883 libavc1394 libraw1394"
+PACKAGECONFIG[flac] = "-Dflac=enabled,-Dflac=disabled,flac"
+PACKAGECONFIG[gdk-pixbuf] = "-Dgdk-pixbuf=enabled,-Dgdk-pixbuf=disabled,gdk-pixbuf"
+PACKAGECONFIG[gtk] = "-Dgtk3=enabled,-Dgtk3=disabled,gtk+3"
+PACKAGECONFIG[gudev] = "-Dv4l2-gudev=enabled,-Dv4l2-gudev=disabled,libgudev"
+PACKAGECONFIG[jack] = "-Djack=enabled,-Djack=disabled,jack"
+PACKAGECONFIG[jpeg] = "-Djpeg=enabled,-Djpeg=disabled,jpeg"
+PACKAGECONFIG[lame] = "-Dlame=enabled,-Dlame=disabled,lame"
+PACKAGECONFIG[libpng] = "-Dpng=enabled,-Dpng=disabled,libpng"
+PACKAGECONFIG[libv4l2] = "-Dv4l2-libv4l2=enabled,-Dv4l2-libv4l2=disabled,v4l-utils"
+PACKAGECONFIG[mpg123] = "-Dmpg123=enabled,-Dmpg123=disabled,mpg123"
+PACKAGECONFIG[pulseaudio] = "-Dpulse=enabled,-Dpulse=disabled,pulseaudio"
+PACKAGECONFIG[qt5] = "-Dqt5=enabled,-Dqt5=disabled,qtbase qtdeclarative qtbase-native ${QT5WAYLANDDEPENDS}"
+PACKAGECONFIG[soup2] = "-Dsoup=enabled,,libsoup-2.4,,,soup3"
+PACKAGECONFIG[soup3] = "-Dsoup=enabled,,libsoup,,,soup2"
+PACKAGECONFIG[speex] = "-Dspeex=enabled,-Dspeex=disabled,speex"
+PACKAGECONFIG[rpi] = "-Drpicamsrc=enabled,-Drpicamsrc=disabled,userland"
+PACKAGECONFIG[taglib] = "-Dtaglib=enabled,-Dtaglib=disabled,taglib"
+PACKAGECONFIG[v4l2] = "-Dv4l2=enabled -Dv4l2-probe=true,-Dv4l2=disabled -Dv4l2-probe=false"
+PACKAGECONFIG[vpx] = "-Dvpx=enabled,-Dvpx=disabled,libvpx"
+PACKAGECONFIG[wavpack] = "-Dwavpack=enabled,-Dwavpack=disabled,wavpack"
+PACKAGECONFIG[x11] = "${X11ENABLEOPTS},${X11DISABLEOPTS},${X11DEPENDS}"
+
+EXTRA_OEMESON += " \
+ -Ddoc=disabled \
+ -Daalib=disabled \
+ -Ddirectsound=disabled \
+ -Ddv=disabled \
+ -Dlibcaca=disabled \
+ -Doss=enabled \
+ -Doss4=disabled \
+ -Dosxaudio=disabled \
+ -Dosxvideo=disabled \
+ -Dshout2=disabled \
+ -Dtwolame=disabled \
+ -Dwaveform=disabled \
+"
+
+FILES:${PN}-equalizer += "${datadir}/gstreamer-1.0/presets/*.prs"
+
+########### End of OE-core copy ###########
+
+########### i.MX overrides ################
+
+DEFAULT_PREFERENCE = "-1"
+
+LIC_FILES_CHKSUM = " \
+ file://LICENSE.txt;md5=a6f89e2100d9b6cdffcea4f398e37343 \
+ file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe \
+"
+# Enable pulsesink in gstreamer
+PACKAGECONFIG:append = "${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)}"
+
+# fb implementation of v4l2 uses libdrm
+DEPENDS += "${@bb.utils.contains('PACKAGECONFIG', 'v4l2', '${DEPENDS_V4L2}', '', d)}"
+DEPENDS_V4L2 = "${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'libdrm', d)}"
+
+SRC_URI:remove = "https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-${PV}.tar.xz \
+ file://0001-qt-include-ext-qt-gstqtgl.h-instead-of-gst-gl-gstglf.patch \
+ file://0001-v4l2-Define-ioctl_req_t-for-posix-linux-case.patch \
+"
+
+SRC_URI:prepend = "${GST1.0-PLUGINS-GOOD_SRC};branch=${SRCBRANCH} "
+GST1.0-PLUGINS-GOOD_SRC ?= "gitsm://github.com/nxp-imx/gst-plugins-good.git;protocol=https"
+SRCBRANCH = "MM_04.08.03_2312_L6.6.y"
+SRCREV = "d361360510c97dc23abbfcdd22dff8214890527d"
+
+# set 32bit compile timer for 32-bit platform
+GLIBC_64BIT_TIME_FLAGS:mx6-nxp-bsp = ""
+GLIBC_64BIT_TIME_FLAGS:mx7-nxp-bsp = ""
+INSANE_SKIP:mx6-nxp-bsp:append = " 32bit-time"
+INSANE_SKIP:mx7-nxp-bsp:append = " 32bit-time"
+
+S = "${WORKDIR}/git"
+
+COMPATIBLE_MACHINE = "(imx-nxp-bsp)"
+
+########### End of i.MX overrides #########
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_2.2.0.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_2.2.0.bb
new file mode 100644
index 00000000..5bf60e62
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_2.2.0.bb
@@ -0,0 +1,68 @@
+# Copyright (C) 2018 O.S. Systems Software LTDA.
+DESCRIPTION = "GStreamer 1.0 plugins for i.MX platforms"
+LICENSE = "LGPL-2.0-or-later"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=55ca817ccb7d5b5b66355690e9abc605"
+SECTION = "multimedia"
+DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base libimxdmabuffer"
+# add the audioparsers and the videoparsersbad plugins as RDEPENDS ; audioparsers
+# for the uniaudio decoder, videoparsersbad for the VPU video decoder
+# the gstreamer1.0-plugins-imx RDEPENDS is necessary to ensure the -good recipe is
+# built (it is not a compile-time dependency however, hence RDEPENDS and not DEPENDS)
+RDEPENDS:gstreamer1.0-plugins-imx = "gstreamer1.0-plugins-good gstreamer1.0-plugins-bad"
+RDEPENDS:gstreamer1.0-plugins-imx-imxaudio = "gstreamer1.0-plugins-good-audioparsers"
+RDEPENDS:gstreamer1.0-plugins-imx-imxvpu = "gstreamer1.0-plugins-bad-videoparsersbad"
+
+PV .= "+git${SRCPV}"
+
+SRCBRANCH ?= "master"
+SRCREV = "cb3cd45676e808b222ac573e8a118f44fd70c288"
+SRC_URI = "git://github.com/Freescale/gstreamer-imx.git;branch=${SRCBRANCH};protocol=https"
+
+S = "${WORKDIR}/git"
+
+inherit pkgconfig meson use-imx-headers
+
+# libg2d on i.MX8 SoCs with a DPU is emulated via the DPU.
+# That particular libg2d .so depends on libdrm, however.
+# Also, due to behavioral differences, an additional flag
+# is needed to improve performance.
+LIBG2D_DPU_OPTION = "-Dg2d-based-on-dpu=false"
+LIBG2D_DEPENDENCIES = "virtual/libg2d"
+LIBG2D_DPU_OPTION:imxdpu = "-Dg2d-based-on-dpu=true"
+LIBG2D_DEPENDENCIES:imxdpu = "virtual/libg2d libdrm"
+
+# v4l2-amphion and v4l2-isi are meant for the Amphion Malone
+# VPU decoder and the ISI drivers in older kernels, which had
+# lots of bugs that required nontrivial workarounds. In the
+# kernels in this release, newer drivers are present, which
+# obviate the need for these special elements.
+EXTRA_OEMESON += "-Dimx-headers-path=${STAGING_INCDIR_IMX} -Dv4l2-amphion=disabled -Dv4l2-isi=false"
+
+PACKAGECONFIG ?= "uniaudiodec"
+PACKAGECONFIG:append:imxgpu2d = " g2d"
+PACKAGECONFIG:append:imxvpu = " vpu"
+PACKAGECONFIG:append:imxipu = " ipu"
+PACKAGECONFIG:append:imxpxp = " pxp"
+# The custom imxv4l2 source and sink elements are only
+# available on the i.MX6.
+# The 2D blitter sinks require an MXC framebuffer, which
+# is not available anymore on the i.MX8 (since these SoCs
+# now use KMS instead of the old Linux framebuffer).
+PACKAGECONFIG:append:mx6-nxp-bsp = " imx2dvideosink v4l2-mxc-source-sink"
+PACKAGECONFIG:append:mx7-nxp-bsp = " imx2dvideosink"
+
+PACKAGECONFIG[g2d] = "-Dg2d=enabled ${LIBG2D_DPU_OPTION},-Dg2d=disabled,${LIBG2D_DEPENDENCIES}"
+PACKAGECONFIG[pxp] = "-Dpxp=enabled,-Dpxp=disabled,"
+PACKAGECONFIG[ipu] = "-Dipu=enabled,-Dipu=disabled,"
+PACKAGECONFIG[vpu] = "-Dvpu=enabled,-Dvpu=disabled,libimxvpuapi2"
+PACKAGECONFIG[imx2dvideosink] = "-Dimx2d-videosink=true,-Dimx2d-videosink=false,"
+PACKAGECONFIG[v4l2-mxc-source-sink] = "-Dv4l2-mxc-source-sink=true,-Dv4l2-mxc-source-sink=false,"
+PACKAGECONFIG[uniaudiodec] = "-Duniaudiodec=enabled,-Duniaudiodec=disabled,imx-codec"
+PACKAGECONFIG[mp3encoder] = "-Dmp3encoder=enabled,-Dmp3encoder=disabled,imx-codec"
+
+require gstreamer1.0-plugins-packaging.inc
+
+# the following line is required to produce one package for each plugin
+PACKAGES_DYNAMIC = "^${PN}-.*"
+
+COMPATIBLE_MACHINE = "(mx6dl-nxp-bsp|mx6q-nxp-bsp|mx6sl-nxp-bsp|mx6sx-nxp-bsp|mx6ul-nxp-bsp|mx6ull-nxp-bsp|mx7d-nxp-bsp|mx8-nxp-bsp)"
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_git.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_git.bb
deleted file mode 100644
index ce836df1..00000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_git.bb
+++ /dev/null
@@ -1,71 +0,0 @@
-# Copyright (C) 2018 O.S. Systems Software LTDA.
-DESCRIPTION = "GStreamer 1.0 plugins for i.MX platforms"
-LICENSE = "LGPLv2+"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=55ca817ccb7d5b5b66355690e9abc605"
-SECTION = "multimedia"
-# gstreamer1.0-plugins-bad is in DEPENDS because the build script scans for the
-# GstPhotography headers and libraries
-DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad"
-# add the audioparsers and the videoparsersbad plugins as RDEPENDS ; audioparsers
-# for the uniaudio decoder, videoparsersbad for the VPU video decoder
-# the gstreamer1.0-plugins-imx RDEPENDS is necessary to ensure the -good recipe is
-# build (it is not a compile-time dependency however, hence RDEPENDS and not DEPENDS)
-RDEPENDS_gstreamer1.0-plugins-imx = "gstreamer1.0-plugins-good"
-RDEPENDS_gstreamer1.0-plugins-imx-imxaudio = "gstreamer1.0-plugins-good-audioparsers"
-RDEPENDS_gstreamer1.0-plugins-imx-imxvpu = "gstreamer1.0-plugins-bad-videoparsersbad"
-
-PV = "0.13.0+git${SRCPV}"
-
-SRCBRANCH ?= "master"
-SRCREV = "64485a1573f39a79f92688f9e32b2babab066b9d"
-SRC_URI = "git://github.com/Freescale/gstreamer-imx.git;branch=${SRCBRANCH}"
-
-S = "${WORKDIR}/git"
-
-inherit pkgconfig waf use-imx-headers
-
-# configure the eglvivsink element to use the appropriate EGL platform code
-# Wayland if 'wayland' is present in DISTRO_FEATURES, if not,
-# X11 if x11 is present in DISTRO_FEATURES,
-# Framebuffer otherwise
-EGLVIVSINK_PLATFORM = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', \
- bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', \
- 'fb', d),d)}"
-
-EGL_PLATFORM_CONF = "--egl-platform=${EGLVIVSINK_PLATFORM}"
-
-EXTRA_OECONF = "--kernel-headers=${STAGING_INCDIR_IMX} ${PACKAGECONFIG_CONFARGS}"
-
-EGLVIVSINK_DEPENDS = " \
- virtual/egl virtual/libgles2 \
- ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', \
- bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11', \
- '', d), d)} \
-"
-
-PACKAGECONFIG ?= "uniaudiodec mp3encoder v4l2src v4l2sink"
-PACKAGECONFIG_append_imxgpu3d = " eglvivsink"
-PACKAGECONFIG_append_imxgpu2d = " g2d g2dpango"
-PACKAGECONFIG_append_imxipu = " ipu"
-PACKAGECONFIG_append_imxvpu = " vpu"
-PACKAGECONFIG_append_imxpxp = " pxp"
-
-PACKAGECONFIG[g2d] = ",--disable-g2d,imx-gpu-viv"
-PACKAGECONFIG[g2dpango] = ",--disable-g2dpango,imx-gpu-viv pango"
-PACKAGECONFIG[pxp] = ",--disable-pxp,"
-PACKAGECONFIG[ipu] = ",--disable-ipu,"
-PACKAGECONFIG[vpu] = ",--disable-vpu,libimxvpuapi"
-PACKAGECONFIG[eglvivsink] = "${EGL_PLATFORM_CONF},--disable-eglvivsink,${EGLVIVSINK_DEPENDS}"
-PACKAGECONFIG[v4l2src] = ",--disable-imxv4l2videosrc,"
-PACKAGECONFIG[v4l2sink] = ",--disable-imxv4l2videosink,"
-PACKAGECONFIG[uniaudiodec] = ",--disable-uniaudiodec,imx-codec"
-PACKAGECONFIG[mp3encoder] = ",--disable-mp3encoder,imx-codec"
-
-# LIBV is used by gst-plugins-package.inc to specify the GStreamer version (0.10 vs 1.0)
-LIBV = "1.0"
-require recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc
-
-# the following line is required to produce one package for each plugin
-PACKAGES_DYNAMIC = "^${PN}-.*"
-
-COMPATIBLE_MACHINE = "(mx6dl|mx6q|mx6sl|mx6sx|mx6ul|mx6ull|mx7d)"
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-license.inc b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-license.inc
new file mode 100644
index 00000000..8b1c0011
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-license.inc
@@ -0,0 +1,19 @@
+# This .inc file contains functionality for automatically setting
+# the the license of all plugins according to the GSTREAMER_GPL.
+
+PACKAGESPLITFUNCS += "set_gstreamer_license"
+
+python set_gstreamer_license () {
+ import oe.utils
+ pn = d.getVar('PN') + '-'
+ gpl_plugins_names = [pn+plugin for plugin in d.getVar('GSTREAMER_GPL').split()]
+ for pkg in oe.utils.packages_filter_out_system(d):
+ if pkg in gpl_plugins_names:
+ d.setVar('LICENSE:' + pkg, 'GPL-2.0-or-later')
+ else:
+ d.setVar('LICENSE:' + pkg, 'LGPL-2.1-or-later')
+}
+
+EXTRA_OEMESON += " \
+ ${@bb.utils.contains_any('PACKAGECONFIG', "${GSTREAMER_GPL}", '-Dgpl=enabled', '-Dgpl=disabled', d)} \
+ "
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc
new file mode 100644
index 00000000..d77aeed8
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc
@@ -0,0 +1,73 @@
+# This .inc file contains functionality for automatically splitting
+# built plugins into individual packages for each plugin. A -meta
+# package is also set up that has no files of its own, but contains
+# the names of all plugin packages in its RDEPENDS list.
+#
+# This is mainly used by the gstreamer1.0-plugins-* plugin set recipes,
+# but can be used in any recipe that produces GStreamer plugins.
+
+# Dynamically generate packages for all enabled plugins
+PACKAGES_DYNAMIC = "^${PN}-.* ^libgst.*"
+
+PACKAGESPLITFUNCS =+ "split_gstreamer10_packages"
+PACKAGESPLITFUNCS += "set_gstreamer10_metapkg_rdepends"
+
+python split_gstreamer10_packages () {
+ gst_libdir = d.expand('${libdir}/gstreamer-1.0')
+ postinst = d.getVar('plugin_postinst')
+ glibdir = d.getVar('libdir')
+
+ # GStreamer libraries
+ do_split_packages(d, glibdir, r'^lib(.*)\.so\.*', 'lib%s', 'GStreamer 1.0 %s library', extra_depends='', allow_links=True)
+ # GStreamer plugin shared objects
+ do_split_packages(d, gst_libdir, r'libgst(.*)\.so$', d.expand('${PN}-%s'), 'GStreamer 1.0 plugin for %s', postinst=postinst, extra_depends='')
+ # GObject introspection files for GStreamer plugins
+ do_split_packages(d, glibdir+'/girepository-1.0', r'Gst(.*)-1.0\.typelib$', d.expand('${PN}-%s-typelib'), 'GStreamer 1.0 typelib file for %s', postinst=postinst, extra_depends='')
+ # Static GStreamer libraries for development
+ do_split_packages(d, gst_libdir, r'libgst(.*)\.a$', d.expand('${PN}-%s-staticdev'), 'GStreamer 1.0 plugin for %s (static development files)', extra_depends='${PN}-staticdev')
+}
+
+python set_gstreamer10_metapkg_rdepends () {
+ import os
+ import oe.utils
+
+ # Go through all generated packages (excluding the main package and
+ # the -meta package itself) and add them to the -meta package as RDEPENDS.
+
+ pn = d.getVar('PN')
+ metapkg = pn + '-meta'
+ d.setVar('ALLOW_EMPTY:' + metapkg, "1")
+ d.setVar('FILES:' + metapkg, "")
+ exclude = [ pn, pn + '-meta' ]
+ metapkg_rdepends = []
+ pkgdest = d.getVar('PKGDEST')
+ for pkg in oe.utils.packages_filter_out_system(d):
+ if pkg not in exclude and pkg not in metapkg_rdepends:
+ # 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/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.16.0.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.16.0.bb
deleted file mode 100644
index 7e6fcaae..00000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.16.0.bb
+++ /dev/null
@@ -1,40 +0,0 @@
-require recipes-multimedia/gstreamer/gstreamer1.0-plugins-common.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
- file://tests/check/elements/xingmux.c;beginline=1;endline=21;md5=4c771b8af188724855cb99cadd390068"
-
-LICENSE = "GPLv2+ & LGPLv2.1+ & LGPLv2+"
-LICENSE_FLAGS = "commercial"
-
-SRC_URI = " \
- http://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-${PV}.tar.xz \
- file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
- "
-SRC_URI[md5sum] = "1ec343c58d4b17d682f7befa8453c11c"
-SRC_URI[sha256sum] = "e30964c5f031c32289e0b25e176c3c95a5737f2052dfc81d0f7427ef0233a4c2"
-
-S = "${WORKDIR}/gst-plugins-ugly-${PV}"
-
-DEPENDS += "gstreamer1.0-plugins-base libid3tag"
-
-inherit gettext
-
-PACKAGECONFIG ??= " \
- ${GSTREAMER_ORC} \
- a52dec 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[mpeg2dec] = "--enable-mpeg2dec,--disable-mpeg2dec,mpeg2dec"
-PACKAGECONFIG[x264] = "--enable-x264,--disable-x264,x264"
-
-EXTRA_OECONF += " \
- --disable-sidplay \
-"
-
-FILES_${PN}-amrnb += "${datadir}/gstreamer-1.0/presets/GstAmrnbEnc.prs"
-FILES_${PN}-x264 += "${datadir}/gstreamer-1.0/presets/GstX264Enc.prs"
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.22.0.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.22.0.imx.bb
new file mode 100644
index 00000000..17522a93
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.22.0.imx.bb
@@ -0,0 +1,52 @@
+require gstreamer1.0-plugins-common.inc
+require gstreamer1.0-plugins-license.inc
+
+SUMMARY = "'Ugly GStreamer plugins"
+HOMEPAGE = "https://gstreamer.freedesktop.org/"
+BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly/-/issues"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
+ "
+
+LICENSE = "LGPL-2.1-or-later & GPL-2.0-or-later"
+LICENSE_FLAGS = "commercial"
+
+SRC_URI = " \
+ https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-${@get_gst_ver("${PV}")}.tar.xz \
+ "
+SRC_URI[sha256sum] = "a644dc981afa2d8d3a913f763ab9523c0620ee4e65a7ec73c7721c29da3c5a0c"
+
+S = "${WORKDIR}/gst-plugins-ugly-${@get_gst_ver("${PV}")}"
+
+DEPENDS += "gstreamer1.0-plugins-base"
+
+GST_PLUGIN_SET_HAS_EXAMPLES = "0"
+
+PACKAGECONFIG ??= " \
+ ${GSTREAMER_ORC} \
+ a52dec mpeg2dec \
+"
+
+PACKAGECONFIG[amrnb] = "-Damrnb=enabled,-Damrnb=disabled,opencore-amr"
+PACKAGECONFIG[amrwb] = "-Damrwbdec=enabled,-Damrwbdec=disabled,opencore-amr"
+PACKAGECONFIG[a52dec] = "-Da52dec=enabled,-Da52dec=disabled,liba52"
+PACKAGECONFIG[cdio] = "-Dcdio=enabled,-Dcdio=disabled,libcdio"
+PACKAGECONFIG[dvdread] = "-Ddvdread=enabled,-Ddvdread=disabled,libdvdread"
+PACKAGECONFIG[mpeg2dec] = "-Dmpeg2dec=enabled,-Dmpeg2dec=disabled,mpeg2dec"
+PACKAGECONFIG[x264] = "-Dx264=enabled,-Dx264=disabled,x264"
+
+GSTREAMER_GPL = "${@bb.utils.filter('PACKAGECONFIG', 'a52dec cdio dvdread mpeg2dec x264', d)}"
+
+EXTRA_OEMESON += " \
+ -Ddoc=disabled \
+ -Dsidplay=disabled \
+"
+
+# Drop .imx from PV
+def get_gst_ver(v):
+ return oe.utils.trim_version(v, 3)
+
+FILES:${PN}-amrnb += "${datadir}/gstreamer-1.0/presets/GstAmrnbEnc.prs"
+FILES:${PN}-x264 += "${datadir}/gstreamer-1.0/presets/GstX264Enc.prs"
+
+COMPATIBLE_MACHINE = "(imx-nxp-bsp)"
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-python_1.22.0.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0-python_1.22.0.imx.bb
new file mode 100644
index 00000000..6f38929a
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-python_1.22.0.imx.bb
@@ -0,0 +1,32 @@
+SUMMARY = "Python bindings for GStreamer 1.0"
+DESCRIPTION = "GStreamer Python binding overrides (complementing the bindings \
+provided by python-gi) "
+HOMEPAGE = "http://cgit.freedesktop.org/gstreamer/gst-python/"
+SECTION = "multimedia"
+
+LICENSE = "LGPL-2.1-or-later"
+LIC_FILES_CHKSUM = "file://COPYING;md5=c34deae4e395ca07e725ab0076a5f740"
+
+SRC_URI = "https://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${@get_gst_ver('${PV}')}.tar.xz"
+SRC_URI[sha256sum] = "6c63ad364ca4617eb2cbb3975ab26c66760eb3c7a6adf5be69f99c11e21ef3a5"
+
+DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base python3-pygobject"
+RDEPENDS:${PN} += "gstreamer1.0 gstreamer1.0-plugins-base python3-pygobject"
+
+PNREAL = "gst-python"
+
+S = "${WORKDIR}/${PNREAL}-${@get_gst_ver('${PV}')}"
+
+EXTRA_OEMESON += "\
+ -Dtests=disabled \
+ -Dplugin=enabled \
+ -Dlibpython-dir=${libdir} \
+"
+
+# Drop .imx from PV
+def get_gst_ver(v):
+ return oe.utils.trim_version(v, 3)
+
+inherit meson pkgconfig setuptools3-base upstream-version-is-even
+
+FILES:${PN} += "${libdir}/gstreamer-1.0"
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.16.0.bb b/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.16.0.bb
deleted file mode 100644
index 6a9995b0..00000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.16.0.bb
+++ /dev/null
@@ -1,34 +0,0 @@
-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"
-LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d"
-
-DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base"
-
-PNREAL = "gst-rtsp-server"
-
-SRC_URI = "http://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz \
- file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
- file://gtk-doc-tweaks.patch \
- "
-
-SRC_URI[md5sum] = "adc4460239ec2eccf58ad9752ce53bfd"
-SRC_URI[sha256sum] = "198e9eec1a3e32dc810d3fbf3a714850a22c6288d4a5c8e802c5ff984af03f19"
-
-S = "${WORKDIR}/${PNREAL}-${PV}"
-
-inherit autotools pkgconfig upstream-version-is-even gobject-introspection gtk-doc
-
-EXTRA_OECONF = "--disable-examples --disable-tests --disable-introspection "
-
-# Starting with 1.8.0 gst-rtsp-server includes dependency-less plugins as well
-LIBV = "1.0"
-require recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc
-
-delete_pkg_m4_file() {
- # This m4 file is out of date and is missing PKG_CONFIG_SYSROOT_PATH tweaks which we need for introspection
- rm "${S}/common/m4/pkg.m4" || true
-}
-
-do_configure[prefuncs] += " delete_pkg_m4_file"
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.22.0.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.22.0.imx.bb
new file mode 100644
index 00000000..d569ea9f
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.22.0.imx.bb
@@ -0,0 +1,37 @@
+SUMMARY = "A library on top of GStreamer for building an RTSP server"
+HOMEPAGE = "http://cgit.freedesktop.org/gstreamer/gst-rtsp-server/"
+SECTION = "multimedia"
+LICENSE = "LGPL-2.1-or-later"
+LIC_FILES_CHKSUM = "file://COPYING;md5=69333daa044cb77e486cc36129f7a770"
+
+DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base"
+
+PNREAL = "gst-rtsp-server"
+
+SRC_URI = "https://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${@get_gst_ver("${PV}")}.tar.xz"
+
+SRC_URI[sha256sum] = "aea24eeb59ee5fadfac355de2f7cecb51966c3e147e5ad7cfb4c314f1a4086ed"
+
+S = "${WORKDIR}/${PNREAL}-${@get_gst_ver("${PV}")}"
+
+inherit meson pkgconfig upstream-version-is-even gobject-introspection
+
+EXTRA_OEMESON += " \
+ -Ddoc=disabled \
+ -Dexamples=disabled \
+ -Dtests=disabled \
+"
+
+GIR_MESON_ENABLE_FLAG = "enabled"
+GIR_MESON_DISABLE_FLAG = "disabled"
+
+# Drop .imx from PV
+def get_gst_ver(v):
+ return oe.utils.trim_version(v, 3)
+
+# Starting with 1.8.0 gst-rtsp-server includes dependency-less plugins as well
+require gstreamer1.0-plugins-packaging.inc
+
+CVE_PRODUCT += "gst-rtsp-server"
+
+COMPATIBLE_MACHINE = "(imx-nxp-bsp)"
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_%.bbappend b/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_%.bbappend
new file mode 100644
index 00000000..3b23818d
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_%.bbappend
@@ -0,0 +1 @@
+PACKAGECONFIG_GL:imxgpu = "egl"
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.22.0.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.22.0.imx.bb
new file mode 100644
index 00000000..02dc86e4
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.22.0.imx.bb
@@ -0,0 +1,64 @@
+SUMMARY = "VA-API support to GStreamer"
+HOMEPAGE = "https://gstreamer.freedesktop.org/"
+DESCRIPTION = "gstreamer-vaapi consists of a collection of VA-API \
+based plugins for GStreamer and helper libraries: `vaapidecode', \
+`vaapiconvert', and `vaapisink'."
+
+REALPN = "gstreamer-vaapi"
+
+LICENSE = "LGPL-2.1-or-later"
+LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
+
+SRC_URI = "https://gstreamer.freedesktop.org/src/${REALPN}/${REALPN}-${@get_gst_ver('${PV}')}.tar.xz"
+
+SRC_URI[sha256sum] = "593ccad19f88e5fa29f40f98356c007806bd535828707b1406944d16a90bdff5"
+
+S = "${WORKDIR}/${REALPN}-${@get_gst_ver('${PV}')}"
+DEPENDS = "libva gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad"
+
+inherit meson pkgconfig features_check upstream-version-is-even
+
+REQUIRED_DISTRO_FEATURES ?= "opengl"
+
+EXTRA_OEMESON += " \
+ -Ddoc=disabled \
+ -Dexamples=disabled \
+ -Dtests=enabled \
+"
+
+# Drop .imx from PV
+def get_gst_ver(v):
+ return oe.utils.trim_version(v, 3)
+
+PACKAGES =+ "${PN}-tests"
+
+# OpenGL packageconfig factored out to make it easy for distros
+# and BSP layers to pick either glx, egl, or no GL. By default,
+# try detecting X11 first, and if found (with OpenGL), use GLX,
+# otherwise try to check if EGL can be used.
+PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'glx', \
+ bb.utils.contains('DISTRO_FEATURES', 'opengl', 'egl', \
+ '', d), d)}"
+
+PACKAGECONFIG ??= "drm encoders \
+ ${PACKAGECONFIG_GL} \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11', d)}"
+
+PACKAGECONFIG[drm] = "-Ddrm=enabled,-Ddrm=disabled,udev libdrm"
+PACKAGECONFIG[egl] = "-Degl=enabled,-Degl=disabled,virtual/egl"
+PACKAGECONFIG[encoders] = "-Dencoders=enabled,-Dencoders=disabled"
+PACKAGECONFIG[glx] = "-Dglx=enabled,-Dglx=disabled,virtual/libgl"
+PACKAGECONFIG[wayland] = "-Dwayland=enabled,-Dwayland=disabled,wayland-native wayland wayland-protocols"
+PACKAGECONFIG[x11] = "-Dx11=enabled,-Dx11=disabled,virtual/libx11 libxrandr libxrender"
+
+FILES:${PN} += "${libdir}/gstreamer-*/*.so"
+FILES:${PN}-dbg += "${libdir}/gstreamer-*/.debug"
+FILES:${PN}-dev += "${libdir}/gstreamer-*/*.a"
+FILES:${PN}-tests = "${bindir}/*"
+
+# correct .pc install location - fixed in upstream trunk
+do_install:append() {
+ mkdir -p ${D}/${libdir}/pkgconfig
+ mv ${D}/${libdir}/gstreamer-1.0/pkgconfig/*.pc ${D}/${libdir}/pkgconfig
+ rmdir ${D}/${libdir}/gstreamer-1.0/pkgconfig/
+}
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0001-tests-respect-the-idententaion-used-in-meson.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0001-tests-respect-the-idententaion-used-in-meson.patch
new file mode 100644
index 00000000..1b9278db
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0/0001-tests-respect-the-idententaion-used-in-meson.patch
@@ -0,0 +1,34 @@
+From 559e1dd850b2b9eb3a415aa43e932e5e48f605cd Mon Sep 17 00:00:00 2001
+From: Jose Quaresma <quaresma.jose@gmail.com>
+Date: Sun, 11 Apr 2021 19:48:13 +0100
+Subject: [PATCH] tests: respect the idententaion used in meson
+
+Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789]
+
+Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
+
+---
+ tests/check/meson.build | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/tests/check/meson.build b/tests/check/meson.build
+index 9787b0a..16caac7 100644
+--- a/tests/check/meson.build
++++ b/tests/check/meson.build
+@@ -145,11 +145,11 @@ foreach t : core_tests
+
+ if not skip_test
+ exe = executable(test_name, fname,
+- c_args : gst_c_args + test_defines,
+- cpp_args : gst_c_args + test_defines,
+- include_directories : [configinc],
+- link_with : link_with_libs,
+- dependencies : gst_deps + test_deps,
++ c_args : gst_c_args + test_defines,
++ cpp_args : gst_c_args + test_defines,
++ include_directories : [configinc],
++ link_with : link_with_libs,
++ dependencies : gst_deps + test_deps,
+ )
+
+ env = environment()
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0002-tests-add-support-for-install-the-tests.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0002-tests-add-support-for-install-the-tests.patch
new file mode 100644
index 00000000..568e38cb
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0/0002-tests-add-support-for-install-the-tests.patch
@@ -0,0 +1,107 @@
+From 08b1aaff972a7f6349373fc1ad4cc23081adb52c Mon Sep 17 00:00:00 2001
+From: Jose Quaresma <quaresma.jose@gmail.com>
+Date: Sun, 11 Apr 2021 19:48:13 +0100
+Subject: [PATCH] tests: add support for install the tests
+
+This will provide to run the tests using the gnome-desktop-testing [1]
+
+[1] https://wiki.gnome.org/Initiatives/GnomeGoals/InstalledTests
+
+Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789]
+
+Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
+
+---
+ meson.build | 4 ++++
+ meson_options.txt | 1 +
+ tests/check/meson.build | 22 +++++++++++++++++++++-
+ tests/check/template.test.in | 3 +++
+ 4 files changed, 29 insertions(+), 1 deletion(-)
+ create mode 100644 tests/check/template.test.in
+
+diff --git a/meson.build b/meson.build
+index f9f591d..3906fb3 100644
+--- a/meson.build
++++ b/meson.build
+@@ -606,6 +606,10 @@ if bashcomp_dep.found()
+ endif
+ endif
+
++installed_tests_enabled = get_option('installed_tests')
++installed_tests_metadir = join_paths(datadir, 'installed-tests', meson.project_name())
++installed_tests_execdir = join_paths(libexecdir, 'installed-tests', meson.project_name())
++
+ plugins_install_dir = join_paths(get_option('libdir'), 'gstreamer-1.0')
+
+ pkgconfig = import('pkgconfig')
+diff --git a/meson_options.txt b/meson_options.txt
+index 7363bdb..a34ba37 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -15,6 +15,7 @@ option('poisoning', type : 'boolean', value : false, description : 'Enable poiso
+ option('memory-alignment', type: 'combo',
+ choices : ['1', '2', '4', '8', '16', '32', '64', '128', '256', '512', '1024', '2048', '4096', '8192', 'malloc', 'pagesize'],
+ value: 'malloc')
++option('installed_tests', type : 'boolean', value : false, description : 'Enable installed tests')
+
+ # Feature options
+ option('check', type : 'feature', value : 'auto', description : 'Build unit test libraries')
+diff --git a/tests/check/meson.build b/tests/check/meson.build
+index 16caac7..f2d400f 100644
+--- a/tests/check/meson.build
++++ b/tests/check/meson.build
+@@ -124,10 +124,16 @@ test_defines = [
+ '-UG_DISABLE_ASSERT',
+ '-UG_DISABLE_CAST_CHECKS',
+ '-DGST_CHECK_TEST_ENVIRONMENT_BEACON="GST_STATE_IGNORE_ELEMENTS"',
+- '-DTESTFILE="' + meson.current_source_dir() + '/meson.build"',
+ '-DGST_DISABLE_DEPRECATED',
+ ]
+
++testfile = meson.current_source_dir() + '/meson.build'
++if installed_tests_enabled
++ install_data(testfile, install_dir : installed_tests_metadir, rename : 'testfile')
++ testfile = installed_tests_metadir + '/testfile'
++endif
++test_defines += '-DTESTFILE="@0@"'.format(testfile)
++
+ # sanity checking
+ if get_option('check').disabled()
+ if get_option('tests').enabled()
+@@ -150,6 +156,8 @@ foreach t : core_tests
+ include_directories : [configinc],
+ link_with : link_with_libs,
+ dependencies : gst_deps + test_deps,
++ install_dir: installed_tests_execdir,
++ install: installed_tests_enabled,
+ )
+
+ env = environment()
+@@ -161,6 +169,18 @@ foreach t : core_tests
+ env.set('GST_PLUGIN_SCANNER_1_0', gst_scanner_dir + '/gst-plugin-scanner')
+ env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer')
+
++ if installed_tests_enabled
++ test_conf = configuration_data()
++ test_conf.set('installed_tests_dir', join_paths(prefix, installed_tests_execdir))
++ test_conf.set('program', test_name)
++ configure_file(
++ input: 'template.test.in',
++ output: test_name + '.test',
++ install_dir: installed_tests_metadir,
++ configuration: test_conf
++ )
++ endif
++
+ test(test_name, exe, env: env, timeout : 3 * 60)
+ endif
+ endforeach
+diff --git a/tests/check/template.test.in b/tests/check/template.test.in
+new file mode 100644
+index 0000000..f701627
+--- /dev/null
++++ b/tests/check/template.test.in
+@@ -0,0 +1,3 @@
++[Test]
++Type=session
++Exec=@installed_tests_dir@/@program@
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-use-a-dictionaries-for-environment.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-use-a-dictionaries-for-environment.patch
new file mode 100644
index 00000000..10a6dcc6
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-use-a-dictionaries-for-environment.patch
@@ -0,0 +1,50 @@
+From fe830f0f75f3b4b41e3dbef8d4cf6ee4103c9e06 Mon Sep 17 00:00:00 2001
+From: Jose Quaresma <quaresma.jose@gmail.com>
+Date: Sat, 24 Apr 2021 10:34:47 +0100
+Subject: [PATCH 3/4] tests: use a dictionaries for environment
+
+meson environment() can't be passed to configure_file and it is needed for installed_tests,
+use a dictionary as this is simplest solution to install the environment.
+
+Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789]
+
+Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
+---
+ subprojects/gstreamer/tests/check/meson.build | 21 ++++++++++++-------
+ 1 file changed, 13 insertions(+), 8 deletions(-)
+
+diff --git a/subprojects/gstreamer/tests/check/meson.build b/subprojects/gstreamer/tests/check/meson.build
+index 00a138a568..48ec2532f8 100644
+--- a/subprojects/gstreamer/tests/check/meson.build
++++ b/subprojects/gstreamer/tests/check/meson.build
+@@ -161,14 +161,19 @@ foreach t : core_tests
+ install: installed_tests_enabled,
+ )
+
+- env = environment()
+- env.set('GST_PLUGIN_PATH_1_0', meson.project_build_root())
+- env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
+- env.set('GST_STATE_IGNORE_ELEMENTS', '')
+- env.set('CK_DEFAULT_TIMEOUT', '20')
+- env.set('GST_REGISTRY', '@0@/@1@.registry'.format(meson.current_build_dir(), test_name))
+- env.set('GST_PLUGIN_SCANNER_1_0', gst_scanner_dir + '/gst-plugin-scanner')
+- env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer')
++ # meson environment object can't be passed to configure_file and
++ # installed tests uses configure_file to install the environment.
++ # use a dictionary as this is the simplest solution
++ # to install the environment.
++ env = {
++ 'GST_PLUGIN_PATH_1_0': meson.project_build_root(),
++ 'GST_PLUGIN_SYSTEM_PATH_1_0': '',
++ 'GST_STATE_IGNORE_ELEMENTS': '',
++ 'CK_DEFAULT_TIMEOUT': '20',
++ 'GST_REGISTRY': '@0@/@1@.registry'.format(meson.current_build_dir(), test_name),
++ 'GST_PLUGIN_SCANNER_1_0': gst_scanner_dir + '/gst-plugin-scanner',
++ 'GST_PLUGIN_LOADING_WHITELIST': 'gstreamer',
++ }
+
+ if installed_tests_enabled
+ test_conf = configuration_data()
+--
+2.33.1
+
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-add-helper-script-to-run-the-installed_tests.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-add-helper-script-to-run-the-installed_tests.patch
new file mode 100644
index 00000000..efa004f8
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-add-helper-script-to-run-the-installed_tests.patch
@@ -0,0 +1,74 @@
+From 4dcbabebca2ad6f1fdd59ee35a858082e87db7b6 Mon Sep 17 00:00:00 2001
+From: Jose Quaresma <quaresma.jose@gmail.com>
+Date: Sun, 2 May 2021 01:58:01 +0100
+Subject: [PATCH 4/4] tests: add helper script to run the installed_tests
+
+- this is a bash script that will run the installed_tests
+with some of the environment variables used in the meson
+testing framework.
+
+Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789]
+
+Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
+---
+ subprojects/gstreamer/tests/check/meson.build | 17 +++++++++++++++++
+ .../gstreamer/tests/check/template.sh.in | 9 +++++++++
+ .../gstreamer/tests/check/template.test.in | 2 +-
+ 3 files changed, 27 insertions(+), 1 deletion(-)
+ create mode 100755 subprojects/gstreamer/tests/check/template.sh.in
+
+diff --git a/subprojects/gstreamer/tests/check/meson.build b/subprojects/gstreamer/tests/check/meson.build
+index 48ec2532f8..7dc4990d4e 100644
+--- a/subprojects/gstreamer/tests/check/meson.build
++++ b/subprojects/gstreamer/tests/check/meson.build
+@@ -185,6 +185,23 @@ foreach t : core_tests
+ install_dir: installed_tests_metadir,
+ configuration: test_conf
+ )
++
++ # All the tests will be deployed on the target machine and
++ # we use the home folder ~ for the registry which will then expand at runtime.
++ # Using the /tmp/gstreamer-1.0/@0@.registry can be problematic as it mostly
++ # is mounted using tmpfs and if the machine crash from some reason we can lost the registry
++ # that is useful for debug propose of the tests itself.
++ env += {'GST_REGISTRY': '~/.cache/gstreamer-1.0/@0@.registry'.format(test_name)}
++
++ # Set the full path for the test it self.
++ env += {'TEST': '@0@/@1@'.format(join_paths(prefix, installed_tests_execdir), test_name)}
++
++ configure_file(
++ input : 'template.sh.in',
++ output: test_name + '.sh',
++ install_dir: installed_tests_execdir,
++ configuration : env,
++ )
+ endif
+
+ test(test_name, exe, env: env, timeout : 3 * 60)
+diff --git a/subprojects/gstreamer/tests/check/template.sh.in b/subprojects/gstreamer/tests/check/template.sh.in
+new file mode 100755
+index 0000000000..cf7d31b0ea
+--- /dev/null
++++ b/subprojects/gstreamer/tests/check/template.sh.in
+@@ -0,0 +1,9 @@
++#!/bin/sh
++
++set -ax
++
++CK_DEFAULT_TIMEOUT="@CK_DEFAULT_TIMEOUT@"
++GST_PLUGIN_LOADING_WHITELIST="@GST_PLUGIN_LOADING_WHITELIST@"
++GST_REGISTRY=@GST_REGISTRY@
++GST_STATE_IGNORE_ELEMENTS="@GST_STATE_IGNORE_ELEMENTS@"
++exec @TEST@
+diff --git a/subprojects/gstreamer/tests/check/template.test.in b/subprojects/gstreamer/tests/check/template.test.in
+index f701627f87..b74ef6ad73 100644
+--- a/subprojects/gstreamer/tests/check/template.test.in
++++ b/subprojects/gstreamer/tests/check/template.test.in
+@@ -1,3 +1,3 @@
+ [Test]
+ Type=session
+-Exec=@installed_tests_dir@/@program@
++Exec=@installed_tests_dir@/@program@.sh
+--
+2.33.1
+
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-remove-gstbin-test_watch_for_state_change-test.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-remove-gstbin-test_watch_for_state_change-test.patch
new file mode 100644
index 00000000..f51df6d2
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-remove-gstbin-test_watch_for_state_change-test.patch
@@ -0,0 +1,107 @@
+From b935abba3d8fa3ea1ce384c08e650afd8c20b78a Mon Sep 17 00:00:00 2001
+From: Claudius Heine <ch@denx.de>
+Date: Wed, 2 Feb 2022 13:47:02 +0100
+Subject: [PATCH] tests: remove gstbin:test_watch_for_state_change testcase
+
+This testcase seems to be flaky, and upstream marked it as such:
+https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/778
+
+This patch removes the testcase to avoid it interfering with out ptest.
+
+Signed-off-by: Claudius Heine <ch@denx.de>
+
+Upstream-Status: Inappropriate [needs proper upstream fix]
+---
+ tests/check/gst/gstbin.c | 69 -------------------
+ 1 file changed, 69 deletions(-)
+
+diff --git a/tests/check/gst/gstbin.c b/tests/check/gst/gstbin.c
+index e366d5fe20..ac29d81474 100644
+--- a/tests/check/gst/gstbin.c
++++ b/tests/check/gst/gstbin.c
+@@ -691,74 +691,6 @@ GST_START_TEST (test_message_state_changed_children)
+
+ GST_END_TEST;
+
+-GST_START_TEST (test_watch_for_state_change)
+-{
+- GstElement *src, *sink, *bin;
+- GstBus *bus;
+- GstStateChangeReturn ret;
+-
+- bin = gst_element_factory_make ("bin", NULL);
+- fail_unless (bin != NULL, "Could not create bin");
+-
+- bus = g_object_new (gst_bus_get_type (), NULL);
+- gst_object_ref_sink (bus);
+- gst_element_set_bus (GST_ELEMENT_CAST (bin), bus);
+-
+- src = gst_element_factory_make ("fakesrc", NULL);
+- fail_if (src == NULL, "Could not create fakesrc");
+- sink = gst_element_factory_make ("fakesink", NULL);
+- fail_if (sink == NULL, "Could not create fakesink");
+-
+- gst_bin_add (GST_BIN (bin), sink);
+- gst_bin_add (GST_BIN (bin), src);
+-
+- fail_unless (gst_element_link (src, sink), "could not link src and sink");
+-
+- /* change state, spawning two times three messages */
+- ret = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PAUSED);
+- fail_unless (ret == GST_STATE_CHANGE_ASYNC);
+- ret =
+- gst_element_get_state (GST_ELEMENT (bin), NULL, NULL,
+- GST_CLOCK_TIME_NONE);
+- fail_unless (ret == GST_STATE_CHANGE_SUCCESS);
+-
+- pop_state_changed (bus, 6);
+- pop_async_done (bus);
+- pop_latency (bus);
+-
+- fail_unless (gst_bus_have_pending (bus) == FALSE,
+- "Unexpected messages on bus");
+-
+- ret = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PLAYING);
+- fail_unless (ret == GST_STATE_CHANGE_SUCCESS);
+-
+- pop_state_changed (bus, 3);
+-
+- /* this one might return either SUCCESS or ASYNC, likely SUCCESS */
+- ret = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PAUSED);
+- gst_element_get_state (GST_ELEMENT (bin), NULL, NULL, GST_CLOCK_TIME_NONE);
+-
+- pop_state_changed (bus, 3);
+- if (ret == GST_STATE_CHANGE_ASYNC) {
+- pop_async_done (bus);
+- pop_latency (bus);
+- }
+-
+- fail_unless (gst_bus_have_pending (bus) == FALSE,
+- "Unexpected messages on bus");
+-
+- gst_bus_set_flushing (bus, TRUE);
+-
+- ret = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_NULL);
+- fail_unless (ret == GST_STATE_CHANGE_SUCCESS);
+-
+- /* clean up */
+- gst_object_unref (bus);
+- gst_object_unref (bin);
+-}
+-
+-GST_END_TEST;
+-
+ GST_START_TEST (test_state_change_error_message)
+ {
+ GstElement *src, *sink, *bin;
+@@ -1956,7 +1888,6 @@ gst_bin_suite (void)
+ tcase_add_test (tc_chain, test_message_state_changed);
+ tcase_add_test (tc_chain, test_message_state_changed_child);
+ tcase_add_test (tc_chain, test_message_state_changed_children);
+- tcase_add_test (tc_chain, test_watch_for_state_change);
+ tcase_add_test (tc_chain, test_state_change_error_message);
+ tcase_add_test (tc_chain, test_add_linked);
+ tcase_add_test (tc_chain, test_add_self);
+--
+2.33.1
+
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/run-ptest b/recipes-multimedia/gstreamer/gstreamer1.0/run-ptest
new file mode 100755
index 00000000..0cfa955f
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0/run-ptest
@@ -0,0 +1,2 @@
+#!/usr/bin/env sh
+gnome-desktop-testing-runner gstreamer
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0_1.16.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0_1.16.imx.bb
deleted file mode 100644
index 3c9653a6..00000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0_1.16.imx.bb
+++ /dev/null
@@ -1,77 +0,0 @@
-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 elfutils"
-
-inherit autotools pkgconfig gettext upstream-version-is-even gobject-introspection gtk-doc
-
-# This way common/m4/introspection.m4 will come first
-# (it has a custom INTROSPECTION_INIT macro, and so must be used instead of our common introspection.m4 file)
-acpaths = "-I ${S}/common/m4 -I ${S}/m4"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \
- file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d"
-
-# Use i.MX fork of GST for customizations
-GST1.0_SRC ?= "gitsm://source.codeaurora.org/external/imx/gstreamer.git;protocol=https"
-SRCBRANCH = "MM_04.05.01_1909_L4.19.35"
-
-SRC_URI = " \
- ${GST1.0_SRC};branch=${SRCBRANCH} \
- file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
- file://gtk-doc-tweaks.patch \
- file://0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch \
-"
-SRCREV = "a4c220605ac0923596b89f4f07c05d235bc09259"
-
-DEFAULT_PREFERENCE = "-1"
-
-EXTRA_AUTORECONF = ""
-
-PACKAGECONFIG ??= ""
-
-PACKAGECONFIG[debug] = "--enable-debug,--disable-debug"
-PACKAGECONFIG[tests] = "--enable-tests,--disable-tests"
-PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind,"
-PACKAGECONFIG[gst-tracer-hooks] = "--enable-gst-tracer-hooks,--disable-gst-tracer-hooks,"
-
-EXTRA_OECONF = " \
- --disable-dependency-tracking \
- --disable-examples \
-"
-
-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}-dev += "${datadir}/gdb/* ${datadir}/gstreamer-1.0/gdb/*"
-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
- rm -f "${S}/common/m4/gtk-doc.m4"
-}
-
-do_configure[prefuncs] += "delete_pkg_m4_file"
-
-do_compile_prepend() {
- export GIR_EXTRA_LIBS_PATH="${B}/gst/.libs:${B}/libs/gst/base/.libs"
-}
-
-S = "${WORKDIR}/git"
-
-COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0_1.22.5.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0_1.22.5.imx.bb
new file mode 100644
index 00000000..ce7b3f1d
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0_1.22.5.imx.bb
@@ -0,0 +1,105 @@
+# This recipe is for the i.MX fork of gstreamer1.0. For ease of
+# maintenance, the top section is a verbatim copy of an OE-core
+# recipe. The second section customizes the recipe for i.MX.
+
+########### OE-core copy ##################
+# Upstream hash: 937817e5164f8af8452aec03ae3c45cb23d63df9
+
+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 = "LGPL-2.1-or-later"
+
+DEPENDS = "glib-2.0 glib-2.0-native libxml2 bison-native flex-native"
+
+inherit meson pkgconfig gettext upstream-version-is-even gobject-introspection ptest-gnome
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=69333daa044cb77e486cc36129f7a770 \
+ file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d"
+
+S = "${WORKDIR}/gstreamer-${PV}"
+
+SRC_URI = "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz \
+ file://run-ptest \
+ file://0001-tests-respect-the-idententaion-used-in-meson.patch \
+ file://0002-tests-add-support-for-install-the-tests.patch \
+ file://0003-tests-use-a-dictionaries-for-environment.patch;striplevel=3 \
+ file://0004-tests-add-helper-script-to-run-the-installed_tests.patch;striplevel=3 \
+ "
+SRC_URI[sha256sum] = "4408d7930f381809e85917acc19712f173261ba85bdf20c5567b2a21b1193b61"
+
+PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \
+ check \
+ debug \
+ tools"
+
+PACKAGECONFIG[debug] = "-Dgst_debug=true,-Dgst_debug=false"
+PACKAGECONFIG[tracer-hooks] = "-Dtracer_hooks=true,-Dtracer_hooks=false"
+PACKAGECONFIG[coretracers] = "-Dcoretracers=enabled,-Dcoretracers=disabled"
+PACKAGECONFIG[check] = "-Dcheck=enabled,-Dcheck=disabled"
+PACKAGECONFIG[tests] = "-Dtests=enabled -Dinstalled_tests=true,-Dtests=disabled -Dinstalled_tests=false"
+PACKAGECONFIG[unwind] = "-Dlibunwind=enabled,-Dlibunwind=disabled,libunwind"
+PACKAGECONFIG[dw] = "-Dlibdw=enabled,-Dlibdw=disabled,elfutils"
+PACKAGECONFIG[bash-completion] = "-Dbash-completion=enabled,-Dbash-completion=disabled,bash-completion"
+PACKAGECONFIG[tools] = "-Dtools=enabled,-Dtools=disabled"
+PACKAGECONFIG[setcap] = "-Dptp-helper-permissions=capabilities,,libcap libcap-native"
+
+# TODO: put this in a gettext.bbclass patch
+def gettext_oemeson(d):
+ if d.getVar('USE_NLS') == 'no':
+ return '-Dnls=disabled'
+ # Remove the NLS bits if USE_NLS is no or INHIBIT_DEFAULT_DEPS is set
+ if d.getVar('INHIBIT_DEFAULT_DEPS') and not oe.utils.inherits(d, 'cross-canadian'):
+ return '-Dnls=disabled'
+ return '-Dnls=enabled'
+
+EXTRA_OEMESON += " \
+ -Ddoc=disabled \
+ -Dexamples=disabled \
+ -Ddbghelp=disabled \
+ ${@gettext_oemeson(d)} \
+"
+
+GIR_MESON_ENABLE_FLAG = "enabled"
+GIR_MESON_DISABLE_FLAG = "disabled"
+
+PACKAGES += "${PN}-bash-completion"
+
+# Add the core element plugins to the main package
+FILES:${PN} += "${libdir}/gstreamer-1.0/*.so"
+FILES:${PN}-dev += "${libdir}/gstreamer-1.0/*.a ${libdir}/gstreamer-1.0/include"
+FILES:${PN}-bash-completion += "${datadir}/bash-completion/completions/ ${datadir}/bash-completion/helpers/gst*"
+FILES:${PN}-dbg += "${datadir}/gdb ${datadir}/gstreamer-1.0/gdb"
+
+RDEPENDS:${PN}-ptest:append:libc-glibc = " glibc-gconv-iso8859-5"
+
+CVE_PRODUCT = "gstreamer"
+
+PTEST_BUILD_HOST_FILES = ""
+
+########### End of OE-core copy ###########
+
+########### i.MX overrides ################
+
+DEFAULT_PREFERENCE = "-1"
+
+LIC_FILES_CHKSUM = " \
+ file://LICENSE.txt;md5=69333daa044cb77e486cc36129f7a770 \
+ file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d \
+"
+
+# Use i.MX fork of GST for customizations
+SRC_URI:remove = "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz"
+SRC_URI:prepend = "${GST1.0_SRC};branch=${SRCBRANCH} "
+GST1.0_SRC ?= "gitsm://github.com/nxp-imx/gstreamer.git;protocol=https"
+SRCBRANCH = "MM_04.08.03_2312_L6.6.y"
+SRCREV = "1a43c16272a7f4274eb8260e03206a57f317d823"
+
+S = "${WORKDIR}/git"
+
+COMPATIBLE_MACHINE = "(imx-nxp-bsp)"
+
+########### End of i.MX overrides #########
diff --git a/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0001-aiurdemux-Fix-type-of-USER_DATA_LOCATION.patch b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0001-aiurdemux-Fix-type-of-USER_DATA_LOCATION.patch
new file mode 100644
index 00000000..bdcb3f48
--- /dev/null
+++ b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0001-aiurdemux-Fix-type-of-USER_DATA_LOCATION.patch
@@ -0,0 +1,33 @@
+From 090fb758a63b7d362d9bee8b8a665d1346c83f83 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 13 Mar 2023 20:15:22 -0700
+Subject: [PATCH 01/10] aiurdemux: Fix type of USER_DATA_LOCATION
+
+It should be char pointer not integer
+Fixe
+plugins/aiurdemux/aiurdemux.c:198:47: error: incompatible integer to pointer conversion initializin
+g 'const gchar *' (aka 'const char *') with an expression of type 'int' [-Wint-conversion]
+ {USER_DATA_LOCATION, USER_DATA_FORMAT_UTF8, -1,
+ ^~
+Upstream-Status: Submitted [https://github.com/nxp-imx/imx-gst1.0-plugin/pull/4]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ plugins/aiurdemux/aiurdemux.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/plugins/aiurdemux/aiurdemux.c b/plugins/aiurdemux/aiurdemux.c
+index 532b439..39c50ea 100755
+--- a/plugins/aiurdemux/aiurdemux.c
++++ b/plugins/aiurdemux/aiurdemux.c
+@@ -195,7 +195,7 @@ static AiurDemuxTagEntry g_user_data_entry[] = {
+ "Track Number : %s\n"},
+ {USER_DATA_TOTALTRACKNUMBER, USER_DATA_FORMAT_UTF8, GST_TAG_TRACK_COUNT,
+ "Track Count : %s\n"},
+- {USER_DATA_LOCATION, USER_DATA_FORMAT_UTF8, -1,
++ {USER_DATA_LOCATION, USER_DATA_FORMAT_UTF8, (const gchar*)-1,
+ "Location : %s\n"},
+ {USER_DATA_KEYWORDS, USER_DATA_FORMAT_UTF8, GST_TAG_KEYWORDS,
+ "Keywords : %s\n"},
+--
+2.39.2
+
diff --git a/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0002-aiurdemux.h-Include-glib-gprintf.h-for-g_printf-prot.patch b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0002-aiurdemux.h-Include-glib-gprintf.h-for-g_printf-prot.patch
new file mode 100644
index 00000000..d3fdf924
--- /dev/null
+++ b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0002-aiurdemux.h-Include-glib-gprintf.h-for-g_printf-prot.patch
@@ -0,0 +1,28 @@
+From f8b8322cd4c3a69e5cb47b5cb33abe860e89d6ed Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 12 Mar 2023 20:33:54 -0700
+Subject: [PATCH 02/10] aiurdemux.h: Include glib/gprintf.h for g_printf
+ prototype
+
+Upstream-Status: Submitted [https://github.com/nxp-imx/imx-gst1.0-plugin/pull/4]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ plugins/aiurdemux/aiurdemux.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/plugins/aiurdemux/aiurdemux.h b/plugins/aiurdemux/aiurdemux.h
+index 1d7d0a0..f7fcb2e 100755
+--- a/plugins/aiurdemux/aiurdemux.h
++++ b/plugins/aiurdemux/aiurdemux.h
+@@ -39,7 +39,7 @@
+ #include <gst/gst.h>
+ #include <gst/base/gstadapter.h>
+ #include <gst/tag/tag.h>
+-
++#include <glib/gprintf.h>
+ //#include "mfw_gst_utils.h"
+
+ #include "fsl_parser.h"
+--
+2.39.2
+
diff --git a/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0003-grecorder-Fix-build-with-clang.patch b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0003-grecorder-Fix-build-with-clang.patch
new file mode 100644
index 00000000..a690b497
--- /dev/null
+++ b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0003-grecorder-Fix-build-with-clang.patch
@@ -0,0 +1,44 @@
+From 19e6a541d2026386c9cfdeca0eebd269fef2536c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 13 Mar 2023 20:29:01 -0700
+Subject: [PATCH 03/10] grecorder: Fix build with clang
+
+Add missing includes for APIs from libc and glib
+Add prototype declaration for post_message before
+using it in macros later in the same source file
+
+Upstream-Status: Submitted [https://github.com/nxp-imx/imx-gst1.0-plugin/pull/4]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ tools/grecorder/grecorder.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/tools/grecorder/grecorder.c b/tools/grecorder/grecorder.c
+index c8eff2f..89aa801 100644
+--- a/tools/grecorder/grecorder.c
++++ b/tools/grecorder/grecorder.c
+@@ -23,10 +23,11 @@
+ #include <semaphore.h>
+ #include <pthread.h>
+ #include <signal.h>
++#include <unistd.h> /* sleep */
+ #include <getopt.h>
+ #define __USE_LARGEFILE64
+ #include <sys/statvfs.h>
+-
++#include <glib/gprintf.h> /* g_print */
+ #include "recorder_engine.h"
+
+ #define LOG_ERROR printf
+@@ -168,6 +169,8 @@ static RecorderMessage latest_message = MESSAGE_NULL;
+
+ static volatile sig_atomic_t quit_flag = 0;
+
++static void post_message (RecorderMessage message);
++
+ static void signal_handler(int signum)
+ {
+ quit_flag = 1;
+--
+2.39.2
+
diff --git a/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0004-gstimxcommon-Return-0-instead-of-NULL-for-a-function.patch b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0004-gstimxcommon-Return-0-instead-of-NULL-for-a-function.patch
new file mode 100644
index 00000000..292ab63f
--- /dev/null
+++ b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0004-gstimxcommon-Return-0-instead-of-NULL-for-a-function.patch
@@ -0,0 +1,87 @@
+From 141f8f692ae2c7e6d41a2d78113c806602122ad5 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 12 Mar 2023 19:51:27 -0700
+Subject: [PATCH 04/10] gstimxcommon: Return 0 instead of NULL for a functions
+ returning unsigned long
+
+Fixes
+gstimxcommon.c:113:10: error: incompatible pointer to integer conversion returning 'void *' from a function with result type 'unsigned long' [-Wint-conversion]
+ return NULL;
+
+Upstream-Status: Submitted [https://github.com/nxp-imx/imx-gst1.0-plugin/pull/4]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libs/gstimxcommon.c | 18 +++++++++---------
+ 1 file changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/libs/gstimxcommon.c b/libs/gstimxcommon.c
+index 27fd913..803c6e5 100644
+--- a/libs/gstimxcommon.c
++++ b/libs/gstimxcommon.c
+@@ -35,13 +35,13 @@ unsigned long phy_addr_from_fd(int dmafd)
+ int ret, fd;
+
+ if (dmafd < 0)
+- return NULL;
++ return 0;
+
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
+ #ifdef USE_ION
+ fd = open(dev_ion, O_RDWR);
+ if(fd < 0) {
+- return NULL;
++ return 0;
+ }
+
+ struct ion_phys_dma_data data = {
+@@ -58,18 +58,18 @@ unsigned long phy_addr_from_fd(int dmafd)
+ ret = ioctl(fd, ION_IOC_CUSTOM, &custom);
+ close(fd);
+ if (ret < 0)
+- return NULL;
++ return 0;
+
+ return data.phys;
+ #else
+- return NULL;
++ return 0;
+ #endif /* USE_ION */
+ #else
+ struct dma_buf_phys dma_phys;
+
+ ret = ioctl(dmafd, DMA_BUF_IOCTL_PHYS, &dma_phys);
+ if (ret < 0)
+- return NULL;
++ return 0;
+
+ return dma_phys.phys;
+ #endif
+@@ -86,7 +86,7 @@ unsigned long phy_addr_from_vaddr(void *vaddr, int size)
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
+ fd = open(dev_ion, O_RDWR);
+ if(fd < 0) {
+- return NULL;
++ return 0;
+ }
+
+ struct ion_phys_virt_data data = {
+@@ -103,13 +103,13 @@ unsigned long phy_addr_from_vaddr(void *vaddr, int size)
+ ret = ioctl(fd, ION_IOC_CUSTOM, &custom);
+ close(fd);
+ if (ret < 0)
+- return NULL;
++ return 0;
+
+ return data.phys;
+ #else
+- return NULL;
++ return 0;
+ #endif
+ #else
+- return NULL;
++ return 0;
+ #endif
+ }
+--
+2.39.2
+
diff --git a/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0005-aiurstreamcache-Include-gst-gstinfo.h.patch b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0005-aiurstreamcache-Include-gst-gstinfo.h.patch
new file mode 100644
index 00000000..5f67ba1b
--- /dev/null
+++ b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0005-aiurstreamcache-Include-gst-gstinfo.h.patch
@@ -0,0 +1,28 @@
+From 379b0492a4b53fd8fd42c734d04fd62df2e0465f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 13 Mar 2023 20:16:48 -0700
+Subject: [PATCH 05/10] aiurstreamcache: Include gst/gstinfo.h
+
+Its needed for various GST_* defines
+
+Upstream-Status: Submitted [https://github.com/nxp-imx/imx-gst1.0-plugin/pull/4]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ plugins/aiurdemux/aiurstreamcache.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/plugins/aiurdemux/aiurstreamcache.c b/plugins/aiurdemux/aiurstreamcache.c
+index d566268..e114a9d 100755
+--- a/plugins/aiurdemux/aiurstreamcache.c
++++ b/plugins/aiurdemux/aiurstreamcache.c
+@@ -33,6 +33,7 @@
+ * Changelog:
+ *
+ */
++ #include <gst/gstinfo.h>
+
+ GST_DEBUG_CATEGORY_EXTERN (aiurdemux_debug);
+ #define GST_CAT_DEFAULT aiurdemux_debug
+--
+2.39.2
+
diff --git a/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0006-Fix-typecast-warnings-found-with-clang.patch b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0006-Fix-typecast-warnings-found-with-clang.patch
new file mode 100644
index 00000000..ae3d1061
--- /dev/null
+++ b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0006-Fix-typecast-warnings-found-with-clang.patch
@@ -0,0 +1,61 @@
+From 02e16c4de3f138f0ebabf699e840bb86c98be599 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 12 Mar 2023 20:45:23 -0700
+Subject: [PATCH 06/10] Fix typecast warnings found with clang
+
+Upstream-Status: Submitted [https://github.com/nxp-imx/imx-gst1.0-plugin/pull/4]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libs/device-2d/imx_2d_device_g2d.c | 15 ++++++++-------
+ 1 file changed, 8 insertions(+), 7 deletions(-)
+
+diff --git a/libs/device-2d/imx_2d_device_g2d.c b/libs/device-2d/imx_2d_device_g2d.c
+index 2672e0b..6a36f6a 100755
+--- a/libs/device-2d/imx_2d_device_g2d.c
++++ b/libs/device-2d/imx_2d_device_g2d.c
+@@ -425,7 +425,7 @@ static gint imx_g2d_blit(Imx2DDevice *device,
+ goto err;
+ }
+ if (paddr) {
+- src->mem->paddr = paddr;
++ src->mem->paddr = (guint8*)paddr;
+ } else {
+ GST_ERROR ("Can't get physical address.");
+ ret = -1;
+@@ -435,7 +435,7 @@ static gint imx_g2d_blit(Imx2DDevice *device,
+ if (!dst->mem->paddr) {
+ paddr = phy_addr_from_fd (dst->fd[0]);
+ if (paddr) {
+- dst->mem->paddr = paddr;
++ dst->mem->paddr = (guint8*)paddr;
+ } else {
+ GST_ERROR ("Can't get physical address.");
+ ret = -1;
+@@ -474,10 +474,11 @@ static gint imx_g2d_blit(Imx2DDevice *device,
+
+ if (src->fd[1] >= 0)
+ {
+- if (!src->mem->user_data)
+- src->mem->user_data = g2d->src.base.planes[1] = phy_addr_from_fd (src->fd[1]);
+- else
+- g2d->src.base.planes[1] = src->mem->user_data;
++ if (!src->mem->user_data) {
++ g2d->src.base.planes[1] = (gint)phy_addr_from_fd (src->fd[1]);
++ src->mem->user_data = (gpointer *)g2d->src.base.planes[1];
++ } else
++ g2d->src.base.planes[1] = (unsigned long)src->mem->user_data;
+ }
+ switch (src->interlace_type) {
+ case IMX_2D_INTERLACE_INTERLEAVED:
+@@ -693,7 +694,7 @@ static gint imx_g2d_fill_color(Imx2DDevice *device, Imx2DFrame *dst,
+ if (!dst->mem->paddr) {
+ paddr = phy_addr_from_fd (dst->fd[0]);
+ if (paddr) {
+- dst->mem->paddr = paddr;
++ dst->mem->paddr = (guint8*)paddr;
+ } else {
+ GST_ERROR ("Can't get physical address.");
+ return -1;
+--
+2.39.2
+
diff --git a/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0007-gstimxv4l2-Fix-typecasting-errors.patch b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0007-gstimxv4l2-Fix-typecasting-errors.patch
new file mode 100644
index 00000000..1983838a
--- /dev/null
+++ b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0007-gstimxv4l2-Fix-typecasting-errors.patch
@@ -0,0 +1,30 @@
+From a1a2069403e227d4d40fc99257d1be077f65bdc8 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 12 Mar 2023 19:54:18 -0700
+Subject: [PATCH 07/10] gstimxv4l2: Fix typecasting errors
+
+Fixes
+gstimxv4l2.c:1702:22: error: incompatible pointer to integer conversion assigning to 'unsigned long' from 'guint8 *' (aka 'unsigned char *') [-Wint-conversion]
+
+Upstream-Status: Submitted [https://github.com/nxp-imx/imx-gst1.0-plugin/pull/4]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libs/v4l2_core/gstimxv4l2.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libs/v4l2_core/gstimxv4l2.c b/libs/v4l2_core/gstimxv4l2.c
+index 1dc826b..bf2620a 100755
+--- a/libs/v4l2_core/gstimxv4l2.c
++++ b/libs/v4l2_core/gstimxv4l2.c
+@@ -1699,7 +1699,7 @@ gint gst_imx_v4l2_register_buffer (gpointer v4l2handle, PhyMemBlock *memblk)
+ v4l2buf->type = handle->type;
+ v4l2buf->memory = handle->memory_mode;
+ v4l2buf->index = handle->allocated;
+- v4l2buf->m.userptr = memblk->paddr;
++ v4l2buf->m.userptr = (unsigned long)memblk->paddr;
+ v4l2buf->length = memblk->size;
+ handle->buffer_pair[handle->allocated].vaddr = memblk->vaddr;
+
+--
+2.39.2
+
diff --git a/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0008-beepdec-Declare-beep_register_external_typefinders.patch b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0008-beepdec-Declare-beep_register_external_typefinders.patch
new file mode 100644
index 00000000..211bade1
--- /dev/null
+++ b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0008-beepdec-Declare-beep_register_external_typefinders.patch
@@ -0,0 +1,32 @@
+From e86c20fee52f79a270a1913c5f0be98fb3f5cb77 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 13 Mar 2023 20:18:18 -0700
+Subject: [PATCH 08/10] beepdec: Declare beep_register_external_typefinders
+
+Fixes
+plugins/beepdec/beep.c:45:3: error: call to undeclared function 'beep_register_external_typefinders'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
+ beep_register_external_typefinders (plugin);
+ ^
+
+Upstream-Status: Submitted [https://github.com/nxp-imx/imx-gst1.0-plugin/pull/4]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ plugins/beepdec/beep.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/plugins/beepdec/beep.c b/plugins/beepdec/beep.c
+index 3543352..e174bb3 100755
+--- a/plugins/beepdec/beep.c
++++ b/plugins/beepdec/beep.c
+@@ -37,7 +37,7 @@
+ #endif
+ #include "beepdec.h"
+ #include "gstimxcommon.h"
+-
++extern gboolean beep_register_external_typefinders (GstPlugin * plugin);
+ static gboolean
+ plugin_init (GstPlugin * plugin)
+ {
+--
+2.39.2
+
diff --git a/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0009-gstimxv4l2.c-Fix-incompatible-integer-to-pointer-con.patch b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0009-gstimxv4l2.c-Fix-incompatible-integer-to-pointer-con.patch
new file mode 100644
index 00000000..567d1026
--- /dev/null
+++ b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0009-gstimxv4l2.c-Fix-incompatible-integer-to-pointer-con.patch
@@ -0,0 +1,41 @@
+From 8a3d7f26c73bdfe050d3331b30ae2f5917dc6723 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 12 Mar 2023 19:59:22 -0700
+Subject: [PATCH 09/10] gstimxv4l2.c: Fix incompatible integer to pointer
+ conversion returning
+
+Fixes
+gstimxv4l2.c:1587:24: error: incompatible pointer to integer conversion assigning to 'unsigned long' from 'guint8 *' (aka 'unsigned char *') [-Wint-c
+onversion]
+
+Upstream-Status: Submitted [https://github.com/nxp-imx/imx-gst1.0-plugin/pull/4]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libs/v4l2_core/gstimxv4l2.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libs/v4l2_core/gstimxv4l2.c b/libs/v4l2_core/gstimxv4l2.c
+index bf2620a..0fd7452 100755
+--- a/libs/v4l2_core/gstimxv4l2.c
++++ b/libs/v4l2_core/gstimxv4l2.c
+@@ -1576,7 +1576,7 @@ static void * gst_imx_v4l2_find_buffer(gpointer v4l2handle, PhyMemBlock *memblk)
+
+ if (handle->allocated >= MAX_BUFFER) {
+ GST_ERROR ("No more v4l2 buffer for allocating.\n");
+- return -1;
++ return NULL;
+ }
+
+ v4l2buf = &handle->buffer_pair[handle->allocated].v4l2buffer;
+@@ -1584,7 +1584,7 @@ static void * gst_imx_v4l2_find_buffer(gpointer v4l2handle, PhyMemBlock *memblk)
+ v4l2buf->type = handle->type;
+ v4l2buf->memory = handle->memory_mode;
+ v4l2buf->index = handle->allocated;
+- v4l2buf->m.userptr = memblk->paddr;
++ v4l2buf->m.userptr = (unsigned long)memblk->paddr;
+ v4l2buf->length = memblk->size;
+ handle->buffer_pair[handle->allocated].vaddr = memblk->vaddr;
+
+--
+2.39.2
+
diff --git a/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0010-provide-declaration-for-aiur_register_external_typef.patch b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0010-provide-declaration-for-aiur_register_external_typef.patch
new file mode 100644
index 00000000..e9b1a093
--- /dev/null
+++ b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0010-provide-declaration-for-aiur_register_external_typef.patch
@@ -0,0 +1,28 @@
+From c2144da90e64547d9e346f8e721a0d2155ed610b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 12 Mar 2023 21:09:49 -0700
+Subject: [PATCH 10/10] provide declaration for
+ aiur_register_external_typefinders
+
+Upstream-Status: Submitted [https://github.com/nxp-imx/imx-gst1.0-plugin/pull/4]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ plugins/aiurdemux/aiur.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/plugins/aiurdemux/aiur.c b/plugins/aiurdemux/aiur.c
+index 2a52465..681ae2e 100755
+--- a/plugins/aiurdemux/aiur.c
++++ b/plugins/aiurdemux/aiur.c
+@@ -41,6 +41,8 @@
+ #include "aiurdemux.h"
+ #include "gstimxcommon.h"
+
++extern gboolean aiur_register_external_typefinders (GstPlugin * plugin);
++
+ static gboolean
+ plugin_init (GstPlugin * plugin)
+ {
+--
+2.39.2
+
diff --git a/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0011-meson-Undef-_TIME_BITS-along-with-_FILE_OFFSET_BITS.patch b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0011-meson-Undef-_TIME_BITS-along-with-_FILE_OFFSET_BITS.patch
new file mode 100644
index 00000000..5a58a5a6
--- /dev/null
+++ b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0011-meson-Undef-_TIME_BITS-along-with-_FILE_OFFSET_BITS.patch
@@ -0,0 +1,34 @@
+From bda3461b0b6493f3e04910e82e6e530a64af26b1 Mon Sep 17 00:00:00 2001
+From: Tom Hochstein <tom.hochstein@nxp.com>
+Date: Mon, 24 Jul 2023 12:09:34 -0700
+Subject: [PATCH] meson: Undef _TIME_BITS along with _FILE_OFFSET_BITS
+
+On gcc 13, _TIME_BITS is set to 64 and causes failure with the undef of
+_FILE_OFFSET_BITS:
+```
+/usr/include/features-time64.h:26:5: error: #error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
+ 26 | # error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
+ | ^~~~~
+```
+
+Upstream-Status: Pending
+Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
+---
+ meson.build | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/meson.build b/meson.build
+index 7ec5c70..64b2930 100644
+--- a/meson.build
++++ b/meson.build
+@@ -24,6 +24,7 @@ gst_dep = dependency('gstreamer-' + api_version, version : gst_req)
+ #meson automaticaly add _FILE_OFFSET_BITS=64 to gcc, this will make ipu test
+ #case fail when do mmap on 6q, autoconf didn't add this define, so undef it
+ add_project_arguments('-U_FILE_OFFSET_BITS', language: 'c')
++add_project_arguments('-U_TIME_BITS', language: 'c')
+
+ #below two marcos are defined in autoconf
+ add_project_arguments ('-DARM', language: 'c')
+--
+2.25.1
+
diff --git a/recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.5.1.bb b/recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.5.1.bb
deleted file mode 100644
index e7ecef74..00000000
--- a/recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.5.1.bb
+++ /dev/null
@@ -1,83 +0,0 @@
-# Copyright (C) 2014,2016 Freescale Semiconductor
-# Copyright 2017-2018 NXP
-# Copyright (C) 2012-2015 O.S. Systems Software LTDA.
-# Released under the MIT license (see COPYING.MIT for the terms)
-
-DESCRIPTION = "Gstreamer freescale plugins"
-LICENSE = "GPLv2 & LGPLv2 & LGPLv2.1"
-SECTION = "multimedia"
-
-DEPENDS = "imx-codec imx-parser gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad"
-DEPENDS_append_mx6 = " imx-lib"
-DEPENDS_append_mx7 = " imx-lib"
-DEPENDS_append_imxvpu = " imx-vpuwrap libdrm"
-
-# For backwards compatibility
-RREPLACES_${PN} = "gst1.0-fsl-plugin"
-RPROVIDES_${PN} = "gst1.0-fsl-plugin"
-RCONFLICTS_${PN} = "gst1.0-fsl-plugin"
-
-LIC_FILES_CHKSUM = "file://COPYING-LGPL-2;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
- file://COPYING-LGPL-2.1;md5=fbc093901857fcd118f065f900982c24"
-
-IMXGST_SRC ?= "git://source.codeaurora.org/external/imx/imx-gst1.0-plugin.git;protocol=https"
-SRCBRANCH = "MM_04.05.01_1909_L4.19.35"
-
-SRC_URI = "${IMXGST_SRC};branch=${SRCBRANCH}"
-SRCREV = "3330461b906153a180ef9bda58368ed6782e2c28"
-
-S = "${WORKDIR}/git"
-
-inherit autotools pkgconfig use-imx-headers
-
-PLATFORM_mx6 = "MX6"
-PLATFORM_mx6sl = "MX6SL"
-PLATFORM_mx6sx = "MX6SX"
-PLATFORM_mx6ul = "MX6UL"
-PLATFORM_mx6sll = "MX6SLL"
-PLATFORM_mx7= "MX7D"
-PLATFORM_mx7ulp= "MX7ULP"
-PLATFORM_mx8 = "MX8"
-
-# Todo add a mechanism to map possible build targets
-EXTRA_OECONF = "PLATFORM=${PLATFORM} \
- CPPFLAGS="-I${STAGING_INCDIR_IMX}" \
- CROSS_ROOT=${PKG_CONFIG_SYSROOT_DIR} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', bb.utils.contains('DISTRO_FEATURES', 'x11', '--disable-x11', '', d), '', d)}"
-
-PACKAGES =+ "${PN}-gplay ${PN}-libgplaycore ${PN}-libgstfsl ${PN}-grecorder ${PN}-librecorder-engine ${PN}-libplayengine"
-
-# Add codec list that the beep plugin run-time depended
-BEEP_RDEPENDS = "imx-codec-aac imx-codec-mp3 imx-codec-oggvorbis"
-RDEPENDS_${PN} += "imx-parser ${BEEP_RDEPENDS} gstreamer1.0-plugins-good-id3demux "
-
-# overlaysink rely on G2D,
-# cannot be supported on i.MX6SLL & i.MX6UL & i.MX6ULL & i.MX7D
-PACKAGECONFIG ?= ""
-PACKAGECONFIG_imxgpu2d = "overlaysink"
-
-
-# FIXME: Add all features
-# feature from excluded mm packages
-PACKAGECONFIG[ac3] += ",,imx-ac3codec,imx-ac3codec"
-# feature from special mm packages
-PACKAGECONFIG[aacp] += ",,imx-aacpcodec,imx-aacpcodec"
-MSDEPENDS = "imx-msparser imx-mscodec"
-PACKAGECONFIG[wma10dec] += ",,${MSDEPENDS},${MSDEPENDS}"
-PACKAGECONFIG[wma8enc] += "--enable-wma8enc,--disable-wma8enc,${MSDEPENDS},${MSDEPENDS}"
-OVDEPENDS = "virtual/libg2d"
-PACKAGECONFIG[overlaysink] += "--enable-overlaysink,--disable-overlaysink, ${OVDEPENDS}"
-
-FILES_${PN} = "${libdir}/gstreamer-1.0/*.so ${datadir}"
-
-FILES_${PN}-dbg += "${libdir}/gstreamer-1.0/.debug"
-FILES_${PN}-dev += "${libdir}/gstreamer-1.0/*.la ${libdir}/pkgconfig/*.pc"
-FILES_${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a"
-FILES_${PN}-gplay = "${bindir}/gplay-1.0"
-FILES_${PN}-libgplaycore = "${libdir}/libgplaycore-1.0${SOLIBS}"
-FILES_${PN}-libgstfsl = "${libdir}/libgstfsl-1.0${SOLIBS}"
-FILES_${PN}-grecorder = "${bindir}/grecorder-1.0"
-FILES_${PN}-librecorder-engine = "${libdir}/librecorder_engine-1.0${SOLIBS}"
-FILES_${PN}-libplayengine = "${libdir}/libplayengine-1.0${SOLIBS}"
-
-COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"
diff --git a/recipes-multimedia/gstreamer/imx-gst1.0-plugin_git.bb b/recipes-multimedia/gstreamer/imx-gst1.0-plugin_git.bb
new file mode 100644
index 00000000..a13cf30a
--- /dev/null
+++ b/recipes-multimedia/gstreamer/imx-gst1.0-plugin_git.bb
@@ -0,0 +1,110 @@
+# Copyright (C) 2014,2016 Freescale Semiconductor
+# Copyright 2017-2021 NXP
+# Copyright (C) 2012-2015 O.S. Systems Software LTDA.
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "Gstreamer freescale plugins"
+SECTION = "multimedia"
+LICENSE = "GPL-2.0-only & LGPL-2.0-only & LGPL-2.1-only"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=fbc093901857fcd118f065f900982c24"
+
+DEPENDS = " \
+ gstreamer1.0 \
+ gstreamer1.0-plugins-base \
+ gstreamer1.0-plugins-bad \
+ imx-codec \
+ imx-parser \
+ ${DEPENDS_IMXGPU} \
+"
+DEPENDS:append:mx6-nxp-bsp = " imx-lib"
+DEPENDS:append:mx7-nxp-bsp = " imx-lib"
+DEPENDS:append:mx8ulp-nxp-bsp = " imx-lib"
+DEPENDS:append:mx93-nxp-bsp = " imx-lib"
+DEPENDS:append:imxvpu = " imx-vpuwrap"
+DEPENDS:append:imxfbdev:imxgpu = " libdrm"
+DEPENDS_IMXGPU = ""
+DEPENDS_IMXGPU:imxgpu = "${DEPENDS_IMX_OPENCL_CONVERTER}"
+DEPENDS_IMX_OPENCL_CONVERTER = ""
+DEPENDS_IMX_OPENCL_CONVERTER:mx8-nxp-bsp = "imx-opencl-converter"
+DEPENDS_IMX_OPENCL_CONVERTER:mx8mm-nxp-bsp = ""
+DEPENDS_IMX_OPENCL_CONVERTER:mx95-nxp-bsp = "imx-opencl-converter"
+
+# For backwards compatibility
+RREPLACES:${PN} = "gst1.0-fsl-plugin"
+RPROVIDES:${PN} = "gst1.0-fsl-plugin"
+RCONFLICTS:${PN} = "gst1.0-fsl-plugin"
+
+PV = "4.8.3+git${SRCPV}"
+
+SRC_URI = "git://github.com/nxp-imx/imx-gst1.0-plugin.git;protocol=https;branch=${SRCBRANCH} \
+ file://0001-aiurdemux-Fix-type-of-USER_DATA_LOCATION.patch \
+ file://0002-aiurdemux.h-Include-glib-gprintf.h-for-g_printf-prot.patch \
+ file://0003-grecorder-Fix-build-with-clang.patch \
+ file://0004-gstimxcommon-Return-0-instead-of-NULL-for-a-function.patch \
+ file://0005-aiurstreamcache-Include-gst-gstinfo.h.patch \
+ file://0006-Fix-typecast-warnings-found-with-clang.patch \
+ file://0007-gstimxv4l2-Fix-typecasting-errors.patch \
+ file://0008-beepdec-Declare-beep_register_external_typefinders.patch \
+ file://0009-gstimxv4l2.c-Fix-incompatible-integer-to-pointer-con.patch \
+ file://0010-provide-declaration-for-aiur_register_external_typef.patch \
+ file://0011-meson-Undef-_TIME_BITS-along-with-_FILE_OFFSET_BITS.patch \
+ "
+SRCBRANCH = "MM_04.08.03_2312_L6.6.y"
+SRCREV = "91c7fec888cf8932c91e354331aad94975cae3ff"
+
+S = "${WORKDIR}/git"
+
+inherit meson pkgconfig use-imx-headers
+
+PLATFORM:mx6-nxp-bsp = "MX6"
+PLATFORM:mx6sl-nxp-bsp = "MX6SL"
+PLATFORM:mx6sx-nxp-bsp = "MX6SX"
+PLATFORM:mx6ul-nxp-bsp = "MX6UL"
+PLATFORM:mx6sll-nxp-bsp = "MX6SLL"
+PLATFORM:mx7-nxp-bsp= "MX7D"
+PLATFORM:mx7ulp-nxp-bsp= "MX7ULP"
+PLATFORM:mx8-nxp-bsp = "MX8"
+PLATFORM:mx9-nxp-bsp = "MX9"
+
+CFLAGS:append:toolchain-clang = " -Wno-implicit-int -Wno-int-conversion -Wno-incompatible-function-pointer-types"
+
+# Todo add a mechanism to map possible build targets
+EXTRA_OEMESON = "-Dplatform=${PLATFORM} \
+ -Dc_args="${CFLAGS} -I${STAGING_INCDIR_IMX}" \
+"
+
+PACKAGES =+ "${PN}-gplay ${PN}-libgplaycore ${PN}-libgstfsl ${PN}-grecorder ${PN}-librecorder-engine ${PN}-libplayengine"
+
+# Add codec list that the beep plugin run-time depended
+BEEP_RDEPENDS = "imx-codec-aac imx-codec-mp3 imx-codec-oggvorbis"
+RDEPENDS:${PN} += "imx-parser ${BEEP_RDEPENDS} gstreamer1.0-plugins-good-id3demux "
+RDEPENDS:${PN}:append:mx8qm-nxp-bsp = " imx-dsp"
+RDEPENDS:${PN}:append:mx8qxp-nxp-bsp = " imx-dsp"
+RDEPENDS:${PN}:append:mx8dx-nxp-bsp = " imx-dsp"
+RDEPENDS:${PN}:append:mx8mp-nxp-bsp = " imx-dsp"
+RDEPENDS:${PN}:append:mx8ulp-nxp-bsp = " imx-dsp"
+
+PACKAGECONFIG ?= ""
+
+# FIXME: Add all features
+# feature from excluded mm packages
+PACKAGECONFIG[ac3] = ",,imx-ac3codec,imx-ac3codec"
+# feature from special mm packages
+PACKAGECONFIG[aacp] = ",,imx-aacpcodec,imx-aacpcodec"
+MSDEPENDS = "imx-msparser imx-mscodec"
+PACKAGECONFIG[wma10dec] = ",,${MSDEPENDS},${MSDEPENDS}"
+PACKAGECONFIG[wma8enc] = ",,${MSDEPENDS},${MSDEPENDS}"
+
+FILES:${PN} = "${libdir}/gstreamer-1.0/*.so ${datadir}"
+
+FILES:${PN}-dbg += "${libdir}/gstreamer-1.0/.debug"
+FILES:${PN}-dev += "${libdir}/gstreamer-1.0/*.la ${libdir}/pkgconfig/*.pc"
+FILES:${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a"
+FILES:${PN}-gplay = "${bindir}/gplay-1.0"
+FILES:${PN}-libgplaycore = "${libdir}/libgplaycore-1.0${SOLIBS}"
+FILES:${PN}-libgstfsl = "${libdir}/libgstfsl-1.0${SOLIBS}"
+FILES:${PN}-grecorder = "${bindir}/grecorder-1.0"
+FILES:${PN}-librecorder-engine = "${libdir}/librecorder_engine-1.0${SOLIBS}"
+FILES:${PN}-libplayengine = "${libdir}/libplayengine-1.0${SOLIBS}"
+
+COMPATIBLE_MACHINE = "(imx-nxp-bsp)"
diff --git a/recipes-multimedia/imx-codec/imx-codec_4.5.1.bb b/recipes-multimedia/imx-codec/imx-codec_4.8.3.bb
index 72cf86c9..0a2c71e7 100644
--- a/recipes-multimedia/imx-codec/imx-codec_4.5.1.bb
+++ b/recipes-multimedia/imx-codec/imx-codec_4.8.3.bb
@@ -1,34 +1,33 @@
# Copyright (C) 2012-2016 Freescale Semiconductor
-# Copyright 2017 NXP
+# Copyright 2017 NXP-2023
# Copyright 2018 (C) O.S. Systems Software LTDA.
# Released under the MIT license (see COPYING.MIT for the terms)
DESCRIPTION = "Freescale Multimedia codec libs"
LICENSE = "Proprietary"
SECTION = "multimedia"
-LIC_FILES_CHKSUM = "file://COPYING;md5=6c12031a11b81db21cdfe0be88cac4b3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=44a8052c384584ba09077e85a3d1654f"
# Backward compatibility
PROVIDES += "libfslcodec"
-SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true"
-SRC_URI[md5sum] = "ec33247a4c88de79129f4af041227059"
-SRC_URI[sha256sum] = "1ca8b0d6289af1f768f193cff337207d98c0d71120d97028b35cb7743e7160cc"
+SRC_URI = "${FSL_MIRROR}/${BP}.bin;fsl-eula=true"
+SRC_URI[md5sum] = "7ae1615aad2c0456b9be2ab804a6267e"
+SRC_URI[sha256sum] = "9facb3541903b4a6c6baa906f8c2c6cc01fc8c7b82a726c8da6d3681d4ed720b"
inherit fsl-eula-unpack autotools pkgconfig
+PACKAGECONFIG ??= "${PACKAGECONFIG_VPU}"
+# Support Chips&Media VPU only
+PACKAGECONFIG_VPU = ""
+PACKAGECONFIG_VPU:mx6q-nxp-bsp = "vpu"
+PACKAGECONFIG_VPU:mx6dl-nxp-bsp = "vpu"
+PACKAGECONFIG[vpu] = "--enable-vpu,--disable-vpu,virtual/imxvpu"
+
# Choose between 32-bit and 64-bit binaries and between Soft Float-Point and Hard Float-Point
EXTRA_OECONF = "${@bb.utils.contains('TUNE_FEATURES', 'aarch64', '--enable-armv8', \
bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--enable-fhw', '', d), d)}"
-PACKAGECONFIG ?= ""
-PACKAGECONFIG_imxvpu = "vpu"
-
-# We need to ensure we don't have '-src' package overrided
-PACKAGE_DEBUG_SPLIT_STYLE = 'debug-without-src'
-
-PACKAGECONFIG[vpu] = "--enable-vpu,--disable-vpu,virtual/imxvpu"
-
-do_install_append() {
+do_install:append() {
# LTIB move the files around or gst-fsl-plugin won't find them
for p in $(find ${D}${libdir}/imx-mm -mindepth 2 -maxdepth 2 -not -type d); do
mv $p ${D}${libdir}
@@ -46,15 +45,15 @@ python __set_insane_skip() {
for p in d.getVar('PACKAGES').split():
# Even though we are packaging libraries those are plugins so we
# shouldn't rename the packages to follow its sonames.
- d.setVar("DEBIAN_NOAUTONAME_%s" % p, "1")
+ d.setVar("DEBIAN_NOAUTONAME:%s" % p, "1")
# FIXME: All binaries lack GNU_HASH in elf binary but as we don't have
# the source we cannot fix it. Disable the insane check for now.
if p == 'imx-codec-test-bin':
# FIXME: includes the DUT .so files so we need to deploy those
- d.setVar("INSANE_SKIP_%s" % p, "ldflags textrel libdir file-rdeps")
+ d.setVar("INSANE_SKIP:%s" % p, "ldflags textrel libdir")
else:
- d.setVar("INSANE_SKIP_%s" % p, "ldflags textrel")
+ d.setVar("INSANE_SKIP:%s" % p, "ldflags textrel")
}
do_package_qa[prefuncs] += "__set_insane_skip"
@@ -70,13 +69,13 @@ python __split_libfslcodec_plugins() {
for pkg in pkgs:
meta = pkg[10:]
if meta != '':
- d.setVar('RREPLACES_%s' % pkg, ' libfslcodec-%s' % meta)
- d.setVar('RPROVIDES_%s' % pkg, ' libfslcodec-%s' % meta)
- d.setVar('RCONFLICTS_%s' % pkg, ' libfslcodec-%s' % meta)
+ d.setVar('RREPLACES:%s' % pkg, ' libfslcodec-%s' % meta)
+ d.setVar('RPROVIDES:%s' % pkg, ' libfslcodec-%s' % meta)
+ d.setVar('RCONFLICTS:%s' % pkg, ' libfslcodec-%s' % meta)
else :
- d.setVar('RREPLACES_%s' % pkg, ' libfslcodec')
- d.setVar('RPROVIDES_%s' % pkg, ' libfslcodec')
- d.setVar('RCONFLICTS_%s' % pkg, ' libfslcodec')
+ d.setVar('RREPLACES:%s' % pkg, ' libfslcodec')
+ d.setVar('RPROVIDES:%s' % pkg, ' libfslcodec')
+ d.setVar('RCONFLICTS:%s' % pkg, ' libfslcodec')
}
python __set_metapkg_rdepends() {
@@ -85,35 +84,38 @@ python __set_metapkg_rdepends() {
codec_pkgs = oe.utils.packages_filter_out_system(d)
codec_pkgs = filter(lambda x: x not in ['imx-codec-test-bin', 'imx-codec-test-source'],
codec_pkgs)
- d.appendVar('RDEPENDS_imx-codec-meta', ' ' + ' '.join(codec_pkgs))
+ d.appendVar('RDEPENDS:imx-codec-meta', ' ' + ' '.join(codec_pkgs))
}
PACKAGESPLITFUNCS =+ "__split_libfslcodec_plugins __set_metapkg_rdepends"
+# We need to ensure we don't have '-src' package overrided
+PACKAGE_DEBUG_SPLIT_STYLE = 'debug-without-src'
+
PACKAGES_DYNAMIC = "${PN}-*"
INHIBIT_PACKAGE_STRIP = "1"
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
PACKAGES += "${PN}-meta ${PN}-test-bin ${PN}-test-source"
-ALLOW_EMPTY_${PN} = "1"
-ALLOW_EMPTY_${PN}-meta = "1"
+ALLOW_EMPTY:${PN} = "1"
+ALLOW_EMPTY:${PN}-meta = "1"
# Ensure we get warnings if we miss something
-FILES_${PN} = ""
+FILES:${PN} = ""
-FILES_${PN}-dev += "${libdir}/imx-mm/*/*${SOLIBSDEV} \
+FILES:${PN}-dev += "${libdir}/imx-mm/*/*${SOLIBSDEV} \
${libdir}/imx-mm/*/*/*${SOLIBSDEV} \
${libdir}/pkgconfig/*.pc ${includedir}/imx-mm/*"
-FILES_${PN}-test-bin += "${datadir}/imx-mm/*/examples/*/bin"
+FILES:${PN}-test-bin += "${datadir}/imx-mm/*/examples/*/bin"
-FILES_${PN}-test-source += "${datadir}/imx-mm/*"
+FILES:${PN}-test-source += "${datadir}/imx-mm/*"
# FIXME: The wrap and lib names does not match
-FILES_${PN}-oggvorbis += "${libdir}/imx-mm/audio-codec/wrap/lib_vorbisd_wrap_arm*_elinux.so.*"
-FILES_${PN}-nb += "${libdir}/imx-mm/audio-codec/wrap/lib_nbamrd_wrap_arm*_elinux.so.*"
-FILES_${PN}-wb += "${libdir}/imx-mm/audio-codec/wrap/lib_wbamrd_wrap_arm*_elinux.so.*"
+FILES:${PN}-oggvorbis += "${libdir}/imx-mm/audio-codec/wrap/lib_vorbisd_wrap_arm*_elinux.so.*"
+FILES:${PN}-nb += "${libdir}/imx-mm/audio-codec/wrap/lib_nbamrd_wrap_arm*_elinux.so.*"
+FILES:${PN}-wb += "${libdir}/imx-mm/audio-codec/wrap/lib_wbamrd_wrap_arm*_elinux.so.*"
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"
+PACKAGE_ARCH = "${MACHINE_SOCARCH}"
+COMPATIBLE_MACHINE = "(imx-nxp-bsp)"
diff --git a/recipes-multimedia/imx-dsp/imx-dsp-codec-ext_2.1.7.bb b/recipes-multimedia/imx-dsp/imx-dsp-codec-ext_2.1.7.bb
new file mode 100644
index 00000000..bc73bd9f
--- /dev/null
+++ b/recipes-multimedia/imx-dsp/imx-dsp-codec-ext_2.1.7.bb
@@ -0,0 +1,27 @@
+# Copyright 2018-2023 NXP
+
+DESCRIPTION = "i.MX DSP Codec Wrapper and Lib owned by NXP"
+LICENSE = "Proprietary"
+LIC_FILES_CHKSUM = "file://COPYING;md5=44a8052c384584ba09077e85a3d1654f"
+
+inherit fsl-eula-unpack autotools pkgconfig
+
+SRC_URI = "${FSL_MIRROR}/${BP}.bin;fsl-eula=true"
+
+SRC_URI[md5sum] = "32251bc952ca7b9a4b12fadb9328a8c1"
+SRC_URI[sha256sum] = "0baa82410a77c68e39aaa987d91b41c94255d62294fa2f5a399169f3068862cc"
+
+EXTRA_OECONF:append:mx8qm-nxp-bsp = " --enable-imx8qmqxp"
+EXTRA_OECONF:append:mx8qxp-nxp-bsp = " --enable-imx8qmqxp"
+EXTRA_OECONF:append:mx8dx-nxp-bsp = " --enable-imx8qmqxp"
+EXTRA_OECONF:append:mx8mp-nxp-bsp = " --enable-imx8m"
+EXTRA_OECONF:append:mx8ulp-nxp-bsp = " --enable-imx8ulp"
+
+# Fix strip command failed: 'Unable to recognise the format of the input file'
+INHIBIT_PACKAGE_STRIP = "1"
+INHIBIT_SYSROOT_STRIP = "1"
+INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
+INSANE_SKIP:${PN} = "arch dev-so ldflags"
+
+FILES:${PN} += "${libdir}/imx-mm/audio-codec/dsp ${datadir}/imx-mm"
+COMPATIBLE_MACHINE = "(mx8qm-nxp-bsp|mx8qxp-nxp-bsp|mx8dx-nxp-bsp|mx8mp-nxp-bsp|mx8ulp-nxp-bsp)"
diff --git a/recipes-multimedia/imx-dsp/imx-dsp_2.1.7.bb b/recipes-multimedia/imx-dsp/imx-dsp_2.1.7.bb
new file mode 100644
index 00000000..60761e6e
--- /dev/null
+++ b/recipes-multimedia/imx-dsp/imx-dsp_2.1.7.bb
@@ -0,0 +1,57 @@
+# Copyright 2017-2023 NXP
+
+DESCRIPTION = "i.MX DSP Wrapper, Firmware Binary, Codec Libraries"
+LICENSE = "Proprietary"
+LIC_FILES_CHKSUM = "file://COPYING;md5=44a8052c384584ba09077e85a3d1654f"
+
+
+inherit fsl-eula-unpack autotools pkgconfig
+
+SRC_URI = "${FSL_MIRROR}/${BP}.bin;fsl-eula=true"
+
+SRC_URI[md5sum] = "199f88716f289e93e0954fa6475a3cbc"
+SRC_URI[sha256sum] = "83eaef592de33b4d5e8fae63d798cc955bf3c414911c87afeb65a20af01fb0b6"
+
+EXTRA_OECONF = " \
+ -datadir=${base_libdir}/firmware \
+ --bindir=/unit_tests \
+ ${@bb.utils.contains('TUNE_FEATURES', 'aarch64', '--enable-armv8', '', d)} \
+"
+
+HIFI4_PLATFORM ?= "HIFI4_PLATFORM_IS_UNDEFINED"
+HIFI4_PLATFORM:mx8qm-nxp-bsp = "imx8qmqxp"
+HIFI4_PLATFORM:mx8qxp-nxp-bsp = "imx8qmqxp"
+HIFI4_PLATFORM:mx8dx-nxp-bsp = "imx8qmqxp"
+HIFI4_PLATFORM:mx8mp-nxp-bsp = "imx8mp"
+HIFI4_PLATFORM:mx8ulp-nxp-bsp = "imx8ulp"
+
+UNSUPPORTED_TESTS = "dsp_tflm"
+UNSUPPORTED_TESTS:mx8ulp-nxp-bsp = ""
+
+do_install:append () {
+ # Remove firmware not for this platform
+ find ${D}/${base_libdir}/firmware/imx/dsp -name hifi4_*.bin -not -name *${HIFI4_PLATFORM}* -exec rm {} \;
+ # Set the expected generic name for the firmware
+ mv ${D}/${base_libdir}/firmware/imx/dsp/hifi4_${HIFI4_PLATFORM}.bin ${D}/${base_libdir}/firmware/imx/dsp/hifi4.bin
+ # Remove unit tests not for this platform
+ for unsupported_test in ${UNSUPPORTED_TESTS}; do
+ find ${D}/unit_tests/DSP -name $unsupported_test* -exec rm {} \;
+ done
+}
+
+FILES:${PN} = "${libdir}/imx-mm/audio-codec/dsp \
+ ${libdir}/imx-mm/audio-codec/wrap \
+ ${base_libdir}/firmware/imx/dsp \
+ /unit_tests \
+"
+RDEPENDS:${PN} += "imx-dsp-codec-ext"
+
+INSANE_SKIP:${PN} = "already-stripped arch ldflags dev-so"
+
+# Fix strip command failed: 'Unable to recognise the format of the input file'
+INHIBIT_PACKAGE_STRIP = "1"
+INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
+INHIBIT_SYSROOT_STRIP = "1"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+COMPATIBLE_MACHINE = "(mx8qm-nxp-bsp|mx8qxp-nxp-bsp|mx8dx-nxp-bsp|mx8mp-nxp-bsp|mx8ulp-nxp-bsp)"
diff --git a/recipes-multimedia/imx-dspc-asrc/imx-dspc-asrc_1.0.1.bb b/recipes-multimedia/imx-dspc-asrc/imx-dspc-asrc_1.0.1.bb
index d9fd8458..48be837a 100644
--- a/recipes-multimedia/imx-dspc-asrc/imx-dspc-asrc_1.0.1.bb
+++ b/recipes-multimedia/imx-dspc-asrc/imx-dspc-asrc_1.0.1.bb
@@ -4,7 +4,7 @@ LICENSE = "Proprietary"
SECTION = "multimedia"
LIC_FILES_CHKSUM = "file://COPYING;md5=72c0f70181bb6e83eee6aab8de12a9f3"
-SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true"
+SRC_URI = "${FSL_MIRROR}/${BP}.bin;fsl-eula=true"
SRC_URI[md5sum] = "d46005ee29ca603caa2e1b1e82953ff1"
SRC_URI[sha256sum] = "e79cbf4788a86a0068bbe80c37317e3332ae76e3d5c3ff2eabd71f03121fab6a"
@@ -17,6 +17,6 @@ INHIBIT_PACKAGE_STRIP = "1"
INHIBIT_SYSROOT_STRIP = "1"
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
-FILES_${PN} += "/unit_tests ${datadir}/imx-mm"
+FILES:${PN} += "/unit_tests ${datadir}/imx-mm"
-COMPATIBLE_MACHINE = "(mx8)"
+COMPATIBLE_MACHINE = "(mx8-nxp-bsp)"
diff --git a/recipes-multimedia/imx-opencl-converter/imx-opencl-converter_0.2.0.bb b/recipes-multimedia/imx-opencl-converter/imx-opencl-converter_0.2.0.bb
new file mode 100644
index 00000000..3dc0a7ea
--- /dev/null
+++ b/recipes-multimedia/imx-opencl-converter/imx-opencl-converter_0.2.0.bb
@@ -0,0 +1,18 @@
+# Copyright 2023 NXP
+DESCRIPTION = "NXP Multimedia opencl converter lib"
+LICENSE = "Proprietary"
+SECTION = "multimedia"
+LIC_FILES_CHKSUM = "file://COPYING;md5=44a8052c384584ba09077e85a3d1654f"
+DEPENDS = "opencl-headers"
+
+SRC_URI = "${FSL_MIRROR}/${BP}.bin;fsl-eula=true"
+SRC_URI[md5sum] = "dc668682189ce740fb46073e62f58066"
+SRC_URI[sha256sum] = "9f283df500c57421b87d96d9af7022ab490bc241aa28d00755beaadabbcd754b"
+
+inherit fsl-eula-unpack autotools pkgconfig meson
+
+FILES:${PN} += "${datadir}/"
+
+COMPATIBLE_MACHINE = "(^$)"
+COMPATIBLE_MACHINE:imxgpu = "(mx8-nxp-bsp|mx95-nxp-bsp)"
+COMPATIBLE_MACHINE:mx8mm-nxp-bsp = "(^$)"
diff --git a/recipes-multimedia/imx-parser/imx-parser_4.5.1.bb b/recipes-multimedia/imx-parser/imx-parser_4.8.3.bb
index e76bd3ef..4e580085 100644
--- a/recipes-multimedia/imx-parser/imx-parser_4.5.1.bb
+++ b/recipes-multimedia/imx-parser/imx-parser_4.8.3.bb
@@ -1,21 +1,21 @@
# Copyright (C) 2012-2018 O.S. Systems Software LTDA.
# Copyright (C) 2012-2016 Freescale Semiconductor
-# Copyright 2017, 2019 NXP
+# Copyright (C) 2017-2023 NXP
# Released under the MIT license (see COPYING.MIT for the terms)
DESCRIPTION = "Freescale Multimedia parser libs"
LICENSE = "Proprietary"
SECTION = "multimedia"
-LIC_FILES_CHKSUM = "file://COPYING;md5=6c12031a11b81db21cdfe0be88cac4b3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=44a8052c384584ba09077e85a3d1654f"
# For backwards compatibility
PROVIDES += "libfslparser"
-RREPLACES_${PN} = "libfslparser"
-RPROVIDES_${PN} = "libfslparser"
-RCONFLICTS_${PN} = "libfslparser"
+RREPLACES:${PN} = "libfslparser"
+RPROVIDES:${PN} = "libfslparser"
+RCONFLICTS:${PN} = "libfslparser"
-SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true"
-SRC_URI[md5sum] = "4ad7ab4eb3cd0dfdad278673b9a64b05"
-SRC_URI[sha256sum] = "d7a742669bc25b694936a9b84a183bc79f1fd8ebccbafa1c75e894c9b64c83fc"
+SRC_URI = "${FSL_MIRROR}/${BP}.bin;fsl-eula=true"
+SRC_URI[md5sum] = "9bca484287f5592b86ed10c1761a3fcc"
+SRC_URI[sha256sum] = "b25267eefb4618b2ba8d6aba46a5b4e09621a44115036fc896e0777006472043"
inherit fsl-eula-unpack autotools pkgconfig
@@ -31,16 +31,14 @@ python __set_insane_skip() {
# the source we cannot fix it. Disable the insane check for now.
# FIXME: gst-fsl-plugin looks for the .so files so we need to deploy those
for p in d.getVar('PACKAGES').split():
- d.setVar("INSANE_SKIP_%s" % p, "ldflags dev-so textrel")
+ d.setVar("INSANE_SKIP:%s" % p, "ldflags dev-so textrel")
}
do_package_qa[prefuncs] += "__set_insane_skip"
# FIXME: gst-fsl-plugin looks for the .so files so we need to deploy those
-FILES_${PN} += "${libdir}/imx-mm/*/*${SOLIBS} ${libdir}/imx-mm/*/*${SOLIBSDEV}"
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
+FILES:${PN} += "${libdir}/imx-mm/*/*${SOLIBS} ${libdir}/imx-mm/*/*${SOLIBSDEV}"
INHIBIT_SYSROOT_STRIP = "1"
-COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"
+COMPATIBLE_MACHINE = "(imx-nxp-bsp)"
diff --git a/recipes-multimedia/imx-sw-pdm/imx-sw-pdm_1.0.3.bb b/recipes-multimedia/imx-sw-pdm/imx-sw-pdm_1.0.3.bb
new file mode 100644
index 00000000..2b62b244
--- /dev/null
+++ b/recipes-multimedia/imx-sw-pdm/imx-sw-pdm_1.0.3.bb
@@ -0,0 +1,22 @@
+# Copyright 2020,2023 NXP
+
+DESCRIPTION = "NXP PDM to PCM Software Decimation SIMD Library"
+LICENSE = "Proprietary"
+SECTION = "multimedia"
+LIC_FILES_CHKSUM = "file://COPYING;md5=63a38e9f392d8813d6f1f4d0d6fbe657"
+
+SRC_URI = "${FSL_MIRROR}/${BP}.bin;fsl-eula=true"
+SRC_URI[md5sum] = "cbd5af6e9019db789c03c2d05a8bb444"
+SRC_URI[sha256sum] = "f778a7b785fc500df5573f5b810a190ddc561267b47ca54b9ddf4ae12571cfe3"
+
+inherit fsl-eula-unpack autotools pkgconfig
+
+INSANE_SKIP:${PN} = "already-stripped"
+
+FILES:${PN} += "${datadir}/imx-mm"
+
+COMPATIBLE_MACHINE = "(mx8-nxp-bsp)"
+
+INSANE_SKIP:append:libc-musl = " file-rdeps"
+
+RDEPENDS:${PN}:append:libc-musl = " gcompat"
diff --git a/recipes-multimedia/imx-vpuwrap/imx-vpuwrap_4.5.1.bb b/recipes-multimedia/imx-vpuwrap/imx-vpuwrap_4.5.1.bb
deleted file mode 100644
index c6e3f7cb..00000000
--- a/recipes-multimedia/imx-vpuwrap/imx-vpuwrap_4.5.1.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-# Copyright (C) 2013-2016 Freescale Semiconductor
-# Copyright 2018 (C) O.S. Systems Software LTDA.
-# Copyright 2017, 2019 NXP
-# Released under the MIT license (see COPYING.MIT for the terms)
-DESCRIPTION = "Freescale Multimedia VPU wrapper"
-DEPENDS = "virtual/imxvpu"
-LICENSE = "Proprietary"
-SECTION = "multimedia"
-LIC_FILES_CHKSUM = "file://COPYING;md5=6c12031a11b81db21cdfe0be88cac4b3"
-
-# For backwards compatibility
-PROVIDES += "libfslvpuwrap"
-RREPLACES_${PN} = "libfslvpuwrap"
-RPROVIDES_${PN} = "libfslvpuwrap"
-RCONFLICTS_${PN} = "libfslvpuwrap"
-
-SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true"
-
-SRC_URI[md5sum] = "7e48410c5a00aab94af4022ef147f775"
-SRC_URI[sha256sum] = "a3b05081be1e078dbe589bac1c51d02a00ce591e13693fea8eb695f46fc5eb46"
-
-inherit fsl-eula-unpack autotools pkgconfig
-
-do_install_append() {
- # FIXME: Drop examples for now
- rm -r ${D}${datadir}
-}
-
-INSANE_SKIP_imx-vpuwrap = "file-rdeps"
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-COMPATIBLE_MACHINE = "(imxvpu)"
diff --git a/recipes-multimedia/imx-vpuwrap/imx-vpuwrap_git.bb b/recipes-multimedia/imx-vpuwrap/imx-vpuwrap_git.bb
new file mode 100644
index 00000000..af15e7b1
--- /dev/null
+++ b/recipes-multimedia/imx-vpuwrap/imx-vpuwrap_git.bb
@@ -0,0 +1,28 @@
+# Copyright (C) 2013-2016 Freescale Semiconductor
+# Copyright 2017-2023 NXP
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "Freescale Multimedia VPU wrapper"
+LICENSE = "Proprietary"
+SECTION = "multimedia"
+LIC_FILES_CHKSUM = "file://COPYING;md5=2827219e81f28aba7c6a569f7c437fa7"
+
+DEPENDS = "virtual/imxvpu"
+DEPENDS:append:mx8mp-nxp-bsp = " imx-vpu-hantro-vc"
+
+SRC_URI = "git://github.com/NXP/imx-vpuwrap.git;protocol=https;branch=${SRCBRANCH}"
+SRCBRANCH = "MM_04.08.03_2312_L6.6.y"
+SRCREV = "f974cecdb00b4a214e4b5229f2279e772ee43306"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
+
+do_install:append() {
+ # FIXME: Drop examples for now
+ rm -r ${D}${datadir}
+}
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+COMPATIBLE_MACHINE = "(imxvpu)"
diff --git a/recipes-multimedia/libimxvpuapi/libimxvpuapi2_git.bb b/recipes-multimedia/libimxvpuapi/libimxvpuapi2_2.3.0.bb
index 0ebeabb0..1e7d8252 100644
--- a/recipes-multimedia/libimxvpuapi/libimxvpuapi2_git.bb
+++ b/recipes-multimedia/libimxvpuapi/libimxvpuapi2_2.3.0.bb
@@ -1,23 +1,27 @@
DESCRIPTION = "frontend for the i.MX6 / i.MX8 VPU hardware video engines"
HOMEPAGE = "https://github.com/Freescale/libimxvpuapi"
-LICENSE = "LGPLv2.1"
+LICENSE = "LGPL-2.1-only"
LIC_FILES_CHKSUM = "file://LICENSE;md5=38fa42a5a6425b26d2919b17b1527324"
SECTION = "multimedia"
DEPENDS = "virtual/imxvpu libimxdmabuffer"
+# Add imx-vpu-hantro-vc as dependency for being
+# able to encode video using the VC8000E encoder
+DEPENDS:append:mx8mp-nxp-bsp = " imx-vpu-hantro-vc"
-PV = "2.0.0+${SRCPV}"
+PV .= "+git${SRCPV}"
SRCBRANCH ?= "master"
-SRCREV = "86028967644d2da8e99d4e206ca1d71ff4bcb7f7"
-SRC_URI = "git://github.com/Freescale/libimxvpuapi.git;branch=${SRCBRANCH}"
+SRCREV = "6f803f46d6b53a08cf02fc3d440072e01e2f3a09"
+SRC_URI = "git://github.com/Freescale/libimxvpuapi.git;branch=${SRCBRANCH};protocol=https"
S = "${WORKDIR}/git"
inherit waf pkgconfig use-imx-headers
-IMX_PLATFORM_mx6 = "imx6"
-IMX_PLATFORM_mx8mq = "imx8m"
-IMX_PLATFORM_mx8mm = "imx8mm"
+IMX_PLATFORM:mx6-nxp-bsp = "imx6"
+IMX_PLATFORM:mx8mq-nxp-bsp = "imx8m"
+IMX_PLATFORM:mx8mm-nxp-bsp = "imx8mm"
+IMX_PLATFORM:mx8mp-nxp-bsp = "imx8mp"
EXTRA_OECONF = "--imx-platform=${IMX_PLATFORM} --libdir=${libdir} --imx-headers=${STAGING_INCDIR_IMX} --sysroot-path=${RECIPE_SYSROOT}"
diff --git a/recipes-multimedia/libimxvpuapi/libimxvpuapi_git.bb b/recipes-multimedia/libimxvpuapi/libimxvpuapi_git.bb
index 2d0f8571..e3a05193 100644
--- a/recipes-multimedia/libimxvpuapi/libimxvpuapi_git.bb
+++ b/recipes-multimedia/libimxvpuapi/libimxvpuapi_git.bb
@@ -1,7 +1,7 @@
# Copyright 2018 (C) O.S. Systems Software LTDA.
DESCRIPTION = "frontend for the i.MX6 VPU hardware video engine"
HOMEPAGE = "https://github.com/Freescale/libimxvpuapi"
-LICENSE = "LGPLv2.1"
+LICENSE = "LGPL-2.1-only"
LIC_FILES_CHKSUM = "file://LICENSE;md5=38fa42a5a6425b26d2919b17b1527324"
SECTION = "multimedia"
DEPENDS = "imx-vpu"
@@ -10,12 +10,12 @@ PV = "0.10.3+${SRCPV}"
SRCBRANCH ?= "v1"
SRCREV = "3a1ee3a54fe93813868d38c3d32ea065b59e227e"
-SRC_URI = "git://github.com/Freescale/libimxvpuapi.git;branch=${SRCBRANCH}"
+SRC_URI = "git://github.com/Freescale/libimxvpuapi.git;branch=${SRCBRANCH};protocol=https"
S = "${WORKDIR}/git"
inherit waf pkgconfig
-COMPATIBLE_MACHINE = "(mx6q|mx6dl)"
+COMPATIBLE_MACHINE = "(mx6q-nxp-bsp|mx6dl-nxp-bsp)"
EXTRA_OECONF = "--libdir=${libdir}"
diff --git a/recipes-multimedia/pipewire/pipewire/0001-launch-allow-pipewire-pulse-can-be-started-by-root.patch b/recipes-multimedia/pipewire/pipewire/0001-launch-allow-pipewire-pulse-can-be-started-by-root.patch
new file mode 100644
index 00000000..ab34dc2f
--- /dev/null
+++ b/recipes-multimedia/pipewire/pipewire/0001-launch-allow-pipewire-pulse-can-be-started-by-root.patch
@@ -0,0 +1,41 @@
+From 2cac94185824aa7df07ec48a2872f3d26d517a6d Mon Sep 17 00:00:00 2001
+From: Shengjiu Wang <shengjiu.wang@nxp.com>
+Date: Tue, 28 Nov 2023 10:23:42 +0800
+Subject: [PATCH] launch: allow pipewire-pulse can be started by root.
+
+revert commit 8942f6b40 ("launch: avoid autostarting pipewire-pulse
+systemd units for root")
+
+Upstream-Status: Inappropriate [i.MX specific]
+Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
+---
+ src/daemon/systemd/user/pipewire-pulse.service.in | 1 -
+ src/daemon/systemd/user/pipewire-pulse.socket | 1 -
+ 2 files changed, 2 deletions(-)
+
+diff --git a/src/daemon/systemd/user/pipewire-pulse.service.in b/src/daemon/systemd/user/pipewire-pulse.service.in
+index 73d22e532..da7728ee3 100644
+--- a/src/daemon/systemd/user/pipewire-pulse.service.in
++++ b/src/daemon/systemd/user/pipewire-pulse.service.in
+@@ -14,7 +14,6 @@ Description=PipeWire PulseAudio
+ # After=pipewire-pulse.socket is not needed, as it is already implicit in the
+ # socket-service relationship, see systemd.socket(5).
+ Requires=pipewire-pulse.socket
+-ConditionUser=!root
+ Wants=pipewire.service pipewire-session-manager.service
+ After=pipewire.service pipewire-session-manager.service
+ Conflicts=pulseaudio.service
+diff --git a/src/daemon/systemd/user/pipewire-pulse.socket b/src/daemon/systemd/user/pipewire-pulse.socket
+index 1ae5edafb..d27fb0e26 100644
+--- a/src/daemon/systemd/user/pipewire-pulse.socket
++++ b/src/daemon/systemd/user/pipewire-pulse.socket
+@@ -1,6 +1,5 @@
+ [Unit]
+ Description=PipeWire PulseAudio
+-ConditionUser=!root
+ Conflicts=pulseaudio.socket
+
+ [Socket]
+--
+2.34.1
+
diff --git a/recipes-multimedia/pipewire/pipewire_%.bbappend b/recipes-multimedia/pipewire/pipewire_%.bbappend
new file mode 100644
index 00000000..7d84ee93
--- /dev/null
+++ b/recipes-multimedia/pipewire/pipewire_%.bbappend
@@ -0,0 +1,14 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
+SRC_URI:append:imx-nxp-bsp = " file://0001-launch-allow-pipewire-pulse-can-be-started-by-root.patch"
+
+SYSTEMD_AUTO_ENABLE:imx-nxp-bsp = "disable"
+
+DEPENDS:append:mx95-nxp-bsp = " libdrm"
+
+PACKAGECONFIG:remove:mx95-nxp-bsp = "libcamera"
+PACKAGECONFIG:remove:imx-nxp-bsp = "gstreamer"
+PACKAGECONFIG:class-target:append:imx-nxp-bsp = " ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez-lc3', '', d)}"
+
+# FIXME: Needs to qualify on PACKAGECONFIG
+SYSTEMD_SERVICE:${PN}-pulse = "pipewire-pulse.service"
diff --git a/recipes-multimedia/pulseaudio/pulseaudio/imx-nxp-bsp/0001-Fix-pulseaudio-mutex-issue-when-do-pause-in-gstreame.patch b/recipes-multimedia/pulseaudio/pulseaudio/imx-nxp-bsp/0001-Fix-pulseaudio-mutex-issue-when-do-pause-in-gstreame.patch
new file mode 100644
index 00000000..10d5a010
--- /dev/null
+++ b/recipes-multimedia/pulseaudio/pulseaudio/imx-nxp-bsp/0001-Fix-pulseaudio-mutex-issue-when-do-pause-in-gstreame.patch
@@ -0,0 +1,32 @@
+From c21e24f5c53e81fc715905c54a6c82b69e397e63 Mon Sep 17 00:00:00 2001
+From: "shengjiu.wang" <b02247@freescale.com>
+Date: Thu, 3 Apr 2014 14:22:02 +0800
+Subject: [PATCH] Fix pulseaudio mutex issue when do pause in gstreamer
+
+The error log is "Assertion 'pthread_mutex_unlock(&m->mutex) == 0'
+failed at pulsecore/mutex-posix.c:106, function pa_mutex_unlock(). Aborting"
+
+This fix is a workaround base on the solution from this link "
+https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/932096"
+
+Upstream-Status: Inappropriate [i.MX specific]
+Signed-off-by: shengjiu.wang <b02247@freescale.com>
+---
+ src/pulsecore/mutex-posix.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/pulsecore/mutex-posix.c b/src/pulsecore/mutex-posix.c
+index 36c2787..d592501 100644
+--- a/src/pulsecore/mutex-posix.c
++++ b/src/pulsecore/mutex-posix.c
+@@ -30,6 +30,7 @@
+ #include <pulsecore/macro.h>
+
+ #include "mutex.h"
++#undef HAVE_PTHREAD_PRIO_INHERIT
+
+ struct pa_mutex {
+ pthread_mutex_t mutex;
+--
+1.7.9.5
+
diff --git a/recipes-multimedia/pulseaudio/pulseaudio/imx/pulseaudio-remove-the-control-for-speaker-headphone-widge.patch b/recipes-multimedia/pulseaudio/pulseaudio/imx-nxp-bsp/0100-pulseaudio-remove-the-control-for-speaker-headphone-widge.patch
index 019f9ba4..57c28741 100644
--- a/recipes-multimedia/pulseaudio/pulseaudio/imx/pulseaudio-remove-the-control-for-speaker-headphone-widge.patch
+++ b/recipes-multimedia/pulseaudio/pulseaudio/imx-nxp-bsp/0100-pulseaudio-remove-the-control-for-speaker-headphone-widge.patch
@@ -1,4 +1,4 @@
-From 015e048d3662b9f82e9aa5cd04d7c9de4eadb68d Mon Sep 17 00:00:00 2001
+From 33022867d76c91fe4e60699c1b7ebbc8feb4ee93 Mon Sep 17 00:00:00 2001
From: Shengjiu Wang <shengjiu.wang@freescale.com>
Date: Mon, 30 Mar 2015 10:26:14 +0800
Subject: [PATCH] pulseaudio: remove the control for speaker/headphone widget
@@ -12,15 +12,15 @@ Upstream-Status: Inappropriate [i.MX specific]
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
---
- .../alsa/mixer/paths/analog-output-headphones.conf | 8 ++++----
- .../alsa/mixer/paths/analog-output-speaker.conf | 8 ++++----
+ .../alsa/mixer/paths/analog-output-headphones.conf | 8 ++++----
+ src/modules/alsa/mixer/paths/analog-output-speaker.conf | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/modules/alsa/mixer/paths/analog-output-headphones.conf b/src/modules/alsa/mixer/paths/analog-output-headphones.conf
-index b6ee70b..a617976 100644
+index 88907f0..7598d2f 100644
--- a/src/modules/alsa/mixer/paths/analog-output-headphones.conf
+++ b/src/modules/alsa/mixer/paths/analog-output-headphones.conf
-@@ -81,8 +81,8 @@ override-map.2 = all-left,all-right
+@@ -88,8 +88,8 @@ override-map.2 = all-left,all-right
[Element Headphone]
required-any = any
@@ -31,7 +31,7 @@ index b6ee70b..a617976 100644
override-map.1 = all
override-map.2 = all-left,all-right
-@@ -105,8 +105,8 @@ switch = mute
+@@ -119,8 +119,8 @@ switch = mute
volume = zero
[Element Speaker]
@@ -43,10 +43,10 @@ index b6ee70b..a617976 100644
[Element Desktop Speaker]
switch = off
diff --git a/src/modules/alsa/mixer/paths/analog-output-speaker.conf b/src/modules/alsa/mixer/paths/analog-output-speaker.conf
-index 39193dd..34bbb85 100644
+index fcf2f5c..6f6f898 100644
--- a/src/modules/alsa/mixer/paths/analog-output-speaker.conf
+++ b/src/modules/alsa/mixer/paths/analog-output-speaker.conf
-@@ -73,8 +73,8 @@ volume = off
+@@ -91,8 +91,8 @@ volume = off
; This profile path is intended to control the speaker, let's mute headphones
; else there will be a spike when plugging in headphones
[Element Headphone]
@@ -55,9 +55,9 @@ index 39193dd..34bbb85 100644
+switch = on
+volume = ignore
- [Element Headphone2]
+ [Element Headphone,1]
switch = off
-@@ -93,8 +93,8 @@ override-map.2 = all-left,all-right
+@@ -115,8 +115,8 @@ override-map.2 = all-left,all-right
[Element Speaker]
required-any = any
@@ -69,5 +69,5 @@ index 39193dd..34bbb85 100644
override-map.2 = all-left,all-right
--
-1.7.9.5
+2.20.1
diff --git a/recipes-multimedia/pulseaudio/pulseaudio/imx/daemon.conf b/recipes-multimedia/pulseaudio/pulseaudio/imx-nxp-bsp/daemon.conf
index 9eb954bb..b9f533a0 100644
--- a/recipes-multimedia/pulseaudio/pulseaudio/imx/daemon.conf
+++ b/recipes-multimedia/pulseaudio/pulseaudio/imx-nxp-bsp/daemon.conf
@@ -76,6 +76,8 @@ rlimit-rttime = 4000000
; default-sample-format = s16le
; default-sample-rate = 44100
; alternate-sample-rate = 48000
+# Disable alternate-sample-rate by setting same as default
+alternate-sample-rate = 44100
; default-sample-channels = 2
; default-channel-map = front-left,front-right
diff --git a/recipes-multimedia/pulseaudio/pulseaudio/imx/default.pa b/recipes-multimedia/pulseaudio/pulseaudio/imx-nxp-bsp/default.pa
index 83a6ba8d..b6c646b9 100644
--- a/recipes-multimedia/pulseaudio/pulseaudio/imx/default.pa
+++ b/recipes-multimedia/pulseaudio/pulseaudio/imx-nxp-bsp/default.pa
@@ -72,7 +72,7 @@ load-module module-bluetooth-policy
.endif
.ifexists module-bluetooth-discover.so
-load-module module-bluetooth-discover
+load-module module-bluetooth-discover headset=auto
.endif
### Load several protocols
diff --git a/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend b/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend
index 78a17864..93f71e8f 100644
--- a/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend
+++ b/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend
@@ -1,21 +1,29 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}/imx-nxp-bsp:"
-CACHED_CONFIGUREVARS_append_mx6 = " ax_cv_PTHREAD_PRIO_INHERIT=no"
+SRC_URI += "${SRC_URI_IMX}"
+SRC_URI_IMX = ""
+SRC_URI_IMX:mx6-nxp-bsp = " \
+ file://0001-Fix-pulseaudio-mutex-issue-when-do-pause-in-gstreame.patch \
+ file://daemon.conf \
+ file://default.pa"
+SRC_URI_IMX:mx7-nxp-bsp = " \
+ ${SRC_URI_IMX:mx6-nxp-bsp} \
+ file://0100-pulseaudio-remove-the-control-for-speaker-headphone-widge.patch"
+SRC_URI_IMX:mx8-nxp-bsp = " \
+ ${SRC_URI_IMX:mx6-nxp-bsp}"
+SRC_URI_IMX:mx9-nxp-bsp = " \
+ ${SRC_URI_IMX:mx6-nxp-bsp}"
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}/imx:"
+CACHED_CONFIGUREVARS:append:mx6-nxp-bsp = " ax_cv_PTHREAD_PRIO_INHERIT=no"
-SRC_URI_append_mx6 = " file://daemon.conf file://default.pa"
-SRC_URI_append_mx7 = " file://daemon.conf file://default.pa \
- file://pulseaudio-remove-the-control-for-speaker-headphone-widge.patch \
-"
-SRC_URI_append_mx8 = " file://daemon.conf file://default.pa"
-
-do_install_append() {
+do_install:append() {
if [ -e "${WORKDIR}/daemon.conf" ] && [ -e "${WORKDIR}/default.pa" ]; then
install -m 0644 ${WORKDIR}/daemon.conf ${D}${sysconfdir}/pulse/daemon.conf
install -m 0644 ${WORKDIR}/default.pa ${D}${sysconfdir}/pulse/default.pa
fi
}
-PACKAGE_ARCH_mx6 = "${MACHINE_SOCARCH}"
-PACKAGE_ARCH_mx7 = "${MACHINE_SOCARCH}"
-PACKAGE_ARCH_mx8 = "${MACHINE_SOCARCH}"
+PACKAGE_ARCH:mx6-nxp-bsp = "${MACHINE_SOCARCH}"
+PACKAGE_ARCH:mx7-nxp-bsp = "${MACHINE_SOCARCH}"
+PACKAGE_ARCH:mx8-nxp-bsp = "${MACHINE_SOCARCH}"
+PACKAGE_ARCH:mx9-nxp-bsp = "${MACHINE_SOCARCH}"
diff --git a/recipes-multimedia/tinycompress/tinycompress/0001-tinycompress-Add-id3-decoding.patch b/recipes-multimedia/tinycompress/tinycompress/0001-tinycompress-Add-id3-decoding.patch
new file mode 100755
index 00000000..78ff6989
--- /dev/null
+++ b/recipes-multimedia/tinycompress/tinycompress/0001-tinycompress-Add-id3-decoding.patch
@@ -0,0 +1,1002 @@
+From 16f6b7a5baec41f18fde75fd311fb988e3c31810 Mon Sep 17 00:00:00 2001
+From: Shengjiu Wang <shengjiu.wang@nxp.com>
+Date: Fri, 13 Jul 2018 18:13:24 +0800
+Subject: [PATCH] tinycompress: Add id3 decoding
+
+Upstream-Status: Pending
+Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
+---
+ include/tinycompress/id3_tag_decode.h | 198 +++++++++++
+ src/utils/Makefile.am | 2 +-
+ src/utils/cplay.c | 88 +++++
+ src/utils/id3_tag_decode.c | 642 ++++++++++++++++++++++++++++++++++
+ 4 files changed, 929 insertions(+), 1 deletion(-)
+ create mode 100644 include/tinycompress/id3_tag_decode.h
+ create mode 100644 src/utils/id3_tag_decode.c
+
+diff --git a/include/tinycompress/id3_tag_decode.h b/include/tinycompress/id3_tag_decode.h
+new file mode 100644
+index 0000000..1a911d7
+--- /dev/null
++++ b/include/tinycompress/id3_tag_decode.h
+@@ -0,0 +1,198 @@
++/*
++ * Copyright (c) 2006-2017 Cadence Design Systems, Inc.
++ * Copyright 2018 NXP
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining
++ * a copy of this software and associated documentation files (the
++ * "Software"), to deal in the Software without restriction, including
++ * without limitation the rights to use, copy, modify, merge, publish,
++ * distribute, sublicense, and/or sell copies of the Software, and to
++ * permit persons to whom the Software is furnished to do so, subject to
++ * the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included
++ * in all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
++ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
++ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
++ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
++ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
++ */
++
++/******************************************************************
++ * file name : id3_tag_decode.h
++ *
++ * description : stores typedefs of structures specific to MP3 tag
++ *
++ * revision history:
++ * 29 04 2004 DK creation
++ *****************************************************************/
++
++#ifndef ID3_TAG_DECODE_H
++#define ID3_TAG_DECODE_H
++
++typedef signed char WORD8;
++typedef signed char * pWORD8;
++typedef unsigned char UWORD8;
++typedef unsigned char * pUWORD8;
++
++typedef signed short WORD16;
++typedef signed short * pWORD16;
++typedef unsigned short UWORD16;
++typedef unsigned short * pUWORD16;
++
++typedef signed int WORD24;
++typedef signed int * pWORD24;
++typedef unsigned int UWORD24;
++typedef unsigned int * pUWORD24;
++
++typedef signed int WORD32;
++typedef signed int * pWORD32;
++typedef unsigned int UWORD32;
++typedef unsigned int * pUWORD32;
++
++typedef void VOID;
++typedef void * pVOID;
++
++typedef signed int BOOL;
++typedef unsigned int UBOOL;
++typedef signed int FLAG;
++typedef unsigned int UFLAG;
++typedef signed int LOOPIDX;
++typedef unsigned int ULOOPIDX;
++typedef signed int WORD;
++typedef unsigned int UWORD;
++
++#define MAX_TAG_FRAME_SIZE 100
++
++#define ID3V1 (0x544147) /* 0x544147 is TAG in WORD8 */
++
++#define ID3V2 (0x494433) /* 0x494433 is ID3 in WORD8 */
++
++/*
++ * structure corresponding to ID3 tag v1 header.
++ * this structure has all the field corresponding to ID3 tag v1 header.
++ */
++
++typedef struct {
++ WORD32 tag; // 3 bytes
++
++ WORD16 version; // 2 bytes
++
++ WORD8 flag; //1 byte
++
++ WORD32 size; //4 bytes
++
++} id3_v2_header_struct;
++
++/* structure which will store the frame data and
++ * also put a limit max data to be stored
++ */
++typedef struct {
++ WORD8 frame_data[MAX_TAG_FRAME_SIZE];
++
++ WORD32 max_size; //4 bytes
++
++ WORD16 tag_present;
++
++ WORD16 exceeds_buffer_size;
++
++} id3_v2_frame_struct;
++
++/*
++ * structure corresponding to ID3 tag v2.
++ * this structure has some of the field corresponding to ID3 tag v2.
++ * if user wants to read some more tag information from
++ * the MP3 file, he can add that field in this structure and pass address
++ * of that element to get_inf function in id3_tag_decode.c under the
++ * corresponding field frame header. few fields which are needed are already
++ * populated by reading from the TAG header.
++ */
++typedef struct {
++ id3_v2_frame_struct album_movie_show_title;
++
++ id3_v2_frame_struct composer_name;
++
++ id3_v2_frame_struct content_type;
++
++ id3_v2_frame_struct encoded_by;
++
++ id3_v2_frame_struct lyricist_text_writer;
++
++ id3_v2_frame_struct content_group_description;
++
++ id3_v2_frame_struct title_songname_content_description;
++
++ id3_v2_frame_struct medxa_type;
++
++ id3_v2_frame_struct original_album_movie_show_title;
++
++ id3_v2_frame_struct original_filename;
++
++ id3_v2_frame_struct original_lyricist_text_writer;
++
++ id3_v2_frame_struct original_artist_performer;
++
++ id3_v2_frame_struct file_owner_licensee;
++
++ id3_v2_frame_struct lead_performer_soloist;
++
++ id3_v2_frame_struct publisher;
++
++ id3_v2_frame_struct private_frame;
++
++ id3_v2_frame_struct other_info;
++
++ id3_v2_header_struct id3_v2_header;
++
++ WORD32 header_end;
++
++ WORD32 bytes_consumed;
++
++} id3v2_struct;
++
++/*
++ * structure corresponding to ID3 tag v1.
++ * this structure has all the field corresponding to ID3 tag v1.
++ */
++typedef struct {
++ WORD8 song_title[30]; //30 word8acters
++
++ WORD8 artist[30]; //30 word8acters
++
++ WORD8 album[30]; //30 word8acters
++
++ WORD8 year[4]; //4 word8acters
++
++ WORD8 comment[30]; //30 word8acters
++
++ WORD8 genre[1]; //1 byte
++
++} id3v1_struct;
++
++WORD32 get_info(const char *inp_buffer,
++ unsigned int avail_inp,
++ WORD32 tag_size,
++ id3_v2_frame_struct *dest);
++
++WORD32 search_id3_v2(UWORD8 *buffer);
++
++WORD32 decode_id3_v2(const char *const buffer,
++ id3v2_struct *id3v2,
++ WORD32 continue_flag,
++ WORD32 insize);
++
++WORD32 get_id3_v2_bytes(UWORD8 *buffer);
++
++WORD32 get_v1_info(UWORD8 *buffer, id3v1_struct *id3v1);
++
++WORD32 search_id3_v1(UWORD8 *buffer);
++
++WORD32 decode_id3_v1(UWORD8 *buffer, id3v1_struct *id3v1);
++
++void init_id3v2_field(id3v2_struct *id3v2);
++
++#endif
+diff --git a/src/utils/Makefile.am b/src/utils/Makefile.am
+index 1b996d4..e813689 100644
+--- a/src/utils/Makefile.am
++++ b/src/utils/Makefile.am
+@@ -1,6 +1,6 @@
+ bin_PROGRAMS = cplay crecord
+
+-cplay_SOURCES = cplay.c
++cplay_SOURCES = cplay.c id3_tag_decode.c
+ crecord_SOURCES = crecord.c
+
+ cplay_CFLAGS = -I$(top_srcdir)/include
+diff --git a/src/utils/cplay.c b/src/utils/cplay.c
+index 87863a3..2a52b52 100644
+--- a/src/utils/cplay.c
++++ b/src/utils/cplay.c
+@@ -72,6 +72,7 @@
+ #include "sound/compress_params.h"
+ #include "tinycompress/tinycompress.h"
+ #include "tinycompress/tinymp3.h"
++#include "tinycompress/id3_tag_decode.h"
+
+ static int verbose;
+ static const unsigned int DEFAULT_CODEC_ID = SND_AUDIOCODEC_PCM;
+@@ -245,12 +246,97 @@ int main(int argc, char **argv)
+ exit(EXIT_SUCCESS);
+ }
+
++void shift_buffer(char *buf, int buf_size, int bytes_consumed)
++{
++ int i;
++
++ if (bytes_consumed <= 0)
++ return;
++
++ for (i = 0; i < buf_size - bytes_consumed; i++)
++ buf[i] = buf[i + bytes_consumed];
++}
++
++void parse_id3(FILE *file, int *offset) {
++ /* ID3 tag specific declarations */
++ unsigned char id3_buf[128];
++ unsigned char id3v2_buf[4096];
++ signed int id3_v1_found = 0, id3_v1_decoded = 0;
++ signed int id3_v2_found = 0, id3_v2_complete = 0;
++ signed int i_bytes_consumed = 0;
++ signed int i_fread_bytes;
++ id3v1_struct id3v1;
++ id3v2_struct id3v2;
++
++ {
++ fseek(file, -128, SEEK_END);
++ fread(id3_buf, 1, 128, file);
++
++ /* search for ID3V1 */
++ id3_v1_found = search_id3_v1(id3_buf + 0);
++ if (id3_v1_found) {
++ /* if ID3V1 is found, decode ID3V1 */
++ decode_id3_v1(id3_buf + 3, &id3v1);
++ id3_v1_decoded = 1;
++ }
++ fseek(file, 0, SEEK_SET);
++ }
++
++ {
++ signed int flag = 0;
++ signed int continue_flag = 0;
++
++ i_fread_bytes = fread(id3v2_buf,
++ sizeof(char), 0x1000, file);
++
++ /* search for ID3V2 */
++ id3_v2_found =
++ search_id3_v2(id3v2_buf);
++
++ if (id3_v2_found) {
++ /* initialise the max fields */
++ init_id3v2_field(&id3v2);
++
++ while (!id3_v2_complete && id3_v2_found) {
++ /* if ID3V2 is found, decode ID3V2 */
++ id3_v2_complete = decode_id3_v2((const char *const)id3v2_buf,
++ &id3v2, continue_flag, i_fread_bytes);
++
++ if (!id3_v2_complete) {
++ continue_flag = 1;
++ i_bytes_consumed = id3v2.bytes_consumed;
++
++ fseek(file, i_bytes_consumed, SEEK_SET);
++
++ i_fread_bytes = fread(id3v2_buf,
++ sizeof(unsigned char), 0x1000, file);
++ if (i_fread_bytes <= 0) {
++ return;
++ }
++ }
++ }
++
++ if (id3_v2_complete) {
++ i_bytes_consumed = id3v2.bytes_consumed;
++ fseek(file, i_bytes_consumed, SEEK_SET);
++ }
++ }
++ }
++
++ *offset = i_bytes_consumed;
++}
++
+ void get_codec_mp3(FILE *file, struct compr_config *config,
+ struct snd_codec *codec)
+ {
+ size_t read;
+ struct mp3_header header;
+ unsigned int channels, rate, bits;
++ int offset = 0;
++
++ parse_id3(file, &offset);
++
++ fseek(file, offset, SEEK_SET);
+
+ read = fread(&header, 1, sizeof(header), file);
+ if (read != sizeof(header)) {
+@@ -279,6 +365,8 @@ void get_codec_mp3(FILE *file, struct compr_config *config,
+ codec->level = 0;
+ codec->ch_mode = 0;
+ codec->format = 0;
++
++ fseek(file, offset, SEEK_SET);
+ }
+
+ void get_codec_iec(FILE *file, struct compr_config *config,
+diff --git a/src/utils/id3_tag_decode.c b/src/utils/id3_tag_decode.c
+new file mode 100644
+index 0000000..393967a
+--- /dev/null
++++ b/src/utils/id3_tag_decode.c
+@@ -0,0 +1,642 @@
++/*
++ * Copyright (c) 2006-2017 Cadence Design Systems, Inc.
++ * Copyright 2018 NXP
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining
++ * a copy of this software and associated documentation files (the
++ * "Software"), to deal in the Software without restriction, including
++ * without limitation the rights to use, copy, modify, merge, publish,
++ * distribute, sublicense, and/or sell copies of the Software, and to
++ * permit persons to whom the Software is furnished to do so, subject to
++ * the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included
++ * in all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
++ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
++ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
++ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
++ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
++ */
++#include <ctype.h>
++#include "tinycompress/id3_tag_decode.h"
++
++#define CHAR4(c1, c2, c3, c4) \
++ (int)(((unsigned char)(c1) << 24) | \
++ ((unsigned char)(c2) << 16) | \
++ ((unsigned char)(c3) << 8) | \
++ ((unsigned char)c4))
++
++#ifndef MSVC_BUILD
++unsigned int umin(unsigned int a, unsigned int b)
++{
++ return (a < b ? a : b);
++}
++
++#else
++unsigned int umin(unsigned int a, unsigned int b)
++{
++ return (a < b ? a : b);
++}
++#endif
++
++/***********************************************************
++ * function name : display
++ *
++ * description : display ID3 tag contents.
++ *
++ * arguments : input parameters
++ *
++ * values returned : 0
++ ***********************************************************/
++
++static void display2(const id3_v2_frame_struct * const src,
++ int size,
++ const char * const disp)
++{
++ int j;
++
++
++ for (j = 0; j < size; j++) {
++ int c = src->frame_data[j];
++
++ if (c) {
++ if (!isprint(c))
++ break;
++ }
++ }
++}
++
++static VOID display1(WORD8 src[], WORD32 size, WORD8 disp[])
++{
++ WORD32 j;
++
++ for (j = 0; j < size ; j++) {
++ int c = src[j];
++
++ if (c) {
++ if (!isprint(c))
++ break;
++ }
++ }
++}
++
++/*****************************************************************
++ * function name : init_id3_header
++ *
++ * description : initialise the max filed size of teh farem.
++ *
++ * arguments : input parameters
++ *
++ * values returned : 0
++ ****************************************************************/
++
++VOID init_id3v2_field(id3v2_struct *id3v2)
++{
++ id3v2->album_movie_show_title.max_size = MAX_TAG_FRAME_SIZE;
++ id3v2->composer_name.max_size = MAX_TAG_FRAME_SIZE;
++ id3v2->content_type.max_size = MAX_TAG_FRAME_SIZE;
++ id3v2->encoded_by.max_size = MAX_TAG_FRAME_SIZE;
++ id3v2->lyricist_text_writer.max_size = MAX_TAG_FRAME_SIZE;
++ id3v2->content_group_description.max_size = MAX_TAG_FRAME_SIZE;
++ id3v2->title_songname_content_description.max_size = MAX_TAG_FRAME_SIZE;
++ id3v2->medxa_type.max_size = MAX_TAG_FRAME_SIZE;
++ id3v2->original_album_movie_show_title.max_size = MAX_TAG_FRAME_SIZE;
++ id3v2->original_filename.max_size = MAX_TAG_FRAME_SIZE;
++ id3v2->original_lyricist_text_writer.max_size = MAX_TAG_FRAME_SIZE;
++ id3v2->original_artist_performer.max_size = MAX_TAG_FRAME_SIZE;
++ id3v2->file_owner_licensee.max_size = MAX_TAG_FRAME_SIZE;
++ id3v2->lead_performer_soloist.max_size = MAX_TAG_FRAME_SIZE;
++ id3v2->publisher.max_size = MAX_TAG_FRAME_SIZE;
++ id3v2->private_frame.max_size = MAX_TAG_FRAME_SIZE;
++ id3v2->other_info.max_size = MAX_TAG_FRAME_SIZE;
++
++ /* resetting the flag to indicate presese of frame */
++ id3v2->album_movie_show_title.tag_present = 0;
++ id3v2->composer_name.tag_present = 0;
++ id3v2->content_type.tag_present = 0;
++ id3v2->encoded_by.tag_present = 0;
++ id3v2->lyricist_text_writer.tag_present = 0;
++ id3v2->content_group_description.tag_present = 0;
++ id3v2->title_songname_content_description.tag_present = 0;
++ id3v2->medxa_type.tag_present = 0;
++ id3v2->original_album_movie_show_title.tag_present = 0;
++ id3v2->original_filename.tag_present = 0;
++ id3v2->original_lyricist_text_writer.tag_present = 0;
++ id3v2->original_artist_performer.tag_present = 0;
++ id3v2->file_owner_licensee.tag_present = 0;
++ id3v2->lead_performer_soloist.tag_present = 0;
++ id3v2->publisher.tag_present = 0;
++ id3v2->private_frame.tag_present = 0;
++ id3v2->other_info.tag_present = 0;
++
++ /* resetting the flag which indicates that size of the frame has
++ * exceeded the max buffer size
++ */
++ id3v2->album_movie_show_title.exceeds_buffer_size = 0;
++ id3v2->composer_name.exceeds_buffer_size = 0;
++ id3v2->content_type.exceeds_buffer_size = 0;
++ id3v2->encoded_by.exceeds_buffer_size = 0;
++ id3v2->lyricist_text_writer.exceeds_buffer_size = 0;
++ id3v2->content_group_description.exceeds_buffer_size = 0;
++ id3v2->title_songname_content_description.exceeds_buffer_size = 0;
++ id3v2->medxa_type.exceeds_buffer_size = 0;
++ id3v2->original_album_movie_show_title.exceeds_buffer_size = 0;
++ id3v2->original_filename.exceeds_buffer_size = 0;
++ id3v2->original_lyricist_text_writer.exceeds_buffer_size = 0;
++ id3v2->original_artist_performer.exceeds_buffer_size = 0;
++ id3v2->file_owner_licensee.exceeds_buffer_size = 0;
++ id3v2->lead_performer_soloist.exceeds_buffer_size = 0;
++ id3v2->publisher.exceeds_buffer_size = 0;
++ id3v2->private_frame.exceeds_buffer_size = 0;
++ id3v2->other_info.exceeds_buffer_size = 0;
++
++ id3v2->bytes_consumed = 0;
++ id3v2->header_end = 0;
++}
++
++/***************************************************************
++ * function name : search_id3_v2
++ *
++ * description : finds if ID3V2 starts at the start of given buffer.
++ *
++ * arguments : input parameters
++ * buffer input buffer
++ *
++ * values returned : FLAG 1: ID3 found 0: ID3 not found
++ ***************************************************************/
++WORD32 search_id3_v2(UWORD8 *buffer)
++{
++ UWORD32 temp;
++
++ temp = buffer[0] << 16;
++ temp |= buffer[1] << 8;
++ temp |= buffer[2];
++
++ if (temp == ID3V2)
++ return 1; /* ID3 found */
++
++ return 0; /* ID3 not found */
++}
++
++/**************************************************************
++ * function name : search_id3_v1
++ *
++ * description : finds if ID3V1 starts at the start of given buffer.
++ *
++ * arguments : input parameters
++ * buffer input buffer
++ *
++ * values returned : FLAG 1: ID3 found 0: ID3 not found
++ **************************************************************/
++WORD32 search_id3_v1(UWORD8 *buffer)
++{
++ UWORD32 temp;
++
++ temp = buffer[0] << 16;
++ temp |= buffer[1] << 8;
++ temp |= buffer[2];
++
++ if (temp == ID3V1)
++ return 1; /* ID3 found */
++
++ return 0; /* ID3 not found */
++}
++
++/***************************************************************
++ * function name : decode_id3_v1
++ *
++ * description : decodes ID3V1 tag.
++ *
++ * arguments : input parameters
++ * buffer input buffer
++ * id3v1 structure
++ *
++ * values returned : bytes consumed
++ **************************************************************/
++WORD32 decode_id3_v1(UWORD8 *buffer, id3v1_struct *id3v1)
++{
++ WORD32 bytes_consumed = 0;
++ short tag_type;
++
++ /* setting the tag type */
++ tag_type = 1;
++
++ bytes_consumed = get_v1_info(buffer, id3v1);
++
++ return bytes_consumed;
++}
++
++/***********************************************************
++ * function name : get_v1_info
++ *
++ * description : gets ID3V1 information fields.
++ *
++ * arguments : input parameters
++ * buffer input buffer
++ * id3v1 structure
++ *
++ * values returned : bytes consumed
++ ***********************************************************/
++WORD32 get_v1_info(UWORD8 *buffer, id3v1_struct *id3v1)
++{
++ WORD32 i;
++ WORD32 bytes_consumed = 0;
++
++ /* get song_title */
++ for (i = 0; i < 30; i++)
++ id3v1->song_title[i] = buffer[i];
++
++ buffer += 30;
++ bytes_consumed += 30;
++ display1(id3v1->song_title, 30, (WORD8 *)"song_title : ");
++
++ /* get artist */
++ for (i = 0; i < 30; i++)
++ id3v1->artist[i] = buffer[i];
++
++ buffer += 30;
++ bytes_consumed += 30;
++ display1(id3v1->artist, 30, (WORD8 *)"artist : ");
++
++ /* get album */
++ for (i = 0; i < 30; i++)
++ id3v1->album[i] = buffer[i];
++
++ buffer += 30;
++ bytes_consumed += 30;
++ display1(id3v1->album, 30, (WORD8 *)"album : ");
++
++ /* get year */
++ for (i = 0; i < 4; i++)
++ id3v1->year[i] = buffer[i];
++
++ buffer += 4;
++ bytes_consumed += 4;
++ display1(id3v1->year, 4, (WORD8 *)"year : ");
++
++ /* get comment */
++ for (i = 0; i < 30; i++)
++ id3v1->comment[i] = buffer[i];
++
++ buffer += 30;
++ bytes_consumed += 30;
++ display1(id3v1->comment, 30, (WORD8 *)"comment : ");
++
++ /* get genre */
++ for (i = 0; i < 1; i++)
++ id3v1->genre[i] = buffer[i];
++
++ buffer += 1;
++ bytes_consumed += 1;
++
++ return bytes_consumed;
++}
++
++/*****************************************************
++ * function name : decode_id3_v2
++ *
++ * description : decodes ID3V2 tag.
++ *
++ * arguments : input parameters
++ * buffer input buffer
++ * id3v2 structure
++ * continue_flag FLAG to indicate whether
++ * it is first call or not
++ * insize input buffer size
++ *
++ * values returned : bytes consumed
++ ******************************************************/
++WORD32 decode_id3_v2(const char *const buffer,
++ id3v2_struct *const id3v2,
++ WORD32 continue_flag,
++ WORD32 insize)
++{
++ UWORD32 size = 0, flag;
++ WORD32 i, buf_update_val;
++ UWORD8 buf[4], frame_header[10], id3_buffer[10];
++ WORD8 *bitstream_ptr;
++ short tag_type;
++
++ WORD32 bytes_consumed = 0;
++
++ if (id3v2->header_end == 1) {
++ id3v2->bytes_consumed += insize;
++ if (id3v2->bytes_consumed < id3v2->id3_v2_header.size)
++ return 0;
++
++ id3v2->bytes_consumed = (id3v2->id3_v2_header.size + 10);
++ return 1;
++ }
++
++ bitstream_ptr = (WORD8 *)id3_buffer;
++
++ if (!continue_flag) {
++ bytes_consumed += 3;
++ /* setting the tag type */
++ tag_type = 2;
++ id3v2->id3_v2_header.version = buffer[bytes_consumed + 0] << 8;
++ id3v2->id3_v2_header.version |= buffer[bytes_consumed + 1];
++ id3v2->id3_v2_header.flag = buffer[bytes_consumed + 2];
++
++ /* making the msb of each byte zero */
++ buf[0] = buffer[bytes_consumed + 6] & 0x7f;
++ buf[1] = buffer[bytes_consumed + 5] & 0x7f;
++ buf[2] = buffer[bytes_consumed + 4] & 0x7f;
++ buf[3] = buffer[bytes_consumed + 3] & 0x7f;
++
++ bytes_consumed += 7;
++
++ /* concatenation the bytes after making
++ * 7th bit zero to get 28 bits size
++ */
++ size = buf[0];
++ size |= (buf[1] << 7);
++ size |= (buf[2] << 14);
++ size |= (buf[3] << 21);
++ /* storing the size */
++ id3v2->id3_v2_header.size = size;
++
++ /* check for extended header */
++ if (id3v2->id3_v2_header.flag & 0x20) {
++ for (i = 0; i < 10; i++)
++ bitstream_ptr[i] = buffer[bytes_consumed + i];
++
++ i = 0;
++ bytes_consumed += 10;
++
++ size = bitstream_ptr[i++] << 24;
++ size |= bitstream_ptr[i++] << 16;
++ size |= bitstream_ptr[i++] << 8;
++ size |= bitstream_ptr[i++];
++
++ /* two bytes for flag */
++ i += 2;
++ {
++ UWORD32 padding_size;
++
++ padding_size = bitstream_ptr[i++] << 24;
++ padding_size |= bitstream_ptr[i++] << 16;
++ padding_size |= bitstream_ptr[i++] << 8;
++ padding_size |= bitstream_ptr[i++];
++
++ /* skipping the padding and frame size
++ * number of bytes
++ */
++ bytes_consumed += (padding_size + size);
++ }
++ }
++ }
++
++ while (id3v2->header_end != 1) {
++ char *key;
++ id3_v2_frame_struct *value;
++ unsigned int avail_inp;
++
++ /* reading the 10 bytes to get the frame header */
++
++ for (i = 0; i < 10; i++)
++ frame_header[i] = buffer[bytes_consumed + i];
++ bytes_consumed += 10;
++
++ /* getting the size from the header */
++ size = frame_header[4] << 24;
++ size |= frame_header[5] << 16;
++ size |= frame_header[6] << 8;
++ size |= frame_header[7];
++
++ /* decoding the flag, currently not used */
++ flag = frame_header[8] << 8;
++ flag |= frame_header[9];
++
++ avail_inp = insize - bytes_consumed;
++
++ /* switching to the frame type */
++ switch (CHAR4(frame_header[0],
++ frame_header[1],
++ frame_header[2],
++ frame_header[3])) {
++ case CHAR4('A', 'E', 'N', 'C'):
++ case CHAR4('A', 'P', 'I', 'C'):
++ case CHAR4('C', 'O', 'M', 'M'):
++ case CHAR4('C', 'O', 'M', 'R'):
++ case CHAR4('E', 'N', 'C', 'R'):
++ case CHAR4('E', 'Q', 'U', 'A'):
++ case CHAR4('E', 'T', 'C', 'O'):
++ case CHAR4('G', 'E', 'O', 'B'):
++ case CHAR4('G', 'R', 'I', 'D'):
++ case CHAR4('I', 'P', 'L', 'S'):
++ case CHAR4('L', 'I', 'N', 'K'):
++ case CHAR4('M', 'C', 'D', 'I'):
++ case CHAR4('M', 'L', 'L', 'T'):
++ case CHAR4('O', 'W', 'N', 'E'):
++ case CHAR4('P', 'C', 'N', 'T'):
++ case CHAR4('P', 'O', 'P', 'M'):
++ case CHAR4('P', 'O', 'S', 'S'):
++ case CHAR4('R', 'B', 'U', 'F'):
++ case CHAR4('R', 'V', 'A', 'D'):
++ case CHAR4('R', 'V', 'R', 'B'):
++ case CHAR4('S', 'Y', 'L', 'T'):
++ case CHAR4('S', 'Y', 'T', 'C'):
++ case CHAR4('T', 'B', 'P', 'M'):
++ case CHAR4('T', 'C', 'O', 'P'):
++ case CHAR4('T', 'D', 'A', 'T'):
++ case CHAR4('T', 'D', 'L', 'Y'):
++ case CHAR4('T', 'F', 'L', 'T'):
++ case CHAR4('T', 'I', 'M', 'E'):
++ case CHAR4('T', 'K', 'E', 'Y'):
++ case CHAR4('T', 'L', 'A', 'N'):
++ case CHAR4('T', 'L', 'E', 'N'):
++ case CHAR4('T', 'M', 'E', 'D'):
++ case CHAR4('T', 'O', 'F', 'N'):
++ case CHAR4('T', 'O', 'L', 'Y'):
++ case CHAR4('T', 'O', 'R', 'Y'):
++ case CHAR4('T', 'P', 'E', '2'):
++ case CHAR4('T', 'P', 'E', '3'):
++ case CHAR4('T', 'P', 'E', '4'):
++ case CHAR4('T', 'P', 'O', 'S'):
++ case CHAR4('T', 'R', 'C', 'K'):
++ case CHAR4('T', 'R', 'D', 'A'):
++ case CHAR4('T', 'R', 'S', 'N'):
++ case CHAR4('T', 'R', 'S', 'O'):
++ case CHAR4('T', 'S', 'I', 'Z'):
++ case CHAR4('T', 'S', 'R', 'C'):
++ case CHAR4('T', 'S', 'S', 'E'):
++ case CHAR4('T', 'Y', 'E', 'R'):
++ case CHAR4('T', 'X', 'X', 'X'):
++ case CHAR4('U', 'F', 'I', 'D'):
++ case CHAR4('U', 'S', 'E', 'R'):
++ case CHAR4('U', 'S', 'L', 'T'):
++ case CHAR4('W', 'C', 'O', 'M'):
++ case CHAR4('W', 'C', 'O', 'P'):
++ case CHAR4('W', 'O', 'A', 'F'):
++ case CHAR4('W', 'O', 'A', 'R'):
++ case CHAR4('W', 'O', 'A', 'S'):
++ case CHAR4('W', 'O', 'R', 'S'):
++ case CHAR4('W', 'P', 'A', 'Y'):
++ case CHAR4('W', 'P', 'U', 'B'):
++ case CHAR4('W', 'X', 'X', 'X'):
++ case CHAR4('T', 'I', 'T', '3'):
++ key = "other_info : ";
++ value = &id3v2->other_info;
++ break;
++ case CHAR4('P', 'R', 'I', 'V'):
++ key = "private_frame : ";
++ value = &id3v2->private_frame;
++ break;
++ case CHAR4('T', 'A', 'L', 'B'):
++ key = "album_movie_show_title : ";
++ value = &id3v2->album_movie_show_title;
++ break;
++ case CHAR4('T', 'C', 'O', 'M'):
++ key = "composer_name : ";
++ value = &id3v2->composer_name;
++ break;
++ case CHAR4('T', 'C', 'O', 'N'):
++ key = "content_type : ";
++ value = &id3v2->content_type;
++ break;
++ case CHAR4('T', 'E', 'N', 'C'):
++ key = "encoded_by : ";
++ value = &id3v2->encoded_by;
++ break;
++ case CHAR4('T', 'E', 'X', 'T'):
++ key = "lyricist_text_writer : ";
++ value = &id3v2->lyricist_text_writer;
++ break;
++ case CHAR4('T', 'I', 'T', '1'):
++ key = "content_group_description : ";
++ value = &id3v2->content_group_description;
++ break;
++ case CHAR4('T', 'I', 'T', '2'):
++ key = "title_songname_content_description : ";
++ value = &id3v2->title_songname_content_description;
++ break;
++ case CHAR4('T', 'O', 'A', 'L'):
++ key = "original_album_movie_show_title : ";
++ value = &id3v2->original_album_movie_show_title;
++ break;
++ case CHAR4('T', 'O', 'P', 'E'):
++ key = "original_artist_performer : ";
++ value = &id3v2->original_artist_performer;
++ break;
++ case CHAR4('T', 'O', 'W', 'N'):
++ key = "file_owner_licensee : ";
++ value = &id3v2->file_owner_licensee;
++ break;
++ case CHAR4('T', 'P', 'E', '1'):
++ key = "lead_performer_soloist : ";
++ value = &id3v2->lead_performer_soloist;
++ break;
++ case CHAR4('T', 'P', 'U', 'B'):
++ key = "publisher : ";
++ value = &id3v2->publisher;
++ break;
++ default:
++ /* skipping the read 10 bytes */
++ buf_update_val = -10;
++ id3v2->header_end = 1;
++ value = 0;
++ key = 0;
++ break;
++ }
++
++ if (value != 0)
++ buf_update_val = get_info(&buffer[bytes_consumed],
++ avail_inp, size, value);
++
++ /* Negative value for buf_update_val means one of two things:
++ * 1. The default case happened and we're done with ID3V2 tag
++ * frames, or
++ * 2. get_info() returned -1 to indicate that more input is
++ * required to decode this frame of the tag.
++ */
++ if (buf_update_val >= 0)
++ display2(value,
++ umin(value->max_size, buf_update_val), key);
++
++ if (buf_update_val == -1) {
++ id3v2->bytes_consumed += bytes_consumed;
++ return 1;
++ }
++
++ bytes_consumed += buf_update_val;
++
++ /* Is there enough input left (10 bytes) to begin
++ * decoding another frame? If not, bag out temporarily
++ * now. The caller will refill our input buffer and
++ * call us again with continue_flag == 1.
++ */
++ if (insize - bytes_consumed < 10) {
++ id3v2->bytes_consumed += bytes_consumed;
++ return 0; /* not completely decoded */
++ }
++ }
++
++ id3v2->bytes_consumed += bytes_consumed;
++ if ((id3v2->bytes_consumed + 10) < id3v2->id3_v2_header.size)
++ return 0; /* not completely decoded */
++
++ return 1; /* completely decoded */
++}
++
++/*******************************************************
++ * function name : get_id3_v2_bytes
++ *
++ * description : tells the size of ID3V2 tag.
++ *
++ * arguments : input parameters
++ * buffer input buffer
++ *
++ * values returned : bytes consumed
++ ********************************************************/
++WORD32 get_id3_v2_bytes(UWORD8 *buffer)
++{
++ WORD32 size;
++
++ /* making the msb of each byte zero */
++ size = (buffer[9] & 0x7f);
++ size |= ((buffer[8] & 0x7f) << 7);
++ size |= ((buffer[7] & 0x7f) << 14);
++ size |= ((buffer[6] & 0x7f) << 21);
++
++ return (size + 10);
++}
++
++/****************************************************
++ * function name : get_info
++ *
++ * description : read the frame information from the input buffer.
++ *
++ * arguments : input parameters
++ *
++ * values returned : update value for buffer
++ ****************************************************/
++WORD32 get_info(const char *inp_buffer,
++ unsigned int avail_inp,
++ WORD32 tag_size,
++ id3_v2_frame_struct *dest)
++{
++ WORD32 j;
++
++ /* setting the tag to indicate the presence of frame */
++ dest->tag_present = 1;
++ /* If there isn't enough input available, we punt back to the top
++ * level and ask for more.
++ */
++ if (avail_inp < umin(tag_size, dest->max_size))
++ return -1;
++
++ if (dest->max_size >= tag_size) {
++ for (j = 0; j < tag_size ; j++)
++ dest->frame_data[j] = inp_buffer[j];
++ } else {
++ dest->exceeds_buffer_size = 1;
++ for (j = 0; j < dest->max_size ; j++)
++ dest->frame_data[j] = inp_buffer[j];
++ }
++ return tag_size;
++}
+--
+2.7.4
+
diff --git a/recipes-multimedia/tinycompress/tinycompress/0002-cplay-Support-wave-file.patch b/recipes-multimedia/tinycompress/tinycompress/0002-cplay-Support-wave-file.patch
new file mode 100755
index 00000000..79544711
--- /dev/null
+++ b/recipes-multimedia/tinycompress/tinycompress/0002-cplay-Support-wave-file.patch
@@ -0,0 +1,215 @@
+From 4d4bc0a958fe254531920095fbabc241aad88113 Mon Sep 17 00:00:00 2001
+From: Shengjiu Wang <shengjiu.wang@nxp.com>
+Date: Tue, 28 Jul 2020 13:00:36 +0800
+Subject: [PATCH] cplay: Support wave file
+
+The supported format is mono/stereo, S16_LE/S32_LE, 8kHz-192kHz.
+Command is:
+cplay -c x -I PCM test.wav
+
+Upstream-Status: Inappropriate [i.MX specific]
+Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
+---
+ include/tinycompress/wave_formats.h | 51 +++++++++++++
+ src/utils/cplay.c | 107 ++++++++++++++++++++++++++++
+ 2 files changed, 158 insertions(+)
+ create mode 100644 include/tinycompress/wave_formats.h
+
+--- /dev/null
++++ b/include/tinycompress/wave_formats.h
+@@ -0,0 +1,53 @@
++#ifndef WAVE_FORMATS_H
++#define WAVE_FORMATS_H 1
++
++#include <sys/types.h>
++
++#define COMPOSE_ID(a,b,c,d) ((a) | ((b)<<8) | ((c)<<16) | ((d)<<24))
++
++#define WAV_RIFF COMPOSE_ID('R','I','F','F')
++#define WAV_RIFX COMPOSE_ID('R','I','F','X')
++#define WAV_WAVE COMPOSE_ID('W','A','V','E')
++#define WAV_FMT COMPOSE_ID('f','m','t',' ')
++#define WAV_DATA COMPOSE_ID('d','a','t','a')
++
++/* WAVE fmt block constants from Microsoft mmreg.h header */
++#define WAV_FMT_PCM 0x0001
++#define WAV_FMT_IEEE_FLOAT 0x0003
++#define WAV_FMT_DOLBY_AC3_SPDIF 0x0092
++#define WAV_FMT_EXTENSIBLE 0xfffe
++
++/* Used with WAV_FMT_EXTENSIBLE format */
++#define WAV_GUID_TAG "\x00\x00\x00\x00\x10\x00\x80\x00\x00\xAA\x00\x38\x9B\x71"
++
++typedef struct {
++ u_int magic; /* 'RIFF' */
++ u_int length; /* filelen */
++ u_int type; /* 'WAVE' */
++} WaveHeader;
++
++typedef struct {
++ u_short format; /* see WAV_FMT_* */
++ u_short channels;
++ u_int sample_fq; /* frequence of sample */
++ u_int byte_p_sec;
++ u_short byte_p_spl; /* samplesize; 1 or 2 bytes */
++ u_short bit_p_spl; /* 8, 12 or 16 bit */
++} WaveFmtBody;
++
++typedef struct {
++ WaveFmtBody format;
++ u_short ext_size;
++ u_short bit_p_spl;
++ u_int channel_mask;
++ u_short guid_format; /* WAV_FMT_* */
++ u_char guid_tag[14]; /* WAV_GUID_TAG */
++} WaveFmtExtensibleBody;
++
++typedef struct {
++ u_int type; /* 'data' */
++ u_int length; /* samplecount */
++} WaveChunkHeader;
++
++
++#endif /* FORMATS */
+--- a/src/utils/cplay.c
++++ b/src/utils/cplay.c
+@@ -1,4 +1,6 @@
+ /*
++ * Copyright 2020 NXP
++ *
+ * This file is provided under a dual BSD/LGPLv2.1 license. When using or
+ * redistributing this file, you may do so under either license.
+ *
+@@ -73,6 +75,8 @@
+ #include "tinycompress/tinycompress.h"
+ #include "tinycompress/tinymp3.h"
+ #include "tinycompress/id3_tag_decode.h"
++#include "tinycompress/wave_formats.h"
++#include <alsa/asoundlib.h>
+
+ static int verbose;
+ static const unsigned int DEFAULT_CODEC_ID = SND_AUDIOCODEC_PCM;
+@@ -166,6 +170,77 @@ static int parse_mp3_header(struct mp3_h
+ return 0;
+ }
+
++static int parse_wav_header(FILE *file, unsigned int *num_channels, unsigned int *sample_rate,
++ unsigned int *format) {
++ WaveHeader wave_header;
++ WaveChunkHeader chunk_header;
++ WaveFmtBody fmt_body;
++ int more_chunks = 1;
++
++ fread(&wave_header, sizeof(WaveHeader), 1, file);
++ if ((wave_header.magic != WAV_RIFF) ||
++ (wave_header.type != WAV_WAVE)) {
++ fprintf(stderr, "Error: it is not a riff/wave file\n");
++ return -1;
++ }
++
++ do {
++ fread(&chunk_header, sizeof(WaveChunkHeader), 1, file);
++ switch (chunk_header.type) {
++ case WAV_FMT:
++ fread(&fmt_body, sizeof(WaveFmtBody), 1, file);
++ /* If the format header is larger, skip the rest */
++ if (chunk_header.length > sizeof(WaveFmtBody))
++ fseek(file, chunk_header.length - sizeof(WaveFmtBody), SEEK_CUR);
++
++ *num_channels = fmt_body.channels;
++ *sample_rate = fmt_body.sample_fq;
++
++ switch (fmt_body.bit_p_spl) {
++ case 8:
++ *format = SND_PCM_FORMAT_U8;
++ break;
++ case 16:
++ *format = SND_PCM_FORMAT_S16_LE;
++ break;
++ case 24:
++ switch (fmt_body.byte_p_spl / fmt_body.channels) {
++ case 3:
++ *format = SND_PCM_FORMAT_S24_3LE;
++ break;
++ case 4:
++ *format = SND_PCM_FORMAT_S24_LE;
++ break;
++ default:
++ fprintf(stderr, "format error\n");
++ return -1;
++ }
++ break;
++ case 32:
++ if (fmt_body.format == WAV_FMT_PCM) {
++ *format = SND_PCM_FORMAT_S32_LE;
++ } else if (fmt_body.format == WAV_FMT_IEEE_FLOAT) {
++ *format = SND_PCM_FORMAT_FLOAT_LE;
++ }
++ break;
++ default:
++ fprintf(stderr, "format error\n");
++ return -1;
++ }
++ break;
++ case WAV_DATA:
++ /* Stop looking for chunks */
++ more_chunks = 0;
++ break;
++ default:
++ /* Unknown chunk, skip bytes */
++ fseek(file, chunk_header.length, SEEK_CUR);
++ }
++ } while (more_chunks);
++
++ return 0;
++}
++
+ static int print_time(struct compress *compress)
+ {
+ unsigned int avail;
+@@ -385,6 +460,35 @@ void get_codec_iec(FILE *file, struct co
+ codec->format = 0;
+ }
+
++void get_codec_pcm(FILE *file, struct compr_config *config,
++ struct snd_codec *codec)
++{
++ unsigned int channels, rate, format;
++
++ if (parse_wav_header(file, &channels, &rate, &format) == -1) {
++ fclose(file);
++ exit(EXIT_FAILURE);
++ }
++
++ if (channels > 2 || (format != SND_PCM_FORMAT_S16_LE && format != SND_PCM_FORMAT_S32_LE) ||
++ rate > 192000) {
++ fprintf(stderr, "unsupported wave file\n");
++ fclose(file);
++ exit(EXIT_FAILURE);
++ }
++
++ codec->id = SND_AUDIOCODEC_PCM;
++ codec->ch_in = channels;
++ codec->ch_out = channels;
++ codec->sample_rate = rate;
++ codec->bit_rate = 0;
++ codec->rate_control = 0;
++ codec->profile = SND_AUDIOPROFILE_PCM;
++ codec->level = 0;
++ codec->ch_mode = 0;
++ codec->format = format;
++}
++
+ void play_samples(char *name, unsigned int card, unsigned int device,
+ unsigned long buffer_size, unsigned int frag,
+ unsigned long codec_id)
+@@ -411,6 +515,9 @@ void play_samples(char *name, unsigned i
+ case SND_AUDIOCODEC_IEC61937:
+ get_codec_iec(file, &config, &codec);
+ break;
++ case SND_AUDIOCODEC_PCM:
++ get_codec_pcm(file, &config, &codec);
++ break;
+ default:
+ fprintf(stderr, "codec ID %ld is not supported\n", codec_id);
+ exit(EXIT_FAILURE);
diff --git a/recipes-multimedia/tinycompress/tinycompress/0003-cplay-Add-pause-feature.patch b/recipes-multimedia/tinycompress/tinycompress/0003-cplay-Add-pause-feature.patch
new file mode 100755
index 00000000..7d8492b7
--- /dev/null
+++ b/recipes-multimedia/tinycompress/tinycompress/0003-cplay-Add-pause-feature.patch
@@ -0,0 +1,146 @@
+From 6f778c21ee357a662cdd758cff578a3e4b85eedf Mon Sep 17 00:00:00 2001
+From: Zhang Peng <peng.zhang_8@nxp.com>
+Date: Tue, 4 Aug 2020 15:29:29 +0800
+Subject: [PATCH] cplay: Add pause feature
+
+Add option: -p pause
+
+Upstream-Status: Inappropriate [i.MX specific]
+Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
+---
+ src/utils/cplay.c | 56 +++++++++++++++++++++++++++++++++++++++++++----
+ 1 file changed, 52 insertions(+), 4 deletions(-)
+
+diff --git a/src/utils/cplay.c b/src/utils/cplay.c
+index 8882f4d..8e3dcbb 100644
+--- a/src/utils/cplay.c
++++ b/src/utils/cplay.c
+@@ -117,6 +117,9 @@ static void usage(void)
+ "-f\tfragments\n\n"
+ "-v\tverbose mode\n"
+ "-h\tPrints this help list\n\n"
++ "-p\tpause\n"
++ "-m\tpause blocks\n"
++ "-n\tpause time duration\n"
+ "Example:\n"
+ "\tcplay -c 1 -d 2 test.mp3\n"
+ "\tcplay -f 5 test.mp3\n\n"
+@@ -133,7 +136,8 @@ static void usage(void)
+
+ void play_samples(char *name, unsigned int card, unsigned int device,
+ unsigned long buffer_size, unsigned int frag,
+- unsigned long codec_id);
++ unsigned long codec_id, int pause_count, int pause_block,
++ int pause_duration);
+
+ struct mp3_header {
+ uint16_t sync;
+@@ -262,12 +266,15 @@ int main(int argc, char **argv)
+ int c, i;
+ unsigned int card = 0, device = 0, frag = 0;
+ unsigned int codec_id = SND_AUDIOCODEC_MP3;
++ int pause_count = 0;
++ int pause_block = 6;
++ int pause_duration = 10;
+
+ if (argc < 2)
+ usage();
+
+ verbose = 0;
+- while ((c = getopt(argc, argv, "hvb:f:c:d:I:")) != -1) {
++ while ((c = getopt(argc, argv, "hvb:f:c:d:I:p:m:n:")) != -1) {
+ switch (c) {
+ case 'h':
+ usage();
+@@ -306,6 +313,23 @@ int main(int argc, char **argv)
+ case 'v':
+ verbose = 1;
+ break;
++ case 'p':
++ pause_count = strtol(optarg, NULL, 10);
++ break;
++ case 'm':
++ pause_block = strtol(optarg, NULL, 10);
++ if (pause_duration < 0) {
++ printf("Set wrong paramter! Set duration default 6.\n");
++ pause_duration = 6;
++ }
++ break;
++ case 'n':
++ pause_duration = strtol(optarg, NULL, 10);
++ if (pause_duration < 0) {
++ printf("Set wrong paramter! Set duration default 10.\n");
++ pause_duration = 10;
++ }
++ break;
+ default:
+ exit(EXIT_FAILURE);
+ }
+@@ -315,7 +339,7 @@ int main(int argc, char **argv)
+
+ file = argv[optind];
+
+- play_samples(file, card, device, buffer_size, frag, codec_id);
++ play_samples(file, card, device, buffer_size, frag, codec_id, pause_count, pause_block, pause_duration);
+
+ fprintf(stderr, "Finish Playing.... Close Normally\n");
+ exit(EXIT_SUCCESS);
+@@ -491,7 +515,8 @@ void get_codec_pcm(FILE *file, struct compr_config *config,
+
+ void play_samples(char *name, unsigned int card, unsigned int device,
+ unsigned long buffer_size, unsigned int frag,
+- unsigned long codec_id)
++ unsigned long codec_id, int pause_count, int pause_block,
++ int pause_duration)
+ {
+ struct compr_config config;
+ struct snd_codec codec;
+@@ -499,6 +524,7 @@ void play_samples(char *name, unsigned int card, unsigned int device,
+ FILE *file;
+ char *buffer;
+ int size, num_read, wrote;
++ int write_count = 0;
+
+ if (verbose)
+ printf("%s: entry\n", __func__);
+@@ -574,6 +600,13 @@ void play_samples(char *name, unsigned int card, unsigned int device,
+ if (verbose)
+ printf("%s: You should hear audio NOW!!!\n", __func__);
+
++ if (pause_count > 0) {
++ printf("sleep...\n");
++ compress_pause(compress);
++ sleep(pause_duration);
++ compress_resume(compress);
++ }
++
+ do {
+ num_read = fread(buffer, 1, size, file);
+ if (num_read > 0) {
+@@ -592,8 +625,23 @@ void play_samples(char *name, unsigned int card, unsigned int device,
+ printf("%s: wrote %d\n", __func__, wrote);
+ }
+ }
++ write_count++;
++ if ((pause_count > 0) && (write_count % pause_block == 0)) {
++ printf("pause...\n");
++ compress_pause(compress);
++ sleep(pause_duration);
++ printf("pause release...\n");
++ compress_resume(compress);
++ pause_count--;
++ }
+ } while (num_read > 0);
+
++ if (pause_count > 0) {
++ compress_pause(compress);
++ sleep(5);
++ compress_resume(compress);
++ }
++
+ if (verbose)
+ printf("%s: exit success\n", __func__);
+ /* issue drain if it supports */
+--
+2.17.1
+
diff --git a/recipes-multimedia/tinycompress/tinycompress/0004-tinycompress-pass-NULL-buffer-with-0-size-to-driver.patch b/recipes-multimedia/tinycompress/tinycompress/0004-tinycompress-pass-NULL-buffer-with-0-size-to-driver.patch
new file mode 100755
index 00000000..dfedd186
--- /dev/null
+++ b/recipes-multimedia/tinycompress/tinycompress/0004-tinycompress-pass-NULL-buffer-with-0-size-to-driver.patch
@@ -0,0 +1,40 @@
+From a2892bf5db7520689fa9cb1d1589fa804bd9dc1a Mon Sep 17 00:00:00 2001
+From: Bing Song <bing.song@nxp.com>
+Date: Tue, 18 Aug 2020 15:26:51 +0800
+Subject: [PATCH] tinycompress: pass NULL buffer with 0 size to driver.
+
+The NULL buffer with 0 size to indecate driver drain input data with
+non-block mode. The defaul drain is block mode.
+
+Upstream-Status: Inappropriate [i.MX specific]
+Signed-off-by: Bing Song <bing.song@nxp.com>
+---
+ src/lib/compress.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/lib/compress.c b/src/lib/compress.c
+index bba4fcf..d66df0b 100644
+--- a/src/lib/compress.c
++++ b/src/lib/compress.c
+@@ -315,7 +315,8 @@ int compress_write(struct compress *compress, const void *buf, unsigned int size
+ fds.events = POLLOUT;
+
+ /*TODO: treat auto start here first */
+- while (size) {
++ /* NULL buffer with 0 size for non-block drain */
++ do {
+ if (ioctl(compress->fd, SNDRV_COMPRESS_AVAIL, &avail))
+ return oops(compress, errno, "cannot get avail");
+
+@@ -357,7 +358,7 @@ int compress_write(struct compress *compress, const void *buf, unsigned int size
+ size -= written;
+ cbuf += written;
+ total += written;
+- }
++ } while (size);
+ return total;
+ }
+
+--
+2.17.1
+
diff --git a/recipes-multimedia/tinycompress/tinycompress/0005-cplay-Support-aac-streams.patch b/recipes-multimedia/tinycompress/tinycompress/0005-cplay-Support-aac-streams.patch
new file mode 100755
index 00000000..2f36551a
--- /dev/null
+++ b/recipes-multimedia/tinycompress/tinycompress/0005-cplay-Support-aac-streams.patch
@@ -0,0 +1,251 @@
+From 2912f8573cea25fbd38ac7a8b68af2ea6a05e599 Mon Sep 17 00:00:00 2001
+From: Zhang Peng <peng.zhang_8@nxp.com>
+Date: Wed, 28 Oct 2020 19:08:53 +0800
+Subject: [PATCH] cplay: Support aac streams
+
+Support run aac format streams for cplay.
+
+Upstream-Status: Inappropriate [i.MX specific]
+Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
+---
+ src/utils/cplay.c | 210 ++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 210 insertions(+)
+
+diff --git a/src/utils/cplay.c b/src/utils/cplay.c
+index 8e3dcbb..2a1464a 100644
+--- a/src/utils/cplay.c
++++ b/src/utils/cplay.c
+@@ -245,6 +245,190 @@ static int parse_wav_header(FILE *file, unsigned int *num_channels, unsigned int
+ return 0;
+ }
+
++int find_adts_header(FILE *file, unsigned int *num_channels, unsigned int *sample_rate, unsigned int *format)
++{
++ int ret;
++ unsigned char buf[5];
++
++ ret = fread(buf, sizeof(buf), 1, file);
++ if (ret < 0) {
++ fprintf(stderr, "open file error: %d\n", ret);
++ return 0;
++ }
++ fseek(file, 0, SEEK_SET);
++
++ if ((buf[0] != 0xff) || (buf[1] & 0xf0 != 0xf0))
++ return 0;
++ /* mpeg id */
++ switch (buf[1]>>3 & 0x1) {
++ case 0x0:
++ *format = SND_AUDIOSTREAMFORMAT_MP4ADTS;
++ break;
++ case 0x1:
++ *format = SND_AUDIOSTREAMFORMAT_MP2ADTS;
++ break;
++ default:
++ fprintf(stderr, "can't find stream format\n");
++ break;
++ }
++ /* sample_rate */
++ switch (buf[2]>>2 & 0xf) {
++ case 0x0:
++ *sample_rate = 96000;
++ break;
++ case 0x1:
++ *sample_rate = 88200;
++ break;
++ case 0x2:
++ *sample_rate = 64000;
++ break;
++ case 0x3:
++ *sample_rate = 48000;
++ break;
++ case 0x4:
++ *sample_rate = 44100;
++ break;
++ case 0x5:
++ *sample_rate = 32000;
++ break;
++ case 0x6:
++ *sample_rate = 24000;
++ break;
++ case 0x7:
++ *sample_rate = 22050;
++ break;
++ case 0x8:
++ *sample_rate = 16000;
++ break;
++ case 0x9:
++ *sample_rate = 12000;
++ break;
++ case 0xa:
++ *sample_rate = 11025;
++ break;
++ case 0xb:
++ *sample_rate = 8000;
++ break;
++ case 0xc:
++ *sample_rate = 7350;
++ break;
++ default:
++ break;
++ }
++ /* channel */
++ switch (((buf[2]&0x1) << 2) | (buf[3]>>6)) {
++ case 1:
++ *num_channels = 1;
++ break;
++ case 2:
++ *num_channels = 2;
++ break;
++ case 3:
++ *num_channels = 3;
++ break;
++ case 4:
++ *num_channels = 4;
++ break;
++ case 5:
++ *num_channels = 5;
++ break;
++ case 6:
++ *num_channels = 6;
++ break;
++ case 7:
++ *num_channels = 7;
++ break;
++ default:
++ break;
++ }
++ return 1;
++}
++
++static const int aac_sample_rates[] = { 96000, 88200, 64000, 48000, 44100,
++ 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350
++};
++
++#define MAX_SR_NUM sizeof(aac_sample_rates)/sizeof(aac_sample_rates[0])
++
++static int get_sample_rate_from_index(int sr_index)
++{
++ if (sr_index >= 0 && sr_index < MAX_SR_NUM)
++ return aac_sample_rates[sr_index];
++
++ return 0;
++}
++
++int find_adif_header(FILE *file, unsigned int *num_channels, unsigned int *sample_rate, unsigned int *format)
++{
++ int ret;
++ unsigned char adif_id[4];
++ unsigned char adif_header[20];
++ int bitstream_type;
++ int bitrate;
++ int object_type;
++ int sr_index;
++ int skip_size = 0;
++
++ ret = fread(adif_id, sizeof(unsigned char), 4, file);
++ if (ret < 0) {
++ fprintf(stderr, "read data from file err: %d\n", ret);
++ return 0;
++ }
++ /* adif id */
++ if ((adif_id[0] != 0x41) || (adif_id[1] != 0x44) ||
++ (adif_id[2] != 0x49) || (adif_id[3] != 0x46))
++ return 0;
++
++ fread(adif_header, sizeof(unsigned char), 20, file);
++
++ /* copyright string */
++ if (adif_header[0] & 0x80)
++ skip_size = 9;
++
++ bitstream_type = adif_header[0 + skip_size] & 0x10;
++ bitrate =
++ ((unsigned int) (adif_header[0 + skip_size] & 0x0f) << 19) |
++ ((unsigned int) adif_header[1 + skip_size] << 11) |
++ ((unsigned int) adif_header[2 + skip_size] << 3) |
++ ((unsigned int) adif_header[3 + skip_size] & 0xe0);
++
++ if (bitstream_type == 0) {
++ object_type = ((adif_header[6 + skip_size] & 0x01) << 1) |
++ ((adif_header[7 + skip_size] & 0x80) >> 7);
++ sr_index = (adif_header[7 + skip_size] & 0x78) >> 3;
++ }
++ /* VBR */
++ else {
++ object_type = (adif_header[4 + skip_size] & 0x18) >> 3;
++ sr_index = ((adif_header[4 + skip_size] & 0x07) << 1) |
++ ((adif_header[5 + skip_size] & 0x80) >> 7);
++ }
++
++ /* sample rate */
++ *sample_rate = get_sample_rate_from_index(sr_index);
++
++ /* FIXME: assume channels is 2 */
++ *num_channels = 2;
++
++ *format = SND_AUDIOSTREAMFORMAT_ADIF;
++ fseek(file, 0, SEEK_SET);
++ return 1;
++}
++
++static int parse_aac_header(FILE *file, unsigned int *num_channels, unsigned int *sample_rate, unsigned int *format)
++{
++ if (find_adts_header(file, num_channels, sample_rate, format))
++ return 1;
++ else if (find_adif_header(file, num_channels, sample_rate, format))
++ return 1;
++ else {
++ fprintf(stderr, "can't find streams format\n");
++ return 0;
++ }
++
++ return 1;
++}
++
+ static int print_time(struct compress *compress)
+ {
+ unsigned int avail;
+@@ -513,6 +697,29 @@ void get_codec_pcm(FILE *file, struct compr_config *config,
+ codec->format = format;
+ }
+
++void get_codec_aac(FILE *file, struct compr_config *config,
++ struct snd_codec *codec)
++{
++ unsigned int channels, rate, format;
++
++ if (parse_aac_header(file, &channels, &rate, &format) == 0) {
++ fclose(file);
++ exit(EXIT_FAILURE);
++ };
++ fseek(file, 0, SEEK_SET);
++
++ codec->id = SND_AUDIOCODEC_AAC;
++ codec->ch_in = channels;
++ codec->ch_out = channels;
++ codec->sample_rate = rate;
++ codec->bit_rate = 0;
++ codec->rate_control = 0;
++ codec->profile = SND_AUDIOPROFILE_AAC;
++ codec->level = 0;
++ codec->ch_mode = 0;
++ codec->format = format;
++
++}
+ void play_samples(char *name, unsigned int card, unsigned int device,
+ unsigned long buffer_size, unsigned int frag,
+ unsigned long codec_id, int pause_count, int pause_block,
+@@ -544,6 +751,9 @@ void play_samples(char *name, unsigned int card, unsigned int device,
+ case SND_AUDIOCODEC_PCM:
+ get_codec_pcm(file, &config, &codec);
+ break;
++ case SND_AUDIOCODEC_AAC:
++ get_codec_aac(file, &config, &codec);
++ break;
+ default:
+ fprintf(stderr, "codec ID %ld is not supported\n", codec_id);
+ exit(EXIT_FAILURE);
+--
+2.17.1
+
diff --git a/recipes-multimedia/tinycompress/tinycompress_1.1.6.bb b/recipes-multimedia/tinycompress/tinycompress_1.1.6.bb
new file mode 100644
index 00000000..803c38df
--- /dev/null
+++ b/recipes-multimedia/tinycompress/tinycompress_1.1.6.bb
@@ -0,0 +1,16 @@
+DESCRIPTION = "A library to handle compressed formats like MP3 etc."
+LICENSE = "LGPL-2.1-only | BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=cf9105c1a2d4405cbe04bbe3367373a0"
+DEPENDS = "alsa-lib"
+
+SRC_URI = "git://git.alsa-project.org/tinycompress.git;protocol=git;branch=master \
+ file://0001-tinycompress-Add-id3-decoding.patch \
+ file://0002-cplay-Support-wave-file.patch \
+ file://0003-cplay-Add-pause-feature.patch \
+ file://0004-tinycompress-pass-NULL-buffer-with-0-size-to-driver.patch \
+ file://0005-cplay-Support-aac-streams.patch \
+"
+SRCREV = "995f2ed91045dad8c20485ab1a64727d22cd92e5"
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig