summaryrefslogtreecommitdiffstats
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.patch36
-rw-r--r--recipes-multimedia/alsa/alsa-lib/0001-pcm-rate-fix-the-crash-in-snd_pcm_rate_may_wait_for_.patch8
-rw-r--r--recipes-multimedia/alsa/alsa-lib/0005-add-ak4458-conf-for-multichannel-support.patch32
-rw-r--r--recipes-multimedia/alsa/alsa-lib/0006-add-conf-for-iMX-XCVR-sound-card.patch30
-rw-r--r--recipes-multimedia/alsa/alsa-lib/0007-add-conf-for-imx-cs42448-sound-card.patch216
-rw-r--r--recipes-multimedia/alsa/alsa-lib_%.bbappend3
-rw-r--r--recipes-multimedia/alsa/imx-alsa-plugins_git.bb12
-rw-r--r--recipes-multimedia/gstreamer/gst-devtools_1.22.5.imx.bb52
-rw-r--r--recipes-multimedia/gstreamer/gst-examples/0001-Make-player-examples-installable.patch37
-rw-r--r--recipes-multimedia/gstreamer/gst-examples/gst-player.desktop10
-rw-r--r--recipes-multimedia/gstreamer/gst-examples_1.24.7.imx.bb38
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-libav_1.24.7.imx.bb34
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-omx_%.bbappend1
-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_1.24.7.imx.bb (renamed from recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.22.5.imx.bb)22
-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_1.24.7.imx.bb (renamed from recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.22.5.imx.bb)8
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.24.7.imx.bbappend (renamed from recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.22.%.bbappend)4
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.24.7.imx.bb (renamed from recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.22.5.imx.bb)16
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_2.2.0.bb4
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.24.0.imx.bb48
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-python/0001-meson.build-Fix-missing-python_opt.patch47
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-python_1.24.0.imx.bb37
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.24.0.imx.bb38
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.24.0.imx.bb57
-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
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0_1.24.7.imx.bb (renamed from recipes-multimedia/gstreamer/gstreamer1.0_1.22.5.imx.bb)15
-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_git.bb32
-rw-r--r--recipes-multimedia/imx-codec/imx-codec_4.9.3.bb (renamed from recipes-multimedia/imx-codec/imx-codec_4.8.3.bb)15
-rw-r--r--recipes-multimedia/imx-dsp/imx-dsp-codec-ext_2.1.8.bb (renamed from recipes-multimedia/imx-dsp/imx-dsp-codec-ext_2.1.7.bb)5
-rw-r--r--recipes-multimedia/imx-dsp/imx-dsp_2.1.10.bb (renamed from recipes-multimedia/imx-dsp/imx-dsp_2.1.7.bb)13
-rw-r--r--recipes-multimedia/imx-dspc-asrc/imx-dspc-asrc_1.0.1.bb1
-rw-r--r--recipes-multimedia/imx-opencl-converter/imx-opencl-converter_0.2.0.bb18
-rw-r--r--recipes-multimedia/imx-opencl-converter/imx-opencl-converter_0.7.0.bb20
-rw-r--r--recipes-multimedia/imx-parser/imx-parser_4.9.3.bb (renamed from recipes-multimedia/imx-parser/imx-parser_4.8.3.bb)10
-rw-r--r--recipes-multimedia/imx-sw-pdm/imx-sw-pdm_1.0.3.bb1
-rw-r--r--recipes-multimedia/imx-vpuwrap/imx-vpuwrap/0001-vpu_wrapper_hantro_encoder-fix-missing-include.patch32
-rw-r--r--recipes-multimedia/imx-vpuwrap/imx-vpuwrap_git.bb17
-rw-r--r--recipes-multimedia/libimxvpuapi/libimxvpuapi2_2.3.1.bb (renamed from recipes-multimedia/libimxvpuapi/libimxvpuapi2_2.3.0.bb)6
-rw-r--r--recipes-multimedia/libimxvpuapi/libimxvpuapi_git.bb4
-rw-r--r--recipes-multimedia/pulseaudio/pulseaudio_%.bbappend6
-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
-rw-r--r--recipes-multimedia/tinycompress/tinycompress_1.2.5.bb16
63 files changed, 715 insertions, 2854 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 7d20c6782..7ae8b8fef 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,4 +1,4 @@
1From 49a7eac8e02c33cae8a168e6d22d9ff8aaf86d44 Mon Sep 17 00:00:00 2001 1From 3fa81ebaf8bac6b167776888ae26c6c140d8aebc Mon Sep 17 00:00:00 2001
2From: Shengjiu Wang <b02247@freescale.com> 2From: Shengjiu Wang <b02247@freescale.com>
3Date: Thu, 5 Jun 2014 17:37:47 +0800 3Date: Thu, 5 Jun 2014 17:37:47 +0800
4Subject: [PATCH] add conf for multichannel support in imx 4Subject: [PATCH] add conf for multichannel support in imx
@@ -6,19 +6,18 @@ Subject: [PATCH] add conf for multichannel support in imx
6Upstream-Status: Inappropriate [platform specific] 6Upstream-Status: Inappropriate [platform specific]
7 7
8Signed-off-by: Shengjiu Wang <b02247@freescale.com> 8Signed-off-by: Shengjiu Wang <b02247@freescale.com>
9
10--- 9---
11 src/conf/cards/CS42888.conf | 94 ++++++++++++++++++++++++++++++++++++ 10 src/conf/cards/CS42888.conf | 94 ++++++++++++++++++++++++++++++++++++
12 src/conf/cards/IMX-HDMI.conf | 67 +++++++++++++++++++++++++ 11 src/conf/cards/IMX-HDMI.conf | 67 +++++++++++++++++++++++++
13 src/conf/cards/Makefile.am | 4 +- 12 src/conf/cards/Makefile.am | 2 +
14 src/conf/cards/aliases.conf | 2 + 13 src/conf/cards/aliases.conf | 2 +
15 4 files changed, 166 insertions(+), 1 deletion(-) 14 4 files changed, 165 insertions(+)
16 create mode 100644 src/conf/cards/CS42888.conf 15 create mode 100644 src/conf/cards/CS42888.conf
17 create mode 100644 src/conf/cards/IMX-HDMI.conf 16 create mode 100644 src/conf/cards/IMX-HDMI.conf
18 17
19diff --git a/src/conf/cards/CS42888.conf b/src/conf/cards/CS42888.conf 18diff --git a/src/conf/cards/CS42888.conf b/src/conf/cards/CS42888.conf
20new file mode 100644 19new file mode 100644
21index 0000000..671a284 20index 000000000000..671a2845894b
22--- /dev/null 21--- /dev/null
23+++ b/src/conf/cards/CS42888.conf 22+++ b/src/conf/cards/CS42888.conf
24@@ -0,0 +1,94 @@ 23@@ -0,0 +1,94 @@
@@ -118,7 +117,7 @@ index 0000000..671a284
118+# vim: ft=alsaconf 117+# vim: ft=alsaconf
119diff --git a/src/conf/cards/IMX-HDMI.conf b/src/conf/cards/IMX-HDMI.conf 118diff --git a/src/conf/cards/IMX-HDMI.conf b/src/conf/cards/IMX-HDMI.conf
120new file mode 100644 119new file mode 100644
121index 0000000..a51509e 120index 000000000000..a51509e8ad5a
122--- /dev/null 121--- /dev/null
123+++ b/src/conf/cards/IMX-HDMI.conf 122+++ b/src/conf/cards/IMX-HDMI.conf
124@@ -0,0 +1,67 @@ 123@@ -0,0 +1,67 @@
@@ -190,22 +189,20 @@ index 0000000..a51509e
190+ 189+
191+# vim: ft=alsaconf 190+# vim: ft=alsaconf
192diff --git a/src/conf/cards/Makefile.am b/src/conf/cards/Makefile.am 191diff --git a/src/conf/cards/Makefile.am b/src/conf/cards/Makefile.am
193index 00999f0..fbf0697 100644 192index f387cf4197da..cbd2cd04227d 100644
194--- a/src/conf/cards/Makefile.am 193--- a/src/conf/cards/Makefile.am
195+++ b/src/conf/cards/Makefile.am 194+++ b/src/conf/cards/Makefile.am
196@@ -58,7 +58,9 @@ cfg_files = aliases.conf \ 195@@ -1,6 +1,8 @@
197 VIA8237.conf \ 196 alsaconfigdir = @ALSA_CONFIG_DIR@
198 VX222.conf \ 197 alsadir = $(alsaconfigdir)/cards
199 VXPocket.conf \ 198 cfg_files = aliases.conf \
200- VXPocket440.conf
201+ VXPocket440.conf \
202+ CS42888.conf \ 199+ CS42888.conf \
203+ IMX-HDMI.conf 200+ IMX-HDMI.conf \
204 201 AACI.conf \
205 if BUILD_ALISP 202 ATIIXP.conf \
206 cfg_files += aliases.alisp 203 ATIIXP-SPDMA.conf \
207diff --git a/src/conf/cards/aliases.conf b/src/conf/cards/aliases.conf 204diff --git a/src/conf/cards/aliases.conf b/src/conf/cards/aliases.conf
208index 7e352f7..a9e6d76 100644 205index a54824ae636b..0aa874d7434f 100644
209--- a/src/conf/cards/aliases.conf 206--- a/src/conf/cards/aliases.conf
210+++ b/src/conf/cards/aliases.conf 207+++ b/src/conf/cards/aliases.conf
211@@ -57,6 +57,8 @@ CMI8786 cards.CMI8788 208@@ -57,6 +57,8 @@ CMI8786 cards.CMI8788
@@ -217,3 +214,6 @@ index 7e352f7..a9e6d76 100644
217 214
218 <confdir:ctl/default.conf> 215 <confdir:ctl/default.conf>
219 <confdir:pcm/default.conf> 216 <confdir:pcm/default.conf>
217--
2182.42.0
219
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
index 5ec0d2e99..193d507eb 100644
--- 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
@@ -1,4 +1,4 @@
1From aa4f56c3c952269c36464cc0da9db5a1381648fa Mon Sep 17 00:00:00 2001 1From 3950e1ae36ca53a67b7248137e6033e7e99f79a3 Mon Sep 17 00:00:00 2001
2From: Jaroslav Kysela <perex@perex.cz> 2From: Jaroslav Kysela <perex@perex.cz>
3Date: Wed, 9 Nov 2022 08:11:42 +0100 3Date: Wed, 9 Nov 2022 08:11:42 +0100
4Subject: [PATCH] pcm: rate - fix the crash in 4Subject: [PATCH] pcm: rate - fix the crash in
@@ -24,10 +24,10 @@ Signed-off-by: Jaroslav Kysela <perex@perex.cz>
24 1 file changed, 1 insertion(+), 1 deletion(-) 24 1 file changed, 1 insertion(+), 1 deletion(-)
25 25
26diff --git a/src/pcm/pcm_plugin.c b/src/pcm/pcm_plugin.c 26diff --git a/src/pcm/pcm_plugin.c b/src/pcm/pcm_plugin.c
27index 6bb90b8b..ec64604c 100644 27index 9d7e233e8437..d58789eca73b 100644
28--- a/src/pcm/pcm_plugin.c 28--- a/src/pcm/pcm_plugin.c
29+++ b/src/pcm/pcm_plugin.c 29+++ b/src/pcm/pcm_plugin.c
30@@ -622,7 +622,7 @@ int snd_pcm_plugin_may_wait_for_avail_min_conv( 30@@ -626,7 +626,7 @@ int snd_pcm_plugin_may_wait_for_avail_min_conv(
31 * This code is also used by extplug, but extplug does not allow to alter the sampling rate. 31 * This code is also used by extplug, but extplug does not allow to alter the sampling rate.
32 */ 32 */
33 if (conv) 33 if (conv)
@@ -37,5 +37,5 @@ index 6bb90b8b..ec64604c 100644
37 if (slave->avail_min != needed_slave_avail_min) { 37 if (slave->avail_min != needed_slave_avail_min) {
38 snd_pcm_sw_params_t *swparams; 38 snd_pcm_sw_params_t *swparams;
39-- 39--
402.34.1 402.42.0
41 41
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 b25aa910e..51e199821 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,4 +1,4 @@
1From d78b7e2b964c9713c2e9889f4ec85922528ba971 Mon Sep 17 00:00:00 2001 1From 92d2b7d91bc1ec4068ee9371753bb24ad1108827 Mon Sep 17 00:00:00 2001
2From: Shengjiu Wang <shengjiu.wang@nxp.com> 2From: Shengjiu Wang <shengjiu.wang@nxp.com>
3Date: Wed, 31 Jan 2018 15:06:53 +0800 3Date: Wed, 31 Jan 2018 15:06:53 +0800
4Subject: [PATCH] add ak4458 conf for multichannel support 4Subject: [PATCH] add ak4458 conf for multichannel support
@@ -12,17 +12,16 @@ maximum 8 channels, but ak4458 may support 16 channels
12Upstream-Status: Inappropriate [i.MX specific] 12Upstream-Status: Inappropriate [i.MX specific]
13 13
14Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> 14Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
15
16--- 15---
17 src/conf/cards/AK4458.conf | 74 +++++++++++++++++++++++++++++++++++++ 16 src/conf/cards/AK4458.conf | 74 +++++++++++++++++++++++++++++++++++++
18 src/conf/cards/Makefile.am | 3 +- 17 src/conf/cards/Makefile.am | 1 +
19 src/conf/cards/aliases.conf | 1 + 18 src/conf/cards/aliases.conf | 1 +
20 3 files changed, 77 insertions(+), 1 deletion(-) 19 3 files changed, 76 insertions(+)
21 create mode 100644 src/conf/cards/AK4458.conf 20 create mode 100644 src/conf/cards/AK4458.conf
22 21
23diff --git a/src/conf/cards/AK4458.conf b/src/conf/cards/AK4458.conf 22diff --git a/src/conf/cards/AK4458.conf b/src/conf/cards/AK4458.conf
24new file mode 100644 23new file mode 100644
25index 0000000..3b5b195 24index 000000000000..3b5b195f2ca0
26--- /dev/null 25--- /dev/null
27+++ b/src/conf/cards/AK4458.conf 26+++ b/src/conf/cards/AK4458.conf
28@@ -0,0 +1,74 @@ 27@@ -0,0 +1,74 @@
@@ -101,21 +100,19 @@ index 0000000..3b5b195
101+ slave.channels 8 100+ slave.channels 8
102+} 101+}
103diff --git a/src/conf/cards/Makefile.am b/src/conf/cards/Makefile.am 102diff --git a/src/conf/cards/Makefile.am b/src/conf/cards/Makefile.am
104index fbf0697..34fa5a3 100644 103index cbd2cd04227d..3c29bd65d341 100644
105--- a/src/conf/cards/Makefile.am 104--- a/src/conf/cards/Makefile.am
106+++ b/src/conf/cards/Makefile.am 105+++ b/src/conf/cards/Makefile.am
107@@ -60,7 +60,8 @@ cfg_files = aliases.conf \ 106@@ -3,6 +3,7 @@ alsadir = $(alsaconfigdir)/cards
108 VXPocket.conf \ 107 cfg_files = aliases.conf \
109 VXPocket440.conf \
110 CS42888.conf \ 108 CS42888.conf \
111- IMX-HDMI.conf 109 IMX-HDMI.conf \
112+ IMX-HDMI.conf \ 110+ AK4458.conf \
113+ AK4458.conf 111 AACI.conf \
114 112 ATIIXP.conf \
115 if BUILD_ALISP 113 ATIIXP-SPDMA.conf \
116 cfg_files += aliases.alisp
117diff --git a/src/conf/cards/aliases.conf b/src/conf/cards/aliases.conf 114diff --git a/src/conf/cards/aliases.conf b/src/conf/cards/aliases.conf
118index a9e6d76..2f0a22a 100644 115index 0aa874d7434f..dda71d99916e 100644
119--- a/src/conf/cards/aliases.conf 116--- a/src/conf/cards/aliases.conf
120+++ b/src/conf/cards/aliases.conf 117+++ b/src/conf/cards/aliases.conf
121@@ -59,6 +59,7 @@ pistachio cards.pistachio-card 118@@ -59,6 +59,7 @@ pistachio cards.pistachio-card
@@ -126,3 +123,6 @@ index a9e6d76..2f0a22a 100644
126 123
127 <confdir:ctl/default.conf> 124 <confdir:ctl/default.conf>
128 <confdir:pcm/default.conf> 125 <confdir:pcm/default.conf>
126--
1272.42.0
128
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
index 1f558185d..db76eb749 100644
--- 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
@@ -1,4 +1,4 @@
1From 36aae65dc913e1ebe72366d7ae361897d465e88d Mon Sep 17 00:00:00 2001 1From faa9791070520f8d5e7060e5668efd1302c86c66 Mon Sep 17 00:00:00 2001
2From: Viorel Suman <viorel.suman@nxp.com> 2From: Viorel Suman <viorel.suman@nxp.com>
3Date: Mon, 9 Mar 2020 14:25:46 +0200 3Date: Mon, 9 Mar 2020 14:25:46 +0200
4Subject: [PATCH] add conf for iMX XCVR sound card 4Subject: [PATCH] add conf for iMX XCVR sound card
@@ -6,17 +6,16 @@ Subject: [PATCH] add conf for iMX XCVR sound card
6Upstream-Status: Pending 6Upstream-Status: Pending
7 7
8Signed-off-by: Viorel Suman <viorel.suman@nxp.com> 8Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
9
10--- 9---
11 src/conf/cards/IMX-XCVR.conf | 39 ++++++++++++++++++++++++++++++++++++ 10 src/conf/cards/IMX-XCVR.conf | 39 ++++++++++++++++++++++++++++++++++++
12 src/conf/cards/Makefile.am | 3 ++- 11 src/conf/cards/Makefile.am | 1 +
13 src/conf/cards/aliases.conf | 1 + 12 src/conf/cards/aliases.conf | 1 +
14 3 files changed, 42 insertions(+), 1 deletion(-) 13 3 files changed, 41 insertions(+)
15 create mode 100755 src/conf/cards/IMX-XCVR.conf 14 create mode 100755 src/conf/cards/IMX-XCVR.conf
16 15
17diff --git a/src/conf/cards/IMX-XCVR.conf b/src/conf/cards/IMX-XCVR.conf 16diff --git a/src/conf/cards/IMX-XCVR.conf b/src/conf/cards/IMX-XCVR.conf
18new file mode 100755 17new file mode 100755
19index 0000000..009000c 18index 000000000000..009000c63a19
20--- /dev/null 19--- /dev/null
21+++ b/src/conf/cards/IMX-XCVR.conf 20+++ b/src/conf/cards/IMX-XCVR.conf
22@@ -0,0 +1,39 @@ 21@@ -0,0 +1,39 @@
@@ -60,21 +59,19 @@ index 0000000..009000c
60+ preamble.y 0x3 59+ preamble.y 0x3
61+} 60+}
62diff --git a/src/conf/cards/Makefile.am b/src/conf/cards/Makefile.am 61diff --git a/src/conf/cards/Makefile.am b/src/conf/cards/Makefile.am
63index 34fa5a3..70b9bab 100644 62index 3c29bd65d341..4502919e3bec 100644
64--- a/src/conf/cards/Makefile.am 63--- a/src/conf/cards/Makefile.am
65+++ b/src/conf/cards/Makefile.am 64+++ b/src/conf/cards/Makefile.am
66@@ -61,7 +61,8 @@ cfg_files = aliases.conf \ 65@@ -4,6 +4,7 @@ cfg_files = aliases.conf \
67 VXPocket440.conf \
68 CS42888.conf \ 66 CS42888.conf \
69 IMX-HDMI.conf \ 67 IMX-HDMI.conf \
70- AK4458.conf 68 AK4458.conf \
71+ AK4458.conf \ 69+ IMX-XCVR.conf \
72+ IMX-XCVR.conf 70 AACI.conf \
73 71 ATIIXP.conf \
74 if BUILD_ALISP 72 ATIIXP-SPDMA.conf \
75 cfg_files += aliases.alisp
76diff --git a/src/conf/cards/aliases.conf b/src/conf/cards/aliases.conf 73diff --git a/src/conf/cards/aliases.conf b/src/conf/cards/aliases.conf
77index 2f0a22a..e824145 100644 74index dda71d99916e..6dab14855f25 100644
78--- a/src/conf/cards/aliases.conf 75--- a/src/conf/cards/aliases.conf
79+++ b/src/conf/cards/aliases.conf 76+++ b/src/conf/cards/aliases.conf
80@@ -60,6 +60,7 @@ VC4-HDMI cards.vc4-hdmi 77@@ -60,6 +60,7 @@ VC4-HDMI cards.vc4-hdmi
@@ -85,3 +82,6 @@ index 2f0a22a..e824145 100644
85 82
86 <confdir:ctl/default.conf> 83 <confdir:ctl/default.conf>
87 <confdir:pcm/default.conf> 84 <confdir:pcm/default.conf>
85--
862.42.0
87
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
index 64e15be4a..fa71078e4 100644
--- 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
@@ -1,107 +1,109 @@
1From 97d5e09a4166b45c567026e51b8a25ef5d7d587d Mon Sep 17 00:00:00 2001 1From 38d84440a7bec9e26380f08f050b2ada772b822e Mon Sep 17 00:00:00 2001
2From: Chancel Liu <chancel.liu@nxp.com> 2From: Chancel Liu <chancel.liu@nxp.com>
3Date: Fri, 29 Jul 2022 16:12:37 +0800 3Date: Fri, 29 Jul 2022 16:12:37 +0800
4Subject: [PATCH] add conf for imx-cs42448 sound card 4Subject: [PATCH] add conf for imx-cs42448 sound card
5 5MIME-Version: 1.0
6Upstream-Status: Inappropriate [i.MX specific] 6Content-Type: text/plain; charset=UTF-8
7 7Content-Transfer-Encoding: 8bit
8Signed-off-by: Chancel Liu <chancel.liu@nxp.com> 8
9--- 9Upstream-Status: Inappropriate [i.MX specific]
10 src/conf/cards/CS42448.conf | 58 +++++++++++++++++++++++++++++++++++++ 10
11 src/conf/cards/Makefile.am | 3 +- 11Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
12 src/conf/cards/aliases.conf | 1 + 12---
13 3 files changed, 61 insertions(+), 1 deletion(-) 13 src/conf/cards/CS42448.conf | 58 +++++++++++++++++++++++++++++++++++++
14 create mode 100644 src/conf/cards/CS42448.conf 14 src/conf/cards/Makefile.am | 1 +
15 15 src/conf/cards/aliases.conf | 1 +
16diff --git a/src/conf/cards/CS42448.conf b/src/conf/cards/CS42448.conf 16 3 files changed, 60 insertions(+)
17new file mode 100644 17 create mode 100644 src/conf/cards/CS42448.conf
18index 00000000..28ba5c48 18
19--- /dev/null 19diff --git a/src/conf/cards/CS42448.conf b/src/conf/cards/CS42448.conf
20+++ b/src/conf/cards/CS42448.conf 20new file mode 100644
21@@ -0,0 +1,58 @@ 21index 000000000000..28ba5c485837
22+# 22--- /dev/null
23+# Configuration for the CS42448 chip 23+++ b/src/conf/cards/CS42448.conf
24+# 24@@ -0,0 +1,58 @@
25+ 25+#
26+# default with dmix & dsnoop 26+# Configuration for the CS42448 chip
27+CS42448.pcm.default { 27+#
28+ @args [ CARD ] 28+
29+ @args.CARD { 29+# default with dmix & dsnoop
30+ type string 30+CS42448.pcm.default {
31+ } 31+ @args [ CARD ]
32+ type asym 32+ @args.CARD {
33+ playback.pcm { 33+ type string
34+ type plug 34+ }
35+ slave.pcm { 35+ type asym
36+ @func concat 36+ playback.pcm {
37+ strings [ "dmix:" $CARD ",FORMAT=S32_LE" ] 37+ type plug
38+ } 38+ slave.pcm {
39+ } 39+ @func concat
40+ capture.pcm { 40+ strings [ "dmix:" $CARD ",FORMAT=S32_LE" ]
41+ type plug 41+ }
42+ slave.pcm { 42+ }
43+ @func concat 43+ capture.pcm {
44+ strings [ "dsnoop:" $CARD ",FORMAT=S32_LE" ] 44+ type plug
45+ } 45+ slave.pcm {
46+ } 46+ @func concat
47+} 47+ strings [ "dsnoop:" $CARD ",FORMAT=S32_LE" ]
48+ 48+ }
49+<confdir:pcm/surround51.conf> 49+ }
50+ 50+}
51+CS42448.pcm.surround51.0 { 51+
52+ @args [ CARD ] 52+<confdir:pcm/surround51.conf>
53+ @args.CARD { 53+
54+ type string 54+CS42448.pcm.surround51.0 {
55+ } 55+ @args [ CARD ]
56+ type plug 56+ @args.CARD {
57+ slave.pcm { 57+ type string
58+ type hw 58+ }
59+ card $CARD 59+ type plug
60+ } 60+ slave.pcm {
61+ slave.channels 6 61+ type hw
62+} 62+ card $CARD
63+ 63+ }
64+<confdir:pcm/surround71.conf> 64+ slave.channels 6
65+ 65+}
66+CS42448.pcm.surround71.0 { 66+
67+ @args [ CARD ] 67+<confdir:pcm/surround71.conf>
68+ @args.CARD { 68+
69+ type string 69+CS42448.pcm.surround71.0 {
70+ } 70+ @args [ CARD ]
71+ type plug 71+ @args.CARD {
72+ slave.pcm { 72+ type string
73+ type hw 73+ }
74+ card $CARD 74+ type plug
75+ } 75+ slave.pcm {
76+ slave.channels 8 76+ type hw
77+} 77+ card $CARD
78+ 78+ }
79+# vim: ft=alsaconf 79+ slave.channels 8
80diff --git a/src/conf/cards/Makefile.am b/src/conf/cards/Makefile.am 80+}
81index 70b9bab3..6aba20b4 100644 81+
82--- a/src/conf/cards/Makefile.am 82+# vim: ft=alsaconf
83+++ b/src/conf/cards/Makefile.am 83diff --git a/src/conf/cards/Makefile.am b/src/conf/cards/Makefile.am
84@@ -62,7 +62,8 @@ cfg_files = aliases.conf \ 84index 4502919e3bec..da2def3a9498 100644
85 CS42888.conf \ 85--- a/src/conf/cards/Makefile.am
86 IMX-HDMI.conf \ 86+++ b/src/conf/cards/Makefile.am
87 AK4458.conf \ 87@@ -5,6 +5,7 @@ cfg_files = aliases.conf \
88- IMX-XCVR.conf 88 IMX-HDMI.conf \
89+ IMX-XCVR.conf \ 89 AK4458.conf \
90+ CS42448.conf 90 IMX-XCVR.conf \
91 91+ CS42448.conf \
92 if BUILD_ALISP 92 AACI.conf \
93 cfg_files += aliases.alisp 93 ATIIXP.conf \
94diff --git a/src/conf/cards/aliases.conf b/src/conf/cards/aliases.conf 94 ATIIXP-SPDMA.conf \
95index e824145d..a40d3731 100644 95diff --git a/src/conf/cards/aliases.conf b/src/conf/cards/aliases.conf
96--- a/src/conf/cards/aliases.conf 96index 6dab14855f25..554db846f8e5 100644
97+++ b/src/conf/cards/aliases.conf 97--- a/src/conf/cards/aliases.conf
98@@ -61,6 +61,7 @@ imx-cs42888 cards.CS42888 98+++ b/src/conf/cards/aliases.conf
99 imx-hdmi-soc cards.IMX-HDMI 99@@ -61,6 +61,7 @@ imx-cs42888 cards.CS42888
100 ak4458-audio cards.AK4458 100 imx-hdmi-soc cards.IMX-HDMI
101 imx-audio-xcvr cards.IMX-XCVR 101 ak4458-audio cards.AK4458
102+imx-cs42448 cards.CS42448 102 imx-audio-xcvr cards.IMX-XCVR
103 103+imx-cs42448 cards.CS42448
104 <confdir:ctl/default.conf> 104
105 <confdir:pcm/default.conf> 105 <confdir:ctl/default.conf>
106-- 106 <confdir:pcm/default.conf>
1072.17.1 107--
1082.42.0
109
diff --git a/recipes-multimedia/alsa/alsa-lib_%.bbappend b/recipes-multimedia/alsa/alsa-lib_%.bbappend
index 65498aed1..230cf0957 100644
--- a/recipes-multimedia/alsa/alsa-lib_%.bbappend
+++ b/recipes-multimedia/alsa/alsa-lib_%.bbappend
@@ -10,6 +10,3 @@ IMX_PATCH = " \
10SRC_URI:append:imx-nxp-bsp = "${IMX_PATCH}" 10SRC_URI:append:imx-nxp-bsp = "${IMX_PATCH}"
11 11
12PACKAGE_ARCH:imx-nxp-bsp = "${MACHINE_SOCARCH}" 12PACKAGE_ARCH:imx-nxp-bsp = "${MACHINE_SOCARCH}"
13
14GLIBC_64BIT_TIME_FLAGS = ""
15INSANE_SKIP:append = " 32bit-time"
diff --git a/recipes-multimedia/alsa/imx-alsa-plugins_git.bb b/recipes-multimedia/alsa/imx-alsa-plugins_git.bb
index e2acf7676..e87a47020 100644
--- a/recipes-multimedia/alsa/imx-alsa-plugins_git.bb
+++ b/recipes-multimedia/alsa/imx-alsa-plugins_git.bb
@@ -1,5 +1,5 @@
1# Copyright 2013-2016 Freescale Semiconductor 1# Copyright 2013-2016 Freescale Semiconductor
2# Copyright 2017-2023 NXP 2# Copyright 2017-2024 NXP
3# Released under the MIT license (see COPYING.MIT for the terms) 3# Released under the MIT license (see COPYING.MIT for the terms)
4 4
5DESCRIPTION = "Freescale alsa-lib plugins" 5DESCRIPTION = "Freescale alsa-lib plugins"
@@ -20,14 +20,10 @@ inherit autotools pkgconfig use-imx-headers
20PV = "1.0.26+${SRCPV}" 20PV = "1.0.26+${SRCPV}"
21 21
22SRC_URI = "git://github.com/nxp-imx/imx-alsa-plugins.git;protocol=https;branch=${SRCBRANCH}" 22SRC_URI = "git://github.com/nxp-imx/imx-alsa-plugins.git;protocol=https;branch=${SRCBRANCH}"
23SRCBRANCH = "MM_04.08.03_2312_L6.6.y" 23SRCBRANCH = "MM_04.09.03_2412_L6.12.y"
24SRCREV = "b2ba082e70333f187972ee4e85f63f9d2f608331" 24SRCREV = "eaf0900662d6381bcc433165219280cca1752890"
25 25
26S = "${WORKDIR}/git" 26CFLAGS:append = " -I${STAGING_INCDIR_IMX}"
27
28INCLUDE_DIR = "-I${STAGING_INCDIR_IMX}"
29
30EXTRA_OECONF = "CFLAGS="${INCLUDE_DIR}""
31 27
32PACKAGECONFIG ??= "${PACKAGECONFIG_SWPDM}" 28PACKAGECONFIG ??= "${PACKAGECONFIG_SWPDM}"
33PACKAGECONFIG_SWPDM = "" 29PACKAGECONFIG_SWPDM = ""
diff --git a/recipes-multimedia/gstreamer/gst-devtools_1.22.5.imx.bb b/recipes-multimedia/gstreamer/gst-devtools_1.22.5.imx.bb
new file mode 100644
index 000000000..9f7f890d5
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gst-devtools_1.22.5.imx.bb
@@ -0,0 +1,52 @@
1SUMMARY = "Gstreamer validation tool"
2DESCRIPTION = "A Tool to test GStreamer components"
3HOMEPAGE = "https://gstreamer.freedesktop.org/documentation/gst-devtools/index.html"
4SECTION = "multimedia"
5
6LICENSE = "LGPL-2.1-or-later"
7LIC_FILES_CHKSUM = "file://validate/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343"
8
9S = "${WORKDIR}/gst-devtools-1.22.5"
10
11SRC_URI = "https://gstreamer.freedesktop.org/src/gst-devtools/gst-devtools-1.22.5.tar.xz \
12 file://0001-connect-has-a-different-signature-on-musl.patch \
13 "
14
15SRC_URI[sha256sum] = "2add1519aa6eeb01d544cb94293688ee3bc2079f6bca6075bf5c23d00a0921be"
16
17DEPENDS = "json-glib glib-2.0 glib-2.0-native gstreamer1.0 gstreamer1.0-plugins-base"
18RRECOMMENDS:${PN} = "git"
19
20FILES:${PN} += "${datadir}/gstreamer-1.0/* ${libdir}/gst-validate-launcher/* ${libdir}/gstreamer-1.0/*"
21
22inherit meson pkgconfig gettext upstream-version-is-even gobject-introspection
23
24# TODO: put this in a gettext.bbclass patch
25def gettext_oemeson(d):
26 if d.getVar('USE_NLS') == 'no':
27 return '-Dnls=disabled'
28 # Remove the NLS bits if USE_NLS is no or INHIBIT_DEFAULT_DEPS is set
29 if d.getVar('INHIBIT_DEFAULT_DEPS') and not oe.utils.inherits(d, 'cross-canadian'):
30 return '-Dnls=disabled'
31 return '-Dnls=enabled'
32
33# Build GstValidateVideo
34PACKAGECONFIG[cairo] = "-Dcairo=enabled,-Dcairo=disabled,cairo"
35
36EXTRA_OEMESON += " \
37 -Ddoc=disabled \
38 -Ddebug_viewer=disabled \
39 -Dtests=disabled \
40 -Dvalidate=enabled \
41 ${@gettext_oemeson(d)} \
42"
43
44do_install:append () {
45 for fn in ${bindir}/gst-validate-launcher \
46 ${libdir}/gst-validate-launcher/python/launcher/config.py; do
47 sed -i -e 's,${B},/usr/src/debug/${PN},g' -e 's,${S},/usr/src/debug/${PN},g' ${D}$fn
48 done
49}
50
51GIR_MESON_ENABLE_FLAG = "enabled"
52GIR_MESON_DISABLE_FLAG = "disabled"
diff --git a/recipes-multimedia/gstreamer/gst-examples/0001-Make-player-examples-installable.patch b/recipes-multimedia/gstreamer/gst-examples/0001-Make-player-examples-installable.patch
new file mode 100644
index 000000000..828c87dc9
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gst-examples/0001-Make-player-examples-installable.patch
@@ -0,0 +1,37 @@
1From 7924016fce2d0b435891a335cdae52fc939c7e3b Mon Sep 17 00:00:00 2001
2From: Jussi Kukkonen <jussi.kukkonen@intel.com>
3Date: Thu, 17 Aug 2017 11:07:02 +0300
4Subject: [PATCH] Make player examples installable
5
6Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
7Upstream-Status: Denied [Upstream considers these code examples, for now a least]
8
9https://bugzilla.gnome.org/show_bug.cgi?id=777827
10
11---
12 playback/player/gst-play/meson.build | 1 +
13 playback/player/gtk/meson.build | 1 +
14 2 files changed, 2 insertions(+)
15
16Index: gst-examples/playback/player/gst-play/meson.build
17===================================================================
18--- gst-examples.orig/playback/player/gst-play/meson.build
19+++ gst-examples/playback/player/gst-play/meson.build
20@@ -2,5 +2,6 @@ executable('gst-play',
21 ['gst-play.c',
22 'gst-play-kb.c',
23 'gst-play-kb.h'],
24+ install: true,
25 dependencies : [gst_dep, dependency('gstreamer-play-1.0'), m_dep])
26
27Index: gst-examples/playback/player/gtk/meson.build
28===================================================================
29--- gst-examples.orig/playback/player/gtk/meson.build
30+++ gst-examples/playback/player/gtk/meson.build
31@@ -20,5 +20,6 @@ if gtk_dep.found()
32 'gtk-video-renderer.h',
33 'gtk-video-renderer.c'],
34 c_args : extra_c_args,
35+ install: true,
36 dependencies : [gst_dep, gsttag_dep, gstplay_dep, gtk_dep, x11_dep])
37 endif
diff --git a/recipes-multimedia/gstreamer/gst-examples/gst-player.desktop b/recipes-multimedia/gstreamer/gst-examples/gst-player.desktop
new file mode 100644
index 000000000..d165e5d91
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gst-examples/gst-player.desktop
@@ -0,0 +1,10 @@
1[Desktop Entry]
2Name=Media Player
3Comment=Basic media player
4Icon=video-player
5TryExec=gtk-play
6Exec=gtk-play
7StartupNotify=true
8Terminal=false
9Type=Application
10Categories=GTK;AudioVideo;
diff --git a/recipes-multimedia/gstreamer/gst-examples_1.24.7.imx.bb b/recipes-multimedia/gstreamer/gst-examples_1.24.7.imx.bb
new file mode 100644
index 000000000..9db0051a1
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gst-examples_1.24.7.imx.bb
@@ -0,0 +1,38 @@
1# This builds an older version which is compatible with the gstreamer NXP fork 1.24.7.imx,
2# thus the version is appended with '.imx'
3
4SUMMARY = "GStreamer examples (including gtk-play, gst-play)"
5DESCRIPTION = "GStreamer example applications."
6HOMEPAGE = "https://gitlab.freedesktop.org/gstreamer/gst-examples"
7BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-examples/-/issues"
8LICENSE = "LGPL-2.0-or-later"
9LIC_FILES_CHKSUM = "file://playback/player/gtk/gtk-play.c;beginline=1;endline=20;md5=f8c72dae3d36823ec716a9ebcae593b9"
10
11DEPENDS = "glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad gtk+3 json-glib glib-2.0-native"
12
13SRC_URI = "git://gitlab.freedesktop.org/gstreamer/gstreamer.git;protocol=https;branch=1.24 \
14 file://0001-Make-player-examples-installable.patch \
15 file://gst-player.desktop \
16 "
17
18SRCREV = "0f1e984e41ce8d6d0758265d35e8b10d5815fde2"
19
20S = "${UNPACKDIR}/${BP}/subprojects/gst-examples"
21
22inherit meson pkgconfig features_check
23
24UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.(\d*[02468])+(\.\d+)+)"
25
26ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
27
28do_install:append() {
29 install -m 0644 -D ${UNPACKDIR}/gst-player.desktop ${D}${datadir}/applications/gst-player.desktop
30}
31
32RDEPENDS:${PN} = "gstreamer1.0-plugins-base-playback"
33RRECOMMENDS:${PN} = "gstreamer1.0-plugins-base-meta \
34 gstreamer1.0-plugins-good-meta \
35 gstreamer1.0-plugins-bad-meta \
36 ${@bb.utils.contains("LICENSE_FLAGS_ACCEPTED", "commercial", "gstreamer1.0-libav", "", d)} \
37 ${@bb.utils.contains("LICENSE_FLAGS_ACCEPTED", "commercial", "gstreamer1.0-plugins-ugly-meta", "", d)}"
38RPROVIDES:${PN} += "gst-player gst-player-bin"
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.24.7.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.24.7.imx.bb
new file mode 100644
index 000000000..bf61d4192
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.24.7.imx.bb
@@ -0,0 +1,34 @@
1SUMMARY = "Libav-based GStreamer 1.x plugin"
2DESCRIPTION = "Contains a GStreamer plugin for using the encoders, decoders, \
3muxers, and demuxers provided by FFmpeg."
4HOMEPAGE = "http://gstreamer.freedesktop.org/"
5SECTION = "multimedia"
6
7# ffmpeg has comercial license flags so add it as we need ffmpeg as a dependency
8LICENSE_FLAGS = "commercial"
9LICENSE = "LGPL-2.1-or-later"
10LIC_FILES_CHKSUM = "file://COPYING;md5=69333daa044cb77e486cc36129f7a770 \
11 file://ext/libav/gstav.h;beginline=1;endline=18;md5=a752c35267d8276fd9ca3db6994fca9c \
12 "
13
14SRC_URI = "https://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${@get_gst_ver('${PV}')}.tar.xz"
15SRC_URI[sha256sum] = "c3e4179ba183c2d3101edf87ff70dd07e728c766a5fee34e6ecded76ca5802df"
16
17S = "${UNPACKDIR}/gst-libav-${@get_gst_ver('${PV}')}"
18
19DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base ffmpeg"
20
21inherit meson pkgconfig upstream-version-is-even
22
23EXTRA_OEMESON += " \
24 -Dtests=disabled \
25"
26
27# Drop .imx from PV
28def get_gst_ver(v):
29 return oe.utils.trim_version(v, 3)
30
31FILES:${PN} += "${libdir}/gstreamer-1.0/*.so"
32FILES:${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a"
33
34COMPATIBLE_MACHINE = "(imx-nxp-bsp)"
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-omx_%.bbappend b/recipes-multimedia/gstreamer/gstreamer1.0-omx_%.bbappend
deleted file mode 100644
index 188476035..000000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0-omx_%.bbappend
+++ /dev/null
@@ -1 +0,0 @@
1EXTRA_OEMESON:append:imx-nxp-bsp = " -Dtests=disabled -Dexamples=disabled"
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
deleted file mode 100644
index 029b80e17..000000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch
+++ /dev/null
@@ -1,33 +0,0 @@
1From 3bc5d48257032b6bbee532aad15062fbbcc43bfe Mon Sep 17 00:00:00 2001
2From: Andrey Zhizhikin <andrey.z@gmail.com>
3Date: Mon, 27 Jan 2020 10:22:35 +0000
4Subject: [PATCH] opencv: resolve missing opencv data dir in yocto build
5
6When Yocto build is performed, opencv searches for data dir using simple
7'test' command, this fails because pkg-config provides an absolute
8path on the target which needs to be prepended by PKG_CONFIG_SYSROOT_DIR
9in order for the 'test' utility to pick up the absolute path.
10
11Upstream-Status: Inappropriate [OE-specific]
12
13Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
14Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
15
16---
17 ext/opencv/meson.build | 3 +++
18 1 file changed, 3 insertions(+)
19
20diff --git a/ext/opencv/meson.build b/ext/opencv/meson.build
21index 1d86b90..b5c8b95 100644
22--- a/ext/opencv/meson.build
23+++ b/ext/opencv/meson.build
24@@ -87,6 +87,9 @@ if opencv_found
25 opencv_prefix = opencv_dep.get_variable('prefix')
26 gstopencv_cargs += ['-DOPENCV_PREFIX="' + opencv_prefix + '"']
27
28+ pkgconf_sysroot = run_command(python3, '-c', 'import os; print(os.environ.get("PKG_CONFIG_SYSROOT_DIR"))').stdout().strip()
29+ opencv_prefix = pkgconf_sysroot + opencv_prefix
30+
31 # Check the data dir used by opencv for its xml data files
32 # Use prefix from pkg-config to be compatible with cross-compilation
33 r = run_command('test', '-d', opencv_prefix + '/share/opencv', check: false)
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.22.5.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.24.7.imx.bb
index 3366a6274..7aa22436c 100644
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.22.5.imx.bb
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.24.7.imx.bb
@@ -178,19 +178,19 @@ FILES:${PN}-voamrwbenc += "${datadir}/gstreamer-1.0/presets/GstVoAmrwbEnc.prs"
178 178
179DEFAULT_PREFERENCE = "-1" 179DEFAULT_PREFERENCE = "-1"
180 180
181LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=4fbd65380cdd255951079008b364516c" 181LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=69333daa044cb77e486cc36129f7a770"
182
183DEPENDS:append:imxgpu2d = " virtual/libg2d"
184 182
185SRC_URI:remove = "https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-${PV}.tar.xz \ 183SRC_URI:remove = "https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-${PV}.tar.xz \
186 file://0001-fix-maybe-uninitialized-warnings-when-compiling-with.patch \ 184 file://0001-fix-maybe-uninitialized-warnings-when-compiling-with.patch \
187 file://0002-avoid-including-sys-poll.h-directly.patch" 185 file://0002-avoid-including-sys-poll.h-directly.patch \
186 file://0004-opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch \
187 "
188SRC_URI:prepend = "${GST1.0-PLUGINS-BAD_SRC};branch=${SRCBRANCH} " 188SRC_URI:prepend = "${GST1.0-PLUGINS-BAD_SRC};branch=${SRCBRANCH} "
189GST1.0-PLUGINS-BAD_SRC ?= "gitsm://github.com/nxp-imx/gst-plugins-bad.git;protocol=https" 189GST1.0-PLUGINS-BAD_SRC ?= "gitsm://github.com/nxp-imx/gst-plugins-bad.git;protocol=https"
190SRCBRANCH = "MM_04.08.03_2312_L6.6.y" 190SRCBRANCH = "MM_04.09.03_2412_L6.12.y"
191SRCREV = "9de821c50b4dd7af2407d9c3d078020704510a20" 191SRCREV = "7bb1254fcb0a0dcb1ecb4ac21efbc5068151943d"
192 192
193S = "${WORKDIR}/git" 193S = "${UNPACKDIR}/${BP}"
194 194
195inherit use-imx-headers 195inherit use-imx-headers
196 196
@@ -215,9 +215,9 @@ EXTRA_OEMESON += " \
215 -Dc_args="${CFLAGS} -I${STAGING_INCDIR_IMX}" \ 215 -Dc_args="${CFLAGS} -I${STAGING_INCDIR_IMX}" \
216" 216"
217 217
218COMPATIBLE_MACHINE = "(imx-nxp-bsp)" 218EXTRA_OEMESON:remove = " \
219 -Dkate=disabled \
220"
219 221
220# it uses nested functions sadly, in ext/wayland/gstwaylandsink.c for GST_ELEMENT_REGISTER_DEFINE 222COMPATIBLE_MACHINE = "(imx-nxp-bsp)"
221#
222TOOLCHAIN = "gcc"
223########### End of i.MX overrides ######### 223########### End of i.MX overrides #########
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
deleted file mode 100644
index 3ab4bab45..000000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-gstallocator-Fix-typcasts.patch
+++ /dev/null
@@ -1,47 +0,0 @@
1From 90b94ff95c72487054fd283fb7cb5ebd13822b3f Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 7 Aug 2023 18:56:05 -0700
4Subject: [PATCH] gstallocator: Fix typcasts
5
6These are found when building with clang+musl
7| ../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
8' (aka 'unsigned long') [-Wint-conversion]
9| 228 | return gst_phymem_get_phy (mem);
10| | ^~~~~~~~~~~~~~~~~~~~~~~~
11
12Upstream-Status: Submitted [https://github.com/nxp-imx/gst-plugins-base/pull/4]
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 gst-libs/gst/allocators/gstallocatorphymem.c | 2 +-
16 gst-libs/gst/gl/gstglphymemory.c | 2 +-
17 2 files changed, 2 insertions(+), 2 deletions(-)
18
19diff --git a/gst-libs/gst/allocators/gstallocatorphymem.c b/gst-libs/gst/allocators/gstallocatorphymem.c
20index f3c3306c7..f8a4511ab 100755
21--- a/gst-libs/gst/allocators/gstallocatorphymem.c
22+++ b/gst-libs/gst/allocators/gstallocatorphymem.c
23@@ -225,7 +225,7 @@ static guintptr
24 gst_allocator_phymem_get_phys_addr (GstPhysMemoryAllocator * allocator,
25 GstMemory * mem)
26 {
27- return gst_phymem_get_phy (mem);
28+ return (guintptr)gst_phymem_get_phy (mem);
29 }
30
31 static void
32diff --git a/gst-libs/gst/gl/gstglphymemory.c b/gst-libs/gst/gl/gstglphymemory.c
33index d82c9a66a..1d8be0a5d 100644
34--- a/gst-libs/gst/gl/gstglphymemory.c
35+++ b/gst-libs/gst/gl/gstglphymemory.c
36@@ -337,7 +337,7 @@ gst_gl_physical_memory_setup_buffer (GstAllocator * allocator,
37 GST_VIDEO_INFO_HEIGHT (info),
38 viv_fmt,
39 memblk->vaddr,
40- memblk->paddr,
41+ (guint)memblk->paddr,
42 FALSE
43 };
44
45--
462.41.0
47
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.22.5.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.24.7.imx.bb
index dd7869a9b..ed6e02435 100644
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.22.5.imx.bb
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.24.7.imx.bb
@@ -116,12 +116,12 @@ SRC_URI:remove = " \
116 file://0003-viv-fb-Make-sure-config.h-is-included.patch \ 116 file://0003-viv-fb-Make-sure-config.h-is-included.patch \
117 file://0002-ssaparse-enhance-SSA-text-lines-parsing.patch" 117 file://0002-ssaparse-enhance-SSA-text-lines-parsing.patch"
118SRC_URI:prepend = "${GST1.0-PLUGINS-BASE_SRC};branch=${SRCBRANCH} " 118SRC_URI:prepend = "${GST1.0-PLUGINS-BASE_SRC};branch=${SRCBRANCH} "
119SRC_URI:append = " file://0001-gstallocator-Fix-typcasts.patch" 119
120GST1.0-PLUGINS-BASE_SRC ?= "gitsm://github.com/nxp-imx/gst-plugins-base.git;protocol=https" 120GST1.0-PLUGINS-BASE_SRC ?= "gitsm://github.com/nxp-imx/gst-plugins-base.git;protocol=https"
121SRCBRANCH = "MM_04.08.03_2312_L6.6.y" 121SRCBRANCH = "MM_04.09.03_2412_L6.12.y"
122SRCREV = "c4333767ea122c182ba4e14cababe8dbe2a1b882" 122SRCREV = "858ae5a1fb2bd2692ca7ebbd5bde2eee14e1842d"
123 123
124S = "${WORKDIR}/git" 124S = "${UNPACKDIR}/${BP}"
125 125
126inherit use-imx-headers 126inherit use-imx-headers
127 127
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.22.%.bbappend b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.24.7.imx.bbappend
index ca6636b83..528d7e1a3 100644
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.22.%.bbappend
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.24.7.imx.bbappend
@@ -13,5 +13,5 @@ PACKAGECONFIG_GL:use-mainline-bsp = \
13# does not depend on the viv-fb feature. It used to, but that was actually a bug 13# does not depend on the viv-fb feature. It used to, but that was actually a bug
14# which was fixed in GStreamer 1.22.5. Since then, the direct texture support is 14# which was fixed in GStreamer 1.22.5. Since then, the direct texture support is
15# detected by Meson by checking for direct texture symbols like "glTexDirectVIV".) 15# detected by Meson by checking for direct texture symbols like "glTexDirectVIV".)
16PACKAGECONFIG_GL:append:mx6-nxp-bsp = " viv-fb " 16PACKAGECONFIG_GL:imxgpu2d:append:mx6-nxp-bsp = " viv-fb"
17PACKAGECONFIG_GL:append:mx7ulp-nxp-bsp = " viv-fb " 17PACKAGECONFIG_GL:imxgpu2d:append:mx7-nxp-bsp = " viv-fb"
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.22.5.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.24.7.imx.bb
index 9e09ef930..28044ccd1 100644
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.22.5.imx.bb
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.24.7.imx.bb
@@ -94,11 +94,11 @@ FILES:${PN}-equalizer += "${datadir}/gstreamer-1.0/presets/*.prs"
94DEFAULT_PREFERENCE = "-1" 94DEFAULT_PREFERENCE = "-1"
95 95
96LIC_FILES_CHKSUM = " \ 96LIC_FILES_CHKSUM = " \
97 file://LICENSE.txt;md5=a6f89e2100d9b6cdffcea4f398e37343 \ 97 file://LICENSE.txt;md5=69333daa044cb77e486cc36129f7a770 \
98 file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe \ 98 file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe \
99" 99"
100# Enable pulsesink in gstreamer 100# Enable pulsesink in gstreamer
101PACKAGECONFIG:append = "${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)}" 101PACKAGECONFIG:append = "${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', ' pulseaudio', '', d)}"
102 102
103# fb implementation of v4l2 uses libdrm 103# fb implementation of v4l2 uses libdrm
104DEPENDS += "${@bb.utils.contains('PACKAGECONFIG', 'v4l2', '${DEPENDS_V4L2}', '', d)}" 104DEPENDS += "${@bb.utils.contains('PACKAGECONFIG', 'v4l2', '${DEPENDS_V4L2}', '', d)}"
@@ -111,16 +111,10 @@ SRC_URI:remove = "https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plu
111 111
112SRC_URI:prepend = "${GST1.0-PLUGINS-GOOD_SRC};branch=${SRCBRANCH} " 112SRC_URI:prepend = "${GST1.0-PLUGINS-GOOD_SRC};branch=${SRCBRANCH} "
113GST1.0-PLUGINS-GOOD_SRC ?= "gitsm://github.com/nxp-imx/gst-plugins-good.git;protocol=https" 113GST1.0-PLUGINS-GOOD_SRC ?= "gitsm://github.com/nxp-imx/gst-plugins-good.git;protocol=https"
114SRCBRANCH = "MM_04.08.03_2312_L6.6.y" 114SRCBRANCH = "MM_04.09.03_2412_L6.12.y"
115SRCREV = "d361360510c97dc23abbfcdd22dff8214890527d" 115SRCREV = "626a972e9ef448f1017cfad07a3486a0fb340a0d"
116 116
117# set 32bit compile timer for 32-bit platform 117S = "${UNPACKDIR}/${BP}"
118GLIBC_64BIT_TIME_FLAGS:mx6-nxp-bsp = ""
119GLIBC_64BIT_TIME_FLAGS:mx7-nxp-bsp = ""
120INSANE_SKIP:mx6-nxp-bsp:append = " 32bit-time"
121INSANE_SKIP:mx7-nxp-bsp:append = " 32bit-time"
122
123S = "${WORKDIR}/git"
124 118
125COMPATIBLE_MACHINE = "(imx-nxp-bsp)" 119COMPATIBLE_MACHINE = "(imx-nxp-bsp)"
126 120
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
index 5bf60e623..cc2cedfd5 100644
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_2.2.0.bb
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_2.2.0.bb
@@ -15,11 +15,9 @@ RDEPENDS:gstreamer1.0-plugins-imx-imxvpu = "gstreamer1.0-plugins-bad-videoparser
15PV .= "+git${SRCPV}" 15PV .= "+git${SRCPV}"
16 16
17SRCBRANCH ?= "master" 17SRCBRANCH ?= "master"
18SRCREV = "cb3cd45676e808b222ac573e8a118f44fd70c288" 18SRCREV = "ce4f86e60f12c56574f727f3317fa8aa30a11387"
19SRC_URI = "git://github.com/Freescale/gstreamer-imx.git;branch=${SRCBRANCH};protocol=https" 19SRC_URI = "git://github.com/Freescale/gstreamer-imx.git;branch=${SRCBRANCH};protocol=https"
20 20
21S = "${WORKDIR}/git"
22
23inherit pkgconfig meson use-imx-headers 21inherit pkgconfig meson use-imx-headers
24 22
25# libg2d on i.MX8 SoCs with a DPU is emulated via the DPU. 23# libg2d on i.MX8 SoCs with a DPU is emulated via the DPU.
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.24.0.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.24.0.imx.bb
new file mode 100644
index 000000000..23b8c72cb
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.24.0.imx.bb
@@ -0,0 +1,48 @@
1require gstreamer1.0-plugins-common.inc
2require gstreamer1.0-plugins-license.inc
3
4SUMMARY = "'Ugly GStreamer plugins"
5HOMEPAGE = "https://gstreamer.freedesktop.org/"
6BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly/-/issues"
7
8LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
9 "
10
11LICENSE = "LGPL-2.1-or-later & GPL-2.0-or-later"
12LICENSE_FLAGS = "commercial"
13
14SRC_URI = " \
15 https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-${@get_gst_ver("${PV}")}.tar.xz \
16 "
17SRC_URI[sha256sum] = "c5d1cbdf71ab0c675bca236f70edfa1feb3f813fd4bfff563308f466d8805ca5"
18
19S = "${UNPACKDIR}/gst-plugins-ugly-${@get_gst_ver("${PV}")}"
20
21DEPENDS += "gstreamer1.0-plugins-base"
22
23GST_PLUGIN_SET_HAS_EXAMPLES = "0"
24
25PACKAGECONFIG ??= " \
26 ${GSTREAMER_ORC} \
27"
28
29PACKAGECONFIG[a52dec] = "-Da52dec=enabled,-Da52dec=disabled,liba52"
30PACKAGECONFIG[cdio] = "-Dcdio=enabled,-Dcdio=disabled,libcdio"
31PACKAGECONFIG[dvdread] = "-Ddvdread=enabled,-Ddvdread=disabled,libdvdread"
32PACKAGECONFIG[mpeg2dec] = "-Dmpeg2dec=enabled,-Dmpeg2dec=disabled,mpeg2dec"
33PACKAGECONFIG[x264] = "-Dx264=enabled,-Dx264=disabled,x264"
34
35GSTREAMER_GPL = "${@bb.utils.filter('PACKAGECONFIG', 'a52dec cdio dvdread mpeg2dec x264', d)}"
36
37EXTRA_OEMESON += " \
38 -Ddoc=disabled \
39 -Dsidplay=disabled \
40"
41
42# Drop .imx from PV
43def get_gst_ver(v):
44 return oe.utils.trim_version(v, 3)
45
46FILES:${PN}-x264 += "${datadir}/gstreamer-1.0/presets/GstX264Enc.prs"
47
48COMPATIBLE_MACHINE = "(imx-nxp-bsp)"
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-python/0001-meson.build-Fix-missing-python_opt.patch b/recipes-multimedia/gstreamer/gstreamer1.0-python/0001-meson.build-Fix-missing-python_opt.patch
new file mode 100644
index 000000000..fd6b1c16e
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-python/0001-meson.build-Fix-missing-python_opt.patch
@@ -0,0 +1,47 @@
1From 8d7e2eaed10e2928358805f613223a6a149790d6 Mon Sep 17 00:00:00 2001
2From: Hiago De Franco <hiago.franco@toradex.com>
3Date: Wed, 31 Jul 2024 11:51:06 -0300
4Subject: [PATCH] meson.build: Fix missing python_opt
5
6'python_opt' was not declared earlier, giving the following build error:
7
8| Message: python_abi_flags =
9|
10| ../gst-python-1.24.0/meson.build:84:16: ERROR: Unknown variable "python_opt".
11
12Remove it and keep the error message.
13
14Upstream-Status: Inappropriate [oe specific]
15
16The patch already exists upstream, but this is related to another fix [1]
17not suitable for OE. Moreover, the backport does not apply since
18the patch was added to the gstreamer monorepo.
19
20[1] https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6734?
21
22Signed-off-by: Hiago De Franco <hiago.franco@toradex.com>
23---
24 meson.build | 7 +------
25 1 file changed, 1 insertion(+), 6 deletions(-)
26
27diff --git a/meson.build b/meson.build
28index f240b6fd8aca..53f7a43702c7 100644
29--- a/meson.build
30+++ b/meson.build
31@@ -80,12 +80,7 @@ foreach loc: pylib_locs
32 endforeach
33 endforeach
34 if pylib_fname == ''
35- error_msg = 'Could not find python library to load'
36- if python_opt.enabled()
37- error(error_msg)
38- else
39- message(error_msg)
40- endif
41+ message('Could not find python library to load')
42 endif
43
44 pygi_override_dir = get_option('pygi-overrides-dir')
45--
462.39.2
47
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-python_1.24.0.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0-python_1.24.0.imx.bb
new file mode 100644
index 000000000..cac54e88a
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-python_1.24.0.imx.bb
@@ -0,0 +1,37 @@
1SUMMARY = "Python bindings for GStreamer 1.0"
2DESCRIPTION = "GStreamer Python binding overrides (complementing the bindings \
3provided by python-gi) "
4HOMEPAGE = "http://cgit.freedesktop.org/gstreamer/gst-python/"
5SECTION = "multimedia"
6
7LICENSE = "LGPL-2.1-or-later"
8LIC_FILES_CHKSUM = "file://COPYING;md5=c34deae4e395ca07e725ab0076a5f740"
9
10SRC_URI = "\
11 https://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${@get_gst_ver("${PV}")}.tar.xz \
12 file://0001-meson.build-Fix-missing-python_opt.patch \
13 "
14SRC_URI[sha256sum] = "041c2255c1ea9936c777dcb08a36ecaa6a24a69a12fc46ef53f1530d46c59f9d"
15
16DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base python3-pygobject"
17RDEPENDS:${PN} += "gstreamer1.0 gstreamer1.0-plugins-base python3-pygobject"
18
19PNREAL = "gst-python"
20
21S = "${UNPACKDIR}/${PNREAL}-${@get_gst_ver('${PV}')}"
22
23EXTRA_OEMESON += "\
24 -Dtests=disabled \
25 -Dplugin=enabled \
26 -Dlibpython-dir=${libdir} \
27"
28
29inherit meson pkgconfig setuptools3-base upstream-version-is-even features_check
30
31# Drop .imx from PV
32def get_gst_ver(v):
33 return oe.utils.trim_version(v, 3)
34
35FILES:${PN} += "${libdir}/gstreamer-1.0"
36
37REQUIRED_DISTRO_FEATURES = "gobject-introspection-data"
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.24.0.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.24.0.imx.bb
new file mode 100644
index 000000000..58255b992
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.24.0.imx.bb
@@ -0,0 +1,38 @@
1SUMMARY = "A library on top of GStreamer for building an RTSP server"
2HOMEPAGE = "http://cgit.freedesktop.org/gstreamer/gst-rtsp-server/"
3SECTION = "multimedia"
4LICENSE = "LGPL-2.1-or-later"
5LIC_FILES_CHKSUM = "file://COPYING;md5=69333daa044cb77e486cc36129f7a770"
6
7DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base"
8
9PNREAL = "gst-rtsp-server"
10
11SRC_URI = "https://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${@get_gst_ver("${PV}")}.tar.xz"
12
13SRC_URI[sha256sum] = "5b0fa6b12ba95b1d336a4b274cbe19e982aa3e6819f1d97bfd8e0102b103ed9b"
14
15S = "${UNPACKDIR}/${PNREAL}-${@get_gst_ver("${PV}")}"
16
17inherit meson pkgconfig upstream-version-is-even gobject-introspection
18
19EXTRA_OEMESON += " \
20 -Ddoc=disabled \
21 -Dexamples=disabled \
22 -Dtests=disabled \
23"
24
25GIR_MESON_ENABLE_FLAG = "enabled"
26GIR_MESON_DISABLE_FLAG = "disabled"
27
28# Drop .imx from PV
29def get_gst_ver(v):
30 return oe.utils.trim_version(v, 3)
31
32# Starting with 1.8.0 gst-rtsp-server includes dependency-less plugins as well
33require gstreamer1.0-plugins-packaging.inc
34
35CVE_PRODUCT += "gst-rtsp-server"
36
37COMPATIBLE_MACHINE = "(imx-nxp-bsp)"
38
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.24.0.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.24.0.imx.bb
new file mode 100644
index 000000000..3993730ec
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.24.0.imx.bb
@@ -0,0 +1,57 @@
1SUMMARY = "VA-API support to GStreamer"
2HOMEPAGE = "https://gstreamer.freedesktop.org/"
3DESCRIPTION = "gstreamer-vaapi consists of a collection of VA-API \
4based plugins for GStreamer and helper libraries: `vaapidecode', \
5`vaapiconvert', and `vaapisink'."
6
7REALPN = "gstreamer-vaapi"
8
9LICENSE = "LGPL-2.1-or-later"
10LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
11
12SRC_URI = "https://gstreamer.freedesktop.org/src/${REALPN}/${REALPN}-1.24.0.tar.xz"
13
14SRC_URI[sha256sum] = "6b1f3b91ca65dedc67dc67a25dc1d1e464f11825a27ab9c7ac7c1bda67f03596"
15
16S = "${UNPACKDIR}/${REALPN}-${@get_gst_ver('${PV}')}"
17DEPENDS = "libva gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad"
18
19inherit meson pkgconfig features_check upstream-version-is-even
20
21# Drop .imx from PV
22def get_gst_ver(v):
23 return oe.utils.trim_version(v, 3)
24
25REQUIRED_DISTRO_FEATURES ?= "opengl"
26
27EXTRA_OEMESON += " \
28 -Ddoc=disabled \
29 -Dexamples=disabled \
30 -Dtests=enabled \
31"
32
33PACKAGES =+ "${PN}-tests"
34
35# OpenGL packageconfig factored out to make it easy for distros
36# and BSP layers to pick either glx, egl, or no GL. By default,
37# try detecting X11 first, and if found (with OpenGL), use GLX,
38# otherwise try to check if EGL can be used.
39PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'glx', \
40 bb.utils.contains('DISTRO_FEATURES', 'opengl', 'egl', \
41 '', d), d)}"
42
43PACKAGECONFIG ??= "drm encoders \
44 ${PACKAGECONFIG_GL} \
45 ${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11', d)}"
46
47PACKAGECONFIG[drm] = "-Ddrm=enabled,-Ddrm=disabled,udev libdrm"
48PACKAGECONFIG[egl] = "-Degl=enabled,-Degl=disabled,virtual/egl"
49PACKAGECONFIG[encoders] = "-Dencoders=enabled,-Dencoders=disabled"
50PACKAGECONFIG[glx] = "-Dglx=enabled,-Dglx=disabled,virtual/libgl"
51PACKAGECONFIG[wayland] = "-Dwayland=enabled,-Dwayland=disabled,wayland-native wayland wayland-protocols"
52PACKAGECONFIG[x11] = "-Dx11=enabled,-Dx11=disabled,virtual/libx11 libxrandr libxrender"
53
54FILES:${PN} += "${libdir}/gstreamer-*/*.so"
55FILES:${PN}-dbg += "${libdir}/gstreamer-*/.debug"
56FILES:${PN}-dev += "${libdir}/gstreamer-*/*.a"
57FILES:${PN}-tests = "${bindir}/*"
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
deleted file mode 100644
index 1b9278db0..000000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0/0001-tests-respect-the-idententaion-used-in-meson.patch
+++ /dev/null
@@ -1,34 +0,0 @@
1From 559e1dd850b2b9eb3a415aa43e932e5e48f605cd Mon Sep 17 00:00:00 2001
2From: Jose Quaresma <quaresma.jose@gmail.com>
3Date: Sun, 11 Apr 2021 19:48:13 +0100
4Subject: [PATCH] tests: respect the idententaion used in meson
5
6Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789]
7
8Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
9
10---
11 tests/check/meson.build | 10 +++++-----
12 1 file changed, 5 insertions(+), 5 deletions(-)
13
14diff --git a/tests/check/meson.build b/tests/check/meson.build
15index 9787b0a..16caac7 100644
16--- a/tests/check/meson.build
17+++ b/tests/check/meson.build
18@@ -145,11 +145,11 @@ foreach t : core_tests
19
20 if not skip_test
21 exe = executable(test_name, fname,
22- c_args : gst_c_args + test_defines,
23- cpp_args : gst_c_args + test_defines,
24- include_directories : [configinc],
25- link_with : link_with_libs,
26- dependencies : gst_deps + test_deps,
27+ c_args : gst_c_args + test_defines,
28+ cpp_args : gst_c_args + test_defines,
29+ include_directories : [configinc],
30+ link_with : link_with_libs,
31+ dependencies : gst_deps + test_deps,
32 )
33
34 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
deleted file mode 100644
index 568e38cbf..000000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0/0002-tests-add-support-for-install-the-tests.patch
+++ /dev/null
@@ -1,107 +0,0 @@
1From 08b1aaff972a7f6349373fc1ad4cc23081adb52c Mon Sep 17 00:00:00 2001
2From: Jose Quaresma <quaresma.jose@gmail.com>
3Date: Sun, 11 Apr 2021 19:48:13 +0100
4Subject: [PATCH] tests: add support for install the tests
5
6This will provide to run the tests using the gnome-desktop-testing [1]
7
8[1] https://wiki.gnome.org/Initiatives/GnomeGoals/InstalledTests
9
10Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789]
11
12Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
13
14---
15 meson.build | 4 ++++
16 meson_options.txt | 1 +
17 tests/check/meson.build | 22 +++++++++++++++++++++-
18 tests/check/template.test.in | 3 +++
19 4 files changed, 29 insertions(+), 1 deletion(-)
20 create mode 100644 tests/check/template.test.in
21
22diff --git a/meson.build b/meson.build
23index f9f591d..3906fb3 100644
24--- a/meson.build
25+++ b/meson.build
26@@ -606,6 +606,10 @@ if bashcomp_dep.found()
27 endif
28 endif
29
30+installed_tests_enabled = get_option('installed_tests')
31+installed_tests_metadir = join_paths(datadir, 'installed-tests', meson.project_name())
32+installed_tests_execdir = join_paths(libexecdir, 'installed-tests', meson.project_name())
33+
34 plugins_install_dir = join_paths(get_option('libdir'), 'gstreamer-1.0')
35
36 pkgconfig = import('pkgconfig')
37diff --git a/meson_options.txt b/meson_options.txt
38index 7363bdb..a34ba37 100644
39--- a/meson_options.txt
40+++ b/meson_options.txt
41@@ -15,6 +15,7 @@ option('poisoning', type : 'boolean', value : false, description : 'Enable poiso
42 option('memory-alignment', type: 'combo',
43 choices : ['1', '2', '4', '8', '16', '32', '64', '128', '256', '512', '1024', '2048', '4096', '8192', 'malloc', 'pagesize'],
44 value: 'malloc')
45+option('installed_tests', type : 'boolean', value : false, description : 'Enable installed tests')
46
47 # Feature options
48 option('check', type : 'feature', value : 'auto', description : 'Build unit test libraries')
49diff --git a/tests/check/meson.build b/tests/check/meson.build
50index 16caac7..f2d400f 100644
51--- a/tests/check/meson.build
52+++ b/tests/check/meson.build
53@@ -124,10 +124,16 @@ test_defines = [
54 '-UG_DISABLE_ASSERT',
55 '-UG_DISABLE_CAST_CHECKS',
56 '-DGST_CHECK_TEST_ENVIRONMENT_BEACON="GST_STATE_IGNORE_ELEMENTS"',
57- '-DTESTFILE="' + meson.current_source_dir() + '/meson.build"',
58 '-DGST_DISABLE_DEPRECATED',
59 ]
60
61+testfile = meson.current_source_dir() + '/meson.build'
62+if installed_tests_enabled
63+ install_data(testfile, install_dir : installed_tests_metadir, rename : 'testfile')
64+ testfile = installed_tests_metadir + '/testfile'
65+endif
66+test_defines += '-DTESTFILE="@0@"'.format(testfile)
67+
68 # sanity checking
69 if get_option('check').disabled()
70 if get_option('tests').enabled()
71@@ -150,6 +156,8 @@ foreach t : core_tests
72 include_directories : [configinc],
73 link_with : link_with_libs,
74 dependencies : gst_deps + test_deps,
75+ install_dir: installed_tests_execdir,
76+ install: installed_tests_enabled,
77 )
78
79 env = environment()
80@@ -161,6 +169,18 @@ foreach t : core_tests
81 env.set('GST_PLUGIN_SCANNER_1_0', gst_scanner_dir + '/gst-plugin-scanner')
82 env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer')
83
84+ if installed_tests_enabled
85+ test_conf = configuration_data()
86+ test_conf.set('installed_tests_dir', join_paths(prefix, installed_tests_execdir))
87+ test_conf.set('program', test_name)
88+ configure_file(
89+ input: 'template.test.in',
90+ output: test_name + '.test',
91+ install_dir: installed_tests_metadir,
92+ configuration: test_conf
93+ )
94+ endif
95+
96 test(test_name, exe, env: env, timeout : 3 * 60)
97 endif
98 endforeach
99diff --git a/tests/check/template.test.in b/tests/check/template.test.in
100new file mode 100644
101index 0000000..f701627
102--- /dev/null
103+++ b/tests/check/template.test.in
104@@ -0,0 +1,3 @@
105+[Test]
106+Type=session
107+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
deleted file mode 100644
index 10a6dcc61..000000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-use-a-dictionaries-for-environment.patch
+++ /dev/null
@@ -1,50 +0,0 @@
1From fe830f0f75f3b4b41e3dbef8d4cf6ee4103c9e06 Mon Sep 17 00:00:00 2001
2From: Jose Quaresma <quaresma.jose@gmail.com>
3Date: Sat, 24 Apr 2021 10:34:47 +0100
4Subject: [PATCH 3/4] tests: use a dictionaries for environment
5
6meson environment() can't be passed to configure_file and it is needed for installed_tests,
7use a dictionary as this is simplest solution to install the environment.
8
9Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789]
10
11Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
12---
13 subprojects/gstreamer/tests/check/meson.build | 21 ++++++++++++-------
14 1 file changed, 13 insertions(+), 8 deletions(-)
15
16diff --git a/subprojects/gstreamer/tests/check/meson.build b/subprojects/gstreamer/tests/check/meson.build
17index 00a138a568..48ec2532f8 100644
18--- a/subprojects/gstreamer/tests/check/meson.build
19+++ b/subprojects/gstreamer/tests/check/meson.build
20@@ -161,14 +161,19 @@ foreach t : core_tests
21 install: installed_tests_enabled,
22 )
23
24- env = environment()
25- env.set('GST_PLUGIN_PATH_1_0', meson.project_build_root())
26- env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
27- env.set('GST_STATE_IGNORE_ELEMENTS', '')
28- env.set('CK_DEFAULT_TIMEOUT', '20')
29- env.set('GST_REGISTRY', '@0@/@1@.registry'.format(meson.current_build_dir(), test_name))
30- env.set('GST_PLUGIN_SCANNER_1_0', gst_scanner_dir + '/gst-plugin-scanner')
31- env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer')
32+ # meson environment object can't be passed to configure_file and
33+ # installed tests uses configure_file to install the environment.
34+ # use a dictionary as this is the simplest solution
35+ # to install the environment.
36+ env = {
37+ 'GST_PLUGIN_PATH_1_0': meson.project_build_root(),
38+ 'GST_PLUGIN_SYSTEM_PATH_1_0': '',
39+ 'GST_STATE_IGNORE_ELEMENTS': '',
40+ 'CK_DEFAULT_TIMEOUT': '20',
41+ 'GST_REGISTRY': '@0@/@1@.registry'.format(meson.current_build_dir(), test_name),
42+ 'GST_PLUGIN_SCANNER_1_0': gst_scanner_dir + '/gst-plugin-scanner',
43+ 'GST_PLUGIN_LOADING_WHITELIST': 'gstreamer',
44+ }
45
46 if installed_tests_enabled
47 test_conf = configuration_data()
48--
492.33.1
50
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
deleted file mode 100644
index efa004f8c..000000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-add-helper-script-to-run-the-installed_tests.patch
+++ /dev/null
@@ -1,74 +0,0 @@
1From 4dcbabebca2ad6f1fdd59ee35a858082e87db7b6 Mon Sep 17 00:00:00 2001
2From: Jose Quaresma <quaresma.jose@gmail.com>
3Date: Sun, 2 May 2021 01:58:01 +0100
4Subject: [PATCH 4/4] tests: add helper script to run the installed_tests
5
6- this is a bash script that will run the installed_tests
7with some of the environment variables used in the meson
8testing framework.
9
10Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789]
11
12Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
13---
14 subprojects/gstreamer/tests/check/meson.build | 17 +++++++++++++++++
15 .../gstreamer/tests/check/template.sh.in | 9 +++++++++
16 .../gstreamer/tests/check/template.test.in | 2 +-
17 3 files changed, 27 insertions(+), 1 deletion(-)
18 create mode 100755 subprojects/gstreamer/tests/check/template.sh.in
19
20diff --git a/subprojects/gstreamer/tests/check/meson.build b/subprojects/gstreamer/tests/check/meson.build
21index 48ec2532f8..7dc4990d4e 100644
22--- a/subprojects/gstreamer/tests/check/meson.build
23+++ b/subprojects/gstreamer/tests/check/meson.build
24@@ -185,6 +185,23 @@ foreach t : core_tests
25 install_dir: installed_tests_metadir,
26 configuration: test_conf
27 )
28+
29+ # All the tests will be deployed on the target machine and
30+ # we use the home folder ~ for the registry which will then expand at runtime.
31+ # Using the /tmp/gstreamer-1.0/@0@.registry can be problematic as it mostly
32+ # is mounted using tmpfs and if the machine crash from some reason we can lost the registry
33+ # that is useful for debug propose of the tests itself.
34+ env += {'GST_REGISTRY': '~/.cache/gstreamer-1.0/@0@.registry'.format(test_name)}
35+
36+ # Set the full path for the test it self.
37+ env += {'TEST': '@0@/@1@'.format(join_paths(prefix, installed_tests_execdir), test_name)}
38+
39+ configure_file(
40+ input : 'template.sh.in',
41+ output: test_name + '.sh',
42+ install_dir: installed_tests_execdir,
43+ configuration : env,
44+ )
45 endif
46
47 test(test_name, exe, env: env, timeout : 3 * 60)
48diff --git a/subprojects/gstreamer/tests/check/template.sh.in b/subprojects/gstreamer/tests/check/template.sh.in
49new file mode 100755
50index 0000000000..cf7d31b0ea
51--- /dev/null
52+++ b/subprojects/gstreamer/tests/check/template.sh.in
53@@ -0,0 +1,9 @@
54+#!/bin/sh
55+
56+set -ax
57+
58+CK_DEFAULT_TIMEOUT="@CK_DEFAULT_TIMEOUT@"
59+GST_PLUGIN_LOADING_WHITELIST="@GST_PLUGIN_LOADING_WHITELIST@"
60+GST_REGISTRY=@GST_REGISTRY@
61+GST_STATE_IGNORE_ELEMENTS="@GST_STATE_IGNORE_ELEMENTS@"
62+exec @TEST@
63diff --git a/subprojects/gstreamer/tests/check/template.test.in b/subprojects/gstreamer/tests/check/template.test.in
64index f701627f87..b74ef6ad73 100644
65--- a/subprojects/gstreamer/tests/check/template.test.in
66+++ b/subprojects/gstreamer/tests/check/template.test.in
67@@ -1,3 +1,3 @@
68 [Test]
69 Type=session
70-Exec=@installed_tests_dir@/@program@
71+Exec=@installed_tests_dir@/@program@.sh
72--
732.33.1
74
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
deleted file mode 100644
index f51df6d20..000000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-remove-gstbin-test_watch_for_state_change-test.patch
+++ /dev/null
@@ -1,107 +0,0 @@
1From b935abba3d8fa3ea1ce384c08e650afd8c20b78a Mon Sep 17 00:00:00 2001
2From: Claudius Heine <ch@denx.de>
3Date: Wed, 2 Feb 2022 13:47:02 +0100
4Subject: [PATCH] tests: remove gstbin:test_watch_for_state_change testcase
5
6This testcase seems to be flaky, and upstream marked it as such:
7https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/778
8
9This patch removes the testcase to avoid it interfering with out ptest.
10
11Signed-off-by: Claudius Heine <ch@denx.de>
12
13Upstream-Status: Inappropriate [needs proper upstream fix]
14---
15 tests/check/gst/gstbin.c | 69 -------------------
16 1 file changed, 69 deletions(-)
17
18diff --git a/tests/check/gst/gstbin.c b/tests/check/gst/gstbin.c
19index e366d5fe20..ac29d81474 100644
20--- a/tests/check/gst/gstbin.c
21+++ b/tests/check/gst/gstbin.c
22@@ -691,74 +691,6 @@ GST_START_TEST (test_message_state_changed_children)
23
24 GST_END_TEST;
25
26-GST_START_TEST (test_watch_for_state_change)
27-{
28- GstElement *src, *sink, *bin;
29- GstBus *bus;
30- GstStateChangeReturn ret;
31-
32- bin = gst_element_factory_make ("bin", NULL);
33- fail_unless (bin != NULL, "Could not create bin");
34-
35- bus = g_object_new (gst_bus_get_type (), NULL);
36- gst_object_ref_sink (bus);
37- gst_element_set_bus (GST_ELEMENT_CAST (bin), bus);
38-
39- src = gst_element_factory_make ("fakesrc", NULL);
40- fail_if (src == NULL, "Could not create fakesrc");
41- sink = gst_element_factory_make ("fakesink", NULL);
42- fail_if (sink == NULL, "Could not create fakesink");
43-
44- gst_bin_add (GST_BIN (bin), sink);
45- gst_bin_add (GST_BIN (bin), src);
46-
47- fail_unless (gst_element_link (src, sink), "could not link src and sink");
48-
49- /* change state, spawning two times three messages */
50- ret = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PAUSED);
51- fail_unless (ret == GST_STATE_CHANGE_ASYNC);
52- ret =
53- gst_element_get_state (GST_ELEMENT (bin), NULL, NULL,
54- GST_CLOCK_TIME_NONE);
55- fail_unless (ret == GST_STATE_CHANGE_SUCCESS);
56-
57- pop_state_changed (bus, 6);
58- pop_async_done (bus);
59- pop_latency (bus);
60-
61- fail_unless (gst_bus_have_pending (bus) == FALSE,
62- "Unexpected messages on bus");
63-
64- ret = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PLAYING);
65- fail_unless (ret == GST_STATE_CHANGE_SUCCESS);
66-
67- pop_state_changed (bus, 3);
68-
69- /* this one might return either SUCCESS or ASYNC, likely SUCCESS */
70- ret = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PAUSED);
71- gst_element_get_state (GST_ELEMENT (bin), NULL, NULL, GST_CLOCK_TIME_NONE);
72-
73- pop_state_changed (bus, 3);
74- if (ret == GST_STATE_CHANGE_ASYNC) {
75- pop_async_done (bus);
76- pop_latency (bus);
77- }
78-
79- fail_unless (gst_bus_have_pending (bus) == FALSE,
80- "Unexpected messages on bus");
81-
82- gst_bus_set_flushing (bus, TRUE);
83-
84- ret = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_NULL);
85- fail_unless (ret == GST_STATE_CHANGE_SUCCESS);
86-
87- /* clean up */
88- gst_object_unref (bus);
89- gst_object_unref (bin);
90-}
91-
92-GST_END_TEST;
93-
94 GST_START_TEST (test_state_change_error_message)
95 {
96 GstElement *src, *sink, *bin;
97@@ -1956,7 +1888,6 @@ gst_bin_suite (void)
98 tcase_add_test (tc_chain, test_message_state_changed);
99 tcase_add_test (tc_chain, test_message_state_changed_child);
100 tcase_add_test (tc_chain, test_message_state_changed_children);
101- tcase_add_test (tc_chain, test_watch_for_state_change);
102 tcase_add_test (tc_chain, test_state_change_error_message);
103 tcase_add_test (tc_chain, test_add_linked);
104 tcase_add_test (tc_chain, test_add_self);
105--
1062.33.1
107
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0_1.22.5.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0_1.24.7.imx.bb
index ce7b3f1d4..a5fc88444 100644
--- a/recipes-multimedia/gstreamer/gstreamer1.0_1.22.5.imx.bb
+++ b/recipes-multimedia/gstreamer/gstreamer1.0_1.24.7.imx.bb
@@ -92,13 +92,20 @@ LIC_FILES_CHKSUM = " \
92" 92"
93 93
94# Use i.MX fork of GST for customizations 94# Use i.MX fork of GST for customizations
95SRC_URI:remove = "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz" 95SRC_URI:remove = "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz \
96 file://0001-tests-respect-the-idententaion-used-in-meson.patch \
97 file://0002-tests-add-support-for-install-the-tests.patch \
98 file://0003-tests-use-a-dictionaries-for-environment.patch;striplevel=3 \
99 file://0004-tests-add-helper-script-to-run-the-installed_tests.patch;striplevel=3 \
100"
96SRC_URI:prepend = "${GST1.0_SRC};branch=${SRCBRANCH} " 101SRC_URI:prepend = "${GST1.0_SRC};branch=${SRCBRANCH} "
97GST1.0_SRC ?= "gitsm://github.com/nxp-imx/gstreamer.git;protocol=https" 102GST1.0_SRC ?= "gitsm://github.com/nxp-imx/gstreamer.git;protocol=https"
98SRCBRANCH = "MM_04.08.03_2312_L6.6.y" 103SRCBRANCH = "MM_04.09.03_2412_L6.12.y"
99SRCREV = "1a43c16272a7f4274eb8260e03206a57f317d823" 104SRCREV = "e0d37a7d773a502956f54eced8cd701ec7fa5ff5"
105
106S = "${UNPACKDIR}/${BP}"
100 107
101S = "${WORKDIR}/git" 108PACKAGECONFIG[tests] = "-Dtests=enabled,-Dtests=disabled"
102 109
103COMPATIBLE_MACHINE = "(imx-nxp-bsp)" 110COMPATIBLE_MACHINE = "(imx-nxp-bsp)"
104 111
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
deleted file mode 100644
index bdcb3f48e..000000000
--- a/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0001-aiurdemux-Fix-type-of-USER_DATA_LOCATION.patch
+++ /dev/null
@@ -1,33 +0,0 @@
1From 090fb758a63b7d362d9bee8b8a665d1346c83f83 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 13 Mar 2023 20:15:22 -0700
4Subject: [PATCH 01/10] aiurdemux: Fix type of USER_DATA_LOCATION
5
6It should be char pointer not integer
7Fixe
8plugins/aiurdemux/aiurdemux.c:198:47: error: incompatible integer to pointer conversion initializin
9g 'const gchar *' (aka 'const char *') with an expression of type 'int' [-Wint-conversion]
10 {USER_DATA_LOCATION, USER_DATA_FORMAT_UTF8, -1,
11 ^~
12Upstream-Status: Submitted [https://github.com/nxp-imx/imx-gst1.0-plugin/pull/4]
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 plugins/aiurdemux/aiurdemux.c | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18diff --git a/plugins/aiurdemux/aiurdemux.c b/plugins/aiurdemux/aiurdemux.c
19index 532b439..39c50ea 100755
20--- a/plugins/aiurdemux/aiurdemux.c
21+++ b/plugins/aiurdemux/aiurdemux.c
22@@ -195,7 +195,7 @@ static AiurDemuxTagEntry g_user_data_entry[] = {
23 "Track Number : %s\n"},
24 {USER_DATA_TOTALTRACKNUMBER, USER_DATA_FORMAT_UTF8, GST_TAG_TRACK_COUNT,
25 "Track Count : %s\n"},
26- {USER_DATA_LOCATION, USER_DATA_FORMAT_UTF8, -1,
27+ {USER_DATA_LOCATION, USER_DATA_FORMAT_UTF8, (const gchar*)-1,
28 "Location : %s\n"},
29 {USER_DATA_KEYWORDS, USER_DATA_FORMAT_UTF8, GST_TAG_KEYWORDS,
30 "Keywords : %s\n"},
31--
322.39.2
33
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
deleted file mode 100644
index d3fdf924b..000000000
--- a/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0002-aiurdemux.h-Include-glib-gprintf.h-for-g_printf-prot.patch
+++ /dev/null
@@ -1,28 +0,0 @@
1From f8b8322cd4c3a69e5cb47b5cb33abe860e89d6ed Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 12 Mar 2023 20:33:54 -0700
4Subject: [PATCH 02/10] aiurdemux.h: Include glib/gprintf.h for g_printf
5 prototype
6
7Upstream-Status: Submitted [https://github.com/nxp-imx/imx-gst1.0-plugin/pull/4]
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
10 plugins/aiurdemux/aiurdemux.h | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-)
12
13diff --git a/plugins/aiurdemux/aiurdemux.h b/plugins/aiurdemux/aiurdemux.h
14index 1d7d0a0..f7fcb2e 100755
15--- a/plugins/aiurdemux/aiurdemux.h
16+++ b/plugins/aiurdemux/aiurdemux.h
17@@ -39,7 +39,7 @@
18 #include <gst/gst.h>
19 #include <gst/base/gstadapter.h>
20 #include <gst/tag/tag.h>
21-
22+#include <glib/gprintf.h>
23 //#include "mfw_gst_utils.h"
24
25 #include "fsl_parser.h"
26--
272.39.2
28
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
deleted file mode 100644
index a690b4975..000000000
--- a/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0003-grecorder-Fix-build-with-clang.patch
+++ /dev/null
@@ -1,44 +0,0 @@
1From 19e6a541d2026386c9cfdeca0eebd269fef2536c Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 13 Mar 2023 20:29:01 -0700
4Subject: [PATCH 03/10] grecorder: Fix build with clang
5
6Add missing includes for APIs from libc and glib
7Add prototype declaration for post_message before
8using it in macros later in the same source file
9
10Upstream-Status: Submitted [https://github.com/nxp-imx/imx-gst1.0-plugin/pull/4]
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 tools/grecorder/grecorder.c | 5 ++++-
14 1 file changed, 4 insertions(+), 1 deletion(-)
15
16diff --git a/tools/grecorder/grecorder.c b/tools/grecorder/grecorder.c
17index c8eff2f..89aa801 100644
18--- a/tools/grecorder/grecorder.c
19+++ b/tools/grecorder/grecorder.c
20@@ -23,10 +23,11 @@
21 #include <semaphore.h>
22 #include <pthread.h>
23 #include <signal.h>
24+#include <unistd.h> /* sleep */
25 #include <getopt.h>
26 #define __USE_LARGEFILE64
27 #include <sys/statvfs.h>
28-
29+#include <glib/gprintf.h> /* g_print */
30 #include "recorder_engine.h"
31
32 #define LOG_ERROR printf
33@@ -168,6 +169,8 @@ static RecorderMessage latest_message = MESSAGE_NULL;
34
35 static volatile sig_atomic_t quit_flag = 0;
36
37+static void post_message (RecorderMessage message);
38+
39 static void signal_handler(int signum)
40 {
41 quit_flag = 1;
42--
432.39.2
44
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
deleted file mode 100644
index 292ab63f5..000000000
--- a/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0004-gstimxcommon-Return-0-instead-of-NULL-for-a-function.patch
+++ /dev/null
@@ -1,87 +0,0 @@
1From 141f8f692ae2c7e6d41a2d78113c806602122ad5 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 12 Mar 2023 19:51:27 -0700
4Subject: [PATCH 04/10] gstimxcommon: Return 0 instead of NULL for a functions
5 returning unsigned long
6
7Fixes
8gstimxcommon.c:113:10: error: incompatible pointer to integer conversion returning 'void *' from a function with result type 'unsigned long' [-Wint-conversion]
9 return NULL;
10
11Upstream-Status: Submitted [https://github.com/nxp-imx/imx-gst1.0-plugin/pull/4]
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 libs/gstimxcommon.c | 18 +++++++++---------
15 1 file changed, 9 insertions(+), 9 deletions(-)
16
17diff --git a/libs/gstimxcommon.c b/libs/gstimxcommon.c
18index 27fd913..803c6e5 100644
19--- a/libs/gstimxcommon.c
20+++ b/libs/gstimxcommon.c
21@@ -35,13 +35,13 @@ unsigned long phy_addr_from_fd(int dmafd)
22 int ret, fd;
23
24 if (dmafd < 0)
25- return NULL;
26+ return 0;
27
28 #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
29 #ifdef USE_ION
30 fd = open(dev_ion, O_RDWR);
31 if(fd < 0) {
32- return NULL;
33+ return 0;
34 }
35
36 struct ion_phys_dma_data data = {
37@@ -58,18 +58,18 @@ unsigned long phy_addr_from_fd(int dmafd)
38 ret = ioctl(fd, ION_IOC_CUSTOM, &custom);
39 close(fd);
40 if (ret < 0)
41- return NULL;
42+ return 0;
43
44 return data.phys;
45 #else
46- return NULL;
47+ return 0;
48 #endif /* USE_ION */
49 #else
50 struct dma_buf_phys dma_phys;
51
52 ret = ioctl(dmafd, DMA_BUF_IOCTL_PHYS, &dma_phys);
53 if (ret < 0)
54- return NULL;
55+ return 0;
56
57 return dma_phys.phys;
58 #endif
59@@ -86,7 +86,7 @@ unsigned long phy_addr_from_vaddr(void *vaddr, int size)
60 #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
61 fd = open(dev_ion, O_RDWR);
62 if(fd < 0) {
63- return NULL;
64+ return 0;
65 }
66
67 struct ion_phys_virt_data data = {
68@@ -103,13 +103,13 @@ unsigned long phy_addr_from_vaddr(void *vaddr, int size)
69 ret = ioctl(fd, ION_IOC_CUSTOM, &custom);
70 close(fd);
71 if (ret < 0)
72- return NULL;
73+ return 0;
74
75 return data.phys;
76 #else
77- return NULL;
78+ return 0;
79 #endif
80 #else
81- return NULL;
82+ return 0;
83 #endif
84 }
85--
862.39.2
87
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
deleted file mode 100644
index 5f67ba1b0..000000000
--- a/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0005-aiurstreamcache-Include-gst-gstinfo.h.patch
+++ /dev/null
@@ -1,28 +0,0 @@
1From 379b0492a4b53fd8fd42c734d04fd62df2e0465f Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 13 Mar 2023 20:16:48 -0700
4Subject: [PATCH 05/10] aiurstreamcache: Include gst/gstinfo.h
5
6Its needed for various GST_* defines
7
8Upstream-Status: Submitted [https://github.com/nxp-imx/imx-gst1.0-plugin/pull/4]
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 plugins/aiurdemux/aiurstreamcache.c | 1 +
12 1 file changed, 1 insertion(+)
13
14diff --git a/plugins/aiurdemux/aiurstreamcache.c b/plugins/aiurdemux/aiurstreamcache.c
15index d566268..e114a9d 100755
16--- a/plugins/aiurdemux/aiurstreamcache.c
17+++ b/plugins/aiurdemux/aiurstreamcache.c
18@@ -33,6 +33,7 @@
19 * Changelog:
20 *
21 */
22+ #include <gst/gstinfo.h>
23
24 GST_DEBUG_CATEGORY_EXTERN (aiurdemux_debug);
25 #define GST_CAT_DEFAULT aiurdemux_debug
26--
272.39.2
28
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
deleted file mode 100644
index ae3d10618..000000000
--- a/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0006-Fix-typecast-warnings-found-with-clang.patch
+++ /dev/null
@@ -1,61 +0,0 @@
1From 02e16c4de3f138f0ebabf699e840bb86c98be599 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 12 Mar 2023 20:45:23 -0700
4Subject: [PATCH 06/10] Fix typecast warnings found with clang
5
6Upstream-Status: Submitted [https://github.com/nxp-imx/imx-gst1.0-plugin/pull/4]
7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8---
9 libs/device-2d/imx_2d_device_g2d.c | 15 ++++++++-------
10 1 file changed, 8 insertions(+), 7 deletions(-)
11
12diff --git a/libs/device-2d/imx_2d_device_g2d.c b/libs/device-2d/imx_2d_device_g2d.c
13index 2672e0b..6a36f6a 100755
14--- a/libs/device-2d/imx_2d_device_g2d.c
15+++ b/libs/device-2d/imx_2d_device_g2d.c
16@@ -425,7 +425,7 @@ static gint imx_g2d_blit(Imx2DDevice *device,
17 goto err;
18 }
19 if (paddr) {
20- src->mem->paddr = paddr;
21+ src->mem->paddr = (guint8*)paddr;
22 } else {
23 GST_ERROR ("Can't get physical address.");
24 ret = -1;
25@@ -435,7 +435,7 @@ static gint imx_g2d_blit(Imx2DDevice *device,
26 if (!dst->mem->paddr) {
27 paddr = phy_addr_from_fd (dst->fd[0]);
28 if (paddr) {
29- dst->mem->paddr = paddr;
30+ dst->mem->paddr = (guint8*)paddr;
31 } else {
32 GST_ERROR ("Can't get physical address.");
33 ret = -1;
34@@ -474,10 +474,11 @@ static gint imx_g2d_blit(Imx2DDevice *device,
35
36 if (src->fd[1] >= 0)
37 {
38- if (!src->mem->user_data)
39- src->mem->user_data = g2d->src.base.planes[1] = phy_addr_from_fd (src->fd[1]);
40- else
41- g2d->src.base.planes[1] = src->mem->user_data;
42+ if (!src->mem->user_data) {
43+ g2d->src.base.planes[1] = (gint)phy_addr_from_fd (src->fd[1]);
44+ src->mem->user_data = (gpointer *)g2d->src.base.planes[1];
45+ } else
46+ g2d->src.base.planes[1] = (unsigned long)src->mem->user_data;
47 }
48 switch (src->interlace_type) {
49 case IMX_2D_INTERLACE_INTERLEAVED:
50@@ -693,7 +694,7 @@ static gint imx_g2d_fill_color(Imx2DDevice *device, Imx2DFrame *dst,
51 if (!dst->mem->paddr) {
52 paddr = phy_addr_from_fd (dst->fd[0]);
53 if (paddr) {
54- dst->mem->paddr = paddr;
55+ dst->mem->paddr = (guint8*)paddr;
56 } else {
57 GST_ERROR ("Can't get physical address.");
58 return -1;
59--
602.39.2
61
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
deleted file mode 100644
index 1983838af..000000000
--- a/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0007-gstimxv4l2-Fix-typecasting-errors.patch
+++ /dev/null
@@ -1,30 +0,0 @@
1From a1a2069403e227d4d40fc99257d1be077f65bdc8 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 12 Mar 2023 19:54:18 -0700
4Subject: [PATCH 07/10] gstimxv4l2: Fix typecasting errors
5
6Fixes
7gstimxv4l2.c:1702:22: error: incompatible pointer to integer conversion assigning to 'unsigned long' from 'guint8 *' (aka 'unsigned char *') [-Wint-conversion]
8
9Upstream-Status: Submitted [https://github.com/nxp-imx/imx-gst1.0-plugin/pull/4]
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 libs/v4l2_core/gstimxv4l2.c | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/libs/v4l2_core/gstimxv4l2.c b/libs/v4l2_core/gstimxv4l2.c
16index 1dc826b..bf2620a 100755
17--- a/libs/v4l2_core/gstimxv4l2.c
18+++ b/libs/v4l2_core/gstimxv4l2.c
19@@ -1699,7 +1699,7 @@ gint gst_imx_v4l2_register_buffer (gpointer v4l2handle, PhyMemBlock *memblk)
20 v4l2buf->type = handle->type;
21 v4l2buf->memory = handle->memory_mode;
22 v4l2buf->index = handle->allocated;
23- v4l2buf->m.userptr = memblk->paddr;
24+ v4l2buf->m.userptr = (unsigned long)memblk->paddr;
25 v4l2buf->length = memblk->size;
26 handle->buffer_pair[handle->allocated].vaddr = memblk->vaddr;
27
28--
292.39.2
30
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
deleted file mode 100644
index 211bade10..000000000
--- a/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0008-beepdec-Declare-beep_register_external_typefinders.patch
+++ /dev/null
@@ -1,32 +0,0 @@
1From e86c20fee52f79a270a1913c5f0be98fb3f5cb77 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 13 Mar 2023 20:18:18 -0700
4Subject: [PATCH 08/10] beepdec: Declare beep_register_external_typefinders
5
6Fixes
7plugins/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]
8 beep_register_external_typefinders (plugin);
9 ^
10
11Upstream-Status: Submitted [https://github.com/nxp-imx/imx-gst1.0-plugin/pull/4]
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 plugins/beepdec/beep.c | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/plugins/beepdec/beep.c b/plugins/beepdec/beep.c
18index 3543352..e174bb3 100755
19--- a/plugins/beepdec/beep.c
20+++ b/plugins/beepdec/beep.c
21@@ -37,7 +37,7 @@
22 #endif
23 #include "beepdec.h"
24 #include "gstimxcommon.h"
25-
26+extern gboolean beep_register_external_typefinders (GstPlugin * plugin);
27 static gboolean
28 plugin_init (GstPlugin * plugin)
29 {
30--
312.39.2
32
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
deleted file mode 100644
index 567d10267..000000000
--- a/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0009-gstimxv4l2.c-Fix-incompatible-integer-to-pointer-con.patch
+++ /dev/null
@@ -1,41 +0,0 @@
1From 8a3d7f26c73bdfe050d3331b30ae2f5917dc6723 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 12 Mar 2023 19:59:22 -0700
4Subject: [PATCH 09/10] gstimxv4l2.c: Fix incompatible integer to pointer
5 conversion returning
6
7Fixes
8gstimxv4l2.c:1587:24: error: incompatible pointer to integer conversion assigning to 'unsigned long' from 'guint8 *' (aka 'unsigned char *') [-Wint-c
9onversion]
10
11Upstream-Status: Submitted [https://github.com/nxp-imx/imx-gst1.0-plugin/pull/4]
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 libs/v4l2_core/gstimxv4l2.c | 4 ++--
15 1 file changed, 2 insertions(+), 2 deletions(-)
16
17diff --git a/libs/v4l2_core/gstimxv4l2.c b/libs/v4l2_core/gstimxv4l2.c
18index bf2620a..0fd7452 100755
19--- a/libs/v4l2_core/gstimxv4l2.c
20+++ b/libs/v4l2_core/gstimxv4l2.c
21@@ -1576,7 +1576,7 @@ static void * gst_imx_v4l2_find_buffer(gpointer v4l2handle, PhyMemBlock *memblk)
22
23 if (handle->allocated >= MAX_BUFFER) {
24 GST_ERROR ("No more v4l2 buffer for allocating.\n");
25- return -1;
26+ return NULL;
27 }
28
29 v4l2buf = &handle->buffer_pair[handle->allocated].v4l2buffer;
30@@ -1584,7 +1584,7 @@ static void * gst_imx_v4l2_find_buffer(gpointer v4l2handle, PhyMemBlock *memblk)
31 v4l2buf->type = handle->type;
32 v4l2buf->memory = handle->memory_mode;
33 v4l2buf->index = handle->allocated;
34- v4l2buf->m.userptr = memblk->paddr;
35+ v4l2buf->m.userptr = (unsigned long)memblk->paddr;
36 v4l2buf->length = memblk->size;
37 handle->buffer_pair[handle->allocated].vaddr = memblk->vaddr;
38
39--
402.39.2
41
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
deleted file mode 100644
index e9b1a0938..000000000
--- a/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0010-provide-declaration-for-aiur_register_external_typef.patch
+++ /dev/null
@@ -1,28 +0,0 @@
1From c2144da90e64547d9e346f8e721a0d2155ed610b Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 12 Mar 2023 21:09:49 -0700
4Subject: [PATCH 10/10] provide declaration for
5 aiur_register_external_typefinders
6
7Upstream-Status: Submitted [https://github.com/nxp-imx/imx-gst1.0-plugin/pull/4]
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
10 plugins/aiurdemux/aiur.c | 2 ++
11 1 file changed, 2 insertions(+)
12
13diff --git a/plugins/aiurdemux/aiur.c b/plugins/aiurdemux/aiur.c
14index 2a52465..681ae2e 100755
15--- a/plugins/aiurdemux/aiur.c
16+++ b/plugins/aiurdemux/aiur.c
17@@ -41,6 +41,8 @@
18 #include "aiurdemux.h"
19 #include "gstimxcommon.h"
20
21+extern gboolean aiur_register_external_typefinders (GstPlugin * plugin);
22+
23 static gboolean
24 plugin_init (GstPlugin * plugin)
25 {
26--
272.39.2
28
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
deleted file mode 100644
index 5a58a5a67..000000000
--- a/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0011-meson-Undef-_TIME_BITS-along-with-_FILE_OFFSET_BITS.patch
+++ /dev/null
@@ -1,34 +0,0 @@
1From bda3461b0b6493f3e04910e82e6e530a64af26b1 Mon Sep 17 00:00:00 2001
2From: Tom Hochstein <tom.hochstein@nxp.com>
3Date: Mon, 24 Jul 2023 12:09:34 -0700
4Subject: [PATCH] meson: Undef _TIME_BITS along with _FILE_OFFSET_BITS
5
6On gcc 13, _TIME_BITS is set to 64 and causes failure with the undef of
7_FILE_OFFSET_BITS:
8```
9/usr/include/features-time64.h:26:5: error: #error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
10 26 | # error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
11 | ^~~~~
12```
13
14Upstream-Status: Pending
15Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
16---
17 meson.build | 1 +
18 1 file changed, 1 insertion(+)
19
20diff --git a/meson.build b/meson.build
21index 7ec5c70..64b2930 100644
22--- a/meson.build
23+++ b/meson.build
24@@ -24,6 +24,7 @@ gst_dep = dependency('gstreamer-' + api_version, version : gst_req)
25 #meson automaticaly add _FILE_OFFSET_BITS=64 to gcc, this will make ipu test
26 #case fail when do mmap on 6q, autoconf didn't add this define, so undef it
27 add_project_arguments('-U_FILE_OFFSET_BITS', language: 'c')
28+add_project_arguments('-U_TIME_BITS', language: 'c')
29
30 #below two marcos are defined in autoconf
31 add_project_arguments ('-DARM', language: 'c')
32--
332.25.1
34
diff --git a/recipes-multimedia/gstreamer/imx-gst1.0-plugin_git.bb b/recipes-multimedia/gstreamer/imx-gst1.0-plugin_git.bb
index a13cf30ab..d7ac9b474 100644
--- a/recipes-multimedia/gstreamer/imx-gst1.0-plugin_git.bb
+++ b/recipes-multimedia/gstreamer/imx-gst1.0-plugin_git.bb
@@ -24,7 +24,9 @@ DEPENDS:append:imxvpu = " imx-vpuwrap"
24DEPENDS:append:imxfbdev:imxgpu = " libdrm" 24DEPENDS:append:imxfbdev:imxgpu = " libdrm"
25DEPENDS_IMXGPU = "" 25DEPENDS_IMXGPU = ""
26DEPENDS_IMXGPU:imxgpu = "${DEPENDS_IMX_OPENCL_CONVERTER}" 26DEPENDS_IMXGPU:imxgpu = "${DEPENDS_IMX_OPENCL_CONVERTER}"
27DEPENDS_IMX_OPENCL_CONVERTER = "" 27DEPENDS_IMX_OPENCL_CONVERTER = "imx-opencl-converter"
28DEPENDS_IMX_OPENCL_CONVERTER:mx6-nxp-bsp = ""
29DEPENDS_IMX_OPENCL_CONVERTER:mx7-nxp-bsp = ""
28DEPENDS_IMX_OPENCL_CONVERTER:mx8-nxp-bsp = "imx-opencl-converter" 30DEPENDS_IMX_OPENCL_CONVERTER:mx8-nxp-bsp = "imx-opencl-converter"
29DEPENDS_IMX_OPENCL_CONVERTER:mx8mm-nxp-bsp = "" 31DEPENDS_IMX_OPENCL_CONVERTER:mx8mm-nxp-bsp = ""
30DEPENDS_IMX_OPENCL_CONVERTER:mx95-nxp-bsp = "imx-opencl-converter" 32DEPENDS_IMX_OPENCL_CONVERTER:mx95-nxp-bsp = "imx-opencl-converter"
@@ -34,25 +36,11 @@ RREPLACES:${PN} = "gst1.0-fsl-plugin"
34RPROVIDES:${PN} = "gst1.0-fsl-plugin" 36RPROVIDES:${PN} = "gst1.0-fsl-plugin"
35RCONFLICTS:${PN} = "gst1.0-fsl-plugin" 37RCONFLICTS:${PN} = "gst1.0-fsl-plugin"
36 38
37PV = "4.8.3+git${SRCPV}" 39PV = "4.9.3+git${SRCPV}"
38 40
39SRC_URI = "git://github.com/nxp-imx/imx-gst1.0-plugin.git;protocol=https;branch=${SRCBRANCH} \ 41SRC_URI = "git://github.com/nxp-imx/imx-gst1.0-plugin.git;protocol=https;branch=${SRCBRANCH}"
40 file://0001-aiurdemux-Fix-type-of-USER_DATA_LOCATION.patch \ 42SRCBRANCH = "MM_04.09.03_2412_L6.12.y"
41 file://0002-aiurdemux.h-Include-glib-gprintf.h-for-g_printf-prot.patch \ 43SRCREV = "370510ef8137874339df18a2a35ec1d04d98fa0b"
42 file://0003-grecorder-Fix-build-with-clang.patch \
43 file://0004-gstimxcommon-Return-0-instead-of-NULL-for-a-function.patch \
44 file://0005-aiurstreamcache-Include-gst-gstinfo.h.patch \
45 file://0006-Fix-typecast-warnings-found-with-clang.patch \
46 file://0007-gstimxv4l2-Fix-typecasting-errors.patch \
47 file://0008-beepdec-Declare-beep_register_external_typefinders.patch \
48 file://0009-gstimxv4l2.c-Fix-incompatible-integer-to-pointer-con.patch \
49 file://0010-provide-declaration-for-aiur_register_external_typef.patch \
50 file://0011-meson-Undef-_TIME_BITS-along-with-_FILE_OFFSET_BITS.patch \
51 "
52SRCBRANCH = "MM_04.08.03_2312_L6.6.y"
53SRCREV = "91c7fec888cf8932c91e354331aad94975cae3ff"
54
55S = "${WORKDIR}/git"
56 44
57inherit meson pkgconfig use-imx-headers 45inherit meson pkgconfig use-imx-headers
58 46
@@ -61,13 +49,11 @@ PLATFORM:mx6sl-nxp-bsp = "MX6SL"
61PLATFORM:mx6sx-nxp-bsp = "MX6SX" 49PLATFORM:mx6sx-nxp-bsp = "MX6SX"
62PLATFORM:mx6ul-nxp-bsp = "MX6UL" 50PLATFORM:mx6ul-nxp-bsp = "MX6UL"
63PLATFORM:mx6sll-nxp-bsp = "MX6SLL" 51PLATFORM:mx6sll-nxp-bsp = "MX6SLL"
64PLATFORM:mx7-nxp-bsp= "MX7D" 52PLATFORM:mx7-nxp-bsp = "MX7D"
65PLATFORM:mx7ulp-nxp-bsp= "MX7ULP" 53PLATFORM:mx7ulp-nxp-bsp = "MX7ULP"
66PLATFORM:mx8-nxp-bsp = "MX8" 54PLATFORM:mx8-nxp-bsp = "MX8"
67PLATFORM:mx9-nxp-bsp = "MX9" 55PLATFORM:mx9-nxp-bsp = "MX9"
68 56
69CFLAGS:append:toolchain-clang = " -Wno-implicit-int -Wno-int-conversion -Wno-incompatible-function-pointer-types"
70
71# Todo add a mechanism to map possible build targets 57# Todo add a mechanism to map possible build targets
72EXTRA_OEMESON = "-Dplatform=${PLATFORM} \ 58EXTRA_OEMESON = "-Dplatform=${PLATFORM} \
73 -Dc_args="${CFLAGS} -I${STAGING_INCDIR_IMX}" \ 59 -Dc_args="${CFLAGS} -I${STAGING_INCDIR_IMX}" \
diff --git a/recipes-multimedia/imx-codec/imx-codec_4.8.3.bb b/recipes-multimedia/imx-codec/imx-codec_4.9.3.bb
index 0a2c71e76..5e42e6928 100644
--- a/recipes-multimedia/imx-codec/imx-codec_4.8.3.bb
+++ b/recipes-multimedia/imx-codec/imx-codec_4.9.3.bb
@@ -1,21 +1,24 @@
1# Copyright (C) 2012-2016 Freescale Semiconductor 1# Copyright (C) 2012-2016 Freescale Semiconductor
2# Copyright 2017 NXP-2023 2# Copyright (C) 2017-2024 NXP
3# Copyright 2018 (C) O.S. Systems Software LTDA. 3# Copyright 2018 (C) O.S. Systems Software LTDA.
4# Released under the MIT license (see COPYING.MIT for the terms) 4# Released under the MIT license (see COPYING.MIT for the terms)
5
5DESCRIPTION = "Freescale Multimedia codec libs" 6DESCRIPTION = "Freescale Multimedia codec libs"
6LICENSE = "Proprietary" 7LICENSE = "Proprietary"
7SECTION = "multimedia" 8SECTION = "multimedia"
8LIC_FILES_CHKSUM = "file://COPYING;md5=44a8052c384584ba09077e85a3d1654f" 9LIC_FILES_CHKSUM = "file://COPYING;md5=c0fb372b5d7f12181de23ef480f225f3"
9 10
10# Backward compatibility 11# Backward compatibility
11PROVIDES += "libfslcodec" 12PROVIDES += "libfslcodec"
12 13
13SRC_URI = "${FSL_MIRROR}/${BP}.bin;fsl-eula=true" 14SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}-${IMX_SRCREV_ABBREV}.bin;fsl-eula=true"
14SRC_URI[md5sum] = "7ae1615aad2c0456b9be2ab804a6267e" 15SRC_URI[sha256sum] = "61b40623e1c2322f1ba85da57ab6949f749d02b3b5cbc2b1ef583a99b59e8968"
15SRC_URI[sha256sum] = "9facb3541903b4a6c6baa906f8c2c6cc01fc8c7b82a726c8da6d3681d4ed720b" 16IMX_SRCREV_ABBREV = "394336b"
16 17
17inherit fsl-eula-unpack autotools pkgconfig 18inherit fsl-eula-unpack autotools pkgconfig
18 19
20S = "${UNPACKDIR}/${BPN}-${PV}-${IMX_SRCREV_ABBREV}"
21
19PACKAGECONFIG ??= "${PACKAGECONFIG_VPU}" 22PACKAGECONFIG ??= "${PACKAGECONFIG_VPU}"
20# Support Chips&Media VPU only 23# Support Chips&Media VPU only
21PACKAGECONFIG_VPU = "" 24PACKAGECONFIG_VPU = ""
@@ -60,7 +63,7 @@ do_package_qa[prefuncs] += "__set_insane_skip"
60 63
61python __split_libfslcodec_plugins() { 64python __split_libfslcodec_plugins() {
62 codecdir = bb.data.expand('${libdir}', d) 65 codecdir = bb.data.expand('${libdir}', d)
63 do_split_packages(d, codecdir, '^lib_([^_]*).*_arm.*_elinux\.so\..*', 66 do_split_packages(d, codecdir, r'^lib_([^_]*).*_arm.*_elinux\.so\..*',
64 aux_files_pattern='${libdir}/imx-mm/audio-codec/wrap/lib_%sd_wrap_arm*_elinux.so.*', 67 aux_files_pattern='${libdir}/imx-mm/audio-codec/wrap/lib_%sd_wrap_arm*_elinux.so.*',
65 output_pattern='imx-codec-%s', 68 output_pattern='imx-codec-%s',
66 description='Freescale i.MX Codec (%s)', 69 description='Freescale i.MX Codec (%s)',
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.8.bb
index bc73bd9f9..d9986456a 100644
--- a/recipes-multimedia/imx-dsp/imx-dsp-codec-ext_2.1.7.bb
+++ b/recipes-multimedia/imx-dsp/imx-dsp-codec-ext_2.1.8.bb
@@ -2,14 +2,13 @@
2 2
3DESCRIPTION = "i.MX DSP Codec Wrapper and Lib owned by NXP" 3DESCRIPTION = "i.MX DSP Codec Wrapper and Lib owned by NXP"
4LICENSE = "Proprietary" 4LICENSE = "Proprietary"
5LIC_FILES_CHKSUM = "file://COPYING;md5=44a8052c384584ba09077e85a3d1654f" 5LIC_FILES_CHKSUM = "file://COPYING;md5=10c0fda810c63b052409b15a5445671a"
6 6
7inherit fsl-eula-unpack autotools pkgconfig 7inherit fsl-eula-unpack autotools pkgconfig
8 8
9SRC_URI = "${FSL_MIRROR}/${BP}.bin;fsl-eula=true" 9SRC_URI = "${FSL_MIRROR}/${BP}.bin;fsl-eula=true"
10 10
11SRC_URI[md5sum] = "32251bc952ca7b9a4b12fadb9328a8c1" 11SRC_URI[sha256sum] = "fa30f3e1b13e570d7c6f0a5f335c11fc3c6336a266fd3a4941e27c4c2a5b13d3"
12SRC_URI[sha256sum] = "0baa82410a77c68e39aaa987d91b41c94255d62294fa2f5a399169f3068862cc"
13 12
14EXTRA_OECONF:append:mx8qm-nxp-bsp = " --enable-imx8qmqxp" 13EXTRA_OECONF:append:mx8qm-nxp-bsp = " --enable-imx8qmqxp"
15EXTRA_OECONF:append:mx8qxp-nxp-bsp = " --enable-imx8qmqxp" 14EXTRA_OECONF:append:mx8qxp-nxp-bsp = " --enable-imx8qmqxp"
diff --git a/recipes-multimedia/imx-dsp/imx-dsp_2.1.7.bb b/recipes-multimedia/imx-dsp/imx-dsp_2.1.10.bb
index 60761e6e1..96656f85b 100644
--- a/recipes-multimedia/imx-dsp/imx-dsp_2.1.7.bb
+++ b/recipes-multimedia/imx-dsp/imx-dsp_2.1.10.bb
@@ -1,16 +1,17 @@
1# Copyright 2017-2023 NXP 1# Copyright 2017-2022,2024 NXP
2 2
3DESCRIPTION = "i.MX DSP Wrapper, Firmware Binary, Codec Libraries" 3DESCRIPTION = "i.MX DSP Wrapper, Firmware Binary, Codec Libraries"
4LICENSE = "Proprietary" 4LICENSE = "Proprietary"
5LIC_FILES_CHKSUM = "file://COPYING;md5=44a8052c384584ba09077e85a3d1654f" 5LIC_FILES_CHKSUM = "file://COPYING;md5=c0fb372b5d7f12181de23ef480f225f3"
6
7 6
8inherit fsl-eula-unpack autotools pkgconfig 7inherit fsl-eula-unpack autotools pkgconfig
9 8
10SRC_URI = "${FSL_MIRROR}/${BP}.bin;fsl-eula=true" 9IMX_SRCREV_ABBREV = "ea4fe3f"
10SRC_URI = "${FSL_MIRROR}/${BP}-${IMX_SRCREV_ABBREV}.bin;fsl-eula=true"
11
12S = "${UNPACKDIR}/${BP}-${IMX_SRCREV_ABBREV}"
11 13
12SRC_URI[md5sum] = "199f88716f289e93e0954fa6475a3cbc" 14SRC_URI[sha256sum] = "fc6e6a7c2417730b39eeddc26606c3d58a8f5d0a1521f44bbbd505657046858b"
13SRC_URI[sha256sum] = "83eaef592de33b4d5e8fae63d798cc955bf3c414911c87afeb65a20af01fb0b6"
14 15
15EXTRA_OECONF = " \ 16EXTRA_OECONF = " \
16 -datadir=${base_libdir}/firmware \ 17 -datadir=${base_libdir}/firmware \
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 48be837a9..9655b1f7d 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
@@ -6,7 +6,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=72c0f70181bb6e83eee6aab8de12a9f3"
6 6
7SRC_URI = "${FSL_MIRROR}/${BP}.bin;fsl-eula=true" 7SRC_URI = "${FSL_MIRROR}/${BP}.bin;fsl-eula=true"
8 8
9SRC_URI[md5sum] = "d46005ee29ca603caa2e1b1e82953ff1"
10SRC_URI[sha256sum] = "e79cbf4788a86a0068bbe80c37317e3332ae76e3d5c3ff2eabd71f03121fab6a" 9SRC_URI[sha256sum] = "e79cbf4788a86a0068bbe80c37317e3332ae76e3d5c3ff2eabd71f03121fab6a"
11 10
12inherit fsl-eula-unpack autotools pkgconfig 11inherit fsl-eula-unpack autotools pkgconfig
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
deleted file mode 100644
index 3dc0a7ea5..000000000
--- a/recipes-multimedia/imx-opencl-converter/imx-opencl-converter_0.2.0.bb
+++ /dev/null
@@ -1,18 +0,0 @@
1# Copyright 2023 NXP
2DESCRIPTION = "NXP Multimedia opencl converter lib"
3LICENSE = "Proprietary"
4SECTION = "multimedia"
5LIC_FILES_CHKSUM = "file://COPYING;md5=44a8052c384584ba09077e85a3d1654f"
6DEPENDS = "opencl-headers"
7
8SRC_URI = "${FSL_MIRROR}/${BP}.bin;fsl-eula=true"
9SRC_URI[md5sum] = "dc668682189ce740fb46073e62f58066"
10SRC_URI[sha256sum] = "9f283df500c57421b87d96d9af7022ab490bc241aa28d00755beaadabbcd754b"
11
12inherit fsl-eula-unpack autotools pkgconfig meson
13
14FILES:${PN} += "${datadir}/"
15
16COMPATIBLE_MACHINE = "(^$)"
17COMPATIBLE_MACHINE:imxgpu = "(mx8-nxp-bsp|mx95-nxp-bsp)"
18COMPATIBLE_MACHINE:mx8mm-nxp-bsp = "(^$)"
diff --git a/recipes-multimedia/imx-opencl-converter/imx-opencl-converter_0.7.0.bb b/recipes-multimedia/imx-opencl-converter/imx-opencl-converter_0.7.0.bb
new file mode 100644
index 000000000..84f3ee6aa
--- /dev/null
+++ b/recipes-multimedia/imx-opencl-converter/imx-opencl-converter_0.7.0.bb
@@ -0,0 +1,20 @@
1# Copyright 2023-2024 NXP
2DESCRIPTION = "NXP Multimedia opencl converter lib"
3LICENSE = "Proprietary"
4SECTION = "multimedia"
5LIC_FILES_CHKSUM = "file://COPYING;md5=c0fb372b5d7f12181de23ef480f225f3"
6DEPENDS = "virtual/opencl-icd"
7
8SRC_URI = "${FSL_MIRROR}/${BP}-${IMX_SRCREV_ABBREV}.bin;fsl-eula=true"
9IMX_SRCREV_ABBREV = "ad0094a"
10
11SRC_URI[sha256sum] = "d23ad4234f34ffcfb37d77c91345b935894937913a68995223d2f9f421eade46"
12
13S = "${UNPACKDIR}/${BP}-${IMX_SRCREV_ABBREV}"
14inherit fsl-eula-unpack autotools pkgconfig meson
15
16FILES:${PN} += "${datadir}/"
17
18COMPATIBLE_MACHINE = "(^$)"
19COMPATIBLE_MACHINE:imxgpu = "(mx8-nxp-bsp|mx95-nxp-bsp)"
20COMPATIBLE_MACHINE:mx8mm-nxp-bsp = "(^$)"
diff --git a/recipes-multimedia/imx-parser/imx-parser_4.8.3.bb b/recipes-multimedia/imx-parser/imx-parser_4.9.3.bb
index 4e580085f..d770b66ea 100644
--- a/recipes-multimedia/imx-parser/imx-parser_4.8.3.bb
+++ b/recipes-multimedia/imx-parser/imx-parser_4.9.3.bb
@@ -5,7 +5,7 @@
5DESCRIPTION = "Freescale Multimedia parser libs" 5DESCRIPTION = "Freescale Multimedia parser libs"
6LICENSE = "Proprietary" 6LICENSE = "Proprietary"
7SECTION = "multimedia" 7SECTION = "multimedia"
8LIC_FILES_CHKSUM = "file://COPYING;md5=44a8052c384584ba09077e85a3d1654f" 8LIC_FILES_CHKSUM = "file://COPYING;md5=c0fb372b5d7f12181de23ef480f225f3"
9 9
10# For backwards compatibility 10# For backwards compatibility
11PROVIDES += "libfslparser" 11PROVIDES += "libfslparser"
@@ -13,9 +13,11 @@ RREPLACES:${PN} = "libfslparser"
13RPROVIDES:${PN} = "libfslparser" 13RPROVIDES:${PN} = "libfslparser"
14RCONFLICTS:${PN} = "libfslparser" 14RCONFLICTS:${PN} = "libfslparser"
15 15
16SRC_URI = "${FSL_MIRROR}/${BP}.bin;fsl-eula=true" 16SRC_URI = "${FSL_MIRROR}/${BP}-${IMX_SRCREV_ABBREV}.bin;fsl-eula=true"
17SRC_URI[md5sum] = "9bca484287f5592b86ed10c1761a3fcc" 17IMX_SRCREV_ABBREV = "c296eb2"
18SRC_URI[sha256sum] = "b25267eefb4618b2ba8d6aba46a5b4e09621a44115036fc896e0777006472043" 18S = "${UNPACKDIR}/${BP}-${IMX_SRCREV_ABBREV}"
19
20SRC_URI[sha256sum] = "997a7f79f291ef4b3c8dd3ba6f2f32c430c63feb4bb29d923f71da0d1ccf20a9"
19 21
20inherit fsl-eula-unpack autotools pkgconfig 22inherit fsl-eula-unpack autotools pkgconfig
21 23
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
index 2b62b2443..68919ac83 100644
--- 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
@@ -6,7 +6,6 @@ SECTION = "multimedia"
6LIC_FILES_CHKSUM = "file://COPYING;md5=63a38e9f392d8813d6f1f4d0d6fbe657" 6LIC_FILES_CHKSUM = "file://COPYING;md5=63a38e9f392d8813d6f1f4d0d6fbe657"
7 7
8SRC_URI = "${FSL_MIRROR}/${BP}.bin;fsl-eula=true" 8SRC_URI = "${FSL_MIRROR}/${BP}.bin;fsl-eula=true"
9SRC_URI[md5sum] = "cbd5af6e9019db789c03c2d05a8bb444"
10SRC_URI[sha256sum] = "f778a7b785fc500df5573f5b810a190ddc561267b47ca54b9ddf4ae12571cfe3" 9SRC_URI[sha256sum] = "f778a7b785fc500df5573f5b810a190ddc561267b47ca54b9ddf4ae12571cfe3"
11 10
12inherit fsl-eula-unpack autotools pkgconfig 11inherit fsl-eula-unpack autotools pkgconfig
diff --git a/recipes-multimedia/imx-vpuwrap/imx-vpuwrap/0001-vpu_wrapper_hantro_encoder-fix-missing-include.patch b/recipes-multimedia/imx-vpuwrap/imx-vpuwrap/0001-vpu_wrapper_hantro_encoder-fix-missing-include.patch
new file mode 100644
index 000000000..74ea5206c
--- /dev/null
+++ b/recipes-multimedia/imx-vpuwrap/imx-vpuwrap/0001-vpu_wrapper_hantro_encoder-fix-missing-include.patch
@@ -0,0 +1,32 @@
1From a3c2f61649afd05e4bab457370f0b32d7644505c Mon Sep 17 00:00:00 2001
2From: Max Krummenacher <max.krummenacher@toradex.com>
3Date: Mon, 3 Mar 2025 08:24:51 +0000
4Subject: [PATCH] vpu_wrapper_hantro_encoder: fix missing include
5
6gettimeofday is declared in sys/time.h. Add the include.
7
8Fixes the build error:
9| ../git/vpu_wrapper_hantro_encoder.c:953:3: error: implicit declaration of function 'gettimeofday' [-Wimplicit-function-declaration]
10| 953 | gettimeofday (&pObj->tvEnd, NULL);
11
12Upstream-Status: Pending
13Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
14---
15 vpu_wrapper_hantro_encoder.c | 1 +
16 1 file changed, 1 insertion(+)
17
18diff --git a/vpu_wrapper_hantro_encoder.c b/vpu_wrapper_hantro_encoder.c
19index 3819c389320c..a0bdb2f4f6c0 100755
20--- a/vpu_wrapper_hantro_encoder.c
21+++ b/vpu_wrapper_hantro_encoder.c
22@@ -25,6 +25,7 @@
23 #include <string.h>
24 #include <time.h>
25 #include <semaphore.h>
26+#include <sys/time.h>
27
28 #include "headers/OMX_Video.h"
29 #include "headers/OMX_VideoExt.h"
30--
312.42.0
32
diff --git a/recipes-multimedia/imx-vpuwrap/imx-vpuwrap_git.bb b/recipes-multimedia/imx-vpuwrap/imx-vpuwrap_git.bb
index af15e7b1b..39729f712 100644
--- a/recipes-multimedia/imx-vpuwrap/imx-vpuwrap_git.bb
+++ b/recipes-multimedia/imx-vpuwrap/imx-vpuwrap_git.bb
@@ -1,23 +1,26 @@
1# Copyright (C) 2013-2016 Freescale Semiconductor 1# Copyright (C) 2013-2016 Freescale Semiconductor
2# Copyright 2017-2023 NXP 2# Copyright (C) 2017-2023 NXP
3# Released under the MIT license (see COPYING.MIT for the terms) 3# Released under the MIT license (see COPYING.MIT for the terms)
4 4
5DESCRIPTION = "Freescale Multimedia VPU wrapper" 5DESCRIPTION = "Freescale Multimedia VPU wrapper"
6LICENSE = "Proprietary" 6LICENSE = "Proprietary"
7SECTION = "multimedia" 7SECTION = "multimedia"
8LIC_FILES_CHKSUM = "file://COPYING;md5=2827219e81f28aba7c6a569f7c437fa7" 8LIC_FILES_CHKSUM = "file://COPYING;md5=c0fb372b5d7f12181de23ef480f225f3"
9 9
10DEPENDS = "virtual/imxvpu" 10DEPENDS = "virtual/imxvpu"
11DEPENDS:append:mx8mp-nxp-bsp = " imx-vpu-hantro-vc" 11DEPENDS:append:mx8mp-nxp-bsp = " imx-vpu-hantro-vc"
12 12
13SRC_URI = "git://github.com/NXP/imx-vpuwrap.git;protocol=https;branch=${SRCBRANCH}" 13SRC_URI = " \
14SRCBRANCH = "MM_04.08.03_2312_L6.6.y" 14 git://github.com/NXP/imx-vpuwrap.git;protocol=https;branch=${SRCBRANCH} \
15SRCREV = "f974cecdb00b4a214e4b5229f2279e772ee43306" 15 file://0001-vpu_wrapper_hantro_encoder-fix-missing-include.patch \
16 16"
17S = "${WORKDIR}/git" 17SRCBRANCH = "MM_04.09.03_2412_L6.12.y"
18SRCREV = "d8703ee3245797111ad21c52982efa8b6db33241"
18 19
19inherit autotools pkgconfig 20inherit autotools pkgconfig
20 21
22CFLAGS += " -Wno-error=implicit-function-declaration"
23
21do_install:append() { 24do_install:append() {
22 # FIXME: Drop examples for now 25 # FIXME: Drop examples for now
23 rm -r ${D}${datadir} 26 rm -r ${D}${datadir}
diff --git a/recipes-multimedia/libimxvpuapi/libimxvpuapi2_2.3.0.bb b/recipes-multimedia/libimxvpuapi/libimxvpuapi2_2.3.1.bb
index 1e7d8252c..cce4e56ad 100644
--- a/recipes-multimedia/libimxvpuapi/libimxvpuapi2_2.3.0.bb
+++ b/recipes-multimedia/libimxvpuapi/libimxvpuapi2_2.3.1.bb
@@ -11,12 +11,10 @@ DEPENDS:append:mx8mp-nxp-bsp = " imx-vpu-hantro-vc"
11PV .= "+git${SRCPV}" 11PV .= "+git${SRCPV}"
12 12
13SRCBRANCH ?= "master" 13SRCBRANCH ?= "master"
14SRCREV = "6f803f46d6b53a08cf02fc3d440072e01e2f3a09" 14SRCREV = "37095a854aa176bb763a25ce98ceb6a787501271"
15SRC_URI = "git://github.com/Freescale/libimxvpuapi.git;branch=${SRCBRANCH};protocol=https" 15SRC_URI = "git://github.com/Freescale/libimxvpuapi.git;branch=${SRCBRANCH};protocol=https"
16 16
17S = "${WORKDIR}/git" 17inherit waf pkgconfig use-imx-headers python3native
18
19inherit waf pkgconfig use-imx-headers
20 18
21IMX_PLATFORM:mx6-nxp-bsp = "imx6" 19IMX_PLATFORM:mx6-nxp-bsp = "imx6"
22IMX_PLATFORM:mx8mq-nxp-bsp = "imx8m" 20IMX_PLATFORM:mx8mq-nxp-bsp = "imx8m"
diff --git a/recipes-multimedia/libimxvpuapi/libimxvpuapi_git.bb b/recipes-multimedia/libimxvpuapi/libimxvpuapi_git.bb
index e3a051937..55063db18 100644
--- a/recipes-multimedia/libimxvpuapi/libimxvpuapi_git.bb
+++ b/recipes-multimedia/libimxvpuapi/libimxvpuapi_git.bb
@@ -12,9 +12,7 @@ SRCBRANCH ?= "v1"
12SRCREV = "3a1ee3a54fe93813868d38c3d32ea065b59e227e" 12SRCREV = "3a1ee3a54fe93813868d38c3d32ea065b59e227e"
13SRC_URI = "git://github.com/Freescale/libimxvpuapi.git;branch=${SRCBRANCH};protocol=https" 13SRC_URI = "git://github.com/Freescale/libimxvpuapi.git;branch=${SRCBRANCH};protocol=https"
14 14
15S = "${WORKDIR}/git" 15inherit waf pkgconfig python3native
16
17inherit waf pkgconfig
18 16
19COMPATIBLE_MACHINE = "(mx6q-nxp-bsp|mx6dl-nxp-bsp)" 17COMPATIBLE_MACHINE = "(mx6q-nxp-bsp|mx6dl-nxp-bsp)"
20 18
diff --git a/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend b/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend
index 93f71e8f6..6e4db9110 100644
--- a/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend
+++ b/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend
@@ -17,9 +17,9 @@ SRC_URI_IMX:mx9-nxp-bsp = " \
17CACHED_CONFIGUREVARS:append:mx6-nxp-bsp = " ax_cv_PTHREAD_PRIO_INHERIT=no" 17CACHED_CONFIGUREVARS:append:mx6-nxp-bsp = " ax_cv_PTHREAD_PRIO_INHERIT=no"
18 18
19do_install:append() { 19do_install:append() {
20 if [ -e "${WORKDIR}/daemon.conf" ] && [ -e "${WORKDIR}/default.pa" ]; then 20 if [ -e "${UNPACKDIR}/daemon.conf" ] && [ -e "${UNPACKDIR}/default.pa" ]; then
21 install -m 0644 ${WORKDIR}/daemon.conf ${D}${sysconfdir}/pulse/daemon.conf 21 install -m 0644 ${UNPACKDIR}/daemon.conf ${D}${sysconfdir}/pulse/daemon.conf
22 install -m 0644 ${WORKDIR}/default.pa ${D}${sysconfdir}/pulse/default.pa 22 install -m 0644 ${UNPACKDIR}/default.pa ${D}${sysconfdir}/pulse/default.pa
23 fi 23 fi
24} 24}
25 25
diff --git a/recipes-multimedia/tinycompress/tinycompress/0001-tinycompress-Add-id3-decoding.patch b/recipes-multimedia/tinycompress/tinycompress/0001-tinycompress-Add-id3-decoding.patch
deleted file mode 100755
index 78ff6989c..000000000
--- a/recipes-multimedia/tinycompress/tinycompress/0001-tinycompress-Add-id3-decoding.patch
+++ /dev/null
@@ -1,1002 +0,0 @@
1From 16f6b7a5baec41f18fde75fd311fb988e3c31810 Mon Sep 17 00:00:00 2001
2From: Shengjiu Wang <shengjiu.wang@nxp.com>
3Date: Fri, 13 Jul 2018 18:13:24 +0800
4Subject: [PATCH] tinycompress: Add id3 decoding
5
6Upstream-Status: Pending
7Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
8---
9 include/tinycompress/id3_tag_decode.h | 198 +++++++++++
10 src/utils/Makefile.am | 2 +-
11 src/utils/cplay.c | 88 +++++
12 src/utils/id3_tag_decode.c | 642 ++++++++++++++++++++++++++++++++++
13 4 files changed, 929 insertions(+), 1 deletion(-)
14 create mode 100644 include/tinycompress/id3_tag_decode.h
15 create mode 100644 src/utils/id3_tag_decode.c
16
17diff --git a/include/tinycompress/id3_tag_decode.h b/include/tinycompress/id3_tag_decode.h
18new file mode 100644
19index 0000000..1a911d7
20--- /dev/null
21+++ b/include/tinycompress/id3_tag_decode.h
22@@ -0,0 +1,198 @@
23+/*
24+ * Copyright (c) 2006-2017 Cadence Design Systems, Inc.
25+ * Copyright 2018 NXP
26+ *
27+ * Permission is hereby granted, free of charge, to any person obtaining
28+ * a copy of this software and associated documentation files (the
29+ * "Software"), to deal in the Software without restriction, including
30+ * without limitation the rights to use, copy, modify, merge, publish,
31+ * distribute, sublicense, and/or sell copies of the Software, and to
32+ * permit persons to whom the Software is furnished to do so, subject to
33+ * the following conditions:
34+ *
35+ * The above copyright notice and this permission notice shall be included
36+ * in all copies or substantial portions of the Software.
37+ *
38+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
39+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
40+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
41+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
42+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
43+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
44+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
45+ */
46+
47+/******************************************************************
48+ * file name : id3_tag_decode.h
49+ *
50+ * description : stores typedefs of structures specific to MP3 tag
51+ *
52+ * revision history:
53+ * 29 04 2004 DK creation
54+ *****************************************************************/
55+
56+#ifndef ID3_TAG_DECODE_H
57+#define ID3_TAG_DECODE_H
58+
59+typedef signed char WORD8;
60+typedef signed char * pWORD8;
61+typedef unsigned char UWORD8;
62+typedef unsigned char * pUWORD8;
63+
64+typedef signed short WORD16;
65+typedef signed short * pWORD16;
66+typedef unsigned short UWORD16;
67+typedef unsigned short * pUWORD16;
68+
69+typedef signed int WORD24;
70+typedef signed int * pWORD24;
71+typedef unsigned int UWORD24;
72+typedef unsigned int * pUWORD24;
73+
74+typedef signed int WORD32;
75+typedef signed int * pWORD32;
76+typedef unsigned int UWORD32;
77+typedef unsigned int * pUWORD32;
78+
79+typedef void VOID;
80+typedef void * pVOID;
81+
82+typedef signed int BOOL;
83+typedef unsigned int UBOOL;
84+typedef signed int FLAG;
85+typedef unsigned int UFLAG;
86+typedef signed int LOOPIDX;
87+typedef unsigned int ULOOPIDX;
88+typedef signed int WORD;
89+typedef unsigned int UWORD;
90+
91+#define MAX_TAG_FRAME_SIZE 100
92+
93+#define ID3V1 (0x544147) /* 0x544147 is TAG in WORD8 */
94+
95+#define ID3V2 (0x494433) /* 0x494433 is ID3 in WORD8 */
96+
97+/*
98+ * structure corresponding to ID3 tag v1 header.
99+ * this structure has all the field corresponding to ID3 tag v1 header.
100+ */
101+
102+typedef struct {
103+ WORD32 tag; // 3 bytes
104+
105+ WORD16 version; // 2 bytes
106+
107+ WORD8 flag; //1 byte
108+
109+ WORD32 size; //4 bytes
110+
111+} id3_v2_header_struct;
112+
113+/* structure which will store the frame data and
114+ * also put a limit max data to be stored
115+ */
116+typedef struct {
117+ WORD8 frame_data[MAX_TAG_FRAME_SIZE];
118+
119+ WORD32 max_size; //4 bytes
120+
121+ WORD16 tag_present;
122+
123+ WORD16 exceeds_buffer_size;
124+
125+} id3_v2_frame_struct;
126+
127+/*
128+ * structure corresponding to ID3 tag v2.
129+ * this structure has some of the field corresponding to ID3 tag v2.
130+ * if user wants to read some more tag information from
131+ * the MP3 file, he can add that field in this structure and pass address
132+ * of that element to get_inf function in id3_tag_decode.c under the
133+ * corresponding field frame header. few fields which are needed are already
134+ * populated by reading from the TAG header.
135+ */
136+typedef struct {
137+ id3_v2_frame_struct album_movie_show_title;
138+
139+ id3_v2_frame_struct composer_name;
140+
141+ id3_v2_frame_struct content_type;
142+
143+ id3_v2_frame_struct encoded_by;
144+
145+ id3_v2_frame_struct lyricist_text_writer;
146+
147+ id3_v2_frame_struct content_group_description;
148+
149+ id3_v2_frame_struct title_songname_content_description;
150+
151+ id3_v2_frame_struct medxa_type;
152+
153+ id3_v2_frame_struct original_album_movie_show_title;
154+
155+ id3_v2_frame_struct original_filename;
156+
157+ id3_v2_frame_struct original_lyricist_text_writer;
158+
159+ id3_v2_frame_struct original_artist_performer;
160+
161+ id3_v2_frame_struct file_owner_licensee;
162+
163+ id3_v2_frame_struct lead_performer_soloist;
164+
165+ id3_v2_frame_struct publisher;
166+
167+ id3_v2_frame_struct private_frame;
168+
169+ id3_v2_frame_struct other_info;
170+
171+ id3_v2_header_struct id3_v2_header;
172+
173+ WORD32 header_end;
174+
175+ WORD32 bytes_consumed;
176+
177+} id3v2_struct;
178+
179+/*
180+ * structure corresponding to ID3 tag v1.
181+ * this structure has all the field corresponding to ID3 tag v1.
182+ */
183+typedef struct {
184+ WORD8 song_title[30]; //30 word8acters
185+
186+ WORD8 artist[30]; //30 word8acters
187+
188+ WORD8 album[30]; //30 word8acters
189+
190+ WORD8 year[4]; //4 word8acters
191+
192+ WORD8 comment[30]; //30 word8acters
193+
194+ WORD8 genre[1]; //1 byte
195+
196+} id3v1_struct;
197+
198+WORD32 get_info(const char *inp_buffer,
199+ unsigned int avail_inp,
200+ WORD32 tag_size,
201+ id3_v2_frame_struct *dest);
202+
203+WORD32 search_id3_v2(UWORD8 *buffer);
204+
205+WORD32 decode_id3_v2(const char *const buffer,
206+ id3v2_struct *id3v2,
207+ WORD32 continue_flag,
208+ WORD32 insize);
209+
210+WORD32 get_id3_v2_bytes(UWORD8 *buffer);
211+
212+WORD32 get_v1_info(UWORD8 *buffer, id3v1_struct *id3v1);
213+
214+WORD32 search_id3_v1(UWORD8 *buffer);
215+
216+WORD32 decode_id3_v1(UWORD8 *buffer, id3v1_struct *id3v1);
217+
218+void init_id3v2_field(id3v2_struct *id3v2);
219+
220+#endif
221diff --git a/src/utils/Makefile.am b/src/utils/Makefile.am
222index 1b996d4..e813689 100644
223--- a/src/utils/Makefile.am
224+++ b/src/utils/Makefile.am
225@@ -1,6 +1,6 @@
226 bin_PROGRAMS = cplay crecord
227
228-cplay_SOURCES = cplay.c
229+cplay_SOURCES = cplay.c id3_tag_decode.c
230 crecord_SOURCES = crecord.c
231
232 cplay_CFLAGS = -I$(top_srcdir)/include
233diff --git a/src/utils/cplay.c b/src/utils/cplay.c
234index 87863a3..2a52b52 100644
235--- a/src/utils/cplay.c
236+++ b/src/utils/cplay.c
237@@ -72,6 +72,7 @@
238 #include "sound/compress_params.h"
239 #include "tinycompress/tinycompress.h"
240 #include "tinycompress/tinymp3.h"
241+#include "tinycompress/id3_tag_decode.h"
242
243 static int verbose;
244 static const unsigned int DEFAULT_CODEC_ID = SND_AUDIOCODEC_PCM;
245@@ -245,12 +246,97 @@ int main(int argc, char **argv)
246 exit(EXIT_SUCCESS);
247 }
248
249+void shift_buffer(char *buf, int buf_size, int bytes_consumed)
250+{
251+ int i;
252+
253+ if (bytes_consumed <= 0)
254+ return;
255+
256+ for (i = 0; i < buf_size - bytes_consumed; i++)
257+ buf[i] = buf[i + bytes_consumed];
258+}
259+
260+void parse_id3(FILE *file, int *offset) {
261+ /* ID3 tag specific declarations */
262+ unsigned char id3_buf[128];
263+ unsigned char id3v2_buf[4096];
264+ signed int id3_v1_found = 0, id3_v1_decoded = 0;
265+ signed int id3_v2_found = 0, id3_v2_complete = 0;
266+ signed int i_bytes_consumed = 0;
267+ signed int i_fread_bytes;
268+ id3v1_struct id3v1;
269+ id3v2_struct id3v2;
270+
271+ {
272+ fseek(file, -128, SEEK_END);
273+ fread(id3_buf, 1, 128, file);
274+
275+ /* search for ID3V1 */
276+ id3_v1_found = search_id3_v1(id3_buf + 0);
277+ if (id3_v1_found) {
278+ /* if ID3V1 is found, decode ID3V1 */
279+ decode_id3_v1(id3_buf + 3, &id3v1);
280+ id3_v1_decoded = 1;
281+ }
282+ fseek(file, 0, SEEK_SET);
283+ }
284+
285+ {
286+ signed int flag = 0;
287+ signed int continue_flag = 0;
288+
289+ i_fread_bytes = fread(id3v2_buf,
290+ sizeof(char), 0x1000, file);
291+
292+ /* search for ID3V2 */
293+ id3_v2_found =
294+ search_id3_v2(id3v2_buf);
295+
296+ if (id3_v2_found) {
297+ /* initialise the max fields */
298+ init_id3v2_field(&id3v2);
299+
300+ while (!id3_v2_complete && id3_v2_found) {
301+ /* if ID3V2 is found, decode ID3V2 */
302+ id3_v2_complete = decode_id3_v2((const char *const)id3v2_buf,
303+ &id3v2, continue_flag, i_fread_bytes);
304+
305+ if (!id3_v2_complete) {
306+ continue_flag = 1;
307+ i_bytes_consumed = id3v2.bytes_consumed;
308+
309+ fseek(file, i_bytes_consumed, SEEK_SET);
310+
311+ i_fread_bytes = fread(id3v2_buf,
312+ sizeof(unsigned char), 0x1000, file);
313+ if (i_fread_bytes <= 0) {
314+ return;
315+ }
316+ }
317+ }
318+
319+ if (id3_v2_complete) {
320+ i_bytes_consumed = id3v2.bytes_consumed;
321+ fseek(file, i_bytes_consumed, SEEK_SET);
322+ }
323+ }
324+ }
325+
326+ *offset = i_bytes_consumed;
327+}
328+
329 void get_codec_mp3(FILE *file, struct compr_config *config,
330 struct snd_codec *codec)
331 {
332 size_t read;
333 struct mp3_header header;
334 unsigned int channels, rate, bits;
335+ int offset = 0;
336+
337+ parse_id3(file, &offset);
338+
339+ fseek(file, offset, SEEK_SET);
340
341 read = fread(&header, 1, sizeof(header), file);
342 if (read != sizeof(header)) {
343@@ -279,6 +365,8 @@ void get_codec_mp3(FILE *file, struct compr_config *config,
344 codec->level = 0;
345 codec->ch_mode = 0;
346 codec->format = 0;
347+
348+ fseek(file, offset, SEEK_SET);
349 }
350
351 void get_codec_iec(FILE *file, struct compr_config *config,
352diff --git a/src/utils/id3_tag_decode.c b/src/utils/id3_tag_decode.c
353new file mode 100644
354index 0000000..393967a
355--- /dev/null
356+++ b/src/utils/id3_tag_decode.c
357@@ -0,0 +1,642 @@
358+/*
359+ * Copyright (c) 2006-2017 Cadence Design Systems, Inc.
360+ * Copyright 2018 NXP
361+ *
362+ * Permission is hereby granted, free of charge, to any person obtaining
363+ * a copy of this software and associated documentation files (the
364+ * "Software"), to deal in the Software without restriction, including
365+ * without limitation the rights to use, copy, modify, merge, publish,
366+ * distribute, sublicense, and/or sell copies of the Software, and to
367+ * permit persons to whom the Software is furnished to do so, subject to
368+ * the following conditions:
369+ *
370+ * The above copyright notice and this permission notice shall be included
371+ * in all copies or substantial portions of the Software.
372+ *
373+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
374+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
375+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
376+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
377+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
378+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
379+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
380+ */
381+#include <ctype.h>
382+#include "tinycompress/id3_tag_decode.h"
383+
384+#define CHAR4(c1, c2, c3, c4) \
385+ (int)(((unsigned char)(c1) << 24) | \
386+ ((unsigned char)(c2) << 16) | \
387+ ((unsigned char)(c3) << 8) | \
388+ ((unsigned char)c4))
389+
390+#ifndef MSVC_BUILD
391+unsigned int umin(unsigned int a, unsigned int b)
392+{
393+ return (a < b ? a : b);
394+}
395+
396+#else
397+unsigned int umin(unsigned int a, unsigned int b)
398+{
399+ return (a < b ? a : b);
400+}
401+#endif
402+
403+/***********************************************************
404+ * function name : display
405+ *
406+ * description : display ID3 tag contents.
407+ *
408+ * arguments : input parameters
409+ *
410+ * values returned : 0
411+ ***********************************************************/
412+
413+static void display2(const id3_v2_frame_struct * const src,
414+ int size,
415+ const char * const disp)
416+{
417+ int j;
418+
419+
420+ for (j = 0; j < size; j++) {
421+ int c = src->frame_data[j];
422+
423+ if (c) {
424+ if (!isprint(c))
425+ break;
426+ }
427+ }
428+}
429+
430+static VOID display1(WORD8 src[], WORD32 size, WORD8 disp[])
431+{
432+ WORD32 j;
433+
434+ for (j = 0; j < size ; j++) {
435+ int c = src[j];
436+
437+ if (c) {
438+ if (!isprint(c))
439+ break;
440+ }
441+ }
442+}
443+
444+/*****************************************************************
445+ * function name : init_id3_header
446+ *
447+ * description : initialise the max filed size of teh farem.
448+ *
449+ * arguments : input parameters
450+ *
451+ * values returned : 0
452+ ****************************************************************/
453+
454+VOID init_id3v2_field(id3v2_struct *id3v2)
455+{
456+ id3v2->album_movie_show_title.max_size = MAX_TAG_FRAME_SIZE;
457+ id3v2->composer_name.max_size = MAX_TAG_FRAME_SIZE;
458+ id3v2->content_type.max_size = MAX_TAG_FRAME_SIZE;
459+ id3v2->encoded_by.max_size = MAX_TAG_FRAME_SIZE;
460+ id3v2->lyricist_text_writer.max_size = MAX_TAG_FRAME_SIZE;
461+ id3v2->content_group_description.max_size = MAX_TAG_FRAME_SIZE;
462+ id3v2->title_songname_content_description.max_size = MAX_TAG_FRAME_SIZE;
463+ id3v2->medxa_type.max_size = MAX_TAG_FRAME_SIZE;
464+ id3v2->original_album_movie_show_title.max_size = MAX_TAG_FRAME_SIZE;
465+ id3v2->original_filename.max_size = MAX_TAG_FRAME_SIZE;
466+ id3v2->original_lyricist_text_writer.max_size = MAX_TAG_FRAME_SIZE;
467+ id3v2->original_artist_performer.max_size = MAX_TAG_FRAME_SIZE;
468+ id3v2->file_owner_licensee.max_size = MAX_TAG_FRAME_SIZE;
469+ id3v2->lead_performer_soloist.max_size = MAX_TAG_FRAME_SIZE;
470+ id3v2->publisher.max_size = MAX_TAG_FRAME_SIZE;
471+ id3v2->private_frame.max_size = MAX_TAG_FRAME_SIZE;
472+ id3v2->other_info.max_size = MAX_TAG_FRAME_SIZE;
473+
474+ /* resetting the flag to indicate presese of frame */
475+ id3v2->album_movie_show_title.tag_present = 0;
476+ id3v2->composer_name.tag_present = 0;
477+ id3v2->content_type.tag_present = 0;
478+ id3v2->encoded_by.tag_present = 0;
479+ id3v2->lyricist_text_writer.tag_present = 0;
480+ id3v2->content_group_description.tag_present = 0;
481+ id3v2->title_songname_content_description.tag_present = 0;
482+ id3v2->medxa_type.tag_present = 0;
483+ id3v2->original_album_movie_show_title.tag_present = 0;
484+ id3v2->original_filename.tag_present = 0;
485+ id3v2->original_lyricist_text_writer.tag_present = 0;
486+ id3v2->original_artist_performer.tag_present = 0;
487+ id3v2->file_owner_licensee.tag_present = 0;
488+ id3v2->lead_performer_soloist.tag_present = 0;
489+ id3v2->publisher.tag_present = 0;
490+ id3v2->private_frame.tag_present = 0;
491+ id3v2->other_info.tag_present = 0;
492+
493+ /* resetting the flag which indicates that size of the frame has
494+ * exceeded the max buffer size
495+ */
496+ id3v2->album_movie_show_title.exceeds_buffer_size = 0;
497+ id3v2->composer_name.exceeds_buffer_size = 0;
498+ id3v2->content_type.exceeds_buffer_size = 0;
499+ id3v2->encoded_by.exceeds_buffer_size = 0;
500+ id3v2->lyricist_text_writer.exceeds_buffer_size = 0;
501+ id3v2->content_group_description.exceeds_buffer_size = 0;
502+ id3v2->title_songname_content_description.exceeds_buffer_size = 0;
503+ id3v2->medxa_type.exceeds_buffer_size = 0;
504+ id3v2->original_album_movie_show_title.exceeds_buffer_size = 0;
505+ id3v2->original_filename.exceeds_buffer_size = 0;
506+ id3v2->original_lyricist_text_writer.exceeds_buffer_size = 0;
507+ id3v2->original_artist_performer.exceeds_buffer_size = 0;
508+ id3v2->file_owner_licensee.exceeds_buffer_size = 0;
509+ id3v2->lead_performer_soloist.exceeds_buffer_size = 0;
510+ id3v2->publisher.exceeds_buffer_size = 0;
511+ id3v2->private_frame.exceeds_buffer_size = 0;
512+ id3v2->other_info.exceeds_buffer_size = 0;
513+
514+ id3v2->bytes_consumed = 0;
515+ id3v2->header_end = 0;
516+}
517+
518+/***************************************************************
519+ * function name : search_id3_v2
520+ *
521+ * description : finds if ID3V2 starts at the start of given buffer.
522+ *
523+ * arguments : input parameters
524+ * buffer input buffer
525+ *
526+ * values returned : FLAG 1: ID3 found 0: ID3 not found
527+ ***************************************************************/
528+WORD32 search_id3_v2(UWORD8 *buffer)
529+{
530+ UWORD32 temp;
531+
532+ temp = buffer[0] << 16;
533+ temp |= buffer[1] << 8;
534+ temp |= buffer[2];
535+
536+ if (temp == ID3V2)
537+ return 1; /* ID3 found */
538+
539+ return 0; /* ID3 not found */
540+}
541+
542+/**************************************************************
543+ * function name : search_id3_v1
544+ *
545+ * description : finds if ID3V1 starts at the start of given buffer.
546+ *
547+ * arguments : input parameters
548+ * buffer input buffer
549+ *
550+ * values returned : FLAG 1: ID3 found 0: ID3 not found
551+ **************************************************************/
552+WORD32 search_id3_v1(UWORD8 *buffer)
553+{
554+ UWORD32 temp;
555+
556+ temp = buffer[0] << 16;
557+ temp |= buffer[1] << 8;
558+ temp |= buffer[2];
559+
560+ if (temp == ID3V1)
561+ return 1; /* ID3 found */
562+
563+ return 0; /* ID3 not found */
564+}
565+
566+/***************************************************************
567+ * function name : decode_id3_v1
568+ *
569+ * description : decodes ID3V1 tag.
570+ *
571+ * arguments : input parameters
572+ * buffer input buffer
573+ * id3v1 structure
574+ *
575+ * values returned : bytes consumed
576+ **************************************************************/
577+WORD32 decode_id3_v1(UWORD8 *buffer, id3v1_struct *id3v1)
578+{
579+ WORD32 bytes_consumed = 0;
580+ short tag_type;
581+
582+ /* setting the tag type */
583+ tag_type = 1;
584+
585+ bytes_consumed = get_v1_info(buffer, id3v1);
586+
587+ return bytes_consumed;
588+}
589+
590+/***********************************************************
591+ * function name : get_v1_info
592+ *
593+ * description : gets ID3V1 information fields.
594+ *
595+ * arguments : input parameters
596+ * buffer input buffer
597+ * id3v1 structure
598+ *
599+ * values returned : bytes consumed
600+ ***********************************************************/
601+WORD32 get_v1_info(UWORD8 *buffer, id3v1_struct *id3v1)
602+{
603+ WORD32 i;
604+ WORD32 bytes_consumed = 0;
605+
606+ /* get song_title */
607+ for (i = 0; i < 30; i++)
608+ id3v1->song_title[i] = buffer[i];
609+
610+ buffer += 30;
611+ bytes_consumed += 30;
612+ display1(id3v1->song_title, 30, (WORD8 *)"song_title : ");
613+
614+ /* get artist */
615+ for (i = 0; i < 30; i++)
616+ id3v1->artist[i] = buffer[i];
617+
618+ buffer += 30;
619+ bytes_consumed += 30;
620+ display1(id3v1->artist, 30, (WORD8 *)"artist : ");
621+
622+ /* get album */
623+ for (i = 0; i < 30; i++)
624+ id3v1->album[i] = buffer[i];
625+
626+ buffer += 30;
627+ bytes_consumed += 30;
628+ display1(id3v1->album, 30, (WORD8 *)"album : ");
629+
630+ /* get year */
631+ for (i = 0; i < 4; i++)
632+ id3v1->year[i] = buffer[i];
633+
634+ buffer += 4;
635+ bytes_consumed += 4;
636+ display1(id3v1->year, 4, (WORD8 *)"year : ");
637+
638+ /* get comment */
639+ for (i = 0; i < 30; i++)
640+ id3v1->comment[i] = buffer[i];
641+
642+ buffer += 30;
643+ bytes_consumed += 30;
644+ display1(id3v1->comment, 30, (WORD8 *)"comment : ");
645+
646+ /* get genre */
647+ for (i = 0; i < 1; i++)
648+ id3v1->genre[i] = buffer[i];
649+
650+ buffer += 1;
651+ bytes_consumed += 1;
652+
653+ return bytes_consumed;
654+}
655+
656+/*****************************************************
657+ * function name : decode_id3_v2
658+ *
659+ * description : decodes ID3V2 tag.
660+ *
661+ * arguments : input parameters
662+ * buffer input buffer
663+ * id3v2 structure
664+ * continue_flag FLAG to indicate whether
665+ * it is first call or not
666+ * insize input buffer size
667+ *
668+ * values returned : bytes consumed
669+ ******************************************************/
670+WORD32 decode_id3_v2(const char *const buffer,
671+ id3v2_struct *const id3v2,
672+ WORD32 continue_flag,
673+ WORD32 insize)
674+{
675+ UWORD32 size = 0, flag;
676+ WORD32 i, buf_update_val;
677+ UWORD8 buf[4], frame_header[10], id3_buffer[10];
678+ WORD8 *bitstream_ptr;
679+ short tag_type;
680+
681+ WORD32 bytes_consumed = 0;
682+
683+ if (id3v2->header_end == 1) {
684+ id3v2->bytes_consumed += insize;
685+ if (id3v2->bytes_consumed < id3v2->id3_v2_header.size)
686+ return 0;
687+
688+ id3v2->bytes_consumed = (id3v2->id3_v2_header.size + 10);
689+ return 1;
690+ }
691+
692+ bitstream_ptr = (WORD8 *)id3_buffer;
693+
694+ if (!continue_flag) {
695+ bytes_consumed += 3;
696+ /* setting the tag type */
697+ tag_type = 2;
698+ id3v2->id3_v2_header.version = buffer[bytes_consumed + 0] << 8;
699+ id3v2->id3_v2_header.version |= buffer[bytes_consumed + 1];
700+ id3v2->id3_v2_header.flag = buffer[bytes_consumed + 2];
701+
702+ /* making the msb of each byte zero */
703+ buf[0] = buffer[bytes_consumed + 6] & 0x7f;
704+ buf[1] = buffer[bytes_consumed + 5] & 0x7f;
705+ buf[2] = buffer[bytes_consumed + 4] & 0x7f;
706+ buf[3] = buffer[bytes_consumed + 3] & 0x7f;
707+
708+ bytes_consumed += 7;
709+
710+ /* concatenation the bytes after making
711+ * 7th bit zero to get 28 bits size
712+ */
713+ size = buf[0];
714+ size |= (buf[1] << 7);
715+ size |= (buf[2] << 14);
716+ size |= (buf[3] << 21);
717+ /* storing the size */
718+ id3v2->id3_v2_header.size = size;
719+
720+ /* check for extended header */
721+ if (id3v2->id3_v2_header.flag & 0x20) {
722+ for (i = 0; i < 10; i++)
723+ bitstream_ptr[i] = buffer[bytes_consumed + i];
724+
725+ i = 0;
726+ bytes_consumed += 10;
727+
728+ size = bitstream_ptr[i++] << 24;
729+ size |= bitstream_ptr[i++] << 16;
730+ size |= bitstream_ptr[i++] << 8;
731+ size |= bitstream_ptr[i++];
732+
733+ /* two bytes for flag */
734+ i += 2;
735+ {
736+ UWORD32 padding_size;
737+
738+ padding_size = bitstream_ptr[i++] << 24;
739+ padding_size |= bitstream_ptr[i++] << 16;
740+ padding_size |= bitstream_ptr[i++] << 8;
741+ padding_size |= bitstream_ptr[i++];
742+
743+ /* skipping the padding and frame size
744+ * number of bytes
745+ */
746+ bytes_consumed += (padding_size + size);
747+ }
748+ }
749+ }
750+
751+ while (id3v2->header_end != 1) {
752+ char *key;
753+ id3_v2_frame_struct *value;
754+ unsigned int avail_inp;
755+
756+ /* reading the 10 bytes to get the frame header */
757+
758+ for (i = 0; i < 10; i++)
759+ frame_header[i] = buffer[bytes_consumed + i];
760+ bytes_consumed += 10;
761+
762+ /* getting the size from the header */
763+ size = frame_header[4] << 24;
764+ size |= frame_header[5] << 16;
765+ size |= frame_header[6] << 8;
766+ size |= frame_header[7];
767+
768+ /* decoding the flag, currently not used */
769+ flag = frame_header[8] << 8;
770+ flag |= frame_header[9];
771+
772+ avail_inp = insize - bytes_consumed;
773+
774+ /* switching to the frame type */
775+ switch (CHAR4(frame_header[0],
776+ frame_header[1],
777+ frame_header[2],
778+ frame_header[3])) {
779+ case CHAR4('A', 'E', 'N', 'C'):
780+ case CHAR4('A', 'P', 'I', 'C'):
781+ case CHAR4('C', 'O', 'M', 'M'):
782+ case CHAR4('C', 'O', 'M', 'R'):
783+ case CHAR4('E', 'N', 'C', 'R'):
784+ case CHAR4('E', 'Q', 'U', 'A'):
785+ case CHAR4('E', 'T', 'C', 'O'):
786+ case CHAR4('G', 'E', 'O', 'B'):
787+ case CHAR4('G', 'R', 'I', 'D'):
788+ case CHAR4('I', 'P', 'L', 'S'):
789+ case CHAR4('L', 'I', 'N', 'K'):
790+ case CHAR4('M', 'C', 'D', 'I'):
791+ case CHAR4('M', 'L', 'L', 'T'):
792+ case CHAR4('O', 'W', 'N', 'E'):
793+ case CHAR4('P', 'C', 'N', 'T'):
794+ case CHAR4('P', 'O', 'P', 'M'):
795+ case CHAR4('P', 'O', 'S', 'S'):
796+ case CHAR4('R', 'B', 'U', 'F'):
797+ case CHAR4('R', 'V', 'A', 'D'):
798+ case CHAR4('R', 'V', 'R', 'B'):
799+ case CHAR4('S', 'Y', 'L', 'T'):
800+ case CHAR4('S', 'Y', 'T', 'C'):
801+ case CHAR4('T', 'B', 'P', 'M'):
802+ case CHAR4('T', 'C', 'O', 'P'):
803+ case CHAR4('T', 'D', 'A', 'T'):
804+ case CHAR4('T', 'D', 'L', 'Y'):
805+ case CHAR4('T', 'F', 'L', 'T'):
806+ case CHAR4('T', 'I', 'M', 'E'):
807+ case CHAR4('T', 'K', 'E', 'Y'):
808+ case CHAR4('T', 'L', 'A', 'N'):
809+ case CHAR4('T', 'L', 'E', 'N'):
810+ case CHAR4('T', 'M', 'E', 'D'):
811+ case CHAR4('T', 'O', 'F', 'N'):
812+ case CHAR4('T', 'O', 'L', 'Y'):
813+ case CHAR4('T', 'O', 'R', 'Y'):
814+ case CHAR4('T', 'P', 'E', '2'):
815+ case CHAR4('T', 'P', 'E', '3'):
816+ case CHAR4('T', 'P', 'E', '4'):
817+ case CHAR4('T', 'P', 'O', 'S'):
818+ case CHAR4('T', 'R', 'C', 'K'):
819+ case CHAR4('T', 'R', 'D', 'A'):
820+ case CHAR4('T', 'R', 'S', 'N'):
821+ case CHAR4('T', 'R', 'S', 'O'):
822+ case CHAR4('T', 'S', 'I', 'Z'):
823+ case CHAR4('T', 'S', 'R', 'C'):
824+ case CHAR4('T', 'S', 'S', 'E'):
825+ case CHAR4('T', 'Y', 'E', 'R'):
826+ case CHAR4('T', 'X', 'X', 'X'):
827+ case CHAR4('U', 'F', 'I', 'D'):
828+ case CHAR4('U', 'S', 'E', 'R'):
829+ case CHAR4('U', 'S', 'L', 'T'):
830+ case CHAR4('W', 'C', 'O', 'M'):
831+ case CHAR4('W', 'C', 'O', 'P'):
832+ case CHAR4('W', 'O', 'A', 'F'):
833+ case CHAR4('W', 'O', 'A', 'R'):
834+ case CHAR4('W', 'O', 'A', 'S'):
835+ case CHAR4('W', 'O', 'R', 'S'):
836+ case CHAR4('W', 'P', 'A', 'Y'):
837+ case CHAR4('W', 'P', 'U', 'B'):
838+ case CHAR4('W', 'X', 'X', 'X'):
839+ case CHAR4('T', 'I', 'T', '3'):
840+ key = "other_info : ";
841+ value = &id3v2->other_info;
842+ break;
843+ case CHAR4('P', 'R', 'I', 'V'):
844+ key = "private_frame : ";
845+ value = &id3v2->private_frame;
846+ break;
847+ case CHAR4('T', 'A', 'L', 'B'):
848+ key = "album_movie_show_title : ";
849+ value = &id3v2->album_movie_show_title;
850+ break;
851+ case CHAR4('T', 'C', 'O', 'M'):
852+ key = "composer_name : ";
853+ value = &id3v2->composer_name;
854+ break;
855+ case CHAR4('T', 'C', 'O', 'N'):
856+ key = "content_type : ";
857+ value = &id3v2->content_type;
858+ break;
859+ case CHAR4('T', 'E', 'N', 'C'):
860+ key = "encoded_by : ";
861+ value = &id3v2->encoded_by;
862+ break;
863+ case CHAR4('T', 'E', 'X', 'T'):
864+ key = "lyricist_text_writer : ";
865+ value = &id3v2->lyricist_text_writer;
866+ break;
867+ case CHAR4('T', 'I', 'T', '1'):
868+ key = "content_group_description : ";
869+ value = &id3v2->content_group_description;
870+ break;
871+ case CHAR4('T', 'I', 'T', '2'):
872+ key = "title_songname_content_description : ";
873+ value = &id3v2->title_songname_content_description;
874+ break;
875+ case CHAR4('T', 'O', 'A', 'L'):
876+ key = "original_album_movie_show_title : ";
877+ value = &id3v2->original_album_movie_show_title;
878+ break;
879+ case CHAR4('T', 'O', 'P', 'E'):
880+ key = "original_artist_performer : ";
881+ value = &id3v2->original_artist_performer;
882+ break;
883+ case CHAR4('T', 'O', 'W', 'N'):
884+ key = "file_owner_licensee : ";
885+ value = &id3v2->file_owner_licensee;
886+ break;
887+ case CHAR4('T', 'P', 'E', '1'):
888+ key = "lead_performer_soloist : ";
889+ value = &id3v2->lead_performer_soloist;
890+ break;
891+ case CHAR4('T', 'P', 'U', 'B'):
892+ key = "publisher : ";
893+ value = &id3v2->publisher;
894+ break;
895+ default:
896+ /* skipping the read 10 bytes */
897+ buf_update_val = -10;
898+ id3v2->header_end = 1;
899+ value = 0;
900+ key = 0;
901+ break;
902+ }
903+
904+ if (value != 0)
905+ buf_update_val = get_info(&buffer[bytes_consumed],
906+ avail_inp, size, value);
907+
908+ /* Negative value for buf_update_val means one of two things:
909+ * 1. The default case happened and we're done with ID3V2 tag
910+ * frames, or
911+ * 2. get_info() returned -1 to indicate that more input is
912+ * required to decode this frame of the tag.
913+ */
914+ if (buf_update_val >= 0)
915+ display2(value,
916+ umin(value->max_size, buf_update_val), key);
917+
918+ if (buf_update_val == -1) {
919+ id3v2->bytes_consumed += bytes_consumed;
920+ return 1;
921+ }
922+
923+ bytes_consumed += buf_update_val;
924+
925+ /* Is there enough input left (10 bytes) to begin
926+ * decoding another frame? If not, bag out temporarily
927+ * now. The caller will refill our input buffer and
928+ * call us again with continue_flag == 1.
929+ */
930+ if (insize - bytes_consumed < 10) {
931+ id3v2->bytes_consumed += bytes_consumed;
932+ return 0; /* not completely decoded */
933+ }
934+ }
935+
936+ id3v2->bytes_consumed += bytes_consumed;
937+ if ((id3v2->bytes_consumed + 10) < id3v2->id3_v2_header.size)
938+ return 0; /* not completely decoded */
939+
940+ return 1; /* completely decoded */
941+}
942+
943+/*******************************************************
944+ * function name : get_id3_v2_bytes
945+ *
946+ * description : tells the size of ID3V2 tag.
947+ *
948+ * arguments : input parameters
949+ * buffer input buffer
950+ *
951+ * values returned : bytes consumed
952+ ********************************************************/
953+WORD32 get_id3_v2_bytes(UWORD8 *buffer)
954+{
955+ WORD32 size;
956+
957+ /* making the msb of each byte zero */
958+ size = (buffer[9] & 0x7f);
959+ size |= ((buffer[8] & 0x7f) << 7);
960+ size |= ((buffer[7] & 0x7f) << 14);
961+ size |= ((buffer[6] & 0x7f) << 21);
962+
963+ return (size + 10);
964+}
965+
966+/****************************************************
967+ * function name : get_info
968+ *
969+ * description : read the frame information from the input buffer.
970+ *
971+ * arguments : input parameters
972+ *
973+ * values returned : update value for buffer
974+ ****************************************************/
975+WORD32 get_info(const char *inp_buffer,
976+ unsigned int avail_inp,
977+ WORD32 tag_size,
978+ id3_v2_frame_struct *dest)
979+{
980+ WORD32 j;
981+
982+ /* setting the tag to indicate the presence of frame */
983+ dest->tag_present = 1;
984+ /* If there isn't enough input available, we punt back to the top
985+ * level and ask for more.
986+ */
987+ if (avail_inp < umin(tag_size, dest->max_size))
988+ return -1;
989+
990+ if (dest->max_size >= tag_size) {
991+ for (j = 0; j < tag_size ; j++)
992+ dest->frame_data[j] = inp_buffer[j];
993+ } else {
994+ dest->exceeds_buffer_size = 1;
995+ for (j = 0; j < dest->max_size ; j++)
996+ dest->frame_data[j] = inp_buffer[j];
997+ }
998+ return tag_size;
999+}
1000--
10012.7.4
1002
diff --git a/recipes-multimedia/tinycompress/tinycompress/0002-cplay-Support-wave-file.patch b/recipes-multimedia/tinycompress/tinycompress/0002-cplay-Support-wave-file.patch
deleted file mode 100755
index 795447118..000000000
--- a/recipes-multimedia/tinycompress/tinycompress/0002-cplay-Support-wave-file.patch
+++ /dev/null
@@ -1,215 +0,0 @@
1From 4d4bc0a958fe254531920095fbabc241aad88113 Mon Sep 17 00:00:00 2001
2From: Shengjiu Wang <shengjiu.wang@nxp.com>
3Date: Tue, 28 Jul 2020 13:00:36 +0800
4Subject: [PATCH] cplay: Support wave file
5
6The supported format is mono/stereo, S16_LE/S32_LE, 8kHz-192kHz.
7Command is:
8cplay -c x -I PCM test.wav
9
10Upstream-Status: Inappropriate [i.MX specific]
11Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
12---
13 include/tinycompress/wave_formats.h | 51 +++++++++++++
14 src/utils/cplay.c | 107 ++++++++++++++++++++++++++++
15 2 files changed, 158 insertions(+)
16 create mode 100644 include/tinycompress/wave_formats.h
17
18--- /dev/null
19+++ b/include/tinycompress/wave_formats.h
20@@ -0,0 +1,53 @@
21+#ifndef WAVE_FORMATS_H
22+#define WAVE_FORMATS_H 1
23+
24+#include <sys/types.h>
25+
26+#define COMPOSE_ID(a,b,c,d) ((a) | ((b)<<8) | ((c)<<16) | ((d)<<24))
27+
28+#define WAV_RIFF COMPOSE_ID('R','I','F','F')
29+#define WAV_RIFX COMPOSE_ID('R','I','F','X')
30+#define WAV_WAVE COMPOSE_ID('W','A','V','E')
31+#define WAV_FMT COMPOSE_ID('f','m','t',' ')
32+#define WAV_DATA COMPOSE_ID('d','a','t','a')
33+
34+/* WAVE fmt block constants from Microsoft mmreg.h header */
35+#define WAV_FMT_PCM 0x0001
36+#define WAV_FMT_IEEE_FLOAT 0x0003
37+#define WAV_FMT_DOLBY_AC3_SPDIF 0x0092
38+#define WAV_FMT_EXTENSIBLE 0xfffe
39+
40+/* Used with WAV_FMT_EXTENSIBLE format */
41+#define WAV_GUID_TAG "\x00\x00\x00\x00\x10\x00\x80\x00\x00\xAA\x00\x38\x9B\x71"
42+
43+typedef struct {
44+ u_int magic; /* 'RIFF' */
45+ u_int length; /* filelen */
46+ u_int type; /* 'WAVE' */
47+} WaveHeader;
48+
49+typedef struct {
50+ u_short format; /* see WAV_FMT_* */
51+ u_short channels;
52+ u_int sample_fq; /* frequence of sample */
53+ u_int byte_p_sec;
54+ u_short byte_p_spl; /* samplesize; 1 or 2 bytes */
55+ u_short bit_p_spl; /* 8, 12 or 16 bit */
56+} WaveFmtBody;
57+
58+typedef struct {
59+ WaveFmtBody format;
60+ u_short ext_size;
61+ u_short bit_p_spl;
62+ u_int channel_mask;
63+ u_short guid_format; /* WAV_FMT_* */
64+ u_char guid_tag[14]; /* WAV_GUID_TAG */
65+} WaveFmtExtensibleBody;
66+
67+typedef struct {
68+ u_int type; /* 'data' */
69+ u_int length; /* samplecount */
70+} WaveChunkHeader;
71+
72+
73+#endif /* FORMATS */
74--- a/src/utils/cplay.c
75+++ b/src/utils/cplay.c
76@@ -1,4 +1,6 @@
77 /*
78+ * Copyright 2020 NXP
79+ *
80 * This file is provided under a dual BSD/LGPLv2.1 license. When using or
81 * redistributing this file, you may do so under either license.
82 *
83@@ -73,6 +75,8 @@
84 #include "tinycompress/tinycompress.h"
85 #include "tinycompress/tinymp3.h"
86 #include "tinycompress/id3_tag_decode.h"
87+#include "tinycompress/wave_formats.h"
88+#include <alsa/asoundlib.h>
89
90 static int verbose;
91 static const unsigned int DEFAULT_CODEC_ID = SND_AUDIOCODEC_PCM;
92@@ -166,6 +170,77 @@ static int parse_mp3_header(struct mp3_h
93 return 0;
94 }
95
96+static int parse_wav_header(FILE *file, unsigned int *num_channels, unsigned int *sample_rate,
97+ unsigned int *format) {
98+ WaveHeader wave_header;
99+ WaveChunkHeader chunk_header;
100+ WaveFmtBody fmt_body;
101+ int more_chunks = 1;
102+
103+ fread(&wave_header, sizeof(WaveHeader), 1, file);
104+ if ((wave_header.magic != WAV_RIFF) ||
105+ (wave_header.type != WAV_WAVE)) {
106+ fprintf(stderr, "Error: it is not a riff/wave file\n");
107+ return -1;
108+ }
109+
110+ do {
111+ fread(&chunk_header, sizeof(WaveChunkHeader), 1, file);
112+ switch (chunk_header.type) {
113+ case WAV_FMT:
114+ fread(&fmt_body, sizeof(WaveFmtBody), 1, file);
115+ /* If the format header is larger, skip the rest */
116+ if (chunk_header.length > sizeof(WaveFmtBody))
117+ fseek(file, chunk_header.length - sizeof(WaveFmtBody), SEEK_CUR);
118+
119+ *num_channels = fmt_body.channels;
120+ *sample_rate = fmt_body.sample_fq;
121+
122+ switch (fmt_body.bit_p_spl) {
123+ case 8:
124+ *format = SND_PCM_FORMAT_U8;
125+ break;
126+ case 16:
127+ *format = SND_PCM_FORMAT_S16_LE;
128+ break;
129+ case 24:
130+ switch (fmt_body.byte_p_spl / fmt_body.channels) {
131+ case 3:
132+ *format = SND_PCM_FORMAT_S24_3LE;
133+ break;
134+ case 4:
135+ *format = SND_PCM_FORMAT_S24_LE;
136+ break;
137+ default:
138+ fprintf(stderr, "format error\n");
139+ return -1;
140+ }
141+ break;
142+ case 32:
143+ if (fmt_body.format == WAV_FMT_PCM) {
144+ *format = SND_PCM_FORMAT_S32_LE;
145+ } else if (fmt_body.format == WAV_FMT_IEEE_FLOAT) {
146+ *format = SND_PCM_FORMAT_FLOAT_LE;
147+ }
148+ break;
149+ default:
150+ fprintf(stderr, "format error\n");
151+ return -1;
152+ }
153+ break;
154+ case WAV_DATA:
155+ /* Stop looking for chunks */
156+ more_chunks = 0;
157+ break;
158+ default:
159+ /* Unknown chunk, skip bytes */
160+ fseek(file, chunk_header.length, SEEK_CUR);
161+ }
162+ } while (more_chunks);
163+
164+ return 0;
165+}
166+
167 static int print_time(struct compress *compress)
168 {
169 unsigned int avail;
170@@ -385,6 +460,35 @@ void get_codec_iec(FILE *file, struct co
171 codec->format = 0;
172 }
173
174+void get_codec_pcm(FILE *file, struct compr_config *config,
175+ struct snd_codec *codec)
176+{
177+ unsigned int channels, rate, format;
178+
179+ if (parse_wav_header(file, &channels, &rate, &format) == -1) {
180+ fclose(file);
181+ exit(EXIT_FAILURE);
182+ }
183+
184+ if (channels > 2 || (format != SND_PCM_FORMAT_S16_LE && format != SND_PCM_FORMAT_S32_LE) ||
185+ rate > 192000) {
186+ fprintf(stderr, "unsupported wave file\n");
187+ fclose(file);
188+ exit(EXIT_FAILURE);
189+ }
190+
191+ codec->id = SND_AUDIOCODEC_PCM;
192+ codec->ch_in = channels;
193+ codec->ch_out = channels;
194+ codec->sample_rate = rate;
195+ codec->bit_rate = 0;
196+ codec->rate_control = 0;
197+ codec->profile = SND_AUDIOPROFILE_PCM;
198+ codec->level = 0;
199+ codec->ch_mode = 0;
200+ codec->format = format;
201+}
202+
203 void play_samples(char *name, unsigned int card, unsigned int device,
204 unsigned long buffer_size, unsigned int frag,
205 unsigned long codec_id)
206@@ -411,6 +515,9 @@ void play_samples(char *name, unsigned i
207 case SND_AUDIOCODEC_IEC61937:
208 get_codec_iec(file, &config, &codec);
209 break;
210+ case SND_AUDIOCODEC_PCM:
211+ get_codec_pcm(file, &config, &codec);
212+ break;
213 default:
214 fprintf(stderr, "codec ID %ld is not supported\n", codec_id);
215 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
deleted file mode 100755
index 7d8492b7d..000000000
--- a/recipes-multimedia/tinycompress/tinycompress/0003-cplay-Add-pause-feature.patch
+++ /dev/null
@@ -1,146 +0,0 @@
1From 6f778c21ee357a662cdd758cff578a3e4b85eedf Mon Sep 17 00:00:00 2001
2From: Zhang Peng <peng.zhang_8@nxp.com>
3Date: Tue, 4 Aug 2020 15:29:29 +0800
4Subject: [PATCH] cplay: Add pause feature
5
6Add option: -p pause
7
8Upstream-Status: Inappropriate [i.MX specific]
9Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
10---
11 src/utils/cplay.c | 56 +++++++++++++++++++++++++++++++++++++++++++----
12 1 file changed, 52 insertions(+), 4 deletions(-)
13
14diff --git a/src/utils/cplay.c b/src/utils/cplay.c
15index 8882f4d..8e3dcbb 100644
16--- a/src/utils/cplay.c
17+++ b/src/utils/cplay.c
18@@ -117,6 +117,9 @@ static void usage(void)
19 "-f\tfragments\n\n"
20 "-v\tverbose mode\n"
21 "-h\tPrints this help list\n\n"
22+ "-p\tpause\n"
23+ "-m\tpause blocks\n"
24+ "-n\tpause time duration\n"
25 "Example:\n"
26 "\tcplay -c 1 -d 2 test.mp3\n"
27 "\tcplay -f 5 test.mp3\n\n"
28@@ -133,7 +136,8 @@ static void usage(void)
29
30 void play_samples(char *name, unsigned int card, unsigned int device,
31 unsigned long buffer_size, unsigned int frag,
32- unsigned long codec_id);
33+ unsigned long codec_id, int pause_count, int pause_block,
34+ int pause_duration);
35
36 struct mp3_header {
37 uint16_t sync;
38@@ -262,12 +266,15 @@ int main(int argc, char **argv)
39 int c, i;
40 unsigned int card = 0, device = 0, frag = 0;
41 unsigned int codec_id = SND_AUDIOCODEC_MP3;
42+ int pause_count = 0;
43+ int pause_block = 6;
44+ int pause_duration = 10;
45
46 if (argc < 2)
47 usage();
48
49 verbose = 0;
50- while ((c = getopt(argc, argv, "hvb:f:c:d:I:")) != -1) {
51+ while ((c = getopt(argc, argv, "hvb:f:c:d:I:p:m:n:")) != -1) {
52 switch (c) {
53 case 'h':
54 usage();
55@@ -306,6 +313,23 @@ int main(int argc, char **argv)
56 case 'v':
57 verbose = 1;
58 break;
59+ case 'p':
60+ pause_count = strtol(optarg, NULL, 10);
61+ break;
62+ case 'm':
63+ pause_block = strtol(optarg, NULL, 10);
64+ if (pause_duration < 0) {
65+ printf("Set wrong paramter! Set duration default 6.\n");
66+ pause_duration = 6;
67+ }
68+ break;
69+ case 'n':
70+ pause_duration = strtol(optarg, NULL, 10);
71+ if (pause_duration < 0) {
72+ printf("Set wrong paramter! Set duration default 10.\n");
73+ pause_duration = 10;
74+ }
75+ break;
76 default:
77 exit(EXIT_FAILURE);
78 }
79@@ -315,7 +339,7 @@ int main(int argc, char **argv)
80
81 file = argv[optind];
82
83- play_samples(file, card, device, buffer_size, frag, codec_id);
84+ play_samples(file, card, device, buffer_size, frag, codec_id, pause_count, pause_block, pause_duration);
85
86 fprintf(stderr, "Finish Playing.... Close Normally\n");
87 exit(EXIT_SUCCESS);
88@@ -491,7 +515,8 @@ void get_codec_pcm(FILE *file, struct compr_config *config,
89
90 void play_samples(char *name, unsigned int card, unsigned int device,
91 unsigned long buffer_size, unsigned int frag,
92- unsigned long codec_id)
93+ unsigned long codec_id, int pause_count, int pause_block,
94+ int pause_duration)
95 {
96 struct compr_config config;
97 struct snd_codec codec;
98@@ -499,6 +524,7 @@ void play_samples(char *name, unsigned int card, unsigned int device,
99 FILE *file;
100 char *buffer;
101 int size, num_read, wrote;
102+ int write_count = 0;
103
104 if (verbose)
105 printf("%s: entry\n", __func__);
106@@ -574,6 +600,13 @@ void play_samples(char *name, unsigned int card, unsigned int device,
107 if (verbose)
108 printf("%s: You should hear audio NOW!!!\n", __func__);
109
110+ if (pause_count > 0) {
111+ printf("sleep...\n");
112+ compress_pause(compress);
113+ sleep(pause_duration);
114+ compress_resume(compress);
115+ }
116+
117 do {
118 num_read = fread(buffer, 1, size, file);
119 if (num_read > 0) {
120@@ -592,8 +625,23 @@ void play_samples(char *name, unsigned int card, unsigned int device,
121 printf("%s: wrote %d\n", __func__, wrote);
122 }
123 }
124+ write_count++;
125+ if ((pause_count > 0) && (write_count % pause_block == 0)) {
126+ printf("pause...\n");
127+ compress_pause(compress);
128+ sleep(pause_duration);
129+ printf("pause release...\n");
130+ compress_resume(compress);
131+ pause_count--;
132+ }
133 } while (num_read > 0);
134
135+ if (pause_count > 0) {
136+ compress_pause(compress);
137+ sleep(5);
138+ compress_resume(compress);
139+ }
140+
141 if (verbose)
142 printf("%s: exit success\n", __func__);
143 /* issue drain if it supports */
144--
1452.17.1
146
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
deleted file mode 100755
index dfedd186a..000000000
--- a/recipes-multimedia/tinycompress/tinycompress/0004-tinycompress-pass-NULL-buffer-with-0-size-to-driver.patch
+++ /dev/null
@@ -1,40 +0,0 @@
1From a2892bf5db7520689fa9cb1d1589fa804bd9dc1a Mon Sep 17 00:00:00 2001
2From: Bing Song <bing.song@nxp.com>
3Date: Tue, 18 Aug 2020 15:26:51 +0800
4Subject: [PATCH] tinycompress: pass NULL buffer with 0 size to driver.
5
6The NULL buffer with 0 size to indecate driver drain input data with
7non-block mode. The defaul drain is block mode.
8
9Upstream-Status: Inappropriate [i.MX specific]
10Signed-off-by: Bing Song <bing.song@nxp.com>
11---
12 src/lib/compress.c | 5 +++--
13 1 file changed, 3 insertions(+), 2 deletions(-)
14
15diff --git a/src/lib/compress.c b/src/lib/compress.c
16index bba4fcf..d66df0b 100644
17--- a/src/lib/compress.c
18+++ b/src/lib/compress.c
19@@ -315,7 +315,8 @@ int compress_write(struct compress *compress, const void *buf, unsigned int size
20 fds.events = POLLOUT;
21
22 /*TODO: treat auto start here first */
23- while (size) {
24+ /* NULL buffer with 0 size for non-block drain */
25+ do {
26 if (ioctl(compress->fd, SNDRV_COMPRESS_AVAIL, &avail))
27 return oops(compress, errno, "cannot get avail");
28
29@@ -357,7 +358,7 @@ int compress_write(struct compress *compress, const void *buf, unsigned int size
30 size -= written;
31 cbuf += written;
32 total += written;
33- }
34+ } while (size);
35 return total;
36 }
37
38--
392.17.1
40
diff --git a/recipes-multimedia/tinycompress/tinycompress/0005-cplay-Support-aac-streams.patch b/recipes-multimedia/tinycompress/tinycompress/0005-cplay-Support-aac-streams.patch
deleted file mode 100755
index 2f36551ab..000000000
--- a/recipes-multimedia/tinycompress/tinycompress/0005-cplay-Support-aac-streams.patch
+++ /dev/null
@@ -1,251 +0,0 @@
1From 2912f8573cea25fbd38ac7a8b68af2ea6a05e599 Mon Sep 17 00:00:00 2001
2From: Zhang Peng <peng.zhang_8@nxp.com>
3Date: Wed, 28 Oct 2020 19:08:53 +0800
4Subject: [PATCH] cplay: Support aac streams
5
6Support run aac format streams for cplay.
7
8Upstream-Status: Inappropriate [i.MX specific]
9Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
10---
11 src/utils/cplay.c | 210 ++++++++++++++++++++++++++++++++++++++++++++++
12 1 file changed, 210 insertions(+)
13
14diff --git a/src/utils/cplay.c b/src/utils/cplay.c
15index 8e3dcbb..2a1464a 100644
16--- a/src/utils/cplay.c
17+++ b/src/utils/cplay.c
18@@ -245,6 +245,190 @@ static int parse_wav_header(FILE *file, unsigned int *num_channels, unsigned int
19 return 0;
20 }
21
22+int find_adts_header(FILE *file, unsigned int *num_channels, unsigned int *sample_rate, unsigned int *format)
23+{
24+ int ret;
25+ unsigned char buf[5];
26+
27+ ret = fread(buf, sizeof(buf), 1, file);
28+ if (ret < 0) {
29+ fprintf(stderr, "open file error: %d\n", ret);
30+ return 0;
31+ }
32+ fseek(file, 0, SEEK_SET);
33+
34+ if ((buf[0] != 0xff) || (buf[1] & 0xf0 != 0xf0))
35+ return 0;
36+ /* mpeg id */
37+ switch (buf[1]>>3 & 0x1) {
38+ case 0x0:
39+ *format = SND_AUDIOSTREAMFORMAT_MP4ADTS;
40+ break;
41+ case 0x1:
42+ *format = SND_AUDIOSTREAMFORMAT_MP2ADTS;
43+ break;
44+ default:
45+ fprintf(stderr, "can't find stream format\n");
46+ break;
47+ }
48+ /* sample_rate */
49+ switch (buf[2]>>2 & 0xf) {
50+ case 0x0:
51+ *sample_rate = 96000;
52+ break;
53+ case 0x1:
54+ *sample_rate = 88200;
55+ break;
56+ case 0x2:
57+ *sample_rate = 64000;
58+ break;
59+ case 0x3:
60+ *sample_rate = 48000;
61+ break;
62+ case 0x4:
63+ *sample_rate = 44100;
64+ break;
65+ case 0x5:
66+ *sample_rate = 32000;
67+ break;
68+ case 0x6:
69+ *sample_rate = 24000;
70+ break;
71+ case 0x7:
72+ *sample_rate = 22050;
73+ break;
74+ case 0x8:
75+ *sample_rate = 16000;
76+ break;
77+ case 0x9:
78+ *sample_rate = 12000;
79+ break;
80+ case 0xa:
81+ *sample_rate = 11025;
82+ break;
83+ case 0xb:
84+ *sample_rate = 8000;
85+ break;
86+ case 0xc:
87+ *sample_rate = 7350;
88+ break;
89+ default:
90+ break;
91+ }
92+ /* channel */
93+ switch (((buf[2]&0x1) << 2) | (buf[3]>>6)) {
94+ case 1:
95+ *num_channels = 1;
96+ break;
97+ case 2:
98+ *num_channels = 2;
99+ break;
100+ case 3:
101+ *num_channels = 3;
102+ break;
103+ case 4:
104+ *num_channels = 4;
105+ break;
106+ case 5:
107+ *num_channels = 5;
108+ break;
109+ case 6:
110+ *num_channels = 6;
111+ break;
112+ case 7:
113+ *num_channels = 7;
114+ break;
115+ default:
116+ break;
117+ }
118+ return 1;
119+}
120+
121+static const int aac_sample_rates[] = { 96000, 88200, 64000, 48000, 44100,
122+ 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350
123+};
124+
125+#define MAX_SR_NUM sizeof(aac_sample_rates)/sizeof(aac_sample_rates[0])
126+
127+static int get_sample_rate_from_index(int sr_index)
128+{
129+ if (sr_index >= 0 && sr_index < MAX_SR_NUM)
130+ return aac_sample_rates[sr_index];
131+
132+ return 0;
133+}
134+
135+int find_adif_header(FILE *file, unsigned int *num_channels, unsigned int *sample_rate, unsigned int *format)
136+{
137+ int ret;
138+ unsigned char adif_id[4];
139+ unsigned char adif_header[20];
140+ int bitstream_type;
141+ int bitrate;
142+ int object_type;
143+ int sr_index;
144+ int skip_size = 0;
145+
146+ ret = fread(adif_id, sizeof(unsigned char), 4, file);
147+ if (ret < 0) {
148+ fprintf(stderr, "read data from file err: %d\n", ret);
149+ return 0;
150+ }
151+ /* adif id */
152+ if ((adif_id[0] != 0x41) || (adif_id[1] != 0x44) ||
153+ (adif_id[2] != 0x49) || (adif_id[3] != 0x46))
154+ return 0;
155+
156+ fread(adif_header, sizeof(unsigned char), 20, file);
157+
158+ /* copyright string */
159+ if (adif_header[0] & 0x80)
160+ skip_size = 9;
161+
162+ bitstream_type = adif_header[0 + skip_size] & 0x10;
163+ bitrate =
164+ ((unsigned int) (adif_header[0 + skip_size] & 0x0f) << 19) |
165+ ((unsigned int) adif_header[1 + skip_size] << 11) |
166+ ((unsigned int) adif_header[2 + skip_size] << 3) |
167+ ((unsigned int) adif_header[3 + skip_size] & 0xe0);
168+
169+ if (bitstream_type == 0) {
170+ object_type = ((adif_header[6 + skip_size] & 0x01) << 1) |
171+ ((adif_header[7 + skip_size] & 0x80) >> 7);
172+ sr_index = (adif_header[7 + skip_size] & 0x78) >> 3;
173+ }
174+ /* VBR */
175+ else {
176+ object_type = (adif_header[4 + skip_size] & 0x18) >> 3;
177+ sr_index = ((adif_header[4 + skip_size] & 0x07) << 1) |
178+ ((adif_header[5 + skip_size] & 0x80) >> 7);
179+ }
180+
181+ /* sample rate */
182+ *sample_rate = get_sample_rate_from_index(sr_index);
183+
184+ /* FIXME: assume channels is 2 */
185+ *num_channels = 2;
186+
187+ *format = SND_AUDIOSTREAMFORMAT_ADIF;
188+ fseek(file, 0, SEEK_SET);
189+ return 1;
190+}
191+
192+static int parse_aac_header(FILE *file, unsigned int *num_channels, unsigned int *sample_rate, unsigned int *format)
193+{
194+ if (find_adts_header(file, num_channels, sample_rate, format))
195+ return 1;
196+ else if (find_adif_header(file, num_channels, sample_rate, format))
197+ return 1;
198+ else {
199+ fprintf(stderr, "can't find streams format\n");
200+ return 0;
201+ }
202+
203+ return 1;
204+}
205+
206 static int print_time(struct compress *compress)
207 {
208 unsigned int avail;
209@@ -513,6 +697,29 @@ void get_codec_pcm(FILE *file, struct compr_config *config,
210 codec->format = format;
211 }
212
213+void get_codec_aac(FILE *file, struct compr_config *config,
214+ struct snd_codec *codec)
215+{
216+ unsigned int channels, rate, format;
217+
218+ if (parse_aac_header(file, &channels, &rate, &format) == 0) {
219+ fclose(file);
220+ exit(EXIT_FAILURE);
221+ };
222+ fseek(file, 0, SEEK_SET);
223+
224+ codec->id = SND_AUDIOCODEC_AAC;
225+ codec->ch_in = channels;
226+ codec->ch_out = channels;
227+ codec->sample_rate = rate;
228+ codec->bit_rate = 0;
229+ codec->rate_control = 0;
230+ codec->profile = SND_AUDIOPROFILE_AAC;
231+ codec->level = 0;
232+ codec->ch_mode = 0;
233+ codec->format = format;
234+
235+}
236 void play_samples(char *name, unsigned int card, unsigned int device,
237 unsigned long buffer_size, unsigned int frag,
238 unsigned long codec_id, int pause_count, int pause_block,
239@@ -544,6 +751,9 @@ void play_samples(char *name, unsigned int card, unsigned int device,
240 case SND_AUDIOCODEC_PCM:
241 get_codec_pcm(file, &config, &codec);
242 break;
243+ case SND_AUDIOCODEC_AAC:
244+ get_codec_aac(file, &config, &codec);
245+ break;
246 default:
247 fprintf(stderr, "codec ID %ld is not supported\n", codec_id);
248 exit(EXIT_FAILURE);
249--
2502.17.1
251
diff --git a/recipes-multimedia/tinycompress/tinycompress_1.1.6.bb b/recipes-multimedia/tinycompress/tinycompress_1.1.6.bb
deleted file mode 100644
index 803c38dfb..000000000
--- a/recipes-multimedia/tinycompress/tinycompress_1.1.6.bb
+++ /dev/null
@@ -1,16 +0,0 @@
1DESCRIPTION = "A library to handle compressed formats like MP3 etc."
2LICENSE = "LGPL-2.1-only | BSD-3-Clause"
3LIC_FILES_CHKSUM = "file://COPYING;md5=cf9105c1a2d4405cbe04bbe3367373a0"
4DEPENDS = "alsa-lib"
5
6SRC_URI = "git://git.alsa-project.org/tinycompress.git;protocol=git;branch=master \
7 file://0001-tinycompress-Add-id3-decoding.patch \
8 file://0002-cplay-Support-wave-file.patch \
9 file://0003-cplay-Add-pause-feature.patch \
10 file://0004-tinycompress-pass-NULL-buffer-with-0-size-to-driver.patch \
11 file://0005-cplay-Support-aac-streams.patch \
12"
13SRCREV = "995f2ed91045dad8c20485ab1a64727d22cd92e5"
14S = "${WORKDIR}/git"
15
16inherit autotools pkgconfig
diff --git a/recipes-multimedia/tinycompress/tinycompress_1.2.5.bb b/recipes-multimedia/tinycompress/tinycompress_1.2.5.bb
new file mode 100644
index 000000000..48edf0769
--- /dev/null
+++ b/recipes-multimedia/tinycompress/tinycompress_1.2.5.bb
@@ -0,0 +1,16 @@
1DESCRIPTION = "A library to handle compressed formats like MP3 etc."
2LICENSE = "LGPL-2.1-only | BSD-3-Clause"
3LIC_FILES_CHKSUM = "file://COPYING;md5=cf9105c1a2d4405cbe04bbe3367373a0"
4DEPENDS = "alsa-lib"
5
6inherit autotools pkgconfig
7
8PV .= "+git"
9
10SRC_URI = "git://github.com/alsa-project/tinycompress.git;protocol=https;branch=master \
11"
12SRCREV = "f3ba6e5c2126f2fb07e3d890f990d50c3e204e67"
13
14EXTRA_OECONF:append = " --enable-pcm"
15
16inherit autotools pkgconfig