diff options
Diffstat (limited to 'recipes-multimedia')
86 files changed, 2173 insertions, 1550 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 07f6e098..7d20c678 100644 --- a/recipes-multimedia/alsa/alsa-lib/0001-add-conf-for-multichannel-support-in-imx.patch +++ b/recipes-multimedia/alsa/alsa-lib/0001-add-conf-for-multichannel-support-in-imx.patch @@ -3,7 +3,7 @@ From: Shengjiu Wang <b02247@freescale.com> Date: Thu, 5 Jun 2014 17:37:47 +0800 Subject: [PATCH] add conf for multichannel support in imx -Upstream Status: Inappropriate [platform specific] +Upstream-Status: Inappropriate [platform specific] Signed-off-by: Shengjiu Wang <b02247@freescale.com> diff --git a/recipes-multimedia/alsa/alsa-lib/0001-pcm-rate-fix-the-crash-in-snd_pcm_rate_may_wait_for_.patch b/recipes-multimedia/alsa/alsa-lib/0001-pcm-rate-fix-the-crash-in-snd_pcm_rate_may_wait_for_.patch new file mode 100644 index 00000000..5ec0d2e9 --- /dev/null +++ b/recipes-multimedia/alsa/alsa-lib/0001-pcm-rate-fix-the-crash-in-snd_pcm_rate_may_wait_for_.patch @@ -0,0 +1,41 @@ +From aa4f56c3c952269c36464cc0da9db5a1381648fa Mon Sep 17 00:00:00 2001 +From: Jaroslav Kysela <perex@perex.cz> +Date: Wed, 9 Nov 2022 08:11:42 +0100 +Subject: [PATCH] pcm: rate - fix the crash in + +Upstream-Status: Backport + + snd_pcm_rate_may_wait_for_avail_min() + +The pcm argument passed to the conversion function in +snd_pcm_plugin_may_wait_for_avail_min_conv() should be +pcm->fast_op_arg. + +Test command: arecord -Dplughw:x -r12000 -c2 -fS16_LE -M temp.wav + +Fixes: d9dbb57b ("pcm: rate - rewrite the may_wait_for_avail_min callback for the rate plugin") + +BugLink: https://lore.kernel.org/alsa-devel/1667793912-18957-1-git-send-email-shengjiu.wang@nxp.com/ +Fixes: https://github.com/alsa-project/alsa-lib/issues/282 +Reported-by: Shengjiu Wang <shengjiu.wang@nxp.com> +Signed-off-by: Jaroslav Kysela <perex@perex.cz> +--- + src/pcm/pcm_plugin.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/pcm/pcm_plugin.c b/src/pcm/pcm_plugin.c +index 6bb90b8b..ec64604c 100644 +--- a/src/pcm/pcm_plugin.c ++++ b/src/pcm/pcm_plugin.c +@@ -622,7 +622,7 @@ int snd_pcm_plugin_may_wait_for_avail_min_conv( + * This code is also used by extplug, but extplug does not allow to alter the sampling rate. + */ + if (conv) +- needed_slave_avail_min = conv(pcm, needed_slave_avail_min); ++ needed_slave_avail_min = conv(pcm->fast_op_arg, needed_slave_avail_min); + + if (slave->avail_min != needed_slave_avail_min) { + snd_pcm_sw_params_t *swparams; +-- +2.34.1 + diff --git a/recipes-multimedia/alsa/alsa-lib/0004-pcm-Don-t-store-the-state-for-SND_PCM_STATE_SUSPENDE.patch b/recipes-multimedia/alsa/alsa-lib/0004-pcm-Don-t-store-the-state-for-SND_PCM_STATE_SUSPENDE.patch deleted file mode 100644 index 896d9426..00000000 --- a/recipes-multimedia/alsa/alsa-lib/0004-pcm-Don-t-store-the-state-for-SND_PCM_STATE_SUSPENDE.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 09c1a959e7d007e00741606f69444c1f865a4beb Mon Sep 17 00:00:00 2001 -From: Shengjiu Wang <shengjiu.wang@freescale.com> -Date: Tue, 10 May 2016 15:09:26 +0800 -Subject: [PATCH] pcm: Don't store the state for SND_PCM_STATE_SUSPENDED - -The resume function don't update the dmix->state, if store SUSPENDED -state in snd_pcm_dmix_state, the write function after resume will -return error -ESTRPIPE, because the snd_pcm_write_areas() will check -the state of the pcm device. -This patch remove the store SND_PCM_STATE_SUSPENDED state operation -for dmix,dshare,dsnoop. - -Upstream-Status: Pending - -Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com> - ---- - src/pcm/pcm_dmix.c | 2 +- - src/pcm/pcm_dshare.c | 2 +- - src/pcm/pcm_dsnoop.c | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/pcm/pcm_dmix.c b/src/pcm/pcm_dmix.c -index 608593f..3d068c7 100644 ---- a/src/pcm/pcm_dmix.c -+++ b/src/pcm/pcm_dmix.c -@@ -460,9 +460,9 @@ static snd_pcm_state_t snd_pcm_dmix_state(snd_pcm_t *pcm) - snd_pcm_state_t state; - state = snd_pcm_state(dmix->spcm); - switch (state) { -- case SND_PCM_STATE_SUSPENDED: - case SND_PCM_STATE_DISCONNECTED: - dmix->state = state; -+ case SND_PCM_STATE_SUSPENDED: - return state; - case SND_PCM_STATE_XRUN: - if ((err = snd_pcm_direct_slave_recover(dmix)) < 0) -diff --git a/src/pcm/pcm_dshare.c b/src/pcm/pcm_dshare.c -index a918512..18071fb 100644 ---- a/src/pcm/pcm_dshare.c -+++ b/src/pcm/pcm_dshare.c -@@ -258,9 +258,9 @@ static snd_pcm_state_t snd_pcm_dshare_state(snd_pcm_t *pcm) - snd_pcm_state_t state; - state = snd_pcm_state(dshare->spcm); - switch (state) { -- case SND_PCM_STATE_SUSPENDED: - case SND_PCM_STATE_DISCONNECTED: - dshare->state = state; -+ case SND_PCM_STATE_SUSPENDED: - return state; - case SND_PCM_STATE_XRUN: - if ((err = snd_pcm_direct_slave_recover(dshare)) < 0) -diff --git a/src/pcm/pcm_dsnoop.c b/src/pcm/pcm_dsnoop.c -index 2c3b9f4..3b711ab 100644 ---- a/src/pcm/pcm_dsnoop.c -+++ b/src/pcm/pcm_dsnoop.c -@@ -209,9 +209,9 @@ static snd_pcm_state_t snd_pcm_dsnoop_state(snd_pcm_t *pcm) - snd_pcm_state_t state; - state = snd_pcm_state(dsnoop->spcm); - switch (state) { -- case SND_PCM_STATE_SUSPENDED: - case SND_PCM_STATE_DISCONNECTED: - dsnoop->state = state; -+ case SND_PCM_STATE_SUSPENDED: - return state; - case SND_PCM_STATE_XRUN: - if ((err = snd_pcm_direct_slave_recover(dsnoop)) < 0) 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 bd1512e9..1f558185 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,25 +1,25 @@ -From cfbe756d55a303803805d3e8e3d3cf3b97866964 Mon Sep 17 00:00:00 2001 +From 36aae65dc913e1ebe72366d7ae361897d465e88d Mon Sep 17 00:00:00 2001 From: Viorel Suman <viorel.suman@nxp.com> Date: Mon, 9 Mar 2020 14:25:46 +0200 Subject: [PATCH] add conf for iMX XCVR sound card -Upstream Status: Pending +Upstream-Status: Pending Signed-off-by: Viorel Suman <viorel.suman@nxp.com> --- - src/conf/cards/IMX-XCVR.conf | 69 ++++++++++++++++++++++++++++++++++++ - src/conf/cards/Makefile.am | 3 +- + src/conf/cards/IMX-XCVR.conf | 39 ++++++++++++++++++++++++++++++++++++ + src/conf/cards/Makefile.am | 3 ++- src/conf/cards/aliases.conf | 1 + - 3 files changed, 72 insertions(+), 1 deletion(-) + 3 files changed, 42 insertions(+), 1 deletion(-) create mode 100755 src/conf/cards/IMX-XCVR.conf diff --git a/src/conf/cards/IMX-XCVR.conf b/src/conf/cards/IMX-XCVR.conf new file mode 100755 -index 0000000..ee323c7 +index 0000000..009000c --- /dev/null +++ b/src/conf/cards/IMX-XCVR.conf -@@ -0,0 +1,69 @@ +@@ -0,0 +1,39 @@ +# +# Configuration for the IMX-XCVR sound card using software IEC958 +# subframe conversion @@ -27,21 +27,10 @@ index 0000000..ee323c7 +IMX-XCVR.pcm.default { + @args [ CARD ] + @args.CARD { type string } -+ type asym -+ playback.pcm { -+ type linear -+ slave.pcm { -+ @func concat -+ strings [ "iec958:" $CARD ] -+ } -+ slave.format S24_LE -+ } -+ capture.pcm { -+ type plug -+ slave.pcm { -+ @func concat -+ strings [ "iec958:" $CARD ] -+ } ++ type plug ++ slave.pcm { ++ @func concat ++ strings [ "iec958:" $CARD ] + } +} + @@ -54,40 +43,21 @@ index 0000000..ee323c7 + @args.AES1 { type integer } + @args.AES2 { type integer } + @args.AES3 { type integer } -+ type asym -+ playback.pcm { -+ type hooks -+ slave.pcm { -+ type hw -+ card $CARD -+ } -+ hooks.0 { -+ type ctl_elems -+ hook_args [ -+ { -+ interface PCM -+ name "IEC958 Playback Default" -+ preserve true -+ optional true -+ value [ $AES0 $AES1 $AES2 $AES3 ] -+ } -+ ] -+ } -+ } -+ capture.pcm { -+ type iec958 -+ slave { -+ format IEC958_SUBFRAME_LE -+ pcm { -+ type plug -+ slave.pcm { -+ type hw -+ card $CARD -+ } ++ type iec958 ++ slave { ++ format IEC958_SUBFRAME_LE ++ pcm { ++ type plug ++ slave.pcm { ++ type hw ++ card $CARD + } + } -+ status [ $AES0 $AES1 $AES2 $AES3 ] + } ++ status [ $AES0 $AES1 $AES2 $AES3 ] ++ preamble.z 0x0 ++ preamble.x 0x1 ++ preamble.y 0x3 +} diff --git a/src/conf/cards/Makefile.am b/src/conf/cards/Makefile.am index 34fa5a3..70b9bab 100644 diff --git a/recipes-multimedia/alsa/alsa-lib/0007-add-conf-for-imx-cs42448-sound-card.patch b/recipes-multimedia/alsa/alsa-lib/0007-add-conf-for-imx-cs42448-sound-card.patch new file mode 100644 index 00000000..64e15be4 --- /dev/null +++ b/recipes-multimedia/alsa/alsa-lib/0007-add-conf-for-imx-cs42448-sound-card.patch @@ -0,0 +1,107 @@ +From 97d5e09a4166b45c567026e51b8a25ef5d7d587d Mon Sep 17 00:00:00 2001
+From: Chancel Liu <chancel.liu@nxp.com>
+Date: Fri, 29 Jul 2022 16:12:37 +0800
+Subject: [PATCH] add conf for imx-cs42448 sound card
+
+Upstream-Status: Inappropriate [i.MXÂ specific]
+
+Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
+---
+ src/conf/cards/CS42448.conf | 58 +++++++++++++++++++++++++++++++++++++
+ src/conf/cards/Makefile.am | 3 +-
+ src/conf/cards/aliases.conf | 1 +
+ 3 files changed, 61 insertions(+), 1 deletion(-)
+ create mode 100644 src/conf/cards/CS42448.conf
+
+diff --git a/src/conf/cards/CS42448.conf b/src/conf/cards/CS42448.conf
+new file mode 100644
+index 00000000..28ba5c48
+--- /dev/null
++++ b/src/conf/cards/CS42448.conf
+@@ -0,0 +1,58 @@
++#
++# Configuration for the CS42448 chip
++#
++
++# default with dmix & dsnoop
++CS42448.pcm.default {
++ @args [ CARD ]
++ @args.CARD {
++ type string
++ }
++ type asym
++ playback.pcm {
++ type plug
++ slave.pcm {
++ @func concat
++ strings [ "dmix:" $CARD ",FORMAT=S32_LE" ]
++ }
++ }
++ capture.pcm {
++ type plug
++ slave.pcm {
++ @func concat
++ strings [ "dsnoop:" $CARD ",FORMAT=S32_LE" ]
++ }
++ }
++}
++
++<confdir:pcm/surround51.conf>
++
++CS42448.pcm.surround51.0 {
++ @args [ CARD ]
++ @args.CARD {
++ type string
++ }
++ type plug
++ slave.pcm {
++ type hw
++ card $CARD
++ }
++ slave.channels 6
++}
++
++<confdir:pcm/surround71.conf>
++
++CS42448.pcm.surround71.0 {
++ @args [ CARD ]
++ @args.CARD {
++ type string
++ }
++ type plug
++ slave.pcm {
++ type hw
++ card $CARD
++ }
++ slave.channels 8
++}
++
++# vim: ft=alsaconf
+diff --git a/src/conf/cards/Makefile.am b/src/conf/cards/Makefile.am
+index 70b9bab3..6aba20b4 100644
+--- a/src/conf/cards/Makefile.am
++++ b/src/conf/cards/Makefile.am
+@@ -62,7 +62,8 @@ cfg_files = aliases.conf \
+ CS42888.conf \
+ IMX-HDMI.conf \
+ AK4458.conf \
+- IMX-XCVR.conf
++ IMX-XCVR.conf \
++ CS42448.conf
+
+ if BUILD_ALISP
+ cfg_files += aliases.alisp
+diff --git a/src/conf/cards/aliases.conf b/src/conf/cards/aliases.conf
+index e824145d..a40d3731 100644
+--- a/src/conf/cards/aliases.conf
++++ b/src/conf/cards/aliases.conf
+@@ -61,6 +61,7 @@ imx-cs42888 cards.CS42888
+ imx-hdmi-soc cards.IMX-HDMI
+ ak4458-audio cards.AK4458
+ imx-audio-xcvr cards.IMX-XCVR
++imx-cs42448 cards.CS42448
+
+ <confdir:ctl/default.conf>
+ <confdir:pcm/default.conf>
+--
+2.17.1
diff --git a/recipes-multimedia/alsa/alsa-lib_%.bbappend b/recipes-multimedia/alsa/alsa-lib_%.bbappend index d76c45d1..65498aed 100644 --- a/recipes-multimedia/alsa/alsa-lib_%.bbappend +++ b/recipes-multimedia/alsa/alsa-lib_%.bbappend @@ -2,10 +2,14 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" IMX_PATCH = " \ file://0001-add-conf-for-multichannel-support-in-imx.patch \ - file://0004-pcm-Don-t-store-the-state-for-SND_PCM_STATE_SUSPENDE.patch \ file://0005-add-ak4458-conf-for-multichannel-support.patch \ file://0006-add-conf-for-iMX-XCVR-sound-card.patch \ + file://0007-add-conf-for-imx-cs42448-sound-card.patch \ + file://0001-pcm-rate-fix-the-crash-in-snd_pcm_rate_may_wait_for_.patch \ " -SRC_URI:append:imx = "${IMX_PATCH}" +SRC_URI:append:imx-nxp-bsp = "${IMX_PATCH}" -PACKAGE_ARCH:imx = "${MACHINE_SOCARCH}" +PACKAGE_ARCH:imx-nxp-bsp = "${MACHINE_SOCARCH}" + +GLIBC_64BIT_TIME_FLAGS = "" +INSANE_SKIP:append = " 32bit-time" diff --git a/recipes-multimedia/alsa/imx-alsa-plugins_1.0.26.bb b/recipes-multimedia/alsa/imx-alsa-plugins_git.bb index 96b6392d..e2acf767 100644 --- a/recipes-multimedia/alsa/imx-alsa-plugins_1.0.26.bb +++ b/recipes-multimedia/alsa/imx-alsa-plugins_git.bb @@ -1,9 +1,9 @@ -# Copyright (C) 2013-2016 Freescale Semiconductor -# Copyright (C) 2017-2019 NXP +# Copyright 2013-2016 Freescale Semiconductor +# Copyright 2017-2023 NXP # Released under the MIT license (see COPYING.MIT for the terms) DESCRIPTION = "Freescale alsa-lib plugins" -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" SECTION = "multimedia" DEPENDS = "alsa-lib" @@ -13,13 +13,15 @@ RREPLACES:${PN} = "fsl-alsa-plugins" RPROVIDES:${PN} = "fsl-alsa-plugins" RCONFLICTS:${PN} = "fsl-alsa-plugins" -LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=94d55d512a9ba36caa9b7df079bae19f" +LIC_FILES_CHKSUM = "file://LICENSE;md5=94d55d512a9ba36caa9b7df079bae19f" inherit autotools pkgconfig use-imx-headers -SRCBRANCH = "MM_04.05.01_1909_L4.19.35" -SRC_URI = "git://source.codeaurora.org/external/imx/imx-alsa-plugins.git;protocol=https;branch=${SRCBRANCH}" -SRCREV = "cde60d68ab2acee913dbfacb8aabb53d87dd3e38" +PV = "1.0.26+${SRCPV}" + +SRC_URI = "git://github.com/nxp-imx/imx-alsa-plugins.git;protocol=https;branch=${SRCBRANCH}" +SRCBRANCH = "MM_04.08.03_2312_L6.6.y" +SRCREV = "b2ba082e70333f187972ee4e85f63f9d2f608331" S = "${WORKDIR}/git" @@ -27,10 +29,16 @@ INCLUDE_DIR = "-I${STAGING_INCDIR_IMX}" EXTRA_OECONF = "CFLAGS="${INCLUDE_DIR}"" +PACKAGECONFIG ??= "${PACKAGECONFIG_SWPDM}" +PACKAGECONFIG_SWPDM = "" +PACKAGECONFIG_SWPDM:mx8-nxp-bsp = "swpdm" + +PACKAGECONFIG[swpdm] = "--enable-swpdm,--disable-swpdm,imx-sw-pdm" + INSANE_SKIP:${PN} = "dev-so" FILES:${PN} += "${libdir}/alsa-lib/libasound_*.so" FILES:${PN}-dbg += "${libdir}/alsa-lib/.debug" FILES:${PN}-dev += "${libdir}/alsa-lib/*.la" -COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" +COMPATIBLE_MACHINE = "(imx-nxp-bsp)" diff --git a/recipes-multimedia/ffmpeg/ffmpeg/0001-libavutil-include-assembly-with-full-path-from-sourc.patch b/recipes-multimedia/ffmpeg/ffmpeg/0001-libavutil-include-assembly-with-full-path-from-sourc.patch new file mode 100644 index 00000000..2b4ca0e9 --- /dev/null +++ b/recipes-multimedia/ffmpeg/ffmpeg/0001-libavutil-include-assembly-with-full-path-from-sourc.patch @@ -0,0 +1,97 @@ +From 24a58d70cbb3997e471366bd5afe54be9007bfb1 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Tue, 10 Nov 2020 15:32:14 +0000 +Subject: [PATCH] libavutil: include assembly with full path from source root + +Otherwise nasm writes the full host-specific paths into .o +output, which breaks binary reproducibility. + +Upstream-Status: Submitted [by email to jamrial@gmail.com,ffmpeg-devel@ffmpeg.org] +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + libavutil/x86/cpuid.asm | 2 +- + libavutil/x86/emms.asm | 2 +- + libavutil/x86/fixed_dsp.asm | 2 +- + libavutil/x86/float_dsp.asm | 2 +- + libavutil/x86/lls.asm | 2 +- + libavutil/x86/pixelutils.asm | 2 +- + 6 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/libavutil/x86/cpuid.asm b/libavutil/x86/cpuid.asm +index c3f7866..766f77f 100644 +--- a/libavutil/x86/cpuid.asm ++++ b/libavutil/x86/cpuid.asm +@@ -21,7 +21,7 @@ + ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + ;****************************************************************************** + +-%include "x86util.asm" ++%include "libavutil/x86/x86util.asm" + + SECTION .text + +diff --git a/libavutil/x86/emms.asm b/libavutil/x86/emms.asm +index 8611762..df84f22 100644 +--- a/libavutil/x86/emms.asm ++++ b/libavutil/x86/emms.asm +@@ -18,7 +18,7 @@ + ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + ;****************************************************************************** + +-%include "x86util.asm" ++%include "libavutil/x86/x86util.asm" + + SECTION .text + +diff --git a/libavutil/x86/fixed_dsp.asm b/libavutil/x86/fixed_dsp.asm +index 979dd5c..2f41185 100644 +--- a/libavutil/x86/fixed_dsp.asm ++++ b/libavutil/x86/fixed_dsp.asm +@@ -20,7 +20,7 @@ + ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + ;****************************************************************************** + +-%include "x86util.asm" ++%include "libavutil/x86/x86util.asm" + + SECTION .text + +diff --git a/libavutil/x86/float_dsp.asm b/libavutil/x86/float_dsp.asm +index 517fd63..b773e61 100644 +--- a/libavutil/x86/float_dsp.asm ++++ b/libavutil/x86/float_dsp.asm +@@ -20,7 +20,7 @@ + ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + ;****************************************************************************** + +-%include "x86util.asm" ++%include "libavutil/x86/x86util.asm" + + SECTION_RODATA 32 + pd_reverse: dd 7, 6, 5, 4, 3, 2, 1, 0 +diff --git a/libavutil/x86/lls.asm b/libavutil/x86/lls.asm +index 317fba6..d2526d1 100644 +--- a/libavutil/x86/lls.asm ++++ b/libavutil/x86/lls.asm +@@ -20,7 +20,7 @@ + ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + ;****************************************************************************** + +-%include "x86util.asm" ++%include "libavutil/x86/x86util.asm" + + SECTION .text + +diff --git a/libavutil/x86/pixelutils.asm b/libavutil/x86/pixelutils.asm +index 36c57c5..8b45ead 100644 +--- a/libavutil/x86/pixelutils.asm ++++ b/libavutil/x86/pixelutils.asm +@@ -21,7 +21,7 @@ + ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + ;****************************************************************************** + +-%include "x86util.asm" ++%include "libavutil/x86/x86util.asm" + + SECTION .text + diff --git a/recipes-multimedia/ffmpeg/ffmpeg_4.4.1.bb b/recipes-multimedia/ffmpeg/ffmpeg_4.4.1.bb new file mode 100644 index 00000000..5b1dedcd --- /dev/null +++ b/recipes-multimedia/ffmpeg/ffmpeg_4.4.1.bb @@ -0,0 +1,185 @@ +SUMMARY = "A complete, cross-platform solution to record, convert and stream audio and video." +DESCRIPTION = "FFmpeg is the leading multimedia framework, able to decode, encode, transcode, \ + mux, demux, stream, filter and play pretty much anything that humans and machines \ + have created. It supports the most obscure ancient formats up to the cutting edge." +HOMEPAGE = "https://www.ffmpeg.org/" +SECTION = "libs" + +LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later & ISC & MIT & BSD-2-Clause & BSD-3-Clause & IJG" +LICENSE:${PN} = "GPL-2.0-or-later" +LICENSE:libavcodec = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" +LICENSE:libavdevice = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" +LICENSE:libavfilter = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" +LICENSE:libavformat = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" +LICENSE:libavresample = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" +LICENSE:libavutil = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" +LICENSE:libpostproc = "GPL-2.0-or-later" +LICENSE:libswresample = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" +LICENSE:libswscale = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" +LICENSE_FLAGS = "commercial" + +LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \ + file://COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \ + file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02" + +SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \ + file://0001-libavutil-include-assembly-with-full-path-from-sourc.patch \ + " +SRC_URI[sha256sum] = "eadbad9e9ab30b25f5520fbfde99fae4a92a1ae3c0257a8d68569a4651e30e02" + +# Build fails when thumb is enabled: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717 +ARM_INSTRUCTION_SET:armv4 = "arm" +ARM_INSTRUCTION_SET:armv5 = "arm" +ARM_INSTRUCTION_SET:armv6 = "arm" + +# Should be API compatible with libav (which was a fork of ffmpeg) +# libpostproc was previously packaged from a separate recipe +PROVIDES = "libav libpostproc" + +DEPENDS = "nasm-native" + +inherit autotools pkgconfig + +PACKAGECONFIG ??= "avdevice avfilter avcodec avformat swresample swscale postproc avresample \ + alsa bzlib lzma pic pthreads shared theora zlib \ + ${@bb.utils.contains('AVAILTUNES', 'mips32r2', 'mips32r2', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xv xcb', '', d)}" + +# libraries to build in addition to avutil +PACKAGECONFIG[avdevice] = "--enable-avdevice,--disable-avdevice" +PACKAGECONFIG[avfilter] = "--enable-avfilter,--disable-avfilter" +PACKAGECONFIG[avcodec] = "--enable-avcodec,--disable-avcodec" +PACKAGECONFIG[avformat] = "--enable-avformat,--disable-avformat" +PACKAGECONFIG[swresample] = "--enable-swresample,--disable-swresample" +PACKAGECONFIG[swscale] = "--enable-swscale,--disable-swscale" +PACKAGECONFIG[postproc] = "--enable-postproc,--disable-postproc" +PACKAGECONFIG[avresample] = "--enable-avresample,--disable-avresample" + +# features to support +PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib" +PACKAGECONFIG[altivec] = "--enable-altivec,--disable-altivec," +PACKAGECONFIG[bzlib] = "--enable-bzlib,--disable-bzlib,bzip2" +PACKAGECONFIG[fdk-aac] = "--enable-libfdk-aac --enable-nonfree,--disable-libfdk-aac,fdk-aac" +PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl" +PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm" +PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack" +PACKAGECONFIG[libopus] = "--enable-libopus,--disable-libopus,libopus" +PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis" +PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz" +PACKAGECONFIG[mfx] = "--enable-libmfx,--disable-libmfx,intel-mediasdk" +PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame" +PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl" +PACKAGECONFIG[sdl2] = "--enable-sdl2,--disable-sdl2,virtual/libsdl2" +PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex" +PACKAGECONFIG[srt] = "--enable-libsrt,--disable-libsrt,srt" +PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora libogg" +PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva" +PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau" +PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx" +PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264" +PACKAGECONFIG[x265] = "--enable-libx265,--disable-libx265,x265" +PACKAGECONFIG[xcb] = "--enable-libxcb,--disable-libxcb,libxcb" +PACKAGECONFIG[xv] = "--enable-outdev=xv,--disable-outdev=xv,libxv" +PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib" + +# other configuration options +PACKAGECONFIG[mips32r2] = ",--disable-mipsdsp --disable-mipsdspr2" +PACKAGECONFIG[pic] = "--enable-pic" +PACKAGECONFIG[pthreads] = "--enable-pthreads,--disable-pthreads" +PACKAGECONFIG[shared] = "--enable-shared" +PACKAGECONFIG[strip] = ",--disable-stripping" + +# Check codecs that require --enable-nonfree +USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'openssl' ], 'yes', '', d)}" + +def cpu(d): + for arg in (d.getVar('TUNE_CCARGS') or '').split(): + if arg.startswith('-mcpu='): + return arg[6:] + return 'generic' + +EXTRA_OECONF = " \ + ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \ + \ + --cross-prefix=${TARGET_PREFIX} \ + \ + --ld='${CCLD}' \ + --cc='${CC}' \ + --cxx='${CXX}' \ + --arch=${TARGET_ARCH} \ + --target-os='linux' \ + --enable-cross-compile \ + --extra-cflags='${CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}' \ + --extra-ldflags='${LDFLAGS}' \ + --sysroot='${STAGING_DIR_TARGET}' \ + ${EXTRA_FFCONF} \ + --libdir=${libdir} \ + --shlibdir=${libdir} \ + --datadir=${datadir}/ffmpeg \ + --cpu=${@cpu(d)} \ + --pkg-config=pkg-config \ +" + +EXTRA_OECONF:append:linux-gnux32 = " --disable-asm" + +EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa64r6', '--disable-mips64r2 --disable-mips32r2', '', d)}" +EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa64r2', '--disable-mips64r6 --disable-mips32r6', '', d)}" +EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mips32r2', '--disable-mips64r6 --disable-mips32r6', '', d)}" +EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mips32r6', '--disable-mips64r2 --disable-mips32r2', '', d)}" +EXTRA_OECONF:append:mips = " --extra-libs=-latomic --disable-mips32r5 --disable-mipsdsp --disable-mipsdspr2 \ + --disable-loongson2 --disable-loongson3 --disable-mmi --disable-msa --disable-msa2" +EXTRA_OECONF:append:riscv32 = " --extra-libs=-latomic" +EXTRA_OECONF:append:armv5 = " --extra-libs=-latomic" +EXTRA_OECONF:append:powerpc = " --extra-libs=-latomic" + +# gold crashes on x86, another solution is to --disable-asm but thats more hacky +# ld.gold: internal error in relocate_section, at ../../gold/i386.cc:3684 + +LDFLAGS:append:x86 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}" + +EXTRA_OEMAKE = "V=1" + +do_configure() { + ${S}/configure ${EXTRA_OECONF} +} + +# patch out build host paths for reproducibility +do_compile:prepend:class-target() { + sed -i -e "s,${WORKDIR},,g" ${B}/config.h +} + +PACKAGES =+ "libavcodec \ + libavdevice \ + libavfilter \ + libavformat \ + libavresample \ + libavutil \ + libpostproc \ + libswresample \ + libswscale" + +FILES:libavcodec = "${libdir}/libavcodec${SOLIBS}" +FILES:libavdevice = "${libdir}/libavdevice${SOLIBS}" +FILES:libavfilter = "${libdir}/libavfilter${SOLIBS}" +FILES:libavformat = "${libdir}/libavformat${SOLIBS}" +FILES:libavresample = "${libdir}/libavresample${SOLIBS}" +FILES:libavutil = "${libdir}/libavutil${SOLIBS}" +FILES:libpostproc = "${libdir}/libpostproc${SOLIBS}" +FILES:libswresample = "${libdir}/libswresample${SOLIBS}" +FILES:libswscale = "${libdir}/libswscale${SOLIBS}" + +# ffmpeg disables PIC on some platforms (e.g. x86-32) +INSANE_SKIP:${MLPREFIX}libavcodec = "textrel" +INSANE_SKIP:${MLPREFIX}libavdevice = "textrel" +INSANE_SKIP:${MLPREFIX}libavfilter = "textrel" +INSANE_SKIP:${MLPREFIX}libavformat = "textrel" +INSANE_SKIP:${MLPREFIX}libavutil = "textrel" +INSANE_SKIP:${MLPREFIX}libavresample = "textrel" +INSANE_SKIP:${MLPREFIX}libswscale = "textrel" +INSANE_SKIP:${MLPREFIX}libswresample = "textrel" +INSANE_SKIP:${MLPREFIX}libpostproc = "textrel" + +# Downgrade for NXP BSP +DEFAULT_PREFERENCE = "-1" +COMPATIBLE_MACHINE = "(imx-nxp-bsp)" diff --git a/recipes-multimedia/gstreamer/gst-devtools/0001-connect-has-a-different-signature-on-musl.patch b/recipes-multimedia/gstreamer/gst-devtools/0001-connect-has-a-different-signature-on-musl.patch new file mode 100644 index 00000000..c0e45813 --- /dev/null +++ b/recipes-multimedia/gstreamer/gst-devtools/0001-connect-has-a-different-signature-on-musl.patch @@ -0,0 +1,38 @@ +From 73b1002eda17451db1f58431b42c25203f1d3097 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 9 Sep 2018 17:38:10 -0700 +Subject: [PATCH] connect has a different signature on musl + +On linux when not using glibc and using musl for C library, connect +API has a different signature, this patch fixes this so it can compile +on musl, the functionality should remain same as it is immediately +typcasted to struct sockaddr_in* type inside the function before use + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + validate/plugins/fault_injection/socket_interposer.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/validate/plugins/fault_injection/socket_interposer.c b/validate/plugins/fault_injection/socket_interposer.c +index 53c1ebb..ad7adf8 100644 +--- a/validate/plugins/fault_injection/socket_interposer.c ++++ b/validate/plugins/fault_injection/socket_interposer.c +@@ -100,10 +100,15 @@ socket_interposer_set_callback (struct sockaddr_in *addrin, + } + + int +-connect (int socket, const struct sockaddr_in *addrin, socklen_t address_len) ++#if defined(__linux__) && !defined(__GLIBC__) ++connect (int socket, const struct sockaddr *addr, socklen_t address_len) ++#else ++connect (int socket, const struct sockaddr_in *addr, socklen_t address_len) ++#endif + { + size_t i; + int override_errno = 0; ++ struct sockaddr_in* addrin = (struct sockaddr_in*)addr; + typedef ssize_t (*real_connect_fn) (int, const struct sockaddr_in *, + socklen_t); + static real_connect_fn real_connect = 0; diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-Disable-yasm-for-libav-when-disable-yasm.patch b/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-Disable-yasm-for-libav-when-disable-yasm.patch deleted file mode 100644 index 1d99ad12..00000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-Disable-yasm-for-libav-when-disable-yasm.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 54bba228ea52d01fd84941d97be23c03f9862b64 Mon Sep 17 00:00:00 2001 -From: Carlos Rafael Giani <dv@pseudoterminal.org> -Date: Sat, 6 Apr 2013 01:22:22 +0200 -Subject: [PATCH] Disable yasm for libav when --disable-yasm - -Upstream-Status: Inappropriate [configuration] - -Signed-off-by: Shane Wang <shane.wang@intel.com> -Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org> ---- - configure.ac | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/configure.ac b/configure.ac -index 22ede88..ef3c050 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -305,6 +305,12 @@ else - emblibav_configure_args="$emblibav_configure_args --enable-gpl" - fi - -+ AC_ARG_ENABLE(yasm, -+ [AC_HELP_STRING([--disable-yasm], [disable use of yasm assembler])]) -+ if test "x$enable_yasm" = "xno"; then -+ emblibav_configure_args="$emblibav_configure_args --disable-yasm" -+ fi -+ - # if we are cross-compiling, tell libav so - case $host in - *android*) --- -1.8.2 - diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-configure-check-for-armv7ve-variant.patch b/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-configure-check-for-armv7ve-variant.patch deleted file mode 100644 index b80d0739..00000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-configure-check-for-armv7ve-variant.patch +++ /dev/null @@ -1,35 +0,0 @@ -From aac5902d3c9cb35c771e760d0e487622aa2e116a Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Thu, 20 Apr 2017 10:38:18 -0700 -Subject: [PATCH] configure: check for armv7ve variant - -OE passes -mcpu and -march via cmdline and if -package tries to detect one of it own then it -should be compatible otherwise, newer gcc7+ will -error out - -Check for relevant preprocessor macro to determine -armv7ve architecture - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - gst-libs/ext/libav/configure | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/gst-libs/ext/libav/configure b/gst-libs/ext/libav/configure -index 4a5e477..727818e 100755 ---- a/gst-libs/ext/libav/configure -+++ b/gst-libs/ext/libav/configure -@@ -4295,6 +4295,7 @@ elif enabled arm; then - elif check_arm_arch 6Z; then echo armv6z - elif check_arm_arch 6ZK; then echo armv6zk - elif check_arm_arch 6T2; then echo armv6t2 -+ elif check_arm_arch EXT_IDIV; then echo armv7ve - elif check_arm_arch 7; then echo armv7 - elif check_arm_arch 7A 7_A; then echo armv7-a - elif check_arm_arch 7S; then echo armv7-a --- -2.12.2 - diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-fix-host-contamination.patch b/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-fix-host-contamination.patch deleted file mode 100644 index 120c0798..00000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-fix-host-contamination.patch +++ /dev/null @@ -1,36 +0,0 @@ -From c1700f867f876ee33c130a8e28b688e2b1d89663 Mon Sep 17 00:00:00 2001 -From: Anuj Mittal <anuj.mittal@intel.com> -Date: Wed, 11 Apr 2018 17:14:55 +0800 -Subject: [PATCH] Prevent host contamination - -Remove reference to host $(libdir) from .la files. - -Upstream-Status: Inappropriate [cross-compile specific] - -Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> ---- - gst-libs/ext/Makefile.am | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/gst-libs/ext/Makefile.am b/gst-libs/ext/Makefile.am -index 6cdc048..a19d255 100644 ---- a/gst-libs/ext/Makefile.am -+++ b/gst-libs/ext/Makefile.am -@@ -49,7 +49,7 @@ echo " GEN $1.la" && \ - echo "library_names=''" && \ - echo "old_library='$1.a'" && \ - echo "inherited_linker_flags=''" && \ -- echo "dependency_libs=' -L$(libdir) $(if $2,$(foreach dep,$2,$(abs_builddir)/$(dep).la)) $(call find_library_la,$3 $(LIBM),$(LDFLAGS)) '" && \ -+ echo "dependency_libs=' -L $(if $2,$(foreach dep,$2,$(abs_builddir)/$(dep).la)) $(call find_library_la,$3 $(LIBM),$(LDFLAGS)) '" && \ - echo "weak_library_names=''" && \ - echo "current=" && \ - echo "age=" && \ -@@ -58,7 +58,7 @@ echo " GEN $1.la" && \ - echo "shouldnotlink=no" && \ - echo "dlopen=''" && \ - echo "dlpreopen=''" && \ -- echo "libdir='$(libdir)'") > $1.la -+ echo "libdir=''") > $1.la - endef - - libavutil.la: diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-libav/ffmpeg-6.0.patch b/recipes-multimedia/gstreamer/gstreamer1.0-libav/ffmpeg-6.0.patch new file mode 100644 index 00000000..0a06540f --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0-libav/ffmpeg-6.0.patch @@ -0,0 +1,49 @@ +From cde31d23c071ee93fae96331805f696856084254 Mon Sep 17 00:00:00 2001 +From: "U. Artie Eoff" <ullysses.a.eoff@intel.com> +Date: Mon, 13 Feb 2023 17:02:01 -0500 +Subject: [PATCH] avviddec: change + AV_CODEC_CAP_AUTO_THREADS->AV_CODEC_CAP_OTHER_THREADS + +This fixes a compile error with recent upstream FFmpeg. + +The AV_CODEC_CAP_AUTO_THREADS was deprecated and renamed to +AV_CODEC_CAP_OTHER_THREADS in FFmpeg upstream commit +7d09579190de (lavc 58.132.100). + +The AV_CODEC_CAP_AUTO_THREADS was finally removed in FFmpeg upstream +commit 10c9a0874cb3 (lavc 59.63.100). + +Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3964> + +Upstream-Status: Backport [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/commit/cde31d23c071ee93fae96331805f696856084254?merge_request_iid=3964] +Signed-off-by: Alexander Kanavin <alex@linutronix.de> +--- + ext/libav/gstavviddec.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/ext/libav/gstavviddec.c b/ext/libav/gstavviddec.c +index 43cea456ae8..6d7c4cd0de8 100644 +--- a/ext/libav/gstavviddec.c ++++ b/ext/libav/gstavviddec.c +@@ -35,6 +35,10 @@ + + GST_DEBUG_CATEGORY_STATIC (GST_CAT_PERFORMANCE); + ++#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58,132,100) ++#define AV_CODEC_CAP_OTHER_THREADS AV_CODEC_CAP_AUTO_THREADS ++#endif ++ + #define GST_FFMPEG_VIDEO_CODEC_FRAME_FLAG_ALLOCATED (1<<15) + + #define MAX_TS_MASK 0xff +@@ -615,7 +619,7 @@ gst_ffmpegviddec_set_format (GstVideoDecoder * decoder, + if (ffmpegdec->max_threads == 0) { + /* When thread type is FF_THREAD_FRAME, extra latency is introduced equal + * to one frame per thread. We thus need to calculate the thread count ourselves */ +- if ((!(oclass->in_plugin->capabilities & AV_CODEC_CAP_AUTO_THREADS)) || ++ if ((!(oclass->in_plugin->capabilities & AV_CODEC_CAP_OTHER_THREADS)) || + (ffmpegdec->context->thread_type & FF_THREAD_FRAME)) + ffmpegdec->context->thread_count = + MIN (gst_ffmpeg_auto_max_threads (), 16); +-- +GitLab diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-libav/mips64_cpu_detection.patch b/recipes-multimedia/gstreamer/gstreamer1.0-libav/mips64_cpu_detection.patch deleted file mode 100644 index 7a0b4488..00000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0-libav/mips64_cpu_detection.patch +++ /dev/null @@ -1,32 +0,0 @@ -It will add -mips64r6 and -mips64r2 to cmdline which will -cause conflicts - -in OE we user mips32r2 and mips64r2 for mips arch versions -so there is no benefit of detecting it automatically by -poking at tools especially in cross env - -Fixes errors like - -linking -mnan=2008 module with previous -mnan=legacy modules -failed to merge target specific data of file - --Khem -Upstream-Status: Inappropriate [OE-Specific] - -Index: gst-libav-1.10.1/gst-libs/ext/libav/configure -=================================================================== ---- gst-libav-1.10.1.orig/gst-libs/ext/libav/configure -+++ gst-libav-1.10.1/gst-libs/ext/libav/configure -@@ -5269,12 +5269,9 @@ elif enabled mips; then - - # Enable minimum ISA based on selected options - if enabled mips64; then -- enabled mips64r6 && check_inline_asm_flags mips64r6 '"dlsa $0, $0, $0, 1"' '-mips64r6' - enabled mips64r2 && check_inline_asm_flags mips64r2 '"dext $0, $0, 0, 1"' '-mips64r2' - disabled mips64r6 && disabled mips64r2 && check_inline_asm_flags mips64r1 '"daddi $0, $0, 0"' '-mips64' - else -- enabled mips32r6 && check_inline_asm_flags mips32r6 '"aui $0, $0, 0"' '-mips32r6' -- enabled mips32r5 && check_inline_asm_flags mips32r5 '"eretnc"' '-mips32r5' - enabled mips32r2 && check_inline_asm_flags mips32r2 '"ext $0, $0, 0, 1"' '-mips32r2' - disabled mips32r6 && disabled mips32r5 && disabled mips32r2 && check_inline_asm_flags mips32r1 '"addi $0, $0, 0"' '-mips32' - fi diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-libav/workaround-to-build-gst-libav-for-i586-with-gcc.patch b/recipes-multimedia/gstreamer/gstreamer1.0-libav/workaround-to-build-gst-libav-for-i586-with-gcc.patch deleted file mode 100644 index 36abf860..00000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0-libav/workaround-to-build-gst-libav-for-i586-with-gcc.patch +++ /dev/null @@ -1,26 +0,0 @@ -Description: Workaround to build libav for i586 with gcc 4.9.2 by avoiding memset -Author: Bernhard Übelacker <bernhardu@vr-web.de> - ---- -Bug-Debian: https://bugs.debian.org/783082 -Last-Update: 2015-04-28 - -Upstream-Status: Backport [debian] - -Signed-off-by: Robert Yang <liezhi.yang@windriver.com> - ---- gst-libav-1.4.5.orig/gst-libs/ext/libav/libavcodec/h264_cabac.c -+++ gst-libav-1.4.5/gst-libs/ext/libav/libavcodec/h264_cabac.c -@@ -2020,7 +2020,11 @@ decode_intra_mb: - // In deblocking, the quantizer is 0 - h->cur_pic.qscale_table[mb_xy] = 0; - // All coeffs are present -- memset(h->non_zero_count[mb_xy], 16, 48); -+ /*memset(h->non_zero_count[mb_xy], 16, 48);*/ -+ /* avoiding this memset because it leads at least with gcc4.9.2 to error: 'asm' operand has impossible constraints */ -+ for (size_t i = 0; i < 48; i++) { -+ ( (unsigned char*)(h->non_zero_count[mb_xy]) ) [i] = 16; -+ } - h->cur_pic.mb_type[mb_xy] = mb_type; - sl->last_qscale_diff = 0; - return 0; diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.18.0.bb b/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.18.0.bb deleted file mode 100644 index 1a076c2e..00000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.18.0.bb +++ /dev/null @@ -1,24 +0,0 @@ -SUMMARY = "Libav-based GStreamer 1.x plugin" -DESCRIPTION = "Contains a GStreamer plugin for using the encoders, decoders, \ -muxers, and demuxers provided by FFmpeg." -HOMEPAGE = "http://gstreamer.freedesktop.org/" -SECTION = "multimedia" - -# ffmpeg has comercial license flags so add it as we need ffmpeg as a dependency -LICENSE_FLAGS = "commercial" -LICENSE = "LGPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \ - file://ext/libav/gstav.h;beginline=1;endline=18;md5=a752c35267d8276fd9ca3db6994fca9c \ - " - -SRC_URI = "https://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${PV}.tar.xz" -SRC_URI[sha256sum] = "42f93f5ce9a3fc22051e5f783a4574b56ebf213f331f75dcbc3552459bd3a06a" - -S = "${WORKDIR}/gst-libav-${PV}" - -DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base ffmpeg" - -inherit meson pkgconfig upstream-version-is-even - -FILES:${PN} += "${libdir}/gstreamer-1.0/*.so" -FILES:${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a" diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-omx_%.bbappend b/recipes-multimedia/gstreamer/gstreamer1.0-omx_%.bbappend new file mode 100644 index 00000000..18847603 --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0-omx_%.bbappend @@ -0,0 +1 @@ +EXTRA_OEMESON:append:imx-nxp-bsp = " -Dtests=disabled -Dexamples=disabled" diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-ext-wayland-fix-meson-build-in-nxp-fork.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-ext-wayland-fix-meson-build-in-nxp-fork.patch deleted file mode 100644 index 5e6a1c05..00000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-ext-wayland-fix-meson-build-in-nxp-fork.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 9e092d8976db034a2d6848d738c4f73cc001fd09 Mon Sep 17 00:00:00 2001 -From: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com> -Date: Sun, 26 Jan 2020 10:45:28 +0000 -Subject: [PATCH] ext/wayland: fix meson build in nxp fork - -- Add Wayland protocols, which are not enabled in upstream -- Add missing compilation unit, which in NXP-specific - -Upstream-Status: Pending - -Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com> - ---- - ext/wayland/meson.build | 24 ++++++++++++++++++++++++ - 1 file changed, 24 insertions(+) - -diff --git a/ext/wayland/meson.build b/ext/wayland/meson.build -index 3c377eefb..98a7cb76f 100644 ---- a/ext/wayland/meson.build -+++ b/ext/wayland/meson.build -@@ -10,6 +10,11 @@ wl_sources = [ - - libdrm_dep = dependency('libdrm', version: '>= 2.4.55', required:get_option('wayland')) - -+imx_wl_sources = [ -+ 'wlutils.c', -+] -+wl_sources += imx_wl_sources -+ - if use_wayland - protocols_datadir = wl_protocol_dep.get_pkgconfig_variable('pkgdatadir') - -@@ -21,6 +26,25 @@ if use_wayland - 'fullscreen-shell-unstable-v1-protocol.c', 'fullscreen-shell-unstable-v1-client-protocol.h'], - ['/stable/xdg-shell/xdg-shell.xml', 'xdg-shell-protocol.c', 'xdg-shell-client-protocol.h'], - ] -+ -+ imx_protocol_defs = [ -+ [ -+ '/unstable/alpha-compositing/alpha-compositing-unstable-v1.xml', -+ 'alpha-compositing-unstable-v1-protocol.c', -+ 'alpha-compositing-unstable-v1-client-protocol.h' -+ ], -+ ['/unstable/hdr10-metadata/hdr10-metadata-unstable-v1.xml', -+ 'hdr10-metadata-unstable-v1-protocol.c', -+ 'hdr10-metadata-unstable-v1-client-protocol.h' -+ ], -+ [ -+ '/unstable/linux-explicit-synchronization/linux-explicit-synchronization-unstable-v1.xml', -+ 'linux-explicit-synchronization-unstable-v1-protocol.c', -+ 'linux-explicit-synchronization-unstable-v1-client-protocol.h' -+ ], -+ ] -+ protocol_defs += imx_protocol_defs -+ - protocols_files = [] - - foreach protodef: protocol_defs diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch deleted file mode 100644 index 4f9041dc..00000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 69cff1595f9e0014c582c6f540d69d86d5e824ff Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim@centricular.com> -Date: Fri, 18 Oct 2019 00:39:12 +0100 -Subject: [PATCH] meson: build gir even when cross-compiling if introspection - was enabled explicitly - -This can be made to work in certain circumstances when -cross-compiling, so default to not building g-i stuff -when cross-compiling, but allow it if introspection was -enabled explicitly via -Dintrospection=enabled. - -See gstreamer/gstreamer#454 and gstreamer/gstreamer#381. - -Upstream-Status: Backport [97a4d0cd7de8cfbf983acc7e37ba2f8fb73c3e19] - -Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org> - ---- - meson.build | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/meson.build b/meson.build -index 2b492faea..bea89b23d 100644 ---- a/meson.build -+++ b/meson.build -@@ -405,7 +405,7 @@ python3 = import('python').find_installation() - - gir = find_program('g-ir-scanner', required : get_option('introspection')) - gnome = import('gnome') --build_gir = gir.found() and not meson.is_cross_build() -+build_gir = gir.found() and (not meson.is_cross_build() or get_option('introspection').enabled()) - gir_init_section = [ '--add-init-section=extern void gst_init(gint*,gchar**);' + \ - 'g_setenv("GST_REGISTRY_1.0", "@0@", TRUE);'.format(meson.current_build_dir() + '/gir_empty_registry.reg') + \ - 'g_setenv("GST_PLUGIN_PATH_1_0", "", TRUE);' + \ diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-opencv-allow-compilation-against-4.4.x.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-opencv-allow-compilation-against-4.4.x.patch deleted file mode 100644 index 525f4a45..00000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-opencv-allow-compilation-against-4.4.x.patch +++ /dev/null @@ -1,27 +0,0 @@ -From a4df38174d33dc1e620ea535e16cac406ff59da2 Mon Sep 17 00:00:00 2001 -From: Nicola Murino <nicola.murino@gmail.com> -Date: Fri, 31 Jul 2020 23:38:56 +0200 -Subject: [PATCH] opencv: allow compilation against 4.4.x - -Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1482> - -Upstream-Status: Backport [https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/commit/8544f3928ea46d2da3f27dc65576e8baf42a46d] -Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com> - ---- - ext/opencv/meson.build | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/ext/opencv/meson.build b/ext/opencv/meson.build -index a26403482..b3270e540 100644 ---- a/ext/opencv/meson.build -+++ b/ext/opencv/meson.build -@@ -65,7 +65,7 @@ if opencv_found - endif - endforeach - else -- opencv_dep = dependency('opencv4', version : ['>= 4.0.0', '< 4.2.0'], required : false) -+ opencv_dep = dependency('opencv4', version : ['>= 4.0.0', '< 4.5.0'], required : false) - opencv_found = opencv_dep.found() - if opencv_found - foreach h : libopencv4_headers diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-vulkan-Drop-use-of-VK_RESULT_BEGIN_RANGE.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-vulkan-Drop-use-of-VK_RESULT_BEGIN_RANGE.patch deleted file mode 100644 index 5b8e0159..00000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-vulkan-Drop-use-of-VK_RESULT_BEGIN_RANGE.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 54c700f9721ef218188803b48acae46e885626ee Mon Sep 17 00:00:00 2001 -From: "Jan Alexander Steffens (heftig)" <jan.steffens@ltnglobal.com> -Date: Sat, 9 May 2020 19:59:46 +0200 -Subject: [PATCH] vulkan: Drop use of VK_RESULT_BEGIN_RANGE - -This was removed in Vulkan 1.2.140. - -> Shortly after 2020-04-24, we will be removing the automatically -> generated `VK_*_BEGIN_RANGE`, `VK_*_END_RANGE`, and `VK_*_RANGE_SIZE` -> tokens from the Vulkan headers. These tokens are currently defined for -> some enumerated types, but are explicitly not part of the Vulkan API. -> They existed only to support some Vulkan implementation internals, -> which no longer require them. We will be accepting comments on this -> topic in [#1230], but we strongly suggest any external projects using -> these tokens immediately migrate away from them. - -[#1230]: https://github.com/KhronosGroup/Vulkan-Docs/issues/1230 - -Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1603> - -Upstream-Status: Backport [https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/commit/17850d7e87af93c6bd181d7c25903478c2254fa6] -Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com> ---- - ext/vulkan/vkerror.c | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -diff --git a/ext/vulkan/vkerror.c b/ext/vulkan/vkerror.c -index 3fec27e4d..c91589d9b 100644 ---- a/ext/vulkan/vkerror.c -+++ b/ext/vulkan/vkerror.c -@@ -27,7 +27,7 @@ - #include "vkerror.h" - - /* *INDENT-OFF* */ --static const struct -+static const struct - { - VkResult result; - const char *str; -@@ -63,8 +63,6 @@ _vk_result_to_string (VkResult result) - - if (result >= 0) - return NULL; -- if (result < VK_RESULT_BEGIN_RANGE) -- return "Unknown Error"; - - for (i = 0; i < G_N_ELEMENTS (vk_result_string_map); i++) { - if (result == vk_result_string_map[i].result) --- -2.17.1 - diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch new file mode 100644 index 00000000..029b80e1 --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch @@ -0,0 +1,33 @@ +From 3bc5d48257032b6bbee532aad15062fbbcc43bfe Mon Sep 17 00:00:00 2001 +From: Andrey Zhizhikin <andrey.z@gmail.com> +Date: Mon, 27 Jan 2020 10:22:35 +0000 +Subject: [PATCH] opencv: resolve missing opencv data dir in yocto build + +When Yocto build is performed, opencv searches for data dir using simple +'test' command, this fails because pkg-config provides an absolute +path on the target which needs to be prepended by PKG_CONFIG_SYSROOT_DIR +in order for the 'test' utility to pick up the absolute path. + +Upstream-Status: Inappropriate [OE-specific] + +Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com> +Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> + +--- + ext/opencv/meson.build | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/ext/opencv/meson.build b/ext/opencv/meson.build +index 1d86b90..b5c8b95 100644 +--- a/ext/opencv/meson.build ++++ b/ext/opencv/meson.build +@@ -87,6 +87,9 @@ if opencv_found + opencv_prefix = opencv_dep.get_variable('prefix') + gstopencv_cargs += ['-DOPENCV_PREFIX="' + opencv_prefix + '"'] + ++ pkgconf_sysroot = run_command(python3, '-c', 'import os; print(os.environ.get("PKG_CONFIG_SYSROOT_DIR"))').stdout().strip() ++ opencv_prefix = pkgconf_sysroot + opencv_prefix ++ + # Check the data dir used by opencv for its xml data files + # Use prefix from pkg-config to be compatible with cross-compilation + r = run_command('test', '-d', opencv_prefix + '/share/opencv', check: false) diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/avoid-including-sys-poll.h-directly.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/avoid-including-sys-poll.h-directly.patch deleted file mode 100644 index da2dd8bf..00000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/avoid-including-sys-poll.h-directly.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 05f9a7a9025cb1c6a5592ba998ab95d565f9c76f Mon Sep 17 00:00:00 2001 -From: Andre McCurdy <armccurdy@gmail.com> -Date: Wed, 3 Feb 2016 18:05:41 -0800 -Subject: [PATCH] avoid including <sys/poll.h> directly - -musl libc generates warnings if <sys/poll.h> is included directly. - -Upstream-Status: Pending - -Signed-off-by: Andre McCurdy <armccurdy@gmail.com> - ---- - sys/dvb/gstdvbsrc.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/sys/dvb/gstdvbsrc.c b/sys/dvb/gstdvbsrc.c -index bd07369c3..ebfbe4947 100644 ---- a/sys/dvb/gstdvbsrc.c -+++ b/sys/dvb/gstdvbsrc.c -@@ -97,7 +97,7 @@ - #include <gst/gst.h> - #include <gst/glib-compat-private.h> - #include <sys/ioctl.h> --#include <sys/poll.h> -+#include <poll.h> - #include <fcntl.h> - #include <errno.h> - #include <stdio.h> diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch deleted file mode 100644 index c25a11e9..00000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch +++ /dev/null @@ -1,86 +0,0 @@ -From f9a8b71897af39640894915a5f202d0027124f57 Mon Sep 17 00:00:00 2001 -From: Andre McCurdy <armccurdy@gmail.com> -Date: Tue, 9 Feb 2016 14:00:00 -0800 -Subject: [PATCH] ensure valid sentinals for gst_structure_get() etc - -For GStreamer functions declared with G_GNUC_NULL_TERMINATED, -ie __attribute__((__sentinel__)), gcc will generate a warning if the -last parameter passed to the function is not NULL (where a valid NULL -in this context is defined as zero with any pointer type). - -The C callers to such functions within gst-plugins-bad use the C NULL -definition (ie ((void*)0)), which is a valid sentinel. - -However the C++ NULL definition (ie 0L), is not a valid sentinel -without an explicit cast to a pointer type. - -Upstream-Status: Pending - -Signed-off-by: Andre McCurdy <armccurdy@gmail.com> - ---- - sys/decklink/gstdecklink.cpp | 10 +++++----- - sys/decklink/gstdecklinkaudiosrc.cpp | 2 +- - sys/decklink/gstdecklinkvideosink.cpp | 2 +- - 3 files changed, 7 insertions(+), 7 deletions(-) - -diff --git a/sys/decklink/gstdecklink.cpp b/sys/decklink/gstdecklink.cpp -index 464b0de9d..9fb7246d3 100644 ---- a/sys/decklink/gstdecklink.cpp -+++ b/sys/decklink/gstdecklink.cpp -@@ -617,7 +617,7 @@ gst_decklink_mode_get_structure (GstDecklinkModeEnum e, BMDPixelFormat f, - "pixel-aspect-ratio", GST_TYPE_FRACTION, mode->par_n, mode->par_d, - "interlace-mode", G_TYPE_STRING, - mode->interlaced ? "interleaved" : "progressive", -- "framerate", GST_TYPE_FRACTION, mode->fps_n, mode->fps_d, NULL); -+ "framerate", GST_TYPE_FRACTION, mode->fps_n, mode->fps_d, (void*)NULL); - - if (input && mode->interlaced) { - if (mode->tff) -@@ -632,16 +632,16 @@ gst_decklink_mode_get_structure (GstDecklinkModeEnum e, BMDPixelFormat f, - case bmdFormat8BitYUV: /* '2vuy' */ - gst_structure_set (s, "format", G_TYPE_STRING, "UYVY", - "colorimetry", G_TYPE_STRING, mode->colorimetry, -- "chroma-site", G_TYPE_STRING, "mpeg2", NULL); -+ "chroma-site", G_TYPE_STRING, "mpeg2", (void*)NULL); - break; - case bmdFormat10BitYUV: /* 'v210' */ -- gst_structure_set (s, "format", G_TYPE_STRING, "v210", NULL); -+ gst_structure_set (s, "format", G_TYPE_STRING, "v210", (void*)NULL); - break; - case bmdFormat8BitARGB: /* 'ARGB' */ -- gst_structure_set (s, "format", G_TYPE_STRING, "ARGB", NULL); -+ gst_structure_set (s, "format", G_TYPE_STRING, "ARGB", (void*)NULL); - break; - case bmdFormat8BitBGRA: /* 'BGRA' */ -- gst_structure_set (s, "format", G_TYPE_STRING, "BGRA", NULL); -+ gst_structure_set (s, "format", G_TYPE_STRING, "BGRA", (void*)NULL); - break; - case bmdFormat10BitRGB: /* 'r210' Big-endian RGB 10-bit per component with SMPTE video levels (64-960). Packed as 2:10:10:10 */ - case bmdFormat12BitRGB: /* 'R12B' Big-endian RGB 12-bit per component with full range (0-4095). Packed as 12-bit per component */ -diff --git a/sys/decklink/gstdecklinkaudiosrc.cpp b/sys/decklink/gstdecklinkaudiosrc.cpp -index 2fef934c8..c47229abf 100644 ---- a/sys/decklink/gstdecklinkaudiosrc.cpp -+++ b/sys/decklink/gstdecklinkaudiosrc.cpp -@@ -379,7 +379,7 @@ gst_decklink_audio_src_start (GstDecklinkAudioSrc * self) - g_mutex_unlock (&self->input->lock); - - if (videosrc) { -- g_object_get (videosrc, "connection", &vconn, NULL); -+ g_object_get (videosrc, "connection", &vconn, (void *) NULL); - gst_object_unref (videosrc); - - switch (vconn) { -diff --git a/sys/decklink/gstdecklinkvideosink.cpp b/sys/decklink/gstdecklinkvideosink.cpp -index 7aea3f7a2..4864508bb 100644 ---- a/sys/decklink/gstdecklinkvideosink.cpp -+++ b/sys/decklink/gstdecklinkvideosink.cpp -@@ -285,7 +285,7 @@ reset_framerate (GstCapsFeatures * features, GstStructure * structure, - gpointer user_data) - { - gst_structure_set (structure, "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, -- G_MAXINT, 1, NULL); -+ G_MAXINT, 1, (void *) NULL); - - return TRUE; - } diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch deleted file mode 100644 index 7758300e..00000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch +++ /dev/null @@ -1,26 +0,0 @@ -From e7914eb0baa3530a5075c0d3db7936ccddd8e3fe Mon Sep 17 00:00:00 2001 -From: Andre McCurdy <armccurdy@gmail.com> -Date: Tue, 26 Jan 2016 15:16:01 -0800 -Subject: [PATCH] fix maybe-uninitialized warnings when compiling with -Os - -Upstream-Status: Pending - -Signed-off-by: Andre McCurdy <armccurdy@gmail.com> - ---- - gst-libs/gst/codecparsers/gstvc1parser.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/gst-libs/gst/codecparsers/gstvc1parser.c b/gst-libs/gst/codecparsers/gstvc1parser.c -index ac579712d..1686f6081 100644 ---- a/gst-libs/gst/codecparsers/gstvc1parser.c -+++ b/gst-libs/gst/codecparsers/gstvc1parser.c -@@ -1730,7 +1730,7 @@ gst_vc1_parse_sequence_layer (const guint8 * data, gsize size, - GstVC1SeqLayer * seqlayer) - { - guint32 tmp; -- guint8 tmp8; -+ guint8 tmp8 = 0; - guint8 structA[8] = { 0, }; - guint8 structB[12] = { 0, }; - GstBitReader br; diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch deleted file mode 100644 index dc3a8c69..00000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 387886b05f4ae0de9b7faf1f9ca66040d38d19ee Mon Sep 17 00:00:00 2001 -From: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com> -Date: Sun, 26 Jan 2020 19:55:06 +0000 -Subject: [PATCH] opencv: resolve missing opencv data dir in yocto build - -When Yocto build is performed, opencv searches for data dir using simple -test command, and this fails because pkg-config provides an absolute -path on the target which needs to be prepended by PKG_CONFIG_SYSROOT_DIR -in order for the 'test' utility to pick up the absolute path. - -Upstream-Status: Inappropriate [OE-specific] - -Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com> - ---- - ext/opencv/meson.build | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/ext/opencv/meson.build b/ext/opencv/meson.build -index f38b55dfe..a26403482 100644 ---- a/ext/opencv/meson.build -+++ b/ext/opencv/meson.build -@@ -78,20 +78,21 @@ else - endif - - if opencv_found -+ pkgconf_sysroot = run_command(python3, '-c', 'import os; print(os.environ.get("PKG_CONFIG_SYSROOT_DIR"))').stdout().strip() - opencv_prefix = opencv_dep.get_pkgconfig_variable('prefix') - gstopencv_cargs += ['-DOPENCV_PREFIX="' + opencv_prefix + '"'] - - # Check the data dir used by opencv for its xml data files - # Use prefix from pkg-config to be compatible with cross-compilation -- r = run_command('test', '-d', opencv_prefix + '/share/opencv') -+ r = run_command('test', '-d', pkgconf_sysroot + opencv_prefix + '/share/opencv') - if r.returncode() == 0 - gstopencv_cargs += '-DOPENCV_PATH_NAME="opencv"' - else -- r = run_command('test', '-d', opencv_prefix + '/share/OpenCV') -+ r = run_command('test', '-d', pkgconf_sysroot + opencv_prefix + '/share/OpenCV') - if r.returncode() == 0 - gstopencv_cargs += '-DOPENCV_PATH_NAME="OpenCV"' - else -- r = run_command('test', '-d', opencv_prefix + '/share/opencv4') -+ r = run_command('test', '-d', pkgconf_sysroot + opencv_prefix + '/share/opencv4') - if r.returncode() == 0 - gstopencv_cargs += '-DOPENCV_PATH_NAME="opencv4"' - else diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.18.0.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.22.5.imx.bb index aec2bb01..3366a627 100644 --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.18.0.imx.bb +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.22.5.imx.bb @@ -1,47 +1,47 @@ -require recipes-multimedia/gstreamer/gstreamer1.0-plugins-common.inc +# This recipe is for the i.MX fork of gstreamer1.0-plugins-bad. For ease of +# maintenance, the top section is a verbatim copy of an OE-core +# recipe. The second section customizes the recipe for i.MX. -DEPENDS:append:imxgpu2d = " virtual/libg2d" -DEPENDS:append:mx8 = " libdrm" - -PACKAGECONFIG:append:mx8 = " kms tinycompress" - -DEFAULT_PREFERENCE = "-1" +########### OE-core copy ################## +# Upstream hash: 937817e5164f8af8452aec03ae3c45cb23d63df9 -PACKAGE_ARCH:imxpxp = "${MACHINE_SOCARCH}" -PACKAGE_ARCH:mx8 = "${MACHINE_SOCARCH}" +require gstreamer1.0-plugins-common.inc +require gstreamer1.0-plugins-license.inc -GST1.0-PLUGINS-BAD_SRC ?= "gitsm://source.codeaurora.org/external/imx/gst-plugins-bad.git;protocol=https;branch=master" -SRCBRANCH = "MM_04.06.01_2105_L5.10.y" +SUMMARY = "'Bad' GStreamer plugins and helper libraries " +HOMEPAGE = "https://gstreamer.freedesktop.org/" +BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues" -SRC_URI = " \ - ${GST1.0-PLUGINS-BAD_SRC};branch=${SRCBRANCH} \ -" -SRCREV = "227af57d23cb6b3564fc94446ab2c9fe8c8cff22" +SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-${PV}.tar.xz \ + file://0001-fix-maybe-uninitialized-warnings-when-compiling-with.patch \ + file://0002-avoid-including-sys-poll.h-directly.patch \ + file://0004-opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch \ + " +SRC_URI[sha256sum] = "e64e75cdafd7ff2fc7fc34e855b06b1e3ed227cc06fa378d17bbcd76780c338c" -S = "${WORKDIR}/git" +S = "${WORKDIR}/gst-plugins-bad-${PV}" -LICENSE = "GPLv2+ & LGPLv2+ & LGPLv2.1+" -LIC_FILES_CHKSUM = "file://COPYING;md5=73a5855a8119deb017f5f13cf327095d \ - file://COPYING.LIB;md5=21682e4e8fea52413fd26c60acb907e5 " +LICENSE = "LGPL-2.1-or-later & GPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" DEPENDS += "gstreamer1.0-plugins-base" inherit gobject-introspection -PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gl', '', d)}" -PACKAGECONFIG_GL:imxpxp = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2', '', d)}" - PACKAGECONFIG ??= " \ ${GSTREAMER_ORC} \ ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \ - ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'directfb vulkan x11', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \ - ${PACKAGECONFIG_GL} \ - bz2 closedcaption curl dash dtls hls rsvg sbc smoothstreaming sndfile \ - ttml uvch264 webp \ + ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gl', '', d)} \ + bz2 closedcaption curl dash dtls hls openssl sbc smoothstreaming \ + sndfile ttml uvch264 webp \ + ${@bb.utils.contains('TUNE_FEATURES', 'mx32', '', 'rsvg', d)} \ " +PACKAGECONFIG[aom] = "-Daom=enabled,-Daom=disabled,aom" PACKAGECONFIG[assrender] = "-Dassrender=enabled,-Dassrender=disabled,libass" +PACKAGECONFIG[avtp] = "-Davtp=enabled,-Davtp=disabled,libavtp" PACKAGECONFIG[bluez] = "-Dbluez=enabled,-Dbluez=disabled,bluez5" PACKAGECONFIG[bz2] = "-Dbz2=enabled,-Dbz2=disabled,bzip2" PACKAGECONFIG[closedcaption] = "-Dclosedcaption=enabled,-Dclosedcaption=disabled,pango cairo" @@ -53,18 +53,21 @@ PACKAGECONFIG[dtls] = "-Ddtls=enabled,-Ddtls=disabled,openssl" PACKAGECONFIG[faac] = "-Dfaac=enabled,-Dfaac=disabled,faac" PACKAGECONFIG[faad] = "-Dfaad=enabled,-Dfaad=disabled,faad2" PACKAGECONFIG[fluidsynth] = "-Dfluidsynth=enabled,-Dfluidsynth=disabled,fluidsynth" -PACKAGECONFIG[hls] = "-Dhls=enabled -Dhls-crypto=nettle,-Dhls=disabled,nettle" +PACKAGECONFIG[hls] = "-Dhls=enabled,-Dhls=disabled," +# Pick atleast one crypto backend below when enabling hls +PACKAGECONFIG[nettle] = "-Dhls-crypto=nettle,,nettle" +PACKAGECONFIG[openssl] = "-Dhls-crypto=openssl,,openssl" +PACKAGECONFIG[gcrypt] = "-Dhls-crypto=libgcrypt,,libgcrypt" # the gl packageconfig enables OpenGL elements that haven't been ported # to -base yet. They depend on the gstgl library in -base, so we do # not add GL dependencies here, since these are taken care of in -base. PACKAGECONFIG[gl] = "-Dgl=enabled,-Dgl=disabled," -PACKAGECONFIG[gles2] = ",,virtual/libgles2" PACKAGECONFIG[kms] = "-Dkms=enabled,-Dkms=disabled,libdrm" PACKAGECONFIG[libde265] = "-Dlibde265=enabled,-Dlibde265=disabled,libde265" -PACKAGECONFIG[libmms] = "-Dlibmms=enabled,-Dlibmms=disabled,libmms" PACKAGECONFIG[libssh2] = "-Dcurl-ssh2=enabled,-Dcurl-ssh2=disabled,libssh2" +PACKAGECONFIG[lcms2] = "-Dcolormanagement=enabled,-Dcolormanagement=disabled,lcms" PACKAGECONFIG[modplug] = "-Dmodplug=enabled,-Dmodplug=disabled,libmodplug" -PACKAGECONFIG[msdk] = "-Dmsdk=enabled,-Dmsdk=disabled,intel-mediasdk" +PACKAGECONFIG[msdk] = "-Dmsdk=enabled -Dmfx_api=oneVPL,-Dmsdk=disabled,onevpl-intel-gpu" PACKAGECONFIG[neon] = "-Dneon=enabled,-Dneon=disabled,neon" PACKAGECONFIG[openal] = "-Dopenal=enabled,-Dopenal=disabled,openal-soft" PACKAGECONFIG[opencv] = "-Dopencv=enabled,-Dopencv=disabled,opencv" @@ -78,74 +81,84 @@ PACKAGECONFIG[resindvd] = "-Dresindvd=enabled,-Dresindvd=disabled,libdvdr PACKAGECONFIG[rsvg] = "-Drsvg=enabled,-Drsvg=disabled,librsvg" PACKAGECONFIG[rtmp] = "-Drtmp=enabled,-Drtmp=disabled,rtmpdump" PACKAGECONFIG[sbc] = "-Dsbc=enabled,-Dsbc=disabled,sbc" -PACKAGECONFIG[sctp] = "-Dsctp=enabled,-Dsctp=disabled,usrsctp" +PACKAGECONFIG[sctp] = "-Dsctp=enabled,-Dsctp=disabled" PACKAGECONFIG[smoothstreaming] = "-Dsmoothstreaming=enabled,-Dsmoothstreaming=disabled,libxml2" PACKAGECONFIG[sndfile] = "-Dsndfile=enabled,-Dsndfile=disabled,libsndfile1" +PACKAGECONFIG[srt] = "-Dsrt=enabled,-Dsrt=disabled,srt" PACKAGECONFIG[srtp] = "-Dsrtp=enabled,-Dsrtp=disabled,libsrtp" PACKAGECONFIG[tinyalsa] = "-Dtinyalsa=enabled,-Dtinyalsa=disabled,tinyalsa" -PACKAGECONFIG[tinycompress] = "-Dtinycompress=enabled,-Dtinycompress=disabled,tinycompress" PACKAGECONFIG[ttml] = "-Dttml=enabled,-Dttml=disabled,libxml2 pango cairo" PACKAGECONFIG[uvch264] = "-Duvch264=enabled,-Duvch264=disabled,libusb1 libgudev" +# this enables support for stateless V4L2 mem2mem codecs, which is a newer form of +# V4L2 codec; the V4L2 code in -base supports the older stateful V4L2 mem2mem codecs +PACKAGECONFIG[v4l2codecs] = "-Dv4l2codecs=enabled,-Dv4l2codecs=disabled,libgudev" +PACKAGECONFIG[va] = "-Dva=enabled,-Dva=disabled,libva" PACKAGECONFIG[voaacenc] = "-Dvoaacenc=enabled,-Dvoaacenc=disabled,vo-aacenc" PACKAGECONFIG[voamrwbenc] = "-Dvoamrwbenc=enabled,-Dvoamrwbenc=disabled,vo-amrwbenc" -PACKAGECONFIG[vulkan] = "-Dvulkan=enabled,-Dvulkan=disabled,vulkan-loader" +PACKAGECONFIG[vulkan] = "-Dvulkan=enabled,-Dvulkan=disabled,vulkan-loader shaderc-native" PACKAGECONFIG[wayland] = "-Dwayland=enabled,-Dwayland=disabled,wayland-native wayland wayland-protocols libdrm" PACKAGECONFIG[webp] = "-Dwebp=enabled,-Dwebp=disabled,libwebp" PACKAGECONFIG[webrtc] = "-Dwebrtc=enabled,-Dwebrtc=disabled,libnice" PACKAGECONFIG[webrtcdsp] = "-Dwebrtcdsp=enabled,-Dwebrtcdsp=disabled,webrtc-audio-processing" PACKAGECONFIG[zbar] = "-Dzbar=enabled,-Dzbar=disabled,zbar" +PACKAGECONFIG[x11] = "-Dx11=enabled,-Dx11=disabled,libxcb libxkbcommon" +PACKAGECONFIG[x265] = "-Dx265=enabled,-Dx265=disabled,x265" -# these plugins currently have no corresponding library in OE-core or meta-openembedded: -# aom androidmedia applemedia bs2b chromaprint d3dvideosink -# directsound dts fdkaac gme gsm iq kate ladspa lv2 mpeg2enc -# mplex musepack nvdec nvenc ofa openexr openni2 opensles -# soundtouch spandsp srt teletext vdpau wasapi wildmidi winks -# winscreencap wpe x265 +GSTREAMER_GPL = "${@bb.utils.filter('PACKAGECONFIG', 'faad resindvd x265', d)}" EXTRA_OEMESON += " \ + -Ddoc=disabled \ + -Daes=enabled \ + -Dcodecalpha=enabled \ -Ddecklink=enabled \ -Ddvb=enabled \ -Dfbdev=enabled \ -Dipcpipeline=enabled \ - -Dnetsim=enabled \ -Dshm=enabled \ - -Daom=disabled \ + -Dtranscode=enabled \ -Dandroidmedia=disabled \ -Dapplemedia=disabled \ + -Dasio=disabled \ -Dbs2b=disabled \ -Dchromaprint=disabled \ -Dd3dvideosink=disabled \ + -Dd3d11=disabled \ -Ddirectsound=disabled \ -Ddts=disabled \ -Dfdkaac=disabled \ -Dflite=disabled \ -Dgme=disabled \ + -Dgs=disabled \ -Dgsm=disabled \ -Diqa=disabled \ -Dkate=disabled \ -Dladspa=disabled \ + -Dldac=disabled \ -Dlv2=disabled \ + -Dmagicleap=disabled \ + -Dmediafoundation=disabled \ + -Dmicrodns=disabled \ -Dmpeg2enc=disabled \ -Dmplex=disabled \ - -Dmsdk=disabled \ -Dmusepack=disabled \ - -Dofa=disabled \ + -Dnvcodec=disabled \ -Dopenexr=disabled \ - -Dopenmpt=disabled \ -Dopenni2=disabled \ + -Dopenaptx=disabled \ -Dopensles=disabled \ + -Donnx=disabled \ + -Dqroverlay=disabled \ -Dsoundtouch=disabled \ -Dspandsp=disabled \ - -Dsrt=disabled \ + -Dsvthevcenc=disabled \ -Dteletext=disabled \ -Dwasapi=disabled \ + -Dwasapi2=disabled \ -Dwildmidi=disabled \ -Dwinks=disabled \ -Dwinscreencap=disabled \ -Dwpe=disabled \ - -Dx265=disabled \ - -Dzbar=disabled \ - ${@bb.utils.contains("TUNE_FEATURES", "mx32", "-Dyadif=disabled", "", d)} \ + -Dzxing=disabled \ " export OPENCV_PREFIX = "${STAGING_DIR_TARGET}${prefix}" @@ -157,7 +170,54 @@ FILES:${PN}-freeverb += "${datadir}/gstreamer-1.0/presets/GstFreeverb.prs" FILES:${PN}-opencv += "${datadir}/gst-plugins-bad/1.0/opencv*" FILES:${PN}-transcode += "${datadir}/gstreamer-1.0/encoding-profiles" FILES:${PN}-voamrwbenc += "${datadir}/gstreamer-1.0/presets/GstVoAmrwbEnc.prs" -# include fragment shaders -FILES:${PN}-opengl += "/usr/share/*.fs" -COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" + +########### End of OE-core copy ########### + +########### i.MX overrides ################ + +DEFAULT_PREFERENCE = "-1" + +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=4fbd65380cdd255951079008b364516c" + +DEPENDS:append:imxgpu2d = " virtual/libg2d" + +SRC_URI:remove = "https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-${PV}.tar.xz \ + file://0001-fix-maybe-uninitialized-warnings-when-compiling-with.patch \ + file://0002-avoid-including-sys-poll.h-directly.patch" +SRC_URI:prepend = "${GST1.0-PLUGINS-BAD_SRC};branch=${SRCBRANCH} " +GST1.0-PLUGINS-BAD_SRC ?= "gitsm://github.com/nxp-imx/gst-plugins-bad.git;protocol=https" +SRCBRANCH = "MM_04.08.03_2312_L6.6.y" +SRCREV = "9de821c50b4dd7af2407d9c3d078020704510a20" + +S = "${WORKDIR}/git" + +inherit use-imx-headers + +PACKAGE_ARCH:imxpxp = "${MACHINE_SOCARCH}" +PACKAGE_ARCH:mx8-nxp-bsp = "${MACHINE_SOCARCH}" + +PACKAGECONFIG_REMOVE ?= " \ + dtls vulkan \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '', 'gl', d)} \ +" +PACKAGECONFIG:remove = "${PACKAGECONFIG_REMOVE}" +PACKAGECONFIG:append:mx8-nxp-bsp = " kms tinycompress" + +PACKAGECONFIG:append = " ${PACKAGECONFIG_G2D}" +PACKAGECONFIG_G2D ??= "" +PACKAGECONFIG_G2D:imxgpu2d ??= "g2d" + +PACKAGECONFIG[g2d] = ",,virtual/libg2d" +PACKAGECONFIG[tinycompress] = "-Dtinycompress=enabled,-Dtinycompress=disabled,tinycompress" + +EXTRA_OEMESON += " \ + -Dc_args="${CFLAGS} -I${STAGING_INCDIR_IMX}" \ +" + +COMPATIBLE_MACHINE = "(imx-nxp-bsp)" + +# it uses nested functions sadly, in ext/wayland/gstwaylandsink.c for GST_ELEMENT_REGISTER_DEFINE +# +TOOLCHAIN = "gcc" +########### End of i.MX overrides ######### diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-gstallocator-Fix-typcasts.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-gstallocator-Fix-typcasts.patch new file mode 100644 index 00000000..3ab4bab4 --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-gstallocator-Fix-typcasts.patch @@ -0,0 +1,47 @@ +From 90b94ff95c72487054fd283fb7cb5ebd13822b3f Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 7 Aug 2023 18:56:05 -0700 +Subject: [PATCH] gstallocator: Fix typcasts + +These are found when building with clang+musl +| ../git/gst-libs/gst/allocators/gstallocatorphymem.c:228:10: error: incompatible pointer to integer conversion returning 'gpointer' (aka 'void *') from a function with result type 'guintptr +' (aka 'unsigned long') [-Wint-conversion] +| 228 | return gst_phymem_get_phy (mem); +| | ^~~~~~~~~~~~~~~~~~~~~~~~ + +Upstream-Status: Submitted [https://github.com/nxp-imx/gst-plugins-base/pull/4] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + gst-libs/gst/allocators/gstallocatorphymem.c | 2 +- + gst-libs/gst/gl/gstglphymemory.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/gst-libs/gst/allocators/gstallocatorphymem.c b/gst-libs/gst/allocators/gstallocatorphymem.c +index f3c3306c7..f8a4511ab 100755 +--- a/gst-libs/gst/allocators/gstallocatorphymem.c ++++ b/gst-libs/gst/allocators/gstallocatorphymem.c +@@ -225,7 +225,7 @@ static guintptr + gst_allocator_phymem_get_phys_addr (GstPhysMemoryAllocator * allocator, + GstMemory * mem) + { +- return gst_phymem_get_phy (mem); ++ return (guintptr)gst_phymem_get_phy (mem); + } + + static void +diff --git a/gst-libs/gst/gl/gstglphymemory.c b/gst-libs/gst/gl/gstglphymemory.c +index d82c9a66a..1d8be0a5d 100644 +--- a/gst-libs/gst/gl/gstglphymemory.c ++++ b/gst-libs/gst/gl/gstglphymemory.c +@@ -337,7 +337,7 @@ gst_gl_physical_memory_setup_buffer (GstAllocator * allocator, + GST_VIDEO_INFO_HEIGHT (info), + viv_fmt, + memblk->vaddr, +- memblk->paddr, ++ (guint)memblk->paddr, + FALSE + }; + +-- +2.41.0 + diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-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 deleted file mode 100644 index b8fc8827..00000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-viv-fb-Make-sure-config.h-is-included.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 70a702af3a3a4afcadbc53d61c4c45f31f96b2cc Mon Sep 17 00:00:00 2001 -From: Carlos Rafael Giani <crg7475@mailbox.org> -Date: Tue, 21 May 2019 14:01:11 +0200 -Subject: [PATCH] viv-fb: Make sure config.h is included - -This prevents build errors due to missing GST_API_* symbols - -Upstream-Status: Pending - -Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org> - ---- - gst-libs/gst/gl/gl-prelude.h | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/gst-libs/gst/gl/gl-prelude.h b/gst-libs/gst/gl/gl-prelude.h -index 05e1f6229..96ce5e685 100644 ---- a/gst-libs/gst/gl/gl-prelude.h -+++ b/gst-libs/gst/gl/gl-prelude.h -@@ -22,6 +22,10 @@ - #ifndef __GST_GL_PRELUDE_H__ - #define __GST_GL_PRELUDE_H__ - -+#ifdef HAVE_CONFIG_H -+#include "config.h" -+#endif -+ - #include <gst/gst.h> - - #ifdef BUILDING_GST_GL diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-glimagesink-Downrank-to-marginal.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-glimagesink-Downrank-to-marginal.patch deleted file mode 100644 index 94a61465..00000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-glimagesink-Downrank-to-marginal.patch +++ /dev/null @@ -1,30 +0,0 @@ -From b975be9c4630536ec1315773be29900371d21930 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Thu, 24 Sep 2015 19:47:32 +0300 -Subject: [PATCH] glimagesink: Downrank to marginal - -On desktop, where there is good OpenGL, xvimagesink will come up first, -on other platforms, OpenGL can't be trusted because it's either software (like -in a VM) or broken (like on embedded)., so let ximagesink come above. - -Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=751684] - -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> - ---- - ext/gl/gstopengl.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/ext/gl/gstopengl.c b/ext/gl/gstopengl.c -index 302e8452c..463be9cd8 100644 ---- a/ext/gl/gstopengl.c -+++ b/ext/gl/gstopengl.c -@@ -127,7 +127,7 @@ plugin_init (GstPlugin * plugin) - #endif - - if (!gst_element_register (plugin, "glimagesink", -- GST_RANK_SECONDARY, gst_gl_image_sink_bin_get_type ())) { -+ GST_RANK_MARGINAL, gst_gl_image_sink_bin_get_type ())) { - return FALSE; - } - diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/4ef5c91697a141fea7317aff7f0f28e5a861db99.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/4ef5c91697a141fea7317aff7f0f28e5a861db99.patch deleted file mode 100644 index 0fa3dd30..00000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/4ef5c91697a141fea7317aff7f0f28e5a861db99.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 1718197bf6ebf3d8784a55126609aa8770fff682 Mon Sep 17 00:00:00 2001 -From: Xavier Claessens <xavier.claessens@collabora.com> -Date: Mon, 26 Apr 2021 14:25:03 -0400 -Subject: [PATCH] gstgl: Fix build when Meson >= 0.58.0rc1 - -"implicit_include_directories: false" now also means that current build -directory is not added to include paths by default any more. We have to -add it manually because we have some custom_target() that generate -headers in current build directory. - -See https://github.com/mesonbuild/meson/issues/8700. - -Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1125> -Upstream-Status: Backport -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> - ---- - gst-libs/gst/gl/meson.build | 15 ++++++++++++--- - 1 file changed, 12 insertions(+), 3 deletions(-) - -diff --git a/gst-libs/gst/gl/meson.build b/gst-libs/gst/gl/meson.build -index ae19d7aca..3ad7ddcf6 100644 ---- a/gst-libs/gst/gl/meson.build -+++ b/gst-libs/gst/gl/meson.build -@@ -1023,11 +1023,20 @@ if build_gstgl - command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@']) - gen_sources = [gl_enumtypes_h] - -+ common_args = gst_plugins_base_args + gl_cpp_args + ['-DBUILDING_GST_GL'] -+ -+ # We have custom_target() that generate headers in the current build dir, -+ # but with implicit_include_directories: false, meson >= 0.58.0 won't include -+ # it by default. We cannot use include_directories('.') here because it would -+ # also include current source dir which is what we want to avoid because -+ # case-insensitive FS would include gst-libs/gl/egl/egl.h as EGL/egl.h. -+ common_args += '-I@0@'.format(meson.current_build_dir()) -+ - gstgl = library('gstgl-' + api_version, - gl_sources, gl_egl_sources, gl_x11_sources, gl_wayland_sources, gl_priv_sources, gl_enumtypes_c, gl_enumtypes_h, -- c_args : gst_plugins_base_args + gl_cpp_args + ['-DBUILDING_GST_GL'], -- cpp_args : gst_plugins_base_args + gl_cpp_args + ['-DBUILDING_GST_GL'], -- objc_args : gst_plugins_base_args + gl_cpp_args + gl_objc_args + ['-DBUILDING_GST_GL'], -+ c_args : common_args, -+ cpp_args : common_args, -+ objc_args : common_args + gl_objc_args, - include_directories : [configinc, libsinc, gl_includes], - version : libversion, - soversion : soversion, diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.18.%.bbappend b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.18.%.bbappend deleted file mode 100644 index 1c62f31d..00000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.18.%.bbappend +++ /dev/null @@ -1,5 +0,0 @@ -PACKAGECONFIG_GL:imxgpu2d = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl x11', 'opengl', '', d)}" -PACKAGECONFIG_GL:imxgpu3d = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}" - -# For mainline BSP we need to enable 'gbm' Window system -PACKAGECONFIG_GL:use-mainline-bsp = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl gbm', '', d)}" diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.22.%.bbappend b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.22.%.bbappend new file mode 100644 index 00000000..ca6636b8 --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.22.%.bbappend @@ -0,0 +1,17 @@ +PACKAGECONFIG_GL:imxgpu2d = \ + "${@bb.utils.contains('DISTRO_FEATURES', 'opengl x11', 'opengl', '', d)}" +PACKAGECONFIG_GL:imxgpu3d = \ + "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}" +PACKAGECONFIG_GL:use-mainline-bsp = \ + "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl gbm', '', d)}" + +# The i.MX8 uses KMS instead of the Vivante specific framebuffer API. +# The i.MX7 does not have a GPU, except for ULP. +# This leaves the i.MX6 - with the vendor BSP - as the remaining use case for viv-fb. +# +# (Note that viv-fb is about the _windowing system_. Vivante direct texture support +# does not depend on the viv-fb feature. It used to, but that was actually a bug +# which was fixed in GStreamer 1.22.5. Since then, the direct texture support is +# detected by Meson by checking for direct texture symbols like "glTexDirectVIV".) +PACKAGECONFIG_GL:append:mx6-nxp-bsp = " viv-fb " +PACKAGECONFIG_GL:append:mx7ulp-nxp-bsp = " viv-fb " diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.18.0.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.22.5.imx.bb index 5dd672bf..dd7869a9 100644 --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.18.0.imx.bb +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.22.5.imx.bb @@ -1,34 +1,35 @@ -require recipes-multimedia/gstreamer/gstreamer1.0-plugins-common.inc +# This recipe is for the i.MX fork of gstreamer1.0-plugins-base. For ease of +# maintenance, the top section is a verbatim copy of an OE-core +# recipe. The second section customizes the recipe for i.MX. -DESCRIPTION = "'Base' GStreamer plugins and helper libraries" +########### OE-core copy ################## +# Upstream hash: 937817e5164f8af8452aec03ae3c45cb23d63df9 + +require gstreamer1.0-plugins-common.inc + +SUMMARY = "'Base' GStreamer plugins and helper libraries" HOMEPAGE = "https://gstreamer.freedesktop.org/" BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues" -LICENSE = "GPLv2+ & LGPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d" +LICENSE = "LGPL-2.1-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=69333daa044cb77e486cc36129f7a770" -GST1.0-PLUGINS-BASE_SRC ?= "gitsm://source.codeaurora.org/external/imx/gst-plugins-base.git;protocol=https;branch=master" -SRCBRANCH = "MM_04.06.01_2105_L5.10.y" -SRC_URI = "${GST1.0-PLUGINS-BASE_SRC};branch=${SRCBRANCH} \ +SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-${PV}.tar.xz \ + file://0001-ENGR00312515-get-caps-from-src-pad-when-query-caps.patch \ file://0003-viv-fb-Make-sure-config.h-is-included.patch \ - file://0004-glimagesink-Downrank-to-marginal.patch \ - file://4ef5c91697a141fea7317aff7f0f28e5a861db99.patch \ + file://0002-ssaparse-enhance-SSA-text-lines-parsing.patch \ " -SRCREV = "69554a26c932481acb7c5691038c367eca60e5bc" +SRC_URI[sha256sum] = "edd4338b45c26a9af28c0d35aab964a024c3884ba6f520d8428df04212c8c93a" -S = "${WORKDIR}/git" +S = "${WORKDIR}/gst-plugins-base-${PV}" DEPENDS += "iso-codes util-linux zlib" -DEPENDS:append:imxgpu2d = " virtual/libg2d" - -inherit gobject-introspection use-imx-headers - -DEFAULT_PREFERENCE = "-1" -PACKAGES_DYNAMIC =+ "^libgst.*" +inherit gobject-introspection # opengl packageconfig factored out to make it easy for distros # and BSP layers to choose OpenGL APIs/platforms/window systems -PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}" +PACKAGECONFIG_X11 = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'opengl glx', '', d)}" +PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl ${PACKAGECONFIG_X11}', '', d)}" PACKAGECONFIG ??= " \ ${GSTREAMER_ORC} \ @@ -39,8 +40,7 @@ PACKAGECONFIG ??= " \ " OPENGL_APIS = 'opengl gles2' -OPENGL_PLATFORMS = 'egl' -OPENGL_WINSYS = 'x11 wayland gbm viv-fb' +OPENGL_PLATFORMS = 'egl glx' X11DEPENDS = "virtual/libx11 libsm libxrender libxv" X11ENABLEOPTS = "-Dx11=enabled -Dxvideo=enabled -Dxshm=enabled" @@ -48,11 +48,15 @@ X11DISABLEOPTS = "-Dx11=disabled -Dxvideo=disabled -Dxshm=disabled" PACKAGECONFIG[alsa] = "-Dalsa=enabled,-Dalsa=disabled,alsa-lib" PACKAGECONFIG[cdparanoia] = "-Dcdparanoia=enabled,-Dcdparanoia=disabled,cdparanoia" +PACKAGECONFIG[graphene] = "-Dgl-graphene=enabled,-Dgl-graphene=disabled,graphene" PACKAGECONFIG[jpeg] = "-Dgl-jpeg=enabled,-Dgl-jpeg=disabled,jpeg" PACKAGECONFIG[ogg] = "-Dogg=enabled,-Dogg=disabled,libogg" PACKAGECONFIG[opus] = "-Dopus=enabled,-Dopus=disabled,libopus" PACKAGECONFIG[pango] = "-Dpango=enabled,-Dpango=disabled,pango" PACKAGECONFIG[png] = "-Dgl-png=enabled,-Dgl-png=disabled,libpng" +# This enables Qt5 QML examples in -base. The Qt5 GStreamer +# qmlglsink and qmlglsrc plugins still exist in -good. +PACKAGECONFIG[qt5] = "-Dqt5=enabled,-Dqt5=disabled,qtbase qtdeclarative qtbase-native" PACKAGECONFIG[theora] = "-Dtheora=enabled,-Dtheora=disabled,libtheora" PACKAGECONFIG[tremor] = "-Dtremor=enabled,-Dtremor=disabled,tremor" PACKAGECONFIG[visual] = "-Dlibvisual=enabled,-Dlibvisual=disabled,libvisual" @@ -65,6 +69,7 @@ PACKAGECONFIG[gles2] = ",,virtual/libgles2" # OpenGL platform packageconfigs PACKAGECONFIG[egl] = ",,virtual/egl" +PACKAGECONFIG[glx] = ",,virtual/libgl" # OpenGL window systems (except for X11) PACKAGECONFIG[gbm] = ",,virtual/libgbm libgudev libdrm" @@ -76,11 +81,9 @@ OPENGL_WINSYS = "${@bb.utils.filter('PACKAGECONFIG', 'x11 gbm wayland dispmanx e EXTRA_OEMESON += " \ -Ddoc=disabled \ - -Dgl-graphene=disabled \ ${@get_opengl_cmdline_list('gl_api', d.getVar('OPENGL_APIS'), d)} \ ${@get_opengl_cmdline_list('gl_platform', d.getVar('OPENGL_PLATFORMS'), d)} \ ${@get_opengl_cmdline_list('gl_winsys', d.getVar('OPENGL_WINSYS'), d)} \ - -Dc_args="${CFLAGS} -I${STAGING_INCDIR_IMX}" \ " FILES:${PN}-dev += "${libdir}/gstreamer-1.0/include/gst/gl/gstglconfig.h" @@ -99,4 +102,45 @@ def get_opengl_cmdline_list(switch_name, options, d): CVE_PRODUCT += "gst-plugins-base" -COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" +########### End of OE-core copy ########### + +########### i.MX overrides ################ + +DEFAULT_PREFERENCE = "-1" + +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=69333daa044cb77e486cc36129f7a770" + +SRC_URI:remove = " \ + https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-${PV}.tar.xz \ + file://0001-ENGR00312515-get-caps-from-src-pad-when-query-caps.patch \ + file://0003-viv-fb-Make-sure-config.h-is-included.patch \ + file://0002-ssaparse-enhance-SSA-text-lines-parsing.patch" +SRC_URI:prepend = "${GST1.0-PLUGINS-BASE_SRC};branch=${SRCBRANCH} " +SRC_URI:append = " file://0001-gstallocator-Fix-typcasts.patch" +GST1.0-PLUGINS-BASE_SRC ?= "gitsm://github.com/nxp-imx/gst-plugins-base.git;protocol=https" +SRCBRANCH = "MM_04.08.03_2312_L6.6.y" +SRCREV = "c4333767ea122c182ba4e14cababe8dbe2a1b882" + +S = "${WORKDIR}/git" + +inherit use-imx-headers + +PACKAGECONFIG:remove = "${PACKAGECONFIG_REMOVE}" +PACKAGECONFIG_REMOVE ?= "jpeg" + +PACKAGECONFIG:append = " ${PACKAGECONFIG_G2D}" +PACKAGECONFIG_G2D ??= "" +PACKAGECONFIG_G2D:imxgpu2d ??= "g2d" + +PACKAGECONFIG[g2d] = ",,virtual/libg2d" +PACKAGECONFIG[viv-fb] = ",,virtual/libgles2" + +EXTRA_OEMESON += "-Dc_args="${CFLAGS} -I${STAGING_INCDIR_IMX}"" + +# links with imx-gpu libs which are pre-built for glibc +# gcompat will address it during runtime +LDFLAGS:append:imxgpu:libc-musl = " -Wl,--allow-shlib-undefined" + +COMPATIBLE_MACHINE = "(imx-nxp-bsp)" + +########### End of i.MX overrides ######### diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-common.inc b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-common.inc new file mode 100644 index 00000000..54dd9287 --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-common.inc @@ -0,0 +1,47 @@ +# This .inc file contains the common setup for the gstreamer1.0-plugins-* +# plugin set recipes. + +# SUMMARY is set in the actual .bb recipes +HOMEPAGE = "https://gstreamer.freedesktop.org/" +BUGTRACKER = "https://bugzilla.gnome.org/enter_bug.cgi?product=Gstreamer" +SECTION = "multimedia" + +DEPENDS = "gstreamer1.0 glib-2.0-native" + +inherit gettext meson pkgconfig upstream-version-is-even + +require gstreamer1.0-plugins-packaging.inc + +# Orc enables runtime JIT compilation of data processing routines from Orc +# bytecode to SIMD instructions for various architectures (currently SSE, MMX, +# MIPS, Altivec and NEON are supported). +# This value is used in the PACKAGECONFIG values for each plugin set recipe. +# By modifying it, Orc can be enabled/disabled in all of these recipes at once. +GSTREAMER_ORC ?= "orc" +# workaround to disable orc on mips to fix the build failure +# {standard input}: Assembler messages: +# {standard input}:46587: Error: branch out of range +GSTREAMER_ORC:mips = "" +PACKAGECONFIG[orc] = "-Dorc=enabled,-Dorc=disabled,orc orc-native" + +# TODO: put this in a gettext.bbclass patch (with variables to allow for +# configuring the option name and the enabled/disabled values). +def gettext_oemeson(d): + if d.getVar('USE_NLS') == 'no': + return '-Dnls=disabled' + # Remove the NLS bits if USE_NLS is no or INHIBIT_DEFAULT_DEPS is set + if d.getVar('INHIBIT_DEFAULT_DEPS') and not oe.utils.inherits(d, 'cross-canadian'): + return '-Dnls=disabled' + return '-Dnls=enabled' + +# Not all plugin sets contain examples, so the -Dexamples +# option needs to be added conditionally. +GST_PLUGIN_SET_HAS_EXAMPLES ?= "1" + +EXTRA_OEMESON += " \ + ${@bb.utils.contains('GST_PLUGIN_SET_HAS_EXAMPLES', '1', '-Dexamples=disabled', '', d)} \ + ${@gettext_oemeson(d)} \ +" + +GIR_MESON_ENABLE_FLAG = "enabled" +GIR_MESON_DISABLE_FLAG = "disabled" diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.18.0.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.18.0.imx.bb deleted file mode 100644 index 050bc6ee..00000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.18.0.imx.bb +++ /dev/null @@ -1,77 +0,0 @@ -require recipes-multimedia/gstreamer/gstreamer1.0-plugins-common.inc - -GST1.0-PLUGINS-GOOD_SRC ?= "gitsm://source.codeaurora.org/external/imx/gst-plugins-good.git;protocol=https;branch=master" -SRCBRANCH = "MM_04.06.01_2105_L5.10.y" - -SRC_URI = " \ - ${GST1.0-PLUGINS-GOOD_SRC};branch=${SRCBRANCH} \ -" -SRCREV = "3160acd37304f67238b8ceae2a95ee4951f9c718" - -DEFAULT_PREFERENCE = "-1" - -S = "${WORKDIR}/git" - -LICENSE = "GPLv2+ & LGPLv2.1+" -LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ - file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe" - -DEPENDS += "gstreamer1.0-plugins-base libcap zlib" -RPROVIDES:${PN}-pulseaudio += "${PN}-pulse" -RPROVIDES:${PN}-soup += "${PN}-souphttpsrc" - -PACKAGECONFIG ??= " \ - ${GSTREAMER_ORC} \ - ${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio x11', d)} \ - bz2 cairo flac gdk-pixbuf gudev jpeg lame libpng mpg123 soup speex taglib v4l2 \ -" - -X11DEPENDS = "virtual/libx11 libsm libxrender libxfixes libxdamage" -X11ENABLEOPTS = "-Dximagesrc=enabled -Dximagesrc-xshm=enabled -Dximagesrc-xfixes=enabled -Dximagesrc-xdamage=enabled" -X11DISABLEOPTS = "-Dximagesrc=disabled -Dximagesrc-xshm=disabled -Dximagesrc-xfixes=disabled -Dximagesrc-xdamage=disabled" - -PACKAGECONFIG[bz2] = "-Dbz2=enabled,-Dbz2=disabled,bzip2" -PACKAGECONFIG[cairo] = "-Dcairo=enabled,-Dcairo=disabled,cairo" -PACKAGECONFIG[dv1394] = "-Ddv1394=enabled,-Ddv1394=disabled,libiec61883 libavc1394 libraw1394" -PACKAGECONFIG[flac] = "-Dflac=enabled,-Dflac=disabled,flac" -PACKAGECONFIG[gdk-pixbuf] = "-Dgdk-pixbuf=enabled,-Dgdk-pixbuf=disabled,gdk-pixbuf" -PACKAGECONFIG[gtk] = "-Dgtk3=enabled,-Dgtk3=disabled,gtk+3" -PACKAGECONFIG[gudev] = "-Dv4l2-gudev=enabled,-Dv4l2-gudev=disabled,libgudev" -PACKAGECONFIG[jack] = "-Djack=enabled,-Djack=disabled,jack" -PACKAGECONFIG[jpeg] = "-Djpeg=enabled,-Djpeg=disabled,jpeg" -PACKAGECONFIG[lame] = "-Dlame=enabled,-Dlame=disabled,lame" -PACKAGECONFIG[libpng] = "-Dpng=enabled,-Dpng=disabled,libpng" -PACKAGECONFIG[libv4l2] = "-Dv4l2-libv4l2=enabled,-Dv4l2-libv4l2=disabled,v4l-utils" -PACKAGECONFIG[mpg123] = "-Dmpg123=enabled,-Dmpg123=disabled,mpg123" -PACKAGECONFIG[pulseaudio] = "-Dpulse=enabled,-Dpulse=disabled,pulseaudio" -PACKAGECONFIG[soup] = "-Dsoup=enabled,-Dsoup=disabled,libsoup-2.4" -PACKAGECONFIG[speex] = "-Dspeex=enabled,-Dspeex=disabled,speex" -PACKAGECONFIG[taglib] = "-Dtaglib=enabled,-Dtaglib=disabled,taglib" -PACKAGECONFIG[v4l2] = "-Dv4l2=enabled -Dv4l2-probe=true,-Dv4l2=disabled -Dv4l2-probe=false,libdrm" -PACKAGECONFIG[vpx] = "-Dvpx=enabled,-Dvpx=disabled,libvpx" -PACKAGECONFIG[wavpack] = "-Dwavpack=enabled,-Dwavpack=disabled,wavpack" -PACKAGECONFIG[x11] = "${X11ENABLEOPTS},${X11DISABLEOPTS},${X11DEPENDS}" - -# qt5 support is disabled, because it is not present in OE core, and requires more work than -# just adding a packageconfig (it requires access to moc, uic, rcc, and qmake paths). -# This is better done in a separate qt5 layer (which then should add a "qt5" packageconfig -# in a gstreamer1.0-plugins-good bbappend). - -EXTRA_OEMESON += " \ - -Daalib=disabled \ - -Ddirectsound=disabled \ - -Ddv=disabled \ - -Dlibcaca=disabled \ - -Doss=enabled \ - -Doss4=disabled \ - -Dosxaudio=disabled \ - -Dosxvideo=disabled \ - -Dqt5=disabled \ - -Dshout2=disabled \ - -Dtwolame=disabled \ - -Dwaveform=disabled \ -" - -FILES:${PN}-equalizer += "${datadir}/gstreamer-1.0/presets/*.prs" - -COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.22.5.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.22.5.imx.bb new file mode 100644 index 00000000..9e09ef93 --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.22.5.imx.bb @@ -0,0 +1,127 @@ +# This recipe is for the i.MX fork of gstreamer1.0-plugins-good. For ease of +# maintenance, the top section is a verbatim copy of an OE-core +# recipe. The second section customizes the recipe for i.MX. + +########### OE-core copy ################## +# Upstream hash: 937817e5164f8af8452aec03ae3c45cb23d63df9 + +require gstreamer1.0-plugins-common.inc + +SUMMARY = "'Good' GStreamer plugins" +HOMEPAGE = "https://gstreamer.freedesktop.org/" +BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues" + +SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-${PV}.tar.xz \ + file://0001-qt-include-ext-qt-gstqtgl.h-instead-of-gst-gl-gstglf.patch \ + file://0001-v4l2-Define-ioctl_req_t-for-posix-linux-case.patch" + +SRC_URI[sha256sum] = "b67b31313a54c6929b82969d41d3cfdf2f58db573fb5f491e6bba5d84aea0778" + +S = "${WORKDIR}/gst-plugins-good-${PV}" + +LICENSE = "LGPL-2.1-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ + file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe" + +DEPENDS += "gstreamer1.0-plugins-base libcap zlib" +RPROVIDES:${PN}-pulseaudio += "${PN}-pulse" +RPROVIDES:${PN}-soup += "${PN}-souphttpsrc" +RDEPENDS:${PN}-soup += "${MLPREFIX}${@bb.utils.contains('PACKAGECONFIG', 'soup2', 'libsoup-2.4', 'libsoup', d)}" + +PACKAGECONFIG_SOUP ?= "soup3" + +PACKAGECONFIG ??= " \ + ${GSTREAMER_ORC} \ + ${PACKAGECONFIG_SOUP} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio x11', d)} \ + ${@bb.utils.contains('TUNE_FEATURES', 'm64', 'asm', '', d)} \ + bz2 cairo flac gdk-pixbuf gudev jpeg lame libpng mpg123 speex taglib v4l2 \ +" + +X11DEPENDS = "virtual/libx11 libsm libxrender libxfixes libxdamage" +X11ENABLEOPTS = "-Dximagesrc=enabled -Dximagesrc-xshm=enabled -Dximagesrc-xfixes=enabled -Dximagesrc-xdamage=enabled" +X11DISABLEOPTS = "-Dximagesrc=disabled -Dximagesrc-xshm=disabled -Dximagesrc-xfixes=disabled -Dximagesrc-xdamage=disabled" + +QT5WAYLANDDEPENDS = "${@bb.utils.contains("DISTRO_FEATURES", "wayland", "qtwayland", "", d)}" + +PACKAGECONFIG[asm] = "-Dasm=enabled,-Dasm=disabled,nasm-native" +PACKAGECONFIG[bz2] = "-Dbz2=enabled,-Dbz2=disabled,bzip2" +PACKAGECONFIG[cairo] = "-Dcairo=enabled,-Dcairo=disabled,cairo" +PACKAGECONFIG[dv1394] = "-Ddv1394=enabled,-Ddv1394=disabled,libiec61883 libavc1394 libraw1394" +PACKAGECONFIG[flac] = "-Dflac=enabled,-Dflac=disabled,flac" +PACKAGECONFIG[gdk-pixbuf] = "-Dgdk-pixbuf=enabled,-Dgdk-pixbuf=disabled,gdk-pixbuf" +PACKAGECONFIG[gtk] = "-Dgtk3=enabled,-Dgtk3=disabled,gtk+3" +PACKAGECONFIG[gudev] = "-Dv4l2-gudev=enabled,-Dv4l2-gudev=disabled,libgudev" +PACKAGECONFIG[jack] = "-Djack=enabled,-Djack=disabled,jack" +PACKAGECONFIG[jpeg] = "-Djpeg=enabled,-Djpeg=disabled,jpeg" +PACKAGECONFIG[lame] = "-Dlame=enabled,-Dlame=disabled,lame" +PACKAGECONFIG[libpng] = "-Dpng=enabled,-Dpng=disabled,libpng" +PACKAGECONFIG[libv4l2] = "-Dv4l2-libv4l2=enabled,-Dv4l2-libv4l2=disabled,v4l-utils" +PACKAGECONFIG[mpg123] = "-Dmpg123=enabled,-Dmpg123=disabled,mpg123" +PACKAGECONFIG[pulseaudio] = "-Dpulse=enabled,-Dpulse=disabled,pulseaudio" +PACKAGECONFIG[qt5] = "-Dqt5=enabled,-Dqt5=disabled,qtbase qtdeclarative qtbase-native ${QT5WAYLANDDEPENDS}" +PACKAGECONFIG[soup2] = "-Dsoup=enabled,,libsoup-2.4,,,soup3" +PACKAGECONFIG[soup3] = "-Dsoup=enabled,,libsoup,,,soup2" +PACKAGECONFIG[speex] = "-Dspeex=enabled,-Dspeex=disabled,speex" +PACKAGECONFIG[rpi] = "-Drpicamsrc=enabled,-Drpicamsrc=disabled,userland" +PACKAGECONFIG[taglib] = "-Dtaglib=enabled,-Dtaglib=disabled,taglib" +PACKAGECONFIG[v4l2] = "-Dv4l2=enabled -Dv4l2-probe=true,-Dv4l2=disabled -Dv4l2-probe=false" +PACKAGECONFIG[vpx] = "-Dvpx=enabled,-Dvpx=disabled,libvpx" +PACKAGECONFIG[wavpack] = "-Dwavpack=enabled,-Dwavpack=disabled,wavpack" +PACKAGECONFIG[x11] = "${X11ENABLEOPTS},${X11DISABLEOPTS},${X11DEPENDS}" + +EXTRA_OEMESON += " \ + -Ddoc=disabled \ + -Daalib=disabled \ + -Ddirectsound=disabled \ + -Ddv=disabled \ + -Dlibcaca=disabled \ + -Doss=enabled \ + -Doss4=disabled \ + -Dosxaudio=disabled \ + -Dosxvideo=disabled \ + -Dshout2=disabled \ + -Dtwolame=disabled \ + -Dwaveform=disabled \ +" + +FILES:${PN}-equalizer += "${datadir}/gstreamer-1.0/presets/*.prs" + +########### End of OE-core copy ########### + +########### i.MX overrides ################ + +DEFAULT_PREFERENCE = "-1" + +LIC_FILES_CHKSUM = " \ + file://LICENSE.txt;md5=a6f89e2100d9b6cdffcea4f398e37343 \ + file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe \ +" +# Enable pulsesink in gstreamer +PACKAGECONFIG:append = "${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)}" + +# fb implementation of v4l2 uses libdrm +DEPENDS += "${@bb.utils.contains('PACKAGECONFIG', 'v4l2', '${DEPENDS_V4L2}', '', d)}" +DEPENDS_V4L2 = "${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'libdrm', d)}" + +SRC_URI:remove = "https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-${PV}.tar.xz \ + file://0001-qt-include-ext-qt-gstqtgl.h-instead-of-gst-gl-gstglf.patch \ + file://0001-v4l2-Define-ioctl_req_t-for-posix-linux-case.patch \ +" + +SRC_URI:prepend = "${GST1.0-PLUGINS-GOOD_SRC};branch=${SRCBRANCH} " +GST1.0-PLUGINS-GOOD_SRC ?= "gitsm://github.com/nxp-imx/gst-plugins-good.git;protocol=https" +SRCBRANCH = "MM_04.08.03_2312_L6.6.y" +SRCREV = "d361360510c97dc23abbfcdd22dff8214890527d" + +# set 32bit compile timer for 32-bit platform +GLIBC_64BIT_TIME_FLAGS:mx6-nxp-bsp = "" +GLIBC_64BIT_TIME_FLAGS:mx7-nxp-bsp = "" +INSANE_SKIP:mx6-nxp-bsp:append = " 32bit-time" +INSANE_SKIP:mx7-nxp-bsp:append = " 32bit-time" + +S = "${WORKDIR}/git" + +COMPATIBLE_MACHINE = "(imx-nxp-bsp)" + +########### End of i.MX overrides ######### diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_2.0.0.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_2.2.0.bb index 41de1369..5bf60e62 100644 --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_2.0.0.bb +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_2.2.0.bb @@ -1,6 +1,6 @@ # Copyright (C) 2018 O.S. Systems Software LTDA. DESCRIPTION = "GStreamer 1.0 plugins for i.MX platforms" -LICENSE = "LGPLv2+" +LICENSE = "LGPL-2.0-or-later" LIC_FILES_CHKSUM = "file://LICENSE;md5=55ca817ccb7d5b5b66355690e9abc605" SECTION = "multimedia" DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base libimxdmabuffer" @@ -15,7 +15,7 @@ RDEPENDS:gstreamer1.0-plugins-imx-imxvpu = "gstreamer1.0-plugins-bad-videoparser PV .= "+git${SRCPV}" SRCBRANCH ?= "master" -SRCREV = "11e3a555a280f97d55d5243e8259a255b3ed14d0" +SRCREV = "cb3cd45676e808b222ac573e8a118f44fd70c288" SRC_URI = "git://github.com/Freescale/gstreamer-imx.git;branch=${SRCBRANCH};protocol=https" S = "${WORKDIR}/git" @@ -31,32 +31,38 @@ LIBG2D_DEPENDENCIES = "virtual/libg2d" LIBG2D_DPU_OPTION:imxdpu = "-Dg2d-based-on-dpu=true" LIBG2D_DEPENDENCIES:imxdpu = "virtual/libg2d libdrm" -EXTRA_OEMESON += "-Dimx-headers-path=${STAGING_INCDIR_IMX}" +# v4l2-amphion and v4l2-isi are meant for the Amphion Malone +# VPU decoder and the ISI drivers in older kernels, which had +# lots of bugs that required nontrivial workarounds. In the +# kernels in this release, newer drivers are present, which +# obviate the need for these special elements. +EXTRA_OEMESON += "-Dimx-headers-path=${STAGING_INCDIR_IMX} -Dv4l2-amphion=disabled -Dv4l2-isi=false" PACKAGECONFIG ?= "uniaudiodec" PACKAGECONFIG:append:imxgpu2d = " g2d" PACKAGECONFIG:append:imxvpu = " vpu" PACKAGECONFIG:append:imxipu = " ipu" PACKAGECONFIG:append:imxpxp = " pxp" -# The custom imxv4l2 elements are only available on the i.MX6. +# The custom imxv4l2 source and sink elements are only +# available on the i.MX6. # The 2D blitter sinks require an MXC framebuffer, which # is not available anymore on the i.MX8 (since these SoCs # now use KMS instead of the old Linux framebuffer). -PACKAGECONFIG:append:mx6 = " imx2dvideosink v4l2" -PACKAGECONFIG:append:mx7 = " imx2dvideosink" +PACKAGECONFIG:append:mx6-nxp-bsp = " imx2dvideosink v4l2-mxc-source-sink" +PACKAGECONFIG:append:mx7-nxp-bsp = " imx2dvideosink" PACKAGECONFIG[g2d] = "-Dg2d=enabled ${LIBG2D_DPU_OPTION},-Dg2d=disabled,${LIBG2D_DEPENDENCIES}" PACKAGECONFIG[pxp] = "-Dpxp=enabled,-Dpxp=disabled," PACKAGECONFIG[ipu] = "-Dipu=enabled,-Dipu=disabled," PACKAGECONFIG[vpu] = "-Dvpu=enabled,-Dvpu=disabled,libimxvpuapi2" PACKAGECONFIG[imx2dvideosink] = "-Dimx2d-videosink=true,-Dimx2d-videosink=false," -PACKAGECONFIG[v4l2] = "-Dv4l2=true,-Dv4l2=false," +PACKAGECONFIG[v4l2-mxc-source-sink] = "-Dv4l2-mxc-source-sink=true,-Dv4l2-mxc-source-sink=false," PACKAGECONFIG[uniaudiodec] = "-Duniaudiodec=enabled,-Duniaudiodec=disabled,imx-codec" PACKAGECONFIG[mp3encoder] = "-Dmp3encoder=enabled,-Dmp3encoder=disabled,imx-codec" -require recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc +require gstreamer1.0-plugins-packaging.inc # the following line is required to produce one package for each plugin PACKAGES_DYNAMIC = "^${PN}-.*" -COMPATIBLE_MACHINE = "(mx6dl|mx6q|mx6sl|mx6sx|mx6ul|mx6ull|mx7d|mx8)" +COMPATIBLE_MACHINE = "(mx6dl-nxp-bsp|mx6q-nxp-bsp|mx6sl-nxp-bsp|mx6sx-nxp-bsp|mx6ul-nxp-bsp|mx6ull-nxp-bsp|mx7d-nxp-bsp|mx8-nxp-bsp)" diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-license.inc b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-license.inc new file mode 100644 index 00000000..8b1c0011 --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-license.inc @@ -0,0 +1,19 @@ +# This .inc file contains functionality for automatically setting +# the the license of all plugins according to the GSTREAMER_GPL. + +PACKAGESPLITFUNCS += "set_gstreamer_license" + +python set_gstreamer_license () { + import oe.utils + pn = d.getVar('PN') + '-' + gpl_plugins_names = [pn+plugin for plugin in d.getVar('GSTREAMER_GPL').split()] + for pkg in oe.utils.packages_filter_out_system(d): + if pkg in gpl_plugins_names: + d.setVar('LICENSE:' + pkg, 'GPL-2.0-or-later') + else: + d.setVar('LICENSE:' + pkg, 'LGPL-2.1-or-later') +} + +EXTRA_OEMESON += " \ + ${@bb.utils.contains_any('PACKAGECONFIG', "${GSTREAMER_GPL}", '-Dgpl=enabled', '-Dgpl=disabled', d)} \ + " diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc new file mode 100644 index 00000000..d77aeed8 --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc @@ -0,0 +1,73 @@ +# This .inc file contains functionality for automatically splitting +# built plugins into individual packages for each plugin. A -meta +# package is also set up that has no files of its own, but contains +# the names of all plugin packages in its RDEPENDS list. +# +# This is mainly used by the gstreamer1.0-plugins-* plugin set recipes, +# but can be used in any recipe that produces GStreamer plugins. + +# Dynamically generate packages for all enabled plugins +PACKAGES_DYNAMIC = "^${PN}-.* ^libgst.*" + +PACKAGESPLITFUNCS =+ "split_gstreamer10_packages" +PACKAGESPLITFUNCS += "set_gstreamer10_metapkg_rdepends" + +python split_gstreamer10_packages () { + gst_libdir = d.expand('${libdir}/gstreamer-1.0') + postinst = d.getVar('plugin_postinst') + glibdir = d.getVar('libdir') + + # GStreamer libraries + do_split_packages(d, glibdir, r'^lib(.*)\.so\.*', 'lib%s', 'GStreamer 1.0 %s library', extra_depends='', allow_links=True) + # GStreamer plugin shared objects + do_split_packages(d, gst_libdir, r'libgst(.*)\.so$', d.expand('${PN}-%s'), 'GStreamer 1.0 plugin for %s', postinst=postinst, extra_depends='') + # GObject introspection files for GStreamer plugins + do_split_packages(d, glibdir+'/girepository-1.0', r'Gst(.*)-1.0\.typelib$', d.expand('${PN}-%s-typelib'), 'GStreamer 1.0 typelib file for %s', postinst=postinst, extra_depends='') + # Static GStreamer libraries for development + do_split_packages(d, gst_libdir, r'libgst(.*)\.a$', d.expand('${PN}-%s-staticdev'), 'GStreamer 1.0 plugin for %s (static development files)', extra_depends='${PN}-staticdev') +} + +python set_gstreamer10_metapkg_rdepends () { + import os + import oe.utils + + # Go through all generated packages (excluding the main package and + # the -meta package itself) and add them to the -meta package as RDEPENDS. + + pn = d.getVar('PN') + metapkg = pn + '-meta' + d.setVar('ALLOW_EMPTY:' + metapkg, "1") + d.setVar('FILES:' + metapkg, "") + exclude = [ pn, pn + '-meta' ] + metapkg_rdepends = [] + pkgdest = d.getVar('PKGDEST') + for pkg in oe.utils.packages_filter_out_system(d): + if pkg not in exclude and pkg not in metapkg_rdepends: + # See if the package is empty by looking at the contents of its PKGDEST subdirectory. + # If this subdirectory is empty, then the package is. + # Empty packages do not get added to the meta package's RDEPENDS + pkgdir = os.path.join(pkgdest, pkg) + if os.path.exists(pkgdir): + dir_contents = os.listdir(pkgdir) or [] + else: + dir_contents = [] + is_empty = len(dir_contents) == 0 + if not is_empty: + metapkg_rdepends.append(pkg) + d.setVar('RDEPENDS:' + metapkg, ' '.join(metapkg_rdepends)) + d.setVar('DESCRIPTION:' + metapkg, pn + ' meta package') +} + +# each plugin-dev depends on PN-dev, plugin-staticdev on PN-staticdev +# so we need them even when empty (like in gst-plugins-good case) +ALLOW_EMPTY:${PN} = "1" +ALLOW_EMPTY:${PN}-dev = "1" +ALLOW_EMPTY:${PN}-staticdev = "1" + +PACKAGES += "${PN}-apps ${PN}-meta ${PN}-glib" + +FILES:${PN} = "" +FILES:${PN}-apps = "${bindir}" +FILES:${PN}-glib = "${datadir}/glib-2.0" + +RRECOMMENDS:${PN} += "${PN}-meta" diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.18.0.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.18.0.bb deleted file mode 100644 index 65ac1636..00000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.18.0.bb +++ /dev/null @@ -1,43 +0,0 @@ -require recipes-multimedia/gstreamer/gstreamer1.0-plugins-common.inc - -DESCRIPTION = "'Ugly GStreamer plugins" -HOMEPAGE = "https://gstreamer.freedesktop.org/" -BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly/-/issues" - -LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ - file://tests/check/elements/xingmux.c;beginline=1;endline=21;md5=4c771b8af188724855cb99cadd390068" - -LICENSE = "GPLv2+ & LGPLv2.1+ & LGPLv2+" -LICENSE_FLAGS = "commercial" - -SRC_URI = " \ - https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-${PV}.tar.xz \ - " -SRC_URI[sha256sum] = "686644e45e08258ae240c4519376668ad8d34ea6d0f6ab556473c317bfb7e082" - -S = "${WORKDIR}/gst-plugins-ugly-${PV}" - -DEPENDS += "gstreamer1.0-plugins-base" - -GST_PLUGIN_SET_HAS_EXAMPLES = "0" - -PACKAGECONFIG ??= " \ - ${GSTREAMER_ORC} \ - a52dec mpeg2dec \ -" - -PACKAGECONFIG[a52dec] = "-Da52dec=enabled,-Da52dec=disabled,liba52" -PACKAGECONFIG[amrnb] = "-Damrnb=enabled,-Damrnb=disabled,opencore-amr" -PACKAGECONFIG[amrwb] = "-Damrwbdec=enabled,-Damrwbdec=disabled,opencore-amr" -PACKAGECONFIG[cdio] = "-Dcdio=enabled,-Dcdio=disabled,libcdio" -PACKAGECONFIG[dvdread] = "-Ddvdread=enabled,-Ddvdread=disabled,libdvdread" -PACKAGECONFIG[mpeg2dec] = "-Dmpeg2dec=enabled,-Dmpeg2dec=disabled,mpeg2dec" -PACKAGECONFIG[x264] = "-Dx264=enabled,-Dx264=disabled,x264" - -EXTRA_OEMESON += " \ - -Ddoc=disabled \ - -Dsidplay=disabled \ -" - -FILES:${PN}-amrnb += "${datadir}/gstreamer-1.0/presets/GstAmrnbEnc.prs" -FILES:${PN}-x264 += "${datadir}/gstreamer-1.0/presets/GstX264Enc.prs" diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch b/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch deleted file mode 100644 index 6962a50d..00000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 95ce953e34cd0e9f5d42ce7900a9572e7bc8ca47 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim@centricular.com> -Date: Fri, 18 Oct 2019 00:42:12 +0100 -Subject: [PATCH] meson: build gir even when cross-compiling if introspection - was enabled explicitly - -This can be made to work in certain circumstances when -cross-compiling, so default to not building g-i stuff -when cross-compiling, but allow it if introspection was -enabled explicitly via -Dintrospection=enabled. - -See gstreamer/gstreamer#454 and gstreamer/gstreamer#381. - -Upstream-Status: Backport [95ce953e34cd0e9f5d42ce7900a9572e7bc8ca47] - -Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org> ---- - meson.build | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/meson.build b/meson.build -index e1e3b1d..3f45f0e 100644 ---- a/meson.build -+++ b/meson.build -@@ -173,7 +173,7 @@ endif - - gir = find_program('g-ir-scanner', required : get_option('introspection')) - gnome = import('gnome') --build_gir = gir.found() and not meson.is_cross_build() -+build_gir = gir.found() and (not meson.is_cross_build() or get_option('introspection').enabled()) - gir_init_section = [ '--add-init-section=extern void gst_init(gint*,gchar**);' + \ - 'g_setenv("GST_REGISTRY_1.0", "@0@", TRUE);'.format(meson.current_build_dir() + '/gir_empty_registry.reg') + \ - 'g_setenv("GST_PLUGIN_PATH_1_0", "", TRUE);' + \ --- -2.17.1 - diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.18.0.bb b/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.18.0.bb deleted file mode 100644 index 4ac30c28..00000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.18.0.bb +++ /dev/null @@ -1,30 +0,0 @@ -SUMMARY = "A library on top of GStreamer for building an RTSP server" -HOMEPAGE = "http://cgit.freedesktop.org/gstreamer/gst-rtsp-server/" -SECTION = "multimedia" -LICENSE = "LGPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d" - -DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base" - -PNREAL = "gst-rtsp-server" - -SRC_URI = "https://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz \ - " - -SRC_URI[md5sum] = "77fe28c702a83566811ab5c7bbe99ab2" -SRC_URI[sha256sum] = "2ad19311054cbf2df0d0622936bc703dedc06ced706df46a3d3a3ea5a4b7c70f" - -S = "${WORKDIR}/${PNREAL}-${PV}" - -inherit meson pkgconfig upstream-version-is-even gobject-introspection - -EXTRA_OEMESON += " \ - -Dexamples=disabled \ - -Dtests=disabled \ -" - -GIR_MESON_ENABLE_FLAG = "enabled" -GIR_MESON_DISABLE_FLAG = "disabled" - -# Starting with 1.8.0 gst-rtsp-server includes dependency-less plugins as well -require recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_%.bbappend b/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_%.bbappend new file mode 100644 index 00000000..3b23818d --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_%.bbappend @@ -0,0 +1 @@ +PACKAGECONFIG_GL:imxgpu = "egl" diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/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 deleted file mode 100644 index 23ebd5c6..00000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch +++ /dev/null @@ -1,69 +0,0 @@ -From fd8f49dba8c09d47425da80f5faab3bfa4a7c962 Mon Sep 17 00:00:00 2001 -From: Jose Quaresma <quaresma.jose@gmail.com> -Date: Sat, 10 Oct 2020 19:09:03 +0000 -Subject: [PATCH 1/3] gstpluginloader: when env var is set do not fall through - to system plugin scanner - -If we set a custom GST_PLUGIN_SCANNER env var, then we probably want to use that and only that. - -Falling through to the one installed on the system is problamatic in cross-compilation -environemnts, regardless of whether one pointed to by the env var succeeded or failed. - -taken from: -http://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 - -Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/669> - -Upstream-Status: Backport [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/commit/9f958058697e6fbf5bde325228034572331d1a3a] - -Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> ---- - gst/gstpluginloader.c | 15 +++++++-------- - 1 file changed, 7 insertions(+), 8 deletions(-) - -diff --git a/gst/gstpluginloader.c b/gst/gstpluginloader.c -index d1e404d98..c626bf263 100644 ---- a/gst/gstpluginloader.c -+++ b/gst/gstpluginloader.c -@@ -464,20 +464,19 @@ gst_plugin_loader_spawn (GstPluginLoader * loader) - if (loader->child_running) - return TRUE; - -- /* Find the gst-plugin-scanner: first try the env-var if it is set, -- * otherwise use the installed version */ -+ /* Find the gst-plugin-scanner */ - env = g_getenv ("GST_PLUGIN_SCANNER_1_0"); - if (env == NULL) - env = g_getenv ("GST_PLUGIN_SCANNER"); - - if (env != NULL && *env != '\0') { -+ /* use the env-var if it is set */ - GST_LOG ("Trying GST_PLUGIN_SCANNER env var: %s", env); - helper_bin = g_strdup (env); - res = gst_plugin_loader_try_helper (loader, helper_bin); - g_free (helper_bin); -- } -- -- if (!res) { -+ } else { -+ /* use the installed version */ - GST_LOG ("Trying installed plugin scanner"); - - #ifdef G_OS_WIN32 -@@ -497,10 +496,10 @@ gst_plugin_loader_spawn (GstPluginLoader * loader) - #endif - res = gst_plugin_loader_try_helper (loader, helper_bin); - g_free (helper_bin); -+ } - -- if (!res) { -- GST_INFO ("No gst-plugin-scanner available, or not working"); -- } -+ if (!res) { -+ GST_INFO ("No gst-plugin-scanner available, or not working"); - } - - return loader->child_running; --- -2.29.2 - diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-respect-the-idententaion-used-in-meson.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0001-tests-respect-the-idententaion-used-in-meson.patch index 6f571a12..1b9278db 100644 --- a/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-respect-the-idententaion-used-in-meson.patch +++ b/recipes-multimedia/gstreamer/gstreamer1.0/0001-tests-respect-the-idententaion-used-in-meson.patch @@ -1,20 +1,21 @@ -From 122e5ac3dd16a461b6ae595605490c8f5d1c3a9d Mon Sep 17 00:00:00 2001 +From 559e1dd850b2b9eb3a415aa43e932e5e48f605cd Mon Sep 17 00:00:00 2001 From: Jose Quaresma <quaresma.jose@gmail.com> Date: Sun, 11 Apr 2021 19:48:13 +0100 -Subject: [PATCH 1/4] tests: respect the idententaion used in meson +Subject: [PATCH] tests: respect the idententaion used in meson Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789] Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> + --- tests/check/meson.build | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/check/meson.build b/tests/check/meson.build -index a617cf159..b2636714b 100644 +index 9787b0a..16caac7 100644 --- a/tests/check/meson.build +++ b/tests/check/meson.build -@@ -146,11 +146,11 @@ foreach t : core_tests +@@ -145,11 +145,11 @@ foreach t : core_tests if not skip_test exe = executable(test_name, fname, @@ -22,15 +23,12 @@ index a617cf159..b2636714b 100644 - cpp_args : gst_c_args + test_defines, - include_directories : [configinc], - link_with : link_with_libs, -- dependencies : test_deps + glib_deps + gst_deps, +- dependencies : gst_deps + test_deps, + c_args : gst_c_args + test_defines, + cpp_args : gst_c_args + test_defines, + include_directories : [configinc], + link_with : link_with_libs, -+ dependencies : test_deps + glib_deps + gst_deps, ++ dependencies : gst_deps + test_deps, ) env = environment() --- -2.31.1 - 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 deleted file mode 100644 index 96abef17..00000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0/0002-Remove-unused-valgrind-detection.patch +++ /dev/null @@ -1,112 +0,0 @@ -From 598d108e2c438d8f2ecd3bf948fa3ebbd3681490 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim@centricular.com> -Date: Fri, 14 Aug 2020 16:38:26 +0100 -Subject: [PATCH 2/3] Remove unused valgrind detection - -Having this just to log a debug message in case we're -running inside valgrind doesn't seem very useful, and -the code that used to use this no longer exists it seems. - -Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/595> - -Upstream-Status: Backport [a2cbf75523cdf8a4df1baa7007d86ef455972245] - -Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> ---- - gst/gst_private.h | 2 -- - gst/gstinfo.c | 39 --------------------------------------- - meson.build | 1 - - 3 files changed, 42 deletions(-) - -diff --git a/gst/gst_private.h b/gst/gst_private.h -index eefd044d9..8252ede51 100644 ---- a/gst/gst_private.h -+++ b/gst/gst_private.h -@@ -116,8 +116,6 @@ G_GNUC_INTERNAL gboolean _priv_plugin_deps_env_vars_changed (GstPlugin * plugin - - G_GNUC_INTERNAL gboolean _priv_plugin_deps_files_changed (GstPlugin * plugin); - --G_GNUC_INTERNAL gboolean _priv_gst_in_valgrind (void); -- - /* init functions called from gst_init(). */ - G_GNUC_INTERNAL void _priv_gst_quarks_initialize (void); - G_GNUC_INTERNAL void _priv_gst_mini_object_initialize (void); -diff --git a/gst/gstinfo.c b/gst/gstinfo.c -index 5d317877b..097f8b20d 100644 ---- a/gst/gstinfo.c -+++ b/gst/gstinfo.c -@@ -305,36 +305,6 @@ static gboolean pretty_tags = PRETTY_TAGS_DEFAULT; - static volatile gint G_GNUC_MAY_ALIAS __default_level = GST_LEVEL_DEFAULT; - static volatile gint G_GNUC_MAY_ALIAS __use_color = GST_DEBUG_COLOR_MODE_ON; - --/* FIXME: export this? */ --gboolean --_priv_gst_in_valgrind (void) --{ -- static enum -- { -- GST_VG_UNCHECKED, -- GST_VG_NO_VALGRIND, -- GST_VG_INSIDE -- } -- in_valgrind = GST_VG_UNCHECKED; -- -- if (in_valgrind == GST_VG_UNCHECKED) { --#ifdef HAVE_VALGRIND_VALGRIND_H -- if (RUNNING_ON_VALGRIND) { -- GST_CAT_INFO (GST_CAT_GST_INIT, "we're running inside valgrind"); -- in_valgrind = GST_VG_INSIDE; -- } else { -- GST_CAT_LOG (GST_CAT_GST_INIT, "not doing extra valgrind stuff"); -- in_valgrind = GST_VG_NO_VALGRIND; -- } --#else -- in_valgrind = GST_VG_NO_VALGRIND; --#endif -- g_assert (in_valgrind == GST_VG_NO_VALGRIND || -- in_valgrind == GST_VG_INSIDE); -- } -- return (in_valgrind == GST_VG_INSIDE); --} -- - static gchar * - _replace_pattern_in_gst_debug_file_name (gchar * name, const char *token, - guint val) -@@ -463,9 +433,6 @@ _priv_gst_debug_init (void) - _priv_GST_CAT_PROTECTION = - _gst_debug_category_new ("GST_PROTECTION", 0, "protection"); - -- /* print out the valgrind message if we're in valgrind */ -- _priv_gst_in_valgrind (); -- - env = g_getenv ("GST_DEBUG_OPTIONS"); - if (env != NULL) { - if (strstr (env, "full_tags") || strstr (env, "full-tags")) -@@ -2503,12 +2470,6 @@ gst_debug_construct_win_color (guint colorinfo) - return 0; - } - --gboolean --_priv_gst_in_valgrind (void) --{ -- return FALSE; --} -- - void - _gst_debug_dump_mem (GstDebugCategory * cat, const gchar * file, - const gchar * func, gint line, GObject * obj, const gchar * msg, -diff --git a/meson.build b/meson.build -index ce1921aa4..7a84d0981 100644 ---- a/meson.build -+++ b/meson.build -@@ -200,7 +200,6 @@ check_headers = [ - 'sys/wait.h', - 'ucontext.h', - 'unistd.h', -- 'valgrind/valgrind.h', - 'sys/resource.h', - 'sys/uio.h', - ] --- -2.29.2 - diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-add-support-for-install-the-tests.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0002-tests-add-support-for-install-the-tests.patch index b77fb579..568e38cb 100644 --- a/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-add-support-for-install-the-tests.patch +++ b/recipes-multimedia/gstreamer/gstreamer1.0/0002-tests-add-support-for-install-the-tests.patch @@ -1,7 +1,7 @@ -From c9e93c7a3e4d2773abef4f5e1464af24f36700b3 Mon Sep 17 00:00:00 2001 +From 08b1aaff972a7f6349373fc1ad4cc23081adb52c Mon Sep 17 00:00:00 2001 From: Jose Quaresma <quaresma.jose@gmail.com> Date: Sun, 11 Apr 2021 19:48:13 +0100 -Subject: [PATCH 2/4] tests: add support for install the tests +Subject: [PATCH] tests: add support for install the tests This will provide to run the tests using the gnome-desktop-testing [1] @@ -10,53 +10,44 @@ This will provide to run the tests using the gnome-desktop-testing [1] Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789] Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> + --- - meson.build | 5 +++++ - meson_options.txt | 1 + - template.test.in | 3 +++ - tests/check/meson.build | 22 +++++++++++++++++++++- - 4 files changed, 30 insertions(+), 1 deletion(-) - create mode 100644 template.test.in + meson.build | 4 ++++ + meson_options.txt | 1 + + tests/check/meson.build | 22 +++++++++++++++++++++- + tests/check/template.test.in | 3 +++ + 4 files changed, 29 insertions(+), 1 deletion(-) + create mode 100644 tests/check/template.test.in diff --git a/meson.build b/meson.build -index c4e8774f5..1abf4eb26 100644 +index f9f591d..3906fb3 100644 --- a/meson.build +++ b/meson.build -@@ -562,6 +562,11 @@ if bashcomp_dep.found() +@@ -606,6 +606,10 @@ if bashcomp_dep.found() endif endif ++installed_tests_enabled = get_option('installed_tests') +installed_tests_metadir = join_paths(datadir, 'installed-tests', meson.project_name()) +installed_tests_execdir = join_paths(libexecdir, 'installed-tests', meson.project_name()) -+installed_tests_enabled = get_option('installed-tests') -+installed_tests_template = files('template.test.in') + plugins_install_dir = join_paths(get_option('libdir'), 'gstreamer-1.0') pkgconfig = import('pkgconfig') diff --git a/meson_options.txt b/meson_options.txt -index c8cee3762..b5da40eaa 100644 +index 7363bdb..a34ba37 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -15,6 +15,7 @@ option('poisoning', type : 'boolean', value : false, description : 'Enable poiso option('memory-alignment', type: 'combo', choices : ['1', '2', '4', '8', '16', '32', '64', '128', '256', '512', '1024', '2048', '4096', '8192', 'malloc', 'pagesize'], value: 'malloc') -+option('installed-tests', type : 'boolean', value : false, description : 'Enable installed tests') ++option('installed_tests', type : 'boolean', value : false, description : 'Enable installed tests') # Feature options option('check', type : 'feature', value : 'auto', description : 'Build unit test libraries') -diff --git a/template.test.in b/template.test.in -new file mode 100644 -index 000000000..f701627f8 ---- /dev/null -+++ b/template.test.in -@@ -0,0 +1,3 @@ -+[Test] -+Type=session -+Exec=@installed_tests_dir@/@program@ diff --git a/tests/check/meson.build b/tests/check/meson.build -index b2636714b..a697a7b06 100644 +index 16caac7..f2d400f 100644 --- a/tests/check/meson.build +++ b/tests/check/meson.build @@ -124,10 +124,16 @@ test_defines = [ @@ -77,16 +68,16 @@ index b2636714b..a697a7b06 100644 # sanity checking if get_option('check').disabled() if get_option('tests').enabled() -@@ -151,6 +157,8 @@ foreach t : core_tests +@@ -150,6 +156,8 @@ foreach t : core_tests include_directories : [configinc], link_with : link_with_libs, - dependencies : test_deps + glib_deps + gst_deps, + dependencies : gst_deps + test_deps, + install_dir: installed_tests_execdir, + install: installed_tests_enabled, ) env = environment() -@@ -162,6 +170,18 @@ foreach t : core_tests +@@ -161,6 +169,18 @@ foreach t : core_tests env.set('GST_PLUGIN_SCANNER_1_0', gst_scanner_dir + '/gst-plugin-scanner') env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer') @@ -95,7 +86,7 @@ index b2636714b..a697a7b06 100644 + test_conf.set('installed_tests_dir', join_paths(prefix, installed_tests_execdir)) + test_conf.set('program', test_name) + configure_file( -+ input: installed_tests_template, ++ input: 'template.test.in', + output: test_name + '.test', + install_dir: installed_tests_metadir, + configuration: test_conf @@ -105,6 +96,12 @@ index b2636714b..a697a7b06 100644 test(test_name, exe, env: env, timeout : 3 * 60) endif endforeach --- -2.31.1 - +diff --git a/tests/check/template.test.in b/tests/check/template.test.in +new file mode 100644 +index 0000000..f701627 +--- /dev/null ++++ b/tests/check/template.test.in +@@ -0,0 +1,3 @@ ++[Test] ++Type=session ++Exec=@installed_tests_dir@/@program@ diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-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 deleted file mode 100644 index e0e64e2c..00000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-seek-Don-t-use-too-strict-timeout-for-validati.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 1db36347d05d88835519368442e9aa89c64091ad Mon Sep 17 00:00:00 2001 -From: Seungha Yang <seungha@centricular.com> -Date: Tue, 15 Sep 2020 00:54:58 +0900 -Subject: [PATCH] tests: seek: Don't use too strict timeout for validation - -Expected segment-done message might not be seen within expected -time if system is not powerful enough. - -Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/625> - -Upstream-Status: Backport [https://cgit.freedesktop.org/gstreamer/gstreamer/commit?id=f44312ae5d831438fcf8041162079c65321c588c] -Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> ---- - tests/check/pipelines/seek.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tests/check/pipelines/seek.c b/tests/check/pipelines/seek.c -index 28bb8846d..5f7447bc5 100644 ---- a/tests/check/pipelines/seek.c -+++ b/tests/check/pipelines/seek.c -@@ -521,7 +521,7 @@ GST_START_TEST (test_loopback_2) - - GST_INFO ("wait for segment done message"); - -- msg = gst_bus_timed_pop_filtered (bus, (GstClockTime) 2 * GST_SECOND, -+ msg = gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE, - GST_MESSAGE_SEGMENT_DONE | GST_MESSAGE_ERROR); - fail_unless (msg, "no message within the timed window"); - fail_unless_equals_string (GST_MESSAGE_TYPE_NAME (msg), "segment-done"); --- -2.29.2 - diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0006-tests-use-a-dictionaries-for-environment.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-use-a-dictionaries-for-environment.patch index 46813cec..10a6dcc6 100644 --- a/recipes-multimedia/gstreamer/gstreamer1.0/0006-tests-use-a-dictionaries-for-environment.patch +++ b/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-use-a-dictionaries-for-environment.patch @@ -1,4 +1,4 @@ -From e82dedec1803922656e92285fc1bb75b2cdc0aad Mon Sep 17 00:00:00 2001 +From fe830f0f75f3b4b41e3dbef8d4cf6ee4103c9e06 Mon Sep 17 00:00:00 2001 From: Jose Quaresma <quaresma.jose@gmail.com> Date: Sat, 24 Apr 2021 10:34:47 +0100 Subject: [PATCH 3/4] tests: use a dictionaries for environment @@ -10,29 +10,31 @@ Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/- Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> --- - tests/check/meson.build | 19 +++++++++++-------- - 1 file changed, 11 insertions(+), 8 deletions(-) + subprojects/gstreamer/tests/check/meson.build | 21 ++++++++++++------- + 1 file changed, 13 insertions(+), 8 deletions(-) -diff --git a/tests/check/meson.build b/tests/check/meson.build -index a697a7b06..f64524904 100644 ---- a/tests/check/meson.build -+++ b/tests/check/meson.build -@@ -161,14 +161,17 @@ foreach t : core_tests +diff --git a/subprojects/gstreamer/tests/check/meson.build b/subprojects/gstreamer/tests/check/meson.build +index 00a138a568..48ec2532f8 100644 +--- a/subprojects/gstreamer/tests/check/meson.build ++++ b/subprojects/gstreamer/tests/check/meson.build +@@ -161,14 +161,19 @@ foreach t : core_tests install: installed_tests_enabled, ) - env = environment() -- env.set('GST_PLUGIN_PATH_1_0', meson.build_root()) +- env.set('GST_PLUGIN_PATH_1_0', meson.project_build_root()) - env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '') - env.set('GST_STATE_IGNORE_ELEMENTS', '') - env.set('CK_DEFAULT_TIMEOUT', '20') - env.set('GST_REGISTRY', '@0@/@1@.registry'.format(meson.current_build_dir(), test_name)) - env.set('GST_PLUGIN_SCANNER_1_0', gst_scanner_dir + '/gst-plugin-scanner') - env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer') -+ # environment() can't be passed to configure_file and it is needed for installed_tests -+ # use a dictionary as this is simplest solution to install the environment ++ # meson environment object can't be passed to configure_file and ++ # installed tests uses configure_file to install the environment. ++ # use a dictionary as this is the simplest solution ++ # to install the environment. + env = { -+ 'GST_PLUGIN_PATH_1_0': meson.build_root(), ++ 'GST_PLUGIN_PATH_1_0': meson.project_build_root(), + 'GST_PLUGIN_SYSTEM_PATH_1_0': '', + 'GST_STATE_IGNORE_ELEMENTS': '', + 'CK_DEFAULT_TIMEOUT': '20', @@ -44,5 +46,5 @@ index a697a7b06..f64524904 100644 if installed_tests_enabled test_conf = configuration_data() -- -2.31.1 +2.33.1 diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-add-helper-script-to-run-the-installed_tests.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-add-helper-script-to-run-the-installed_tests.patch new file mode 100644 index 00000000..efa004f8 --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-add-helper-script-to-run-the-installed_tests.patch @@ -0,0 +1,74 @@ +From 4dcbabebca2ad6f1fdd59ee35a858082e87db7b6 Mon Sep 17 00:00:00 2001 +From: Jose Quaresma <quaresma.jose@gmail.com> +Date: Sun, 2 May 2021 01:58:01 +0100 +Subject: [PATCH 4/4] tests: add helper script to run the installed_tests + +- this is a bash script that will run the installed_tests +with some of the environment variables used in the meson +testing framework. + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789] + +Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> +--- + subprojects/gstreamer/tests/check/meson.build | 17 +++++++++++++++++ + .../gstreamer/tests/check/template.sh.in | 9 +++++++++ + .../gstreamer/tests/check/template.test.in | 2 +- + 3 files changed, 27 insertions(+), 1 deletion(-) + create mode 100755 subprojects/gstreamer/tests/check/template.sh.in + +diff --git a/subprojects/gstreamer/tests/check/meson.build b/subprojects/gstreamer/tests/check/meson.build +index 48ec2532f8..7dc4990d4e 100644 +--- a/subprojects/gstreamer/tests/check/meson.build ++++ b/subprojects/gstreamer/tests/check/meson.build +@@ -185,6 +185,23 @@ foreach t : core_tests + install_dir: installed_tests_metadir, + configuration: test_conf + ) ++ ++ # All the tests will be deployed on the target machine and ++ # we use the home folder ~ for the registry which will then expand at runtime. ++ # Using the /tmp/gstreamer-1.0/@0@.registry can be problematic as it mostly ++ # is mounted using tmpfs and if the machine crash from some reason we can lost the registry ++ # that is useful for debug propose of the tests itself. ++ env += {'GST_REGISTRY': '~/.cache/gstreamer-1.0/@0@.registry'.format(test_name)} ++ ++ # Set the full path for the test it self. ++ env += {'TEST': '@0@/@1@'.format(join_paths(prefix, installed_tests_execdir), test_name)} ++ ++ configure_file( ++ input : 'template.sh.in', ++ output: test_name + '.sh', ++ install_dir: installed_tests_execdir, ++ configuration : env, ++ ) + endif + + test(test_name, exe, env: env, timeout : 3 * 60) +diff --git a/subprojects/gstreamer/tests/check/template.sh.in b/subprojects/gstreamer/tests/check/template.sh.in +new file mode 100755 +index 0000000000..cf7d31b0ea +--- /dev/null ++++ b/subprojects/gstreamer/tests/check/template.sh.in +@@ -0,0 +1,9 @@ ++#!/bin/sh ++ ++set -ax ++ ++CK_DEFAULT_TIMEOUT="@CK_DEFAULT_TIMEOUT@" ++GST_PLUGIN_LOADING_WHITELIST="@GST_PLUGIN_LOADING_WHITELIST@" ++GST_REGISTRY=@GST_REGISTRY@ ++GST_STATE_IGNORE_ELEMENTS="@GST_STATE_IGNORE_ELEMENTS@" ++exec @TEST@ +diff --git a/subprojects/gstreamer/tests/check/template.test.in b/subprojects/gstreamer/tests/check/template.test.in +index f701627f87..b74ef6ad73 100644 +--- a/subprojects/gstreamer/tests/check/template.test.in ++++ b/subprojects/gstreamer/tests/check/template.test.in +@@ -1,3 +1,3 @@ + [Test] + Type=session +-Exec=@installed_tests_dir@/@program@ ++Exec=@installed_tests_dir@/@program@.sh +-- +2.33.1 + diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-remove-gstbin-test_watch_for_state_change-test.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-remove-gstbin-test_watch_for_state_change-test.patch new file mode 100644 index 00000000..f51df6d2 --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-remove-gstbin-test_watch_for_state_change-test.patch @@ -0,0 +1,107 @@ +From b935abba3d8fa3ea1ce384c08e650afd8c20b78a Mon Sep 17 00:00:00 2001 +From: Claudius Heine <ch@denx.de> +Date: Wed, 2 Feb 2022 13:47:02 +0100 +Subject: [PATCH] tests: remove gstbin:test_watch_for_state_change testcase + +This testcase seems to be flaky, and upstream marked it as such: +https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/778 + +This patch removes the testcase to avoid it interfering with out ptest. + +Signed-off-by: Claudius Heine <ch@denx.de> + +Upstream-Status: Inappropriate [needs proper upstream fix] +--- + tests/check/gst/gstbin.c | 69 ------------------- + 1 file changed, 69 deletions(-) + +diff --git a/tests/check/gst/gstbin.c b/tests/check/gst/gstbin.c +index e366d5fe20..ac29d81474 100644 +--- a/tests/check/gst/gstbin.c ++++ b/tests/check/gst/gstbin.c +@@ -691,74 +691,6 @@ GST_START_TEST (test_message_state_changed_children) + + GST_END_TEST; + +-GST_START_TEST (test_watch_for_state_change) +-{ +- GstElement *src, *sink, *bin; +- GstBus *bus; +- GstStateChangeReturn ret; +- +- bin = gst_element_factory_make ("bin", NULL); +- fail_unless (bin != NULL, "Could not create bin"); +- +- bus = g_object_new (gst_bus_get_type (), NULL); +- gst_object_ref_sink (bus); +- gst_element_set_bus (GST_ELEMENT_CAST (bin), bus); +- +- src = gst_element_factory_make ("fakesrc", NULL); +- fail_if (src == NULL, "Could not create fakesrc"); +- sink = gst_element_factory_make ("fakesink", NULL); +- fail_if (sink == NULL, "Could not create fakesink"); +- +- gst_bin_add (GST_BIN (bin), sink); +- gst_bin_add (GST_BIN (bin), src); +- +- fail_unless (gst_element_link (src, sink), "could not link src and sink"); +- +- /* change state, spawning two times three messages */ +- ret = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PAUSED); +- fail_unless (ret == GST_STATE_CHANGE_ASYNC); +- ret = +- gst_element_get_state (GST_ELEMENT (bin), NULL, NULL, +- GST_CLOCK_TIME_NONE); +- fail_unless (ret == GST_STATE_CHANGE_SUCCESS); +- +- pop_state_changed (bus, 6); +- pop_async_done (bus); +- pop_latency (bus); +- +- fail_unless (gst_bus_have_pending (bus) == FALSE, +- "Unexpected messages on bus"); +- +- ret = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PLAYING); +- fail_unless (ret == GST_STATE_CHANGE_SUCCESS); +- +- pop_state_changed (bus, 3); +- +- /* this one might return either SUCCESS or ASYNC, likely SUCCESS */ +- ret = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PAUSED); +- gst_element_get_state (GST_ELEMENT (bin), NULL, NULL, GST_CLOCK_TIME_NONE); +- +- pop_state_changed (bus, 3); +- if (ret == GST_STATE_CHANGE_ASYNC) { +- pop_async_done (bus); +- pop_latency (bus); +- } +- +- fail_unless (gst_bus_have_pending (bus) == FALSE, +- "Unexpected messages on bus"); +- +- gst_bus_set_flushing (bus, TRUE); +- +- ret = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_NULL); +- fail_unless (ret == GST_STATE_CHANGE_SUCCESS); +- +- /* clean up */ +- gst_object_unref (bus); +- gst_object_unref (bin); +-} +- +-GST_END_TEST; +- + GST_START_TEST (test_state_change_error_message) + { + GstElement *src, *sink, *bin; +@@ -1956,7 +1888,6 @@ gst_bin_suite (void) + tcase_add_test (tc_chain, test_message_state_changed); + tcase_add_test (tc_chain, test_message_state_changed_child); + tcase_add_test (tc_chain, test_message_state_changed_children); +- tcase_add_test (tc_chain, test_watch_for_state_change); + tcase_add_test (tc_chain, test_state_change_error_message); + tcase_add_test (tc_chain, test_add_linked); + tcase_add_test (tc_chain, test_add_self); +-- +2.33.1 + diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0007-tests-install-the-environment-for-installed_tests.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0007-tests-install-the-environment-for-installed_tests.patch deleted file mode 100644 index eabe7bcb..00000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0/0007-tests-install-the-environment-for-installed_tests.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 57d2965e979f886e03eecd7e351bf01812053971 Mon Sep 17 00:00:00 2001 -From: Jose Quaresma <quaresma.jose@gmail.com> -Date: Sun, 2 May 2021 01:58:01 +0100 -Subject: [PATCH 4/4] tests: install the environment for installed_tests - -- adapt the test environment for installed_tests -- install the test environment for installed_tests -- run the tests using the installed environment - -Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789] - -Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> ---- - template.test.in | 2 +- - tests/check/meson.build | 18 ++++++++++++++++++ - 2 files changed, 19 insertions(+), 1 deletion(-) - -diff --git a/template.test.in b/template.test.in -index f701627f8..9a3fbdd09 100644 ---- a/template.test.in -+++ b/template.test.in -@@ -1,3 +1,3 @@ - [Test] - Type=session --Exec=@installed_tests_dir@/@program@ -+Exec=sh -c 'set -aex && source @installed_tests_dir@/@program@.env && exec @installed_tests_dir@/@program@' -diff --git a/tests/check/meson.build b/tests/check/meson.build -index f64524904..a67e0f8dd 100644 ---- a/tests/check/meson.build -+++ b/tests/check/meson.build -@@ -183,6 +183,24 @@ foreach t : core_tests - install_dir: installed_tests_metadir, - configuration: test_conf - ) -+ -+ env += {'GST_REGISTRY': '~/.cache/gstreamer-1.0/@0@.registry'.format(test_name)} -+ configure_file( -+ output: test_name + '.env', -+ install_dir: installed_tests_execdir, -+ configuration : env, -+ ) -+ # helper to convert a meson environment dictionay object exported with configure_file -+ # this also remove not needed variables for the installed tests -+ meson.add_postconf_script('sed', '-i', -+ '-e', '/^#define/!d', -+ '-e', 's/^#define //g', -+ '-e', '/^GST_PLUGIN_PATH_1_0/d', -+ '-e', '/^GST_PLUGIN_SYSTEM_PATH_1_0/d', -+ '-e', '/^GST_PLUGIN_SCANNER_1_0/d', -+ '-e', 's/ /=/', -+ join_paths(meson.current_build_dir(), test_name + '.env') -+ ) - endif - - test(test_name, exe, env: env, timeout : 3 * 60) --- -2.31.1 - diff --git a/recipes-multimedia/gstreamer/gstreamer1.0_1.18.0.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0_1.22.5.imx.bb index c474f9b0..ce7b3f1d 100644 --- a/recipes-multimedia/gstreamer/gstreamer1.0_1.18.0.imx.bb +++ b/recipes-multimedia/gstreamer/gstreamer1.0_1.22.5.imx.bb @@ -1,36 +1,35 @@ +# This recipe is for the i.MX fork of gstreamer1.0. For ease of +# maintenance, the top section is a verbatim copy of an OE-core +# recipe. The second section customizes the recipe for i.MX. + +########### OE-core copy ################## +# Upstream hash: 937817e5164f8af8452aec03ae3c45cb23d63df9 + SUMMARY = "GStreamer 1.0 multimedia framework" DESCRIPTION = "GStreamer is a multimedia framework for encoding and decoding video and sound. \ It supports a wide range of formats including mp3, ogg, avi, mpeg and quicktime." HOMEPAGE = "http://gstreamer.freedesktop.org/" BUGTRACKER = "https://bugzilla.gnome.org/enter_bug.cgi?product=Gstreamer" SECTION = "multimedia" -LICENSE = "LGPLv2+" +LICENSE = "LGPL-2.1-or-later" DEPENDS = "glib-2.0 glib-2.0-native libxml2 bison-native flex-native" inherit meson pkgconfig gettext upstream-version-is-even gobject-introspection ptest-gnome -LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \ +LIC_FILES_CHKSUM = "file://COPYING;md5=69333daa044cb77e486cc36129f7a770 \ file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d" -S = "${WORKDIR}/git" +S = "${WORKDIR}/gstreamer-${PV}" -# Use i.MX fork of GST for customizations -GST1.0_SRC ?= "gitsm://source.codeaurora.org/external/imx/gstreamer.git;protocol=https;branch=master" -SRCBRANCH = "MM_04.06.01_2105_L5.10.y" -SRC_URI = "${GST1.0_SRC};branch=${SRCBRANCH} \ +SRC_URI = "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz \ file://run-ptest \ - file://0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch \ - file://0002-Remove-unused-valgrind-detection.patch \ - file://0003-tests-seek-Don-t-use-too-strict-timeout-for-validati.patch \ - file://0004-tests-respect-the-idententaion-used-in-meson.patch \ - file://0005-tests-add-support-for-install-the-tests.patch \ - file://0006-tests-use-a-dictionaries-for-environment.patch \ - file://0007-tests-install-the-environment-for-installed_tests.patch \ + file://0001-tests-respect-the-idententaion-used-in-meson.patch \ + file://0002-tests-add-support-for-install-the-tests.patch \ + file://0003-tests-use-a-dictionaries-for-environment.patch;striplevel=3 \ + file://0004-tests-add-helper-script-to-run-the-installed_tests.patch;striplevel=3 \ " -SRCREV = "2f20fd10eaf8629b3e8c134424c38412c4d3bd86" - -DEFAULT_PREFERENCE = "-1" +SRC_URI[sha256sum] = "4408d7930f381809e85917acc19712f173261ba85bdf20c5567b2a21b1193b61" PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \ check \ @@ -41,7 +40,7 @@ PACKAGECONFIG[debug] = "-Dgst_debug=true,-Dgst_debug=false" PACKAGECONFIG[tracer-hooks] = "-Dtracer_hooks=true,-Dtracer_hooks=false" PACKAGECONFIG[coretracers] = "-Dcoretracers=enabled,-Dcoretracers=disabled" PACKAGECONFIG[check] = "-Dcheck=enabled,-Dcheck=disabled" -PACKAGECONFIG[tests] = "-Dtests=enabled -Dinstalled-tests=true,-Dtests=disabled -Dinstalled-tests=false" +PACKAGECONFIG[tests] = "-Dtests=enabled -Dinstalled_tests=true,-Dtests=disabled -Dinstalled_tests=false" PACKAGECONFIG[unwind] = "-Dlibunwind=enabled,-Dlibunwind=disabled,libunwind" PACKAGECONFIG[dw] = "-Dlibdw=enabled,-Dlibdw=disabled,elfutils" PACKAGECONFIG[bash-completion] = "-Dbash-completion=enabled,-Dbash-completion=disabled,bash-completion" @@ -75,8 +74,32 @@ FILES:${PN}-dev += "${libdir}/gstreamer-1.0/*.a ${libdir}/gstreamer-1.0/include" FILES:${PN}-bash-completion += "${datadir}/bash-completion/completions/ ${datadir}/bash-completion/helpers/gst*" FILES:${PN}-dbg += "${datadir}/gdb ${datadir}/gstreamer-1.0/gdb" +RDEPENDS:${PN}-ptest:append:libc-glibc = " glibc-gconv-iso8859-5" + CVE_PRODUCT = "gstreamer" PTEST_BUILD_HOST_FILES = "" -COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" +########### End of OE-core copy ########### + +########### i.MX overrides ################ + +DEFAULT_PREFERENCE = "-1" + +LIC_FILES_CHKSUM = " \ + file://LICENSE.txt;md5=69333daa044cb77e486cc36129f7a770 \ + file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d \ +" + +# Use i.MX fork of GST for customizations +SRC_URI:remove = "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz" +SRC_URI:prepend = "${GST1.0_SRC};branch=${SRCBRANCH} " +GST1.0_SRC ?= "gitsm://github.com/nxp-imx/gstreamer.git;protocol=https" +SRCBRANCH = "MM_04.08.03_2312_L6.6.y" +SRCREV = "1a43c16272a7f4274eb8260e03206a57f317d823" + +S = "${WORKDIR}/git" + +COMPATIBLE_MACHINE = "(imx-nxp-bsp)" + +########### End of i.MX overrides ######### diff --git a/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0001-aiurdemux-Fix-type-of-USER_DATA_LOCATION.patch b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0001-aiurdemux-Fix-type-of-USER_DATA_LOCATION.patch new file mode 100644 index 00000000..bdcb3f48 --- /dev/null +++ b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0001-aiurdemux-Fix-type-of-USER_DATA_LOCATION.patch @@ -0,0 +1,33 @@ +From 090fb758a63b7d362d9bee8b8a665d1346c83f83 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 13 Mar 2023 20:15:22 -0700 +Subject: [PATCH 01/10] aiurdemux: Fix type of USER_DATA_LOCATION + +It should be char pointer not integer +Fixe +plugins/aiurdemux/aiurdemux.c:198:47: error: incompatible integer to pointer conversion initializin +g 'const gchar *' (aka 'const char *') with an expression of type 'int' [-Wint-conversion] + {USER_DATA_LOCATION, USER_DATA_FORMAT_UTF8, -1, + ^~ +Upstream-Status: Submitted [https://github.com/nxp-imx/imx-gst1.0-plugin/pull/4] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + plugins/aiurdemux/aiurdemux.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/plugins/aiurdemux/aiurdemux.c b/plugins/aiurdemux/aiurdemux.c +index 532b439..39c50ea 100755 +--- a/plugins/aiurdemux/aiurdemux.c ++++ b/plugins/aiurdemux/aiurdemux.c +@@ -195,7 +195,7 @@ static AiurDemuxTagEntry g_user_data_entry[] = { + "Track Number : %s\n"}, + {USER_DATA_TOTALTRACKNUMBER, USER_DATA_FORMAT_UTF8, GST_TAG_TRACK_COUNT, + "Track Count : %s\n"}, +- {USER_DATA_LOCATION, USER_DATA_FORMAT_UTF8, -1, ++ {USER_DATA_LOCATION, USER_DATA_FORMAT_UTF8, (const gchar*)-1, + "Location : %s\n"}, + {USER_DATA_KEYWORDS, USER_DATA_FORMAT_UTF8, GST_TAG_KEYWORDS, + "Keywords : %s\n"}, +-- +2.39.2 + diff --git a/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0002-aiurdemux.h-Include-glib-gprintf.h-for-g_printf-prot.patch b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0002-aiurdemux.h-Include-glib-gprintf.h-for-g_printf-prot.patch new file mode 100644 index 00000000..d3fdf924 --- /dev/null +++ b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0002-aiurdemux.h-Include-glib-gprintf.h-for-g_printf-prot.patch @@ -0,0 +1,28 @@ +From f8b8322cd4c3a69e5cb47b5cb33abe860e89d6ed Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 12 Mar 2023 20:33:54 -0700 +Subject: [PATCH 02/10] aiurdemux.h: Include glib/gprintf.h for g_printf + prototype + +Upstream-Status: Submitted [https://github.com/nxp-imx/imx-gst1.0-plugin/pull/4] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + plugins/aiurdemux/aiurdemux.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/plugins/aiurdemux/aiurdemux.h b/plugins/aiurdemux/aiurdemux.h +index 1d7d0a0..f7fcb2e 100755 +--- a/plugins/aiurdemux/aiurdemux.h ++++ b/plugins/aiurdemux/aiurdemux.h +@@ -39,7 +39,7 @@ + #include <gst/gst.h> + #include <gst/base/gstadapter.h> + #include <gst/tag/tag.h> +- ++#include <glib/gprintf.h> + //#include "mfw_gst_utils.h" + + #include "fsl_parser.h" +-- +2.39.2 + diff --git a/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0003-grecorder-Fix-build-with-clang.patch b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0003-grecorder-Fix-build-with-clang.patch new file mode 100644 index 00000000..a690b497 --- /dev/null +++ b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0003-grecorder-Fix-build-with-clang.patch @@ -0,0 +1,44 @@ +From 19e6a541d2026386c9cfdeca0eebd269fef2536c Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 13 Mar 2023 20:29:01 -0700 +Subject: [PATCH 03/10] grecorder: Fix build with clang + +Add missing includes for APIs from libc and glib +Add prototype declaration for post_message before +using it in macros later in the same source file + +Upstream-Status: Submitted [https://github.com/nxp-imx/imx-gst1.0-plugin/pull/4] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + tools/grecorder/grecorder.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/tools/grecorder/grecorder.c b/tools/grecorder/grecorder.c +index c8eff2f..89aa801 100644 +--- a/tools/grecorder/grecorder.c ++++ b/tools/grecorder/grecorder.c +@@ -23,10 +23,11 @@ + #include <semaphore.h> + #include <pthread.h> + #include <signal.h> ++#include <unistd.h> /* sleep */ + #include <getopt.h> + #define __USE_LARGEFILE64 + #include <sys/statvfs.h> +- ++#include <glib/gprintf.h> /* g_print */ + #include "recorder_engine.h" + + #define LOG_ERROR printf +@@ -168,6 +169,8 @@ static RecorderMessage latest_message = MESSAGE_NULL; + + static volatile sig_atomic_t quit_flag = 0; + ++static void post_message (RecorderMessage message); ++ + static void signal_handler(int signum) + { + quit_flag = 1; +-- +2.39.2 + diff --git a/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0004-gstimxcommon-Return-0-instead-of-NULL-for-a-function.patch b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0004-gstimxcommon-Return-0-instead-of-NULL-for-a-function.patch new file mode 100644 index 00000000..292ab63f --- /dev/null +++ b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0004-gstimxcommon-Return-0-instead-of-NULL-for-a-function.patch @@ -0,0 +1,87 @@ +From 141f8f692ae2c7e6d41a2d78113c806602122ad5 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 12 Mar 2023 19:51:27 -0700 +Subject: [PATCH 04/10] gstimxcommon: Return 0 instead of NULL for a functions + returning unsigned long + +Fixes +gstimxcommon.c:113:10: error: incompatible pointer to integer conversion returning 'void *' from a function with result type 'unsigned long' [-Wint-conversion] + return NULL; + +Upstream-Status: Submitted [https://github.com/nxp-imx/imx-gst1.0-plugin/pull/4] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + libs/gstimxcommon.c | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +diff --git a/libs/gstimxcommon.c b/libs/gstimxcommon.c +index 27fd913..803c6e5 100644 +--- a/libs/gstimxcommon.c ++++ b/libs/gstimxcommon.c +@@ -35,13 +35,13 @@ unsigned long phy_addr_from_fd(int dmafd) + int ret, fd; + + if (dmafd < 0) +- return NULL; ++ return 0; + + #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0) + #ifdef USE_ION + fd = open(dev_ion, O_RDWR); + if(fd < 0) { +- return NULL; ++ return 0; + } + + struct ion_phys_dma_data data = { +@@ -58,18 +58,18 @@ unsigned long phy_addr_from_fd(int dmafd) + ret = ioctl(fd, ION_IOC_CUSTOM, &custom); + close(fd); + if (ret < 0) +- return NULL; ++ return 0; + + return data.phys; + #else +- return NULL; ++ return 0; + #endif /* USE_ION */ + #else + struct dma_buf_phys dma_phys; + + ret = ioctl(dmafd, DMA_BUF_IOCTL_PHYS, &dma_phys); + if (ret < 0) +- return NULL; ++ return 0; + + return dma_phys.phys; + #endif +@@ -86,7 +86,7 @@ unsigned long phy_addr_from_vaddr(void *vaddr, int size) + #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0) + fd = open(dev_ion, O_RDWR); + if(fd < 0) { +- return NULL; ++ return 0; + } + + struct ion_phys_virt_data data = { +@@ -103,13 +103,13 @@ unsigned long phy_addr_from_vaddr(void *vaddr, int size) + ret = ioctl(fd, ION_IOC_CUSTOM, &custom); + close(fd); + if (ret < 0) +- return NULL; ++ return 0; + + return data.phys; + #else +- return NULL; ++ return 0; + #endif + #else +- return NULL; ++ return 0; + #endif + } +-- +2.39.2 + diff --git a/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0005-aiurstreamcache-Include-gst-gstinfo.h.patch b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0005-aiurstreamcache-Include-gst-gstinfo.h.patch new file mode 100644 index 00000000..5f67ba1b --- /dev/null +++ b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0005-aiurstreamcache-Include-gst-gstinfo.h.patch @@ -0,0 +1,28 @@ +From 379b0492a4b53fd8fd42c734d04fd62df2e0465f Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 13 Mar 2023 20:16:48 -0700 +Subject: [PATCH 05/10] aiurstreamcache: Include gst/gstinfo.h + +Its needed for various GST_* defines + +Upstream-Status: Submitted [https://github.com/nxp-imx/imx-gst1.0-plugin/pull/4] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + plugins/aiurdemux/aiurstreamcache.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/plugins/aiurdemux/aiurstreamcache.c b/plugins/aiurdemux/aiurstreamcache.c +index d566268..e114a9d 100755 +--- a/plugins/aiurdemux/aiurstreamcache.c ++++ b/plugins/aiurdemux/aiurstreamcache.c +@@ -33,6 +33,7 @@ + * Changelog: + * + */ ++ #include <gst/gstinfo.h> + + GST_DEBUG_CATEGORY_EXTERN (aiurdemux_debug); + #define GST_CAT_DEFAULT aiurdemux_debug +-- +2.39.2 + diff --git a/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0006-Fix-typecast-warnings-found-with-clang.patch b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0006-Fix-typecast-warnings-found-with-clang.patch new file mode 100644 index 00000000..ae3d1061 --- /dev/null +++ b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0006-Fix-typecast-warnings-found-with-clang.patch @@ -0,0 +1,61 @@ +From 02e16c4de3f138f0ebabf699e840bb86c98be599 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 12 Mar 2023 20:45:23 -0700 +Subject: [PATCH 06/10] Fix typecast warnings found with clang + +Upstream-Status: Submitted [https://github.com/nxp-imx/imx-gst1.0-plugin/pull/4] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + libs/device-2d/imx_2d_device_g2d.c | 15 ++++++++------- + 1 file changed, 8 insertions(+), 7 deletions(-) + +diff --git a/libs/device-2d/imx_2d_device_g2d.c b/libs/device-2d/imx_2d_device_g2d.c +index 2672e0b..6a36f6a 100755 +--- a/libs/device-2d/imx_2d_device_g2d.c ++++ b/libs/device-2d/imx_2d_device_g2d.c +@@ -425,7 +425,7 @@ static gint imx_g2d_blit(Imx2DDevice *device, + goto err; + } + if (paddr) { +- src->mem->paddr = paddr; ++ src->mem->paddr = (guint8*)paddr; + } else { + GST_ERROR ("Can't get physical address."); + ret = -1; +@@ -435,7 +435,7 @@ static gint imx_g2d_blit(Imx2DDevice *device, + if (!dst->mem->paddr) { + paddr = phy_addr_from_fd (dst->fd[0]); + if (paddr) { +- dst->mem->paddr = paddr; ++ dst->mem->paddr = (guint8*)paddr; + } else { + GST_ERROR ("Can't get physical address."); + ret = -1; +@@ -474,10 +474,11 @@ static gint imx_g2d_blit(Imx2DDevice *device, + + if (src->fd[1] >= 0) + { +- if (!src->mem->user_data) +- src->mem->user_data = g2d->src.base.planes[1] = phy_addr_from_fd (src->fd[1]); +- else +- g2d->src.base.planes[1] = src->mem->user_data; ++ if (!src->mem->user_data) { ++ g2d->src.base.planes[1] = (gint)phy_addr_from_fd (src->fd[1]); ++ src->mem->user_data = (gpointer *)g2d->src.base.planes[1]; ++ } else ++ g2d->src.base.planes[1] = (unsigned long)src->mem->user_data; + } + switch (src->interlace_type) { + case IMX_2D_INTERLACE_INTERLEAVED: +@@ -693,7 +694,7 @@ static gint imx_g2d_fill_color(Imx2DDevice *device, Imx2DFrame *dst, + if (!dst->mem->paddr) { + paddr = phy_addr_from_fd (dst->fd[0]); + if (paddr) { +- dst->mem->paddr = paddr; ++ dst->mem->paddr = (guint8*)paddr; + } else { + GST_ERROR ("Can't get physical address."); + return -1; +-- +2.39.2 + diff --git a/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0007-gstimxv4l2-Fix-typecasting-errors.patch b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0007-gstimxv4l2-Fix-typecasting-errors.patch new file mode 100644 index 00000000..1983838a --- /dev/null +++ b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0007-gstimxv4l2-Fix-typecasting-errors.patch @@ -0,0 +1,30 @@ +From a1a2069403e227d4d40fc99257d1be077f65bdc8 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 12 Mar 2023 19:54:18 -0700 +Subject: [PATCH 07/10] gstimxv4l2: Fix typecasting errors + +Fixes +gstimxv4l2.c:1702:22: error: incompatible pointer to integer conversion assigning to 'unsigned long' from 'guint8 *' (aka 'unsigned char *') [-Wint-conversion] + +Upstream-Status: Submitted [https://github.com/nxp-imx/imx-gst1.0-plugin/pull/4] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + libs/v4l2_core/gstimxv4l2.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libs/v4l2_core/gstimxv4l2.c b/libs/v4l2_core/gstimxv4l2.c +index 1dc826b..bf2620a 100755 +--- a/libs/v4l2_core/gstimxv4l2.c ++++ b/libs/v4l2_core/gstimxv4l2.c +@@ -1699,7 +1699,7 @@ gint gst_imx_v4l2_register_buffer (gpointer v4l2handle, PhyMemBlock *memblk) + v4l2buf->type = handle->type; + v4l2buf->memory = handle->memory_mode; + v4l2buf->index = handle->allocated; +- v4l2buf->m.userptr = memblk->paddr; ++ v4l2buf->m.userptr = (unsigned long)memblk->paddr; + v4l2buf->length = memblk->size; + handle->buffer_pair[handle->allocated].vaddr = memblk->vaddr; + +-- +2.39.2 + diff --git a/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0008-beepdec-Declare-beep_register_external_typefinders.patch b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0008-beepdec-Declare-beep_register_external_typefinders.patch new file mode 100644 index 00000000..211bade1 --- /dev/null +++ b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0008-beepdec-Declare-beep_register_external_typefinders.patch @@ -0,0 +1,32 @@ +From e86c20fee52f79a270a1913c5f0be98fb3f5cb77 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 13 Mar 2023 20:18:18 -0700 +Subject: [PATCH 08/10] beepdec: Declare beep_register_external_typefinders + +Fixes +plugins/beepdec/beep.c:45:3: error: call to undeclared function 'beep_register_external_typefinders'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] + beep_register_external_typefinders (plugin); + ^ + +Upstream-Status: Submitted [https://github.com/nxp-imx/imx-gst1.0-plugin/pull/4] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + plugins/beepdec/beep.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/plugins/beepdec/beep.c b/plugins/beepdec/beep.c +index 3543352..e174bb3 100755 +--- a/plugins/beepdec/beep.c ++++ b/plugins/beepdec/beep.c +@@ -37,7 +37,7 @@ + #endif + #include "beepdec.h" + #include "gstimxcommon.h" +- ++extern gboolean beep_register_external_typefinders (GstPlugin * plugin); + static gboolean + plugin_init (GstPlugin * plugin) + { +-- +2.39.2 + diff --git a/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0009-gstimxv4l2.c-Fix-incompatible-integer-to-pointer-con.patch b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0009-gstimxv4l2.c-Fix-incompatible-integer-to-pointer-con.patch new file mode 100644 index 00000000..567d1026 --- /dev/null +++ b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0009-gstimxv4l2.c-Fix-incompatible-integer-to-pointer-con.patch @@ -0,0 +1,41 @@ +From 8a3d7f26c73bdfe050d3331b30ae2f5917dc6723 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 12 Mar 2023 19:59:22 -0700 +Subject: [PATCH 09/10] gstimxv4l2.c: Fix incompatible integer to pointer + conversion returning + +Fixes +gstimxv4l2.c:1587:24: error: incompatible pointer to integer conversion assigning to 'unsigned long' from 'guint8 *' (aka 'unsigned char *') [-Wint-c +onversion] + +Upstream-Status: Submitted [https://github.com/nxp-imx/imx-gst1.0-plugin/pull/4] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + libs/v4l2_core/gstimxv4l2.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libs/v4l2_core/gstimxv4l2.c b/libs/v4l2_core/gstimxv4l2.c +index bf2620a..0fd7452 100755 +--- a/libs/v4l2_core/gstimxv4l2.c ++++ b/libs/v4l2_core/gstimxv4l2.c +@@ -1576,7 +1576,7 @@ static void * gst_imx_v4l2_find_buffer(gpointer v4l2handle, PhyMemBlock *memblk) + + if (handle->allocated >= MAX_BUFFER) { + GST_ERROR ("No more v4l2 buffer for allocating.\n"); +- return -1; ++ return NULL; + } + + v4l2buf = &handle->buffer_pair[handle->allocated].v4l2buffer; +@@ -1584,7 +1584,7 @@ static void * gst_imx_v4l2_find_buffer(gpointer v4l2handle, PhyMemBlock *memblk) + v4l2buf->type = handle->type; + v4l2buf->memory = handle->memory_mode; + v4l2buf->index = handle->allocated; +- v4l2buf->m.userptr = memblk->paddr; ++ v4l2buf->m.userptr = (unsigned long)memblk->paddr; + v4l2buf->length = memblk->size; + handle->buffer_pair[handle->allocated].vaddr = memblk->vaddr; + +-- +2.39.2 + diff --git a/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0010-provide-declaration-for-aiur_register_external_typef.patch b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0010-provide-declaration-for-aiur_register_external_typef.patch new file mode 100644 index 00000000..e9b1a093 --- /dev/null +++ b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0010-provide-declaration-for-aiur_register_external_typef.patch @@ -0,0 +1,28 @@ +From c2144da90e64547d9e346f8e721a0d2155ed610b Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 12 Mar 2023 21:09:49 -0700 +Subject: [PATCH 10/10] provide declaration for + aiur_register_external_typefinders + +Upstream-Status: Submitted [https://github.com/nxp-imx/imx-gst1.0-plugin/pull/4] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + plugins/aiurdemux/aiur.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/plugins/aiurdemux/aiur.c b/plugins/aiurdemux/aiur.c +index 2a52465..681ae2e 100755 +--- a/plugins/aiurdemux/aiur.c ++++ b/plugins/aiurdemux/aiur.c +@@ -41,6 +41,8 @@ + #include "aiurdemux.h" + #include "gstimxcommon.h" + ++extern gboolean aiur_register_external_typefinders (GstPlugin * plugin); ++ + static gboolean + plugin_init (GstPlugin * plugin) + { +-- +2.39.2 + diff --git a/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0011-meson-Undef-_TIME_BITS-along-with-_FILE_OFFSET_BITS.patch b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0011-meson-Undef-_TIME_BITS-along-with-_FILE_OFFSET_BITS.patch new file mode 100644 index 00000000..5a58a5a6 --- /dev/null +++ b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0011-meson-Undef-_TIME_BITS-along-with-_FILE_OFFSET_BITS.patch @@ -0,0 +1,34 @@ +From bda3461b0b6493f3e04910e82e6e530a64af26b1 Mon Sep 17 00:00:00 2001 +From: Tom Hochstein <tom.hochstein@nxp.com> +Date: Mon, 24 Jul 2023 12:09:34 -0700 +Subject: [PATCH] meson: Undef _TIME_BITS along with _FILE_OFFSET_BITS + +On gcc 13, _TIME_BITS is set to 64 and causes failure with the undef of +_FILE_OFFSET_BITS: +``` +/usr/include/features-time64.h:26:5: error: #error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64" + 26 | # error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64" + | ^~~~~ +``` + +Upstream-Status: Pending +Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> +--- + meson.build | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/meson.build b/meson.build +index 7ec5c70..64b2930 100644 +--- a/meson.build ++++ b/meson.build +@@ -24,6 +24,7 @@ gst_dep = dependency('gstreamer-' + api_version, version : gst_req) + #meson automaticaly add _FILE_OFFSET_BITS=64 to gcc, this will make ipu test + #case fail when do mmap on 6q, autoconf didn't add this define, so undef it + add_project_arguments('-U_FILE_OFFSET_BITS', language: 'c') ++add_project_arguments('-U_TIME_BITS', language: 'c') + + #below two marcos are defined in autoconf + add_project_arguments ('-DARM', language: 'c') +-- +2.25.1 + diff --git a/recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.6.1.bb b/recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.6.1.bb deleted file mode 100644 index 9d43a175..00000000 --- a/recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.6.1.bb +++ /dev/null @@ -1,81 +0,0 @@ -# Copyright (C) 2014,2016 Freescale Semiconductor -# Copyright 2017-2021 NXP -# Copyright (C) 2012-2015 O.S. Systems Software LTDA. -# Released under the MIT license (see COPYING.MIT for the terms) - -DESCRIPTION = "Gstreamer freescale plugins" -LICENSE = "GPLv2 & LGPLv2 & LGPLv2.1" -SECTION = "multimedia" - -DEPENDS = "imx-codec imx-parser gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad" -DEPENDS:append:mx6 = " imx-lib" -DEPENDS:append:mx7 = " imx-lib" -DEPENDS:append:imxvpu = " imx-vpuwrap libdrm" - -# For backwards compatibility -RREPLACES:${PN} = "gst1.0-fsl-plugin" -RPROVIDES:${PN} = "gst1.0-fsl-plugin" -RCONFLICTS:${PN} = "gst1.0-fsl-plugin" - -LIC_FILES_CHKSUM = "file://COPYING-LGPL-2;md5=5f30f0716dfdd0d91eb439ebec522ec2 \ - file://COPYING-LGPL-2.1;md5=fbc093901857fcd118f065f900982c24" - -SRCBRANCH = "MM_04.06.01_2105_L5.10.y" - - -SRC_URI = "git://source.codeaurora.org/external/imx/imx-gst1.0-plugin.git;protocol=https;branch=${SRCBRANCH}" -SRCREV = "057e6bfbc208ce31e8ed0af0264dd1e86de05808" - -S = "${WORKDIR}/git" - -inherit meson pkgconfig use-imx-headers - -PLATFORM:mx6 = "MX6" -PLATFORM:mx6sl = "MX6SL" -PLATFORM:mx6sx = "MX6SX" -PLATFORM:mx6ul = "MX6UL" -PLATFORM:mx6sll = "MX6SLL" -PLATFORM:mx7= "MX7D" -PLATFORM:mx7ulp= "MX7ULP" -PLATFORM:mx8 = "MX8" - -# Todo add a mechanism to map possible build targets -EXTRA_OEMESON = "-Dplatform=${PLATFORM} \ - -Dc_args="${CFLAGS} -I${STAGING_INCDIR_IMX}" \ -" - -PACKAGES =+ "${PN}-gplay ${PN}-libgplaycore ${PN}-libgstfsl ${PN}-grecorder ${PN}-librecorder-engine ${PN}-libplayengine" - -# Add codec list that the beep plugin run-time depended -BEEP_RDEPENDS = "imx-codec-aac imx-codec-mp3 imx-codec-oggvorbis" -RDEPENDS:${PN} += "imx-parser ${BEEP_RDEPENDS} gstreamer1.0-plugins-good-id3demux " - -# overlaysink rely on G2D, -# cannot be supported on i.MX6SLL & i.MX6UL & i.MX6ULL & i.MX7D -PACKAGECONFIG ?= "" -PACKAGECONFIG:imxgpu2d = "overlaysink" - - -# FIXME: Add all features -# feature from excluded mm packages -PACKAGECONFIG[ac3] = ",,imx-ac3codec,imx-ac3codec" -# feature from special mm packages -PACKAGECONFIG[aacp] = ",,imx-aacpcodec,imx-aacpcodec" -MSDEPENDS = "imx-msparser imx-mscodec" -PACKAGECONFIG[wma10dec] = ",,${MSDEPENDS},${MSDEPENDS}" -PACKAGECONFIG[wma8enc] = ",,${MSDEPENDS},${MSDEPENDS}" -PACKAGECONFIG[overlaysink] += ",,virtual/libg2d" - -FILES:${PN} = "${libdir}/gstreamer-1.0/*.so ${datadir}" - -FILES:${PN}-dbg += "${libdir}/gstreamer-1.0/.debug" -FILES:${PN}-dev += "${libdir}/gstreamer-1.0/*.la ${libdir}/pkgconfig/*.pc" -FILES:${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a" -FILES:${PN}-gplay = "${bindir}/gplay-1.0" -FILES:${PN}-libgplaycore = "${libdir}/libgplaycore-1.0${SOLIBS}" -FILES:${PN}-libgstfsl = "${libdir}/libgstfsl-1.0${SOLIBS}" -FILES:${PN}-grecorder = "${bindir}/grecorder-1.0" -FILES:${PN}-librecorder-engine = "${libdir}/librecorder_engine-1.0${SOLIBS}" -FILES:${PN}-libplayengine = "${libdir}/libplayengine-1.0${SOLIBS}" - -COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" diff --git a/recipes-multimedia/gstreamer/imx-gst1.0-plugin_git.bb b/recipes-multimedia/gstreamer/imx-gst1.0-plugin_git.bb new file mode 100644 index 00000000..a13cf30a --- /dev/null +++ b/recipes-multimedia/gstreamer/imx-gst1.0-plugin_git.bb @@ -0,0 +1,110 @@ +# Copyright (C) 2014,2016 Freescale Semiconductor +# Copyright 2017-2021 NXP +# Copyright (C) 2012-2015 O.S. Systems Software LTDA. +# Released under the MIT license (see COPYING.MIT for the terms) + +DESCRIPTION = "Gstreamer freescale plugins" +SECTION = "multimedia" +LICENSE = "GPL-2.0-only & LGPL-2.0-only & LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=fbc093901857fcd118f065f900982c24" + +DEPENDS = " \ + gstreamer1.0 \ + gstreamer1.0-plugins-base \ + gstreamer1.0-plugins-bad \ + imx-codec \ + imx-parser \ + ${DEPENDS_IMXGPU} \ +" +DEPENDS:append:mx6-nxp-bsp = " imx-lib" +DEPENDS:append:mx7-nxp-bsp = " imx-lib" +DEPENDS:append:mx8ulp-nxp-bsp = " imx-lib" +DEPENDS:append:mx93-nxp-bsp = " imx-lib" +DEPENDS:append:imxvpu = " imx-vpuwrap" +DEPENDS:append:imxfbdev:imxgpu = " libdrm" +DEPENDS_IMXGPU = "" +DEPENDS_IMXGPU:imxgpu = "${DEPENDS_IMX_OPENCL_CONVERTER}" +DEPENDS_IMX_OPENCL_CONVERTER = "" +DEPENDS_IMX_OPENCL_CONVERTER:mx8-nxp-bsp = "imx-opencl-converter" +DEPENDS_IMX_OPENCL_CONVERTER:mx8mm-nxp-bsp = "" +DEPENDS_IMX_OPENCL_CONVERTER:mx95-nxp-bsp = "imx-opencl-converter" + +# For backwards compatibility +RREPLACES:${PN} = "gst1.0-fsl-plugin" +RPROVIDES:${PN} = "gst1.0-fsl-plugin" +RCONFLICTS:${PN} = "gst1.0-fsl-plugin" + +PV = "4.8.3+git${SRCPV}" + +SRC_URI = "git://github.com/nxp-imx/imx-gst1.0-plugin.git;protocol=https;branch=${SRCBRANCH} \ + file://0001-aiurdemux-Fix-type-of-USER_DATA_LOCATION.patch \ + file://0002-aiurdemux.h-Include-glib-gprintf.h-for-g_printf-prot.patch \ + file://0003-grecorder-Fix-build-with-clang.patch \ + file://0004-gstimxcommon-Return-0-instead-of-NULL-for-a-function.patch \ + file://0005-aiurstreamcache-Include-gst-gstinfo.h.patch \ + file://0006-Fix-typecast-warnings-found-with-clang.patch \ + file://0007-gstimxv4l2-Fix-typecasting-errors.patch \ + file://0008-beepdec-Declare-beep_register_external_typefinders.patch \ + file://0009-gstimxv4l2.c-Fix-incompatible-integer-to-pointer-con.patch \ + file://0010-provide-declaration-for-aiur_register_external_typef.patch \ + file://0011-meson-Undef-_TIME_BITS-along-with-_FILE_OFFSET_BITS.patch \ + " +SRCBRANCH = "MM_04.08.03_2312_L6.6.y" +SRCREV = "91c7fec888cf8932c91e354331aad94975cae3ff" + +S = "${WORKDIR}/git" + +inherit meson pkgconfig use-imx-headers + +PLATFORM:mx6-nxp-bsp = "MX6" +PLATFORM:mx6sl-nxp-bsp = "MX6SL" +PLATFORM:mx6sx-nxp-bsp = "MX6SX" +PLATFORM:mx6ul-nxp-bsp = "MX6UL" +PLATFORM:mx6sll-nxp-bsp = "MX6SLL" +PLATFORM:mx7-nxp-bsp= "MX7D" +PLATFORM:mx7ulp-nxp-bsp= "MX7ULP" +PLATFORM:mx8-nxp-bsp = "MX8" +PLATFORM:mx9-nxp-bsp = "MX9" + +CFLAGS:append:toolchain-clang = " -Wno-implicit-int -Wno-int-conversion -Wno-incompatible-function-pointer-types" + +# Todo add a mechanism to map possible build targets +EXTRA_OEMESON = "-Dplatform=${PLATFORM} \ + -Dc_args="${CFLAGS} -I${STAGING_INCDIR_IMX}" \ +" + +PACKAGES =+ "${PN}-gplay ${PN}-libgplaycore ${PN}-libgstfsl ${PN}-grecorder ${PN}-librecorder-engine ${PN}-libplayengine" + +# Add codec list that the beep plugin run-time depended +BEEP_RDEPENDS = "imx-codec-aac imx-codec-mp3 imx-codec-oggvorbis" +RDEPENDS:${PN} += "imx-parser ${BEEP_RDEPENDS} gstreamer1.0-plugins-good-id3demux " +RDEPENDS:${PN}:append:mx8qm-nxp-bsp = " imx-dsp" +RDEPENDS:${PN}:append:mx8qxp-nxp-bsp = " imx-dsp" +RDEPENDS:${PN}:append:mx8dx-nxp-bsp = " imx-dsp" +RDEPENDS:${PN}:append:mx8mp-nxp-bsp = " imx-dsp" +RDEPENDS:${PN}:append:mx8ulp-nxp-bsp = " imx-dsp" + +PACKAGECONFIG ?= "" + +# FIXME: Add all features +# feature from excluded mm packages +PACKAGECONFIG[ac3] = ",,imx-ac3codec,imx-ac3codec" +# feature from special mm packages +PACKAGECONFIG[aacp] = ",,imx-aacpcodec,imx-aacpcodec" +MSDEPENDS = "imx-msparser imx-mscodec" +PACKAGECONFIG[wma10dec] = ",,${MSDEPENDS},${MSDEPENDS}" +PACKAGECONFIG[wma8enc] = ",,${MSDEPENDS},${MSDEPENDS}" + +FILES:${PN} = "${libdir}/gstreamer-1.0/*.so ${datadir}" + +FILES:${PN}-dbg += "${libdir}/gstreamer-1.0/.debug" +FILES:${PN}-dev += "${libdir}/gstreamer-1.0/*.la ${libdir}/pkgconfig/*.pc" +FILES:${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a" +FILES:${PN}-gplay = "${bindir}/gplay-1.0" +FILES:${PN}-libgplaycore = "${libdir}/libgplaycore-1.0${SOLIBS}" +FILES:${PN}-libgstfsl = "${libdir}/libgstfsl-1.0${SOLIBS}" +FILES:${PN}-grecorder = "${bindir}/grecorder-1.0" +FILES:${PN}-librecorder-engine = "${libdir}/librecorder_engine-1.0${SOLIBS}" +FILES:${PN}-libplayengine = "${libdir}/libplayengine-1.0${SOLIBS}" + +COMPATIBLE_MACHINE = "(imx-nxp-bsp)" diff --git a/recipes-multimedia/imx-codec/imx-codec_4.6.2.bb b/recipes-multimedia/imx-codec/imx-codec_4.8.3.bb index 46a1b225..0a2c71e7 100644 --- a/recipes-multimedia/imx-codec/imx-codec_4.6.2.bb +++ b/recipes-multimedia/imx-codec/imx-codec_4.8.3.bb @@ -1,33 +1,32 @@ # Copyright (C) 2012-2016 Freescale Semiconductor -# Copyright 2017 NXP +# Copyright 2017 NXP-2023 # Copyright 2018 (C) O.S. Systems Software LTDA. # Released under the MIT license (see COPYING.MIT for the terms) DESCRIPTION = "Freescale Multimedia codec libs" LICENSE = "Proprietary" SECTION = "multimedia" -LIC_FILES_CHKSUM = "file://COPYING;md5=e565271ec9a80ce47abbddc4bffe56fa" +LIC_FILES_CHKSUM = "file://COPYING;md5=44a8052c384584ba09077e85a3d1654f" # Backward compatibility PROVIDES += "libfslcodec" -SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true" -SRC_URI[md5sum] = "309cae6f73a777f6e5a89831acf622ee" -SRC_URI[sha256sum] = "7b070ab3f1762accee2806e7aba4146ef5242c67a8cd88fb90dacfc1c8b3ef5e" +SRC_URI = "${FSL_MIRROR}/${BP}.bin;fsl-eula=true" +SRC_URI[md5sum] = "7ae1615aad2c0456b9be2ab804a6267e" +SRC_URI[sha256sum] = "9facb3541903b4a6c6baa906f8c2c6cc01fc8c7b82a726c8da6d3681d4ed720b" inherit fsl-eula-unpack autotools pkgconfig +PACKAGECONFIG ??= "${PACKAGECONFIG_VPU}" +# Support Chips&Media VPU only +PACKAGECONFIG_VPU = "" +PACKAGECONFIG_VPU:mx6q-nxp-bsp = "vpu" +PACKAGECONFIG_VPU:mx6dl-nxp-bsp = "vpu" +PACKAGECONFIG[vpu] = "--enable-vpu,--disable-vpu,virtual/imxvpu" + # Choose between 32-bit and 64-bit binaries and between Soft Float-Point and Hard Float-Point EXTRA_OECONF = "${@bb.utils.contains('TUNE_FEATURES', 'aarch64', '--enable-armv8', \ bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--enable-fhw', '', d), d)}" -PACKAGECONFIG ?= "" -PACKAGECONFIG:imxvpu = "vpu" - -# We need to ensure we don't have '-src' package overrided -PACKAGE_DEBUG_SPLIT_STYLE = 'debug-without-src' - -PACKAGECONFIG[vpu] = "--enable-vpu,--disable-vpu,virtual/imxvpu" - do_install:append() { # LTIB move the files around or gst-fsl-plugin won't find them for p in $(find ${D}${libdir}/imx-mm -mindepth 2 -maxdepth 2 -not -type d); do @@ -52,7 +51,7 @@ python __set_insane_skip() { # the source we cannot fix it. Disable the insane check for now. if p == 'imx-codec-test-bin': # FIXME: includes the DUT .so files so we need to deploy those - d.setVar("INSANE_SKIP:%s" % p, "ldflags textrel libdir file-rdeps") + d.setVar("INSANE_SKIP:%s" % p, "ldflags textrel libdir") else: d.setVar("INSANE_SKIP:%s" % p, "ldflags textrel") } @@ -90,6 +89,9 @@ python __set_metapkg_rdepends() { PACKAGESPLITFUNCS =+ "__split_libfslcodec_plugins __set_metapkg_rdepends" +# We need to ensure we don't have '-src' package overrided +PACKAGE_DEBUG_SPLIT_STYLE = 'debug-without-src' + PACKAGES_DYNAMIC = "${PN}-*" INHIBIT_PACKAGE_STRIP = "1" INHIBIT_PACKAGE_DEBUG_SPLIT = "1" @@ -115,5 +117,5 @@ FILES:${PN}-oggvorbis += "${libdir}/imx-mm/audio-codec/wrap/lib_vorbisd_wrap_arm FILES:${PN}-nb += "${libdir}/imx-mm/audio-codec/wrap/lib_nbamrd_wrap_arm*_elinux.so.*" FILES:${PN}-wb += "${libdir}/imx-mm/audio-codec/wrap/lib_wbamrd_wrap_arm*_elinux.so.*" -PACKAGE_ARCH = "${MACHINE_ARCH}" -COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" +PACKAGE_ARCH = "${MACHINE_SOCARCH}" +COMPATIBLE_MACHINE = "(imx-nxp-bsp)" diff --git a/recipes-multimedia/imx-dsp/imx-dsp-codec-ext_2.1.7.bb b/recipes-multimedia/imx-dsp/imx-dsp-codec-ext_2.1.7.bb new file mode 100644 index 00000000..bc73bd9f --- /dev/null +++ b/recipes-multimedia/imx-dsp/imx-dsp-codec-ext_2.1.7.bb @@ -0,0 +1,27 @@ +# Copyright 2018-2023 NXP + +DESCRIPTION = "i.MX DSP Codec Wrapper and Lib owned by NXP" +LICENSE = "Proprietary" +LIC_FILES_CHKSUM = "file://COPYING;md5=44a8052c384584ba09077e85a3d1654f" + +inherit fsl-eula-unpack autotools pkgconfig + +SRC_URI = "${FSL_MIRROR}/${BP}.bin;fsl-eula=true" + +SRC_URI[md5sum] = "32251bc952ca7b9a4b12fadb9328a8c1" +SRC_URI[sha256sum] = "0baa82410a77c68e39aaa987d91b41c94255d62294fa2f5a399169f3068862cc" + +EXTRA_OECONF:append:mx8qm-nxp-bsp = " --enable-imx8qmqxp" +EXTRA_OECONF:append:mx8qxp-nxp-bsp = " --enable-imx8qmqxp" +EXTRA_OECONF:append:mx8dx-nxp-bsp = " --enable-imx8qmqxp" +EXTRA_OECONF:append:mx8mp-nxp-bsp = " --enable-imx8m" +EXTRA_OECONF:append:mx8ulp-nxp-bsp = " --enable-imx8ulp" + +# Fix strip command failed: 'Unable to recognise the format of the input file' +INHIBIT_PACKAGE_STRIP = "1" +INHIBIT_SYSROOT_STRIP = "1" +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" +INSANE_SKIP:${PN} = "arch dev-so ldflags" + +FILES:${PN} += "${libdir}/imx-mm/audio-codec/dsp ${datadir}/imx-mm" +COMPATIBLE_MACHINE = "(mx8qm-nxp-bsp|mx8qxp-nxp-bsp|mx8dx-nxp-bsp|mx8mp-nxp-bsp|mx8ulp-nxp-bsp)" diff --git a/recipes-multimedia/imx-dsp/imx-dsp_2.1.7.bb b/recipes-multimedia/imx-dsp/imx-dsp_2.1.7.bb new file mode 100644 index 00000000..60761e6e --- /dev/null +++ b/recipes-multimedia/imx-dsp/imx-dsp_2.1.7.bb @@ -0,0 +1,57 @@ +# Copyright 2017-2023 NXP + +DESCRIPTION = "i.MX DSP Wrapper, Firmware Binary, Codec Libraries" +LICENSE = "Proprietary" +LIC_FILES_CHKSUM = "file://COPYING;md5=44a8052c384584ba09077e85a3d1654f" + + +inherit fsl-eula-unpack autotools pkgconfig + +SRC_URI = "${FSL_MIRROR}/${BP}.bin;fsl-eula=true" + +SRC_URI[md5sum] = "199f88716f289e93e0954fa6475a3cbc" +SRC_URI[sha256sum] = "83eaef592de33b4d5e8fae63d798cc955bf3c414911c87afeb65a20af01fb0b6" + +EXTRA_OECONF = " \ + -datadir=${base_libdir}/firmware \ + --bindir=/unit_tests \ + ${@bb.utils.contains('TUNE_FEATURES', 'aarch64', '--enable-armv8', '', d)} \ +" + +HIFI4_PLATFORM ?= "HIFI4_PLATFORM_IS_UNDEFINED" +HIFI4_PLATFORM:mx8qm-nxp-bsp = "imx8qmqxp" +HIFI4_PLATFORM:mx8qxp-nxp-bsp = "imx8qmqxp" +HIFI4_PLATFORM:mx8dx-nxp-bsp = "imx8qmqxp" +HIFI4_PLATFORM:mx8mp-nxp-bsp = "imx8mp" +HIFI4_PLATFORM:mx8ulp-nxp-bsp = "imx8ulp" + +UNSUPPORTED_TESTS = "dsp_tflm" +UNSUPPORTED_TESTS:mx8ulp-nxp-bsp = "" + +do_install:append () { + # Remove firmware not for this platform + find ${D}/${base_libdir}/firmware/imx/dsp -name hifi4_*.bin -not -name *${HIFI4_PLATFORM}* -exec rm {} \; + # Set the expected generic name for the firmware + mv ${D}/${base_libdir}/firmware/imx/dsp/hifi4_${HIFI4_PLATFORM}.bin ${D}/${base_libdir}/firmware/imx/dsp/hifi4.bin + # Remove unit tests not for this platform + for unsupported_test in ${UNSUPPORTED_TESTS}; do + find ${D}/unit_tests/DSP -name $unsupported_test* -exec rm {} \; + done +} + +FILES:${PN} = "${libdir}/imx-mm/audio-codec/dsp \ + ${libdir}/imx-mm/audio-codec/wrap \ + ${base_libdir}/firmware/imx/dsp \ + /unit_tests \ +" +RDEPENDS:${PN} += "imx-dsp-codec-ext" + +INSANE_SKIP:${PN} = "already-stripped arch ldflags dev-so" + +# Fix strip command failed: 'Unable to recognise the format of the input file' +INHIBIT_PACKAGE_STRIP = "1" +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" +INHIBIT_SYSROOT_STRIP = "1" + +PACKAGE_ARCH = "${MACHINE_ARCH}" +COMPATIBLE_MACHINE = "(mx8qm-nxp-bsp|mx8qxp-nxp-bsp|mx8dx-nxp-bsp|mx8mp-nxp-bsp|mx8ulp-nxp-bsp)" diff --git a/recipes-multimedia/imx-dspc-asrc/imx-dspc-asrc_1.0.1.bb b/recipes-multimedia/imx-dspc-asrc/imx-dspc-asrc_1.0.1.bb index 83aa656f..48be837a 100644 --- a/recipes-multimedia/imx-dspc-asrc/imx-dspc-asrc_1.0.1.bb +++ b/recipes-multimedia/imx-dspc-asrc/imx-dspc-asrc_1.0.1.bb @@ -4,7 +4,7 @@ LICENSE = "Proprietary" SECTION = "multimedia" LIC_FILES_CHKSUM = "file://COPYING;md5=72c0f70181bb6e83eee6aab8de12a9f3" -SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true" +SRC_URI = "${FSL_MIRROR}/${BP}.bin;fsl-eula=true" SRC_URI[md5sum] = "d46005ee29ca603caa2e1b1e82953ff1" SRC_URI[sha256sum] = "e79cbf4788a86a0068bbe80c37317e3332ae76e3d5c3ff2eabd71f03121fab6a" @@ -19,4 +19,4 @@ INHIBIT_PACKAGE_DEBUG_SPLIT = "1" FILES:${PN} += "/unit_tests ${datadir}/imx-mm" -COMPATIBLE_MACHINE = "(mx8)" +COMPATIBLE_MACHINE = "(mx8-nxp-bsp)" diff --git a/recipes-multimedia/imx-opencl-converter/imx-opencl-converter_0.2.0.bb b/recipes-multimedia/imx-opencl-converter/imx-opencl-converter_0.2.0.bb new file mode 100644 index 00000000..3dc0a7ea --- /dev/null +++ b/recipes-multimedia/imx-opencl-converter/imx-opencl-converter_0.2.0.bb @@ -0,0 +1,18 @@ +# Copyright 2023 NXP +DESCRIPTION = "NXP Multimedia opencl converter lib" +LICENSE = "Proprietary" +SECTION = "multimedia" +LIC_FILES_CHKSUM = "file://COPYING;md5=44a8052c384584ba09077e85a3d1654f" +DEPENDS = "opencl-headers" + +SRC_URI = "${FSL_MIRROR}/${BP}.bin;fsl-eula=true" +SRC_URI[md5sum] = "dc668682189ce740fb46073e62f58066" +SRC_URI[sha256sum] = "9f283df500c57421b87d96d9af7022ab490bc241aa28d00755beaadabbcd754b" + +inherit fsl-eula-unpack autotools pkgconfig meson + +FILES:${PN} += "${datadir}/" + +COMPATIBLE_MACHINE = "(^$)" +COMPATIBLE_MACHINE:imxgpu = "(mx8-nxp-bsp|mx95-nxp-bsp)" +COMPATIBLE_MACHINE:mx8mm-nxp-bsp = "(^$)" diff --git a/recipes-multimedia/imx-parser/imx-parser_4.6.2.bb b/recipes-multimedia/imx-parser/imx-parser_4.8.3.bb index 08cdd162..4e580085 100644 --- a/recipes-multimedia/imx-parser/imx-parser_4.6.2.bb +++ b/recipes-multimedia/imx-parser/imx-parser_4.8.3.bb @@ -1,11 +1,11 @@ # Copyright (C) 2012-2018 O.S. Systems Software LTDA. # Copyright (C) 2012-2016 Freescale Semiconductor -# Copyright (C) 2017, 2019 NXP +# Copyright (C) 2017-2023 NXP # Released under the MIT license (see COPYING.MIT for the terms) DESCRIPTION = "Freescale Multimedia parser libs" LICENSE = "Proprietary" SECTION = "multimedia" -LIC_FILES_CHKSUM = "file://COPYING;md5=e565271ec9a80ce47abbddc4bffe56fa" +LIC_FILES_CHKSUM = "file://COPYING;md5=44a8052c384584ba09077e85a3d1654f" # For backwards compatibility PROVIDES += "libfslparser" @@ -13,9 +13,9 @@ RREPLACES:${PN} = "libfslparser" RPROVIDES:${PN} = "libfslparser" RCONFLICTS:${PN} = "libfslparser" -SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true" -SRC_URI[md5sum] = "987437601084e0fec59e0dbece9cf46b" -SRC_URI[sha256sum] = "5c26f1e71ab821ef36b60fb8b6df9a3a85418e3eebc87298c4f6bee4abbc4abd" +SRC_URI = "${FSL_MIRROR}/${BP}.bin;fsl-eula=true" +SRC_URI[md5sum] = "9bca484287f5592b86ed10c1761a3fcc" +SRC_URI[sha256sum] = "b25267eefb4618b2ba8d6aba46a5b4e09621a44115036fc896e0777006472043" inherit fsl-eula-unpack autotools pkgconfig @@ -41,4 +41,4 @@ FILES:${PN} += "${libdir}/imx-mm/*/*${SOLIBS} ${libdir}/imx-mm/*/*${SOLIBSDEV}" INHIBIT_SYSROOT_STRIP = "1" -COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" +COMPATIBLE_MACHINE = "(imx-nxp-bsp)" diff --git a/recipes-multimedia/imx-sw-pdm/imx-sw-pdm_1.0.1.bb b/recipes-multimedia/imx-sw-pdm/imx-sw-pdm_1.0.1.bb deleted file mode 100644 index 7fc13c58..00000000 --- a/recipes-multimedia/imx-sw-pdm/imx-sw-pdm_1.0.1.bb +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright 2020 NXP Semiconductors - -DESCRIPTION = "NXP PDM to PCM Software Decimation SIMD Library" -LICENSE = "Proprietary" -SECTION = "multimedia" -LIC_FILES_CHKSUM = "file://COPYING;md5=983e4c77621568488dd902b27e0c2143" - -SRC_URI = "${FSL_MIRROR}/${BP}.bin;fsl-eula=true" -SRC_URI[md5sum] = "65d5b2cb378f96a5cb4577925eda236b" -SRC_URI[sha256sum] = "68fca50d8f7526127ee5650e9002b3f9479b197f3085c68a97f7957f50ec5e5b" - -inherit fsl-eula-unpack autotools pkgconfig - -INSANE_SKIP:${PN} = "already-stripped" - -FILES:${PN} += "${datadir}/imx-mm" - -COMPATIBLE_MACHINE = "(mx8)" diff --git a/recipes-multimedia/imx-sw-pdm/imx-sw-pdm_1.0.3.bb b/recipes-multimedia/imx-sw-pdm/imx-sw-pdm_1.0.3.bb new file mode 100644 index 00000000..2b62b244 --- /dev/null +++ b/recipes-multimedia/imx-sw-pdm/imx-sw-pdm_1.0.3.bb @@ -0,0 +1,22 @@ +# Copyright 2020,2023 NXP + +DESCRIPTION = "NXP PDM to PCM Software Decimation SIMD Library" +LICENSE = "Proprietary" +SECTION = "multimedia" +LIC_FILES_CHKSUM = "file://COPYING;md5=63a38e9f392d8813d6f1f4d0d6fbe657" + +SRC_URI = "${FSL_MIRROR}/${BP}.bin;fsl-eula=true" +SRC_URI[md5sum] = "cbd5af6e9019db789c03c2d05a8bb444" +SRC_URI[sha256sum] = "f778a7b785fc500df5573f5b810a190ddc561267b47ca54b9ddf4ae12571cfe3" + +inherit fsl-eula-unpack autotools pkgconfig + +INSANE_SKIP:${PN} = "already-stripped" + +FILES:${PN} += "${datadir}/imx-mm" + +COMPATIBLE_MACHINE = "(mx8-nxp-bsp)" + +INSANE_SKIP:append:libc-musl = " file-rdeps" + +RDEPENDS:${PN}:append:libc-musl = " gcompat" diff --git a/recipes-multimedia/imx-vpuwrap/imx-vpuwrap_4.6.2.bb b/recipes-multimedia/imx-vpuwrap/imx-vpuwrap_git.bb index 03702b16..af15e7b1 100644 --- a/recipes-multimedia/imx-vpuwrap/imx-vpuwrap_4.6.2.bb +++ b/recipes-multimedia/imx-vpuwrap/imx-vpuwrap_git.bb @@ -1,19 +1,18 @@ # Copyright (C) 2013-2016 Freescale Semiconductor -# Copyright (C) 2017-2020 NXP +# Copyright 2017-2023 NXP # Released under the MIT license (see COPYING.MIT for the terms) DESCRIPTION = "Freescale Multimedia VPU wrapper" LICENSE = "Proprietary" SECTION = "multimedia" -LIC_FILES_CHKSUM = "file://COPYING;md5=e565271ec9a80ce47abbddc4bffe56fa" +LIC_FILES_CHKSUM = "file://COPYING;md5=2827219e81f28aba7c6a569f7c437fa7" DEPENDS = "virtual/imxvpu" -DEPENDS:append:mx8mp = " imx-vpu-hantro-vc" +DEPENDS:append:mx8mp-nxp-bsp = " imx-vpu-hantro-vc" SRC_URI = "git://github.com/NXP/imx-vpuwrap.git;protocol=https;branch=${SRCBRANCH}" - -SRCBRANCH = "MM_04.06.02_2108_L5.10.y" -SRCREV = "f09ceba7bcf733b1b27e57462496d3b81ca28e50" +SRCBRANCH = "MM_04.08.03_2312_L6.6.y" +SRCREV = "f974cecdb00b4a214e4b5229f2279e772ee43306" S = "${WORKDIR}/git" diff --git a/recipes-multimedia/libimxvpuapi/libimxvpuapi2_2.2.0.bb b/recipes-multimedia/libimxvpuapi/libimxvpuapi2_2.3.0.bb index 2b995b60..1e7d8252 100644 --- a/recipes-multimedia/libimxvpuapi/libimxvpuapi2_2.2.0.bb +++ b/recipes-multimedia/libimxvpuapi/libimxvpuapi2_2.3.0.bb @@ -1,24 +1,27 @@ DESCRIPTION = "frontend for the i.MX6 / i.MX8 VPU hardware video engines" HOMEPAGE = "https://github.com/Freescale/libimxvpuapi" -LICENSE = "LGPLv2.1" +LICENSE = "LGPL-2.1-only" LIC_FILES_CHKSUM = "file://LICENSE;md5=38fa42a5a6425b26d2919b17b1527324" SECTION = "multimedia" DEPENDS = "virtual/imxvpu libimxdmabuffer" +# Add imx-vpu-hantro-vc as dependency for being +# able to encode video using the VC8000E encoder +DEPENDS:append:mx8mp-nxp-bsp = " imx-vpu-hantro-vc" PV .= "+git${SRCPV}" SRCBRANCH ?= "master" -SRCREV = "a650f13fb5de94e0c7c9e77f4d07ea275ea80dac" +SRCREV = "6f803f46d6b53a08cf02fc3d440072e01e2f3a09" SRC_URI = "git://github.com/Freescale/libimxvpuapi.git;branch=${SRCBRANCH};protocol=https" S = "${WORKDIR}/git" inherit waf pkgconfig use-imx-headers -IMX_PLATFORM:mx6 = "imx6" -IMX_PLATFORM:mx8mq = "imx8m" -IMX_PLATFORM:mx8mm = "imx8mm" -IMX_PLATFORM:mx8mp = "imx8mm" +IMX_PLATFORM:mx6-nxp-bsp = "imx6" +IMX_PLATFORM:mx8mq-nxp-bsp = "imx8m" +IMX_PLATFORM:mx8mm-nxp-bsp = "imx8mm" +IMX_PLATFORM:mx8mp-nxp-bsp = "imx8mp" EXTRA_OECONF = "--imx-platform=${IMX_PLATFORM} --libdir=${libdir} --imx-headers=${STAGING_INCDIR_IMX} --sysroot-path=${RECIPE_SYSROOT}" diff --git a/recipes-multimedia/libimxvpuapi/libimxvpuapi_git.bb b/recipes-multimedia/libimxvpuapi/libimxvpuapi_git.bb index 778514fb..e3a05193 100644 --- a/recipes-multimedia/libimxvpuapi/libimxvpuapi_git.bb +++ b/recipes-multimedia/libimxvpuapi/libimxvpuapi_git.bb @@ -1,7 +1,7 @@ # Copyright 2018 (C) O.S. Systems Software LTDA. DESCRIPTION = "frontend for the i.MX6 VPU hardware video engine" HOMEPAGE = "https://github.com/Freescale/libimxvpuapi" -LICENSE = "LGPLv2.1" +LICENSE = "LGPL-2.1-only" LIC_FILES_CHKSUM = "file://LICENSE;md5=38fa42a5a6425b26d2919b17b1527324" SECTION = "multimedia" DEPENDS = "imx-vpu" @@ -16,6 +16,6 @@ S = "${WORKDIR}/git" inherit waf pkgconfig -COMPATIBLE_MACHINE = "(mx6q|mx6dl)" +COMPATIBLE_MACHINE = "(mx6q-nxp-bsp|mx6dl-nxp-bsp)" EXTRA_OECONF = "--libdir=${libdir}" diff --git a/recipes-multimedia/pulseaudio/pulseaudio/imx-nxp-bsp/0001-Fix-pulseaudio-mutex-issue-when-do-pause-in-gstreame.patch b/recipes-multimedia/pulseaudio/pulseaudio/imx-nxp-bsp/0001-Fix-pulseaudio-mutex-issue-when-do-pause-in-gstreame.patch new file mode 100644 index 00000000..10d5a010 --- /dev/null +++ b/recipes-multimedia/pulseaudio/pulseaudio/imx-nxp-bsp/0001-Fix-pulseaudio-mutex-issue-when-do-pause-in-gstreame.patch @@ -0,0 +1,32 @@ +From c21e24f5c53e81fc715905c54a6c82b69e397e63 Mon Sep 17 00:00:00 2001 +From: "shengjiu.wang" <b02247@freescale.com> +Date: Thu, 3 Apr 2014 14:22:02 +0800 +Subject: [PATCH] Fix pulseaudio mutex issue when do pause in gstreamer + +The error log is "Assertion 'pthread_mutex_unlock(&m->mutex) == 0' +failed at pulsecore/mutex-posix.c:106, function pa_mutex_unlock(). Aborting" + +This fix is a workaround base on the solution from this link " +https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/932096" + +Upstream-Status: Inappropriate [i.MX specific] +Signed-off-by: shengjiu.wang <b02247@freescale.com> +--- + src/pulsecore/mutex-posix.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/pulsecore/mutex-posix.c b/src/pulsecore/mutex-posix.c +index 36c2787..d592501 100644 +--- a/src/pulsecore/mutex-posix.c ++++ b/src/pulsecore/mutex-posix.c +@@ -30,6 +30,7 @@ + #include <pulsecore/macro.h> + + #include "mutex.h" ++#undef HAVE_PTHREAD_PRIO_INHERIT + + struct pa_mutex { + pthread_mutex_t mutex; +-- +1.7.9.5 + diff --git a/recipes-multimedia/pulseaudio/pulseaudio/imx/pulseaudio-remove-the-control-for-speaker-headphone-widge.patch b/recipes-multimedia/pulseaudio/pulseaudio/imx-nxp-bsp/0100-pulseaudio-remove-the-control-for-speaker-headphone-widge.patch index 57c28741..57c28741 100644 --- a/recipes-multimedia/pulseaudio/pulseaudio/imx/pulseaudio-remove-the-control-for-speaker-headphone-widge.patch +++ b/recipes-multimedia/pulseaudio/pulseaudio/imx-nxp-bsp/0100-pulseaudio-remove-the-control-for-speaker-headphone-widge.patch diff --git a/recipes-multimedia/pulseaudio/pulseaudio/imx/daemon.conf b/recipes-multimedia/pulseaudio/pulseaudio/imx-nxp-bsp/daemon.conf index 9eb954bb..b9f533a0 100644 --- a/recipes-multimedia/pulseaudio/pulseaudio/imx/daemon.conf +++ b/recipes-multimedia/pulseaudio/pulseaudio/imx-nxp-bsp/daemon.conf @@ -76,6 +76,8 @@ rlimit-rttime = 4000000 ; default-sample-format = s16le ; default-sample-rate = 44100 ; alternate-sample-rate = 48000 +# Disable alternate-sample-rate by setting same as default +alternate-sample-rate = 44100 ; default-sample-channels = 2 ; default-channel-map = front-left,front-right diff --git a/recipes-multimedia/pulseaudio/pulseaudio/imx/default.pa b/recipes-multimedia/pulseaudio/pulseaudio/imx-nxp-bsp/default.pa index 83a6ba8d..b6c646b9 100644 --- a/recipes-multimedia/pulseaudio/pulseaudio/imx/default.pa +++ b/recipes-multimedia/pulseaudio/pulseaudio/imx-nxp-bsp/default.pa @@ -72,7 +72,7 @@ load-module module-bluetooth-policy .endif .ifexists module-bluetooth-discover.so -load-module module-bluetooth-discover +load-module module-bluetooth-discover headset=auto .endif ### Load several protocols diff --git a/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend b/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend index ae69be4c..93f71e8f 100644 --- a/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend +++ b/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend @@ -1,13 +1,20 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}/imx-nxp-bsp:" -CACHED_CONFIGUREVARS:append:mx6 = " ax_cv_PTHREAD_PRIO_INHERIT=no" +SRC_URI += "${SRC_URI_IMX}" +SRC_URI_IMX = "" +SRC_URI_IMX:mx6-nxp-bsp = " \ + file://0001-Fix-pulseaudio-mutex-issue-when-do-pause-in-gstreame.patch \ + file://daemon.conf \ + file://default.pa" +SRC_URI_IMX:mx7-nxp-bsp = " \ + ${SRC_URI_IMX:mx6-nxp-bsp} \ + file://0100-pulseaudio-remove-the-control-for-speaker-headphone-widge.patch" +SRC_URI_IMX:mx8-nxp-bsp = " \ + ${SRC_URI_IMX:mx6-nxp-bsp}" +SRC_URI_IMX:mx9-nxp-bsp = " \ + ${SRC_URI_IMX:mx6-nxp-bsp}" -FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}/imx:" - -SRC_URI:append:mx6 = " file://daemon.conf file://default.pa" -SRC_URI:append:mx7 = " file://daemon.conf file://default.pa \ - file://pulseaudio-remove-the-control-for-speaker-headphone-widge.patch \ -" -SRC_URI:append:mx8 = " file://daemon.conf file://default.pa" +CACHED_CONFIGUREVARS:append:mx6-nxp-bsp = " ax_cv_PTHREAD_PRIO_INHERIT=no" do_install:append() { if [ -e "${WORKDIR}/daemon.conf" ] && [ -e "${WORKDIR}/default.pa" ]; then @@ -16,6 +23,7 @@ do_install:append() { fi } -PACKAGE_ARCH:mx6 = "${MACHINE_SOCARCH}" -PACKAGE_ARCH:mx7 = "${MACHINE_SOCARCH}" -PACKAGE_ARCH:mx8 = "${MACHINE_SOCARCH}" +PACKAGE_ARCH:mx6-nxp-bsp = "${MACHINE_SOCARCH}" +PACKAGE_ARCH:mx7-nxp-bsp = "${MACHINE_SOCARCH}" +PACKAGE_ARCH:mx8-nxp-bsp = "${MACHINE_SOCARCH}" +PACKAGE_ARCH:mx9-nxp-bsp = "${MACHINE_SOCARCH}" diff --git a/recipes-multimedia/tinycompress/tinycompress/0001-tinycompress-Add-id3-decoding.patch b/recipes-multimedia/tinycompress/tinycompress/0001-tinycompress-Add-id3-decoding.patch index f578148a..78ff6989 100755 --- a/recipes-multimedia/tinycompress/tinycompress/0001-tinycompress-Add-id3-decoding.patch +++ b/recipes-multimedia/tinycompress/tinycompress/0001-tinycompress-Add-id3-decoding.patch @@ -3,6 +3,7 @@ From: Shengjiu Wang <shengjiu.wang@nxp.com> Date: Fri, 13 Jul 2018 18:13:24 +0800 Subject: [PATCH] tinycompress: Add id3 decoding +Upstream-Status: Pending Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> --- include/tinycompress/id3_tag_decode.h | 198 +++++++++++ diff --git a/recipes-multimedia/tinycompress/tinycompress_1.1.6.bb b/recipes-multimedia/tinycompress/tinycompress_1.1.6.bb index 6c0fc72e..803c38df 100644 --- a/recipes-multimedia/tinycompress/tinycompress_1.1.6.bb +++ b/recipes-multimedia/tinycompress/tinycompress_1.1.6.bb @@ -1,5 +1,5 @@ DESCRIPTION = "A library to handle compressed formats like MP3 etc." -LICENSE = "LGPLv2.1 | BSD-3-Clause" +LICENSE = "LGPL-2.1-only | BSD-3-Clause" LIC_FILES_CHKSUM = "file://COPYING;md5=cf9105c1a2d4405cbe04bbe3367373a0" DEPENDS = "alsa-lib" |