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.patch14
-rw-r--r--[-rwxr-xr-x]recipes-multimedia/alsa/alsa-lib/0004-pcm-Don-t-store-the-state-for-SND_PCM_STATE_SUSPENDE.patch20
-rw-r--r--recipes-multimedia/alsa/alsa-lib/0005-add-ak4458-conf-for-multichannel-support.patch37
-rw-r--r--[-rwxr-xr-x]recipes-multimedia/alsa/alsa-lib/0006-add-conf-for-iMX-XCVR-sound-card.patch12
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-libav_1.16.0.bb70
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-libav_1.18.0.bb24
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.18.0.imx.bb (renamed from recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.3.imx.bb)24
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-gst-libs-gst-gl-wayland-fix-meson-build.patch36
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-gstreamer-plugins-base-fix-meson-build-in-nxp-fork.patch220
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch34
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-meson-viv-fb-code-must-link-against-libg2d.patch44
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-meson-Add-variables-for-gir-files.patch233
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-viv-fb-Make-sure-config.h-is-included.patch (renamed from recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-viv-fb-Make-sure-config.h-is-included.patch)2
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-glimagesink-Downrank-to-marginal.patch (renamed from recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0009-glimagesink-Downrank-to-marginal.patch)2
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/4ef5c91697a141fea7317aff7f0f28e5a861db99.patch48
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.18.%.bbappend (renamed from recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.%.bbappend)0
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.18.0.imx.bb (renamed from recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.2.imx.bb)41
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.%.bbappend3
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.18.0.imx.bb (renamed from recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.3.imx.bb)6
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.18.0.bb (renamed from recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.16.0.bb)10
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.18.0.bb (renamed from recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.16.0.bb)8
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch58
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0/0002-Remove-unused-valgrind-detection.patch112
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0/0002-meson-build-gir-even-when-cross-compiling-if-introsp.patch36
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0/0003-meson-Add-valgrind-feature.patch74
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-seek-Don-t-use-too-strict-timeout-for-validati.patch32
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0/0004-meson-Add-option-for-installed-tests.patch257
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-respect-the-idententaion-used-in-meson.patch36
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-add-support-for-install-the-tests.patch110
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0/0006-tests-use-a-dictionaries-for-environment.patch48
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0/0007-tests-install-the-environment-for-installed_tests.patch58
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0/capfix.patch37
-rwxr-xr-xrecipes-multimedia/gstreamer/gstreamer1.0/run-ptest2
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0_1.18.0.imx.bb (renamed from recipes-multimedia/gstreamer/gstreamer1.0_1.16.2.imx.bb)44
-rw-r--r--recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.6.1.bb (renamed from recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.5.7.bb)31
-rwxr-xr-xrecipes-multimedia/tinycompress/tinycompress/0001-tinycompress-Add-id3-decoding.patch1001
-rwxr-xr-xrecipes-multimedia/tinycompress/tinycompress/0002-cplay-Support-wave-file.patch221
-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
41 files changed, 2310 insertions, 1188 deletions
diff --git a/recipes-multimedia/alsa/alsa-lib/0001-add-conf-for-multichannel-support-in-imx.patch b/recipes-multimedia/alsa/alsa-lib/0001-add-conf-for-multichannel-support-in-imx.patch
index 747b62c5..6894deae 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 cc06048dcd722049f92ab17958760bd798fb4781 Mon Sep 17 00:00:00 2001 1From e6cea74cad98963d3b0b1c267d4988be4263215c 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,9 +6,10 @@ 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
9--- 10---
10 src/conf/cards/CS42888.conf | 94 ++++++++++++++++++++++++++++++++++++++++++++ 11 src/conf/cards/CS42888.conf | 94 ++++++++++++++++++++++++++++++++++++
11 src/conf/cards/IMX-HDMI.conf | 67 +++++++++++++++++++++++++++++++ 12 src/conf/cards/IMX-HDMI.conf | 67 +++++++++++++++++++++++++
12 src/conf/cards/Makefile.am | 4 +- 13 src/conf/cards/Makefile.am | 4 +-
13 src/conf/cards/aliases.conf | 2 + 14 src/conf/cards/aliases.conf | 2 +
14 4 files changed, 166 insertions(+), 1 deletion(-) 15 4 files changed, 166 insertions(+), 1 deletion(-)
@@ -204,18 +205,15 @@ index 00999f0..fbf0697 100644
204 if BUILD_ALISP 205 if BUILD_ALISP
205 cfg_files += aliases.alisp 206 cfg_files += aliases.alisp
206diff --git a/src/conf/cards/aliases.conf b/src/conf/cards/aliases.conf 207diff --git a/src/conf/cards/aliases.conf b/src/conf/cards/aliases.conf
207index 18a920f..2c422ee 100644 208index 18a920f..7a4f444 100644
208--- a/src/conf/cards/aliases.conf 209--- a/src/conf/cards/aliases.conf
209+++ b/src/conf/cards/aliases.conf 210+++ b/src/conf/cards/aliases.conf
210@@ -57,6 +57,8 @@ CMI8786 cards.CMI8788 211@@ -57,6 +57,8 @@ CMI8786 cards.CMI8788
211 CMI8787 cards.CMI8788 212 CMI8787 cards.CMI8788
212 pistachio cards.pistachio-card 213 pistachio cards.pistachio-card
213 VC4-HDMI cards.vc4-hdmi 214 VC4-HDMI cards.vc4-hdmi
214+cs42888-audio cards.CS42888 215+imx-cs42888 cards.CS42888
215+imx-hdmi-soc cards.IMX-HDMI 216+imx-hdmi-soc cards.IMX-HDMI
216 217
217 <confdir:pcm/default.conf> 218 <confdir:pcm/default.conf>
218 <confdir:pcm/dmix.conf> 219 <confdir:pcm/dmix.conf>
219--
2202.7.4
221
diff --git a/recipes-multimedia/alsa/alsa-lib/0004-pcm-Don-t-store-the-state-for-SND_PCM_STATE_SUSPENDE.patch b/recipes-multimedia/alsa/alsa-lib/0004-pcm-Don-t-store-the-state-for-SND_PCM_STATE_SUSPENDE.patch
index 4d28a77f..1d58aeba 100755..100644
--- a/recipes-multimedia/alsa/alsa-lib/0004-pcm-Don-t-store-the-state-for-SND_PCM_STATE_SUSPENDE.patch
+++ b/recipes-multimedia/alsa/alsa-lib/0004-pcm-Don-t-store-the-state-for-SND_PCM_STATE_SUSPENDE.patch
@@ -1,7 +1,7 @@
1From 93607819d90ddf9bbdad8bbbe4af5d917ca572dc Mon Sep 17 00:00:00 2001 1From 754e0c6112a181b30bd46aa13812f37db01c3387 Mon Sep 17 00:00:00 2001
2From: Shengjiu Wang <shengjiu.wang@freescale.com> 2From: Shengjiu Wang <shengjiu.wang@freescale.com>
3Date: Tue, 10 May 2016 15:09:26 +0800 3Date: Tue, 10 May 2016 15:09:26 +0800
4Subject: [PATCH 2/2] pcm: Don't store the state for SND_PCM_STATE_SUSPENDED 4Subject: [PATCH] pcm: Don't store the state for SND_PCM_STATE_SUSPENDED
5 5
6The resume function don't update the dmix->state, if store SUSPENDED 6The resume function don't update the dmix->state, if store SUSPENDED
7state in snd_pcm_dmix_state, the write function after resume will 7state in snd_pcm_dmix_state, the write function after resume will
@@ -13,6 +13,7 @@ for dmix,dshare,dsnoop.
13Upstream-Status: Pending 13Upstream-Status: Pending
14 14
15Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com> 15Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
16
16--- 17---
17 src/pcm/pcm_dmix.c | 2 +- 18 src/pcm/pcm_dmix.c | 2 +-
18 src/pcm/pcm_dshare.c | 2 +- 19 src/pcm/pcm_dshare.c | 2 +-
@@ -20,10 +21,10 @@ Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
20 3 files changed, 3 insertions(+), 3 deletions(-) 21 3 files changed, 3 insertions(+), 3 deletions(-)
21 22
22diff --git a/src/pcm/pcm_dmix.c b/src/pcm/pcm_dmix.c 23diff --git a/src/pcm/pcm_dmix.c b/src/pcm/pcm_dmix.c
23index a6a8f3a..89c07d1 100644 24index 5b7472d..e08e46f 100644
24--- a/src/pcm/pcm_dmix.c 25--- a/src/pcm/pcm_dmix.c
25+++ b/src/pcm/pcm_dmix.c 26+++ b/src/pcm/pcm_dmix.c
26@@ -466,9 +466,9 @@ static snd_pcm_state_t snd_pcm_dmix_state(snd_pcm_t *pcm) 27@@ -460,9 +460,9 @@ static snd_pcm_state_t snd_pcm_dmix_state(snd_pcm_t *pcm)
27 snd_pcm_state_t state; 28 snd_pcm_state_t state;
28 state = snd_pcm_state(dmix->spcm); 29 state = snd_pcm_state(dmix->spcm);
29 switch (state) { 30 switch (state) {
@@ -35,10 +36,10 @@ index a6a8f3a..89c07d1 100644
35 case SND_PCM_STATE_XRUN: 36 case SND_PCM_STATE_XRUN:
36 if ((err = snd_pcm_direct_slave_recover(dmix)) < 0) 37 if ((err = snd_pcm_direct_slave_recover(dmix)) < 0)
37diff --git a/src/pcm/pcm_dshare.c b/src/pcm/pcm_dshare.c 38diff --git a/src/pcm/pcm_dshare.c b/src/pcm/pcm_dshare.c
38index 7cdfea2..e0b4ea7 100644 39index 8a67257..8ba61b4 100644
39--- a/src/pcm/pcm_dshare.c 40--- a/src/pcm/pcm_dshare.c
40+++ b/src/pcm/pcm_dshare.c 41+++ b/src/pcm/pcm_dshare.c
41@@ -261,9 +261,9 @@ static snd_pcm_state_t snd_pcm_dshare_state(snd_pcm_t *pcm) 42@@ -258,9 +258,9 @@ static snd_pcm_state_t snd_pcm_dshare_state(snd_pcm_t *pcm)
42 snd_pcm_state_t state; 43 snd_pcm_state_t state;
43 state = snd_pcm_state(dshare->spcm); 44 state = snd_pcm_state(dshare->spcm);
44 switch (state) { 45 switch (state) {
@@ -50,10 +51,10 @@ index 7cdfea2..e0b4ea7 100644
50 case SND_PCM_STATE_XRUN: 51 case SND_PCM_STATE_XRUN:
51 if ((err = snd_pcm_direct_slave_recover(dshare)) < 0) 52 if ((err = snd_pcm_direct_slave_recover(dshare)) < 0)
52diff --git a/src/pcm/pcm_dsnoop.c b/src/pcm/pcm_dsnoop.c 53diff --git a/src/pcm/pcm_dsnoop.c b/src/pcm/pcm_dsnoop.c
53index 539b671..03df6ff 100644 54index c6e8cd2..9610482 100644
54--- a/src/pcm/pcm_dsnoop.c 55--- a/src/pcm/pcm_dsnoop.c
55+++ b/src/pcm/pcm_dsnoop.c 56+++ b/src/pcm/pcm_dsnoop.c
56@@ -212,9 +212,9 @@ static snd_pcm_state_t snd_pcm_dsnoop_state(snd_pcm_t *pcm) 57@@ -208,9 +208,9 @@ static snd_pcm_state_t snd_pcm_dsnoop_state(snd_pcm_t *pcm)
57 snd_pcm_state_t state; 58 snd_pcm_state_t state;
58 state = snd_pcm_state(dsnoop->spcm); 59 state = snd_pcm_state(dsnoop->spcm);
59 switch (state) { 60 switch (state) {
@@ -64,6 +65,3 @@ index 539b671..03df6ff 100644
64 return state; 65 return state;
65 case SND_PCM_STATE_XRUN: 66 case SND_PCM_STATE_XRUN:
66 if ((err = snd_pcm_direct_slave_recover(dsnoop)) < 0) 67 if ((err = snd_pcm_direct_slave_recover(dsnoop)) < 0)
67--
682.7.4
69
diff --git a/recipes-multimedia/alsa/alsa-lib/0005-add-ak4458-conf-for-multichannel-support.patch b/recipes-multimedia/alsa/alsa-lib/0005-add-ak4458-conf-for-multichannel-support.patch
index a07f60d6..63af83f7 100644
--- a/recipes-multimedia/alsa/alsa-lib/0005-add-ak4458-conf-for-multichannel-support.patch
+++ b/recipes-multimedia/alsa/alsa-lib/0005-add-ak4458-conf-for-multichannel-support.patch
@@ -1,7 +1,14 @@
1From 1641ce8c724018365d7fa598f9a70c6492e7c271 Mon Sep 17 00:00:00 2001 1From bbfa5f555f8d2c448c9f36fbea11ea3e32dcdcc6 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
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9MIME-Version: 1.0
10Content-Type: text/plain; charset=UTF-8
11Content-Transfer-Encoding: 8bit
5 12
6one limitation is that ALSA and pulseaudio only support 13one limitation is that ALSA and pulseaudio only support
7maximum 8 channels, but ak4458 may support 16 channels 14maximum 8 channels, but ak4458 may support 16 channels
@@ -9,17 +16,19 @@ maximum 8 channels, but ak4458 may support 16 channels
9Upstream-Status: Inappropriate [i.MX specific] 16Upstream-Status: Inappropriate [i.MX specific]
10 17
11Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> 18Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
19
12--- 20---
13 src/conf/cards/AK4458.conf | 74 +++++++++++++++++++++++++++++++++++++++++++++ 21 src/conf/cards/AK4458.conf | 74 +++++++++++++++++++++++++++++++++++++
14 src/conf/cards/Makefile.am | 3 +- 22 src/conf/cards/Makefile.am | 3 +-
15 src/conf/cards/aliases.conf | 1 + 23 src/conf/cards/aliases.conf | 1 +
16 3 files changed, 77 insertions(+), 1 deletion(-) 24 3 files changed, 77 insertions(+), 1 deletion(-)
17 create mode 100644 src/conf/cards/AK4458.conf 25 create mode 100644 src/conf/cards/AK4458.conf
18 26
19Index: alsa-lib-1.1.6/src/conf/cards/AK4458.conf 27diff --git a/src/conf/cards/AK4458.conf b/src/conf/cards/AK4458.conf
20=================================================================== 28new file mode 100644
29index 0000000..3b5b195
21--- /dev/null 30--- /dev/null
22+++ alsa-lib-1.1.6/src/conf/cards/AK4458.conf 31+++ b/src/conf/cards/AK4458.conf
23@@ -0,0 +1,74 @@ 32@@ -0,0 +1,74 @@
24+# 33+#
25+# Configuration for the AK4458 chip 34+# Configuration for the AK4458 chip
@@ -95,10 +104,10 @@ Index: alsa-lib-1.1.6/src/conf/cards/AK4458.conf
95+ } 104+ }
96+ slave.channels 8 105+ slave.channels 8
97+} 106+}
98Index: alsa-lib-1.1.6/src/conf/cards/Makefile.am 107diff --git a/src/conf/cards/Makefile.am b/src/conf/cards/Makefile.am
99=================================================================== 108index fbf0697..34fa5a3 100644
100--- alsa-lib-1.1.6.orig/src/conf/cards/Makefile.am 109--- a/src/conf/cards/Makefile.am
101+++ alsa-lib-1.1.6/src/conf/cards/Makefile.am 110+++ b/src/conf/cards/Makefile.am
102@@ -60,7 +60,8 @@ cfg_files = aliases.conf \ 111@@ -60,7 +60,8 @@ cfg_files = aliases.conf \
103 VXPocket.conf \ 112 VXPocket.conf \
104 VXPocket440.conf \ 113 VXPocket440.conf \
@@ -109,13 +118,13 @@ Index: alsa-lib-1.1.6/src/conf/cards/Makefile.am
109 118
110 if BUILD_ALISP 119 if BUILD_ALISP
111 cfg_files += aliases.alisp 120 cfg_files += aliases.alisp
112Index: alsa-lib-1.1.6/src/conf/cards/aliases.conf 121diff --git a/src/conf/cards/aliases.conf b/src/conf/cards/aliases.conf
113=================================================================== 122index 7a4f444..e41f89e 100644
114--- alsa-lib-1.1.6.orig/src/conf/cards/aliases.conf 123--- a/src/conf/cards/aliases.conf
115+++ alsa-lib-1.1.6/src/conf/cards/aliases.conf 124+++ b/src/conf/cards/aliases.conf
116@@ -59,6 +59,7 @@ pistachio cards.pistachio-card 125@@ -59,6 +59,7 @@ pistachio cards.pistachio-card
117 VC4-HDMI cards.vc4-hdmi 126 VC4-HDMI cards.vc4-hdmi
118 cs42888-audio cards.CS42888 127 imx-cs42888 cards.CS42888
119 imx-hdmi-soc cards.IMX-HDMI 128 imx-hdmi-soc cards.IMX-HDMI
120+ak4458-audio cards.AK4458 129+ak4458-audio cards.AK4458
121 130
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 d72fb02c..3b5f90ec 100755..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 2fd2737a1a0553e164d1b4f78687edf573f8e621 Mon Sep 17 00:00:00 2001 1From dec68918e07d6a7f4397b55b35dd5bed9c114ea9 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,8 +6,9 @@ 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
9--- 10---
10 src/conf/cards/IMX-XCVR.conf | 69 ++++++++++++++++++++++++++++++++++++++++++++ 11 src/conf/cards/IMX-XCVR.conf | 69 ++++++++++++++++++++++++++++++++++++
11 src/conf/cards/Makefile.am | 3 +- 12 src/conf/cards/Makefile.am | 3 +-
12 src/conf/cards/aliases.conf | 1 + 13 src/conf/cards/aliases.conf | 1 +
13 3 files changed, 72 insertions(+), 1 deletion(-) 14 3 files changed, 72 insertions(+), 1 deletion(-)
@@ -103,17 +104,14 @@ index 34fa5a3..70b9bab 100644
103 if BUILD_ALISP 104 if BUILD_ALISP
104 cfg_files += aliases.alisp 105 cfg_files += aliases.alisp
105diff --git a/src/conf/cards/aliases.conf b/src/conf/cards/aliases.conf 106diff --git a/src/conf/cards/aliases.conf b/src/conf/cards/aliases.conf
106index 5d92ac7..c195848 100644 107index e41f89e..d9bfcd6 100644
107--- a/src/conf/cards/aliases.conf 108--- a/src/conf/cards/aliases.conf
108+++ b/src/conf/cards/aliases.conf 109+++ b/src/conf/cards/aliases.conf
109@@ -60,6 +60,7 @@ VC4-HDMI cards.vc4-hdmi 110@@ -60,6 +60,7 @@ VC4-HDMI cards.vc4-hdmi
110 cs42888-audio cards.CS42888 111 imx-cs42888 cards.CS42888
111 imx-hdmi-soc cards.IMX-HDMI 112 imx-hdmi-soc cards.IMX-HDMI
112 ak4458-audio cards.AK4458 113 ak4458-audio cards.AK4458
113+imx-audio-xcvr cards.IMX-XCVR 114+imx-audio-xcvr cards.IMX-XCVR
114 115
115 <confdir:pcm/default.conf> 116 <confdir:pcm/default.conf>
116 <confdir:pcm/dmix.conf> 117 <confdir:pcm/dmix.conf>
117--
1182.7.4
119
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.16.0.bb b/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.16.0.bb
deleted file mode 100644
index 3f1ec99d..00000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.16.0.bb
+++ /dev/null
@@ -1,70 +0,0 @@
1SUMMARY = "Libav-based GStreamer 1.x plugin"
2HOMEPAGE = "http://gstreamer.freedesktop.org/"
3SECTION = "multimedia"
4
5LICENSE = "GPLv2+ & LGPLv2+ & ( (GPLv2+ & LGPLv2.1+) | (GPLv3+ & LGPLv3+) )"
6LICENSE_FLAGS = "commercial"
7LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
8 file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \
9 file://ext/libav/gstav.h;beginline=1;endline=18;md5=a752c35267d8276fd9ca3db6994fca9c \
10 file://gst-libs/ext/libav/COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
11 file://gst-libs/ext/libav/COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
12 file://gst-libs/ext/libav/COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \
13 file://gst-libs/ext/libav/COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
14
15SRC_URI = "http://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${PV}.tar.xz \
16 file://0001-Disable-yasm-for-libav-when-disable-yasm.patch \
17 file://workaround-to-build-gst-libav-for-i586-with-gcc.patch \
18 file://mips64_cpu_detection.patch \
19 file://0001-configure-check-for-armv7ve-variant.patch \
20 file://0001-fix-host-contamination.patch \
21 "
22SRC_URI[md5sum] = "e3a201a45985ddc1327cd496046ca818"
23SRC_URI[sha256sum] = "dfac119043a9cfdcacd7acde77f674ab172cf2537b5812be52f49e9cddc53d9a"
24
25S = "${WORKDIR}/gst-libav-${PV}"
26
27DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base zlib bzip2 xz"
28
29inherit autotools pkgconfig upstream-version-is-even gtk-doc
30
31# CAUTION: Using the system libav is not recommended. Since the libav API is changing all the time,
32# compilation errors (and other, more subtle bugs) can happen. It is usually better to rely on the
33# libav copy included in the gst-libav package.
34PACKAGECONFIG ??= "orc yasm"
35
36PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl,"
37PACKAGECONFIG[libav] = "--with-system-libav,,libav"
38PACKAGECONFIG[orc] = "--enable-orc,--disable-orc,orc"
39PACKAGECONFIG[yasm] = "--enable-yasm,--disable-yasm,nasm-native"
40PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind"
41
42GSTREAMER_1_0_DEBUG ?= "--disable-debug"
43
44LIBAV_EXTRA_CONFIGURE = "--with-libav-extra-configure"
45
46LIBAV_EXTRA_CONFIGURE_COMMON_ARG = "--target-os=linux \
47 --cc='${CC}' --as='${CC}' --ld='${CC}' --nm='${NM}' --ar='${AR}' \
48 --ranlib='${RANLIB}' \
49 ${GSTREAMER_1_0_DEBUG} \
50 --cross-prefix='${HOST_PREFIX}'"
51
52# Disable assembly optimizations for X32, as this libav lacks the support
53PACKAGECONFIG_remove_linux-gnux32 = "yasm"
54LIBAV_EXTRA_CONFIGURE_COMMON_ARG_append_linux-gnux32 = " --disable-asm"
55
56LIBAV_EXTRA_CONFIGURE_COMMON = \
57'${LIBAV_EXTRA_CONFIGURE}="${LIBAV_EXTRA_CONFIGURE_COMMON_ARG}"'
58
59EXTRA_OECONF = "${LIBAV_EXTRA_CONFIGURE_COMMON}"
60
61FILES_${PN} += "${libdir}/gstreamer-1.0/*.so"
62FILES_${PN}-dev += "${libdir}/gstreamer-1.0/*.la"
63FILES_${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a"
64
65# http://errors.yoctoproject.org/Errors/Details/20493/
66ARM_INSTRUCTION_SET_armv4 = "arm"
67ARM_INSTRUCTION_SET_armv5 = "arm"
68
69# ffmpeg/libav disables PIC on some platforms (e.g. x86-32)
70INSANE_SKIP_${PN} = "textrel"
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.18.0.bb b/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.18.0.bb
new file mode 100644
index 00000000..d67313a6
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.18.0.bb
@@ -0,0 +1,24 @@
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 = "LGPLv2+"
10LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \
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-${PV}.tar.xz"
15SRC_URI[sha256sum] = "42f93f5ce9a3fc22051e5f783a4574b56ebf213f331f75dcbc3552459bd3a06a"
16
17S = "${WORKDIR}/gst-libav-${PV}"
18
19DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base ffmpeg"
20
21inherit meson pkgconfig upstream-version-is-even
22
23FILES_${PN} += "${libdir}/gstreamer-1.0/*.so"
24FILES_${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a"
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.3.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.18.0.imx.bb
index 6925611a..5d93176b 100644
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.3.imx.bb
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.18.0.imx.bb
@@ -3,7 +3,7 @@ require recipes-multimedia/gstreamer/gstreamer1.0-plugins-common.inc
3DEPENDS_append_imxgpu2d = " virtual/libg2d" 3DEPENDS_append_imxgpu2d = " virtual/libg2d"
4DEPENDS_append_mx8 = " libdrm" 4DEPENDS_append_mx8 = " libdrm"
5 5
6PACKAGECONFIG_append_mx8 = " kms" 6PACKAGECONFIG_append_mx8 = " kms tinycompress"
7 7
8DEFAULT_PREFERENCE = "-1" 8DEFAULT_PREFERENCE = "-1"
9 9
@@ -11,20 +11,12 @@ PACKAGE_ARCH_imxpxp = "${MACHINE_SOCARCH}"
11PACKAGE_ARCH_mx8 = "${MACHINE_SOCARCH}" 11PACKAGE_ARCH_mx8 = "${MACHINE_SOCARCH}"
12 12
13GST1.0-PLUGINS-BAD_SRC ?= "gitsm://source.codeaurora.org/external/imx/gst-plugins-bad.git;protocol=https" 13GST1.0-PLUGINS-BAD_SRC ?= "gitsm://source.codeaurora.org/external/imx/gst-plugins-bad.git;protocol=https"
14SRCBRANCH = "MM_04.05.07_2011_L5.4.70" 14SRCBRANCH = "MM_04.06.01_2105_L5.10.y"
15 15
16SRC_URI = " \ 16SRC_URI = " \
17 ${GST1.0-PLUGINS-BAD_SRC};branch=${SRCBRANCH} \ 17 ${GST1.0-PLUGINS-BAD_SRC};branch=${SRCBRANCH} \
18 file://0001-ext-wayland-fix-meson-build-in-nxp-fork.patch \
19 file://0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch \
20 file://opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch \
21 file://0001-opencv-allow-compilation-against-4.4.x.patch \
22 file://0001-vulkan-Drop-use-of-VK_RESULT_BEGIN_RANGE.patch \
23 file://fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch \
24 file://avoid-including-sys-poll.h-directly.patch \
25 file://ensure-valid-sentinels-for-gst_structure_get-etc.patch \
26" 18"
27SRCREV = "cf7f2d0125424ce0d63ddc7f1eadc9ef71d10db1" 19SRCREV = "227af57d23cb6b3564fc94446ab2c9fe8c8cff22"
28 20
29S = "${WORKDIR}/git" 21S = "${WORKDIR}/git"
30 22
@@ -42,7 +34,7 @@ PACKAGECONFIG_GL_imxpxp = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gl
42PACKAGECONFIG ??= " \ 34PACKAGECONFIG ??= " \
43 ${GSTREAMER_ORC} \ 35 ${GSTREAMER_ORC} \
44 ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \ 36 ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
45 ${@bb.utils.filter('DISTRO_FEATURES', 'directfb vulkan', d)} \ 37 ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)} \
46 ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \ 38 ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \
47 ${PACKAGECONFIG_GL} \ 39 ${PACKAGECONFIG_GL} \
48 bz2 closedcaption curl dash dtls hls rsvg sbc smoothstreaming sndfile \ 40 bz2 closedcaption curl dash dtls hls rsvg sbc smoothstreaming sndfile \
@@ -91,6 +83,7 @@ PACKAGECONFIG[smoothstreaming] = "-Dsmoothstreaming=enabled,-Dsmoothstreaming=di
91PACKAGECONFIG[sndfile] = "-Dsndfile=enabled,-Dsndfile=disabled,libsndfile1" 83PACKAGECONFIG[sndfile] = "-Dsndfile=enabled,-Dsndfile=disabled,libsndfile1"
92PACKAGECONFIG[srtp] = "-Dsrtp=enabled,-Dsrtp=disabled,libsrtp" 84PACKAGECONFIG[srtp] = "-Dsrtp=enabled,-Dsrtp=disabled,libsrtp"
93PACKAGECONFIG[tinyalsa] = "-Dtinyalsa=enabled,-Dtinyalsa=disabled,tinyalsa" 85PACKAGECONFIG[tinyalsa] = "-Dtinyalsa=enabled,-Dtinyalsa=disabled,tinyalsa"
86PACKAGECONFIG[tinycompress] = "-Dtinycompress=enabled,-Dtinycompress=disabled,tinycompress"
94PACKAGECONFIG[ttml] = "-Dttml=enabled,-Dttml=disabled,libxml2 pango cairo" 87PACKAGECONFIG[ttml] = "-Dttml=enabled,-Dttml=disabled,libxml2 pango cairo"
95PACKAGECONFIG[uvch264] = "-Duvch264=enabled,-Duvch264=disabled,libusb1 libgudev" 88PACKAGECONFIG[uvch264] = "-Duvch264=enabled,-Duvch264=disabled,libusb1 libgudev"
96PACKAGECONFIG[voaacenc] = "-Dvoaacenc=enabled,-Dvoaacenc=disabled,vo-aacenc" 89PACKAGECONFIG[voaacenc] = "-Dvoaacenc=enabled,-Dvoaacenc=disabled,vo-aacenc"
@@ -102,9 +95,6 @@ PACKAGECONFIG[webrtc] = "-Dwebrtc=enabled,-Dwebrtc=disabled,libnice"
102PACKAGECONFIG[webrtcdsp] = "-Dwebrtcdsp=enabled,-Dwebrtcdsp=disabled,webrtc-audio-processing" 95PACKAGECONFIG[webrtcdsp] = "-Dwebrtcdsp=enabled,-Dwebrtcdsp=disabled,webrtc-audio-processing"
103PACKAGECONFIG[zbar] = "-Dzbar=enabled,-Dzbar=disabled,zbar" 96PACKAGECONFIG[zbar] = "-Dzbar=enabled,-Dzbar=disabled,zbar"
104 97
105# Following package config in not available in NXP fork:
106#PACKAGECONFIG[lcms2] = "-Dcolormanagement=enabled,-Dcolormanagement=disabled,lcms"
107
108# these plugins currently have no corresponding library in OE-core or meta-openembedded: 98# these plugins currently have no corresponding library in OE-core or meta-openembedded:
109# aom androidmedia applemedia bs2b chromaprint d3dvideosink 99# aom androidmedia applemedia bs2b chromaprint d3dvideosink
110# directsound dts fdkaac gme gsm iq kate ladspa lv2 mpeg2enc 100# directsound dts fdkaac gme gsm iq kate ladspa lv2 mpeg2enc
@@ -139,8 +129,6 @@ EXTRA_OEMESON += " \
139 -Dmplex=disabled \ 129 -Dmplex=disabled \
140 -Dmsdk=disabled \ 130 -Dmsdk=disabled \
141 -Dmusepack=disabled \ 131 -Dmusepack=disabled \
142 -Dnvdec=disabled \
143 -Dnvenc=disabled \
144 -Dofa=disabled \ 132 -Dofa=disabled \
145 -Dopenexr=disabled \ 133 -Dopenexr=disabled \
146 -Dopenmpt=disabled \ 134 -Dopenmpt=disabled \
@@ -150,7 +138,6 @@ EXTRA_OEMESON += " \
150 -Dspandsp=disabled \ 138 -Dspandsp=disabled \
151 -Dsrt=disabled \ 139 -Dsrt=disabled \
152 -Dteletext=disabled \ 140 -Dteletext=disabled \
153 -Dvdpau=disabled \
154 -Dwasapi=disabled \ 141 -Dwasapi=disabled \
155 -Dwildmidi=disabled \ 142 -Dwildmidi=disabled \
156 -Dwinks=disabled \ 143 -Dwinks=disabled \
@@ -168,6 +155,7 @@ ARM_INSTRUCTION_SET_armv5 = "arm"
168 155
169FILES_${PN}-freeverb += "${datadir}/gstreamer-1.0/presets/GstFreeverb.prs" 156FILES_${PN}-freeverb += "${datadir}/gstreamer-1.0/presets/GstFreeverb.prs"
170FILES_${PN}-opencv += "${datadir}/gst-plugins-bad/1.0/opencv*" 157FILES_${PN}-opencv += "${datadir}/gst-plugins-bad/1.0/opencv*"
158FILES_${PN}-transcode += "${datadir}/gstreamer-1.0/encoding-profiles"
171FILES_${PN}-voamrwbenc += "${datadir}/gstreamer-1.0/presets/GstVoAmrwbEnc.prs" 159FILES_${PN}-voamrwbenc += "${datadir}/gstreamer-1.0/presets/GstVoAmrwbEnc.prs"
172# include fragment shaders 160# include fragment shaders
173FILES_${PN}-opengl += "/usr/share/*.fs" 161FILES_${PN}-opengl += "/usr/share/*.fs"
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-gst-libs-gst-gl-wayland-fix-meson-build.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-gst-libs-gst-gl-wayland-fix-meson-build.patch
deleted file mode 100644
index 61baf2f9..00000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-gst-libs-gst-gl-wayland-fix-meson-build.patch
+++ /dev/null
@@ -1,36 +0,0 @@
1From a145a129a8122f21c1e243b3dc2e5708f4c13bef Mon Sep 17 00:00:00 2001
2From: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
3Date: Thu, 23 Jan 2020 12:54:10 +0000
4Subject: [PATCH] gst-libs gst gl wayland: fix meson build
5
6Since introduction of meson build system, modifications introduced in
7NXP fork are breaking the build, where xdg-shell-client-protocol.h
8is searched via relative path. This code is only present in NXP fork and
9should be removed.
10
11This reverts commit [48bde732b00fb42df636ebbaf3b06e5e7971c206]
12("wayland: fix build break in yocto") from upstream.
13
14Upstream-Status: Pending
15
16Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
17---
18 gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.h | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-)
20
21diff --git a/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.h b/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.h
22index d1795591f..89dedd9b5 100644
23--- a/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.h
24+++ b/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.h
25@@ -22,7 +22,7 @@
26 #define __GST_GL_WINDOW_WAYLAND_EGL_H__
27
28 #include <wayland-client.h>
29-#include <gst/gl/wayland/xdg-shell-client-protocol.h>
30+#include "xdg-shell-client-protocol.h"
31 #include <wayland-egl.h>
32 #include <wayland-cursor.h>
33
34--
352.17.1
36
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-gstreamer-plugins-base-fix-meson-build-in-nxp-fork.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-gstreamer-plugins-base-fix-meson-build-in-nxp-fork.patch
deleted file mode 100644
index da152531..00000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-gstreamer-plugins-base-fix-meson-build-in-nxp-fork.patch
+++ /dev/null
@@ -1,220 +0,0 @@
1From def285f623bc30b9d1acede00393188e693cc741 Mon Sep 17 00:00:00 2001
2From: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
3Date: Sat, 22 Feb 2020 13:22:57 +0000
4Subject: [PATCH] gstreamer-plugins-base: fix meson build in nxp fork
5
6- Add missing IMX header file into istall target;
7- Allocator's meta data files are missing in meson.build, bring them back;
8- Add ION NXP-specific allocator to meson.build;
9- Introduce additional configuration option to pass extra include paths,
10 which are required to build ION allocator;
11- Some video sources are missing, bring them also into the build;
12
13Upstream-Status: Pending
14
15Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
16---
17 gst-libs/gst/allocators/meson.build | 30 +++++++++++++++++++++++++++--
18 gst-libs/gst/gl/gstglconfig.h.meson | 2 ++
19 gst-libs/gst/gl/meson.build | 20 +++++++++++++++++++
20 gst-libs/gst/meson.build | 6 ++++++
21 gst-libs/gst/video/meson.build | 11 +++++++++++
22 meson.build | 3 +++
23 meson_options.txt | 4 ++++
24 7 files changed, 74 insertions(+), 2 deletions(-)
25
26diff --git a/gst-libs/gst/allocators/meson.build b/gst-libs/gst/allocators/meson.build
27index 364baeebf..30b1495c9 100644
28--- a/gst-libs/gst/allocators/meson.build
29+++ b/gst-libs/gst/allocators/meson.build
30@@ -5,18 +5,44 @@ gst_allocators_headers = [
31 'gstphysmemory.h',
32 'gstdmabuf.h',
33 ]
34+
35+imx_gst_allocators_headers = [
36+ 'gstphymemmeta.h',
37+ 'gstdmabufmeta.h',
38+ 'gstallocatorphymem.h',
39+]
40+
41+if cc.has_header('linux/ion.h', include_directories : imx_includes)
42+ imx_gst_allocators_headers += [
43+ 'gstionmemory.h',
44+ ]
45+endif
46+
47+gst_allocators_headers += imx_gst_allocators_headers
48+
49 install_headers(gst_allocators_headers, subdir : 'gstreamer-1.0/gst/allocators/')
50
51 gst_allocators_sources = [ 'gstdmabuf.c', 'gstfdmemory.c', 'gstphysmemory.c']
52+
53+imx_gst_allocators_sources = ['gstdmabufmeta.c', 'gstphymemmeta.c', 'gstallocatorphymem.c']
54+
55+if cc.has_header('linux/ion.h', include_directories : imx_includes)
56+ imx_gst_allocators_sources += [
57+ 'gstionmemory.c',
58+ ]
59+endif
60+
61+gst_allocators_sources += imx_gst_allocators_sources
62+
63 gstallocators = library('gstallocators-@0@'.format(api_version),
64 gst_allocators_sources,
65 c_args : gst_plugins_base_args + ['-DBUILDING_GST_ALLOCATORS'],
66- include_directories: [configinc, libsinc],
67+ include_directories: [configinc, libsinc, imx_includes],
68 version : libversion,
69 soversion : soversion,
70 darwin_versions : osxversion,
71 install : true,
72- dependencies : [gst_dep],
73+ dependencies : [video_dep, gst_dep],
74 )
75
76 allocators_gen_sources = []
77diff --git a/gst-libs/gst/gl/gstglconfig.h.meson b/gst-libs/gst/gl/gstglconfig.h.meson
78index 11795c16c..66cd54a7e 100644
79--- a/gst-libs/gst/gl/gstglconfig.h.meson
80+++ b/gst-libs/gst/gl/gstglconfig.h.meson
81@@ -32,8 +32,10 @@ G_BEGIN_DECLS
82 #mesondefine GST_GL_HAVE_PLATFORM_CGL
83 #mesondefine GST_GL_HAVE_PLATFORM_EAGL
84
85+#mesondefine GST_GL_HAVE_IONDMA
86 #mesondefine GST_GL_HAVE_DMABUF
87 #mesondefine GST_GL_HAVE_VIV_DIRECTVIV
88+#mesondefine GST_GL_HAVE_PHYMEM
89
90 #mesondefine GST_GL_HAVE_GLEGLIMAGEOES
91 #mesondefine GST_GL_HAVE_GLCHAR
92diff --git a/gst-libs/gst/gl/meson.build b/gst-libs/gst/gl/meson.build
93index 0e0ba1b7d..6f6c6866d 100644
94--- a/gst-libs/gst/gl/meson.build
95+++ b/gst-libs/gst/gl/meson.build
96@@ -123,8 +123,10 @@ glconf_options = [
97 'GST_GL_HAVE_PLATFORM_CGL',
98 'GST_GL_HAVE_PLATFORM_EAGL',
99
100+ 'GST_GL_HAVE_IONDMA',
101 'GST_GL_HAVE_DMABUF',
102 'GST_GL_HAVE_VIV_DIRECTVIV',
103+ 'GST_GL_HAVE_PHYMEM',
104
105 'GST_GL_HAVE_GLEGLIMAGEOES',
106 'GST_GL_HAVE_GLCHAR',
107@@ -146,6 +148,18 @@ if unneeded_dep.found()
108 error ('Found unfindable dependency')
109 endif
110
111+if cc.has_header('linux/ion.h', include_directories : imx_includes)
112+ glconf.set10('GST_GL_HAVE_IONDMA', 1)
113+ gl_sources += [
114+ 'gstglmemorydma.c',
115+ ]
116+ gl_headers += [
117+ 'gstglmemorydma.h',
118+ ]
119+else
120+ error('i.MX platform requires ION support to be enabled!')
121+endif
122+
123 # OpenGL/GLES2 libraries
124 gl_lib_deps = []
125 # GL platform - EGL, GLX, CGL, WGL, etc
126@@ -501,6 +515,7 @@ if need_platform_egl != 'no'
127 glconf.set10('GST_GL_HAVE_DMABUF', 1)
128 endif
129
130+
131 egl_includes = '''
132 #include <EGL/egl.h>
133 #include <EGL/eglext.h>
134@@ -808,9 +823,14 @@ if need_platform_egl != 'no' and need_win_viv_fb != 'no'
135 enabled_gl_winsys += 'viv-fb'
136 glconf.set10('GST_GL_HAVE_WINDOW_VIV_FB', 1)
137 glconf.set10('GST_GL_HAVE_VIV_DIRECTVIV', 1)
138+ glconf.set10('GST_GL_HAVE_PHYMEM', 1)
139 gl_sources += [
140 'viv-fb/gstgldisplay_viv_fb.c',
141 'viv-fb/gstglwindow_viv_fb_egl.c',
142+ 'gstglphymemory.c',
143+ ]
144+ gl_headers += [
145+ 'gstglphymemory.h',
146 ]
147 gl_cpp_args += ['-DEGL_API_FB']
148 endif
149diff --git a/gst-libs/gst/meson.build b/gst-libs/gst/meson.build
150index cd3b5b043..1935f46e5 100644
151--- a/gst-libs/gst/meson.build
152+++ b/gst-libs/gst/meson.build
153@@ -11,3 +11,9 @@ subdir('app')
154 subdir('allocators')
155 # FIXME: gl deps are automagic
156 subdir('gl')
157+
158+# Install dangling imx header, required by other plugins
159+gst_imx_header = [
160+ 'gstimxcommon.h',
161+]
162+install_headers(gst_imx_header, subdir : 'gstreamer-1.0/')
163diff --git a/gst-libs/gst/video/meson.build b/gst-libs/gst/video/meson.build
164index b4dfcdf65..d8531f199 100644
165--- a/gst-libs/gst/video/meson.build
166+++ b/gst-libs/gst/video/meson.build
167@@ -35,6 +35,11 @@ video_sources = [
168 'videooverlay.c',
169 ]
170
171+imx_video_sources = [
172+ 'gstvideohdr10meta.c',
173+]
174+video_sources += imx_video_sources
175+
176 video_headers = [
177 'colorbalance.h',
178 'colorbalancechannel.h',
179@@ -70,6 +75,12 @@ video_headers = [
180 'video-overlay-composition.h',
181 'video-multiview.h',
182 ]
183+
184+imx_video_headers = [
185+ 'gstvideohdr10meta.h',
186+]
187+video_headers += imx_video_headers
188+
189 install_headers(video_headers, subdir : 'gstreamer-1.0/gst/video/')
190
191 video_mkenum_headers = [
192diff --git a/meson.build b/meson.build
193index 2fca28205..7781934cd 100644
194--- a/meson.build
195+++ b/meson.build
196@@ -103,6 +103,9 @@ if glib_checks.disabled() or (glib_checks.auto() and not gst_version_is_dev)
197 add_project_arguments('-DG_DISABLE_CHECKS', language: 'c')
198 endif
199
200+# Define i.MX-specific include path as variable from options
201+imx_includes = include_directories(get_option('extra_imx_incdir'))
202+
203 check_headers = [
204 ['HAVE_DLFCN_H', 'dlfcn.h'],
205 ['HAVE_EMMINTRIN_H', 'emmintrin.h'],
206diff --git a/meson_options.txt b/meson_options.txt
207index e7af4dd45..d44401ca6 100644
208--- a/meson_options.txt
209+++ b/meson_options.txt
210@@ -85,3 +85,7 @@ option('package-name', type : 'string', yield : true,
211 description : 'package name to use in plugins')
212 option('package-origin', type : 'string', value : 'Unknown package origin', yield : true,
213 description : 'package origin URL to use in plugins')
214+
215+# NXP specific options
216+option('extra_imx_incdir', type : 'string', yield : true, description : 'i.MX specific header include path')
217+
218--
2192.17.1
220
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch
deleted file mode 100644
index 55871883..00000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch
+++ /dev/null
@@ -1,34 +0,0 @@
1From f82db8496df8ffb8352248e895258c19f8f4776b Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim@centricular.com>
3Date: Thu, 17 Oct 2019 20:06:24 +0100
4Subject: [PATCH] meson: build gir even when cross-compiling if introspection
5 was enabled explicitly
6
7This can be made to work in certain circumstances when
8cross-compiling, so default to not building g-i stuff
9when cross-compiling, but allow it if introspection was
10enabled explicitly via -Dintrospection=enabled.
11
12See gstreamer/gstreamer#454 and gstreamer/gstreamer#381.
13
14Upstream-Status: Backport [30672ba7d134553e59935ddc875104adba26f25c]
15
16Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
17
18---
19 meson.build | 2 +-
20 1 file changed, 1 insertion(+), 1 deletion(-)
21
22diff --git a/meson.build b/meson.build
23index 2fca28205..2714af718 100644
24--- a/meson.build
25+++ b/meson.build
26@@ -355,7 +355,7 @@ endif
27
28 gir = find_program('g-ir-scanner', required : get_option('introspection'))
29 gnome = import('gnome')
30-build_gir = gir.found() and not meson.is_cross_build()
31+build_gir = gir.found() and (not meson.is_cross_build() or get_option('introspection').enabled())
32 gir_init_section = [ '--add-init-section=extern void gst_init(gint*,gchar**);' + \
33 'g_setenv("GST_REGISTRY_DISABLE", "yes", TRUE);' + \
34 'g_setenv("GST_REGISTRY_1.0", "@0@", TRUE);'.format(meson.current_build_dir() + '/gir_empty_registry.reg') + \
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-meson-viv-fb-code-must-link-against-libg2d.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-meson-viv-fb-code-must-link-against-libg2d.patch
deleted file mode 100644
index c761619f..00000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-meson-viv-fb-code-must-link-against-libg2d.patch
+++ /dev/null
@@ -1,44 +0,0 @@
1From 8153e86dac04076fb80fc272c8374d4ba019fa3c Mon Sep 17 00:00:00 2001
2From: Zan Dobersek <zdobersek@igalia.com>
3Date: Wed, 4 Nov 2020 14:02:10 +0100
4Subject: [PATCH] meson: viv-fb code must link against libg2d
5
6Find the libg2d library and link against it, if necessary, avoiding
7linking errors for couple of libg2d symbols.
8
9Upstream-Status: Pending
10
11Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
12---
13 gst-libs/gst/gl/meson.build | 6 +++++-
14 1 file changed, 5 insertions(+), 1 deletion(-)
15
16diff --git a/gst-libs/gst/gl/meson.build b/gst-libs/gst/gl/meson.build
17index 6f6c6866d..fb6a9aabf 100644
18--- a/gst-libs/gst/gl/meson.build
19+++ b/gst-libs/gst/gl/meson.build
20@@ -818,9 +818,11 @@ if need_win_gbm != 'no'
21 endif
22
23 if need_platform_egl != 'no' and need_win_viv_fb != 'no'
24- if egl_dep.found() and cc.has_function ('fbGetDisplay', dependencies : egl_dep)
25+ g2d_dep = cc.find_library('g2d', required : false)
26+ if egl_dep.found() and g2d_dep.found() and cc.has_function ('fbGetDisplay', dependencies : egl_dep)
27 if cc.has_function ('glTexDirectVIV', dependencies : gles2_dep)
28 enabled_gl_winsys += 'viv-fb'
29+ gl_winsys_deps += [g2d_dep]
30 glconf.set10('GST_GL_HAVE_WINDOW_VIV_FB', 1)
31 glconf.set10('GST_GL_HAVE_VIV_DIRECTVIV', 1)
32 glconf.set10('GST_GL_HAVE_PHYMEM', 1)
33@@ -834,6 +836,8 @@ if need_platform_egl != 'no' and need_win_viv_fb != 'no'
34 ]
35 gl_cpp_args += ['-DEGL_API_FB']
36 endif
37+ else
38+ g2d_dep = unneeded_dep
39 endif
40 endif
41
42--
432.28.0
44
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-meson-Add-variables-for-gir-files.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-meson-Add-variables-for-gir-files.patch
deleted file mode 100644
index 9494f622..00000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-meson-Add-variables-for-gir-files.patch
+++ /dev/null
@@ -1,233 +0,0 @@
1From 7a21c86a3facfc7fe8285e764324839b2e55df8a Mon Sep 17 00:00:00 2001
2From: Thibault Saunier <tsaunier@igalia.com>
3Date: Mon, 22 Oct 2018 11:44:37 +0200
4Subject: [PATCH] meson: Add variables for gir files
5
6And flatten list of sources for dependencies
7
8Upstream-Status: Backport [685731e989dc074a4b0d48b6c8062e2738f09719]
9
10Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
11
12---
13 gst-libs/gst/allocators/meson.build | 5 +++--
14 gst-libs/gst/app/meson.build | 6 ++++--
15 gst-libs/gst/audio/meson.build | 5 +++--
16 gst-libs/gst/pbutils/meson.build | 5 +++--
17 gst-libs/gst/rtp/meson.build | 6 ++++--
18 gst-libs/gst/rtsp/meson.build | 5 +++--
19 gst-libs/gst/sdp/meson.build | 6 ++++--
20 gst-libs/gst/tag/meson.build | 5 +++--
21 gst-libs/gst/video/meson.build | 5 +++--
22 9 files changed, 30 insertions(+), 18 deletions(-)
23
24diff --git a/gst-libs/gst/allocators/meson.build b/gst-libs/gst/allocators/meson.build
25index 364baeebf..56f156dc3 100644
26--- a/gst-libs/gst/allocators/meson.build
27+++ b/gst-libs/gst/allocators/meson.build
28@@ -22,7 +22,7 @@ gstallocators = library('gstallocators-@0@'.format(api_version),
29 allocators_gen_sources = []
30 if build_gir
31 gst_gir_extra_args = gir_init_section + [ '--c-include=gst/allocators/allocators.h' ]
32- allocators_gen_sources += [gnome.generate_gir(gstallocators,
33+ allocators_gir = gnome.generate_gir(gstallocators,
34 sources : gst_allocators_sources + gst_allocators_headers,
35 namespace : 'GstAllocators',
36 nsversion : api_version,
37@@ -33,7 +33,8 @@ if build_gir
38 install : true,
39 extra_args : gst_gir_extra_args,
40 dependencies : [gst_dep]
41- )]
42+ )
43+ allocators_gen_sources += allocators_gir
44 endif
45
46 allocators_dep = declare_dependency(link_with: gstallocators,
47diff --git a/gst-libs/gst/app/meson.build b/gst-libs/gst/app/meson.build
48index 81dd0f42c..7a90f5e10 100644
49--- a/gst-libs/gst/app/meson.build
50+++ b/gst-libs/gst/app/meson.build
51@@ -32,7 +32,7 @@ gstapp = library('gstapp-@0@'.format(api_version),
52
53 if build_gir
54 gst_gir_extra_args = gir_init_section + [ '--c-include=gst/app/app.h' ]
55- app_gen_sources += [gnome.generate_gir(gstapp,
56+ app_gir = gnome.generate_gir(gstapp,
57 sources : app_sources + app_headers + [gstapp_c] + [gstapp_h],
58 namespace : 'GstApp',
59 nsversion : api_version,
60@@ -43,7 +43,9 @@ if build_gir
61 install : true,
62 extra_args : gst_gir_extra_args,
63 dependencies : [gst_dep, gst_base_dep]
64- )]
65+ )
66+
67+ app_gen_sources += app_gir
68 endif
69
70 app_dep = declare_dependency(link_with: gstapp,
71diff --git a/gst-libs/gst/audio/meson.build b/gst-libs/gst/audio/meson.build
72index 0e4efab2e..2a449d4bf 100644
73--- a/gst-libs/gst/audio/meson.build
74+++ b/gst-libs/gst/audio/meson.build
75@@ -153,7 +153,7 @@ gstaudio = library('gstaudio-@0@'.format(api_version),
76
77 if build_gir
78 gst_gir_extra_args = gir_init_section + [ '--c-include=gst/audio/audio.h' ]
79- audio_gen_sources += [gnome.generate_gir(gstaudio,
80+ audio_gir = gnome.generate_gir(gstaudio,
81 sources : audio_src + audio_headers + [gstaudio_c] + [gstaudio_h],
82 namespace : 'GstAudio',
83 nsversion : api_version,
84@@ -164,7 +164,8 @@ if build_gir
85 install : true,
86 extra_args : gst_gir_extra_args,
87 dependencies : gstaudio_deps
88- )]
89+ )
90+ audio_gen_sources += [audio_gir]
91 endif
92
93 audio_dep = declare_dependency(link_with : gstaudio,
94diff --git a/gst-libs/gst/pbutils/meson.build b/gst-libs/gst/pbutils/meson.build
95index 2faf62622..0e96722fd 100644
96--- a/gst-libs/gst/pbutils/meson.build
97+++ b/gst-libs/gst/pbutils/meson.build
98@@ -63,7 +63,7 @@ pbutils = library('gstpbutils-@0@'.format(api_version),
99 pbutils_gen_sources = [gstpbutils_h, gst_pbutils_version_h]
100 if build_gir
101 gst_gir_extra_args = gir_init_section + [ '--c-include=gst/pbutils/pbutils.h' ]
102- pbutils_gen_sources += [gnome.generate_gir(pbutils,
103+ pbutils_gir = gnome.generate_gir(pbutils,
104 sources : pbutils_sources + pbutils_headers + [gstpbutils_h, gst_pbutils_version_h],
105 namespace : 'GstPbutils',
106 nsversion : api_version,
107@@ -74,7 +74,8 @@ if build_gir
108 install : true,
109 extra_args : gst_gir_extra_args,
110 dependencies : gstpbutils_deps
111- )]
112+ )
113+ pbutils_gen_sources += [pbutils_gir]
114 endif
115
116 pbutils_dep = declare_dependency(link_with : pbutils,
117diff --git a/gst-libs/gst/rtp/meson.build b/gst-libs/gst/rtp/meson.build
118index f47ec6592..7ea6658d5 100644
119--- a/gst-libs/gst/rtp/meson.build
120+++ b/gst-libs/gst/rtp/meson.build
121@@ -49,7 +49,7 @@ gst_rtp = library('gstrtp-@0@'.format(api_version),
122 rtp_gen_sources = [gstrtp_enum_h]
123 if build_gir
124 gst_gir_extra_args = gir_init_section + [ '--c-include=gst/rtp/rtp.h' ]
125- rtp_gen_sources += [gnome.generate_gir(gst_rtp,
126+ rtp_gir = gnome.generate_gir(gst_rtp,
127 sources : rtp_sources + rtp_headers + [gstrtp_enum_c] + [gstrtp_enum_h],
128 namespace : 'GstRtp',
129 nsversion : api_version,
130@@ -60,7 +60,9 @@ if build_gir
131 install : true,
132 extra_args : gst_gir_extra_args,
133 dependencies : gstrtp_deps
134- )]
135+ )
136+
137+ rtp_gen_sources += [rtp_gir]
138 endif
139
140
141diff --git a/gst-libs/gst/rtsp/meson.build b/gst-libs/gst/rtsp/meson.build
142index 27e309d5a..3632adceb 100644
143--- a/gst-libs/gst/rtsp/meson.build
144+++ b/gst-libs/gst/rtsp/meson.build
145@@ -54,7 +54,7 @@ gst_rtsp = library('gstrtsp-@0@'.format(api_version),
146 rtsp_gen_sources = [gstrtsp_h]
147 if build_gir
148 gst_gir_extra_args = gir_init_section + [ '--c-include=gst/rtsp/rtsp.h' ]
149- rtsp_gen_sources += [gnome.generate_gir(gst_rtsp,
150+ rtsp_gir = gnome.generate_gir(gst_rtsp,
151 sources : rtsp_sources + rtsp_headers + [gstrtsp_c] + [gstrtsp_h],
152 namespace : 'GstRtsp',
153 nsversion : api_version,
154@@ -65,7 +65,8 @@ if build_gir
155 install : true,
156 extra_args : gst_gir_extra_args,
157 dependencies : gstrtsp_deps + [sdp_dep]
158- )]
159+ )
160+ rtsp_gen_sources += [rtsp_gir]
161 endif
162
163 rtsp_dep = declare_dependency(link_with : gst_rtsp,
164diff --git a/gst-libs/gst/sdp/meson.build b/gst-libs/gst/sdp/meson.build
165index 62c18b732..24cdb5293 100644
166--- a/gst-libs/gst/sdp/meson.build
167+++ b/gst-libs/gst/sdp/meson.build
168@@ -23,7 +23,7 @@ gstsdp = library('gstsdp-@0@'.format(api_version),
169 sdp_gen_sources = []
170 if build_gir
171 gst_gir_extra_args = gir_init_section + [ '--c-include=gst/sdp/sdp.h' ]
172- sdp_gen_sources += [gnome.generate_gir(gstsdp,
173+ sdp_gir = gnome.generate_gir(gstsdp,
174 sources : gst_sdp_sources + gst_sdp_headers,
175 namespace : 'GstSdp',
176 nsversion : api_version,
177@@ -34,7 +34,9 @@ if build_gir
178 install : true,
179 extra_args : gst_gir_extra_args,
180 dependencies : rtsp_deps
181- )]
182+ )
183+
184+ sdp_gen_sources += [sdp_gir]
185 endif
186
187 sdp_dep = declare_dependency(link_with: gstsdp,
188diff --git a/gst-libs/gst/tag/meson.build b/gst-libs/gst/tag/meson.build
189index 27e66fd63..5ec37392a 100644
190--- a/gst-libs/gst/tag/meson.build
191+++ b/gst-libs/gst/tag/meson.build
192@@ -93,7 +93,7 @@ gsttag = library('gsttag-@0@'.format(api_version),
193
194 if build_gir
195 gst_gir_extra_args = gir_init_section + [ '--c-include=gst/tag/tag.h' ]
196- tag_gen_sources += [gnome.generate_gir(gsttag,
197+ tag_gir = gnome.generate_gir(gsttag,
198 sources : tag_sources + tag_headers + [gsttag_h] + [gsttag_c],
199 namespace : 'GstTag',
200 nsversion : api_version,
201@@ -104,7 +104,8 @@ if build_gir
202 install : true,
203 extra_args : gst_gir_extra_args,
204 dependencies : tag_deps
205- )]
206+ )
207+ tag_gen_sources += [tag_gir]
208 endif
209
210 tag_dep = declare_dependency(link_with: gsttag,
211diff --git a/gst-libs/gst/video/meson.build b/gst-libs/gst/video/meson.build
212index b4dfcdf65..036c3a6a7 100644
213--- a/gst-libs/gst/video/meson.build
214+++ b/gst-libs/gst/video/meson.build
215@@ -135,7 +135,7 @@ gstvideo = library('gstvideo-@0@'.format(api_version),
216
217 if build_gir
218 gst_gir_extra_args = gir_init_section + [ '--c-include=gst/video/video.h' ]
219- video_gen_sources += [gnome.generate_gir(gstvideo,
220+ video_gir = gnome.generate_gir(gstvideo,
221 sources : video_sources + video_headers + [gstvideo_c] + [gstvideo_h],
222 namespace : 'GstVideo',
223 nsversion : api_version,
224@@ -146,7 +146,8 @@ if build_gir
225 install : true,
226 extra_args : gst_gir_extra_args,
227 dependencies : gstvideo_deps
228- )]
229+ )
230+ video_gen_sources += [video_gir]
231 endif
232
233 video_dep = declare_dependency(link_with : gstvideo,
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-viv-fb-Make-sure-config.h-is-included.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-viv-fb-Make-sure-config.h-is-included.patch
index 731ba873..b8fc8827 100644
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-viv-fb-Make-sure-config.h-is-included.patch
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-viv-fb-Make-sure-config.h-is-included.patch
@@ -1,4 +1,4 @@
1From 616cf194dfd26818ed7b776321582b8e0ff9b3f1 Mon Sep 17 00:00:00 2001 1From 70a702af3a3a4afcadbc53d61c4c45f31f96b2cc Mon Sep 17 00:00:00 2001
2From: Carlos Rafael Giani <crg7475@mailbox.org> 2From: Carlos Rafael Giani <crg7475@mailbox.org>
3Date: Tue, 21 May 2019 14:01:11 +0200 3Date: Tue, 21 May 2019 14:01:11 +0200
4Subject: [PATCH] viv-fb: Make sure config.h is included 4Subject: [PATCH] viv-fb: Make sure config.h is included
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0009-glimagesink-Downrank-to-marginal.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-glimagesink-Downrank-to-marginal.patch
index fc67a486..94a61465 100644
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0009-glimagesink-Downrank-to-marginal.patch
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-glimagesink-Downrank-to-marginal.patch
@@ -1,4 +1,4 @@
1From f18f1206ec44f4154e60546ecb82823f7a6569d7 Mon Sep 17 00:00:00 2001 1From b975be9c4630536ec1315773be29900371d21930 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com> 2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Thu, 24 Sep 2015 19:47:32 +0300 3Date: Thu, 24 Sep 2015 19:47:32 +0300
4Subject: [PATCH] glimagesink: Downrank to marginal 4Subject: [PATCH] glimagesink: Downrank to marginal
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/4ef5c91697a141fea7317aff7f0f28e5a861db99.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/4ef5c91697a141fea7317aff7f0f28e5a861db99.patch
new file mode 100644
index 00000000..0fa3dd30
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/4ef5c91697a141fea7317aff7f0f28e5a861db99.patch
@@ -0,0 +1,48 @@
1From 1718197bf6ebf3d8784a55126609aa8770fff682 Mon Sep 17 00:00:00 2001
2From: Xavier Claessens <xavier.claessens@collabora.com>
3Date: Mon, 26 Apr 2021 14:25:03 -0400
4Subject: [PATCH] gstgl: Fix build when Meson >= 0.58.0rc1
5
6"implicit_include_directories: false" now also means that current build
7directory is not added to include paths by default any more. We have to
8add it manually because we have some custom_target() that generate
9headers in current build directory.
10
11See https://github.com/mesonbuild/meson/issues/8700.
12
13Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1125>
14Upstream-Status: Backport
15Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
16
17---
18 gst-libs/gst/gl/meson.build | 15 ++++++++++++---
19 1 file changed, 12 insertions(+), 3 deletions(-)
20
21diff --git a/gst-libs/gst/gl/meson.build b/gst-libs/gst/gl/meson.build
22index ae19d7aca..3ad7ddcf6 100644
23--- a/gst-libs/gst/gl/meson.build
24+++ b/gst-libs/gst/gl/meson.build
25@@ -1023,11 +1023,20 @@ if build_gstgl
26 command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@'])
27 gen_sources = [gl_enumtypes_h]
28
29+ common_args = gst_plugins_base_args + gl_cpp_args + ['-DBUILDING_GST_GL']
30+
31+ # We have custom_target() that generate headers in the current build dir,
32+ # but with implicit_include_directories: false, meson >= 0.58.0 won't include
33+ # it by default. We cannot use include_directories('.') here because it would
34+ # also include current source dir which is what we want to avoid because
35+ # case-insensitive FS would include gst-libs/gl/egl/egl.h as EGL/egl.h.
36+ common_args += '-I@0@'.format(meson.current_build_dir())
37+
38 gstgl = library('gstgl-' + api_version,
39 gl_sources, gl_egl_sources, gl_x11_sources, gl_wayland_sources, gl_priv_sources, gl_enumtypes_c, gl_enumtypes_h,
40- c_args : gst_plugins_base_args + gl_cpp_args + ['-DBUILDING_GST_GL'],
41- cpp_args : gst_plugins_base_args + gl_cpp_args + ['-DBUILDING_GST_GL'],
42- objc_args : gst_plugins_base_args + gl_cpp_args + gl_objc_args + ['-DBUILDING_GST_GL'],
43+ c_args : common_args,
44+ cpp_args : common_args,
45+ objc_args : common_args + gl_objc_args,
46 include_directories : [configinc, libsinc, gl_includes],
47 version : libversion,
48 soversion : soversion,
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.%.bbappend b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.18.%.bbappend
index d92bdf3c..d92bdf3c 100644
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.%.bbappend
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.18.%.bbappend
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.2.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.18.0.imx.bb
index db0b740f..5e69e42b 100644
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.2.imx.bb
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.18.0.imx.bb
@@ -1,28 +1,26 @@
1require recipes-multimedia/gstreamer/gstreamer1.0-plugins-common.inc 1require recipes-multimedia/gstreamer/gstreamer1.0-plugins-common.inc
2 2
3DESCRIPTION = "'Base' GStreamer plugins and helper libraries"
4HOMEPAGE = "https://gstreamer.freedesktop.org/"
5BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues"
3LICENSE = "GPLv2+ & LGPLv2+" 6LICENSE = "GPLv2+ & LGPLv2+"
4LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \ 7LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d"
5 file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607"
6 8
7GST1.0-PLUGINS-BASE_SRC ?= "gitsm://source.codeaurora.org/external/imx/gst-plugins-base.git;protocol=https" 9GST1.0-PLUGINS-BASE_SRC ?= "gitsm://source.codeaurora.org/external/imx/gst-plugins-base.git;protocol=https"
8SRCBRANCH = "MM_04.05.06_2008_L5.4.47" 10SRCBRANCH = "MM_04.06.01_2105_L5.10.y"
9SRCREV = "3c4aa2a58576d68f6e684efa58609665679c9969"
10SRC_URI = "${GST1.0-PLUGINS-BASE_SRC};branch=${SRCBRANCH} \ 11SRC_URI = "${GST1.0-PLUGINS-BASE_SRC};branch=${SRCBRANCH} \
11 file://0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch \ 12 file://0003-viv-fb-Make-sure-config.h-is-included.patch \
12 file://0001-gstreamer-plugins-base-fix-meson-build-in-nxp-fork.patch \ 13 file://0004-glimagesink-Downrank-to-marginal.patch \
13 file://0002-meson-Add-variables-for-gir-files.patch \ 14 file://4ef5c91697a141fea7317aff7f0f28e5a861db99.patch \
14 file://0005-viv-fb-Make-sure-config.h-is-included.patch \
15 file://0009-glimagesink-Downrank-to-marginal.patch \
16 file://0001-gst-libs-gst-gl-wayland-fix-meson-build.patch \
17 file://0001-meson-viv-fb-code-must-link-against-libg2d.patch \
18 " 15 "
16SRCREV = "69554a26c932481acb7c5691038c367eca60e5bc"
19 17
20S = "${WORKDIR}/git" 18S = "${WORKDIR}/git"
21 19
22DEPENDS += "iso-codes util-linux zlib" 20DEPENDS += "iso-codes util-linux zlib"
23DEPENDS_append_imxgpu2d = " virtual/libg2d" 21DEPENDS_append_imxgpu2d = " virtual/libg2d"
24 22
25inherit use-imx-headers gobject-introspection gtk-doc 23inherit gobject-introspection use-imx-headers
26 24
27DEFAULT_PREFERENCE = "-1" 25DEFAULT_PREFERENCE = "-1"
28 26
@@ -36,7 +34,7 @@ PACKAGECONFIG ??= " \
36 ${GSTREAMER_ORC} \ 34 ${GSTREAMER_ORC} \
37 ${PACKAGECONFIG_GL} \ 35 ${PACKAGECONFIG_GL} \
38 ${@bb.utils.filter('DISTRO_FEATURES', 'alsa x11', d)} \ 36 ${@bb.utils.filter('DISTRO_FEATURES', 'alsa x11', d)} \
39 ogg pango png theora vorbis \ 37 jpeg ogg pango png theora vorbis \
40 ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland egl', '', d)} \ 38 ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland egl', '', d)} \
41" 39"
42 40
@@ -71,25 +69,24 @@ PACKAGECONFIG[egl] = ",,virtual/egl"
71# OpenGL window systems (except for X11) 69# OpenGL window systems (except for X11)
72PACKAGECONFIG[gbm] = ",,virtual/libgbm libgudev libdrm" 70PACKAGECONFIG[gbm] = ",,virtual/libgbm libgudev libdrm"
73PACKAGECONFIG[wayland] = ",,wayland-native wayland wayland-protocols libdrm" 71PACKAGECONFIG[wayland] = ",,wayland-native wayland wayland-protocols libdrm"
72PACKAGECONFIG[dispmanx] = ",,virtual/libomxil"
74PACKAGECONFIG[viv-fb] = ",,virtual/libgles2 virtual/libg2d" 73PACKAGECONFIG[viv-fb] = ",,virtual/libgles2 virtual/libg2d"
75 74
75OPENGL_WINSYS = "${@bb.utils.filter('PACKAGECONFIG', 'x11 gbm wayland dispmanx egl viv-fb', d)}"
76
76EXTRA_OEMESON += " \ 77EXTRA_OEMESON += " \
78 -Ddoc=disabled \
77 -Dgl-graphene=disabled \ 79 -Dgl-graphene=disabled \
78 ${@get_opengl_cmdline_list('gl_api', d.getVar('OPENGL_APIS'), d)} \ 80 ${@get_opengl_cmdline_list('gl_api', d.getVar('OPENGL_APIS'), d)} \
79 ${@get_opengl_cmdline_list('gl_platform', d.getVar('OPENGL_PLATFORMS'), d)} \ 81 ${@get_opengl_cmdline_list('gl_platform', d.getVar('OPENGL_PLATFORMS'), d)} \
80 ${@get_opengl_cmdline_list('gl_winsys', d.getVar('OPENGL_WINSYS'), d)} \ 82 ${@get_opengl_cmdline_list('gl_winsys', d.getVar('OPENGL_WINSYS'), d)} \
81 -Dextra_imx_incdir=${STAGING_INCDIR_IMX} \ 83 -Dc_args="${CFLAGS} -I${STAGING_INCDIR_IMX}" \
82" 84"
83 85
84GTKDOC_MESON_OPTION = "gtk_doc"
85GTKDOC_MESON_ENABLE_FLAG = "enabled"
86GTKDOC_MESON_DISABLE_FLAG = "disabled"
87
88FILES_${PN} += "${libdir}/gstreamer-1.0/include" 86FILES_${PN} += "${libdir}/gstreamer-1.0/include"
87FILES_${PN}-dev += "${libdir}/gstreamer-1.0/include/gst/gl/gstglconfig.h"
89FILES_${MLPREFIX}libgsttag-1.0 += "${datadir}/gst-plugins-base/1.0/license-translations.dict" 88FILES_${MLPREFIX}libgsttag-1.0 += "${datadir}/gst-plugins-base/1.0/license-translations.dict"
90 89
91COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"
92
93def get_opengl_cmdline_list(switch_name, options, d): 90def get_opengl_cmdline_list(switch_name, options, d):
94 selected_options = [] 91 selected_options = []
95 if bb.utils.contains('DISTRO_FEATURES', 'opengl', True, False, d): 92 if bb.utils.contains('DISTRO_FEATURES', 'opengl', True, False, d):
@@ -100,3 +97,7 @@ def get_opengl_cmdline_list(switch_name, options, d):
100 return '-D' + switch_name + '=' + ','.join(selected_options) 97 return '-D' + switch_name + '=' + ','.join(selected_options)
101 else: 98 else:
102 return '' 99 return ''
100
101CVE_PRODUCT += "gst-plugins-base"
102
103COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.%.bbappend b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.%.bbappend
deleted file mode 100644
index 8565c6a5..00000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.%.bbappend
+++ /dev/null
@@ -1,3 +0,0 @@
1PACKAGECONFIG_GL_imxgpu2d = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl x11', 'opengl', '', d)}"
2PACKAGECONFIG_GL_imxgpu3d = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}"
3PACKAGECONFIG_GL_use-mainline-bsp = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}"
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.3.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.18.0.imx.bb
index 8413bf10..29e25f7d 100644
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.3.imx.bb
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.18.0.imx.bb
@@ -1,13 +1,12 @@
1require recipes-multimedia/gstreamer/gstreamer1.0-plugins-common.inc 1require recipes-multimedia/gstreamer/gstreamer1.0-plugins-common.inc
2 2
3
4GST1.0-PLUGINS-GOOD_SRC ?= "gitsm://source.codeaurora.org/external/imx/gst-plugins-good.git;protocol=https" 3GST1.0-PLUGINS-GOOD_SRC ?= "gitsm://source.codeaurora.org/external/imx/gst-plugins-good.git;protocol=https"
5SRCBRANCH = "MM_04.05.07_2011_L5.4.70" 4SRCBRANCH = "MM_04.06.01_2105_L5.10.y"
6 5
7SRC_URI = " \ 6SRC_URI = " \
8 ${GST1.0-PLUGINS-GOOD_SRC};branch=${SRCBRANCH} \ 7 ${GST1.0-PLUGINS-GOOD_SRC};branch=${SRCBRANCH} \
9" 8"
10SRCREV = "6005e8199ea19878f269b058ffbbbcaa314472d8" 9SRCREV = "3160acd37304f67238b8ceae2a95ee4951f9c718"
11 10
12DEFAULT_PREFERENCE = "-1" 11DEFAULT_PREFERENCE = "-1"
13 12
@@ -15,7 +14,6 @@ S = "${WORKDIR}/git"
15 14
16LICENSE = "GPLv2+ & LGPLv2.1+" 15LICENSE = "GPLv2+ & LGPLv2.1+"
17LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ 16LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
18 file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607 \
19 file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe" 17 file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe"
20 18
21DEPENDS += "gstreamer1.0-plugins-base libcap zlib" 19DEPENDS += "gstreamer1.0-plugins-base libcap zlib"
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.16.0.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.18.0.bb
index 2a1cc3fd..8668ccfd 100644
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.16.0.bb
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.18.0.bb
@@ -1,5 +1,9 @@
1require recipes-multimedia/gstreamer/gstreamer1.0-plugins-common.inc 1require recipes-multimedia/gstreamer/gstreamer1.0-plugins-common.inc
2 2
3DESCRIPTION = "'Ugly GStreamer plugins"
4HOMEPAGE = "https://gstreamer.freedesktop.org/"
5BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly/-/issues"
6
3LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ 7LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
4 file://tests/check/elements/xingmux.c;beginline=1;endline=21;md5=4c771b8af188724855cb99cadd390068" 8 file://tests/check/elements/xingmux.c;beginline=1;endline=21;md5=4c771b8af188724855cb99cadd390068"
5 9
@@ -7,10 +11,9 @@ LICENSE = "GPLv2+ & LGPLv2.1+ & LGPLv2+"
7LICENSE_FLAGS = "commercial" 11LICENSE_FLAGS = "commercial"
8 12
9SRC_URI = " \ 13SRC_URI = " \
10 http://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-${PV}.tar.xz \ 14 https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-${PV}.tar.xz \
11 " 15 "
12SRC_URI[md5sum] = "1ec343c58d4b17d682f7befa8453c11c" 16SRC_URI[sha256sum] = "686644e45e08258ae240c4519376668ad8d34ea6d0f6ab556473c317bfb7e082"
13SRC_URI[sha256sum] = "e30964c5f031c32289e0b25e176c3c95a5737f2052dfc81d0f7427ef0233a4c2"
14 17
15S = "${WORKDIR}/gst-plugins-ugly-${PV}" 18S = "${WORKDIR}/gst-plugins-ugly-${PV}"
16 19
@@ -32,6 +35,7 @@ PACKAGECONFIG[mpeg2dec] = "-Dmpeg2dec=enabled,-Dmpeg2dec=disabled,mpeg2dec"
32PACKAGECONFIG[x264] = "-Dx264=enabled,-Dx264=disabled,x264" 35PACKAGECONFIG[x264] = "-Dx264=enabled,-Dx264=disabled,x264"
33 36
34EXTRA_OEMESON += " \ 37EXTRA_OEMESON += " \
38 -Ddoc=disabled \
35 -Dsidplay=disabled \ 39 -Dsidplay=disabled \
36" 40"
37 41
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.16.0.bb b/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.18.0.bb
index 0a3c35ff..4ac30c28 100644
--- a/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.16.0.bb
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.18.0.bb
@@ -8,12 +8,11 @@ DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base"
8 8
9PNREAL = "gst-rtsp-server" 9PNREAL = "gst-rtsp-server"
10 10
11SRC_URI = "http://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz \ 11SRC_URI = "https://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz \
12 file://0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch \
13 " 12 "
14 13
15SRC_URI[md5sum] = "adc4460239ec2eccf58ad9752ce53bfd" 14SRC_URI[md5sum] = "77fe28c702a83566811ab5c7bbe99ab2"
16SRC_URI[sha256sum] = "198e9eec1a3e32dc810d3fbf3a714850a22c6288d4a5c8e802c5ff984af03f19" 15SRC_URI[sha256sum] = "2ad19311054cbf2df0d0622936bc703dedc06ced706df46a3d3a3ea5a4b7c70f"
17 16
18S = "${WORKDIR}/${PNREAL}-${PV}" 17S = "${WORKDIR}/${PNREAL}-${PV}"
19 18
@@ -28,5 +27,4 @@ GIR_MESON_ENABLE_FLAG = "enabled"
28GIR_MESON_DISABLE_FLAG = "disabled" 27GIR_MESON_DISABLE_FLAG = "disabled"
29 28
30# Starting with 1.8.0 gst-rtsp-server includes dependency-less plugins as well 29# Starting with 1.8.0 gst-rtsp-server includes dependency-less plugins as well
31LIBV = "1.0"
32require recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc 30require recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch
index 67a872cd..23ebd5c6 100644
--- a/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch
+++ b/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch
@@ -1,25 +1,44 @@
1From a1d7c582392c8bc87fa9411af77b20e011944357 Mon Sep 17 00:00:00 2001 1From fd8f49dba8c09d47425da80f5faab3bfa4a7c962 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com> 2From: Jose Quaresma <quaresma.jose@gmail.com>
3Date: Thu, 25 Jan 2018 17:55:02 +0200 3Date: Sat, 10 Oct 2020 19:09:03 +0000
4Subject: [PATCH] gst/gstpluginloader.c: when env var is set do not fall 4Subject: [PATCH 1/3] gstpluginloader: when env var is set do not fall through
5 through to system plugin scanner 5 to system plugin scanner
6 6
7If we set a custom GST_PLUGIN_SCANNER env var, then we probably want to use that and only that. 7If we set a custom GST_PLUGIN_SCANNER env var, then we probably want to use that and only that.
8 8
9Falling through to the one installed on the system is problamatic in cross-compilation 9Falling through to the one installed on the system is problamatic in cross-compilation
10environemnts, regardless of whether one pointed to by the env var succeeded or failed. 10environemnts, regardless of whether one pointed to by the env var succeeded or failed.
11 11
12Upstream-Status: Pending 12taken from:
13Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 13http://cgit.openembedded.org/openembedded-core/commit/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch?id=0db7ba34ca41b107042306d13a6f0162885c123b
14
15Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/669>
16
17Upstream-Status: Backport [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/commit/9f958058697e6fbf5bde325228034572331d1a3a]
18
19Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
14--- 20---
15 gst/gstpluginloader.c | 4 +--- 21 gst/gstpluginloader.c | 15 +++++++--------
16 1 file changed, 1 insertion(+), 3 deletions(-) 22 1 file changed, 7 insertions(+), 8 deletions(-)
17 23
18diff --git a/gst/gstpluginloader.c b/gst/gstpluginloader.c 24diff --git a/gst/gstpluginloader.c b/gst/gstpluginloader.c
19index 430829d..3a75731 100644 25index d1e404d98..c626bf263 100644
20--- a/gst/gstpluginloader.c 26--- a/gst/gstpluginloader.c
21+++ b/gst/gstpluginloader.c 27+++ b/gst/gstpluginloader.c
22@@ -471,9 +471,7 @@ gst_plugin_loader_spawn (GstPluginLoader * loader) 28@@ -464,20 +464,19 @@ gst_plugin_loader_spawn (GstPluginLoader * loader)
29 if (loader->child_running)
30 return TRUE;
31
32- /* Find the gst-plugin-scanner: first try the env-var if it is set,
33- * otherwise use the installed version */
34+ /* Find the gst-plugin-scanner */
35 env = g_getenv ("GST_PLUGIN_SCANNER_1_0");
36 if (env == NULL)
37 env = g_getenv ("GST_PLUGIN_SCANNER");
38
39 if (env != NULL && *env != '\0') {
40+ /* use the env-var if it is set */
41 GST_LOG ("Trying GST_PLUGIN_SCANNER env var: %s", env);
23 helper_bin = g_strdup (env); 42 helper_bin = g_strdup (env);
24 res = gst_plugin_loader_try_helper (loader, helper_bin); 43 res = gst_plugin_loader_try_helper (loader, helper_bin);
25 g_free (helper_bin); 44 g_free (helper_bin);
@@ -27,9 +46,24 @@ index 430829d..3a75731 100644
27- 46-
28- if (!res) { 47- if (!res) {
29+ } else { 48+ } else {
49+ /* use the installed version */
30 GST_LOG ("Trying installed plugin scanner"); 50 GST_LOG ("Trying installed plugin scanner");
31 51
32 #ifdef G_OS_WIN32 52 #ifdef G_OS_WIN32
53@@ -497,10 +496,10 @@ gst_plugin_loader_spawn (GstPluginLoader * loader)
54 #endif
55 res = gst_plugin_loader_try_helper (loader, helper_bin);
56 g_free (helper_bin);
57+ }
58
59- if (!res) {
60- GST_INFO ("No gst-plugin-scanner available, or not working");
61- }
62+ if (!res) {
63+ GST_INFO ("No gst-plugin-scanner available, or not working");
64 }
65
66 return loader->child_running;
33-- 67--
342.15.1 682.29.2
35 69
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0002-Remove-unused-valgrind-detection.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0002-Remove-unused-valgrind-detection.patch
new file mode 100644
index 00000000..96abef17
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0/0002-Remove-unused-valgrind-detection.patch
@@ -0,0 +1,112 @@
1From 598d108e2c438d8f2ecd3bf948fa3ebbd3681490 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim@centricular.com>
3Date: Fri, 14 Aug 2020 16:38:26 +0100
4Subject: [PATCH 2/3] Remove unused valgrind detection
5
6Having this just to log a debug message in case we're
7running inside valgrind doesn't seem very useful, and
8the code that used to use this no longer exists it seems.
9
10Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/595>
11
12Upstream-Status: Backport [a2cbf75523cdf8a4df1baa7007d86ef455972245]
13
14Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
15---
16 gst/gst_private.h | 2 --
17 gst/gstinfo.c | 39 ---------------------------------------
18 meson.build | 1 -
19 3 files changed, 42 deletions(-)
20
21diff --git a/gst/gst_private.h b/gst/gst_private.h
22index eefd044d9..8252ede51 100644
23--- a/gst/gst_private.h
24+++ b/gst/gst_private.h
25@@ -116,8 +116,6 @@ G_GNUC_INTERNAL gboolean _priv_plugin_deps_env_vars_changed (GstPlugin * plugin
26
27 G_GNUC_INTERNAL gboolean _priv_plugin_deps_files_changed (GstPlugin * plugin);
28
29-G_GNUC_INTERNAL gboolean _priv_gst_in_valgrind (void);
30-
31 /* init functions called from gst_init(). */
32 G_GNUC_INTERNAL void _priv_gst_quarks_initialize (void);
33 G_GNUC_INTERNAL void _priv_gst_mini_object_initialize (void);
34diff --git a/gst/gstinfo.c b/gst/gstinfo.c
35index 5d317877b..097f8b20d 100644
36--- a/gst/gstinfo.c
37+++ b/gst/gstinfo.c
38@@ -305,36 +305,6 @@ static gboolean pretty_tags = PRETTY_TAGS_DEFAULT;
39 static volatile gint G_GNUC_MAY_ALIAS __default_level = GST_LEVEL_DEFAULT;
40 static volatile gint G_GNUC_MAY_ALIAS __use_color = GST_DEBUG_COLOR_MODE_ON;
41
42-/* FIXME: export this? */
43-gboolean
44-_priv_gst_in_valgrind (void)
45-{
46- static enum
47- {
48- GST_VG_UNCHECKED,
49- GST_VG_NO_VALGRIND,
50- GST_VG_INSIDE
51- }
52- in_valgrind = GST_VG_UNCHECKED;
53-
54- if (in_valgrind == GST_VG_UNCHECKED) {
55-#ifdef HAVE_VALGRIND_VALGRIND_H
56- if (RUNNING_ON_VALGRIND) {
57- GST_CAT_INFO (GST_CAT_GST_INIT, "we're running inside valgrind");
58- in_valgrind = GST_VG_INSIDE;
59- } else {
60- GST_CAT_LOG (GST_CAT_GST_INIT, "not doing extra valgrind stuff");
61- in_valgrind = GST_VG_NO_VALGRIND;
62- }
63-#else
64- in_valgrind = GST_VG_NO_VALGRIND;
65-#endif
66- g_assert (in_valgrind == GST_VG_NO_VALGRIND ||
67- in_valgrind == GST_VG_INSIDE);
68- }
69- return (in_valgrind == GST_VG_INSIDE);
70-}
71-
72 static gchar *
73 _replace_pattern_in_gst_debug_file_name (gchar * name, const char *token,
74 guint val)
75@@ -463,9 +433,6 @@ _priv_gst_debug_init (void)
76 _priv_GST_CAT_PROTECTION =
77 _gst_debug_category_new ("GST_PROTECTION", 0, "protection");
78
79- /* print out the valgrind message if we're in valgrind */
80- _priv_gst_in_valgrind ();
81-
82 env = g_getenv ("GST_DEBUG_OPTIONS");
83 if (env != NULL) {
84 if (strstr (env, "full_tags") || strstr (env, "full-tags"))
85@@ -2503,12 +2470,6 @@ gst_debug_construct_win_color (guint colorinfo)
86 return 0;
87 }
88
89-gboolean
90-_priv_gst_in_valgrind (void)
91-{
92- return FALSE;
93-}
94-
95 void
96 _gst_debug_dump_mem (GstDebugCategory * cat, const gchar * file,
97 const gchar * func, gint line, GObject * obj, const gchar * msg,
98diff --git a/meson.build b/meson.build
99index ce1921aa4..7a84d0981 100644
100--- a/meson.build
101+++ b/meson.build
102@@ -200,7 +200,6 @@ check_headers = [
103 'sys/wait.h',
104 'ucontext.h',
105 'unistd.h',
106- 'valgrind/valgrind.h',
107 'sys/resource.h',
108 'sys/uio.h',
109 ]
110--
1112.29.2
112
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0002-meson-build-gir-even-when-cross-compiling-if-introsp.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0002-meson-build-gir-even-when-cross-compiling-if-introsp.patch
deleted file mode 100644
index 1ed7198a..00000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0/0002-meson-build-gir-even-when-cross-compiling-if-introsp.patch
+++ /dev/null
@@ -1,36 +0,0 @@
1From 35db4a2433fbdf8612cf98b5aab5b14aeb5372f8 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim@centricular.com>
3Date: Thu, 17 Oct 2019 12:13:35 +0100
4Subject: [PATCH] meson: build gir even when cross-compiling if introspection
5 was enabled explicitly
6
7This can be made to work in certain circumstances when
8cross-compiling, so default to not building g-i stuff
9when cross-compiling, but allow it if introspection was
10enabled explicitly via -Dintrospection=enabled.
11
12Fixes #454 and #381.
13
14Upstream-Status: Backport [35db4a2433fbdf8612cf98b5aab5b14aeb5372f8]
15
16Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
17---
18 meson.build | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-)
20
21diff --git a/meson.build b/meson.build
22index 90d98d8eb..a47e7f34e 100644
23--- a/meson.build
24+++ b/meson.build
25@@ -466,7 +466,7 @@ rt_lib = cc.find_library('rt', required : false)
26 gir = find_program('g-ir-scanner', required : get_option('introspection'))
27 gnome = import('gnome')
28
29-build_gir = gir.found() and not meson.is_cross_build()
30+build_gir = gir.found() and (not meson.is_cross_build() or get_option('introspection').enabled())
31
32 gir_init_section = [ '--add-init-section=extern void gst_init(gint*,gchar**);' + \
33 'g_setenv("GST_REGISTRY_DISABLE", "yes", TRUE);' + \
34--
352.17.1
36
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0003-meson-Add-valgrind-feature.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0003-meson-Add-valgrind-feature.patch
deleted file mode 100644
index f553340f..00000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0/0003-meson-Add-valgrind-feature.patch
+++ /dev/null
@@ -1,74 +0,0 @@
1From f6c7973c03d9ba7dab60c496e768c5e6c4ee824c Mon Sep 17 00:00:00 2001
2From: Carlos Rafael Giani <crg7475@mailbox.org>
3Date: Sun, 20 Oct 2019 10:36:44 +0200
4Subject: [PATCH] meson: Add valgrind feature
5
6This allows for enabling/disabling Valgrind support. Since Valgrind is
7an external dependency, such a feature is needed by build environemnts
8such as Yocto to make sure builds are deterministic. These changes also
9add more Valgrind specific configure log output.
10
11Upstream-Status: Pending
12
13Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
14---
15 meson.build | 23 ++++++++++++++++++++++-
16 meson_options.txt | 1 +
17 2 files changed, 23 insertions(+), 1 deletion(-)
18
19diff --git a/meson.build b/meson.build
20index b55ecc5..4751761 100644
21--- a/meson.build
22+++ b/meson.build
23@@ -199,7 +199,6 @@ check_headers = [
24 'sys/wait.h',
25 'ucontext.h',
26 'unistd.h',
27- 'valgrind/valgrind.h',
28 'sys/resource.h',
29 ]
30
31@@ -214,6 +213,28 @@ foreach h : check_headers
32 endif
33 endforeach
34
35+valgrind_option = get_option('valgrind')
36+if valgrind_option.disabled()
37+ message('Valgrind support not requested; disabled.')
38+else
39+ valgrind_header = 'valgrind/valgrind.h'
40+ has_valgrind_header = cc.has_header(valgrind_header)
41+ if has_valgrind_header
42+ message('Valgrind support requested, and header ' + valgrind_header + \
43+ ' found. Enabled Valgrind support.')
44+ define = 'HAVE_' + valgrind_header.underscorify().to_upper()
45+ cdata.set(define, 1)
46+ else
47+ if valgrind_option.enabled()
48+ error('Valgrind support requested and set as required, but header ' + \
49+ valgrind_header + ' not found.')
50+ else
51+ message('Valgrind support requested, but header ' + valgrind_header + \
52+ ' not found. Disabling Valgrind support.')
53+ endif
54+ endif
55+endif
56+
57 if cc.has_member('struct tm', 'tm_gmtoff', prefix : '#include <time.h>')
58 cdata.set('HAVE_TM_GMTOFF', 1)
59 endif
60diff --git a/meson_options.txt b/meson_options.txt
61index e7ff7ba..8afde39 100644
62--- a/meson_options.txt
63+++ b/meson_options.txt
64@@ -19,6 +19,7 @@ option('memory-alignment', type: 'combo',
65
66 # Feature options
67 option('check', type : 'feature', value : 'auto', description : 'Build unit test libraries')
68+option('valgrind', type : 'feature', value : 'auto', description : 'Enable Valgrind support')
69 option('libunwind', type : 'feature', value : 'auto', description : 'Use libunwind to generate backtraces')
70 option('libdw', type : 'feature', value : 'auto', description : 'Use libdw to generate better backtraces from libunwind')
71 option('dbghelp', type : 'feature', value : 'auto', description : 'Use dbghelp to generate backtraces')
72--
732.17.1
74
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-seek-Don-t-use-too-strict-timeout-for-validati.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-seek-Don-t-use-too-strict-timeout-for-validati.patch
new file mode 100644
index 00000000..e0e64e2c
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-seek-Don-t-use-too-strict-timeout-for-validati.patch
@@ -0,0 +1,32 @@
1From 1db36347d05d88835519368442e9aa89c64091ad Mon Sep 17 00:00:00 2001
2From: Seungha Yang <seungha@centricular.com>
3Date: Tue, 15 Sep 2020 00:54:58 +0900
4Subject: [PATCH] tests: seek: Don't use too strict timeout for validation
5
6Expected segment-done message might not be seen within expected
7time if system is not powerful enough.
8
9Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/625>
10
11Upstream-Status: Backport [https://cgit.freedesktop.org/gstreamer/gstreamer/commit?id=f44312ae5d831438fcf8041162079c65321c588c]
12Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
13---
14 tests/check/pipelines/seek.c | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/tests/check/pipelines/seek.c b/tests/check/pipelines/seek.c
18index 28bb8846d..5f7447bc5 100644
19--- a/tests/check/pipelines/seek.c
20+++ b/tests/check/pipelines/seek.c
21@@ -521,7 +521,7 @@ GST_START_TEST (test_loopback_2)
22
23 GST_INFO ("wait for segment done message");
24
25- msg = gst_bus_timed_pop_filtered (bus, (GstClockTime) 2 * GST_SECOND,
26+ msg = gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE,
27 GST_MESSAGE_SEGMENT_DONE | GST_MESSAGE_ERROR);
28 fail_unless (msg, "no message within the timed window");
29 fail_unless_equals_string (GST_MESSAGE_TYPE_NAME (msg), "segment-done");
30--
312.29.2
32
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0004-meson-Add-option-for-installed-tests.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0004-meson-Add-option-for-installed-tests.patch
deleted file mode 100644
index 0e6c44ea..00000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0/0004-meson-Add-option-for-installed-tests.patch
+++ /dev/null
@@ -1,257 +0,0 @@
1From b843400284751968862751dfe93853f151551c64 Mon Sep 17 00:00:00 2001
2From: Carlos Rafael Giani <crg7475@mailbox.org>
3Date: Fri, 25 Oct 2019 00:06:26 +0200
4Subject: [PATCH] meson: Add option for installed tests
5
6This adds an option for producing installed versions of the unit tests.
7These versions don't need meson to run (only a small shell script). This
8makes it easier to run cross compiled tests on a target machine.
9
10Upstream-Status: Pending
11
12Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
13---
14 build-aux/gen-installed-test-desc.py | 18 ++++++
15 build-aux/gen-installed-test-shscript.py | 25 ++++++++
16 meson_options.txt | 2 +
17 tests/check/meson.build | 46 +++++++++++++-
18 tests/files/testfile | 80 ++++++++++++++++++++++++
19 5 files changed, 170 insertions(+), 1 deletion(-)
20 create mode 100644 build-aux/gen-installed-test-desc.py
21 create mode 100644 build-aux/gen-installed-test-shscript.py
22 create mode 100644 tests/files/testfile
23
24diff --git a/build-aux/gen-installed-test-desc.py b/build-aux/gen-installed-test-desc.py
25new file mode 100644
26index 0000000..69e8a0f
27--- /dev/null
28+++ b/build-aux/gen-installed-test-desc.py
29@@ -0,0 +1,18 @@
30+import sys
31+import os
32+import argparse
33+
34+def write_template(filename, data):
35+ with open(filename, 'w') as f:
36+ f.write(data)
37+
38+def build_template(testdir, testname):
39+ return "[Test]\nType=session\nExec={}\n".format(os.path.join(testdir, testname))
40+
41+argparser = argparse.ArgumentParser(description='Generate installed-test data.')
42+argparser.add_argument('--test-execdir', metavar='dir', required=True, help='Installed test directory')
43+argparser.add_argument('--testname', metavar='name', required=True, help='Installed test name')
44+argparser.add_argument('--output', metavar='file', required=True, help='Output file')
45+args = argparser.parse_args()
46+
47+write_template(args.output, build_template(args.test_execdir, args.testname))
48diff --git a/build-aux/gen-installed-test-shscript.py b/build-aux/gen-installed-test-shscript.py
49new file mode 100644
50index 0000000..5da86fb
51--- /dev/null
52+++ b/build-aux/gen-installed-test-shscript.py
53@@ -0,0 +1,25 @@
54+import sys
55+import os
56+import argparse
57+
58+def write_template(filename, data):
59+ with open(filename, 'w') as f:
60+ f.write(data)
61+
62+def build_template(testdir, testname):
63+ return ''.join([
64+ "#!/usr/bin/env sh\n",
65+ "export GST_STATE_IGNORE_ELEMENTS=''\n",
66+ "export CK_DEFAULT_TIMEOUT=20\n",
67+ "export GST_PLUGIN_LOADING_WHITELIST='gstreamer'\n",
68+ "{}\n".format(os.path.join(testdir, testname)),
69+ ])
70+
71+argparser = argparse.ArgumentParser(description='Generate installed-test data.')
72+argparser.add_argument('--test-execdir', metavar='dir', required=True, help='Installed test directory')
73+argparser.add_argument('--testname', metavar='name', required=True, help='Installed test name')
74+argparser.add_argument('--output', metavar='file', required=True, help='Output file')
75+args = argparser.parse_args()
76+
77+write_template(args.output, build_template(args.test_execdir, args.testname))
78+os.chmod(args.output, 0o755)
79diff --git a/meson_options.txt b/meson_options.txt
80index 8afde39..8884dcc 100644
81--- a/meson_options.txt
82+++ b/meson_options.txt
83@@ -16,6 +16,8 @@ option('poisoning', type : 'boolean', value : false, description : 'Enable poiso
84 option('memory-alignment', type: 'combo',
85 choices : ['1', '2', '4', '8', '16', '32', '64', '128', '256', '512', '1024', '2048', '4096', '8192', 'malloc', 'pagesize'],
86 value: 'malloc')
87+option('installed-tests', type : 'boolean', value : false, description : 'enable installed tests')
88+option('test-files-path', type : 'string', description : 'Path where to find test files')
89
90 # Feature options
91 option('check', type : 'feature', value : 'auto', description : 'Build unit test libraries')
92diff --git a/tests/check/meson.build b/tests/check/meson.build
93index 04da83f..2db7f76 100644
94--- a/tests/check/meson.build
95+++ b/tests/check/meson.build
96@@ -118,11 +118,17 @@ if add_languages('cpp', required : false)
97 ]
98 endif
99
100+test_files_path = get_option('test-files-path')
101+if test_files_path == ''
102+ test_files_path = meson.current_source_dir() + '/../files'
103+endif
104+message('Using path "@0@" as the path to read test files from'.format(test_files_path))
105+
106 test_defines = [
107 '-UG_DISABLE_ASSERT',
108 '-UG_DISABLE_CAST_CHECKS',
109 '-DGST_CHECK_TEST_ENVIRONMENT_BEACON="GST_STATE_IGNORE_ELEMENTS"',
110- '-DTESTFILE="' + meson.current_source_dir() + '/meson.build"',
111+ '-DTESTFILE="@0@"'.format(test_files_path + '/testfile'),
112 '-DGST_USE_UNSTABLE_API',
113 '-DGST_DISABLE_DEPRECATED',
114 ]
115@@ -137,6 +143,14 @@ endif
116 glib_deps = [gio_dep, gobject_dep, gmodule_dep, glib_dep]
117 gst_deps = [gst_dep, gst_base_dep, gst_check_dep, gst_net_dep, gst_controller_dep]
118
119+installed_tests_datadir = join_paths(prefix, get_option('datadir'), 'installed-tests', 'gstreamer-1.0')
120+installed_tests_execdir = join_paths(prefix, libexecdir, 'installed-tests', 'gstreamer-1.0')
121+installed_tests_enabled = get_option('installed-tests')
122+
123+python = import('python').find_installation()
124+gen_installed_test_desc = files('../../build-aux/gen-installed-test-desc.py')
125+gen_installed_test_shscript = files('../../build-aux/gen-installed-test-shscript.py')
126+
127 foreach t : core_tests
128 fname = t[0]
129 test_name = fname.split('.')[0].underscorify()
130@@ -150,8 +164,38 @@ foreach t : core_tests
131 include_directories : [configinc],
132 link_with : link_with_libs,
133 dependencies : test_deps + glib_deps + gst_deps,
134+ install_dir: installed_tests_execdir,
135+ install: installed_tests_enabled
136 )
137
138+ if installed_tests_enabled
139+ installed_test_shscript = test_name + '.sh'
140+ shscript = custom_target (test_name + '_shscript',
141+ output: installed_test_shscript,
142+ command: [
143+ python,
144+ gen_installed_test_shscript,
145+ '--test-execdir=@0@'.format(installed_tests_execdir),
146+ '--testname=@0@'.format(test_name),
147+ '--output=@0@'.format(join_paths('@OUTDIR@', installed_test_shscript)),
148+ ],
149+ install: true,
150+ install_dir: installed_tests_execdir)
151+
152+ installed_test_desc = test_name + '.test'
153+ data = custom_target(test_name + '_desc',
154+ output: installed_test_desc,
155+ command: [
156+ python,
157+ gen_installed_test_desc,
158+ '--test-execdir=@0@'.format(installed_tests_execdir),
159+ '--testname=@0@'.format(installed_test_shscript),
160+ '--output=@0@'.format(join_paths('@OUTDIR@', installed_test_desc)),
161+ ],
162+ install: true,
163+ install_dir: installed_tests_datadir)
164+ endif
165+
166 env = environment()
167 env.set('GST_PLUGIN_PATH_1_0', meson.build_root())
168 env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
169diff --git a/tests/files/testfile b/tests/files/testfile
170new file mode 100644
171index 0000000..89954e0
172--- /dev/null
173+++ b/tests/files/testfile
174@@ -0,0 +1,80 @@
175+................................................................................
176+................................................................................
177+................................................................................
178+................................................................................
179+................................................................................
180+................................................................................
181+................................................................................
182+................................................................................
183+................................................................................
184+................................................................................
185+................................................................................
186+................................................................................
187+................................................................................
188+................................................................................
189+................................................................................
190+................................................................................
191+................................................................................
192+................................................................................
193+................................................................................
194+................................................................................
195+................................................................................
196+................................................................................
197+................................................................................
198+................................................................................
199+................................................................................
200+................................................................................
201+................................................................................
202+................................................................................
203+................................................................................
204+................................................................................
205+................................................................................
206+................................................................................
207+................................................................................
208+................................................................................
209+................................................................................
210+................................................................................
211+................................................................................
212+................................................................................
213+................................................................................
214+................................................................................
215+................................................................................
216+................................................................................
217+................................................................................
218+................................................................................
219+................................................................................
220+................................................................................
221+................................................................................
222+................................................................................
223+................................................................................
224+................................................................................
225+................................................................................
226+................................................................................
227+................................................................................
228+................................................................................
229+................................................................................
230+................................................................................
231+................................................................................
232+................................................................................
233+................................................................................
234+................................................................................
235+................................................................................
236+................................................................................
237+................................................................................
238+................................................................................
239+................................................................................
240+................................................................................
241+................................................................................
242+................................................................................
243+................................................................................
244+................................................................................
245+................................................................................
246+................................................................................
247+................................................................................
248+................................................................................
249+................................................................................
250+................................................................................
251+................................................................................
252+................................................................................
253+................................................................................
254+................................................................................
255--
2562.17.1
257
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-respect-the-idententaion-used-in-meson.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-respect-the-idententaion-used-in-meson.patch
new file mode 100644
index 00000000..6f571a12
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-respect-the-idententaion-used-in-meson.patch
@@ -0,0 +1,36 @@
1From 122e5ac3dd16a461b6ae595605490c8f5d1c3a9d 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 1/4] 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 tests/check/meson.build | 10 +++++-----
11 1 file changed, 5 insertions(+), 5 deletions(-)
12
13diff --git a/tests/check/meson.build b/tests/check/meson.build
14index a617cf159..b2636714b 100644
15--- a/tests/check/meson.build
16+++ b/tests/check/meson.build
17@@ -146,11 +146,11 @@ foreach t : core_tests
18
19 if not skip_test
20 exe = executable(test_name, fname,
21- c_args : gst_c_args + test_defines,
22- cpp_args : gst_c_args + test_defines,
23- include_directories : [configinc],
24- link_with : link_with_libs,
25- dependencies : test_deps + glib_deps + gst_deps,
26+ c_args : gst_c_args + test_defines,
27+ cpp_args : gst_c_args + test_defines,
28+ include_directories : [configinc],
29+ link_with : link_with_libs,
30+ dependencies : test_deps + glib_deps + gst_deps,
31 )
32
33 env = environment()
34--
352.31.1
36
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-add-support-for-install-the-tests.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-add-support-for-install-the-tests.patch
new file mode 100644
index 00000000..b77fb579
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-add-support-for-install-the-tests.patch
@@ -0,0 +1,110 @@
1From c9e93c7a3e4d2773abef4f5e1464af24f36700b3 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 2/4] 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 meson.build | 5 +++++
15 meson_options.txt | 1 +
16 template.test.in | 3 +++
17 tests/check/meson.build | 22 +++++++++++++++++++++-
18 4 files changed, 30 insertions(+), 1 deletion(-)
19 create mode 100644 template.test.in
20
21diff --git a/meson.build b/meson.build
22index c4e8774f5..1abf4eb26 100644
23--- a/meson.build
24+++ b/meson.build
25@@ -562,6 +562,11 @@ if bashcomp_dep.found()
26 endif
27 endif
28
29+installed_tests_metadir = join_paths(datadir, 'installed-tests', meson.project_name())
30+installed_tests_execdir = join_paths(libexecdir, 'installed-tests', meson.project_name())
31+installed_tests_enabled = get_option('installed-tests')
32+installed_tests_template = files('template.test.in')
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 c8cee3762..b5da40eaa 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/template.test.in b/template.test.in
50new file mode 100644
51index 000000000..f701627f8
52--- /dev/null
53+++ b/template.test.in
54@@ -0,0 +1,3 @@
55+[Test]
56+Type=session
57+Exec=@installed_tests_dir@/@program@
58diff --git a/tests/check/meson.build b/tests/check/meson.build
59index b2636714b..a697a7b06 100644
60--- a/tests/check/meson.build
61+++ b/tests/check/meson.build
62@@ -124,10 +124,16 @@ test_defines = [
63 '-UG_DISABLE_ASSERT',
64 '-UG_DISABLE_CAST_CHECKS',
65 '-DGST_CHECK_TEST_ENVIRONMENT_BEACON="GST_STATE_IGNORE_ELEMENTS"',
66- '-DTESTFILE="' + meson.current_source_dir() + '/meson.build"',
67 '-DGST_DISABLE_DEPRECATED',
68 ]
69
70+testfile = meson.current_source_dir() + '/meson.build'
71+if installed_tests_enabled
72+ install_data(testfile, install_dir : installed_tests_metadir, rename : 'testfile')
73+ testfile = installed_tests_metadir + '/testfile'
74+endif
75+test_defines += '-DTESTFILE="@0@"'.format(testfile)
76+
77 # sanity checking
78 if get_option('check').disabled()
79 if get_option('tests').enabled()
80@@ -151,6 +157,8 @@ foreach t : core_tests
81 include_directories : [configinc],
82 link_with : link_with_libs,
83 dependencies : test_deps + glib_deps + gst_deps,
84+ install_dir: installed_tests_execdir,
85+ install: installed_tests_enabled,
86 )
87
88 env = environment()
89@@ -162,6 +170,18 @@ foreach t : core_tests
90 env.set('GST_PLUGIN_SCANNER_1_0', gst_scanner_dir + '/gst-plugin-scanner')
91 env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer')
92
93+ if installed_tests_enabled
94+ test_conf = configuration_data()
95+ test_conf.set('installed_tests_dir', join_paths(prefix, installed_tests_execdir))
96+ test_conf.set('program', test_name)
97+ configure_file(
98+ input: installed_tests_template,
99+ output: test_name + '.test',
100+ install_dir: installed_tests_metadir,
101+ configuration: test_conf
102+ )
103+ endif
104+
105 test(test_name, exe, env: env, timeout : 3 * 60)
106 endif
107 endforeach
108--
1092.31.1
110
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0006-tests-use-a-dictionaries-for-environment.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0006-tests-use-a-dictionaries-for-environment.patch
new file mode 100644
index 00000000..46813cec
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0/0006-tests-use-a-dictionaries-for-environment.patch
@@ -0,0 +1,48 @@
1From e82dedec1803922656e92285fc1bb75b2cdc0aad 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 tests/check/meson.build | 19 +++++++++++--------
14 1 file changed, 11 insertions(+), 8 deletions(-)
15
16diff --git a/tests/check/meson.build b/tests/check/meson.build
17index a697a7b06..f64524904 100644
18--- a/tests/check/meson.build
19+++ b/tests/check/meson.build
20@@ -161,14 +161,17 @@ foreach t : core_tests
21 install: installed_tests_enabled,
22 )
23
24- env = environment()
25- env.set('GST_PLUGIN_PATH_1_0', meson.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+ # environment() can't be passed to configure_file and it is needed for installed_tests
33+ # use a dictionary as this is simplest solution to install the environment
34+ env = {
35+ 'GST_PLUGIN_PATH_1_0': meson.build_root(),
36+ 'GST_PLUGIN_SYSTEM_PATH_1_0': '',
37+ 'GST_STATE_IGNORE_ELEMENTS': '',
38+ 'CK_DEFAULT_TIMEOUT': '20',
39+ 'GST_REGISTRY': '@0@/@1@.registry'.format(meson.current_build_dir(), test_name),
40+ 'GST_PLUGIN_SCANNER_1_0': gst_scanner_dir + '/gst-plugin-scanner',
41+ 'GST_PLUGIN_LOADING_WHITELIST': 'gstreamer',
42+ }
43
44 if installed_tests_enabled
45 test_conf = configuration_data()
46--
472.31.1
48
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0007-tests-install-the-environment-for-installed_tests.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0007-tests-install-the-environment-for-installed_tests.patch
new file mode 100644
index 00000000..eabe7bcb
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0/0007-tests-install-the-environment-for-installed_tests.patch
@@ -0,0 +1,58 @@
1From 57d2965e979f886e03eecd7e351bf01812053971 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: install the environment for installed_tests
5
6- adapt the test environment for installed_tests
7- install the test environment for installed_tests
8- run the tests using the installed environment
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 template.test.in | 2 +-
15 tests/check/meson.build | 18 ++++++++++++++++++
16 2 files changed, 19 insertions(+), 1 deletion(-)
17
18diff --git a/template.test.in b/template.test.in
19index f701627f8..9a3fbdd09 100644
20--- a/template.test.in
21+++ b/template.test.in
22@@ -1,3 +1,3 @@
23 [Test]
24 Type=session
25-Exec=@installed_tests_dir@/@program@
26+Exec=sh -c 'set -aex && source @installed_tests_dir@/@program@.env && exec @installed_tests_dir@/@program@'
27diff --git a/tests/check/meson.build b/tests/check/meson.build
28index f64524904..a67e0f8dd 100644
29--- a/tests/check/meson.build
30+++ b/tests/check/meson.build
31@@ -183,6 +183,24 @@ foreach t : core_tests
32 install_dir: installed_tests_metadir,
33 configuration: test_conf
34 )
35+
36+ env += {'GST_REGISTRY': '~/.cache/gstreamer-1.0/@0@.registry'.format(test_name)}
37+ configure_file(
38+ output: test_name + '.env',
39+ install_dir: installed_tests_execdir,
40+ configuration : env,
41+ )
42+ # helper to convert a meson environment dictionay object exported with configure_file
43+ # this also remove not needed variables for the installed tests
44+ meson.add_postconf_script('sed', '-i',
45+ '-e', '/^#define/!d',
46+ '-e', 's/^#define //g',
47+ '-e', '/^GST_PLUGIN_PATH_1_0/d',
48+ '-e', '/^GST_PLUGIN_SYSTEM_PATH_1_0/d',
49+ '-e', '/^GST_PLUGIN_SCANNER_1_0/d',
50+ '-e', 's/ /=/',
51+ join_paths(meson.current_build_dir(), test_name + '.env')
52+ )
53 endif
54
55 test(test_name, exe, env: env, timeout : 3 * 60)
56--
572.31.1
58
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/capfix.patch b/recipes-multimedia/gstreamer/gstreamer1.0/capfix.patch
deleted file mode 100644
index 7ca3d5ad..00000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0/capfix.patch
+++ /dev/null
@@ -1,37 +0,0 @@
1Currently gstreamer configuration depends on whether setcap is found on the host
2system. Turn this into a configure option to make builds deterinistic.
3
4RP 2020/2/19
5Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6Upstream-Status: Pending
7
8Index: gstreamer-1.16.1/libs/gst/helpers/meson.build
9===================================================================
10--- gstreamer-1.16.1.orig/libs/gst/helpers/meson.build
11+++ gstreamer-1.16.1/libs/gst/helpers/meson.build
12@@ -73,7 +73,12 @@ if have_ptp
13 endif
14 endif
15
16- setcap = find_program('setcap', '/usr/sbin/setcap', '/sbin/setcap', required : false)
17+ setcap_feature = get_option('setcap')
18+ if setcap_feature.disabled()
19+ setcap = find_program('dontexist', required : false)
20+ else
21+ setcap = find_program('setcap', '/usr/sbin/setcap', '/sbin/setcap', required : false)
22+ endif
23
24 # user/group to change to in gst-ptp-helper
25 ptp_helper_setuid_user = get_option('ptp-helper-setuid-user')
26Index: gstreamer-1.16.1/meson_options.txt
27===================================================================
28--- gstreamer-1.16.1.orig/meson_options.txt
29+++ gstreamer-1.16.1/meson_options.txt
30@@ -26,6 +26,7 @@ option('libunwind', type : 'feature', va
31 option('libdw', type : 'feature', value : 'auto', description : 'Use libdw to generate better backtraces from libunwind')
32 option('dbghelp', type : 'feature', value : 'auto', description : 'Use dbghelp to generate backtraces')
33 option('bash-completion', type : 'feature', value : 'auto', description : 'Install bash completion files')
34+option('setcap', type : 'feature', value : 'auto', description : 'Use setcap')
35
36 # Common feature options
37 option('examples', type : 'feature', value : 'auto', yield : true)
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/run-ptest b/recipes-multimedia/gstreamer/gstreamer1.0/run-ptest
new file mode 100755
index 00000000..0cfa955f
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0/run-ptest
@@ -0,0 +1,2 @@
1#!/usr/bin/env sh
2gnome-desktop-testing-runner gstreamer
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0_1.16.2.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0_1.18.0.imx.bb
index 8bbc16c8..cbbcf9b4 100644
--- a/recipes-multimedia/gstreamer/gstreamer1.0_1.16.2.imx.bb
+++ b/recipes-multimedia/gstreamer/gstreamer1.0_1.18.0.imx.bb
@@ -6,28 +6,29 @@ BUGTRACKER = "https://bugzilla.gnome.org/enter_bug.cgi?product=Gstreamer"
6SECTION = "multimedia" 6SECTION = "multimedia"
7LICENSE = "LGPLv2+" 7LICENSE = "LGPLv2+"
8 8
9DEPENDS = "glib-2.0 glib-2.0-native libcap libxml2 bison-native flex-native" 9DEPENDS = "glib-2.0 glib-2.0-native libxml2 bison-native flex-native"
10 10
11inherit meson pkgconfig gettext upstream-version-is-even gobject-introspection gtk-doc 11inherit meson pkgconfig gettext upstream-version-is-even gobject-introspection ptest-gnome
12 12
13LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \ 13LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \
14 file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d" 14 file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d"
15 15
16S = "${WORKDIR}/git"
17
16# Use i.MX fork of GST for customizations 18# Use i.MX fork of GST for customizations
17GST1.0_SRC ?= "gitsm://source.codeaurora.org/external/imx/gstreamer.git;protocol=https" 19GST1.0_SRC ?= "gitsm://source.codeaurora.org/external/imx/gstreamer.git;protocol=https"
18SRCBRANCH = "MM_04.05.06_2008_L5.4.47" 20SRCBRANCH = "MM_04.06.01_2105_L5.10.y"
19 21SRC_URI = "${GST1.0_SRC};branch=${SRCBRANCH} \
20SRC_URI = " \ 22 file://run-ptest \
21 ${GST1.0_SRC};branch=${SRCBRANCH} \ 23 file://0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch \
22 file://0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch \ 24 file://0002-Remove-unused-valgrind-detection.patch \
23 file://0002-meson-build-gir-even-when-cross-compiling-if-introsp.patch \ 25 file://0003-tests-seek-Don-t-use-too-strict-timeout-for-validati.patch \
24 file://0003-meson-Add-valgrind-feature.patch \ 26 file://0004-tests-respect-the-idententaion-used-in-meson.patch \
25 file://0004-meson-Add-option-for-installed-tests.patch \ 27 file://0005-tests-add-support-for-install-the-tests.patch \
26 file://capfix.patch \ 28 file://0006-tests-use-a-dictionaries-for-environment.patch \
27" 29 file://0007-tests-install-the-environment-for-installed_tests.patch \
28SRCREV = "8514bc61ccab208a65e387eab9347276a8e770e7" 30 "
29 31SRCREV = "2f20fd10eaf8629b3e8c134424c38412c4d3bd86"
30S = "${WORKDIR}/git"
31 32
32DEFAULT_PREFERENCE = "-1" 33DEFAULT_PREFERENCE = "-1"
33 34
@@ -38,14 +39,14 @@ PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \
38 39
39PACKAGECONFIG[debug] = "-Dgst_debug=true,-Dgst_debug=false" 40PACKAGECONFIG[debug] = "-Dgst_debug=true,-Dgst_debug=false"
40PACKAGECONFIG[tracer-hooks] = "-Dtracer_hooks=true,-Dtracer_hooks=false" 41PACKAGECONFIG[tracer-hooks] = "-Dtracer_hooks=true,-Dtracer_hooks=false"
42PACKAGECONFIG[coretracers] = "-Dcoretracers=enabled,-Dcoretracers=disabled"
41PACKAGECONFIG[check] = "-Dcheck=enabled,-Dcheck=disabled" 43PACKAGECONFIG[check] = "-Dcheck=enabled,-Dcheck=disabled"
42PACKAGECONFIG[tests] = "-Dtests=enabled -Dinstalled-tests=true,-Dtests=disabled -Dinstalled-tests=false" 44PACKAGECONFIG[tests] = "-Dtests=enabled -Dinstalled-tests=true,-Dtests=disabled -Dinstalled-tests=false"
43PACKAGECONFIG[valgrind] = "-Dvalgrind=enabled,-Dvalgrind=disabled,valgrind,"
44PACKAGECONFIG[unwind] = "-Dlibunwind=enabled,-Dlibunwind=disabled,libunwind" 45PACKAGECONFIG[unwind] = "-Dlibunwind=enabled,-Dlibunwind=disabled,libunwind"
45PACKAGECONFIG[dw] = "-Dlibdw=enabled,-Dlibdw=disabled,elfutils" 46PACKAGECONFIG[dw] = "-Dlibdw=enabled,-Dlibdw=disabled,elfutils"
46PACKAGECONFIG[bash-completion] = "-Dbash-completion=enabled,-Dbash-completion=disabled,bash-completion" 47PACKAGECONFIG[bash-completion] = "-Dbash-completion=enabled,-Dbash-completion=disabled,bash-completion"
47PACKAGECONFIG[tools] = "-Dtools=enabled,-Dtools=disabled" 48PACKAGECONFIG[tools] = "-Dtools=enabled,-Dtools=disabled"
48PACKAGECONFIG[setcap] = "-Dsetcap=enabled,-Dsetcap=disabled,libcap libcap-native" 49PACKAGECONFIG[setcap] = "-Dptp-helper-permissions=capabilities,,libcap libcap-native"
49 50
50# TODO: put this in a gettext.bbclass patch 51# TODO: put this in a gettext.bbclass patch
51def gettext_oemeson(d): 52def gettext_oemeson(d):
@@ -57,15 +58,12 @@ def gettext_oemeson(d):
57 return '-Dnls=enabled' 58 return '-Dnls=enabled'
58 59
59EXTRA_OEMESON += " \ 60EXTRA_OEMESON += " \
61 -Ddoc=disabled \
60 -Dexamples=disabled \ 62 -Dexamples=disabled \
61 -Ddbghelp=disabled \ 63 -Ddbghelp=disabled \
62 ${@gettext_oemeson(d)} \ 64 ${@gettext_oemeson(d)} \
63" 65"
64 66
65GTKDOC_MESON_OPTION = "gtk_doc"
66GTKDOC_MESON_ENABLE_FLAG = "enabled"
67GTKDOC_MESON_DISABLE_FLAG = "disabled"
68
69GIR_MESON_ENABLE_FLAG = "enabled" 67GIR_MESON_ENABLE_FLAG = "enabled"
70GIR_MESON_DISABLE_FLAG = "disabled" 68GIR_MESON_DISABLE_FLAG = "disabled"
71 69
@@ -75,10 +73,10 @@ PACKAGES += "${PN}-bash-completion"
75FILES_${PN} += "${libdir}/gstreamer-1.0/*.so" 73FILES_${PN} += "${libdir}/gstreamer-1.0/*.so"
76FILES_${PN}-dev += "${libdir}/gstreamer-1.0/*.a ${libdir}/gstreamer-1.0/include" 74FILES_${PN}-dev += "${libdir}/gstreamer-1.0/*.a ${libdir}/gstreamer-1.0/include"
77FILES_${PN}-bash-completion += "${datadir}/bash-completion/completions/ ${datadir}/bash-completion/helpers/gst*" 75FILES_${PN}-bash-completion += "${datadir}/bash-completion/completions/ ${datadir}/bash-completion/helpers/gst*"
78FILES_${PN}-dbg += "${datadir}/gdb ${datadir}/gstreamer-1.0/gdb ${datadir}/glib-2.0/gdb" 76FILES_${PN}-dbg += "${datadir}/gdb ${datadir}/gstreamer-1.0/gdb"
79 77
80CVE_PRODUCT = "gstreamer" 78CVE_PRODUCT = "gstreamer"
81 79
82require recipes-multimedia/gstreamer/gstreamer1.0-ptest.inc 80PTEST_BUILD_HOST_FILES = ""
83 81
84COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" 82COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"
diff --git a/recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.5.7.bb b/recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.6.1.bb
index c8bb6cd8..ea059cd8 100644
--- a/recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.5.7.bb
+++ b/recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.6.1.bb
@@ -1,5 +1,5 @@
1# Copyright (C) 2014,2016 Freescale Semiconductor 1# Copyright (C) 2014,2016 Freescale Semiconductor
2# Copyright 2017-2019 NXP 2# Copyright 2017-2021 NXP
3# Copyright (C) 2012-2015 O.S. Systems Software LTDA. 3# Copyright (C) 2012-2015 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 5
@@ -20,16 +20,15 @@ RCONFLICTS_${PN} = "gst1.0-fsl-plugin"
20LIC_FILES_CHKSUM = "file://COPYING-LGPL-2;md5=5f30f0716dfdd0d91eb439ebec522ec2 \ 20LIC_FILES_CHKSUM = "file://COPYING-LGPL-2;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
21 file://COPYING-LGPL-2.1;md5=fbc093901857fcd118f065f900982c24" 21 file://COPYING-LGPL-2.1;md5=fbc093901857fcd118f065f900982c24"
22 22
23SRCBRANCH = "MM_04.05.07_2011_L5.4.70" 23SRCBRANCH = "MM_04.06.01_2105_L5.10.y"
24 24
25SRC_URI = " \ 25
26 git://source.codeaurora.org/external/imx/imx-gst1.0-plugin.git;protocol=https;branch=${SRCBRANCH} \ 26SRC_URI = "git://source.codeaurora.org/external/imx/imx-gst1.0-plugin.git;protocol=https;branch=${SRCBRANCH}"
27" 27SRCREV = "057e6bfbc208ce31e8ed0af0264dd1e86de05808"
28SRCREV = "659ec4947d6b1903d26e4ec9e40ae251a659935d"
29 28
30S = "${WORKDIR}/git" 29S = "${WORKDIR}/git"
31 30
32inherit autotools pkgconfig use-imx-headers 31inherit meson pkgconfig use-imx-headers
33 32
34PLATFORM_mx6 = "MX6" 33PLATFORM_mx6 = "MX6"
35PLATFORM_mx6sl = "MX6SL" 34PLATFORM_mx6sl = "MX6SL"
@@ -41,10 +40,9 @@ PLATFORM_mx7ulp= "MX7ULP"
41PLATFORM_mx8 = "MX8" 40PLATFORM_mx8 = "MX8"
42 41
43# Todo add a mechanism to map possible build targets 42# Todo add a mechanism to map possible build targets
44EXTRA_OECONF = "PLATFORM=${PLATFORM} \ 43EXTRA_OEMESON = "-Dplatform=${PLATFORM} \
45 CPPFLAGS="-I${STAGING_INCDIR_IMX}" \ 44 -Dc_args="${CFLAGS} -I${STAGING_INCDIR_IMX}" \
46 CROSS_ROOT=${PKG_CONFIG_SYSROOT_DIR} \ 45"
47 ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', bb.utils.contains('DISTRO_FEATURES', 'x11', '--disable-x11', '', d), '', d)}"
48 46
49PACKAGES =+ "${PN}-gplay ${PN}-libgplaycore ${PN}-libgstfsl ${PN}-grecorder ${PN}-librecorder-engine ${PN}-libplayengine" 47PACKAGES =+ "${PN}-gplay ${PN}-libgplaycore ${PN}-libgstfsl ${PN}-grecorder ${PN}-librecorder-engine ${PN}-libplayengine"
50 48
@@ -60,14 +58,13 @@ PACKAGECONFIG_imxgpu2d = "overlaysink"
60 58
61# FIXME: Add all features 59# FIXME: Add all features
62# feature from excluded mm packages 60# feature from excluded mm packages
63PACKAGECONFIG[ac3] += ",,imx-ac3codec,imx-ac3codec" 61PACKAGECONFIG[ac3] = ",,imx-ac3codec,imx-ac3codec"
64# feature from special mm packages 62# feature from special mm packages
65PACKAGECONFIG[aacp] += ",,imx-aacpcodec,imx-aacpcodec" 63PACKAGECONFIG[aacp] = ",,imx-aacpcodec,imx-aacpcodec"
66MSDEPENDS = "imx-msparser imx-mscodec" 64MSDEPENDS = "imx-msparser imx-mscodec"
67PACKAGECONFIG[wma10dec] += ",,${MSDEPENDS},${MSDEPENDS}" 65PACKAGECONFIG[wma10dec] = ",,${MSDEPENDS},${MSDEPENDS}"
68PACKAGECONFIG[wma8enc] += "--enable-wma8enc,--disable-wma8enc,${MSDEPENDS},${MSDEPENDS}" 66PACKAGECONFIG[wma8enc] = ",,${MSDEPENDS},${MSDEPENDS}"
69OVDEPENDS = "virtual/libg2d" 67PACKAGECONFIG[overlaysink] += ",,virtual/libg2d"
70PACKAGECONFIG[overlaysink] += "--enable-overlaysink,--disable-overlaysink, ${OVDEPENDS}"
71 68
72FILES_${PN} = "${libdir}/gstreamer-1.0/*.so ${datadir}" 69FILES_${PN} = "${libdir}/gstreamer-1.0/*.so ${datadir}"
73 70
diff --git a/recipes-multimedia/tinycompress/tinycompress/0001-tinycompress-Add-id3-decoding.patch b/recipes-multimedia/tinycompress/tinycompress/0001-tinycompress-Add-id3-decoding.patch
new file mode 100755
index 00000000..f578148a
--- /dev/null
+++ b/recipes-multimedia/tinycompress/tinycompress/0001-tinycompress-Add-id3-decoding.patch
@@ -0,0 +1,1001 @@
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
6Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
7---
8 include/tinycompress/id3_tag_decode.h | 198 +++++++++++
9 src/utils/Makefile.am | 2 +-
10 src/utils/cplay.c | 88 +++++
11 src/utils/id3_tag_decode.c | 642 ++++++++++++++++++++++++++++++++++
12 4 files changed, 929 insertions(+), 1 deletion(-)
13 create mode 100644 include/tinycompress/id3_tag_decode.h
14 create mode 100644 src/utils/id3_tag_decode.c
15
16diff --git a/include/tinycompress/id3_tag_decode.h b/include/tinycompress/id3_tag_decode.h
17new file mode 100644
18index 0000000..1a911d7
19--- /dev/null
20+++ b/include/tinycompress/id3_tag_decode.h
21@@ -0,0 +1,198 @@
22+/*
23+ * Copyright (c) 2006-2017 Cadence Design Systems, Inc.
24+ * Copyright 2018 NXP
25+ *
26+ * Permission is hereby granted, free of charge, to any person obtaining
27+ * a copy of this software and associated documentation files (the
28+ * "Software"), to deal in the Software without restriction, including
29+ * without limitation the rights to use, copy, modify, merge, publish,
30+ * distribute, sublicense, and/or sell copies of the Software, and to
31+ * permit persons to whom the Software is furnished to do so, subject to
32+ * the following conditions:
33+ *
34+ * The above copyright notice and this permission notice shall be included
35+ * in all copies or substantial portions of the Software.
36+ *
37+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
38+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
39+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
40+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
41+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
42+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
43+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
44+ */
45+
46+/******************************************************************
47+ * file name : id3_tag_decode.h
48+ *
49+ * description : stores typedefs of structures specific to MP3 tag
50+ *
51+ * revision history:
52+ * 29 04 2004 DK creation
53+ *****************************************************************/
54+
55+#ifndef ID3_TAG_DECODE_H
56+#define ID3_TAG_DECODE_H
57+
58+typedef signed char WORD8;
59+typedef signed char * pWORD8;
60+typedef unsigned char UWORD8;
61+typedef unsigned char * pUWORD8;
62+
63+typedef signed short WORD16;
64+typedef signed short * pWORD16;
65+typedef unsigned short UWORD16;
66+typedef unsigned short * pUWORD16;
67+
68+typedef signed int WORD24;
69+typedef signed int * pWORD24;
70+typedef unsigned int UWORD24;
71+typedef unsigned int * pUWORD24;
72+
73+typedef signed int WORD32;
74+typedef signed int * pWORD32;
75+typedef unsigned int UWORD32;
76+typedef unsigned int * pUWORD32;
77+
78+typedef void VOID;
79+typedef void * pVOID;
80+
81+typedef signed int BOOL;
82+typedef unsigned int UBOOL;
83+typedef signed int FLAG;
84+typedef unsigned int UFLAG;
85+typedef signed int LOOPIDX;
86+typedef unsigned int ULOOPIDX;
87+typedef signed int WORD;
88+typedef unsigned int UWORD;
89+
90+#define MAX_TAG_FRAME_SIZE 100
91+
92+#define ID3V1 (0x544147) /* 0x544147 is TAG in WORD8 */
93+
94+#define ID3V2 (0x494433) /* 0x494433 is ID3 in WORD8 */
95+
96+/*
97+ * structure corresponding to ID3 tag v1 header.
98+ * this structure has all the field corresponding to ID3 tag v1 header.
99+ */
100+
101+typedef struct {
102+ WORD32 tag; // 3 bytes
103+
104+ WORD16 version; // 2 bytes
105+
106+ WORD8 flag; //1 byte
107+
108+ WORD32 size; //4 bytes
109+
110+} id3_v2_header_struct;
111+
112+/* structure which will store the frame data and
113+ * also put a limit max data to be stored
114+ */
115+typedef struct {
116+ WORD8 frame_data[MAX_TAG_FRAME_SIZE];
117+
118+ WORD32 max_size; //4 bytes
119+
120+ WORD16 tag_present;
121+
122+ WORD16 exceeds_buffer_size;
123+
124+} id3_v2_frame_struct;
125+
126+/*
127+ * structure corresponding to ID3 tag v2.
128+ * this structure has some of the field corresponding to ID3 tag v2.
129+ * if user wants to read some more tag information from
130+ * the MP3 file, he can add that field in this structure and pass address
131+ * of that element to get_inf function in id3_tag_decode.c under the
132+ * corresponding field frame header. few fields which are needed are already
133+ * populated by reading from the TAG header.
134+ */
135+typedef struct {
136+ id3_v2_frame_struct album_movie_show_title;
137+
138+ id3_v2_frame_struct composer_name;
139+
140+ id3_v2_frame_struct content_type;
141+
142+ id3_v2_frame_struct encoded_by;
143+
144+ id3_v2_frame_struct lyricist_text_writer;
145+
146+ id3_v2_frame_struct content_group_description;
147+
148+ id3_v2_frame_struct title_songname_content_description;
149+
150+ id3_v2_frame_struct medxa_type;
151+
152+ id3_v2_frame_struct original_album_movie_show_title;
153+
154+ id3_v2_frame_struct original_filename;
155+
156+ id3_v2_frame_struct original_lyricist_text_writer;
157+
158+ id3_v2_frame_struct original_artist_performer;
159+
160+ id3_v2_frame_struct file_owner_licensee;
161+
162+ id3_v2_frame_struct lead_performer_soloist;
163+
164+ id3_v2_frame_struct publisher;
165+
166+ id3_v2_frame_struct private_frame;
167+
168+ id3_v2_frame_struct other_info;
169+
170+ id3_v2_header_struct id3_v2_header;
171+
172+ WORD32 header_end;
173+
174+ WORD32 bytes_consumed;
175+
176+} id3v2_struct;
177+
178+/*
179+ * structure corresponding to ID3 tag v1.
180+ * this structure has all the field corresponding to ID3 tag v1.
181+ */
182+typedef struct {
183+ WORD8 song_title[30]; //30 word8acters
184+
185+ WORD8 artist[30]; //30 word8acters
186+
187+ WORD8 album[30]; //30 word8acters
188+
189+ WORD8 year[4]; //4 word8acters
190+
191+ WORD8 comment[30]; //30 word8acters
192+
193+ WORD8 genre[1]; //1 byte
194+
195+} id3v1_struct;
196+
197+WORD32 get_info(const char *inp_buffer,
198+ unsigned int avail_inp,
199+ WORD32 tag_size,
200+ id3_v2_frame_struct *dest);
201+
202+WORD32 search_id3_v2(UWORD8 *buffer);
203+
204+WORD32 decode_id3_v2(const char *const buffer,
205+ id3v2_struct *id3v2,
206+ WORD32 continue_flag,
207+ WORD32 insize);
208+
209+WORD32 get_id3_v2_bytes(UWORD8 *buffer);
210+
211+WORD32 get_v1_info(UWORD8 *buffer, id3v1_struct *id3v1);
212+
213+WORD32 search_id3_v1(UWORD8 *buffer);
214+
215+WORD32 decode_id3_v1(UWORD8 *buffer, id3v1_struct *id3v1);
216+
217+void init_id3v2_field(id3v2_struct *id3v2);
218+
219+#endif
220diff --git a/src/utils/Makefile.am b/src/utils/Makefile.am
221index 1b996d4..e813689 100644
222--- a/src/utils/Makefile.am
223+++ b/src/utils/Makefile.am
224@@ -1,6 +1,6 @@
225 bin_PROGRAMS = cplay crecord
226
227-cplay_SOURCES = cplay.c
228+cplay_SOURCES = cplay.c id3_tag_decode.c
229 crecord_SOURCES = crecord.c
230
231 cplay_CFLAGS = -I$(top_srcdir)/include
232diff --git a/src/utils/cplay.c b/src/utils/cplay.c
233index 87863a3..2a52b52 100644
234--- a/src/utils/cplay.c
235+++ b/src/utils/cplay.c
236@@ -72,6 +72,7 @@
237 #include "sound/compress_params.h"
238 #include "tinycompress/tinycompress.h"
239 #include "tinycompress/tinymp3.h"
240+#include "tinycompress/id3_tag_decode.h"
241
242 static int verbose;
243 static const unsigned int DEFAULT_CODEC_ID = SND_AUDIOCODEC_PCM;
244@@ -245,12 +246,97 @@ int main(int argc, char **argv)
245 exit(EXIT_SUCCESS);
246 }
247
248+void shift_buffer(char *buf, int buf_size, int bytes_consumed)
249+{
250+ int i;
251+
252+ if (bytes_consumed <= 0)
253+ return;
254+
255+ for (i = 0; i < buf_size - bytes_consumed; i++)
256+ buf[i] = buf[i + bytes_consumed];
257+}
258+
259+void parse_id3(FILE *file, int *offset) {
260+ /* ID3 tag specific declarations */
261+ unsigned char id3_buf[128];
262+ unsigned char id3v2_buf[4096];
263+ signed int id3_v1_found = 0, id3_v1_decoded = 0;
264+ signed int id3_v2_found = 0, id3_v2_complete = 0;
265+ signed int i_bytes_consumed = 0;
266+ signed int i_fread_bytes;
267+ id3v1_struct id3v1;
268+ id3v2_struct id3v2;
269+
270+ {
271+ fseek(file, -128, SEEK_END);
272+ fread(id3_buf, 1, 128, file);
273+
274+ /* search for ID3V1 */
275+ id3_v1_found = search_id3_v1(id3_buf + 0);
276+ if (id3_v1_found) {
277+ /* if ID3V1 is found, decode ID3V1 */
278+ decode_id3_v1(id3_buf + 3, &id3v1);
279+ id3_v1_decoded = 1;
280+ }
281+ fseek(file, 0, SEEK_SET);
282+ }
283+
284+ {
285+ signed int flag = 0;
286+ signed int continue_flag = 0;
287+
288+ i_fread_bytes = fread(id3v2_buf,
289+ sizeof(char), 0x1000, file);
290+
291+ /* search for ID3V2 */
292+ id3_v2_found =
293+ search_id3_v2(id3v2_buf);
294+
295+ if (id3_v2_found) {
296+ /* initialise the max fields */
297+ init_id3v2_field(&id3v2);
298+
299+ while (!id3_v2_complete && id3_v2_found) {
300+ /* if ID3V2 is found, decode ID3V2 */
301+ id3_v2_complete = decode_id3_v2((const char *const)id3v2_buf,
302+ &id3v2, continue_flag, i_fread_bytes);
303+
304+ if (!id3_v2_complete) {
305+ continue_flag = 1;
306+ i_bytes_consumed = id3v2.bytes_consumed;
307+
308+ fseek(file, i_bytes_consumed, SEEK_SET);
309+
310+ i_fread_bytes = fread(id3v2_buf,
311+ sizeof(unsigned char), 0x1000, file);
312+ if (i_fread_bytes <= 0) {
313+ return;
314+ }
315+ }
316+ }
317+
318+ if (id3_v2_complete) {
319+ i_bytes_consumed = id3v2.bytes_consumed;
320+ fseek(file, i_bytes_consumed, SEEK_SET);
321+ }
322+ }
323+ }
324+
325+ *offset = i_bytes_consumed;
326+}
327+
328 void get_codec_mp3(FILE *file, struct compr_config *config,
329 struct snd_codec *codec)
330 {
331 size_t read;
332 struct mp3_header header;
333 unsigned int channels, rate, bits;
334+ int offset = 0;
335+
336+ parse_id3(file, &offset);
337+
338+ fseek(file, offset, SEEK_SET);
339
340 read = fread(&header, 1, sizeof(header), file);
341 if (read != sizeof(header)) {
342@@ -279,6 +365,8 @@ void get_codec_mp3(FILE *file, struct compr_config *config,
343 codec->level = 0;
344 codec->ch_mode = 0;
345 codec->format = 0;
346+
347+ fseek(file, offset, SEEK_SET);
348 }
349
350 void get_codec_iec(FILE *file, struct compr_config *config,
351diff --git a/src/utils/id3_tag_decode.c b/src/utils/id3_tag_decode.c
352new file mode 100644
353index 0000000..393967a
354--- /dev/null
355+++ b/src/utils/id3_tag_decode.c
356@@ -0,0 +1,642 @@
357+/*
358+ * Copyright (c) 2006-2017 Cadence Design Systems, Inc.
359+ * Copyright 2018 NXP
360+ *
361+ * Permission is hereby granted, free of charge, to any person obtaining
362+ * a copy of this software and associated documentation files (the
363+ * "Software"), to deal in the Software without restriction, including
364+ * without limitation the rights to use, copy, modify, merge, publish,
365+ * distribute, sublicense, and/or sell copies of the Software, and to
366+ * permit persons to whom the Software is furnished to do so, subject to
367+ * the following conditions:
368+ *
369+ * The above copyright notice and this permission notice shall be included
370+ * in all copies or substantial portions of the Software.
371+ *
372+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
373+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
374+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
375+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
376+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
377+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
378+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
379+ */
380+#include <ctype.h>
381+#include "tinycompress/id3_tag_decode.h"
382+
383+#define CHAR4(c1, c2, c3, c4) \
384+ (int)(((unsigned char)(c1) << 24) | \
385+ ((unsigned char)(c2) << 16) | \
386+ ((unsigned char)(c3) << 8) | \
387+ ((unsigned char)c4))
388+
389+#ifndef MSVC_BUILD
390+unsigned int umin(unsigned int a, unsigned int b)
391+{
392+ return (a < b ? a : b);
393+}
394+
395+#else
396+unsigned int umin(unsigned int a, unsigned int b)
397+{
398+ return (a < b ? a : b);
399+}
400+#endif
401+
402+/***********************************************************
403+ * function name : display
404+ *
405+ * description : display ID3 tag contents.
406+ *
407+ * arguments : input parameters
408+ *
409+ * values returned : 0
410+ ***********************************************************/
411+
412+static void display2(const id3_v2_frame_struct * const src,
413+ int size,
414+ const char * const disp)
415+{
416+ int j;
417+
418+
419+ for (j = 0; j < size; j++) {
420+ int c = src->frame_data[j];
421+
422+ if (c) {
423+ if (!isprint(c))
424+ break;
425+ }
426+ }
427+}
428+
429+static VOID display1(WORD8 src[], WORD32 size, WORD8 disp[])
430+{
431+ WORD32 j;
432+
433+ for (j = 0; j < size ; j++) {
434+ int c = src[j];
435+
436+ if (c) {
437+ if (!isprint(c))
438+ break;
439+ }
440+ }
441+}
442+
443+/*****************************************************************
444+ * function name : init_id3_header
445+ *
446+ * description : initialise the max filed size of teh farem.
447+ *
448+ * arguments : input parameters
449+ *
450+ * values returned : 0
451+ ****************************************************************/
452+
453+VOID init_id3v2_field(id3v2_struct *id3v2)
454+{
455+ id3v2->album_movie_show_title.max_size = MAX_TAG_FRAME_SIZE;
456+ id3v2->composer_name.max_size = MAX_TAG_FRAME_SIZE;
457+ id3v2->content_type.max_size = MAX_TAG_FRAME_SIZE;
458+ id3v2->encoded_by.max_size = MAX_TAG_FRAME_SIZE;
459+ id3v2->lyricist_text_writer.max_size = MAX_TAG_FRAME_SIZE;
460+ id3v2->content_group_description.max_size = MAX_TAG_FRAME_SIZE;
461+ id3v2->title_songname_content_description.max_size = MAX_TAG_FRAME_SIZE;
462+ id3v2->medxa_type.max_size = MAX_TAG_FRAME_SIZE;
463+ id3v2->original_album_movie_show_title.max_size = MAX_TAG_FRAME_SIZE;
464+ id3v2->original_filename.max_size = MAX_TAG_FRAME_SIZE;
465+ id3v2->original_lyricist_text_writer.max_size = MAX_TAG_FRAME_SIZE;
466+ id3v2->original_artist_performer.max_size = MAX_TAG_FRAME_SIZE;
467+ id3v2->file_owner_licensee.max_size = MAX_TAG_FRAME_SIZE;
468+ id3v2->lead_performer_soloist.max_size = MAX_TAG_FRAME_SIZE;
469+ id3v2->publisher.max_size = MAX_TAG_FRAME_SIZE;
470+ id3v2->private_frame.max_size = MAX_TAG_FRAME_SIZE;
471+ id3v2->other_info.max_size = MAX_TAG_FRAME_SIZE;
472+
473+ /* resetting the flag to indicate presese of frame */
474+ id3v2->album_movie_show_title.tag_present = 0;
475+ id3v2->composer_name.tag_present = 0;
476+ id3v2->content_type.tag_present = 0;
477+ id3v2->encoded_by.tag_present = 0;
478+ id3v2->lyricist_text_writer.tag_present = 0;
479+ id3v2->content_group_description.tag_present = 0;
480+ id3v2->title_songname_content_description.tag_present = 0;
481+ id3v2->medxa_type.tag_present = 0;
482+ id3v2->original_album_movie_show_title.tag_present = 0;
483+ id3v2->original_filename.tag_present = 0;
484+ id3v2->original_lyricist_text_writer.tag_present = 0;
485+ id3v2->original_artist_performer.tag_present = 0;
486+ id3v2->file_owner_licensee.tag_present = 0;
487+ id3v2->lead_performer_soloist.tag_present = 0;
488+ id3v2->publisher.tag_present = 0;
489+ id3v2->private_frame.tag_present = 0;
490+ id3v2->other_info.tag_present = 0;
491+
492+ /* resetting the flag which indicates that size of the frame has
493+ * exceeded the max buffer size
494+ */
495+ id3v2->album_movie_show_title.exceeds_buffer_size = 0;
496+ id3v2->composer_name.exceeds_buffer_size = 0;
497+ id3v2->content_type.exceeds_buffer_size = 0;
498+ id3v2->encoded_by.exceeds_buffer_size = 0;
499+ id3v2->lyricist_text_writer.exceeds_buffer_size = 0;
500+ id3v2->content_group_description.exceeds_buffer_size = 0;
501+ id3v2->title_songname_content_description.exceeds_buffer_size = 0;
502+ id3v2->medxa_type.exceeds_buffer_size = 0;
503+ id3v2->original_album_movie_show_title.exceeds_buffer_size = 0;
504+ id3v2->original_filename.exceeds_buffer_size = 0;
505+ id3v2->original_lyricist_text_writer.exceeds_buffer_size = 0;
506+ id3v2->original_artist_performer.exceeds_buffer_size = 0;
507+ id3v2->file_owner_licensee.exceeds_buffer_size = 0;
508+ id3v2->lead_performer_soloist.exceeds_buffer_size = 0;
509+ id3v2->publisher.exceeds_buffer_size = 0;
510+ id3v2->private_frame.exceeds_buffer_size = 0;
511+ id3v2->other_info.exceeds_buffer_size = 0;
512+
513+ id3v2->bytes_consumed = 0;
514+ id3v2->header_end = 0;
515+}
516+
517+/***************************************************************
518+ * function name : search_id3_v2
519+ *
520+ * description : finds if ID3V2 starts at the start of given buffer.
521+ *
522+ * arguments : input parameters
523+ * buffer input buffer
524+ *
525+ * values returned : FLAG 1: ID3 found 0: ID3 not found
526+ ***************************************************************/
527+WORD32 search_id3_v2(UWORD8 *buffer)
528+{
529+ UWORD32 temp;
530+
531+ temp = buffer[0] << 16;
532+ temp |= buffer[1] << 8;
533+ temp |= buffer[2];
534+
535+ if (temp == ID3V2)
536+ return 1; /* ID3 found */
537+
538+ return 0; /* ID3 not found */
539+}
540+
541+/**************************************************************
542+ * function name : search_id3_v1
543+ *
544+ * description : finds if ID3V1 starts at the start of given buffer.
545+ *
546+ * arguments : input parameters
547+ * buffer input buffer
548+ *
549+ * values returned : FLAG 1: ID3 found 0: ID3 not found
550+ **************************************************************/
551+WORD32 search_id3_v1(UWORD8 *buffer)
552+{
553+ UWORD32 temp;
554+
555+ temp = buffer[0] << 16;
556+ temp |= buffer[1] << 8;
557+ temp |= buffer[2];
558+
559+ if (temp == ID3V1)
560+ return 1; /* ID3 found */
561+
562+ return 0; /* ID3 not found */
563+}
564+
565+/***************************************************************
566+ * function name : decode_id3_v1
567+ *
568+ * description : decodes ID3V1 tag.
569+ *
570+ * arguments : input parameters
571+ * buffer input buffer
572+ * id3v1 structure
573+ *
574+ * values returned : bytes consumed
575+ **************************************************************/
576+WORD32 decode_id3_v1(UWORD8 *buffer, id3v1_struct *id3v1)
577+{
578+ WORD32 bytes_consumed = 0;
579+ short tag_type;
580+
581+ /* setting the tag type */
582+ tag_type = 1;
583+
584+ bytes_consumed = get_v1_info(buffer, id3v1);
585+
586+ return bytes_consumed;
587+}
588+
589+/***********************************************************
590+ * function name : get_v1_info
591+ *
592+ * description : gets ID3V1 information fields.
593+ *
594+ * arguments : input parameters
595+ * buffer input buffer
596+ * id3v1 structure
597+ *
598+ * values returned : bytes consumed
599+ ***********************************************************/
600+WORD32 get_v1_info(UWORD8 *buffer, id3v1_struct *id3v1)
601+{
602+ WORD32 i;
603+ WORD32 bytes_consumed = 0;
604+
605+ /* get song_title */
606+ for (i = 0; i < 30; i++)
607+ id3v1->song_title[i] = buffer[i];
608+
609+ buffer += 30;
610+ bytes_consumed += 30;
611+ display1(id3v1->song_title, 30, (WORD8 *)"song_title : ");
612+
613+ /* get artist */
614+ for (i = 0; i < 30; i++)
615+ id3v1->artist[i] = buffer[i];
616+
617+ buffer += 30;
618+ bytes_consumed += 30;
619+ display1(id3v1->artist, 30, (WORD8 *)"artist : ");
620+
621+ /* get album */
622+ for (i = 0; i < 30; i++)
623+ id3v1->album[i] = buffer[i];
624+
625+ buffer += 30;
626+ bytes_consumed += 30;
627+ display1(id3v1->album, 30, (WORD8 *)"album : ");
628+
629+ /* get year */
630+ for (i = 0; i < 4; i++)
631+ id3v1->year[i] = buffer[i];
632+
633+ buffer += 4;
634+ bytes_consumed += 4;
635+ display1(id3v1->year, 4, (WORD8 *)"year : ");
636+
637+ /* get comment */
638+ for (i = 0; i < 30; i++)
639+ id3v1->comment[i] = buffer[i];
640+
641+ buffer += 30;
642+ bytes_consumed += 30;
643+ display1(id3v1->comment, 30, (WORD8 *)"comment : ");
644+
645+ /* get genre */
646+ for (i = 0; i < 1; i++)
647+ id3v1->genre[i] = buffer[i];
648+
649+ buffer += 1;
650+ bytes_consumed += 1;
651+
652+ return bytes_consumed;
653+}
654+
655+/*****************************************************
656+ * function name : decode_id3_v2
657+ *
658+ * description : decodes ID3V2 tag.
659+ *
660+ * arguments : input parameters
661+ * buffer input buffer
662+ * id3v2 structure
663+ * continue_flag FLAG to indicate whether
664+ * it is first call or not
665+ * insize input buffer size
666+ *
667+ * values returned : bytes consumed
668+ ******************************************************/
669+WORD32 decode_id3_v2(const char *const buffer,
670+ id3v2_struct *const id3v2,
671+ WORD32 continue_flag,
672+ WORD32 insize)
673+{
674+ UWORD32 size = 0, flag;
675+ WORD32 i, buf_update_val;
676+ UWORD8 buf[4], frame_header[10], id3_buffer[10];
677+ WORD8 *bitstream_ptr;
678+ short tag_type;
679+
680+ WORD32 bytes_consumed = 0;
681+
682+ if (id3v2->header_end == 1) {
683+ id3v2->bytes_consumed += insize;
684+ if (id3v2->bytes_consumed < id3v2->id3_v2_header.size)
685+ return 0;
686+
687+ id3v2->bytes_consumed = (id3v2->id3_v2_header.size + 10);
688+ return 1;
689+ }
690+
691+ bitstream_ptr = (WORD8 *)id3_buffer;
692+
693+ if (!continue_flag) {
694+ bytes_consumed += 3;
695+ /* setting the tag type */
696+ tag_type = 2;
697+ id3v2->id3_v2_header.version = buffer[bytes_consumed + 0] << 8;
698+ id3v2->id3_v2_header.version |= buffer[bytes_consumed + 1];
699+ id3v2->id3_v2_header.flag = buffer[bytes_consumed + 2];
700+
701+ /* making the msb of each byte zero */
702+ buf[0] = buffer[bytes_consumed + 6] & 0x7f;
703+ buf[1] = buffer[bytes_consumed + 5] & 0x7f;
704+ buf[2] = buffer[bytes_consumed + 4] & 0x7f;
705+ buf[3] = buffer[bytes_consumed + 3] & 0x7f;
706+
707+ bytes_consumed += 7;
708+
709+ /* concatenation the bytes after making
710+ * 7th bit zero to get 28 bits size
711+ */
712+ size = buf[0];
713+ size |= (buf[1] << 7);
714+ size |= (buf[2] << 14);
715+ size |= (buf[3] << 21);
716+ /* storing the size */
717+ id3v2->id3_v2_header.size = size;
718+
719+ /* check for extended header */
720+ if (id3v2->id3_v2_header.flag & 0x20) {
721+ for (i = 0; i < 10; i++)
722+ bitstream_ptr[i] = buffer[bytes_consumed + i];
723+
724+ i = 0;
725+ bytes_consumed += 10;
726+
727+ size = bitstream_ptr[i++] << 24;
728+ size |= bitstream_ptr[i++] << 16;
729+ size |= bitstream_ptr[i++] << 8;
730+ size |= bitstream_ptr[i++];
731+
732+ /* two bytes for flag */
733+ i += 2;
734+ {
735+ UWORD32 padding_size;
736+
737+ padding_size = bitstream_ptr[i++] << 24;
738+ padding_size |= bitstream_ptr[i++] << 16;
739+ padding_size |= bitstream_ptr[i++] << 8;
740+ padding_size |= bitstream_ptr[i++];
741+
742+ /* skipping the padding and frame size
743+ * number of bytes
744+ */
745+ bytes_consumed += (padding_size + size);
746+ }
747+ }
748+ }
749+
750+ while (id3v2->header_end != 1) {
751+ char *key;
752+ id3_v2_frame_struct *value;
753+ unsigned int avail_inp;
754+
755+ /* reading the 10 bytes to get the frame header */
756+
757+ for (i = 0; i < 10; i++)
758+ frame_header[i] = buffer[bytes_consumed + i];
759+ bytes_consumed += 10;
760+
761+ /* getting the size from the header */
762+ size = frame_header[4] << 24;
763+ size |= frame_header[5] << 16;
764+ size |= frame_header[6] << 8;
765+ size |= frame_header[7];
766+
767+ /* decoding the flag, currently not used */
768+ flag = frame_header[8] << 8;
769+ flag |= frame_header[9];
770+
771+ avail_inp = insize - bytes_consumed;
772+
773+ /* switching to the frame type */
774+ switch (CHAR4(frame_header[0],
775+ frame_header[1],
776+ frame_header[2],
777+ frame_header[3])) {
778+ case CHAR4('A', 'E', 'N', 'C'):
779+ case CHAR4('A', 'P', 'I', 'C'):
780+ case CHAR4('C', 'O', 'M', 'M'):
781+ case CHAR4('C', 'O', 'M', 'R'):
782+ case CHAR4('E', 'N', 'C', 'R'):
783+ case CHAR4('E', 'Q', 'U', 'A'):
784+ case CHAR4('E', 'T', 'C', 'O'):
785+ case CHAR4('G', 'E', 'O', 'B'):
786+ case CHAR4('G', 'R', 'I', 'D'):
787+ case CHAR4('I', 'P', 'L', 'S'):
788+ case CHAR4('L', 'I', 'N', 'K'):
789+ case CHAR4('M', 'C', 'D', 'I'):
790+ case CHAR4('M', 'L', 'L', 'T'):
791+ case CHAR4('O', 'W', 'N', 'E'):
792+ case CHAR4('P', 'C', 'N', 'T'):
793+ case CHAR4('P', 'O', 'P', 'M'):
794+ case CHAR4('P', 'O', 'S', 'S'):
795+ case CHAR4('R', 'B', 'U', 'F'):
796+ case CHAR4('R', 'V', 'A', 'D'):
797+ case CHAR4('R', 'V', 'R', 'B'):
798+ case CHAR4('S', 'Y', 'L', 'T'):
799+ case CHAR4('S', 'Y', 'T', 'C'):
800+ case CHAR4('T', 'B', 'P', 'M'):
801+ case CHAR4('T', 'C', 'O', 'P'):
802+ case CHAR4('T', 'D', 'A', 'T'):
803+ case CHAR4('T', 'D', 'L', 'Y'):
804+ case CHAR4('T', 'F', 'L', 'T'):
805+ case CHAR4('T', 'I', 'M', 'E'):
806+ case CHAR4('T', 'K', 'E', 'Y'):
807+ case CHAR4('T', 'L', 'A', 'N'):
808+ case CHAR4('T', 'L', 'E', 'N'):
809+ case CHAR4('T', 'M', 'E', 'D'):
810+ case CHAR4('T', 'O', 'F', 'N'):
811+ case CHAR4('T', 'O', 'L', 'Y'):
812+ case CHAR4('T', 'O', 'R', 'Y'):
813+ case CHAR4('T', 'P', 'E', '2'):
814+ case CHAR4('T', 'P', 'E', '3'):
815+ case CHAR4('T', 'P', 'E', '4'):
816+ case CHAR4('T', 'P', 'O', 'S'):
817+ case CHAR4('T', 'R', 'C', 'K'):
818+ case CHAR4('T', 'R', 'D', 'A'):
819+ case CHAR4('T', 'R', 'S', 'N'):
820+ case CHAR4('T', 'R', 'S', 'O'):
821+ case CHAR4('T', 'S', 'I', 'Z'):
822+ case CHAR4('T', 'S', 'R', 'C'):
823+ case CHAR4('T', 'S', 'S', 'E'):
824+ case CHAR4('T', 'Y', 'E', 'R'):
825+ case CHAR4('T', 'X', 'X', 'X'):
826+ case CHAR4('U', 'F', 'I', 'D'):
827+ case CHAR4('U', 'S', 'E', 'R'):
828+ case CHAR4('U', 'S', 'L', 'T'):
829+ case CHAR4('W', 'C', 'O', 'M'):
830+ case CHAR4('W', 'C', 'O', 'P'):
831+ case CHAR4('W', 'O', 'A', 'F'):
832+ case CHAR4('W', 'O', 'A', 'R'):
833+ case CHAR4('W', 'O', 'A', 'S'):
834+ case CHAR4('W', 'O', 'R', 'S'):
835+ case CHAR4('W', 'P', 'A', 'Y'):
836+ case CHAR4('W', 'P', 'U', 'B'):
837+ case CHAR4('W', 'X', 'X', 'X'):
838+ case CHAR4('T', 'I', 'T', '3'):
839+ key = "other_info : ";
840+ value = &id3v2->other_info;
841+ break;
842+ case CHAR4('P', 'R', 'I', 'V'):
843+ key = "private_frame : ";
844+ value = &id3v2->private_frame;
845+ break;
846+ case CHAR4('T', 'A', 'L', 'B'):
847+ key = "album_movie_show_title : ";
848+ value = &id3v2->album_movie_show_title;
849+ break;
850+ case CHAR4('T', 'C', 'O', 'M'):
851+ key = "composer_name : ";
852+ value = &id3v2->composer_name;
853+ break;
854+ case CHAR4('T', 'C', 'O', 'N'):
855+ key = "content_type : ";
856+ value = &id3v2->content_type;
857+ break;
858+ case CHAR4('T', 'E', 'N', 'C'):
859+ key = "encoded_by : ";
860+ value = &id3v2->encoded_by;
861+ break;
862+ case CHAR4('T', 'E', 'X', 'T'):
863+ key = "lyricist_text_writer : ";
864+ value = &id3v2->lyricist_text_writer;
865+ break;
866+ case CHAR4('T', 'I', 'T', '1'):
867+ key = "content_group_description : ";
868+ value = &id3v2->content_group_description;
869+ break;
870+ case CHAR4('T', 'I', 'T', '2'):
871+ key = "title_songname_content_description : ";
872+ value = &id3v2->title_songname_content_description;
873+ break;
874+ case CHAR4('T', 'O', 'A', 'L'):
875+ key = "original_album_movie_show_title : ";
876+ value = &id3v2->original_album_movie_show_title;
877+ break;
878+ case CHAR4('T', 'O', 'P', 'E'):
879+ key = "original_artist_performer : ";
880+ value = &id3v2->original_artist_performer;
881+ break;
882+ case CHAR4('T', 'O', 'W', 'N'):
883+ key = "file_owner_licensee : ";
884+ value = &id3v2->file_owner_licensee;
885+ break;
886+ case CHAR4('T', 'P', 'E', '1'):
887+ key = "lead_performer_soloist : ";
888+ value = &id3v2->lead_performer_soloist;
889+ break;
890+ case CHAR4('T', 'P', 'U', 'B'):
891+ key = "publisher : ";
892+ value = &id3v2->publisher;
893+ break;
894+ default:
895+ /* skipping the read 10 bytes */
896+ buf_update_val = -10;
897+ id3v2->header_end = 1;
898+ value = 0;
899+ key = 0;
900+ break;
901+ }
902+
903+ if (value != 0)
904+ buf_update_val = get_info(&buffer[bytes_consumed],
905+ avail_inp, size, value);
906+
907+ /* Negative value for buf_update_val means one of two things:
908+ * 1. The default case happened and we're done with ID3V2 tag
909+ * frames, or
910+ * 2. get_info() returned -1 to indicate that more input is
911+ * required to decode this frame of the tag.
912+ */
913+ if (buf_update_val >= 0)
914+ display2(value,
915+ umin(value->max_size, buf_update_val), key);
916+
917+ if (buf_update_val == -1) {
918+ id3v2->bytes_consumed += bytes_consumed;
919+ return 1;
920+ }
921+
922+ bytes_consumed += buf_update_val;
923+
924+ /* Is there enough input left (10 bytes) to begin
925+ * decoding another frame? If not, bag out temporarily
926+ * now. The caller will refill our input buffer and
927+ * call us again with continue_flag == 1.
928+ */
929+ if (insize - bytes_consumed < 10) {
930+ id3v2->bytes_consumed += bytes_consumed;
931+ return 0; /* not completely decoded */
932+ }
933+ }
934+
935+ id3v2->bytes_consumed += bytes_consumed;
936+ if ((id3v2->bytes_consumed + 10) < id3v2->id3_v2_header.size)
937+ return 0; /* not completely decoded */
938+
939+ return 1; /* completely decoded */
940+}
941+
942+/*******************************************************
943+ * function name : get_id3_v2_bytes
944+ *
945+ * description : tells the size of ID3V2 tag.
946+ *
947+ * arguments : input parameters
948+ * buffer input buffer
949+ *
950+ * values returned : bytes consumed
951+ ********************************************************/
952+WORD32 get_id3_v2_bytes(UWORD8 *buffer)
953+{
954+ WORD32 size;
955+
956+ /* making the msb of each byte zero */
957+ size = (buffer[9] & 0x7f);
958+ size |= ((buffer[8] & 0x7f) << 7);
959+ size |= ((buffer[7] & 0x7f) << 14);
960+ size |= ((buffer[6] & 0x7f) << 21);
961+
962+ return (size + 10);
963+}
964+
965+/****************************************************
966+ * function name : get_info
967+ *
968+ * description : read the frame information from the input buffer.
969+ *
970+ * arguments : input parameters
971+ *
972+ * values returned : update value for buffer
973+ ****************************************************/
974+WORD32 get_info(const char *inp_buffer,
975+ unsigned int avail_inp,
976+ WORD32 tag_size,
977+ id3_v2_frame_struct *dest)
978+{
979+ WORD32 j;
980+
981+ /* setting the tag to indicate the presence of frame */
982+ dest->tag_present = 1;
983+ /* If there isn't enough input available, we punt back to the top
984+ * level and ask for more.
985+ */
986+ if (avail_inp < umin(tag_size, dest->max_size))
987+ return -1;
988+
989+ if (dest->max_size >= tag_size) {
990+ for (j = 0; j < tag_size ; j++)
991+ dest->frame_data[j] = inp_buffer[j];
992+ } else {
993+ dest->exceeds_buffer_size = 1;
994+ for (j = 0; j < dest->max_size ; j++)
995+ dest->frame_data[j] = inp_buffer[j];
996+ }
997+ return tag_size;
998+}
999--
10002.7.4
1001
diff --git a/recipes-multimedia/tinycompress/tinycompress/0002-cplay-Support-wave-file.patch b/recipes-multimedia/tinycompress/tinycompress/0002-cplay-Support-wave-file.patch
new file mode 100755
index 00000000..9189bc0e
--- /dev/null
+++ b/recipes-multimedia/tinycompress/tinycompress/0002-cplay-Support-wave-file.patch
@@ -0,0 +1,221 @@
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
18diff --git a/include/tinycompress/wave_formats.h b/include/tinycompress/wave_formats.h
19new file mode 100644
20index 000000000000..4e2e009206cf
21--- /dev/null
22+++ b/include/tinycompress/wave_formats.h
23@@ -0,0 +1,51 @@
24+#ifndef WAVE_FORMATS_H
25+#define WAVE_FORMATS_H 1
26+
27+#define COMPOSE_ID(a,b,c,d) ((a) | ((b)<<8) | ((c)<<16) | ((d)<<24))
28+
29+#define WAV_RIFF COMPOSE_ID('R','I','F','F')
30+#define WAV_RIFX COMPOSE_ID('R','I','F','X')
31+#define WAV_WAVE COMPOSE_ID('W','A','V','E')
32+#define WAV_FMT COMPOSE_ID('f','m','t',' ')
33+#define WAV_DATA COMPOSE_ID('d','a','t','a')
34+
35+/* WAVE fmt block constants from Microsoft mmreg.h header */
36+#define WAV_FMT_PCM 0x0001
37+#define WAV_FMT_IEEE_FLOAT 0x0003
38+#define WAV_FMT_DOLBY_AC3_SPDIF 0x0092
39+#define WAV_FMT_EXTENSIBLE 0xfffe
40+
41+/* Used with WAV_FMT_EXTENSIBLE format */
42+#define WAV_GUID_TAG "\x00\x00\x00\x00\x10\x00\x80\x00\x00\xAA\x00\x38\x9B\x71"
43+
44+typedef struct {
45+ u_int magic; /* 'RIFF' */
46+ u_int length; /* filelen */
47+ u_int type; /* 'WAVE' */
48+} WaveHeader;
49+
50+typedef struct {
51+ u_short format; /* see WAV_FMT_* */
52+ u_short channels;
53+ u_int sample_fq; /* frequence of sample */
54+ u_int byte_p_sec;
55+ u_short byte_p_spl; /* samplesize; 1 or 2 bytes */
56+ u_short bit_p_spl; /* 8, 12 or 16 bit */
57+} WaveFmtBody;
58+
59+typedef struct {
60+ WaveFmtBody format;
61+ u_short ext_size;
62+ u_short bit_p_spl;
63+ u_int channel_mask;
64+ u_short guid_format; /* WAV_FMT_* */
65+ u_char guid_tag[14]; /* WAV_GUID_TAG */
66+} WaveFmtExtensibleBody;
67+
68+typedef struct {
69+ u_int type; /* 'data' */
70+ u_int length; /* samplecount */
71+} WaveChunkHeader;
72+
73+
74+#endif /* FORMATS */
75diff --git a/src/utils/cplay.c b/src/utils/cplay.c
76index 5b749419e731..8882f4d9746d 100644
77--- a/src/utils/cplay.c
78+++ b/src/utils/cplay.c
79@@ -1,4 +1,6 @@
80 /*
81+ * Copyright 2020 NXP
82+ *
83 * This file is provided under a dual BSD/LGPLv2.1 license. When using or
84 * redistributing this file, you may do so under either license.
85 *
86@@ -73,6 +75,8 @@
87 #include "tinycompress/tinycompress.h"
88 #include "tinycompress/tinymp3.h"
89 #include "tinycompress/id3_tag_decode.h"
90+#include "tinycompress/wave_formats.h"
91+#include <alsa/asoundlib.h>
92
93 static int verbose;
94 static const unsigned int DEFAULT_CODEC_ID = SND_AUDIOCODEC_PCM;
95@@ -166,6 +170,77 @@ static int parse_mp3_header(struct mp3_header *header, unsigned int *num_channel
96 return 0;
97 }
98
99+static int parse_wav_header(FILE *file, unsigned int *num_channels, unsigned int *sample_rate,
100+ unsigned int *format) {
101+ WaveHeader wave_header;
102+ WaveChunkHeader chunk_header;
103+ WaveFmtBody fmt_body;
104+ int more_chunks = 1;
105+
106+ fread(&wave_header, sizeof(WaveHeader), 1, file);
107+ if ((wave_header.magic != WAV_RIFF) ||
108+ (wave_header.type != WAV_WAVE)) {
109+ fprintf(stderr, "Error: it is not a riff/wave file\n");
110+ return -1;
111+ }
112+
113+ do {
114+ fread(&chunk_header, sizeof(WaveChunkHeader), 1, file);
115+ switch (chunk_header.type) {
116+ case WAV_FMT:
117+ fread(&fmt_body, sizeof(WaveFmtBody), 1, file);
118+ /* If the format header is larger, skip the rest */
119+ if (chunk_header.length > sizeof(WaveFmtBody))
120+ fseek(file, chunk_header.length - sizeof(WaveFmtBody), SEEK_CUR);
121+
122+ *num_channels = fmt_body.channels;
123+ *sample_rate = fmt_body.sample_fq;
124+
125+ switch (fmt_body.bit_p_spl) {
126+ case 8:
127+ *format = SND_PCM_FORMAT_U8;
128+ break;
129+ case 16:
130+ *format = SND_PCM_FORMAT_S16_LE;
131+ break;
132+ case 24:
133+ switch (fmt_body.byte_p_spl / fmt_body.channels) {
134+ case 3:
135+ *format = SND_PCM_FORMAT_S24_3LE;
136+ break;
137+ case 4:
138+ *format = SND_PCM_FORMAT_S24_LE;
139+ break;
140+ default:
141+ fprintf(stderr, "format error\n");
142+ return -1;
143+ }
144+ break;
145+ case 32:
146+ if (fmt_body.format == WAV_FMT_PCM) {
147+ *format = SND_PCM_FORMAT_S32_LE;
148+ } else if (fmt_body.format == WAV_FMT_IEEE_FLOAT) {
149+ *format = SND_PCM_FORMAT_FLOAT_LE;
150+ }
151+ break;
152+ default:
153+ fprintf(stderr, "format error\n");
154+ return -1;
155+ }
156+ break;
157+ case WAV_DATA:
158+ /* Stop looking for chunks */
159+ more_chunks = 0;
160+ break;
161+ default:
162+ /* Unknown chunk, skip bytes */
163+ fseek(file, chunk_header.length, SEEK_CUR);
164+ }
165+ } while (more_chunks);
166+
167+ return 0;
168+}
169+
170 static int print_time(struct compress *compress)
171 {
172 unsigned int avail;
173@@ -385,6 +460,35 @@ void get_codec_iec(FILE *file, struct compr_config *config,
174 codec->format = 0;
175 }
176
177+void get_codec_pcm(FILE *file, struct compr_config *config,
178+ struct snd_codec *codec)
179+{
180+ unsigned int channels, rate, format;
181+
182+ if (parse_wav_header(file, &channels, &rate, &format) == -1) {
183+ fclose(file);
184+ exit(EXIT_FAILURE);
185+ }
186+
187+ if (channels > 2 || (format != SND_PCM_FORMAT_S16_LE && format != SND_PCM_FORMAT_S32_LE) ||
188+ rate > 192000) {
189+ fprintf(stderr, "unsupported wave file\n");
190+ fclose(file);
191+ exit(EXIT_FAILURE);
192+ }
193+
194+ codec->id = SND_AUDIOCODEC_PCM;
195+ codec->ch_in = channels;
196+ codec->ch_out = channels;
197+ codec->sample_rate = rate;
198+ codec->bit_rate = 0;
199+ codec->rate_control = 0;
200+ codec->profile = SND_AUDIOPROFILE_PCM;
201+ codec->level = 0;
202+ codec->ch_mode = 0;
203+ codec->format = format;
204+}
205+
206 void play_samples(char *name, unsigned int card, unsigned int device,
207 unsigned long buffer_size, unsigned int frag,
208 unsigned long codec_id)
209@@ -411,6 +515,9 @@ void play_samples(char *name, unsigned int card, unsigned int device,
210 case SND_AUDIOCODEC_IEC61937:
211 get_codec_iec(file, &config, &codec);
212 break;
213+ case SND_AUDIOCODEC_PCM:
214+ get_codec_pcm(file, &config, &codec);
215+ break;
216 default:
217 fprintf(stderr, "codec ID %ld is not supported\n", codec_id);
218 exit(EXIT_FAILURE);
219--
2202.27.0
221
diff --git a/recipes-multimedia/tinycompress/tinycompress/0003-cplay-Add-pause-feature.patch b/recipes-multimedia/tinycompress/tinycompress/0003-cplay-Add-pause-feature.patch
new file mode 100755
index 00000000..7d8492b7
--- /dev/null
+++ b/recipes-multimedia/tinycompress/tinycompress/0003-cplay-Add-pause-feature.patch
@@ -0,0 +1,146 @@
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
new file mode 100755
index 00000000..dfedd186
--- /dev/null
+++ b/recipes-multimedia/tinycompress/tinycompress/0004-tinycompress-pass-NULL-buffer-with-0-size-to-driver.patch
@@ -0,0 +1,40 @@
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
new file mode 100755
index 00000000..2f36551a
--- /dev/null
+++ b/recipes-multimedia/tinycompress/tinycompress/0005-cplay-Support-aac-streams.patch
@@ -0,0 +1,251 @@
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
new file mode 100644
index 00000000..6c0fc72e
--- /dev/null
+++ b/recipes-multimedia/tinycompress/tinycompress_1.1.6.bb
@@ -0,0 +1,16 @@
1DESCRIPTION = "A library to handle compressed formats like MP3 etc."
2LICENSE = "LGPLv2.1 | 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