diff options
Diffstat (limited to 'meta/recipes-multimedia')
203 files changed, 5089 insertions, 4940 deletions
diff --git a/meta/recipes-multimedia/alsa/alsa-fpu.inc b/meta/recipes-multimedia/alsa/alsa-fpu.inc deleted file mode 100644 index 50402307c5..0000000000 --- a/meta/recipes-multimedia/alsa/alsa-fpu.inc +++ /dev/null @@ -1,6 +0,0 @@ - -def get_alsa_fpu_setting(bb, d): - if d.getVar('TARGET_FPU', True) in [ 'soft' ]: - return "--with-softfloat" - return "" - diff --git a/meta/recipes-multimedia/alsa/alsa-lib/0001-build-Do-not-try-to-detect-cross-compiler.patch b/meta/recipes-multimedia/alsa/alsa-lib/0001-build-Do-not-try-to-detect-cross-compiler.patch deleted file mode 100644 index 583bc3daab..0000000000 --- a/meta/recipes-multimedia/alsa/alsa-lib/0001-build-Do-not-try-to-detect-cross-compiler.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 17aeb3565f411e7796cabe403f92d15948a8ca95 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 21 Aug 2015 14:42:45 -0700 -Subject: [PATCH] build: Do not try to detect cross-compiler - -cross compilers are passed via path may not be a gcc based cross -compiler in such cases this check fails and try's to force gcc based -cross compiler detection, This code is a convenience that limits the -build system - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Pending - - configure.ac | 14 -------------- - 1 file changed, 14 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 3022cf8..9d77440 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -27,20 +27,6 @@ AC_PREFIX_DEFAULT(/usr) - - dnl Checks for programs. - --dnl try to gues cross-compiler if not set --if test "x$host" != "x$build" -a -z "`echo $CC | grep -e '-gcc'`"; --then -- AC_MSG_CHECKING(for cross-compiler) -- -- which ${program_prefix}gcc >/dev/null 2>&1 && CC=${program_prefix}gcc -- which ${host_cpu}-${host_os}-gcc >/dev/null 2>&1 \ -- && CC=${host_cpu}-${host_os}-gcc -- which ${host_cpu}-${host_vendor}-${host_os}-gcc >/dev/null 2>&1 \ -- && CC=${host_cpu}-${host_vendor}-${host_os}-gcc -- -- AC_MSG_RESULT($CC) --fi -- - CFLAGS="$CFLAGS -D_GNU_SOURCE" - - --- -2.1.4 - diff --git a/meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch b/meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch deleted file mode 100644 index 75a6eb8a3c..0000000000 --- a/meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch +++ /dev/null @@ -1,51 +0,0 @@ -From e33357b59a10d44e9bec5d24100ce23ca300cc79 Mon Sep 17 00:00:00 2001 -From: "Hong H. Pham" <hong.pham@windriver.com> -Date: Fri, 29 Aug 2014 17:13:55 +0300 -Subject: [PATCH] Check if wordexp function is supported - -eglibc could be configured to build without wordexp, so it is not enough -to check if wordexp.h exists (the header file could be installed, but it's -possible that the wordexp() function is not supported). An additional -check if wordexp() is supported by the system C library is needed. - -Upstream-Status: Inappropriate [configuration] - -Signed-off-by: Hong H. Pham <hong.pham@windriver.com> -Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> ---- - configure.ac | 5 ++++- - src/userfile.c | 2 +- - 2 files changed, 5 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index b8353a0..773b72f 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -311,7 +311,10 @@ fi - AC_SUBST(ALSA_DEPLIBS) - - dnl Check for headers --AC_CHECK_HEADERS([wordexp.h endian.h sys/endian.h]) -+AC_CHECK_HEADERS([wordexp.h endian.h sys/endian.h], -+ dnl Make sure wordexp is supported by the C library -+ AC_CHECK_FUNCS([wordexp]) -+) - - dnl Check for resmgr support... - AC_MSG_CHECKING(for resmgr support) -diff --git a/src/userfile.c b/src/userfile.c -index 3a73836..b8ce809 100644 ---- a/src/userfile.c -+++ b/src/userfile.c -@@ -32,7 +32,7 @@ - * stores the first matchine one. The returned string is strdup'ed. - */ - --#ifdef HAVE_WORDEXP_H -+#if (defined(HAVE_WORDEXP_H) && defined(HAVE_WORDEXP)) - #include <wordexp.h> - #include <assert.h> - int snd_user_file(const char *file, char **result) --- -1.9.1 - diff --git a/meta/recipes-multimedia/alsa/alsa-lib_1.0.29.bb b/meta/recipes-multimedia/alsa/alsa-lib_1.0.29.bb deleted file mode 100644 index 730f427402..0000000000 --- a/meta/recipes-multimedia/alsa/alsa-lib_1.0.29.bb +++ /dev/null @@ -1,51 +0,0 @@ -SUMMARY = "ALSA sound library" -HOMEPAGE = "http://www.alsa-project.org" -BUGTRACKER = "https://bugtrack.alsa-project.org/alsa-bug/login_page.php" -SECTION = "libs/multimedia" -LICENSE = "LGPLv2.1 & GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34 \ - file://src/socket.c;beginline=1;endline=26;md5=11ff89a8a7a4a690a5c78effe8159545" - -BBCLASSEXTEND = "native nativesdk" - -# configure.in sets -D__arm__ on the command line for any arm system -# (not just those with the ARM instruction set), this should be removed, -# (or replaced by a permitted #define). -#FIXME: remove the following -ARM_INSTRUCTION_SET = "arm" - -SRC_URI = "ftp://ftp.alsa-project.org/pub/lib/${BP}.tar.bz2 \ - file://Check-if-wordexp-function-is-supported.patch \ - file://0001-build-Do-not-try-to-detect-cross-compiler.patch \ -" -SRC_URI[md5sum] = "de67e0eca72474d6b1121037dafe1024" -SRC_URI[sha256sum] = "73043c35eb9636be0f4af6a240235c213f12a25feb1f04aeeac8cb7e30fcbdd0" - -inherit autotools pkgconfig - -require alsa-fpu.inc -EXTRA_OECONF += "${@get_alsa_fpu_setting(bb, d)} " - -EXTRA_OECONF = "--disable-python" - -EXTRA_OECONF_append_libc-uclibc = " --with-versioned=no " - -PACKAGES =+ "alsa-server libasound alsa-conf-base alsa-conf alsa-doc" -FILES_${PN} += "${libdir}/${BPN}/smixer/*.so" -FILES_${PN}-dbg += "${libdir}/${BPN}/smixer/.debug" -FILES_${PN}-dev += "${libdir}/${BPN}/smixer/*.la" -FILES_libasound = "${libdir}/libasound.so.*" -FILES_alsa-server = "${bindir}/*" -FILES_alsa-conf = "${datadir}/alsa/" -FILES_alsa-conf-base = "\ -${datadir}/alsa/alsa.conf \ -${datadir}/alsa/cards/aliases.conf \ -${datadir}/alsa/pcm/default.conf \ -${datadir}/alsa/pcm/dmix.conf \ -${datadir}/alsa/pcm/dsnoop.conf" - -RDEPENDS_libasound = "alsa-conf-base alsa-conf" -# upgrade path -RPROVIDES_${PN}-dev = "alsa-dev" -RREPLACES_${PN}-dev = "alsa-dev" -RCONFLICTS_${PN}-dev = "alsa-dev" diff --git a/meta/recipes-multimedia/alsa/alsa-lib_1.2.5.1.bb b/meta/recipes-multimedia/alsa/alsa-lib_1.2.5.1.bb new file mode 100644 index 0000000000..cf7c3fcd43 --- /dev/null +++ b/meta/recipes-multimedia/alsa/alsa-lib_1.2.5.1.bb @@ -0,0 +1,44 @@ +SUMMARY = "ALSA sound library" +DESCRIPTION = "(Occasionally a.k.a. libasound) is a userspace library that \ +provides a level of abstraction over the /dev interfaces provided by the kernel modules." +HOMEPAGE = "http://www.alsa-project.org" +BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking" +SECTION = "libs/multimedia" +LICENSE = "LGPLv2.1 & GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7 \ + file://src/socket.c;md5=285675b45e83f571c6a957fe4ab79c93;beginline=9;endline=24 \ + " + +SRC_URI = "https://www.alsa-project.org/files/pub/lib/${BP}.tar.bz2" +SRC_URI[sha256sum] = "628421d950cecaf234de3f899d520c0a6923313c964ad751ffac081df331438e" + +inherit autotools pkgconfig + +EXTRA_OECONF += " \ + ${@bb.utils.contains('TARGET_FPU', 'soft', '--with-softfloat', '', d)} \ + --disable-python \ +" + +PACKAGES =+ "alsa-server alsa-conf libatopology" + +FILES:alsa-server = "${bindir}/*" +FILES:alsa-conf = "${datadir}/alsa/" +FILES:libatopology = "${libdir}/libatopology.so.*" + +RDEPENDS:${PN}:class-target = "alsa-conf alsa-ucm-conf" +RDEPENDS:libatopology:class-target = "alsa-topology-conf" + +# upgrade path +RPROVIDES:${PN} = "libasound" +RREPLACES:${PN} = "libasound" +RCONFLICTS:${PN} = "libasound" + +RPROVIDES:${PN}-dev = "alsa-dev" +RREPLACES:${PN}-dev = "alsa-dev" +RCONFLICTS:${PN}-dev = "alsa-dev" + +RPROVIDES:alsa-conf = "alsa-conf-base" +RREPLACES:alsa-conf = "alsa-conf-base" +RCONFLICTS:alsa-conf = "alsa-conf-base" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-multimedia/alsa/alsa-plugins/0001-arcam-av-Include-sys-select.h-for-fd_set-definition.patch b/meta/recipes-multimedia/alsa/alsa-plugins/0001-arcam-av-Include-sys-select.h-for-fd_set-definition.patch deleted file mode 100644 index c70c72cb7e..0000000000 --- a/meta/recipes-multimedia/alsa/alsa-plugins/0001-arcam-av-Include-sys-select.h-for-fd_set-definition.patch +++ /dev/null @@ -1,31 +0,0 @@ -From d28c655be3ac4fcb8024555983884f832ee18787 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 29 May 2015 15:17:30 -0700 -Subject: [PATCH] arcam-av: Include sys/select.h for fd_set definition - -fixes build errors on non-glibc based systems - -arcam-av/arcam_av.c:389:2: error: unknown type name 'fd_set' - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Submitted - - arcam-av/arcam_av.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/arcam-av/arcam_av.c b/arcam-av/arcam_av.c -index 0491fc6..fff96f9 100644 ---- a/arcam-av/arcam_av.c -+++ b/arcam-av/arcam_av.c -@@ -31,6 +31,7 @@ - #include <unistd.h> - - #include <sys/ipc.h> -+#include <sys/select.h> - #include <sys/shm.h> - #include <sys/stat.h> - #include <sys/stat.h> --- -2.1.4 - diff --git a/meta/recipes-multimedia/alsa/alsa-plugins/0001-include-speexdsp_types.h-not-speex_types.h.patch b/meta/recipes-multimedia/alsa/alsa-plugins/0001-include-speexdsp_types.h-not-speex_types.h.patch deleted file mode 100644 index e5199fb85a..0000000000 --- a/meta/recipes-multimedia/alsa/alsa-plugins/0001-include-speexdsp_types.h-not-speex_types.h.patch +++ /dev/null @@ -1,71 +0,0 @@ -From ca41e96a49a568128354f65f90a769debf5435f1 Mon Sep 17 00:00:00 2001 -From: Tanu Kaskinen <tanu.kaskinen@linux.intel.com> -Date: Thu, 9 Jul 2015 11:58:12 +0300 -Subject: [PATCH] include speexdsp_types.h, not speex_types.h - -Speexdsp was separated from speex in 1.2rc2. speex_types.h is not -shipped by speexdsp, so alsa-plugins shouldn't use that file. speexdsp -has speexdsp_types.h, which has the same contents as speex_types.h. - -speexdsp_types.h is a new file introduced in 1.2rc2, so this change -bumps the minimum supported speexdsp version. The version check in -configure.ac will actually break if speexdsp 1.2 ever gets released, -because pkg-config thinks that "1.2" < "1.2rc2", but I think it's -useful to fail if the installed speexdsp version is 1.2rc1 (which I -believe is very common on current distributions). If a non-rc version -of speexdsp will ever get released, I hope version number 1.2 will be -skipped for this reason. (A non-rc version seems unlikely, since -1.2rc1 was released years ago, so it's pretty likely that the project -is stuck on so called "release candidates" forever...) - -Upstream-Status: Submitted (http://thread.gmane.org/gmane.linux.alsa.devel/141149) - -Signed-off-by: Tanu Kaskinen <tanu.kaskinen@linux.intel.com> ---- - configure.ac | 2 +- - pph/arch.h | 2 +- - pph/speex_resampler.h | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 902a6d7..c554d22 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -108,7 +108,7 @@ AC_SUBST(AVCODEC_CFLAGS) - AC_SUBST(AVCODEC_LIBS) - AC_SUBST(AVCODEC_HEADER) - --PKG_CHECK_MODULES(speexdsp, [speexdsp >= 1.2], [HAVE_SPEEXDSP="yes"], [HAVE_SPEEXDSP=""]) -+PKG_CHECK_MODULES(speexdsp, [speexdsp >= 1.2rc2], [HAVE_SPEEXDSP="yes"], [HAVE_SPEEXDSP=""]) - AM_CONDITIONAL(HAVE_SPEEXDSP, test "$HAVE_SPEEXDSP" = "yes") - - AC_ARG_WITH([speex], -diff --git a/pph/arch.h b/pph/arch.h -index e2d731a..a07d0d9 100644 ---- a/pph/arch.h -+++ b/pph/arch.h -@@ -36,7 +36,7 @@ - #define ARCH_H - - #ifndef OUTSIDE_SPEEX --#include "speex/speex_types.h" -+#include "speex/speexdsp_types.h" - #endif - - #define ABS(x) ((x) < 0 ? (-(x)) : (x)) /**< Absolute integer value. */ -diff --git a/pph/speex_resampler.h b/pph/speex_resampler.h -index c44fbcd..aa85abb 100644 ---- a/pph/speex_resampler.h -+++ b/pph/speex_resampler.h -@@ -82,7 +82,7 @@ - - #else /* OUTSIDE_SPEEX */ - --#include "speex/speex_types.h" -+#include "speex/speexdsp_types.h" - - #endif /* OUTSIDE_SPEEX */ - --- -1.9.3 - diff --git a/meta/recipes-multimedia/alsa/alsa-plugins_1.0.29.bb b/meta/recipes-multimedia/alsa/alsa-plugins_1.0.29.bb deleted file mode 100644 index c928618c8d..0000000000 --- a/meta/recipes-multimedia/alsa/alsa-plugins_1.0.29.bb +++ /dev/null @@ -1,105 +0,0 @@ -DESCRIPTION = "ALSA Plugins" -HOMEPAGE = "http://alsa-project.org" -SECTION = "multimedia" - -# The primary license of alsa-plugins is LGPLv2.1. -# -# m4/attributes.m4 is licensed under GPLv2+. m4/attributes.m4 is part of the -# build system, and doesn't affect the licensing of the build result. -# -# The samplerate plugin source code is licensed under GPLv2+ to be consistent -# with the libsamplerate license. -LICENSE = "LGPLv2.1 & GPLv2+" -LIC_FILES_CHKSUM = "\ - file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34 \ - file://COPYING.GPL;md5=94d55d512a9ba36caa9b7df079bae19f \ - file://m4/attributes.m4;endline=33;md5=b25958da44c02231e3641f1bccef53eb \ - file://rate/rate_samplerate.c;endline=19;md5=f3d3ce0b189846a486517d97a854b276 \ -" - -SRC_URI = "ftp://ftp.alsa-project.org/pub/plugins/${BP}.tar.bz2 \ - file://0001-arcam-av-Include-sys-select.h-for-fd_set-definition.patch \ - file://0001-include-speexdsp_types.h-not-speex_types.h.patch \ -" -SRC_URI[md5sum] = "a66797b4471e3cbe96575207bfbe252c" -SRC_URI[sha256sum] = "325d85cac285f632b83e0191ae3f348bad03c1f007b937042f164abb81ea6532" - -DEPENDS += "alsa-lib" - -inherit autotools pkgconfig - -PACKAGECONFIG ??= "\ - samplerate \ - speexdsp \ - ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)} \ -" -PACKAGECONFIG[avcodec] = "--enable-avcodec,--disable-avcodec,libav" -PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack" -PACKAGECONFIG[maemo-plugin] = "--enable-maemo-plugin,--disable-maemo-plugin" -PACKAGECONFIG[maemo-resource-manager] = "--enable-maemo-resource-manager,--disable-maemo-resource-manager,dbus" -PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio" -PACKAGECONFIG[samplerate] = "--enable-samplerate,--disable-samplerate,libsamplerate0" -PACKAGECONFIG[speexdsp] = "--with-speex=lib,--with-speex=no,speexdsp" - -PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'alsa-plugins-pulseaudio-conf', '', d)}" - -PACKAGES_DYNAMIC = "^libasound-module-.*" - -# The alsa-plugins package doesn't itself contain anything, it just depends on -# all built plugins. -ALLOW_EMPTY_${PN} = "1" - -do_install_append() { - rm ${D}${libdir}/alsa-lib/*.la - - # We use the example as is, so just drop the .example suffix. - if [ "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'yes', 'no', d)}" = "yes" ]; then - mv ${D}${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf.example ${D}${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf - fi -} - -python populate_packages_prepend() { - plugindir = bb.data.expand('${libdir}/alsa-lib/', d) - packages = " ".join(do_split_packages(d, plugindir, '^libasound_module_(.*)\.so$', 'libasound-module-%s', 'Alsa plugin for %s', extra_depends='')) - d.setVar("RDEPENDS_alsa-plugins", packages) -} - -# The rate plugins create some symlinks. For example, the samplerate plugin -# creates these links to the main plugin file: -# -# libasound_module_rate_samplerate_best.so -# libasound_module_rate_samplerate_linear.so -# libasound_module_rate_samplerate_medium.so -# libasound_module_rate_samplerate_order.so -# -# The other rate plugins create similar links. We have to add the links to -# FILES manually, because do_split_packages() skips the links (which is good, -# because we wouldn't want do_split_packages() to create separate packages for -# the symlinks). -# -# The symlinks cause QA errors, because usually it's a bug if a non -# -dev/-dbg/-nativesdk package contains links to .so files, but in this case -# the errors are false positives, so we disable the QA checks. -FILES_${MLPREFIX}libasound-module-rate-lavcrate += "${libdir}/alsa-lib/*rate_lavcrate_*.so" -FILES_${MLPREFIX}libasound-module-rate-samplerate += "${libdir}/alsa-lib/*rate_samplerate_*.so" -FILES_${MLPREFIX}libasound-module-rate-speexrate += "${libdir}/alsa-lib/*rate_speexrate_*.so" -INSANE_SKIP_${MLPREFIX}libasound-module-rate-lavcrate = "dev-so" -INSANE_SKIP_${MLPREFIX}libasound-module-rate-samplerate = "dev-so" -INSANE_SKIP_${MLPREFIX}libasound-module-rate-speexrate = "dev-so" - -FILES_${PN}-dbg += "${libdir}/alsa-lib/.debug" - -# 50-pulseaudio.conf defines a device named "pulse" that applications can use -# if they explicitly want to use the PulseAudio plugin. -# 99-pulseaudio-default.conf configures the "default" device to use the -# PulseAudio plugin. -FILES_${PN}-pulseaudio-conf += "\ - ${datadir}/alsa/alsa.conf.d/50-pulseaudio.conf \ - ${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf \ -" - -RDEPENDS_${PN}-pulseaudio-conf += "\ - libasound-module-conf-pulse \ - libasound-module-ctl-pulse \ - libasound-module-pcm-pulse \ -" diff --git a/meta/recipes-multimedia/alsa/alsa-plugins_1.2.5.bb b/meta/recipes-multimedia/alsa/alsa-plugins_1.2.5.bb new file mode 100644 index 0000000000..0eac982e1a --- /dev/null +++ b/meta/recipes-multimedia/alsa/alsa-plugins_1.2.5.bb @@ -0,0 +1,174 @@ +SUMMARY = "ALSA Plugins" +DESCRIPTION = "Used to create virtual devices that can be used like normal \ +hardware devices but cause extra processing of the sound stream to take place. \ +They are used while configuring ALSA in the .asoundrc file." +HOMEPAGE = "http://alsa-project.org" +BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking" +SECTION = "multimedia" + +# The primary license of alsa-plugins is LGPLv2.1. +# +# m4/attributes.m4 is licensed under GPLv2+. m4/attributes.m4 is part of the +# build system, and doesn't affect the licensing of the build result. +# +# The samplerate plugin source code is licensed under GPLv2+ to be consistent +# with the libsamplerate license. However, if the licensee has a commercial +# license for libsamplerate, the samplerate plugin may be used under the terms +# of LGPLv2.1 like the rest of the plugins. +LICENSE = "LGPLv2.1 & GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7 \ + file://COPYING.GPL;md5=59530bdf33659b29e73d4adb9f9f6552 \ + file://m4/attributes.m4;endline=33;md5=bb8c6b2a67ac15156961e242fec33e50 \ + file://rate/rate_samplerate.c;endline=35;md5=fd77bce85f4a338c0e8ab18430b69fae \ + " + +SRC_URI = "https://www.alsa-project.org/files/pub/plugins/${BP}.tar.bz2" +SRC_URI[sha256sum] = "42eef98433d2c8d11f1deeeb459643619215a75aa5a5bbdd06a794e4c413df20" + +DEPENDS += "alsa-lib" + +inherit autotools pkgconfig + +PACKAGECONFIG ??= "\ + samplerate \ + speexdsp \ + ${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio', d)} \ +" +PACKAGECONFIG[aaf] = "--enable-aaf,--disable-aaf,avtp" +PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack" +PACKAGECONFIG[libav] = "--enable-libav,--disable-libav,libav" +PACKAGECONFIG[maemo-plugin] = "--enable-maemo-plugin,--disable-maemo-plugin" +PACKAGECONFIG[maemo-resource-manager] = "--enable-maemo-resource-manager,--disable-maemo-resource-manager,dbus" +PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio" +PACKAGECONFIG[samplerate] = "--enable-samplerate,--disable-samplerate,libsamplerate0" +PACKAGECONFIG[speexdsp] = "--with-speex=lib,--with-speex=no,speexdsp" + +PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'alsa-plugins-pulseaudio-conf', '', d)}" + +PACKAGES_DYNAMIC = "^libasound-module-.*" + +# The alsa-plugins package doesn't itself contain anything, it just depends on +# all built plugins. +FILES:${PN} = "" +ALLOW_EMPTY:${PN} = "1" + +do_install:append() { + rm -f ${D}${libdir}/alsa-lib/*.la + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'yes', 'no', d)}" = "yes" ]; then + # We use the example as is. Upstream installs the file under + # /etc, but we move it under /usr/share and add a symlink under + # /etc to be consistent with other installed configuration + # files. + mv ${D}${sysconfdir}/alsa/conf.d/99-pulseaudio-default.conf.example ${D}${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf + ln -s ${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf ${D}${sysconfdir}/alsa/conf.d/99-pulseaudio-default.conf + fi +} + +python populate_packages:prepend() { + plugindir = d.expand('${libdir}/alsa-lib/') + packages = " ".join(do_split_packages(d, plugindir, r'^libasound_module_(.*)\.so$', 'libasound-module-%s', 'Alsa plugin for %s', extra_depends='')) + d.setVar("RDEPENDS:alsa-plugins", packages) +} + +# Many plugins have a configuration file (plus a symlink in /etc) associated +# with them. We put the plugin and it's configuration usually in the same +# package, but that's problematic when the configuration file is related to +# multiple plugins, as is the case with the pulse, oss and maemo plugins. In +# case of the pulse plugins, we have a separate alsa-plugins-pulseaudio-conf +# package that depends on all the pulse plugins, which ensures that all plugins +# that the configuration references are installed. The oss and maemo +# configuration files, on the other hand, are in the respective pcm plugin +# packages. Therefore it's possible to install the configuration file without +# the ctl plugin that the configuration file references. This is unlikely to +# cause big problems, but some kind of improvement to the packaging could +# probably be done here (at least it would be good to handle the different +# plugins in a consistent way). +FILES:${MLPREFIX}libasound-module-ctl-arcam-av += "\ + ${datadir}/alsa/alsa.conf.d/50-arcam-av-ctl.conf \ + ${sysconfdir}/alsa/conf.d/50-arcam-av-ctl.conf \ +" +FILES:${MLPREFIX}libasound-module-pcm-a52 += "\ + ${datadir}/alsa/alsa.conf.d/60-a52-encoder.conf \ + ${sysconfdir}/alsa/conf.d/60-a52-encoder.conf \ +" +FILES:${MLPREFIX}libasound-module-pcm-alsa-dsp += "\ + ${datadir}/alsa/alsa.conf.d/98-maemo.conf \ + ${sysconfdir}/alsa/conf.d/98-maemo.conf \ +" +FILES:${MLPREFIX}libasound-module-pcm-jack += "\ + ${datadir}/alsa/alsa.conf.d/50-jack.conf \ + ${sysconfdir}/alsa/conf.d/50-jack.conf \ +" +FILES:${MLPREFIX}libasound-module-pcm-oss += "\ + ${datadir}/alsa/alsa.conf.d/50-oss.conf \ + ${sysconfdir}/alsa/conf.d/50-oss.conf \ +" +FILES:${MLPREFIX}libasound-module-pcm-speex += "\ + ${datadir}/alsa/alsa.conf.d/60-speex.conf \ + ${sysconfdir}/alsa/conf.d/60-speex.conf \ +" +FILES:${MLPREFIX}libasound-module-pcm-upmix += "\ + ${datadir}/alsa/alsa.conf.d/60-upmix.conf \ + ${sysconfdir}/alsa/conf.d/60-upmix.conf \ +" +FILES:${MLPREFIX}libasound-module-pcm-usb-stream += "\ + ${datadir}/alsa/alsa.conf.d/98-usb-stream.conf \ + ${sysconfdir}/alsa/conf.d/98-usb-stream.conf \ +" +FILES:${MLPREFIX}libasound-module-pcm-vdownmix += "\ + ${datadir}/alsa/alsa.conf.d/60-vdownmix.conf \ + ${sysconfdir}/alsa/conf.d/60-vdownmix.conf \ +" +FILES:${MLPREFIX}libasound-module-rate-lavrate += "\ + ${datadir}/alsa/alsa.conf.d/10-rate-lav.conf \ + ${sysconfdir}/alsa/conf.d/10-rate-lav.conf \ +" +FILES:${MLPREFIX}libasound-module-rate-samplerate += "\ + ${datadir}/alsa/alsa.conf.d/10-samplerate.conf \ + ${sysconfdir}/alsa/conf.d/10-samplerate.conf \ +" +FILES:${MLPREFIX}libasound-module-rate-speexrate += "\ + ${datadir}/alsa/alsa.conf.d/10-speexrate.conf \ + ${sysconfdir}/alsa/conf.d/10-speexrate.conf \ +" + +# The rate plugins create some symlinks. For example, the samplerate plugin +# creates these links to the main plugin file: +# +# libasound_module_rate_samplerate_best.so +# libasound_module_rate_samplerate_linear.so +# libasound_module_rate_samplerate_medium.so +# libasound_module_rate_samplerate_order.so +# +# The other rate plugins create similar links. We have to add the links to +# FILES manually, because do_split_packages() skips the links (which is good, +# because we wouldn't want do_split_packages() to create separate packages for +# the symlinks). +# +# The symlinks cause QA errors, because usually it's a bug if a non +# -dev/-dbg/-nativesdk package contains links to .so files, but in this case +# the errors are false positives, so we disable the QA checks. +FILES:${MLPREFIX}libasound-module-rate-lavrate += "${libdir}/alsa-lib/*rate_lavrate_*.so" +FILES:${MLPREFIX}libasound-module-rate-samplerate += "${libdir}/alsa-lib/*rate_samplerate_*.so" +FILES:${MLPREFIX}libasound-module-rate-speexrate += "${libdir}/alsa-lib/*rate_speexrate_*.so" +INSANE_SKIP:${MLPREFIX}libasound-module-rate-lavrate = "dev-so" +INSANE_SKIP:${MLPREFIX}libasound-module-rate-samplerate = "dev-so" +INSANE_SKIP:${MLPREFIX}libasound-module-rate-speexrate = "dev-so" + +# 50-pulseaudio.conf defines a device named "pulse" that applications can use +# if they explicitly want to use the PulseAudio plugin. +# 99-pulseaudio-default.conf configures the "default" device to use the +# PulseAudio plugin. +FILES:${PN}-pulseaudio-conf += "\ + ${datadir}/alsa/alsa.conf.d/50-pulseaudio.conf \ + ${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf \ + ${sysconfdir}/alsa/conf.d/50-pulseaudio.conf \ + ${sysconfdir}/alsa/conf.d/99-pulseaudio-default.conf \ +" + +RDEPENDS:${PN}-pulseaudio-conf += "\ + ${MLPREFIX}libasound-module-conf-pulse \ + ${MLPREFIX}libasound-module-ctl-pulse \ + ${MLPREFIX}libasound-module-pcm-pulse \ +" diff --git a/meta/recipes-multimedia/alsa/alsa-tools/autotools.patch b/meta/recipes-multimedia/alsa/alsa-tools/autotools.patch deleted file mode 100644 index 59391d6908..0000000000 --- a/meta/recipes-multimedia/alsa/alsa-tools/autotools.patch +++ /dev/null @@ -1,32 +0,0 @@ -Add parameters to autoreconf to support cross compile. -Remove some sub-components which needs further recipe support. - -Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> - -Upstream-Status: Inappropriate [configuration] - -diff -ruN alsa-tools-1.0.24.1-orig//ld10k1/gitcompile alsa-tools-1.0.24.1/ld10k1/gitcompile ---- alsa-tools-1.0.24.1-orig//ld10k1/gitcompile 2011-07-06 11:27:40.227665002 +0800 -+++ alsa-tools-1.0.24.1/ld10k1/gitcompile 2011-07-14 13:26:18.017665004 +0800 -@@ -1,6 +1,6 @@ - #!/bin/bash - --autoreconf -fi || exit 1 -+autoreconf $ACLOCAL_FLAGS -fi || exit 1 - export CFLAGS='-O2 -Wall -pipe -g' - echo "CFLAGS=$CFLAGS" - echo "./configure $@" -diff -ruN alsa-tools-1.0.24.1-orig//Makefile alsa-tools-1.0.24.1/Makefile ---- alsa-tools-1.0.24.1-orig//Makefile 2011-07-06 11:27:40.207665000 +0800 -+++ alsa-tools-1.0.24.1/Makefile 2011-07-14 15:08:08.877665009 +0800 -@@ -1,8 +1,8 @@ - VERSION = 1.0.29 - TOP = . --SUBDIRS = as10k1 envy24control hdsploader hdspconf hdspmixer \ -+SUBDIRS = as10k1 envy24control \ - mixartloader pcxhrloader rmedigicontrol sb16_csp seq sscape_ctl \ -- us428control usx2yloader vxloader echomixer ld10k1 qlo10k1 \ -+ us428control usx2yloader vxloader echomixer \ - hwmixvolume hdajackretask hda-verb hdajacksensetest - - all: diff --git a/meta/recipes-multimedia/alsa/alsa-tools/gitcompile_hdajacksensetest b/meta/recipes-multimedia/alsa/alsa-tools/gitcompile_hdajacksensetest deleted file mode 100755 index 58328bd3a5..0000000000 --- a/meta/recipes-multimedia/alsa/alsa-tools/gitcompile_hdajacksensetest +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -aclocal $ACLOCAL_FLAGS || exit 1 -automake --foreign --add-missing || exit 1 -autoconf || exit 1 -export CFLAGS='-O2 -Wall -pipe -g' -echo "CFLAGS=$CFLAGS" -echo "./configure $@" -./configure $@ || exit 1 -unset CFLAGS -if [ -z "$GITCOMPILE_NO_MAKE" ]; then - make || exit 1 -fi diff --git a/meta/recipes-multimedia/alsa/alsa-tools/makefile_no_gtk.patch b/meta/recipes-multimedia/alsa/alsa-tools/makefile_no_gtk.patch deleted file mode 100644 index c957609611..0000000000 --- a/meta/recipes-multimedia/alsa/alsa-tools/makefile_no_gtk.patch +++ /dev/null @@ -1,29 +0,0 @@ -Remove some sub-components which need gtk+. - -Upstream-Status: Inappropriate [configuration] - -Signed-off-by: Rogerio Nunes <ronunes@gmail.com> -Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> - -Update patch for alsa-tools 1.0.29 - -Signed-off-by: Kai Kang <kai.kang@windriver.com> - -diff --git a/Makefile b/Makefile -index 2457a1c..72346d9 100644 ---- a/Makefile -+++ b/Makefile -@@ -1,9 +1,9 @@ - VERSION = 1.0.29 - TOP = . --SUBDIRS = as10k1 envy24control \ -- mixartloader pcxhrloader rmedigicontrol sb16_csp seq sscape_ctl \ -- us428control usx2yloader vxloader echomixer \ -- hwmixvolume hdajackretask hda-verb hdajacksensetest -+SUBDIRS = as10k1 \ -+ mixartloader pcxhrloader sb16_csp seq sscape_ctl \ -+ us428control usx2yloader vxloader \ -+ hwmixvolume hda-verb hdajacksensetest - - all: - @for i in $(SUBDIRS); do \ diff --git a/meta/recipes-multimedia/alsa/alsa-tools_1.0.29.bb b/meta/recipes-multimedia/alsa/alsa-tools_1.0.29.bb deleted file mode 100644 index b5b9cc49c8..0000000000 --- a/meta/recipes-multimedia/alsa/alsa-tools_1.0.29.bb +++ /dev/null @@ -1,41 +0,0 @@ -SUMMARY = "Advanced tools for certain ALSA sound card drivers" -HOMEPAGE = "http://www.alsa-project.org" -BUGTRACKER = "https://bugtrack.alsa-project.org/alsa-bug/login_page.php" -SECTION = "console/utils" -LICENSE = "GPLv2 & LGPLv2+" -DEPENDS = "alsa-lib ncurses glib-2.0" - -LIC_FILES_CHKSUM = "file://hdsploader/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ - file://ld10k1/COPYING.LIB;md5=7fbc338309ac38fefcd64b04bb903e34" - -SRC_URI = "ftp://ftp.alsa-project.org/pub/tools/${BP}.tar.bz2 \ - file://autotools.patch \ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', \ - 'file://makefile_no_gtk.patch', d)} \ - file://gitcompile_hdajacksensetest \ - " - -SRC_URI[md5sum] = "f339a3cd24f748c9d007bdff0e98775b" -SRC_URI[sha256sum] = "94abf0ab5a73f0710c70d4fb3dc1003af5bae2d2ed721d59d245b41ad0f2fbd1" - -inherit autotools-brokensep pkgconfig - -CLEANBROKEN = "1" - -EXTRA_OEMAKE += "GITCOMPILE_ARGS='--host=${HOST_SYS} --build=${BUILD_SYS} --target=${TARGET_SYS} --with-libtool-sysroot=${STAGING_DIR_HOST} --prefix=${prefix}'" - -PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gtk+', '', d)}" -PACKAGECONFIG[gtk+] = ",,gtk+ gtk+3," - -# configure.ac/.in doesn't exist so force copy -AUTOTOOLS_COPYACLOCAL = "1" - -do_compile_prepend () { - #Automake dir is not correctly detected in cross compilation case - export AUTOMAKE_DIR="$(automake --print-libdir)" - export ACLOCAL_FLAGS="--system-acdir=${ACLOCALDIR}/" - - cp ${WORKDIR}/gitcompile_hdajacksensetest ${S}/hdajacksensetest/gitcompile -} - -FILES_${PN} += "${datadir}/ld10k1" diff --git a/meta/recipes-multimedia/alsa/alsa-tools_1.2.5.bb b/meta/recipes-multimedia/alsa/alsa-tools_1.2.5.bb new file mode 100644 index 0000000000..540f4f79f4 --- /dev/null +++ b/meta/recipes-multimedia/alsa/alsa-tools_1.2.5.bb @@ -0,0 +1,88 @@ +SUMMARY = "Advanced tools for certain ALSA sound card drivers" +DESCRIPTION = "Package containing a number of tools ranging from envy24control \ +which provides complete control over all devices with an envy24 chip, to \ +firmware loaders for pcmcia, USB and the hdsp devices." +HOMEPAGE = "http://www.alsa-project.org" +BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking" +SECTION = "console/utils" +LICENSE = "GPLv2 & LGPLv2+" +DEPENDS = "alsa-lib" + +LIC_FILES_CHKSUM = "file://hdsploader/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ + file://ld10k1/COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7 \ + " + +SRC_URI = "https://www.alsa-project.org/files/pub/tools/${BP}.tar.bz2" + +SRC_URI[sha256sum] = "35a71027a01f4d7de4722e223520e940de68b3c570b6c671691567ae28f9893e" + +inherit autotools-brokensep pkgconfig +# brokensep as as10k1 (and probably more) fail out of tree +CLEANBROKEN = "1" + +# Here we use PACKAGECONFIG options to pick which directories we configure/build. +# Remember on upgrades to check that no new tools have been added. +PACKAGECONFIG ??= "as10k1 hdajacksensetest hda-verb hdsploader ld10k1 mixartloader pcxhrloader \ + sb16_csp seq--sbiload sscape_ctl us428control usx2yloader vxloader \ + ${@bb.utils.contains_any('DISTRO_FEATURES', '${GTK3DISTROFEATURES}', 'hdajackretask', '', d)} \ + " + +PACKAGECONFIG[as10k1] = "" +PACKAGECONFIG[echomixer] = ",,gtk+" +PACKAGECONFIG[envy24control] = ",,gtk+" +PACKAGECONFIG[hda-verb] = "" +PACKAGECONFIG[hdajackretask] = ",,gtk+3" +PACKAGECONFIG[hdajacksensetest] = ",,glib-2.0" +PACKAGECONFIG[hdspconf] = ",,fltk" +PACKAGECONFIG[hdsploader] = "" +PACKAGECONFIG[hdspmixer] = ",,fltk" +PACKAGECONFIG[ld10k1] = "" +PACKAGECONFIG[mixartloader] = "" +PACKAGECONFIG[pcxhrloader] = "" +PACKAGECONFIG[qlo10k1] = ",,qt-x11-free" +PACKAGECONFIG[rmedigicontrol] = ",,gtk+" +PACKAGECONFIG[sb16_csp] = "" +PACKAGECONFIG[seq--sbiload] = "" +PACKAGECONFIG[sscape_ctl] = "" +PACKAGECONFIG[us428control] = "" +PACKAGECONFIG[usx2yloader] = "" +PACKAGECONFIG[vxloader] = "" + +# At the time of writing pyalsa is not packaged for OE, so this is not expected +# to work. +PACKAGECONFIG[hwmixvolume] = ",,,python-core python-pygobject pyalsa" + +python do_configure() { + for subdir in d.getVar("PACKAGECONFIG").split(): + subdir = subdir.replace("--", "/") + bb.note("Configuring %s" % subdir) + dd = d.createCopy() + dd.setVar("S", os.path.join(d.getVar("S"), subdir)) + bb.build.exec_func("autotools_do_configure", dd) +} + +python do_compile() { + for subdir in d.getVar("PACKAGECONFIG").split(): + subdir = subdir.replace("--", "/") + bb.note("Compiling %s" % subdir) + dd = d.createCopy() + dd.setVar("S", os.path.join(d.getVar("S"), subdir)) + bb.build.exec_func("autotools_do_compile", dd) +} + +python do_install() { + for subdir in d.getVar("PACKAGECONFIG").split(): + subdir = subdir.replace("--", "/") + bb.note("Installing %s" % subdir) + dd = d.createCopy() + dd.setVar("S", os.path.join(d.getVar("S"), subdir)) + bb.build.exec_func("autotools_do_install", dd) + + # Just remove bash-needing init script that isn't installed as an init script + try: + os.remove(oe.path.join(d.getVar("D"), d.getVar("sbindir"), "ld10k1d")) + except: + pass +} + +FILES:${PN} += "${datadir}" diff --git a/meta/recipes-multimedia/alsa/alsa-topology-conf_1.2.5.1.bb b/meta/recipes-multimedia/alsa/alsa-topology-conf_1.2.5.1.bb new file mode 100644 index 0000000000..4374a6bb6d --- /dev/null +++ b/meta/recipes-multimedia/alsa/alsa-topology-conf_1.2.5.1.bb @@ -0,0 +1,23 @@ +SUMMARY = "ALSA topology configuration files" +DESCRIPTION = "Provides a method for audio drivers to load their mixers, \ +routing, PCMs and capabilities from user space at runtime without changing \ +any driver source code." +HOMEPAGE = "https://alsa-project.org" +BUGTRACKER = "https://alsa-project.org/wiki/Bug_Tracking" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=20d74d74db9741697903372ad001d3b4" + +SRC_URI = "https://www.alsa-project.org/files/pub/lib/${BP}.tar.bz2" +SRC_URI[sha256sum] = "f7c5bae1545abcd73824bc97f4e72c340e11abea188ba0f1c06f5e0ad776b179" +# Something went wrong at upstream tarballing + +inherit allarch + +do_install() { + install -d "${D}${datadir}/alsa" + cp -r "${S}/topology" "${D}${datadir}/alsa" +} + +PACKAGES = "${PN}" + +FILES:${PN} = "*" diff --git a/meta/recipes-multimedia/alsa/alsa-ucm-conf_1.2.5.1.bb b/meta/recipes-multimedia/alsa/alsa-ucm-conf_1.2.5.1.bb new file mode 100644 index 0000000000..9d874eca13 --- /dev/null +++ b/meta/recipes-multimedia/alsa/alsa-ucm-conf_1.2.5.1.bb @@ -0,0 +1,24 @@ +SUMMARY = "ALSA Use Case Manager configuration" +DESCRIPTION = "This package contains ALSA Use Case Manager configuration \ +of audio input/output names and routing for specific audio hardware. \ +They can be used with the alsaucm tool. " +HOMEPAGE = "https://alsa-project.org" +BUGTRACKER = "https://alsa-project.org/wiki/Bug_Tracking" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=20d74d74db9741697903372ad001d3b4" + +SRC_URI = "https://www.alsa-project.org/files/pub/lib/${BP}.tar.bz2" +SRC_URI[sha256sum] = "5841a444166dcbf479db751303dbc3556f685085ac7e00f0c9e7755676195d97" +# Something went wrong at upstream tarballing + +inherit allarch + +do_install() { + install -d "${D}${datadir}/alsa" + cp -r "${S}/ucm" "${D}${datadir}/alsa" + cp -r "${S}/ucm2" "${D}${datadir}/alsa" +} + +PACKAGES = "${PN}" + +FILES:${PN} = "*" diff --git a/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.0.29.bb b/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.2.5.1.bb index a98f9b90ba..000e984a7d 100644 --- a/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.0.29.bb +++ b/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.2.5.1.bb @@ -1,15 +1,16 @@ -require alsa-utils_${PV}.bb +require alsa-utils.inc SUMMARY = "Shell scripts that show help info and create ALSA configuration files" PROVIDES = "alsa-utils-alsaconf" -FILESEXTRAPATHS_prepend := "${THISDIR}/alsa-utils:" +FILESEXTRAPATHS:prepend := "${THISDIR}/alsa-utils:" PACKAGES = "${PN}" -RDEPENDS_${PN} += "bash" +RDEPENDS:${PN} += "bash" -FILES_${PN} = "${sbindir}/alsaconf \ +FILES:${PN} = "${sbindir}/alsaconf \ ${sbindir}/alsa-info.sh \ + ${sbindir}/alsabat-test.sh \ " S = "${WORKDIR}/alsa-utils-${PV}" @@ -18,4 +19,7 @@ do_install() { install -d ${D}${sbindir} install -m 0755 ${B}/alsaconf/alsaconf ${D}${sbindir}/ install -m 0755 ${S}/alsa-info/alsa-info.sh ${D}${sbindir}/ + if ${@bb.utils.contains('PACKAGECONFIG', 'bat', 'true', 'false', d)}; then + install -m 0755 ${S}/bat/alsabat-test.sh ${D}${sbindir}/ + fi } diff --git a/meta/recipes-multimedia/alsa/alsa-utils.inc b/meta/recipes-multimedia/alsa/alsa-utils.inc new file mode 100644 index 0000000000..95b93d4432 --- /dev/null +++ b/meta/recipes-multimedia/alsa/alsa-utils.inc @@ -0,0 +1,107 @@ +SUMMARY = "ALSA sound utilities" +DESCRIPTION = "collection of small and often extremely powerful applications \ +designed to allow users to control the various parts of the ALSA system." +HOMEPAGE = "http://www.alsa-project.org" +BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking" +SECTION = "console/utils" +# Some parts are GPLv2+, some are only GPLv2 (e.g. axfer, alsactl) so result is GPLv2 +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ + file://alsactl/utils.c;beginline=3;endline=18;md5=96cc06a4cebe5eb7975688ffb0e65642" +DEPENDS = "alsa-lib ncurses libsamplerate0" + +PACKAGECONFIG ??= "udev" + +# alsabat can be built also without fftw support (with reduced functionality). +# It would be better to always enable alsabat, but provide an option for +# enabling/disabling fftw. The configure script doesn't support that, however +# (at least in any obvious way), so for now we only support alsabat with fftw +# or no alsabat at all. +PACKAGECONFIG[bat] = "--enable-bat,--disable-bat,fftwf" + +PACKAGECONFIG[udev] = "--with-udev-rules-dir=`pkg-config --variable=udevdir udev`/rules.d,--with-udev-rules-dir=/unwanted/rules.d,udev" +PACKAGECONFIG[manpages] = "--enable-xmlto, --disable-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native" + +# alsa-utils specified in SRC_URI due to alsa-utils-scripts recipe +SRC_URI = "https://www.alsa-project.org/files/pub/utils/alsa-utils-${PV}.tar.bz2" +SRC_URI[sha256sum] = "9c169ae37a49295f9b97b92ace772803daf6b6510a19574e0b78f87e562118d0" + +# On build machines with python-docutils (not python3-docutils !!) installed +# rst2man (not rst2man.py) is detected and compile fails with +# | make[1]: *** No rule to make target 'alsaucm.1', needed by 'all-am'. Stop. +# Avoid this by disabling expicitly +EXTRA_OECONF = "--disable-rst2man" + +inherit autotools gettext pkgconfig manpages + +# This are all packages that we need to make. Also, the now empty alsa-utils +# ipk depends on them. + +ALSA_UTILS_PKGS = "\ + ${@bb.utils.contains('PACKAGECONFIG', 'bat', 'alsa-utils-alsabat', '', d)} \ + alsa-utils-alsamixer \ + alsa-utils-alsatplg \ + alsa-utils-midi \ + alsa-utils-aplay \ + alsa-utils-amixer \ + alsa-utils-aconnect \ + alsa-utils-iecset \ + alsa-utils-speakertest \ + alsa-utils-aseqnet \ + alsa-utils-aseqdump \ + alsa-utils-alsactl \ + alsa-utils-alsaloop \ + alsa-utils-alsaucm \ + " + +PACKAGES += "${ALSA_UTILS_PKGS}" +RDEPENDS:${PN} += "${ALSA_UTILS_PKGS}" + +FILES:${PN} = "" +ALLOW_EMPTY:alsa-utils = "1" +FILES:alsa-utils-alsabat = "${bindir}/alsabat" +FILES:alsa-utils-alsatplg = "${bindir}/alsatplg" +FILES:alsa-utils-aplay = "${bindir}/aplay ${bindir}/arecord ${bindir}/axfer" +FILES:alsa-utils-amixer = "${bindir}/amixer" +FILES:alsa-utils-alsamixer = "${bindir}/alsamixer" +FILES:alsa-utils-speakertest = "${bindir}/speaker-test ${datadir}/sounds/alsa/ ${datadir}/alsa/speaker-test/" +FILES:alsa-utils-midi = "${bindir}/aplaymidi ${bindir}/arecordmidi ${bindir}/amidi" +FILES:alsa-utils-aconnect = "${bindir}/aconnect" +FILES:alsa-utils-aseqnet = "${bindir}/aseqnet" +FILES:alsa-utils-iecset = "${bindir}/iecset" +FILES:alsa-utils-alsactl = "${sbindir}/alsactl */udev/rules.d/90-alsa-restore.rules */*/udev/rules.d/90-alsa-restore.rules ${systemd_unitdir} ${localstatedir}/lib/alsa ${datadir}/alsa/init/" +FILES:alsa-utils-aseqdump = "${bindir}/aseqdump" +FILES:alsa-utils-alsaloop = "${bindir}/alsaloop" +FILES:alsa-utils-alsaucm = "${bindir}/alsaucm */udev/rules.d/89-alsa-ucm.rules */*/udev/rules.d/89-alsa-ucm.rules" + +SUMMARY:alsa-utils-alsabat = "Command-line sound tester for ALSA sound card driver" +SUMMARY:alsa-utils-alsatplg = "Converts topology text files into binary format for kernel" +SUMMARY:alsa-utils-aplay = "Play (and record) sound files using ALSA" +SUMMARY:alsa-utils-amixer = "Command-line control for ALSA mixer and settings" +SUMMARY:alsa-utils-alsamixer = "ncurses-based control for ALSA mixer and settings" +SUMMARY:alsa-utils-speakertest = "ALSA surround speaker test utility" +SUMMARY:alsa-utils-midi = "Miscellaneous MIDI utilities for ALSA" +SUMMARY:alsa-utils-aconnect = "ALSA sequencer connection manager" +SUMMARY:alsa-utils-aseqnet = "Network client/server for ALSA sequencer" +SUMMARY:alsa-utils-iecset = "ALSA utility for setting/showing IEC958 (S/PDIF) status bits" +SUMMARY:alsa-utils-alsactl = "Saves/restores ALSA-settings in /etc/asound.state" +SUMMARY:alsa-utils-aseqdump = "Shows the events received at an ALSA sequencer port" +SUMMARY:alsa-utils-alsaloop = "ALSA PCM loopback utility" +SUMMARY:alsa-utils-alsaucm = "ALSA Use Case Manager" + +RRECOMMENDS:alsa-utils-alsactl = "alsa-states" + +do_install() { + autotools_do_install + + # We don't ship this here because it requires a dependency on bash. + # See alsa-utils-scripts_${PV}.bb + rm ${D}${sbindir}/alsaconf + rm ${D}${sbindir}/alsa-info.sh + rm -f ${D}${sbindir}/alsabat-test.sh + + # If udev is disabled, we told configure to install the rules + # in /unwanted, so we can remove them now. If udev is enabled, + # then /unwanted won't exist and this will have no effect. + rm -rf ${D}/unwanted +} diff --git a/meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch b/meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch deleted file mode 100644 index e99dd515f0..0000000000 --- a/meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 43a56fa36a12f09ccd78b3cf5e6ae197fcab501f Mon Sep 17 00:00:00 2001 -From: Koen Kooi <koen@dominion.thruhere.net> -Date: Fri, 29 Aug 2014 18:58:56 +0300 -Subject: [PATCH] alsactl: don't let systemd unit restore the volume when - asound.state is missing - -This avoids an error on bootup - -Filed as https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5459 - -Upstream-Status: Pending - -Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> -Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> ---- - alsactl/Makefile.am | 7 ++++--- - alsactl/alsa-restore.service.in | 1 + - 2 files changed, 5 insertions(+), 3 deletions(-) - -diff --git a/alsactl/Makefile.am b/alsactl/Makefile.am -index 47f06e9..b728c06 100644 ---- a/alsactl/Makefile.am -+++ b/alsactl/Makefile.am -@@ -43,9 +43,10 @@ install-data-hook: - endif - - edit = \ -- $(SED) -r -e 's,@sbindir\@,$(sbindir),g' \ -- -e 's,@mydatadir\@,$(mydatadir),g' \ -- -e 's,@daemonswitch\@,$(ALSACTL_DAEMONSWITCH),g' \ -+ $(SED) -e 's,@localstatedir\@,$(localstatedir),g' \ -+ -e 's,@sbindir\@,$(sbindir),g' \ -+ -e 's,@mydatadir\@,$(mydatadir),g' \ -+ -e 's,@daemonswitch\@,$(ALSACTL_DAEMONSWITCH),g' \ - < $< > $@ || rm $@ - - alsa-state.service: alsa-state.service.in -diff --git a/alsactl/alsa-restore.service.in b/alsactl/alsa-restore.service.in -index 245a439..b017854 100644 ---- a/alsactl/alsa-restore.service.in -+++ b/alsactl/alsa-restore.service.in -@@ -10,6 +10,7 @@ DefaultDependencies=no - After=alsa-state.service - Before=shutdown.target - Conflicts=shutdown.target -+ConditionPathExists=@localstatedir@/lib/alsa/asound.state - - [Service] - Type=oneshot --- -1.9.1 - diff --git a/meta/recipes-multimedia/alsa/alsa-utils/alsa-utils-aplay-interrupt-signal-handling.patch b/meta/recipes-multimedia/alsa/alsa-utils/alsa-utils-aplay-interrupt-signal-handling.patch deleted file mode 100644 index 5df004aeae..0000000000 --- a/meta/recipes-multimedia/alsa/alsa-utils/alsa-utils-aplay-interrupt-signal-handling.patch +++ /dev/null @@ -1,48 +0,0 @@ -Upstream-Status: Pending - -aplay/arecord (alsa-utils v1.0.28) cannot interrupt streaming -via CTRL-C. Fixed the issue by reverting buggy patches and -properly handling 'in_aborting' flag in appropriate functions. - -Signed-off-by: Anant Agrawal <Anant_Agrawal@mentor.com> -Signed-off-by: Mikhail Durnev <mikhail_durnev@mentor.com> - ---- a/aplay/aplay.c 2014-05-19 16:25:14.000000000 +0530 -+++ b/aplay/aplay.c 2014-05-20 15:17:14.364823007 +0530 -@@ -392,14 +392,22 @@ - putchar('\n'); - if (!quiet_mode) - fprintf(stderr, _("Aborted by signal %s...\n"), strsignal(sig)); -- if (handle) -+ if (stream == SND_PCM_STREAM_CAPTURE) { -+ if (fmt_rec_table[file_type].end) { -+ fmt_rec_table[file_type].end(fd); -+ fd = -1; -+ } -+ stream = -1; -+ } -+ if (fd > 1) { -+ close(fd); -+ fd = -1; -+ } -+ if (handle && sig != SIGABRT) { - snd_pcm_abort(handle); -- if (sig == SIGABRT) { -- /* do not call snd_pcm_close() and abort immediately */ - handle = NULL; -- prg_exit(EXIT_FAILURE); - } -- signal(sig, signal_handler); -+ prg_exit(EXIT_FAILURE); - } - - /* call on SIGUSR1 signal. */ -@@ -2096,7 +2104,7 @@ - ssize_t result = count, r; - size_t size; - -- while (count > 0) { -+ while (count > 0 && !in_aborting) { - size = count; - if (size > chunk_bytes - buffer_pos) - size = chunk_bytes - buffer_pos; diff --git a/meta/recipes-multimedia/alsa/alsa-utils/assume-storing-is-success-if-not-sound-card-device.patch b/meta/recipes-multimedia/alsa/alsa-utils/assume-storing-is-success-if-not-sound-card-device.patch deleted file mode 100644 index f67283db79..0000000000 --- a/meta/recipes-multimedia/alsa/alsa-utils/assume-storing-is-success-if-not-sound-card-device.patch +++ /dev/null @@ -1,34 +0,0 @@ -[PATCH] assume storing is success if not sound card device - -Upstream-Statue: Pending - -Systemd will report failure when run alsa-*, if the machine has not the -sound card. To void this annoyed message, alsa-restore/alsa-state ignore -all the exit codes by prefixing "-" in ExecStart, like: - - alsa-utils-1.0.29$ grep "=-" ./ -r|grep service.in - ./alsactl/alsa-restore.service.in:ExecStart=-@sbindir@/alsactl restore - ./alsactl/alsa-state.service.in:ExecStart=-@sbindir@/alsactl -s -n 19 -c rdaemon - ./alsactl/alsa-state.service.in:ExecStop=-@sbindir@/alsactl -s kill save_and_quit - lsa-utils-1.0.29$ - -But alsa-store.service.in is missing, and better solution is to ignore -the exit code 19 which means not sound card device, not all exit code - -Signed-off-by: Roy Li <rongqing.li@windriver.com> ---- - alsactl/alsa-store.service.in | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/alsactl/alsa-store.service.in b/alsactl/alsa-store.service.in -index f1a56bb..68ca529 100644 ---- a/alsactl/alsa-store.service.in -+++ b/alsactl/alsa-store.service.in -@@ -13,3 +13,4 @@ Before=shutdown.target - Type=oneshot - ExecStart=@sbindir@/alsactl store - StandardOutput=syslog -+SuccessExitStatus=0 19 --- -1.9.1 - diff --git a/meta/recipes-multimedia/alsa/alsa-utils_1.0.29.bb b/meta/recipes-multimedia/alsa/alsa-utils_1.0.29.bb deleted file mode 100644 index 97fe4b2fe4..0000000000 --- a/meta/recipes-multimedia/alsa/alsa-utils_1.0.29.bb +++ /dev/null @@ -1,97 +0,0 @@ -SUMMARY = "ALSA sound utilities" -HOMEPAGE = "http://www.alsa-project.org" -BUGTRACKER = "https://bugtrack.alsa-project.org/alsa-bug/login_page.php" -SECTION = "console/utils" -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ - file://alsactl/utils.c;beginline=1;endline=20;md5=fe9526b055e246b5558809a5ae25c0b9" -DEPENDS = "alsa-lib ncurses libsamplerate0" - -PACKAGECONFIG ??= "udev" -PACKAGECONFIG[udev] = "--with-udev-rules-dir=`pkg-config --variable=udevdir udev`/rules.d,,udev" -PACKAGECONFIG[xmlto] = "--enable-xmlto, --disable-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native" - -SRC_URI = "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-${PV}.tar.bz2 \ - file://0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch \ - file://alsa-utils-aplay-interrupt-signal-handling.patch \ - file://assume-storing-is-success-if-not-sound-card-device.patch \ - " - -SRC_URI[md5sum] = "6b289bf874c4c9a63f4b3973093dd404" -SRC_URI[sha256sum] = "5160058f3e14483ced5de919dd473f93932059454530a9b7ef97dcabd6833e9b" - -# lazy hack. needs proper fixing in gettext.m4, see -# http://bugs.openembedded.org/show_bug.cgi?id=2348 -# please close bug and remove this comment when properly fixed -# -EXTRA_OECONF_append_libc-uclibc = " --disable-nls" - -inherit autotools gettext pkgconfig - -# This are all packages that we need to make. Also, the now empty alsa-utils -# ipk depends on them. - -ALSA_UTILS_PKGS = "\ - alsa-utils-alsamixer \ - alsa-utils-midi \ - alsa-utils-aplay \ - alsa-utils-amixer \ - alsa-utils-aconnect \ - alsa-utils-iecset \ - alsa-utils-speakertest \ - alsa-utils-aseqnet \ - alsa-utils-aseqdump \ - alsa-utils-alsactl \ - alsa-utils-alsaloop \ - alsa-utils-alsaucm \ - " - -PACKAGES += "${ALSA_UTILS_PKGS}" -RDEPENDS_${PN} += "${ALSA_UTILS_PKGS}" - -FILES_${PN} = "" -FILES_alsa-utils-aplay = "${bindir}/aplay ${bindir}/arecord" -FILES_alsa-utils-amixer = "${bindir}/amixer" -FILES_alsa-utils-alsamixer = "${bindir}/alsamixer" -FILES_alsa-utils-speakertest = "${bindir}/speaker-test ${datadir}/sounds/alsa/ ${datadir}/alsa/speaker-test/" -FILES_alsa-utils-midi = "${bindir}/aplaymidi ${bindir}/arecordmidi ${bindir}/amidi" -FILES_alsa-utils-aconnect = "${bindir}/aconnect" -FILES_alsa-utils-aseqnet = "${bindir}/aseqnet" -FILES_alsa-utils-iecset = "${bindir}/iecset" -FILES_alsa-utils-alsactl = "${sbindir}/alsactl */udev/rules.d */*/udev/rules.d ${systemd_unitdir} ${localstatedir}/lib/alsa ${datadir}/alsa/init/" -FILES_alsa-utils-aseqdump = "${bindir}/aseqdump" -FILES_alsa-utils-alsaloop = "${bindir}/alsaloop" -FILES_alsa-utils-alsaucm = "${bindir}/alsaucm" - - -SUMMARY_alsa-utils-aplay = "Play (and record) sound files using ALSA" -SUMMARY_alsa-utils-amixer = "Command-line control for ALSA mixer and settings" -SUMMARY_alsa-utils-alsamixer = "ncurses-based control for ALSA mixer and settings" -SUMMARY_alsa-utils-speakertest = "ALSA surround speaker test utility" -SUMMARY_alsa-utils-midi = "Miscellaneous MIDI utilities for ALSA" -SUMMARY_alsa-utils-aconnect = "ALSA sequencer connection manager" -SUMMARY_alsa-utils-aseqnet = "Network client/server for ALSA sequencer" -SUMMARY_alsa-utils-iecset = "ALSA utility for setting/showing IEC958 (S/PDIF) status bits" -SUMMARY_alsa-utils-alsactl = "Saves/restores ALSA-settings in /etc/asound.state" -SUMMARY_alsa-utils-aseqdump = "Shows the events received at an ALSA sequencer port" -SUMMARY_alsa-utils-alsaloop = "ALSA PCM loopback utility" -SUMMARY_alsa-utils-alsaucm = "ALSA Use Case Manager" - -RRECOMMENDS_alsa-utils-alsactl = "alsa-states" - -ALLOW_EMPTY_alsa-utils = "1" - -do_install() { - autotools_do_install - - # We don't ship this here because it requires a dependency on bash. - # See alsa-utils-scripts_${PV}.bb - rm ${D}${sbindir}/alsaconf - rm ${D}${sbindir}/alsa-info.sh - - if ${@bb.utils.contains('PACKAGECONFIG', 'udev', 'false', 'true', d)}; then - # This is where alsa-utils will install its rules if we don't tell it anything else. - rm -rf ${D}/lib/udev - rmdir --ignore-fail-on-non-empty ${D}/lib - fi -} diff --git a/meta/recipes-multimedia/alsa/alsa-utils_1.2.5.1.bb b/meta/recipes-multimedia/alsa/alsa-utils_1.2.5.1.bb new file mode 100644 index 0000000000..3430288da4 --- /dev/null +++ b/meta/recipes-multimedia/alsa/alsa-utils_1.2.5.1.bb @@ -0,0 +1,2 @@ +require alsa-utils.inc + diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-libavutil-include-assembly-with-full-path-from-sourc.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-libavutil-include-assembly-with-full-path-from-sourc.patch new file mode 100644 index 0000000000..3b503c49c9 --- /dev/null +++ b/meta/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: Pending +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/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-20446.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-20446.patch new file mode 100644 index 0000000000..f048c2e715 --- /dev/null +++ b/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-20446.patch @@ -0,0 +1,35 @@ +From 223b5e8ac9f6461bb13ed365419ec485c5b2b002 Mon Sep 17 00:00:00 2001 +From: Michael Niedermayer <michael@niedermayer.cc> +Date: Fri, 28 May 2021 20:18:25 +0200 +Subject: [PATCH] avcodec/aacpsy: Avoid floating point division by 0 of + norm_fac + +Fixes: Ticket7995 +Fixes: CVE-2020-20446 + +Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> + +CVE: CVE-2020-20446 +Upstream-Status: Backport [223b5e8ac9f6461bb13ed365419ec485c5b2b002] + +Signed-off-by: Tony Tascioglu <tony.tascioglu@windriver.com> +--- + libavcodec/aacpsy.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libavcodec/aacpsy.c b/libavcodec/aacpsy.c +index 482113d427..e51d29750b 100644 +--- a/libavcodec/aacpsy.c ++++ b/libavcodec/aacpsy.c +@@ -794,7 +794,7 @@ static void psy_3gpp_analyze_channel(FFPsyContext *ctx, int channel, + + if (pe < 1.15f * desired_pe) { + /* 6.6.1.3.6 "Final threshold modification by linearization" */ +- norm_fac = 1.0f / norm_fac; ++ norm_fac = norm_fac ? 1.0f / norm_fac : 0; + for (w = 0; w < wi->num_windows*16; w += 16) { + for (g = 0; g < num_bands; g++) { + AacPsyBand *band = &pch->band[w+g]; +-- +2.32.0 + diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-20453.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-20453.patch new file mode 100644 index 0000000000..b1c94057a3 --- /dev/null +++ b/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-20453.patch @@ -0,0 +1,42 @@ +From a7a7f32c8ad0179a1a85d0a8cff35924e6d90be8 Mon Sep 17 00:00:00 2001 +From: Michael Niedermayer <michael@niedermayer.cc> +Date: Fri, 28 May 2021 21:37:26 +0200 +Subject: [PATCH] avcodec/aacenc: Avoid 0 lambda + +Fixes: Ticket8003 +Fixes: CVE-2020-20453 + +Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> + +CVE: CVE-2020-20453 +Upstream-Status: Backport [a7a7f32c8ad0179a1a85d0a8cff35924e6d90be8] + +Signed-off-by: Tony Tascioglu <tony.tascioglu@windriver.com> +--- + libavcodec/aacenc.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c +index aa223cf25f..e80591ba86 100644 +--- a/libavcodec/aacenc.c ++++ b/libavcodec/aacenc.c +@@ -28,6 +28,7 @@ + * TODOs: + * add sane pulse detection + ***********************************/ ++#include <float.h> + + #include "libavutil/libm.h" + #include "libavutil/float_dsp.h" +@@ -852,7 +853,7 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, + /* Not so fast though */ + ratio = sqrtf(ratio); + } +- s->lambda = FFMIN(s->lambda * ratio, 65536.f); ++ s->lambda = av_clipf(s->lambda * ratio, FLT_MIN, 65536.f); + + /* Keep iterating if we must reduce and lambda is in the sky */ + if (ratio > 0.9f && ratio < 1.1f) { +-- +2.32.0 + diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-22015.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-22015.patch new file mode 100644 index 0000000000..5c911299cb --- /dev/null +++ b/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-22015.patch @@ -0,0 +1,44 @@ +From 4c1afa292520329eecd1cc7631bc59a8cca95c46 Mon Sep 17 00:00:00 2001 +From: Michael Niedermayer <michael@niedermayer.cc> +Date: Sat, 29 May 2021 09:22:27 +0200 +Subject: [PATCH] avformat/movenc: Check pal_size before use + +Fixes: assertion failure +Fixes: out of array read +Fixes: Ticket8190 +Fixes: CVE-2020-22015 + +Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> + + +CVE: CVE-2020-22015 +Upstream-Status: Backport [4c1afa292520329eecd1cc7631bc59a8cca95c46] + +Signed-off-by: Tony Tascioglu <tony.tascioglu@windriver.com> +--- + libavformat/movenc.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/libavformat/movenc.c b/libavformat/movenc.c +index 2ab507df15..7d839f447b 100644 +--- a/libavformat/movenc.c ++++ b/libavformat/movenc.c +@@ -2160,11 +2160,13 @@ static int mov_write_video_tag(AVFormatContext *s, AVIOContext *pb, MOVMuxContex + avio_wb16(pb, 0x18); /* Reserved */ + + if (track->mode == MODE_MOV && track->par->format == AV_PIX_FMT_PAL8) { +- int pal_size = 1 << track->par->bits_per_coded_sample; +- int i; ++ int pal_size, i; + avio_wb16(pb, 0); /* Color table ID */ + avio_wb32(pb, 0); /* Color table seed */ + avio_wb16(pb, 0x8000); /* Color table flags */ ++ if (track->par->bits_per_coded_sample < 0 || track->par->bits_per_coded_sample > 8) ++ return AVERROR(EINVAL); ++ pal_size = 1 << track->par->bits_per_coded_sample; + avio_wb16(pb, pal_size - 1); /* Color table size (zero-relative) */ + for (i = 0; i < pal_size; i++) { + uint32_t rgb = track->palette[i]; +-- +2.32.0 + diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-22021.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-22021.patch new file mode 100644 index 0000000000..6f7fce0e4c --- /dev/null +++ b/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-22021.patch @@ -0,0 +1,87 @@ +From 7971f62120a55c141ec437aa3f0bacc1c1a3526b Mon Sep 17 00:00:00 2001 +From: Michael Niedermayer <michael@niedermayer.cc> +Date: Sat, 29 May 2021 11:17:35 +0200 +Subject: [PATCH] avfilter/vf_yadif: Fix handing of tiny images + +Fixes: out of array access +Fixes: Ticket8240 +Fixes: CVE-2020-22021 + +Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> + +CVE: CVE-2020-22021 +Upstream-Status: Backport [7971f62120a55c141ec437aa3f0bacc1c1a3526b] + +Signed-off-by: Tony Tascioglu <tony.tascioglu@windriver.com> +--- + libavfilter/vf_yadif.c | 32 ++++++++++++++++++-------------- + 1 file changed, 18 insertions(+), 14 deletions(-) + +diff --git a/libavfilter/vf_yadif.c b/libavfilter/vf_yadif.c +index 91cc79ecc3..b0d9fbaf1f 100644 +--- a/libavfilter/vf_yadif.c ++++ b/libavfilter/vf_yadif.c +@@ -123,20 +123,22 @@ static void filter_edges(void *dst1, void *prev1, void *cur1, void *next1, + uint8_t *next2 = parity ? cur : next; + + const int edge = MAX_ALIGN - 1; ++ int offset = FFMAX(w - edge, 3); + + /* Only edge pixels need to be processed here. A constant value of false + * for is_not_edge should let the compiler ignore the whole branch. */ +- FILTER(0, 3, 0) ++ FILTER(0, FFMIN(3, w), 0) + +- dst = (uint8_t*)dst1 + w - edge; +- prev = (uint8_t*)prev1 + w - edge; +- cur = (uint8_t*)cur1 + w - edge; +- next = (uint8_t*)next1 + w - edge; ++ dst = (uint8_t*)dst1 + offset; ++ prev = (uint8_t*)prev1 + offset; ++ cur = (uint8_t*)cur1 + offset; ++ next = (uint8_t*)next1 + offset; + prev2 = (uint8_t*)(parity ? prev : cur); + next2 = (uint8_t*)(parity ? cur : next); + +- FILTER(w - edge, w - 3, 1) +- FILTER(w - 3, w, 0) ++ FILTER(offset, w - 3, 1) ++ offset = FFMAX(offset, w - 3); ++ FILTER(offset, w, 0) + } + + +@@ -170,21 +172,23 @@ static void filter_edges_16bit(void *dst1, void *prev1, void *cur1, void *next1, + uint16_t *next2 = parity ? cur : next; + + const int edge = MAX_ALIGN / 2 - 1; ++ int offset = FFMAX(w - edge, 3); + + mrefs /= 2; + prefs /= 2; + +- FILTER(0, 3, 0) ++ FILTER(0, FFMIN(3, w), 0) + +- dst = (uint16_t*)dst1 + w - edge; +- prev = (uint16_t*)prev1 + w - edge; +- cur = (uint16_t*)cur1 + w - edge; +- next = (uint16_t*)next1 + w - edge; ++ dst = (uint16_t*)dst1 + offset; ++ prev = (uint16_t*)prev1 + offset; ++ cur = (uint16_t*)cur1 + offset; ++ next = (uint16_t*)next1 + offset; + prev2 = (uint16_t*)(parity ? prev : cur); + next2 = (uint16_t*)(parity ? cur : next); + +- FILTER(w - edge, w - 3, 1) +- FILTER(w - 3, w, 0) ++ FILTER(offset, w - 3, 1) ++ offset = FFMAX(offset, w - 3); ++ FILTER(offset, w, 0) + } + + static int filter_slice(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs) +-- +2.32.0 + diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-22033-CVE-2020-22019.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-22033-CVE-2020-22019.patch new file mode 100644 index 0000000000..5d979ca3f2 --- /dev/null +++ b/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-22033-CVE-2020-22019.patch @@ -0,0 +1,40 @@ +From 82ad1b76751bcfad5005440db48c46a4de5d6f02 Mon Sep 17 00:00:00 2001 +From: Michael Niedermayer <michael@niedermayer.cc> +Date: Sat, 29 May 2021 09:58:31 +0200 +Subject: [PATCH] avfilter/vf_vmafmotion: Check dimensions + +Fixes: out of array access +Fixes: Ticket8241 +Fixes: Ticket8246 +Fixes: CVE-2020-22019 +Fixes: CVE-2020-22033 + +Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> + + +CVE: CVE-2020-22033 +CVE: CVE-2020-22019 +Upstream-Status: Backport [82ad1b76751bcfad5005440db48c46a4de5d6f02] + +Signed-off-by: Tony Tascioglu <tony.tascioglu@windriver.com> +--- + libavfilter/vf_vmafmotion.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/libavfilter/vf_vmafmotion.c b/libavfilter/vf_vmafmotion.c +index 2db4783d8d..454ebb8afa 100644 +--- a/libavfilter/vf_vmafmotion.c ++++ b/libavfilter/vf_vmafmotion.c +@@ -238,6 +238,9 @@ int ff_vmafmotion_init(VMAFMotionData *s, + int i; + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(fmt); + ++ if (w < 3 || h < 3) ++ return AVERROR(EINVAL); ++ + s->width = w; + s->height = h; + s->stride = FFALIGN(w * sizeof(uint16_t), 32); +-- +2.32.0 + diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2021-33815.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2021-33815.patch new file mode 100644 index 0000000000..51edb76389 --- /dev/null +++ b/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2021-33815.patch @@ -0,0 +1,44 @@ +From 26d3c81bc5ef2f8c3f09d45eaeacfb4b1139a777 Mon Sep 17 00:00:00 2001 +From: Michael Niedermayer <michael@niedermayer.cc> +Date: Tue, 25 May 2021 19:29:18 +0200 +Subject: [PATCH] avcodec/exr: More strictly check dc_count +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes: out of array access +Fixes: exr/deneme + +Found-by: Burak Çarıkçı <burakcarikci@crypttech.com> +Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> + + +CVE: CVE-2021-33815 +Upstream-Status: Backport [26d3c81bc5ef2f8c3f09d45eaeacfb4b1139a777] + +Signed-off-by: Tony Tascioglu <tony.tascioglu@windriver.com> +--- + libavcodec/exr.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libavcodec/exr.c b/libavcodec/exr.c +index 9377a89169..4648ed7d62 100644 +--- a/libavcodec/exr.c ++++ b/libavcodec/exr.c +@@ -1059,11 +1059,11 @@ static int dwa_uncompress(EXRContext *s, const uint8_t *src, int compressed_size + bytestream2_skip(&gb, ac_size); + } + +- if (dc_size > 0) { ++ { + unsigned long dest_len = dc_count * 2LL; + GetByteContext agb = gb; + +- if (dc_count > (6LL * td->xsize * td->ysize + 63) / 64) ++ if (dc_count != dc_w * dc_h * 3) + return AVERROR_INVALIDDATA; + + av_fast_padded_malloc(&td->dc_data, &td->dc_size, FFALIGN(dest_len, 64) * 2); +-- +2.32.0 + diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2021-38114.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2021-38114.patch new file mode 100644 index 0000000000..ab3ecfecbb --- /dev/null +++ b/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2021-38114.patch @@ -0,0 +1,67 @@ +CVE: CVE-2021-38114 +Upstream-Status: Backport +Signed-off-by: Kiran Surendran <kiran.surendran@windriver.com> + +From 463dbe4e78cc560ca5b09f23a07add0eb78ccee8 Mon Sep 17 00:00:00 2001 +From: maryam ebr <me22bee@outlook.com> +Date: Tue, 3 Aug 2021 01:05:47 -0400 +Subject: [PATCH] avcodec/dnxhddec: check and propagate function return value + +Similar to CVE-2013-0868, here return value check for 'init_vlc' is needed. +crafted DNxHD data can cause unspecified impact. + +Reviewed-by: Paul B Mahol <onemda@gmail.com> +Signed-off-by: James Almer <jamrial@gmail.com> +--- + libavcodec/dnxhddec.c | 22 +++++++++++++++------- + 1 file changed, 15 insertions(+), 7 deletions(-) + +diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c +index c78d55aee5..9b475a6979 100644 +--- a/libavcodec/dnxhddec.c ++++ b/libavcodec/dnxhddec.c +@@ -112,6 +112,7 @@ static av_cold int dnxhd_decode_init(AVCodecContext *avctx) + + static int dnxhd_init_vlc(DNXHDContext *ctx, uint32_t cid, int bitdepth) + { ++ int ret; + if (cid != ctx->cid) { + const CIDEntry *cid_table = ff_dnxhd_get_cid_table(cid); + +@@ -132,19 +133,26 @@ static int dnxhd_init_vlc(DNXHDContext *ctx, uint32_t cid, int bitdepth) + ff_free_vlc(&ctx->dc_vlc); + ff_free_vlc(&ctx->run_vlc); + +- init_vlc(&ctx->ac_vlc, DNXHD_VLC_BITS, 257, ++ if ((ret = init_vlc(&ctx->ac_vlc, DNXHD_VLC_BITS, 257, + ctx->cid_table->ac_bits, 1, 1, +- ctx->cid_table->ac_codes, 2, 2, 0); +- init_vlc(&ctx->dc_vlc, DNXHD_DC_VLC_BITS, bitdepth > 8 ? 14 : 12, ++ ctx->cid_table->ac_codes, 2, 2, 0)) < 0) ++ goto out; ++ if ((ret = init_vlc(&ctx->dc_vlc, DNXHD_DC_VLC_BITS, bitdepth > 8 ? 14 : 12, + ctx->cid_table->dc_bits, 1, 1, +- ctx->cid_table->dc_codes, 1, 1, 0); +- init_vlc(&ctx->run_vlc, DNXHD_VLC_BITS, 62, ++ ctx->cid_table->dc_codes, 1, 1, 0)) < 0) ++ goto out; ++ if ((ret = init_vlc(&ctx->run_vlc, DNXHD_VLC_BITS, 62, + ctx->cid_table->run_bits, 1, 1, +- ctx->cid_table->run_codes, 2, 2, 0); ++ ctx->cid_table->run_codes, 2, 2, 0)) < 0) ++ goto out; + + ctx->cid = cid; + } +- return 0; ++ ret = 0; ++out: ++ if (ret < 0) ++ av_log(ctx->avctx, AV_LOG_ERROR, "init_vlc failed\n"); ++ return ret; + } + + static int dnxhd_get_profile(int cid) +-- +2.31.1 + diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2021-38171.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2021-38171.patch new file mode 100644 index 0000000000..d82f3a4b63 --- /dev/null +++ b/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2021-38171.patch @@ -0,0 +1,42 @@ +CVE: CVE-2021-38171 +Upstream-Status: Backport +Signed-off-by: Kiran Surendran <kiran.surendran@windriver.com> + +From fb993619d1035fa9646506925ea70fb122038999 Mon Sep 17 00:00:00 2001 +From: maryam ebrahimzadeh <me22bee@outlook.com> +Date: Wed, 4 Aug 2021 16:15:18 -0400 +Subject: [PATCH] avformat/adtsenc: return value check for init_get_bits in + adts_decode_extradata + +As the second argument for init_get_bits (buf) can be crafted, a return value check for this function call is necessary. +'buf' is part of 'AVPacket pkt'. +replace init_get_bits with init_get_bits8. + +Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> +(cherry picked from commit 9ffa49496d1aae4cbbb387aac28a9e061a6ab0a6) +Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> +--- + libavformat/adtsenc.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/libavformat/adtsenc.c b/libavformat/adtsenc.c +index 3595cb3bb2..c35a12a628 100644 +--- a/libavformat/adtsenc.c ++++ b/libavformat/adtsenc.c +@@ -51,9 +51,11 @@ static int adts_decode_extradata(AVFormatContext *s, ADTSContext *adts, const ui + GetBitContext gb; + PutBitContext pb; + MPEG4AudioConfig m4ac; +- int off; ++ int off, ret; + +- init_get_bits(&gb, buf, size * 8); ++ ret = init_get_bits8(&gb, buf, size); ++ if (ret < 0) ++ return ret; + off = avpriv_mpeg4audio_get_config2(&m4ac, buf, size, 1, s); + if (off < 0) + return off; +-- +2.31.1 + diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb b/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb new file mode 100644 index 0000000000..c0318ef01d --- /dev/null +++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb @@ -0,0 +1,188 @@ +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 = "GPLv2+ & LGPLv2.1+ & ISC & MIT & BSD-2-Clause & BSD-3-Clause & IJG" +LICENSE:${PN} = "GPLv2+" +LICENSE:libavcodec = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" +LICENSE:libavdevice = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" +LICENSE:libavfilter = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" +LICENSE:libavformat = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" +LICENSE:libavresample = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" +LICENSE:libavutil = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" +LICENSE:libpostproc = "GPLv2+" +LICENSE:libswresample = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" +LICENSE:libswscale = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', 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 \ + file://fix-CVE-2020-20446.patch \ + file://fix-CVE-2020-20453.patch \ + file://fix-CVE-2020-22015.patch \ + file://fix-CVE-2020-22021.patch \ + file://fix-CVE-2020-22033-CVE-2020-22019.patch \ + file://fix-CVE-2021-33815.patch \ + file://fix-CVE-2021-38171.patch \ + file://fix-CVE-2021-38114.patch \ + " +SRC_URI[sha256sum] = "06b10a183ce5371f915c6bb15b7b1fffbe046e8275099c96affc29e17645d909" + +# 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" + +# 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" diff --git a/meta/recipes-multimedia/flac/flac_1.3.1.bb b/meta/recipes-multimedia/flac/flac_1.3.3.bb index f25271f879..c796cacd2c 100644 --- a/meta/recipes-multimedia/flac/flac_1.3.1.bb +++ b/meta/recipes-multimedia/flac/flac_1.3.3.bb @@ -3,21 +3,24 @@ DESCRIPTION = "FLAC stands for Free Lossless Audio Codec, a lossless audio compr HOMEPAGE = "https://xiph.org/flac/" BUGTRACKER = "http://sourceforge.net/p/flac/bugs/" SECTION = "libs" -LICENSE = "GFDL-1.2 & GPLv2+ & LGPLv2.1+ & BSD" +LICENSE = "GFDL-1.2 & GPLv2+ & LGPLv2.1+ & BSD-3-Clause" LIC_FILES_CHKSUM = "file://COPYING.FDL;md5=ad1419ecc56e060eccf8184a87c4285f \ - file://src/Makefile.am;beginline=1;endline=17;md5=0a853b81d9d43d8aad3b53b05cfcc37e \ + file://src/Makefile.am;beginline=1;endline=17;md5=09501c864f89dfc7ead65553129817ca \ file://COPYING.GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://src/flac/main.c;beginline=1;endline=18;md5=d03a766558d233f9cc3ac5dfafd49deb \ + file://src/flac/main.c;beginline=1;endline=18;md5=09777e2934947a36f13568d0beb81199 \ file://COPYING.LGPL;md5=fbc093901857fcd118f065f900982c24 \ - file://src/plugin_common/all.h;beginline=1;endline=18;md5=7c8a3b9e1e66ed0aba765bc6f35da85d \ - file://COPYING.Xiph;md5=a2c4b71c0198682376d483eb5bcc9197 \ + file://src/plugin_common/all.h;beginline=1;endline=18;md5=f56cb4ba9a3bc9ec6102e8df03215271 \ + file://COPYING.Xiph;md5=b59c1b6d7fc0fb7965f821a3d36505e3 \ file://include/FLAC/all.h;beginline=65;endline=70;md5=64474f2b22e9e77b28d8b8b25c983a48" DEPENDS = "libogg" -SRC_URI = "http://downloads.xiph.org/releases/flac/${BP}.tar.xz" +SRC_URI = "http://downloads.xiph.org/releases/flac/${BP}.tar.xz \ +" -SRC_URI[md5sum] = "b9922c9a0378c88d3e901b234f852698" -SRC_URI[sha256sum] = "4773c0099dba767d963fd92143263be338c48702172e8754b9bc5103efe1c56c" +SRC_URI[md5sum] = "26703ed2858c1fc9ffc05136d13daa69" +SRC_URI[sha256sum] = "213e82bd716c9de6db2f98bcadbc4c24c7e2efe8c75939a1a84e28539c4e1748" + +CVE_PRODUCT = "libflac flac" inherit autotools gettext @@ -30,13 +33,14 @@ EXTRA_OECONF = "--disable-oggtest \ " EXTRA_OECONF += "${@bb.utils.contains("TUNE_FEATURES", "altivec", " --enable-altivec", " --disable-altivec", d)}" +EXTRA_OECONF += "${@bb.utils.contains("TUNE_FEATURES", "vsx", " --enable-vsx", " --disable-vsx", d)}" EXTRA_OECONF += "${@bb.utils.contains("TUNE_FEATURES", "core2", " --enable-sse", "", d)}" EXTRA_OECONF += "${@bb.utils.contains("TUNE_FEATURES", "corei7", " --enable-sse", "", d)}" PACKAGES += "libflac libflac++ liboggflac liboggflac++" -FILES_${PN} = "${bindir}/*" -FILES_libflac = "${libdir}/libFLAC.so.*" -FILES_libflac++ = "${libdir}/libFLAC++.so.*" -FILES_liboggflac = "${libdir}/libOggFLAC.so.*" -FILES_liboggflac++ = "${libdir}/libOggFLAC++.so.*" +FILES:${PN} = "${bindir}/*" +FILES:libflac = "${libdir}/libFLAC.so.*" +FILES:libflac++ = "${libdir}/libFLAC++.so.*" +FILES:liboggflac = "${libdir}/libOggFLAC.so.*" +FILES:liboggflac++ = "${libdir}/libOggFLAC++.so.*" diff --git a/meta/recipes-multimedia/gstreamer/gst-devtools/0001-connect-has-a-different-signature-on-musl.patch b/meta/recipes-multimedia/gstreamer/gst-devtools/0001-connect-has-a-different-signature-on-musl.patch new file mode 100644 index 0000000000..c0e4581358 --- /dev/null +++ b/meta/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/meta/recipes-multimedia/gstreamer/gst-devtools_1.18.5.bb b/meta/recipes-multimedia/gstreamer/gst-devtools_1.18.5.bb new file mode 100644 index 0000000000..1b46b89cb9 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gst-devtools_1.18.5.bb @@ -0,0 +1,49 @@ +SUMMARY = "Gstreamer validation tool" +DESCRIPTION = "A Tool to test GStreamer components" +HOMEPAGE = "https://gstreamer.freedesktop.org/documentation/gst-devtools/index.html" +SECTION = "multimedia" + +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://validate/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343" + +#S = "${WORKDIR}/gst-devtools-${PV}" + +SRC_URI = "https://gstreamer.freedesktop.org/src/gst-devtools/gst-devtools-${PV}.tar.xz \ + file://0001-connect-has-a-different-signature-on-musl.patch \ + " + +SRC_URI[sha256sum] = "fecffc86447daf5c2a06843c757a991d745caa2069446a0d746e99b13f7cb079" + +DEPENDS = "json-glib glib-2.0 glib-2.0-native gstreamer1.0 gstreamer1.0-plugins-base" +RRECOMMENDS:${PN} = "git" + +FILES:${PN} += "${datadir}/gstreamer-1.0/* ${libdir}/gst-validate-launcher/* ${libdir}/gstreamer-1.0/*" + +inherit meson pkgconfig gettext upstream-version-is-even gobject-introspection + +# TODO: put this in a gettext.bbclass patch +def gettext_oemeson(d): + if d.getVar('USE_NLS') == 'no': + return '-Dnls=disabled' + # Remove the NLS bits if USE_NLS is no or INHIBIT_DEFAULT_DEPS is set + if d.getVar('INHIBIT_DEFAULT_DEPS') and not oe.utils.inherits(d, 'cross-canadian'): + return '-Dnls=disabled' + return '-Dnls=enabled' + +EXTRA_OEMESON += " \ + -Ddoc=disabled \ + -Ddebug_viewer=disabled \ + -Dtests=disabled \ + -Dvalidate=enabled \ + ${@gettext_oemeson(d)} \ +" + +do_install:append () { + for fn in ${bindir}/gst-validate-launcher \ + ${libdir}/gst-validate-launcher/python/launcher/config.py; do + sed -i -e 's,${B},/usr/src/debug/${PN},g' -e 's,${S},/usr/src/debug/${PN},g' ${D}$fn + done +} + +GIR_MESON_ENABLE_FLAG = "enabled" +GIR_MESON_DISABLE_FLAG = "disabled" diff --git a/meta/recipes-multimedia/gstreamer/gst-examples/0001-Make-player-examples-installable.patch b/meta/recipes-multimedia/gstreamer/gst-examples/0001-Make-player-examples-installable.patch new file mode 100644 index 0000000000..ab93c13244 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gst-examples/0001-Make-player-examples-installable.patch @@ -0,0 +1,37 @@ +From 7924016fce2d0b435891a335cdae52fc939c7e3b Mon Sep 17 00:00:00 2001 +From: Jussi Kukkonen <jussi.kukkonen@intel.com> +Date: Thu, 17 Aug 2017 11:07:02 +0300 +Subject: [PATCH] Make player examples installable + +Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> +Upstream-Status: Denied [Upstream considers these code examples, for now a least] + +https://bugzilla.gnome.org/show_bug.cgi?id=777827 + +--- + playback/player/gst-play/meson.build | 1 + + playback/player/gtk/meson.build | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/playback/player/gst-play/meson.build b/playback/player/gst-play/meson.build +index 8ec021d..977cc5c 100644 +--- a/playback/player/gst-play/meson.build ++++ b/playback/player/gst-play/meson.build +@@ -2,5 +2,6 @@ executable('gst-play', + ['gst-play.c', + 'gst-play-kb.c', + 'gst-play-kb.h'], ++ install: true, + dependencies : [gst_dep, gstplayer_dep, m_dep]) + +diff --git a/playback/player/gtk/meson.build b/playback/player/gtk/meson.build +index f7a7419..6281130 100644 +--- a/playback/player/gtk/meson.build ++++ b/playback/player/gtk/meson.build +@@ -13,5 +13,6 @@ if gtk_dep.found() + gtk_play_resources, + 'gtk-video-renderer.h', + 'gtk-video-renderer.c'], ++ install: true, + dependencies : [glib_dep, gobject_dep, gmodule_dep, gst_dep, gsttag_dep, gstplayer_dep, gtk_dep, x11_dep]) + endif diff --git a/meta/recipes-multimedia/gstreamer/gst-player/gst-player.desktop b/meta/recipes-multimedia/gstreamer/gst-examples/gst-player.desktop index 9fd207b384..7ddd456a1e 100644 --- a/meta/recipes-multimedia/gstreamer/gst-player/gst-player.desktop +++ b/meta/recipes-multimedia/gstreamer/gst-examples/gst-player.desktop @@ -1,7 +1,7 @@ [Desktop Entry] Name=Media Player Comment=Basic media player -Icon=audio-player +Icon=multimedia-player TryExec=gtk-play Exec=gtk-play StartupNotify=true diff --git a/meta/recipes-multimedia/gstreamer/gst-examples_1.18.5.bb b/meta/recipes-multimedia/gstreamer/gst-examples_1.18.5.bb new file mode 100644 index 0000000000..a720bb73ff --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gst-examples_1.18.5.bb @@ -0,0 +1,35 @@ +SUMMARY = "GStreamer examples (including gtk-play, gst-play)" +DESCRIPTION = "GStreamer example applications" +HOMEPAGE = "https://gitlab.freedesktop.org/gstreamer/gst-examples" +BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-examples/-/issues" +LICENSE = "LGPL-2.0+" +LIC_FILES_CHKSUM = "file://playback/player/gtk/gtk-play.c;beginline=1;endline=20;md5=f8c72dae3d36823ec716a9ebcae593b9" + +DEPENDS = "glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad gtk+3 libsoup-2.4 json-glib glib-2.0-native" + +SRC_URI = "git://gitlab.freedesktop.org/gstreamer/gst-examples.git;protocol=https;branch=1.18 \ + file://0001-Make-player-examples-installable.patch \ + file://gst-player.desktop \ + " + +SRCREV = "fe9a365dc0f1ff632abcfe3322ac5527a2cf30a0" + +S = "${WORKDIR}/git" + +inherit meson pkgconfig features_check + +UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.(\d*[02468])+(\.\d+)+)" + +ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" + +do_install:append() { + install -m 0644 -D ${WORKDIR}/gst-player.desktop ${D}${datadir}/applications/gst-player.desktop +} + +RDEPENDS:${PN} = "gstreamer1.0-plugins-base-playback" +RRECOMMENDS:${PN} = "gstreamer1.0-plugins-base-meta \ + gstreamer1.0-plugins-good-meta \ + gstreamer1.0-plugins-bad-meta \ + ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "gstreamer1.0-libav", "", d)} \ + ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "gstreamer1.0-plugins-ugly-meta", "", d)}" +RPROVIDES:${PN} += "gst-player gst-player-bin" diff --git a/meta/recipes-multimedia/gstreamer/gst-player/Add-error-signal-emission-for-missing-plugins.patch b/meta/recipes-multimedia/gstreamer/gst-player/Add-error-signal-emission-for-missing-plugins.patch deleted file mode 100644 index 712d46daa0..0000000000 --- a/meta/recipes-multimedia/gstreamer/gst-player/Add-error-signal-emission-for-missing-plugins.patch +++ /dev/null @@ -1,252 +0,0 @@ -From d64c7edb66f4a64ff49c4306cf77fd269b7079ab Mon Sep 17 00:00:00 2001 -From: Jussi Kukkonen <jussi.kukkonen@intel.com> -Date: Mon, 16 Mar 2015 13:45:30 +0200 -Subject: [PATCH] Add error signal emission for missing plugins - -Add a missing plugins error signal to gst-player. Note that this error -does not necessarily mean the playback has completely failed, but in -practice the user experience will be bad (think, e.g. of a mp4 file -where H.264 codec is missing: AAC playback still works...). - -Use the signal in gtk-play to show a infobar if plugins are missing. - -Submitted upstream at https://github.com/sdroege/gst-player/pull/11 - -Upstream-Status: Submitted -Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> ---- - configure.ac | 2 +- - gtk/gtk-play.c | 54 +++++++++++++++++++++++++++++++++++++++++++++- - lib/gst/player/gstplayer.c | 22 +++++++++++++++++++ - lib/gst/player/gstplayer.h | 3 ++- - 4 files changed, 78 insertions(+), 3 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 90ab74c..6cdb4eb 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -53,7 +53,7 @@ AC_SUBST(LT_AGE) - PKG_PROG_PKG_CONFIG - - PKG_CHECK_MODULES(GLIB, [glib-2.0 gobject-2.0]) --PKG_CHECK_MODULES(GSTREAMER, [gstreamer-1.0 >= 1.4 gstreamer-video-1.0 >= 1.4]) -+PKG_CHECK_MODULES(GSTREAMER, [gstreamer-1.0 >= 1.4 gstreamer-video-1.0 >= 1.4 gstreamer-pbutils-1.0]) - - GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`" - AC_SUBST(GLIB_PREFIX) -diff --git a/gtk/gtk-play.c b/gtk/gtk-play.c -index b92773b..e2b605a 100644 ---- a/gtk/gtk-play.c -+++ b/gtk/gtk-play.c -@@ -30,6 +30,8 @@ typedef struct - GtkWidget *prev_button, *next_button; - GtkWidget *seekbar; - GtkWidget *video_area; -+ GtkWidget *info_label; -+ GtkWidget *info_bar; - GtkWidget *volume_button; - gulong seekbar_value_changed_signal_id; - gboolean playing; -@@ -141,6 +143,13 @@ play_pause_clicked_cb (GtkButton * button, GtkPlay * play) - } - - static void -+clear_missing_plugins (GtkPlay * play) -+{ -+ gtk_label_set_text (GTK_LABEL (play->info_label), ""); -+ gtk_widget_hide (play->info_bar); -+} -+ -+static void - skip_prev_clicked_cb (GtkButton * button, GtkPlay * play) - { - GList *prev; -@@ -155,6 +164,7 @@ skip_prev_clicked_cb (GtkButton * button, GtkPlay * play) - - gtk_widget_set_sensitive (play->next_button, TRUE); - gst_player_set_uri (play->player, prev->data); -+ clear_missing_plugins (play); - gst_player_play (play->player); - set_title (play, prev->data); - gtk_widget_set_sensitive (play->prev_button, g_list_previous (prev) != NULL); -@@ -175,6 +185,7 @@ skip_next_clicked_cb (GtkButton * button, GtkPlay * play) - - gtk_widget_set_sensitive (play->prev_button, TRUE); - gst_player_set_uri (play->player, next->data); -+ clear_missing_plugins (play); - gst_player_play (play->player); - set_title (play, next->data); - gtk_widget_set_sensitive (play->next_button, g_list_next (next) != NULL); -@@ -193,10 +204,16 @@ volume_changed_cb (GtkScaleButton * button, gdouble value, GtkPlay * play) - gst_player_set_volume (play->player, value); - } - -+void -+info_bar_response_cb (GtkInfoBar * bar, gint response, GtkPlay * play) -+{ -+ gtk_widget_hide (GTK_WIDGET (bar)); -+} -+ - static void - create_ui (GtkPlay * play) - { -- GtkWidget *controls, *main_hbox, *main_vbox; -+ GtkWidget *controls, *main_hbox, *main_vbox, *info_bar, *content_area; - - play->window = gtk_window_new (GTK_WINDOW_TOPLEVEL); - g_signal_connect (G_OBJECT (play->window), "delete-event", -@@ -208,6 +225,20 @@ create_ui (GtkPlay * play) - g_signal_connect (play->video_area, "realize", - G_CALLBACK (video_area_realize_cb), play); - -+ play->info_bar = gtk_info_bar_new (); -+ gtk_info_bar_set_message_type (GTK_INFO_BAR (play->info_bar), -+ GTK_MESSAGE_WARNING); -+ //gtk_info_bar_set_show_close_button (GTK_INFO_BAR (play->info_bar), -+ // TRUE); -+ gtk_widget_set_no_show_all (play->info_bar, TRUE); -+ g_signal_connect (play->info_bar, "response", -+ G_CALLBACK (info_bar_response_cb), play); -+ -+ content_area = gtk_info_bar_get_content_area (GTK_INFO_BAR (play->info_bar)); -+ play->info_label = gtk_label_new (""); -+ gtk_container_add (GTK_CONTAINER (content_area), play->info_label); -+ gtk_widget_show (play->info_label); -+ - /* Unified play/pause button */ - play->play_pause_button = - gtk_button_new_from_icon_name ("media-playback-pause", -@@ -258,6 +289,7 @@ create_ui (GtkPlay * play) - - main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); - gtk_box_pack_start (GTK_BOX (main_vbox), main_hbox, TRUE, TRUE, 0); -+ gtk_box_pack_start (GTK_BOX (main_vbox), play->info_bar, FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (main_vbox), controls, FALSE, FALSE, 0); - gtk_container_add (GTK_CONTAINER (play->window), main_vbox); - -@@ -322,6 +354,7 @@ eos_cb (GstPlayer * unused, GtkPlay * play) - gtk_widget_set_sensitive (play->next_button, g_list_next (next) != NULL); - - gst_player_set_uri (play->player, next->data); -+ clear_missing_plugins (play); - gst_player_play (play->player); - set_title (play, next->data); - } else { -@@ -330,6 +363,24 @@ eos_cb (GstPlayer * unused, GtkPlay * play) - } - } - -+static void -+error_cb (GstPlayer * player, GError * err, GtkPlay * play) -+{ -+ char *message; -+ -+ if (g_error_matches (err, gst_player_error_quark (), -+ GST_PLAYER_ERROR_MISSING_PLUGIN)) { -+ // add message to end of any existing message: there may be -+ // multiple missing plugins. -+ message = g_strdup_printf ("%s%s. ", -+ gtk_label_get_text (GTK_LABEL (play->info_label)), err->message); -+ gtk_label_set_text (GTK_LABEL (play->info_label), message); -+ g_free (message); -+ -+ gtk_widget_show (play->info_bar); -+ } -+} -+ - int - main (gint argc, gchar ** argv) - { -@@ -422,6 +473,7 @@ main (gint argc, gchar ** argv) - g_signal_connect (play.player, "video-dimensions-changed", - G_CALLBACK (video_dimensions_changed_cb), &play); - g_signal_connect (play.player, "end-of-stream", G_CALLBACK (eos_cb), &play); -+ g_signal_connect (play.player, "error", G_CALLBACK (error_cb), &play); - - /* We have file(s) that need playing. */ - set_title (&play, g_list_first (play.uris)->data); -diff --git a/lib/gst/player/gstplayer.c b/lib/gst/player/gstplayer.c -index bd682d9..78e7ba1 100644 ---- a/lib/gst/player/gstplayer.c -+++ b/lib/gst/player/gstplayer.c -@@ -47,6 +47,7 @@ - - #include <gst/gst.h> - #include <gst/video/video.h> -+#include <gst/pbutils/missing-plugins.h> - - GST_DEBUG_CATEGORY_STATIC (gst_player_debug); - #define GST_CAT_DEFAULT gst_player_debug -@@ -238,6 +239,7 @@ gst_player_class_init (GstPlayerClass * klass) - g_signal_new ("video-dimensions-changed", G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST | G_SIGNAL_NO_RECURSE | G_SIGNAL_NO_HOOKS, 0, NULL, - NULL, NULL, G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT); -+ - } - - static void -@@ -619,6 +621,21 @@ error_cb (GstBus * bus, GstMessage * msg, gpointer user_data) - g_mutex_unlock (&self->priv->lock); - } - -+static void -+element_cb (GstBus * bus, GstMessage * msg, gpointer user_data) -+{ -+ GstPlayer *self = GST_PLAYER (user_data); -+ -+ if (gst_is_missing_plugin_message (msg)) { -+ gchar *desc; -+ -+ desc = gst_missing_plugin_message_get_description (msg); -+ emit_error (self, g_error_new (GST_PLAYER_ERROR, -+ GST_PLAYER_ERROR_MISSING_PLUGIN, "Missing plugin '%s'", desc)); -+ g_free (desc); -+ } -+} -+ - static gboolean - eos_dispatch (gpointer user_data) - { -@@ -1059,6 +1076,8 @@ gst_player_main (gpointer data) - NULL, NULL); - g_source_attach (bus_source, self->priv->context); - -+ g_signal_connect (G_OBJECT (bus), "message::element", -+ G_CALLBACK (element_cb), self); - g_signal_connect (G_OBJECT (bus), "message::error", G_CALLBACK (error_cb), - self); - g_signal_connect (G_OBJECT (bus), "message::eos", G_CALLBACK (eos_cb), self); -@@ -1560,6 +1579,7 @@ gst_player_error_get_type (void) - static gsize id = 0; - static const GEnumValue values[] = { - {C_ENUM (GST_PLAYER_ERROR_FAILED), "GST_PLAYER_ERROR_FAILED", "failed"}, -+ {C_ENUM (GST_PLAYER_ERROR_MISSING_PLUGIN), "GST_PLAYER_ERROR_MISSING_PLUGIN", "missing-plugin"}, - {0, NULL, NULL} - }; - -@@ -1577,6 +1597,8 @@ gst_player_error_get_name (GstPlayerError error) - switch (error) { - case GST_PLAYER_ERROR_FAILED: - return "failed"; -+ case GST_PLAYER_ERROR_MISSING_PLUGIN: -+ return "missing-plugin"; - } - - g_assert_not_reached (); -diff --git a/lib/gst/player/gstplayer.h b/lib/gst/player/gstplayer.h -index c438513..35fb5bb 100644 ---- a/lib/gst/player/gstplayer.h -+++ b/lib/gst/player/gstplayer.h -@@ -44,7 +44,8 @@ GType gst_player_error_get_type (void); - #define GST_TYPE_PLAYER_ERROR (gst_player_error_get_type ()) - - typedef enum { -- GST_PLAYER_ERROR_FAILED = 0 -+ GST_PLAYER_ERROR_FAILED = 0, -+ GST_PLAYER_ERROR_MISSING_PLUGIN - } GstPlayerError; - - const gchar *gst_player_error_get_name (GstPlayerError error); --- -2.1.4 - diff --git a/meta/recipes-multimedia/gstreamer/gst-player/Fix-pause-play.patch b/meta/recipes-multimedia/gstreamer/gst-player/Fix-pause-play.patch deleted file mode 100644 index 783c42ad70..0000000000 --- a/meta/recipes-multimedia/gstreamer/gst-player/Fix-pause-play.patch +++ /dev/null @@ -1,107 +0,0 @@ -Fix pause/play - -The current player state is now notified via the state-changed signal, -and in the GTK UI it was only used to keep track of the desired state. - -This is a backport of upstream commit 738479c7a0. - -Upstream-Status: Backport -Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> - ---- - gtk/gtk-play.c | 8 ++++++-- - lib/gst/player/gstplayer.c | 12 ------------ - lib/gst/player/gstplayer.h | 2 -- - 3 files changed, 6 insertions(+), 16 deletions(-) - -diff --git a/gtk/gtk-play.c b/gtk/gtk-play.c -index 6e7a098..e2b605a 100644 ---- a/gtk/gtk-play.c -+++ b/gtk/gtk-play.c -@@ -34,6 +34,7 @@ typedef struct - GtkWidget *info_bar; - GtkWidget *volume_button; - gulong seekbar_value_changed_signal_id; -+ gboolean playing; - } GtkPlay; - - /* Compat stubs */ -@@ -118,12 +119,13 @@ play_pause_clicked_cb (GtkButton * button, GtkPlay * play) - { - GtkWidget *image; - -- if (gst_player_is_playing (play->player)) { -+ if (play->playing) { - gst_player_pause (play->player); - image = - gtk_image_new_from_icon_name ("media-playback-start", - GTK_ICON_SIZE_BUTTON); - gtk_button_set_image (GTK_BUTTON (play->play_pause_button), image); -+ play->playing = FALSE; - } else { - gchar *title; - -@@ -136,6 +138,7 @@ play_pause_clicked_cb (GtkButton * button, GtkPlay * play) - title = gst_player_get_uri (play->player); - set_title (play, title); - g_free (title); -+ play->playing = TRUE; - } - } - -@@ -335,7 +338,7 @@ video_dimensions_changed_cb (GstPlayer * unused, gint width, gint height, - static void - eos_cb (GstPlayer * unused, GtkPlay * play) - { -- if (gst_player_is_playing (play->player)) { -+ if (play->playing) { - GList *next = NULL; - gchar *uri; - -@@ -452,6 +455,7 @@ main (gint argc, gchar ** argv) - } - - play.player = gst_player_new (); -+ play.playing = TRUE; - - g_object_set (play.player, "dispatch-to-main-context", TRUE, NULL); - -diff --git a/lib/gst/player/gstplayer.c b/lib/gst/player/gstplayer.c -index 069b284..78e7ba1 100644 ---- a/lib/gst/player/gstplayer.c -+++ b/lib/gst/player/gstplayer.c -@@ -1422,18 +1422,6 @@ gst_player_set_uri (GstPlayer * self, const gchar * val) - g_object_set (self, "uri", val, NULL); - } - --gboolean --gst_player_is_playing (GstPlayer * self) --{ -- gboolean val; -- -- g_return_val_if_fail (GST_IS_PLAYER (self), FALSE); -- -- g_object_get (self, "is-playing", &val, NULL); -- -- return val; --} -- - GstClockTime - gst_player_get_position (GstPlayer * self) - { -diff --git a/lib/gst/player/gstplayer.h b/lib/gst/player/gstplayer.h -index 6933dd7..35fb5bb 100644 ---- a/lib/gst/player/gstplayer.h -+++ b/lib/gst/player/gstplayer.h -@@ -93,8 +93,6 @@ gchar * gst_player_get_uri (GstPlayer * player); - void gst_player_set_uri (GstPlayer * player, - const gchar * uri); - --gboolean gst_player_is_playing (GstPlayer * player); -- - GstClockTime gst_player_get_position (GstPlayer * player); - GstClockTime gst_player_get_duration (GstPlayer * player); - --- -2.1.4 - diff --git a/meta/recipes-multimedia/gstreamer/gst-player/filechooser.patch b/meta/recipes-multimedia/gstreamer/gst-player/filechooser.patch deleted file mode 100644 index 7bf1b034b3..0000000000 --- a/meta/recipes-multimedia/gstreamer/gst-player/filechooser.patch +++ /dev/null @@ -1,54 +0,0 @@ -Upstream-Status: Submitted -Signed-off-by: Ross Burton <ross.burton@intel.com> - -From 43d4b19ab611d844156e26c4840cc54ddb73ae03 Mon Sep 17 00:00:00 2001 -From: Ross Burton <ross.burton@intel.com> -Date: Thu, 26 Feb 2015 17:17:05 +0000 -Subject: [PATCH] gtk-play: show a file chooser if no URIs were passed - ---- - gtk/gtk-play.c | 28 ++++++++++++++++++++++++++-- - 1 file changed, 26 insertions(+), 2 deletions(-) - -diff --git a/gtk/gtk-play.c b/gtk/gtk-play.c -index f015077..9766a72 100644 ---- a/gtk/gtk-play.c -+++ b/gtk/gtk-play.c -@@ -319,8 +319,32 @@ main (gint argc, gchar ** argv) - // FIXME: Add support for playlists and stuff - /* Parse the list of the file names we have to play. */ - if (!file_names) { -- g_print ("Usage: %s FILE(s)|URI(s)\n", APP_NAME); -- return 1; -+ GtkWidget *chooser; -+ int res; -+ -+ chooser = gtk_file_chooser_dialog_new ("Select files to play", NULL, -+ GTK_FILE_CHOOSER_ACTION_OPEN, -+ "_Cancel", GTK_RESPONSE_CANCEL, -+ "_Open", GTK_RESPONSE_ACCEPT, -+ NULL); -+ g_object_set (chooser, -+ "local-only", FALSE, -+ "select-multiple", TRUE, -+ NULL); -+ -+ res = gtk_dialog_run (GTK_DIALOG (chooser)); -+ if (res == GTK_RESPONSE_ACCEPT) { -+ GSList *l; -+ -+ l = gtk_file_chooser_get_uris (GTK_FILE_CHOOSER (chooser)); -+ while (l) { -+ play.uris = g_list_append (play.uris, l->data); -+ l = g_slist_delete_link (l, l); -+ } -+ } else { -+ return 0; -+ } -+ gtk_widget_destroy (chooser); - } else { - guint i; - --- -1.7.10.4 - diff --git a/meta/recipes-multimedia/gstreamer/gst-player/gtk2.patch b/meta/recipes-multimedia/gstreamer/gst-player/gtk2.patch deleted file mode 100644 index 2cd18bbc95..0000000000 --- a/meta/recipes-multimedia/gstreamer/gst-player/gtk2.patch +++ /dev/null @@ -1,71 +0,0 @@ -As the rest of Sato is GTK+ 2, patch gtk-play to use GTK+ 2. When the rest of -Sato has been ported to GTK+ 3 this patch can be dropped. - -Upstream-Status: Inappropriate -Signed-off-by: Ross Burton <ross.burton@intel.com> - - -diff --git a/configure.ac b/configure.ac -index b8af13b..90ab74c 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -60,7 +60,7 @@ AC_SUBST(GLIB_PREFIX) - GST_PREFIX="`$PKG_CONFIG --variable=prefix gstreamer-1.0`" - AC_SUBST(GST_PREFIX) - --PKG_CHECK_MODULES(GTK, [gtk+-3.0], [have_gtk="yes"], [have_gtk="no"]) -+PKG_CHECK_MODULES(GTK, [gtk+-2.0], [have_gtk="yes"], [have_gtk="no"]) - AM_CONDITIONAL(HAVE_GTK, test "x$have_gtk" != "xno") - - GOBJECT_INTROSPECTION_CHECK([1.31.1]) -diff --git a/gtk/gtk-play.c b/gtk/gtk-play.c -index f015077..954d6fb 100644 ---- a/gtk/gtk-play.c -+++ b/gtk/gtk-play.c -@@ -34,6 +34,46 @@ typedef struct - gulong seekbar_value_changed_signal_id; - } GtkPlay; - -+/* Compat stubs */ -+GtkWidget * -+gtk_box_new (GtkOrientation orientation, -+ gint spacing) -+{ -+ switch (orientation) { -+ case GTK_ORIENTATION_HORIZONTAL: -+ return gtk_hbox_new (FALSE, spacing); -+ case GTK_ORIENTATION_VERTICAL: -+ return gtk_vbox_new (FALSE, spacing); -+ } -+} -+ -+GtkWidget* -+gtk_button_new_from_icon_name (const gchar *icon_name, -+ GtkIconSize size) -+{ -+ GtkWidget *button; -+ GtkWidget *image; -+ -+ image = gtk_image_new_from_icon_name (icon_name, size); -+ button = g_object_new (GTK_TYPE_BUTTON, -+ "image", image, -+ NULL); -+ return button; -+} -+ -+GtkWidget * -+gtk_scale_new_with_range (GtkOrientation orientation, -+ gdouble min, -+ gdouble max, -+ gdouble step) -+{ -+ switch (orientation) { -+ case GTK_ORIENTATION_HORIZONTAL: -+ return gtk_hscale_new_with_range (min, max, step); -+ case GTK_ORIENTATION_VERTICAL: -+ return gtk_vscale_new_with_range (min, max, step); -+ } -+} - - static void - set_title (GtkPlay * play, const gchar * title) diff --git a/meta/recipes-multimedia/gstreamer/gst-player_git.bb b/meta/recipes-multimedia/gstreamer/gst-player_git.bb deleted file mode 100644 index 54cfbbc927..0000000000 --- a/meta/recipes-multimedia/gstreamer/gst-player_git.bb +++ /dev/null @@ -1,38 +0,0 @@ -SUMMARY="GStreamer playback helper library and examples" - -LICENSE = "LGPL-2.0+" -LIC_FILES_CHKSUM = "file://lib/gst/player/gstplayer.c;beginline=1;endline=19;md5=03aeca9d8295f811817909075a15ff65" - -DEPENDS = "glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base gtk+" - -SRC_URI = "git://github.com/sdroege/gst-player.git \ - file://filechooser.patch \ - file://gtk2.patch \ - file://Fix-pause-play.patch \ - file://Add-error-signal-emission-for-missing-plugins.patch \ - file://gst-player.desktop" - -SRCREV = "5386c5b984d40ef5434673ed62204e69aaf52645" - -S = "${WORKDIR}/git" - -inherit autotools gtk-doc lib_package pkgconfig - -do_configure_prepend() { - touch ${S}/ChangeLog -} - -EXTRA_OECONF += "ac_cv_path_VALGRIND=no ac_cv_path_GDB=no" - -do_install_append() { - install -m 0644 -D ${WORKDIR}/gst-player.desktop ${D}${datadir}/applications/gst-player.desktop -} - -FILES_${PN}-bin += "${datadir}/applications/*.desktop" - -RDEPENDS_${PN}-bin = "gstreamer1.0-plugins-base-playback" -RRECOMMENDS_${PN}-bin = "gstreamer1.0-plugins-base-meta \ - gstreamer1.0-plugins-good-meta \ - gstreamer1.0-plugins-bad-meta \ - ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "gstreamer1.0-libav", "", d)} \ - ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "gstreamer1.0-plugins-ugly-meta", "", d)}" diff --git a/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc b/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc deleted file mode 100644 index cb1be06d09..0000000000 --- a/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc +++ /dev/null @@ -1,58 +0,0 @@ -PACKAGESPLITFUNCS_prepend = " split_gstreamer10_packages " -PACKAGESPLITFUNCS_append = " set_metapkg_rdepends " - -python split_gstreamer10_packages () { - gst_libdir = d.expand('${libdir}/gstreamer-${LIBV}') - postinst = d.getVar('plugin_postinst', True) - glibdir = d.getVar('libdir', True) - - do_split_packages(d, glibdir, '^lib(.*)\.so\.*', 'lib%s', 'gstreamer %s library', extra_depends='', allow_links=True) - do_split_packages(d, gst_libdir, 'libgst(.*)\.so$', d.expand('${PN}-%s'), 'GStreamer plugin for %s', postinst=postinst, extra_depends='') - do_split_packages(d, gst_libdir, 'libgst(.*)\.la$', d.expand('${PN}-%s-dev'), 'GStreamer plugin for %s (development files)', extra_depends=d.expand('${PN}-dev')) - do_split_packages(d, gst_libdir, 'libgst(.*)\.a$', d.expand('${PN}-%s-staticdev'), 'GStreamer plugin for %s (static development files)', extra_depends=d.expand('${PN}-staticdev')) -} - -python set_metapkg_rdepends () { - import os - - pn = d.getVar('PN', True) - metapkg = pn + '-meta' - d.setVar('ALLOW_EMPTY_' + metapkg, "1") - d.setVar('FILES_' + metapkg, "") - blacklist = [ pn, pn + '-locale', pn + '-dev', pn + '-dbg', pn + '-doc', pn + '-meta' ] - metapkg_rdepends = [] - packages = d.getVar('PACKAGES', True).split() - pkgdest = d.getVar('PKGDEST', True) - for pkg in packages[1:]: - if not pkg in blacklist and not pkg in metapkg_rdepends and not pkg.endswith('-dev') and not pkg.endswith('-dbg') and not pkg.count('locale') and not pkg.count('-staticdev'): - # 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}-apps = "${bindir}" - -RDEPENDS_${PN}-apps += "perl" -RRECOMMENDS_${PN} += "${PN}-meta" - -FILES_${PN} = "" -FILES_${PN}-dbg += "${libdir}/gstreamer-${LIBV}/.debug" -FILES_${PN}-glib = "${datadir}/glib-2.0" - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav.inc deleted file mode 100644 index 84e6e95d36..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav.inc +++ /dev/null @@ -1,32 +0,0 @@ -SUMMARY = "Libav-based GStreamer 1.x plugin" -SECTION = "multimedia" -LICENSE = "GPLv2+ & LGPLv2+ & ( (GPLv2+ & LGPLv2.1+) | (GPLv3+ & LGPLv3+) )" -LICENSE_FLAGS = "commercial" -HOMEPAGE = "http://www.gstreamer.net/" -DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base zlib bzip2" - -inherit autotools pkgconfig - -# CAUTION: Using the system libav is not recommended. Since the libav API is changing all the time, -# compilation errors (and other, more subtle bugs) can happen. It is usually better to rely on the -# libav copy included in the gst-libav package. -PACKAGECONFIG ??= " orc yasm " -PACKAGECONFIG[libav] = "--with-system-libav,,libav" -PACKAGECONFIG[lgpl] = "--enable-lgpl,," -PACKAGECONFIG[yasm] = "--enable-yasm,--disable-yasm,yasm-native" -PACKAGECONFIG[orc] = "--enable-orc,--disable-orc,orc" - - -GSTREAMER_1_0_DEBUG ?= "--disable-debug" - -LIBAV_EXTRA_CONFIGURE = "--with-libav-extra-configure" -LIBAV_EXTRA_CONFIGURE_COMMON = \ -'${LIBAV_EXTRA_CONFIGURE}="${LIBAV_EXTRA_CONFIGURE_COMMON_ARG}"' - -EXTRA_OECONF = "${LIBAV_EXTRA_CONFIGURE_COMMON}" - -FILES_${PN} += "${libdir}/gstreamer-1.0/*.so" -FILES_${PN}-dbg += "${libdir}/gstreamer-1.0/.debug" -FILES_${PN}-dev += "${libdir}/gstreamer-1.0/*.la" -FILES_${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a" - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-Disable-yasm-for-libav-when-disable-yasm.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-Disable-yasm-for-libav-when-disable-yasm.patch deleted file mode 100644 index 1d99ad1251..0000000000 --- a/meta/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/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/workaround-to-build-gst-libav-for-i586-with-gcc.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/workaround-to-build-gst-libav-for-i586-with-gcc.patch deleted file mode 100644 index ccadea4d5c..0000000000 --- a/meta/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; - h->last_qscale_diff = 0; - return 0; diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.18.5.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.18.5.bb new file mode 100644 index 0000000000..a77ec62759 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.18.5.bb @@ -0,0 +1,24 @@ +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] = "822e008a910e9dd13aedbdd8dc63fedef4040c0ee2e927bab3112e9de693a548" + +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/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.4.5.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.4.5.bb deleted file mode 100644 index 97fc7ec3f8..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.4.5.bb +++ /dev/null @@ -1,27 +0,0 @@ -include gstreamer1.0-libav.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \ - file://ext/libav/gstav.h;beginline=1;endline=18;md5=a752c35267d8276fd9ca3db6994fca9c \ - file://gst-libs/ext/libav/LICENSE;md5=ea66e97a7ac1db978cf3529068a8c948 \ - file://gst-libs/ext/libav/COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://gst-libs/ext/libav/COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \ - file://gst-libs/ext/libav/COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \ - file://gst-libs/ext/libav/COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02" - -SRC_URI = " \ - http://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${PV}.tar.xz \ - file://0001-Disable-yasm-for-libav-when-disable-yasm.patch \ - file://workaround-to-build-gst-libav-for-i586-with-gcc.patch \ -" -SRC_URI[md5sum] = "f4922a46adbcbe7bd01331ff5dc7979d" -SRC_URI[sha256sum] = "605c62624604f3bb5c870844cc1f2711779cc533b004c2aa1d8c0d58557afbbc" - -LIBAV_EXTRA_CONFIGURE_COMMON_ARG = "--target-os=linux \ - --cc='${CC}' --as='${CC}' --ld='${CC}' --nm='${NM}' --ar='${AR}' \ - --ranlib='${RANLIB}' \ - ${GSTREAMER_1_0_DEBUG} \ - --cross-prefix='${HOST_PREFIX}'" - -S = "${WORKDIR}/gst-libav-${PV}" - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb deleted file mode 100644 index bf1b87e6de..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb +++ /dev/null @@ -1,29 +0,0 @@ -DEFAULT_PREFERENCE = "-1" - -include gstreamer1.0-libav.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \ - file://ext/libav/gstav.h;beginline=1;endline=18;md5=a752c35267d8276fd9ca3db6994fca9c \ - file://gst-libs/ext/libav/LICENSE;md5=23a54f59b82572c203a559346e89ed57 \ - file://gst-libs/ext/libav/COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://gst-libs/ext/libav/COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \ - file://gst-libs/ext/libav/COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \ - file://gst-libs/ext/libav/COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02" - -SRC_URI = "git://anongit.freedesktop.org/gstreamer/gst-libav;branch=master" -S = "${WORKDIR}/git" - -SRCREV = "127202d6f65584891dabf92be031f0d170b0e7f1" - -LIBAV_EXTRA_CONFIGURE_COMMON_ARG = "--target-os=linux \ - --cc='${CC}' --as='${CC}' --ld='${CC}' --nm='${NM}' --ar='${AR}' \ - ${GSTREAMER_1_0_DEBUG} \ - --cross-prefix='${HOST_PREFIX}'" - -do_configure_prepend() { - cd ${S} - ./autogen.sh --noconfigure - cd ${B} -} - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb index 3ef10c3723..57a9adbaec 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb @@ -1,6 +1,9 @@ -DESCRIPTION = "Gstreamer1.0 package groups" +SUMMARY = "Gstreamer1.0 package groups" LICENSE = "MIT" +# Due to use of COMBINED_FEATURES +PACKAGE_ARCH = "${MACHINE_ARCH}" + inherit packagegroup COMMERCIAL_PLUGINS = "${COMMERCIAL_AUDIO_PLUGINS} ${COMMERCIAL_VIDEO_PLUGINS}" @@ -15,18 +18,18 @@ PACKAGES = "\ gstreamer1.0-meta-debug \ gstreamer1.0-meta-video" -ALLOW_EMPTY_gstreamer1.0-meta-base = "1" -ALLOW_EMPTY_gstreamer1.0-meta-x11-base = "1" -ALLOW_EMPTY_gstreamer1.0-meta-audio = "1" -ALLOW_EMPTY_gstreamer1.0-meta-debug = "1" -ALLOW_EMPTY_gstreamer1.0-meta-video = "1" +ALLOW_EMPTY:gstreamer1.0-meta-base = "1" +ALLOW_EMPTY:gstreamer1.0-meta-x11-base = "1" +ALLOW_EMPTY:gstreamer1.0-meta-audio = "1" +ALLOW_EMPTY:gstreamer1.0-meta-debug = "1" +ALLOW_EMPTY:gstreamer1.0-meta-video = "1" -RDEPENDS_gstreamer1.0-meta-base = "\ +RDEPENDS:gstreamer1.0-meta-base = "\ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gstreamer1.0-meta-x11-base', '', d)} \ gstreamer1.0 \ gstreamer1.0-plugins-base-playback \ gstreamer1.0-plugins-base-gio \ - gstreamer1.0-plugins-base-alsa \ + ${@bb.utils.contains('COMBINED_FEATURES', 'alsa', 'gstreamer1.0-plugins-base-alsa', '',d)} \ gstreamer1.0-plugins-base-volume \ gstreamer1.0-plugins-base-audioconvert \ gstreamer1.0-plugins-base-audioresample \ @@ -34,13 +37,13 @@ RDEPENDS_gstreamer1.0-meta-base = "\ gstreamer1.0-plugins-base-videoscale \ gstreamer1.0-plugins-base-videoconvert \ gstreamer1.0-plugins-good-autodetect \ - gstreamer1.0-plugins-good-souphttpsrc" + gstreamer1.0-plugins-good-soup" -RRECOMMENDS_gstreamer1.0-meta-x11-base = "\ +RRECOMMENDS:gstreamer1.0-meta-x11-base = "\ gstreamer1.0-plugins-base-ximagesink \ gstreamer1.0-plugins-base-xvimagesink" -RDEPENDS_gstreamer1.0-meta-audio = "\ +RDEPENDS:gstreamer1.0-meta-audio = "\ gstreamer1.0-meta-base \ gstreamer1.0-plugins-base-vorbis \ gstreamer1.0-plugins-base-ogg \ @@ -48,18 +51,18 @@ RDEPENDS_gstreamer1.0-meta-audio = "\ gstreamer1.0-plugins-good-flac \ ${COMMERCIAL_AUDIO_PLUGINS}" -RDEPENDS_gstreamer1.0-meta-debug = "\ +RDEPENDS:gstreamer1.0-meta-debug = "\ gstreamer1.0-meta-base \ gstreamer1.0-plugins-good-debug \ gstreamer1.0-plugins-base-audiotestsrc \ gstreamer1.0-plugins-base-videotestsrc" -RDEPENDS_gstreamer1.0-meta-video = "\ +RDEPENDS:gstreamer1.0-meta-video = "\ gstreamer1.0-meta-base \ gstreamer1.0-plugins-good-avi \ gstreamer1.0-plugins-good-matroska \ gstreamer1.0-plugins-base-theora \ ${COMMERCIAL_VIDEO_PLUGINS}" -RRECOMMENDS_gstreamer1.0-meta-video = "\ +RRECOMMENDS:gstreamer1.0-meta-video = "\ gstreamer1.0-meta-audio" diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx.inc deleted file mode 100644 index d698904349..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx.inc +++ /dev/null @@ -1,42 +0,0 @@ -SUMMARY = "OpenMAX IL plugins for GStreamer" -SECTION = "multimedia" -LICENSE = "LGPLv2.1" -LICENSE_FLAGS = "commercial" -HOMEPAGE = "http://www.gstreamer.net/" -DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad" -RDEPENDS_${PN} = "libomxil" - -inherit autotools pkgconfig gettext - -acpaths = "-I ${S}/common/m4 -I ${S}/m4" - -PR = "r1" - -GSTREAMER_1_0_OMX_TARGET ?= "bellagio" -GSTREAMER_1_0_OMX_CORE_NAME ?= "${libdir}/libomxil-bellagio.so.0" - -EXTRA_OECONF += "--disable-valgrind --with-omx-target=${GSTREAMER_1_0_OMX_TARGET}" - -python __anonymous () { - omx_target = d.getVar("GSTREAMER_1_0_OMX_TARGET", True) - if omx_target in ['generic', 'bellagio']: - srcdir = d.getVar("S", True) - # Bellagio headers are incomplete (they are missing the OMX_VERSION_MAJOR,# - # OMX_VERSION_MINOR, OMX_VERSION_REVISION, and OMX_VERSION_STEP macros); - # appending a directory path to gst-omx' internal OpenMAX IL headers fixes this - d.appendVar("CFLAGS", " -I%s/omx/openmax" % srcdir) - elif omx_target == "rpi": - # Dedicated Raspberry Pi OpenMAX IL support makes this package machine specific - d.setVar("PACKAGE_ARCH", d.getVar("MACHINE_ARCH", True)) -} - -set_omx_core_name() { - sed -i -e "s;^core-name=.*;core-name=${GSTREAMER_1_0_OMX_CORE_NAME};" "${D}${sysconfdir}/xdg/gstomx.conf" -} -do_install[postfuncs] += " set_omx_core_name " - -FILES_${PN} += "${libdir}/gstreamer-1.0/*.so" -FILES_${PN}-dbg += "${libdir}/gstreamer-1.0/.debug" -FILES_${PN}-dev += "${libdir}/gstreamer-1.0/*.la" -FILES_${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a" - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx/0001-omx-fixed-type-error-in-printf-call.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx/0001-omx-fixed-type-error-in-printf-call.patch deleted file mode 100644 index a428ac9c91..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx/0001-omx-fixed-type-error-in-printf-call.patch +++ /dev/null @@ -1,30 +0,0 @@ -From f629e041e9f678fcd86ad764a15117dff63c271c Mon Sep 17 00:00:00 2001 -From: Carlos Rafael Giani <dv@pseudoterminal.org> -Date: Sat, 27 Apr 2013 02:50:25 +0200 -Subject: [PATCH] omx: fixed type error in printf call - -%zu expects size_t - -Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=699008] - -Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org> ---- - omx/gstomx.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/omx/gstomx.c b/omx/gstomx.c -index a2945ed..1eca7cc 100644 ---- a/omx/gstomx.c -+++ b/omx/gstomx.c -@@ -1630,7 +1630,7 @@ gst_omx_port_allocate_buffers_unlocked (GstOMXPort * port, - - GST_INFO_OBJECT (comp->parent, - "Allocating %d buffers of size %zu for %s port %u", n, -- port->port_def.nBufferSize, comp->name, (guint) port->index); -+ (size_t) (port->port_def.nBufferSize), comp->name, (guint) port->index); - - if (!port->buffers) - port->buffers = g_ptr_array_sized_new (n); --- -1.7.9.5 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.18.5.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.18.5.bb new file mode 100644 index 0000000000..b2c1eb3ea0 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.18.5.bb @@ -0,0 +1,47 @@ +SUMMARY = "OpenMAX IL plugins for GStreamer" +DESCRIPTION = "Wraps available OpenMAX IL components and makes them available as standard GStreamer elements." +HOMEPAGE = "http://gstreamer.freedesktop.org/" +SECTION = "multimedia" + +LICENSE = "LGPLv2.1" +LICENSE_FLAGS = "commercial" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \ + file://omx/gstomx.h;beginline=1;endline=21;md5=5c8e1fca32704488e76d2ba9ddfa935f" + +SRC_URI = "https://gstreamer.freedesktop.org/src/gst-omx/gst-omx-${PV}.tar.xz" + +SRC_URI[sha256sum] = "2cd457c1e8deb1a9b39608048fb36a44f6c9a864a6b6115b1453a32e7be93b42" + +S = "${WORKDIR}/gst-omx-${PV}" + +DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad virtual/libomxil" + +inherit meson pkgconfig upstream-version-is-even + +GSTREAMER_1_0_OMX_TARGET ?= "bellagio" +GSTREAMER_1_0_OMX_CORE_NAME ?= "${libdir}/libomxil-bellagio.so.0" + +EXTRA_OEMESON += "-Dtarget=${GSTREAMER_1_0_OMX_TARGET}" + +python __anonymous () { + omx_target = d.getVar("GSTREAMER_1_0_OMX_TARGET") + if omx_target in ['generic', 'bellagio']: + # Bellagio headers are incomplete (they are missing the OMX_VERSION_MAJOR,# + # OMX_VERSION_MINOR, OMX_VERSION_REVISION, and OMX_VERSION_STEP macros); + # appending a directory path to gst-omx' internal OpenMAX IL headers fixes this + d.appendVar("CFLAGS", " -I${S}/omx/openmax") + elif omx_target == "rpi": + # Dedicated Raspberry Pi OpenMAX IL support makes this package machine specific + d.setVar("PACKAGE_ARCH", d.getVar("MACHINE_ARCH")) +} + +set_omx_core_name() { + sed -i -e "s;^core-name=.*;core-name=${GSTREAMER_1_0_OMX_CORE_NAME};" "${D}${sysconfdir}/xdg/gstomx.conf" +} +do_install[postfuncs] += " set_omx_core_name " + +FILES:${PN} += "${libdir}/gstreamer-1.0/*.so" +FILES:${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a" + +VIRTUAL-RUNTIME_libomxil ?= "libomxil" +RDEPENDS:${PN} = "${VIRTUAL-RUNTIME_libomxil}" diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.2.0.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.2.0.bb deleted file mode 100644 index fe7c91cb30..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.2.0.bb +++ /dev/null @@ -1,12 +0,0 @@ -include gstreamer1.0-omx.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \ - file://omx/gstomx.h;beginline=1;endline=21;md5=5c8e1fca32704488e76d2ba9ddfa935f" - -SRC_URI = "http://gstreamer.freedesktop.org/src/gst-omx/gst-omx-${PV}.tar.xz" - -SRC_URI[md5sum] = "d24e8c0153c35dfefee3e26b1c2c35f8" -SRC_URI[sha256sum] = "0b4874961e6488ad9e5808114bd486ea981c540907262caab1419355fd82d745" - -S = "${WORKDIR}/gst-omx-${PV}" - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb deleted file mode 100644 index 99c84668ef..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb +++ /dev/null @@ -1,26 +0,0 @@ -DEFAULT_PREFERENCE = "-1" - -include gstreamer1.0-omx.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \ - file://omx/gstomx.h;beginline=1;endline=21;md5=5c8e1fca32704488e76d2ba9ddfa935f" - -SRC_URI = " \ - git://anongit.freedesktop.org/gstreamer/gst-omx;branch=master;name=gst-omx \ - git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;branch=master;name=common \ - file://0001-omx-fixed-type-error-in-printf-call.patch \ - " - -S = "${WORKDIR}/git" - -SRCREV_gst-omx = "a2db76b048db278ef0aa798e106b7594264e06c0" -SRCREV_common = "5edcd857b2107cd8b78c16232dd10877513ec157" - -SRCREV_FORMAT = "gst-omx" - -do_configure_prepend() { - cd ${S} - ./autogen.sh --noconfigure - cd ${B} -} - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc deleted file mode 100644 index cdedb60b2b..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc +++ /dev/null @@ -1,135 +0,0 @@ -require gstreamer1.0-plugins.inc - -LICENSE = "GPLv2+ & LGPLv2+ & LGPLv2.1+ " - -DEPENDS += "gstreamer1.0-plugins-base libpng jpeg" - -S = "${WORKDIR}/gst-plugins-bad-${PV}" - -SRC_URI += "file://configure-allow-to-disable-libssh2.patch \ - " - -inherit gettext bluetooth - -# opengl packageconfig factored out to make it easy for distros -# and BSP layers to pick either (desktop) opengl, gles2, or no GL -PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2', '', d)}" - -PACKAGECONFIG ??= " \ - ${PACKAGECONFIG_GL} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)} \ - orc curl uvch264 neon sndfile \ - hls sbc dash bz2 smoothstreaming \ - " - -# dash = Dynamic Adaptive Streaming over HTTP -PACKAGECONFIG[assrender] = "--enable-assrender,--disable-assrender,libass" -PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl" -PACKAGECONFIG[gles2] = "--enable-gles2,--disable-gles2,virtual/libgles2" -PACKAGECONFIG[opengl] = "--enable-opengl,--disable-opengl,virtual/libgl libglu" -PACKAGECONFIG[faac] = "--enable-faac,--disable-faac,faac" -PACKAGECONFIG[faad] = "--enable-faad,--disable-faad,faad2" -PACKAGECONFIG[libmms] = "--enable-libmms,--disable-libmms,libmms" -PACKAGECONFIG[modplug] = "--enable-modplug,--disable-modplug,libmodplug" -PACKAGECONFIG[mpg123] = "--enable-mpg123,--disable-mpg123,mpg123" -PACKAGECONFIG[opus] = "--enable-opus,--disable-opus,libopus" -PACKAGECONFIG[flite] = "--enable-flite,--disable-flite,flite-alsa" -PACKAGECONFIG[opencv] = "--enable-opencv,--disable-opencv,opencv" -PACKAGECONFIG[wayland] = "--enable-wayland --enable-egl,--disable-wayland --disable-egl,wayland virtual/egl" -PACKAGECONFIG[uvch264] = "--enable-uvch264,--disable-uvch264,libusb1 udev" -PACKAGECONFIG[directfb] = "--enable-directfb,--disable-directfb,directfb" -PACKAGECONFIG[neon] = "--enable-neon,--disable-neon,neon" -PACKAGECONFIG[openal] = "--enable-openal,--disable-openal,openal-soft" -PACKAGECONFIG[hls] = "--enable-hls,--disable-hls,gnutls" -PACKAGECONFIG[sbc] = "--enable-sbc,--disable-sbc,sbc" -PACKAGECONFIG[dash] = "--enable-dash,--disable-dash,libxml2" -PACKAGECONFIG[bz2] = "--enable-bz2,--disable-bz2,bzip2" -PACKAGECONFIG[fluidsynth] = "--enable-fluidsynth,--disable-fluidsynth,fluidsynth" -PACKAGECONFIG[schroedinger] = "--enable-schro,--disable-schro,schroedinger" -PACKAGECONFIG[smoothstreaming] = "--enable-smoothstreaming,--disable-smoothstreaming,libxml2" -PACKAGECONFIG[bluez] = "--enable-bluez,--disable-bluez,${BLUEZ}" -PACKAGECONFIG[rsvg] = "--enable-rsvg,--disable-rsvg,librsvg" -PACKAGECONFIG[sndfile] = "--enable-sndfile,--disable-sndfile,libsndfile1" -PACKAGECONFIG[webp] = "--enable-webp,--disable-webp,libwebp" -PACKAGECONFIG[rtmp] = "--enable-rtmp,--disable-rtmp,rtmpdump" -PACKAGECONFIG[libssh2] = "--enable-libssh2,--disable-libssh2,libssh2" - -# these plugins have not been ported to 1.0 (yet): -# directdraw vcd apexsink dc1394 lv2 linsys musepack mythtv -# nas timidity teletextdec sdl xvid wininet acm gsettings -# sndio qtwrapper cdxaparse dccp faceoverlay hdvparse tta -# mve nuvdemux osx_video patchdetect quicktime real sdi -# videomeasure gsettings - -# these plugins have no corresponding library in OE-core or meta-openembedded: -# openni2 winks direct3d directdraw directsound winscreencap osx_video -# apple_media android_media avc chromaprint daala dts gme gsm kate ladspa mimic -# mpeg2enc mplex ofa openjpeg opensles pvr resindvd rtmp soundtouch spandsp spc -# srtp vdpau voaacenc voamrwbenc wasapi zbar - -EXTRA_OECONF += " \ - --enable-dvb \ - --enable-shm \ - --enable-fbdev \ - --enable-decklink \ - --disable-acm \ - --disable-android_media \ - --disable-apexsink \ - --disable-apple_media \ - --disable-avc \ - --disable-chromaprint \ - --disable-cocoa \ - --disable-daala \ - --disable-dc1394 \ - --disable-direct3d \ - --disable-directdraw \ - --disable-directsound \ - --disable-dts \ - --disable-gme \ - --disable-gsettings \ - --disable-gsm \ - --disable-kate \ - --disable-ladspa \ - --disable-linsys \ - --disable-lv2 \ - --disable-mimic \ - --disable-mpeg2enc \ - --disable-mplex \ - --disable-musepack \ - --disable-mythtv \ - --disable-nas \ - --disable-ofa \ - --disable-openjpeg \ - --disable-opensles \ - --disable-osx_video \ - --disable-pvr \ - --disable-quicktime \ - --disable-resindvd \ - --disable-sdl \ - --disable-sdltest \ - --disable-sndio \ - --disable-soundtouch \ - --disable-spandsp \ - --disable-spc \ - --disable-srtp \ - --disable-teletextdec \ - --disable-timidity \ - --disable-vcd \ - --disable-vdpau \ - --disable-voaacenc \ - --disable-voamrwbenc \ - --disable-wasapi \ - --disable-wildmidi \ - --disable-wininet \ - --disable-winscreencap \ - --disable-xvid \ - --disable-zbar \ - ${@bb.utils.contains("TUNE_FEATURES", "mx32", "--disable-yadif", "", d)} \ - " - -ARM_INSTRUCTION_SET = "arm" - -FILES_gstreamer1.0-plugins-bad-opencv += "${datadir}/gst-plugins-bad/1.0/opencv*" - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-fix-maybe-uninitialized-warnings-when-compiling-with.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-fix-maybe-uninitialized-warnings-when-compiling-with.patch new file mode 100644 index 0000000000..13a673cd50 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-fix-maybe-uninitialized-warnings-when-compiling-with.patch @@ -0,0 +1,28 @@ +From f08ab3ac2ce43ac91d3bf65b26f26436690f499b Mon Sep 17 00:00:00 2001 +From: Andre McCurdy <armccurdy@gmail.com> +Date: Tue, 26 Jan 2016 15:16:01 -0800 +Subject: [PATCH 1/4] 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 2c60ced..e8226d8 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; +-- +2.28.0 + diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gl-do-not-check-for-GL-GLU-EGL-GLES2-libs-if-disable.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gl-do-not-check-for-GL-GLU-EGL-GLES2-libs-if-disable.patch deleted file mode 100644 index 042a32c04d..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gl-do-not-check-for-GL-GLU-EGL-GLES2-libs-if-disable.patch +++ /dev/null @@ -1,41 +0,0 @@ -From deba0da45ec821209a7ed148a4521d562e6512cd Mon Sep 17 00:00:00 2001 -From: Carlos Rafael Giani <dv@pseudoterminal.org> -Date: Wed, 27 Aug 2014 14:47:25 +0200 -Subject: [PATCH] gl: do not check for GL/GLU/EGL/GLES2 libs if disabled in - configuration - -Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=735522] - -Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org> ---- - configure.ac | 14 ++++++++++---- - 1 file changed, 10 insertions(+), 4 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 1a46afb..e85d4ba 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -661,10 +661,16 @@ case $host in - fi - ;; - *) -- AG_GST_CHECK_LIBHEADER(GL, GL, glTexImage2D,, GL/gl.h) -- AG_GST_CHECK_LIBHEADER(GLU, GLU, gluSphere,, GL/glu.h) -- AG_GST_CHECK_LIBHEADER(GLES2, GLESv2, glTexImage2D,, GLES2/gl2.h) -- AG_GST_CHECK_LIBHEADER(EGL, EGL, eglGetError,, EGL/egl.h) -+ if test "x$NEED_GL" != "xno"; then -+ AG_GST_CHECK_LIBHEADER(GL, GL, glTexImage2D,, GL/gl.h) -+ AG_GST_CHECK_LIBHEADER(GLU, GLU, gluSphere,, GL/glu.h) -+ fi -+ if test "x$NEED_GLES2" != "xno"; then -+ AG_GST_CHECK_LIBHEADER(GLES2, GLESv2, glTexImage2D,, GLES2/gl2.h) -+ fi -+ if test "x$NEED_EGL" != "xno"; then -+ AG_GST_CHECK_LIBHEADER(EGL, EGL, eglGetError,, EGL/egl.h) -+ fi - - old_LIBS=$LIBS - old_CFLAGS=$CFLAGS --- -1.8.3.2 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-avoid-including-sys-poll.h-directly.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-avoid-including-sys-poll.h-directly.patch new file mode 100644 index 0000000000..ead6897f67 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-avoid-including-sys-poll.h-directly.patch @@ -0,0 +1,30 @@ +From 3b05e91720c10fcf6e0e408595b7217f6fa145c2 Mon Sep 17 00:00:00 2001 +From: Andre McCurdy <armccurdy@gmail.com> +Date: Wed, 3 Feb 2016 18:05:41 -0800 +Subject: [PATCH 2/4] 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 ca6b92a..b2772db 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> +-- +2.28.0 + diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-ensure-valid-sentinals-for-gst_structure_get-etc.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-ensure-valid-sentinals-for-gst_structure_get-etc.patch new file mode 100644 index 0000000000..88fbc40dcd --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-ensure-valid-sentinals-for-gst_structure_get-etc.patch @@ -0,0 +1,88 @@ +From 5ed27de9f662fe063b8b3d5d4335aa64cd4718c9 Mon Sep 17 00:00:00 2001 +From: Andre McCurdy <armccurdy@gmail.com> +Date: Tue, 9 Feb 2016 14:00:00 -0800 +Subject: [PATCH 3/4] 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 4dac7e1..43762ce 100644 +--- a/sys/decklink/gstdecklink.cpp ++++ b/sys/decklink/gstdecklink.cpp +@@ -674,7 +674,7 @@ gst_decklink_mode_get_generic_structure (GstDecklinkModeEnum e) + "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); + + return s; + } +@@ -699,16 +699,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 2fef934..c47229a 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 e3a6775..f1a5aae 100644 +--- a/sys/decklink/gstdecklinkvideosink.cpp ++++ b/sys/decklink/gstdecklinkvideosink.cpp +@@ -286,7 +286,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; + } +-- +2.28.0 + diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch new file mode 100644 index 0000000000..b816709066 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch @@ -0,0 +1,49 @@ +From f19ff66640f2f472c4e9d9055253032d34e125c6 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 4/4] 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> +--- + 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 0b0b3fc..0ed3344 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 +-- +2.28.0 + diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-msdk-fix-includedir-path.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-msdk-fix-includedir-path.patch new file mode 100644 index 0000000000..cb3bb7d361 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-msdk-fix-includedir-path.patch @@ -0,0 +1,31 @@ +From 1f00d5026118ebd48e4ccf83d32d67155c4e7f60 Mon Sep 17 00:00:00 2001 +From: Naveen Saini <naveen.kumar.saini@intel.com> +Date: Wed, 30 Dec 2020 16:37:47 +0800 +Subject: [PATCH] msdk: fix includedir path + +In cross compilation, need to prepend PKG_CONFIG_SYSROOT_DIR to the dir path. + +Upstream-Status: Inappropriate [OE-specific] + +Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> +--- + sys/msdk/meson.build | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/sys/msdk/meson.build b/sys/msdk/meson.build +index 6346c9451..068f38548 100644 +--- a/sys/msdk/meson.build ++++ b/sys/msdk/meson.build +@@ -40,7 +40,9 @@ endif + + mfx_dep = dependency('libmfx', required: false) + if mfx_dep.found() ++ pkgconf_sysroot = run_command(python3, '-c', 'import os; print(os.environ.get("PKG_CONFIG_SYSROOT_DIR"))').stdout().strip() + mfx_incdir = mfx_dep.get_pkgconfig_variable('includedir') ++ mfx_incdir = pkgconf_sysroot + mfx_incdir + mfx_inc = [] + else + # Old versions of MediaSDK don't provide a pkg-config file +-- +2.17.1 + diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch deleted file mode 100644 index d52afd5d57..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch +++ /dev/null @@ -1,64 +0,0 @@ -From f59c5269f92d59a5296cbfeeb682d42095cd88ad Mon Sep 17 00:00:00 2001 -From: Wenzong Fan <wenzong.fan@windriver.com> -Date: Thu, 18 Sep 2014 02:24:07 -0400 -Subject: [PATCH] gstreamer1.0-plugins-bad: allow to disable libssh2 - -libssh2 is automatically linked to if present, this undetermined -dependency may cause build errors like: - - .../x86_64-poky-linux/4.9.0/ld: cannot find -lssh2 - -libssh2 isn't an oe-core recipe, so allow to disable it from -configure. - -Upstream-Status: Pending - -Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> ---- - configure.ac | 23 +++++++++++++++++------ - 1 file changed, 17 insertions(+), 6 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 0e95c5c..12153b4 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1901,6 +1901,15 @@ AG_GST_CHECK_FEATURE(CHROMAPRINT, [chromaprint], chromaprint, [ - ]) - - dnl *** Curl *** -+AC_ARG_ENABLE([libssh2], -+ [ --enable-libssh2 enable LIBSSH2 support @<:@default=auto@:>@], -+ [case "${enableval}" in -+ yes) NEED_SSH2=yes ;; -+ no) NEED_SSH2=no ;; -+ auto) NEED_SSH2=auto ;; -+ *) AC_MSG_ERROR([bad value ${enableval} for --enable-libssh2]) ;; -+ esac],[NEED_SSH2=auto]) -+ - translit(dnm, m, l) AM_CONDITIONAL(USE_CURL, true) - AG_GST_CHECK_FEATURE(CURL, [Curl plugin], curl, [ - PKG_CHECK_MODULES(CURL, libcurl >= 7.21.0, [ -@@ -1915,12 +1924,14 @@ AG_GST_CHECK_FEATURE(CURL, [Curl plugin], curl, [ - ]) - AC_SUBST(CURL_CFLAGS) - AC_SUBST(CURL_LIBS) -- PKG_CHECK_MODULES(SSH2, libssh2 >= 1.4.3, [ -- HAVE_SSH2="yes" -- AC_DEFINE(HAVE_SSH2, 1, [Define if libssh2 is available]) -- ], [ -- HAVE_SSH2="no" -- ]) -+ if test "x$NEED_SSH2" != "xno"; then -+ PKG_CHECK_MODULES(SSH2, libssh2 >= 1.4.3, [ -+ HAVE_SSH2="yes" -+ AC_DEFINE(HAVE_SSH2, 1, [Define if libssh2 is available]) -+ ], [ -+ HAVE_SSH2="no" -+ ]) -+ fi - AM_CONDITIONAL(USE_SSH2, test "x$HAVE_SSH2" = "xyes") - AC_SUBST(SSH2_CFLAGS) - AC_SUBST(SSH2_LIBS) --- -1.7.9.5 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.18.5.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.18.5.bb new file mode 100644 index 0000000000..f3ea6f7293 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.18.5.bb @@ -0,0 +1,155 @@ +require gstreamer1.0-plugins-common.inc + +DESCRIPTION = "'Bad' GStreamer plugins and helper libraries " +HOMEPAGE = "https://gstreamer.freedesktop.org/" +BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues" + +SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-${PV}.tar.xz \ + file://0001-fix-maybe-uninitialized-warnings-when-compiling-with.patch \ + file://0002-avoid-including-sys-poll.h-directly.patch \ + file://0003-ensure-valid-sentinals-for-gst_structure_get-etc.patch \ + file://0004-opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch \ + file://0005-msdk-fix-includedir-path.patch \ + " +SRC_URI[sha256sum] = "a164923b94f0d08578a6fcaeaac6e0c05da788a46903a1086870e9ca45ad678e" + +S = "${WORKDIR}/gst-plugins-bad-${PV}" + +LICENSE = "GPLv2+ & LGPLv2+ & LGPLv2.1+" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" + +DEPENDS += "gstreamer1.0-plugins-base" + +inherit gobject-introspection + +PACKAGECONFIG ??= " \ + ${GSTREAMER_ORC} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'directfb vulkan', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gl', '', d)} \ + bz2 closedcaption curl dash dtls hls openssl sbc smoothstreaming \ + sndfile ttml uvch264 webp \ + ${@bb.utils.contains('TUNE_FEATURES', 'mx32', '', 'rsvg', d)} \ +" + +PACKAGECONFIG[aom] = "-Daom=enabled,-Daom=disabled,aom" +PACKAGECONFIG[assrender] = "-Dassrender=enabled,-Dassrender=disabled,libass" +PACKAGECONFIG[bluez] = "-Dbluez=enabled,-Dbluez=disabled,bluez5" +PACKAGECONFIG[bz2] = "-Dbz2=enabled,-Dbz2=disabled,bzip2" +PACKAGECONFIG[closedcaption] = "-Dclosedcaption=enabled,-Dclosedcaption=disabled,pango cairo" +PACKAGECONFIG[curl] = "-Dcurl=enabled,-Dcurl=disabled,curl" +PACKAGECONFIG[dash] = "-Ddash=enabled,-Ddash=disabled,libxml2" +PACKAGECONFIG[dc1394] = "-Ddc1394=enabled,-Ddc1394=disabled,libdc1394" +PACKAGECONFIG[directfb] = "-Ddirectfb=enabled,-Ddirectfb=disabled,directfb" +PACKAGECONFIG[dtls] = "-Ddtls=enabled,-Ddtls=disabled,openssl" +PACKAGECONFIG[faac] = "-Dfaac=enabled,-Dfaac=disabled,faac" +PACKAGECONFIG[faad] = "-Dfaad=enabled,-Dfaad=disabled,faad2" +PACKAGECONFIG[fluidsynth] = "-Dfluidsynth=enabled,-Dfluidsynth=disabled,fluidsynth" +PACKAGECONFIG[hls] = "-Dhls=enabled,-Dhls=disabled," +# Pick atleast one crypto backend below when enabling hls +PACKAGECONFIG[nettle] = "-Dhls-crypto=nettle,,nettle" +PACKAGECONFIG[openssl] = "-Dhls-crypto=openssl,,openssl" +PACKAGECONFIG[gcrypt] = "-Dhls-crypto=libgcrypt,,libgcrypt" +# the gl packageconfig enables OpenGL elements that haven't been ported +# to -base yet. They depend on the gstgl library in -base, so we do +# not add GL dependencies here, since these are taken care of in -base. +PACKAGECONFIG[gl] = "-Dgl=enabled,-Dgl=disabled," +PACKAGECONFIG[kms] = "-Dkms=enabled,-Dkms=disabled,libdrm" +PACKAGECONFIG[libde265] = "-Dlibde265=enabled,-Dlibde265=disabled,libde265" +PACKAGECONFIG[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[neon] = "-Dneon=enabled,-Dneon=disabled,neon" +PACKAGECONFIG[openal] = "-Dopenal=enabled,-Dopenal=disabled,openal-soft" +PACKAGECONFIG[opencv] = "-Dopencv=enabled,-Dopencv=disabled,opencv" +PACKAGECONFIG[openh264] = "-Dopenh264=enabled,-Dopenh264=disabled,openh264" +PACKAGECONFIG[openjpeg] = "-Dopenjpeg=enabled,-Dopenjpeg=disabled,openjpeg" +PACKAGECONFIG[openmpt] = "-Dopenmpt=enabled,-Dopenmpt=disabled,libopenmpt" +# the opus encoder/decoder elements are now in the -base package, +# but the opus parser remains in -bad +PACKAGECONFIG[opusparse] = "-Dopus=enabled,-Dopus=disabled,libopus" +PACKAGECONFIG[resindvd] = "-Dresindvd=enabled,-Dresindvd=disabled,libdvdread libdvdnav" +PACKAGECONFIG[rsvg] = "-Drsvg=enabled,-Drsvg=disabled,librsvg" +PACKAGECONFIG[rtmp] = "-Drtmp=enabled,-Drtmp=disabled,rtmpdump" +PACKAGECONFIG[sbc] = "-Dsbc=enabled,-Dsbc=disabled,sbc" +PACKAGECONFIG[sctp] = "-Dsctp=enabled,-Dsctp=disabled" +PACKAGECONFIG[smoothstreaming] = "-Dsmoothstreaming=enabled,-Dsmoothstreaming=disabled,libxml2" +PACKAGECONFIG[sndfile] = "-Dsndfile=enabled,-Dsndfile=disabled,libsndfile1" +PACKAGECONFIG[srt] = "-Dsrt=enabled,-Dsrt=disabled,srt" +PACKAGECONFIG[srtp] = "-Dsrtp=enabled,-Dsrtp=disabled,libsrtp" +PACKAGECONFIG[tinyalsa] = "-Dtinyalsa=enabled,-Dtinyalsa=disabled,tinyalsa" +PACKAGECONFIG[ttml] = "-Dttml=enabled,-Dttml=disabled,libxml2 pango cairo" +PACKAGECONFIG[uvch264] = "-Duvch264=enabled,-Duvch264=disabled,libusb1 libgudev" +PACKAGECONFIG[v4l2codecs] = "-Dv4l2codecs=enabled,-Dv4l2codecs=disabled,libgudev" +PACKAGECONFIG[va] = "-Dva=enabled,-Dva=disabled,libva" +PACKAGECONFIG[voaacenc] = "-Dvoaacenc=enabled,-Dvoaacenc=disabled,vo-aacenc" +PACKAGECONFIG[voamrwbenc] = "-Dvoamrwbenc=enabled,-Dvoamrwbenc=disabled,vo-amrwbenc" +PACKAGECONFIG[vulkan] = "-Dvulkan=enabled,-Dvulkan=disabled,vulkan-loader shaderc-native" +PACKAGECONFIG[wayland] = "-Dwayland=enabled,-Dwayland=disabled,wayland-native wayland wayland-protocols libdrm" +PACKAGECONFIG[webp] = "-Dwebp=enabled,-Dwebp=disabled,libwebp" +PACKAGECONFIG[webrtc] = "-Dwebrtc=enabled,-Dwebrtc=disabled,libnice" +PACKAGECONFIG[webrtcdsp] = "-Dwebrtcdsp=enabled,-Dwebrtcdsp=disabled,webrtc-audio-processing" +PACKAGECONFIG[zbar] = "-Dzbar=enabled,-Dzbar=disabled,zbar" +PACKAGECONFIG[x265] = "-Dx265=enabled,-Dx265=disabled,x265" + +EXTRA_OEMESON += " \ + -Ddoc=disabled \ + -Ddecklink=enabled \ + -Ddvb=enabled \ + -Dfbdev=enabled \ + -Dipcpipeline=enabled \ + -Dshm=enabled \ + -Dtranscode=enabled \ + -Dandroidmedia=disabled \ + -Dapplemedia=disabled \ + -Davtp=disabled \ + -Dbs2b=disabled \ + -Dchromaprint=disabled \ + -Dd3dvideosink=disabled \ + -Dd3d11=disabled \ + -Ddirectsound=disabled \ + -Ddts=disabled \ + -Dfdkaac=disabled \ + -Dflite=disabled \ + -Dgme=disabled \ + -Dgsm=disabled \ + -Diqa=disabled \ + -Dkate=disabled \ + -Dladspa=disabled \ + -Dlv2=disabled \ + -Dmagicleap=disabled \ + -Dmediafoundation=disabled \ + -Dmicrodns=disabled \ + -Dmpeg2enc=disabled \ + -Dmplex=disabled \ + -Dmusepack=disabled \ + -Dnvcodec=disabled \ + -Dofa=disabled \ + -Dopenexr=disabled \ + -Dopenni2=disabled \ + -Dopensles=disabled \ + -Dsoundtouch=disabled \ + -Dspandsp=disabled \ + -Dsvthevcenc=disabled \ + -Dteletext=disabled \ + -Dwasapi=disabled \ + -Dwasapi2=disabled \ + -Dwildmidi=disabled \ + -Dwinks=disabled \ + -Dwinscreencap=disabled \ + -Dwpe=disabled \ + -Dzxing=disabled \ +" + +export OPENCV_PREFIX = "${STAGING_DIR_TARGET}${prefix}" + +ARM_INSTRUCTION_SET:armv4 = "arm" +ARM_INSTRUCTION_SET:armv5 = "arm" + +FILES:${PN}-freeverb += "${datadir}/gstreamer-1.0/presets/GstFreeverb.prs" +FILES:${PN}-opencv += "${datadir}/gst-plugins-bad/1.0/opencv*" +FILES:${PN}-transcode += "${datadir}/gstreamer-1.0/encoding-profiles" +FILES:${PN}-voamrwbenc += "${datadir}/gstreamer-1.0/presets/GstVoAmrwbEnc.prs" diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.4.5.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.4.5.bb deleted file mode 100644 index 59065de811..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.4.5.bb +++ /dev/null @@ -1,14 +0,0 @@ -include gstreamer1.0-plugins-bad.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=73a5855a8119deb017f5f13cf327095d \ - file://gst/tta/filters.h;beginline=12;endline=29;md5=8a08270656f2f8ad7bb3655b83138e5a \ - file://COPYING.LIB;md5=21682e4e8fea52413fd26c60acb907e5 \ - file://gst/tta/crc32.h;beginline=12;endline=29;md5=27db269c575d1e5317fffca2d33b3b50" - -SRC_URI += "file://0001-gl-do-not-check-for-GL-GLU-EGL-GLES2-libs-if-disable.patch" - -SRC_URI[md5sum] = "e0bb39412cf4a48fe0397bcf3a7cd451" -SRC_URI[sha256sum] = "152fad7250683d72f9deb36c5685428338365fe4a4c87ffe15e38783b14f983c" - -S = "${WORKDIR}/gst-plugins-bad-${PV}" - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb deleted file mode 100644 index 309505f7db..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb +++ /dev/null @@ -1,26 +0,0 @@ -DEFAULT_PREFERENCE = "-1" - -include gstreamer1.0-plugins-bad.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=73a5855a8119deb017f5f13cf327095d \ - file://gst/tta/filters.h;beginline=12;endline=29;md5=8a08270656f2f8ad7bb3655b83138e5a \ - file://COPYING.LIB;md5=21682e4e8fea52413fd26c60acb907e5 \ - file://gst/tta/crc32.h;beginline=12;endline=29;md5=27db269c575d1e5317fffca2d33b3b50" - -S = "${WORKDIR}/git" - -SRCREV = "6e5db57d2446a753aaa76bee268e1f95600b14ce" - -PACKAGECONFIG[sbc] = "--enable-sbc,--disable-sbc,sbc" -PACKAGECONFIG[hls] = "--enable-hls,--disable-hls,gnutls" - -EXTRA_OECONF += " \ - -disable-openjpeg \ - " - -do_configure_prepend() { - cd ${S} - ./autogen.sh --noconfigure - cd ${B} -} - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base.inc deleted file mode 100644 index 47f3f40110..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base.inc +++ /dev/null @@ -1,39 +0,0 @@ -require gstreamer1.0-plugins.inc - -LICENSE = "GPLv2+ & LGPLv2+" - -DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 libxv', '', d)}" -DEPENDS += "freetype liboil util-linux" - -inherit gettext - -PACKAGES_DYNAMIC =+ "^libgst.*" - -PACKAGECONFIG ??= " \ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)} \ - orc ivorbis ogg theora vorbis pango \ - " - -X11DEPENDS = "virtual/libx11 libsm libxrender" -X11ENABLEOPTS = "--enable-x --enable-xvideo --enable-xshm" -X11DISABLEOPTS = "--disable-x --disable-xvideo --disable-xshm" -PACKAGECONFIG[x11] = "${X11ENABLEOPTS},${X11DISABLEOPTS},${X11DEPENDS}" -PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib" -PACKAGECONFIG[ivorbis] = "--enable-ivorbis,--disable-ivorbis,tremor" -PACKAGECONFIG[ogg] = "--enable-ogg,--disable-ogg,libogg" -PACKAGECONFIG[theora] = "--enable-theora,--disable-theora,libtheora" -PACKAGECONFIG[vorbis] = "--enable-vorbis,--disable-vorbis,libvorbis" -PACKAGECONFIG[pango] = "--enable-pango,--disable-pango,pango" - - -# cdparanoia and libvisual do not seem to exist anywhere in OE -EXTRA_OECONF += " \ - --disable-freetypetest \ - --disable-cdparanoia \ - --disable-libvisual \ -" - -FILES_${MLPREFIX}libgsttag-1.0 += "${datadir}/gst-plugins-base/1.0/license-translations.dict" - -CACHED_CONFIGUREVARS_append_x86 = " ac_cv_header_emmintrin_h=no ac_cv_header_xmmintrin_h=no" diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/get-caps-from-src-pad-when-query-caps.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-ENGR00312515-get-caps-from-src-pad-when-query-caps.patch index 0fc561c012..d5d9838372 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/get-caps-from-src-pad-when-query-caps.patch +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-ENGR00312515-get-caps-from-src-pad-when-query-caps.patch @@ -1,25 +1,25 @@ -From af0dac26f62aaceb4bf266720911953793e0fc5d Mon Sep 17 00:00:00 2001 +From f9d48cd85ee68207733b1b91a00453462c33524a Mon Sep 17 00:00:00 2001 From: zhouming <b42586@freescale.com> Date: Wed, 14 May 2014 10:16:20 +0800 -Subject: [PATCH] ENGR00312515: get caps from src pad when query caps +Subject: [PATCH 1/4] ENGR00312515: get caps from src pad when query caps https://bugzilla.gnome.org/show_bug.cgi?id=728312 -Upstream Status: Pending +Upstream-Status: Pending Signed-off-by: zhouming <b42586@freescale.com> --- - gst-libs/gst/tag/gsttagdemux.c | 13 +++++++++++++ + gst-libs/gst/tag/gsttagdemux.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) mode change 100644 => 100755 gst-libs/gst/tag/gsttagdemux.c diff --git a/gst-libs/gst/tag/gsttagdemux.c b/gst-libs/gst/tag/gsttagdemux.c old mode 100644 new mode 100755 -index 9b6c478..ae2294a +index f545857..62d10ef --- a/gst-libs/gst/tag/gsttagdemux.c +++ b/gst-libs/gst/tag/gsttagdemux.c -@@ -1708,6 +1708,19 @@ gst_tag_demux_pad_query (GstPad * pad, GstObject * parent, GstQuery * query) +@@ -1777,6 +1777,19 @@ gst_tag_demux_pad_query (GstPad * pad, GstObject * parent, GstQuery * query) } break; } @@ -40,5 +40,5 @@ index 9b6c478..ae2294a res = gst_pad_query_default (pad, parent, query); break; -- -1.7.9.5 +2.28.0 diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-basetextoverlay-make-memory-copy-when-video-buffer-s.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-basetextoverlay-make-memory-copy-when-video-buffer-s.patch deleted file mode 100644 index 03dca956a8..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-basetextoverlay-make-memory-copy-when-video-buffer-s.patch +++ /dev/null @@ -1,129 +0,0 @@ -From 3781d40940d46d7e6a502092d24aac7997f6da5b Mon Sep 17 00:00:00 2001 -From: Mingke Wang <mingke.wang@freescale.com> -Date: Thu, 5 Mar 2015 12:06:23 +0800 -Subject: [PATCH 1/4] basetextoverlay: make memory copy when video buffer's - memory is ready only - -1. since gst_buffer_make_writable just lookup the refcount to determine if - a buffer is writable, and it will use _gst_buffer_copy() which don't - perform a deep memory copy even if the flag of a memory is set to - GST_MEMORY_FLAG_READONLY. So, we detect the memory flag and use - gst_buffer_copy_region with GST_BUFFER_COPY_DEEP parameter to perform - deep memory copy. if the allocator of a memory don't support mem_copy - interface, the it will return NULL, if this case, we can use - gst_buffer_make_writable() to get a shared memory buffer or the orignal - buffer if the buffer's refcount is 1. -2. new feature is no added if caps has no feature during caps negotiation - -Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=747495] - -Signed-off-by: Mingke Wang <mingke.wang@freescale.com> - -diff --git a/ext/pango/gstbasetextoverlay.c b/ext/pango/gstbasetextoverlay.c -index c919861..3c0a1d7 100755 ---- a/ext/pango/gstbasetextoverlay.c -+++ b/ext/pango/gstbasetextoverlay.c -@@ -747,6 +747,7 @@ gst_base_text_overlay_negotiate (GstBaseTextOverlay * overlay, GstCaps * caps) - if (f == NULL) { - f = gst_caps_features_new - (GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION, NULL); -+ gst_caps_set_features(overlay_caps, 0, f); - } else { - gst_caps_features_add (f, - GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION); -@@ -1890,16 +1891,71 @@ gst_base_text_overlay_push_frame (GstBaseTextOverlay * overlay, - if (gst_pad_check_reconfigure (overlay->srcpad)) - gst_base_text_overlay_negotiate (overlay, NULL); - -- video_frame = gst_buffer_make_writable (video_frame); -- - if (overlay->attach_compo_to_buffer) { - GST_DEBUG_OBJECT (overlay, "Attaching text overlay image to video buffer"); -+ video_frame = gst_buffer_make_writable (video_frame); - gst_buffer_add_video_overlay_composition_meta (video_frame, - overlay->composition); - /* FIXME: emulate shaded background box if want_shading=true */ - goto done; - } - -+ gint m = gst_buffer_n_memory(video_frame); -+ gboolean mem_rdonly = FALSE; -+ GstMemory *mem; -+ GstBuffer *orig = video_frame; -+ -+ while (--m>=0) { -+ mem = gst_buffer_get_memory(video_frame, m); -+ if (GST_MEMORY_IS_READONLY(mem)) { -+ mem_rdonly = TRUE; -+ gst_memory_unref (mem); -+ break; -+ } -+ gst_memory_unref (mem); -+ } -+ -+ if (mem_rdonly) { -+ // since gst_buffer_make_writable just lookup the refcount to determine if -+ // a buffer is writable, and it will use _gst_buffer_copy() which don't -+ // perform a deep memory copy even if the flag of a memory is set to -+ // GST_MEMORY_FLAG_READONLY. So, we detect the memory flag and use -+ // gst_buffer_copy_region with GST_BUFFER_COPY_DEEP parameter to perform -+ // deep memory copy. if the allocator of a memory don't support mem_copy -+ // interface, the it will return NULL, if this case, we can use -+ // gst_buffer_make_writable() to get a shared memory buffer or the orignal -+ // buffer if the buffer's refcount is 1. -+ GstBuffer *new_buf = gst_buffer_copy_region (video_frame, -+ GST_BUFFER_COPY_ALL | GST_BUFFER_COPY_DEEP, 0, -1); -+ -+ GST_DEBUG_OBJECT (overlay, "copy %s video frame buffer %p -> %p", -+ g_type_name (GST_MINI_OBJECT_TYPE (video_frame)), video_frame, new_buf); -+ -+ if (!new_buf) { -+ //maybe the allocator don't support mem_copy interface, the we just use -+ //gst_buffer_make_writable() to get a writable buffer. -+ video_frame = gst_buffer_make_writable (video_frame); -+ } else { -+ gst_mini_object_unref (video_frame); -+ GST_BUFFER_FLAG_UNSET (new_buf, GST_BUFFER_FLAG_TAG_MEMORY); -+ video_frame = new_buf; -+ } -+ -+ if (!video_frame) { -+ GST_WARNING_OBJECT (overlay, "make writable buffer failed"); -+ return GST_FLOW_OK; -+ } -+ -+ m = gst_buffer_n_memory(video_frame); -+ while (--m>=0) { -+ mem = gst_buffer_get_memory(video_frame, m); -+ GST_MEMORY_FLAG_UNSET (mem, GST_MEMORY_FLAG_READONLY); -+ gst_memory_unref (mem); -+ } -+ } else { -+ video_frame = gst_buffer_make_writable (video_frame); -+ } -+ - if (!gst_video_frame_map (&frame, &overlay->info, video_frame, - GST_MAP_READWRITE)) - goto invalid_frame; -@@ -1918,6 +1974,18 @@ gst_base_text_overlay_push_frame (GstBaseTextOverlay * overlay, - - gst_video_frame_unmap (&frame); - -+ if (mem_rdonly && orig == video_frame) { -+ //if we used the original buffer and it's mem is set to read only, -+ //recover the memory ready only flag since we unset it before -+ // gst_video_frame_map () -+ m = gst_buffer_n_memory(video_frame); -+ while (--m>=0) { -+ mem = gst_buffer_get_memory(video_frame, m); -+ GST_MEMORY_FLAGS(mem) |= (GST_MEMORY_FLAG_READONLY); -+ gst_memory_unref (mem); -+ } -+ } -+ - done: - - return gst_pad_push (overlay->srcpad, video_frame); --- -1.7.9.5 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-video-frame-Don-t-ref-buffers-twice-when-mapping.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-video-frame-Don-t-ref-buffers-twice-when-mapping.patch deleted file mode 100644 index 3db4724fe6..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-video-frame-Don-t-ref-buffers-twice-when-mapping.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 269f642c45d85cfd630ed490478e6bd6b71a767f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com> -Date: Tue, 16 Sep 2014 01:07:18 +0300 -Subject: [PATCH] video-frame: Don't ref buffers twice when mapping - -Upstream-Status: Backport [1.5.1] ---- - gst-libs/gst/video/video-frame.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/gst-libs/gst/video/video-frame.c b/gst-libs/gst/video/video-frame.c -index 01f23c0..8a9ae96 100644 ---- a/gst-libs/gst/video/video-frame.c -+++ b/gst-libs/gst/video/video-frame.c -@@ -105,7 +105,7 @@ gst_video_frame_map_id (GstVideoFrame * frame, GstVideoInfo * info, - frame->data[i] = frame->map[0].data + info->offset[i]; - } - } -- frame->buffer = gst_buffer_ref (buffer); -+ frame->buffer = buffer; - if ((flags & GST_VIDEO_FRAME_MAP_FLAG_NO_REF) == 0) - gst_buffer_ref (frame->buffer); - --- -1.7.9.5 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-gstplaysink-don-t-set-async-of-custom-text-sink-to-f.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-gstplaysink-don-t-set-async-of-custom-text-sink-to-f.patch deleted file mode 100644 index 39c146aade..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-gstplaysink-don-t-set-async-of-custom-text-sink-to-f.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 0a78555ea6c8c2f1ee27ee4707e8d7aa00ab7a66 Mon Sep 17 00:00:00 2001 -From: Mingke Wang <mingke.wang@freescale.com> -Date: Thu, 19 Mar 2015 14:15:25 +0800 -Subject: [PATCH 2/4] gstplaysink: don't set async of custom text-sink to - false - -set async to false lead to A/V sync problem when seeking. -the preroll need use GAP event instead of set async to false. - -Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=747499] - -Signed-off-by: Mingke Wang <mingke.wang@freescale.com> - -diff --git a/gst/playback/gstplaysink.c b/gst/playback/gstplaysink.c -old mode 100644 -new mode 100755 -index f5a2d42..fba0172 ---- a/gst/playback/gstplaysink.c -+++ b/gst/playback/gstplaysink.c -@@ -2408,7 +2408,7 @@ gen_text_chain (GstPlaySink * playsink) - G_TYPE_BOOLEAN); - if (elem) { - /* make sure the sparse subtitles don't participate in the preroll */ -- g_object_set (elem, "async", FALSE, NULL); -+ //g_object_set (elem, "async", FALSE, NULL); - GST_DEBUG_OBJECT (playsink, "adding custom text sink"); - gst_bin_add (bin, chain->sink); - /* NOTE streamsynchronizer needs streams decoupled */ --- -1.7.9.5 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-ssaparse-enhance-SSA-text-lines-parsing.patch index 9fbebd5700..e453a500c9 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-ssaparse-enhance-SSA-text-lines-parsing.patch @@ -1,7 +1,7 @@ -From be6163cfa3a255493f9d75bad9541cbfe1723fee Mon Sep 17 00:00:00 2001 +From f587861bbe12ad0b10370f835592746aafedbf56 Mon Sep 17 00:00:00 2001 From: Mingke Wang <mingke.wang@freescale.com> Date: Thu, 19 Mar 2015 14:17:10 +0800 -Subject: [PATCH 3/4] ssaparse: enhance SSA text lines parsing. +Subject: [PATCH 2/4] ssaparse: enhance SSA text lines parsing. some parser will pass in the original ssa text line which starts with "Dialog:" and there's are maybe multiple Dialog lines in one input buffer. @@ -9,14 +9,18 @@ and there's are maybe multiple Dialog lines in one input buffer. Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=747496] Signed-off-by: Mingke Wang <mingke.wang@freescale.com> +--- + gst/subparse/gstssaparse.c | 150 +++++++++++++++++++++++++++++++++---- + 1 file changed, 134 insertions(+), 16 deletions(-) + mode change 100644 => 100755 gst/subparse/gstssaparse.c diff --git a/gst/subparse/gstssaparse.c b/gst/subparse/gstssaparse.c old mode 100644 new mode 100755 -index 06ecef9..0ab5dce +index c849c08..4b9636c --- a/gst/subparse/gstssaparse.c +++ b/gst/subparse/gstssaparse.c -@@ -260,6 +260,7 @@ gst_ssa_parse_remove_override_codes (GstSsaParse * parse, gchar * txt) +@@ -262,6 +262,7 @@ gst_ssa_parse_remove_override_codes (GstSsaParse * parse, gchar * txt) * gst_ssa_parse_push_line: * @parse: caller element * @txt: text to push @@ -24,7 +28,7 @@ index 06ecef9..0ab5dce * @start: timestamp for the buffer * @duration: duration for the buffer * -@@ -269,27 +270,133 @@ gst_ssa_parse_remove_override_codes (GstSsaParse * parse, gchar * txt) +@@ -271,27 +272,133 @@ gst_ssa_parse_remove_override_codes (GstSsaParse * parse, gchar * txt) * Returns: result of the push of the created buffer */ static GstFlowReturn @@ -169,7 +173,7 @@ index 06ecef9..0ab5dce GST_LOG_OBJECT (parse, "Text : %s", t); if (gst_ssa_parse_remove_override_codes (parse, t)) { -@@ -307,13 +414,22 @@ gst_ssa_parse_push_line (GstSsaParse * parse, gchar * txt, +@@ -309,13 +416,22 @@ gst_ssa_parse_push_line (GstSsaParse * parse, gchar * txt, gst_buffer_fill (buf, 0, escaped, len + 1); gst_buffer_set_size (buf, len); g_free (escaped); @@ -196,7 +200,7 @@ index 06ecef9..0ab5dce ret = gst_pad_push (parse->srcpad, buf); -@@ -333,6 +449,7 @@ gst_ssa_parse_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buf) +@@ -335,6 +451,7 @@ gst_ssa_parse_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buf) GstClockTime ts; gchar *txt; GstMapInfo map; @@ -204,7 +208,7 @@ index 06ecef9..0ab5dce if (G_UNLIKELY (!parse->framed)) goto not_framed; -@@ -350,13 +467,14 @@ gst_ssa_parse_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buf) +@@ -352,13 +469,14 @@ gst_ssa_parse_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buf) /* make double-sure it's 0-terminated and all */ gst_buffer_map (buf, &map, GST_MAP_READ); txt = g_strndup ((gchar *) map.data, map.size); @@ -221,5 +225,5 @@ index 06ecef9..0ab5dce if (ret != GST_FLOW_OK && GST_CLOCK_TIME_IS_VALID (ts)) { GstSegment segment; -- -1.7.9.5 +2.28.0 diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-video-frame-Add-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-video-frame-Add-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch deleted file mode 100644 index c465b5ceed..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-video-frame-Add-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch +++ /dev/null @@ -1,87 +0,0 @@ -From 40a293d44d1aeccf5eb8e86f23a0b13666111c5c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com> -Date: Fri, 12 Sep 2014 14:39:16 +0300 -Subject: [PATCH 2/3] video-frame: Add GST_VIDEO_FRAME_MAP_FLAG_NO_REF - -This makes sure that the buffer is not reffed another time when -storing it in the GstVideoFrame, keeping it writable if it was -writable. - -Upstream-Status: Backport [1.5.1] -https://bugzilla.gnome.org/show_bug.cgi?id=736118 ---- - gst-libs/gst/video/video-frame.c | 9 ++++++++- - gst-libs/gst/video/video-frame.h | 18 ++++++++++++++++++ - 2 files changed, 26 insertions(+), 1 deletion(-) - -diff --git a/gst-libs/gst/video/video-frame.c b/gst-libs/gst/video/video-frame.c -index 537cf70..01f23c0 100644 ---- a/gst-libs/gst/video/video-frame.c -+++ b/gst-libs/gst/video/video-frame.c -@@ -106,6 +106,9 @@ gst_video_frame_map_id (GstVideoFrame * frame, GstVideoInfo * info, - } - } - frame->buffer = gst_buffer_ref (buffer); -+ if ((flags & GST_VIDEO_FRAME_MAP_FLAG_NO_REF) == 0) -+ gst_buffer_ref (frame->buffer); -+ - frame->meta = meta; - - /* buffer flags enhance the frame flags */ -@@ -189,11 +192,13 @@ gst_video_frame_unmap (GstVideoFrame * frame) - GstBuffer *buffer; - GstVideoMeta *meta; - gint i; -+ GstMapFlags flags; - - g_return_if_fail (frame != NULL); - - buffer = frame->buffer; - meta = frame->meta; -+ flags = frame->map[0].flags; - - if (meta) { - for (i = 0; i < frame->info.finfo->n_planes; i++) { -@@ -202,7 +207,9 @@ gst_video_frame_unmap (GstVideoFrame * frame) - } else { - gst_buffer_unmap (buffer, &frame->map[0]); - } -- gst_buffer_unref (buffer); -+ -+ if ((flags & GST_VIDEO_FRAME_MAP_FLAG_NO_REF) == 0) -+ gst_buffer_unref (frame->buffer); - } - - /** -diff --git a/gst-libs/gst/video/video-frame.h b/gst-libs/gst/video/video-frame.h -index 627fab0..f8e6304 100644 ---- a/gst-libs/gst/video/video-frame.h -+++ b/gst-libs/gst/video/video-frame.h -@@ -149,6 +149,24 @@ typedef enum { - GST_VIDEO_BUFFER_FLAG_LAST = (GST_BUFFER_FLAG_LAST << 8) - } GstVideoBufferFlags; - -+/** -+ * GstVideoBufferFlags: -+ * @GST_VIDEO_FRAME_MAP_FLAG_NO_REF: Don't take another reference of the buffer and store it in -+ * the GstVideoFrame. This makes sure that the buffer stays -+ * writable while the frame is mapped, but requires that the -+ * buffer reference stays valid until the frame is unmapped again. -+ * @GST_VIDEO_FRAME_MAP_FLAG_LAST: Offset to define more flags -+ * -+ * Additional mapping flags for gst_video_frame_map(). -+ * -+ * Since: 1.6 -+ */ -+typedef enum { -+ GST_VIDEO_FRAME_MAP_FLAG_NO_REF = (GST_MAP_FLAG_LAST << 0), -+ GST_VIDEO_FRAME_MAP_FLAG_LAST = (GST_MAP_FLAG_LAST << 8) -+ /* 8 more flags possible afterwards */ -+} GstVideoFrameMapFlags; -+ - G_END_DECLS - - #endif /* __GST_VIDEO_FRAME_H__ */ --- -1.7.9.5 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-videofilter-Use-new-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-videofilter-Use-new-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch deleted file mode 100644 index 132bf06f75..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-videofilter-Use-new-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 3a7cdcdfc9c5b0d20394fe51b3b8cda23931ca6d Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com> -Date: Fri, 12 Sep 2014 14:41:01 +0300 -Subject: [PATCH 3/3] videofilter: Use new GST_VIDEO_FRAME_MAP_FLAG_NO_REF - -Upstream-Status: Backport [1.5.1] -https://bugzilla.gnome.org/show_bug.cgi?id=736118 ---- - gst-libs/gst/video/gstvideofilter.c | 23 ++++------------------- - 1 file changed, 4 insertions(+), 19 deletions(-) - -diff --git a/gst-libs/gst/video/gstvideofilter.c b/gst-libs/gst/video/gstvideofilter.c -index e1fa2c1..874b2e8 100644 ---- a/gst-libs/gst/video/gstvideofilter.c -+++ b/gst-libs/gst/video/gstvideofilter.c -@@ -260,23 +260,15 @@ gst_video_filter_transform (GstBaseTransform * trans, GstBuffer * inbuf, - if (fclass->transform_frame) { - GstVideoFrame in_frame, out_frame; - -- if (!gst_video_frame_map (&in_frame, &filter->in_info, inbuf, GST_MAP_READ)) -+ if (!gst_video_frame_map (&in_frame, &filter->in_info, inbuf, -+ GST_MAP_READ | GST_VIDEO_FRAME_MAP_FLAG_NO_REF)) - goto invalid_buffer; - - if (!gst_video_frame_map (&out_frame, &filter->out_info, outbuf, -- GST_MAP_WRITE)) -+ GST_MAP_WRITE | GST_VIDEO_FRAME_MAP_FLAG_NO_REF)) - goto invalid_buffer; - -- /* GstVideoFrame has another reference, so the buffer looks unwriteable, -- * meaning that we can't attach any metas or anything to it. Other -- * map() functions like gst_buffer_map() don't get another reference -- * of the buffer and expect the buffer reference to be kept until -- * the buffer is unmapped again. */ -- gst_buffer_unref (inbuf); -- gst_buffer_unref (outbuf); - res = fclass->transform_frame (filter, &in_frame, &out_frame); -- gst_buffer_ref (inbuf); -- gst_buffer_ref (outbuf); - - gst_video_frame_unmap (&out_frame); - gst_video_frame_unmap (&in_frame); -@@ -317,7 +309,7 @@ gst_video_filter_transform_ip (GstBaseTransform * trans, GstBuffer * buf) - GstVideoFrame frame; - GstMapFlags flags; - -- flags = GST_MAP_READ; -+ flags = GST_MAP_READ | GST_VIDEO_FRAME_MAP_FLAG_NO_REF; - - if (!gst_base_transform_is_passthrough (trans)) - flags |= GST_MAP_WRITE; -@@ -325,14 +317,7 @@ gst_video_filter_transform_ip (GstBaseTransform * trans, GstBuffer * buf) - if (!gst_video_frame_map (&frame, &filter->in_info, buf, flags)) - goto invalid_buffer; - -- /* GstVideoFrame has another reference, so the buffer looks unwriteable, -- * meaning that we can't attach any metas or anything to it. Other -- * map() functions like gst_buffer_map() don't get another reference -- * of the buffer and expect the buffer reference to be kept until -- * the buffer is unmapped again. */ -- gst_buffer_unref (buf); - res = fclass->transform_frame_ip (filter, &frame); -- gst_buffer_ref (buf); - - gst_video_frame_unmap (&frame); - } else { --- -1.7.9.5 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-viv-fb-Make-sure-config.h-is-included.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-viv-fb-Make-sure-config.h-is-included.patch new file mode 100644 index 0000000000..2af83ff8b9 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-viv-fb-Make-sure-config.h-is-included.patch @@ -0,0 +1,32 @@ +From 153f3b83a3fed77785bd1420bed8bbafa2d791b3 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 3/4] 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 05e1f62..96ce5e6 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 +-- +2.28.0 + diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-glimagesink-Downrank-to-marginal.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-glimagesink-Downrank-to-marginal.patch new file mode 100644 index 0000000000..f45ea65ef3 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-glimagesink-Downrank-to-marginal.patch @@ -0,0 +1,32 @@ +From 79841a02ee754eba736cb32aaf2ed2b2fc0483d4 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 4/4] 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 302e845..463be9c 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; + } + +-- +2.28.0 + diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch deleted file mode 100644 index 7813915d8d..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch +++ /dev/null @@ -1,69 +0,0 @@ -From ed09c8fd2c9c2b5384b72cc70af3728be6694e64 Mon Sep 17 00:00:00 2001 -From: Mingke Wang <mingke.wang@freescale.com> -Date: Thu, 19 Mar 2015 14:20:26 +0800 -Subject: [PATCH 4/4] subparse: set need_segment after sink pad received - GST_EVENT_SEGMENT - -subparse works in push mode, chain funciton will be called once -up stream element finished the seeking and flushing. -if set need_segment flag in src pad event handler, the segment -event will be pushed earlier, result in the subtitle text will -be send out to down stream from the beginning. - -Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=747498] - -Signed-off-by: Mingke Wang <mingke.wang@freescale.com> - -diff --git a/gst/subparse/gstsubparse.c b/gst/subparse/gstsubparse.c -old mode 100644 -new mode 100755 -index b565e93..7741ccc ---- a/gst/subparse/gstsubparse.c -+++ b/gst/subparse/gstsubparse.c -@@ -266,22 +266,20 @@ gst_sub_parse_src_event (GstPad * pad, GstObject * parent, GstEvent * event) - goto beach; - } - -+ /* Apply the seek to our segment */ -+ gst_segment_do_seek (&self->segment, rate, format, flags, -+ start_type, start, stop_type, stop, &update); -+ -+ GST_DEBUG_OBJECT (self, "segment after seek: %" GST_SEGMENT_FORMAT, -+ &self->segment); -+ - /* Convert that seek to a seeking in bytes at position 0, - FIXME: could use an index */ - ret = gst_pad_push_event (self->sinkpad, - gst_event_new_seek (rate, GST_FORMAT_BYTES, flags, - GST_SEEK_TYPE_SET, 0, GST_SEEK_TYPE_NONE, 0)); - -- if (ret) { -- /* Apply the seek to our segment */ -- gst_segment_do_seek (&self->segment, rate, format, flags, -- start_type, start, stop_type, stop, &update); -- -- GST_DEBUG_OBJECT (self, "segment after seek: %" GST_SEGMENT_FORMAT, -- &self->segment); -- -- self->need_segment = TRUE; -- } else { -+ if (!ret) { - GST_WARNING_OBJECT (self, "seek to 0 bytes failed"); - } - -@@ -1632,8 +1630,10 @@ gst_sub_parse_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) - gst_event_parse_segment (event, &s); - if (s->format == GST_FORMAT_TIME) - gst_event_copy_segment (event, &self->segment); -- GST_DEBUG_OBJECT (self, "newsegment (%s)", -- gst_format_get_name (self->segment.format)); -+ GST_DEBUG_OBJECT (self, "newsegment (%s) %" GST_SEGMENT_FORMAT, -+ gst_format_get_name (self->segment.format), &self->segment); -+ -+ self->need_segment = TRUE; - - /* if not time format, we'll either start with a 0 timestamp anyway or - * it's following a seek in which case we'll have saved the requested --- -1.7.9.5 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event-if.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event-if.patch deleted file mode 100644 index 0407a30f90..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event-if.patch +++ /dev/null @@ -1,37 +0,0 @@ -From b608d027fff6efc2d1988ebf169cbe3b2b44a61b Mon Sep 17 00:00:00 2001 -From: zhouming <b42586@freescale.com> -Date: Thu, 8 May 2014 12:01:17 +0800 -Subject: [PATCH] ENGR00312034: do not change eos event to gap event if no - data has passed to streamsynchronizer. - -https://bugzilla.gnome.org/show_bug.cgi?id=727074 - -Upstream Status: Pending - -Signed-off-by: zhouming <b42586@freescale.com> ---- - gst/playback/gststreamsynchronizer.c | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -diff --git a/gst/playback/gststreamsynchronizer.c b/gst/playback/gststreamsynchronizer.c -index 3997d1b..3e17c55 100644 ---- a/gst/playback/gststreamsynchronizer.c -+++ b/gst/playback/gststreamsynchronizer.c -@@ -488,12 +488,11 @@ gst_stream_synchronizer_sink_event (GstPad * pad, GstObject * parent, - } - g_slist_free (pads); - } else { -- /* if EOS, but no data has passed, then send something to replace EOS -- * for preroll purposes */ -+ /* if EOS, but no data has passed, then send EOS event */ - if (!seen_data) { - GstEvent *gap_event; - -- gap_event = gst_event_new_gap (timestamp, GST_CLOCK_TIME_NONE); -+ gap_event = gst_event_new_eos (); - ret = gst_pad_push_event (srcpad, gap_event); - } else { - GstEvent *gap_event; --- -1.7.9.5 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event2.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event2.patch deleted file mode 100755 index f24bc7cd6f..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event2.patch +++ /dev/null @@ -1,49 +0,0 @@ -commit f9536544f5ad182b4f78d0143d1daa45dd64e624 -Author: Song Bing <b06498@freescale.com> -Date: Thu Oct 9 17:37:43 2014 +0800 - -[gststreamsynchronizer] send EOS event insterd of GAP event as GAP -event has issue when A/V have different duration. - -send EOS event insterd of GAP event as GAP event has issue when A/V have different duration. - -Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=736655] - -Signed-off-by: Song Bing <b06498@freescale.com> - -diff --git a/gst/playback/gststreamsynchronizer.c b/gst/playback/gststreamsynchronizer.c -index 3e17c55..ff42d72 100644 ---- a/gst/playback/gststreamsynchronizer.c -+++ b/gst/playback/gststreamsynchronizer.c -@@ -488,19 +488,24 @@ gst_stream_synchronizer_sink_event (GstPad * pad, GstObject * parent, - } - g_slist_free (pads); - } else { -- /* if EOS, but no data has passed, then send EOS event */ -+ /* if EOS, but no data has passed, then send something to replace EOS -+ * for preroll purposes */ - if (!seen_data) { -- GstEvent *gap_event; -+ GstEvent *eos_event; - -- gap_event = gst_event_new_eos (); -- ret = gst_pad_push_event (srcpad, gap_event); -+ /* FIXME: change to EOS event as GAP event has issue when A/V have -+ * different duration */ -+ eos_event = gst_event_new_eos (); -+ ret = gst_pad_push_event (srcpad, eos_event); - } else { -- GstEvent *gap_event; -+ GstEvent *eos_event; - - /* FIXME: Also send a GAP event to let audio sinks start their - * clock in case they did not have enough data yet */ -- gap_event = gst_event_new_gap (timestamp, GST_CLOCK_TIME_NONE); -- ret = gst_pad_push_event (srcpad, gap_event); -+ /* FIXME: change to EOS event as GAP event has issue when A/V have -+ * different duration */ -+ eos_event = gst_event_new_eos (); -+ ret = gst_pad_push_event (srcpad, eos_event); - } - } - gst_object_unref (srcpad); diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event3.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event3.patch deleted file mode 100755 index 731be686de..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event3.patch +++ /dev/null @@ -1,31 +0,0 @@ -commit 3f7052aac5e0118a9a9e09fff2f65091be448972 -Author: Song Bing <b06498@freescale.com> -Date: Thu Oct 23 13:35:13 2014 +0800 - -[streamsynchronizer] One stream can finish playback. - -As changed GAP event EOS event, so EOS will send more times, which will -cause send function return error. -Streamsynchronizer will don’t send second track EOS event if send the -first track EOS return fail. Fixed by ignore the return error. - -Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=736655] - -Signed-off-by: Song Bing b06498@freescale.com - -diff --git a/gst/playback/gststreamsynchronizer.c b/gst/playback/gststreamsynchronizer.c -index ff42d72..d1732c3 100644 ---- a/gst/playback/gststreamsynchronizer.c -+++ b/gst/playback/gststreamsynchronizer.c -@@ -482,7 +482,10 @@ gst_stream_synchronizer_sink_event (GstPad * pad, GstObject * parent, - while (epad) { - pad = epad->data; - GST_DEBUG_OBJECT (pad, "Pushing EOS"); -- ret = ret && gst_pad_push_event (pad, gst_event_new_eos ()); -+ /* FIXME: remove error check as GAP changed to EOS will send EOS -+ * more times, which will cause return error and then don't send -+ * EOS event to following tracks. */ -+ gst_pad_push_event (pad, gst_event_new_eos ()); - gst_object_unref (pad); - epad = g_slist_next (epad); - } diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch deleted file mode 100644 index 325671721d..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 540e02c92c75e08b90326863dc787fa5cadf9da6 Mon Sep 17 00:00:00 2001 -From: Song Bing <b06498@freescale.com> -Date: Fri, 13 Mar 2015 18:04:31 +0800 -Subject: [PATCH] encodebin: Need more buffers in output queue for better - performance - -Need more buffers in output queue for better performance - -Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=744191] - -Signed-off-by: Song Bing <b06498@freescale.com> ---- - gst/encoding/gstencodebin.c | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/gst/encoding/gstencodebin.c b/gst/encoding/gstencodebin.c -index 6728e58..32daae4 100644 ---- a/gst/encoding/gstencodebin.c -+++ b/gst/encoding/gstencodebin.c -@@ -1138,8 +1138,7 @@ _create_stream_group (GstEncodeBin * ebin, GstEncodingProfile * sprof, - * We only use a 1buffer long queue here, the actual queueing will be done - * in the input queue */ - last = sgroup->outqueue = gst_element_factory_make ("queue", NULL); -- g_object_set (sgroup->outqueue, "max-size-buffers", (guint32) 1, -- "max-size-bytes", (guint32) 0, "max-size-time", (guint64) 0, -+ g_object_set (sgroup->outqueue, "max-size-time", (guint64) 0, - "silent", TRUE, NULL); - - gst_bin_add (GST_BIN (ebin), sgroup->outqueue); --- -1.7.9.5 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/fix-id3demux-utf16-to-utf8-issue.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/fix-id3demux-utf16-to-utf8-issue.patch deleted file mode 100755 index ef3f75fba5..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/fix-id3demux-utf16-to-utf8-issue.patch +++ /dev/null @@ -1,54 +0,0 @@ -Author: Lyon Wang <b12696@freescale.com> -Date: Thu Oct 9 17:37:43 2014 +0800 - -[id3v2frames] Bug fix for id3demux issue - -Fix the issue that id3 tags utf16 charaters cannot be extreacted in id3demux -when I tried to get the id3v2 tag such as TIT2, TALB etc. it will return extrac -failed. - -Checked in id3v2frame.c, When parse the UTF-16 streams, it used g_convert() to -convert the buffer from UTF-16 to UTF-8, however it will return err that this -conversion is not supported which cause the extraction failed with these UTF-16 -characters. - -In the patch, use g_utf16_to_utf8() instead of g_convert, which can convert the -character format successfully. - -https://bugzilla.gnome.org/show_bug.cgi?id=741144 - -Upstream-Status: Backport [1.5.1] - -Signed-off-by: Lyon Wang <b12696@freescale.com> - -diff --git a/gst-libs/gst/tag/id3v2frames.c b/gst-libs/gst/tag/id3v2frames.c -old mode 100644 -new mode 100755 -index 3785c2a..7b9d8ac ---- a/gst-libs/gst/tag/id3v2frames.c -+++ b/gst-libs/gst/tag/id3v2frames.c -@@ -1057,14 +1057,17 @@ parse_insert_string_field (guint8 encoding, gchar * data, gint data_size, - data_size -= 2; - } - -- field = g_convert (data, data_size, "UTF-8", in_encode, NULL, NULL, NULL); -- -- if (field == NULL || g_utf8_validate (field, -1, NULL) == FALSE) { -- /* As a fallback, try interpreting UTF-16 in the other endianness */ -- if (in_encode == utf16beenc) -- field = g_convert (data, data_size, "UTF-8", utf16leenc, -- NULL, NULL, NULL); -+ if (in_encode == utf16beenc) { -+ gunichar2 *data_utf16; -+ guint i; -+ data_utf16 = (gunichar2 *) data; -+ for (i=0; i<(data_size>>1); i++) { -+ data_utf16[i] = GUINT16_TO_LE (data_utf16[i]); -+ } - } -+ //field = g_convert (data, data_size, "UTF-8", in_encode, NULL, NULL, NULL); -+ field = g_utf16_to_utf8((gunichar2 *)data, (glong)(data_size>>1), NULL, NULL, NULL); -+ - } - - break; diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/handle-audio-video-decoder-error.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/handle-audio-video-decoder-error.patch deleted file mode 100755 index 833ce72bb2..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/handle-audio-video-decoder-error.patch +++ /dev/null @@ -1,64 +0,0 @@ -From bcb2b8b6f49e7c66124a4f5e07dea829d5ebfe59 Mon Sep 17 00:00:00 2001 -From: Lyon Wang <lyon.wang@freescale.com> -Date: Mon, 15 Dec 2014 16:52:07 +0800 -Subject: [PATCH] handle audio/video decoder error - -When there is input data and no output data to the end of the stream, it will -send GST_ELEMENT_ERROR, So the clips playing will quit. -However, if only one of the tracks is corrupt, there is no need to quit other -tracks playing. - -The patch comments the GST_ELEMENT_ERROR() and just add GST_ERROR_OBJECT() -information instead. - -Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=741542] - -Signed-off-by: Lyon Wang <lyon.wang@freescale.com> ---- - gst-libs/gst/audio/gstaudiodecoder.c | 5 +++-- - gst-libs/gst/video/gstvideodecoder.c | 5 +++-- - 2 files changed, 6 insertions(+), 4 deletions(-) - mode change 100644 => 100755 gst-libs/gst/audio/gstaudiodecoder.c - mode change 100644 => 100755 gst-libs/gst/video/gstvideodecoder.c - -diff --git a/gst-libs/gst/audio/gstaudiodecoder.c b/gst-libs/gst/audio/gstaudiodecoder.c -old mode 100644 -new mode 100755 -index c2e7a28..891df0a ---- a/gst-libs/gst/audio/gstaudiodecoder.c -+++ b/gst-libs/gst/audio/gstaudiodecoder.c -@@ -2123,9 +2123,10 @@ gst_audio_decoder_sink_eventfunc (GstAudioDecoder * dec, GstEvent * event) - GST_AUDIO_DECODER_STREAM_UNLOCK (dec); - - if (dec->priv->ctx.had_input_data && !dec->priv->ctx.had_output_data) { -- GST_ELEMENT_ERROR (dec, STREAM, DECODE, -+ /* GST_ELEMENT_ERROR (dec, STREAM, DECODE, - ("No valid frames decoded before end of stream"), -- ("no valid frames found")); -+ ("no valid frames found")); */ -+ GST_ERROR_OBJECT(dec, "No valid frames decoded before end of stream"); - } - - /* send taglist if no valid frame is decoded util EOS */ -diff --git a/gst-libs/gst/video/gstvideodecoder.c b/gst-libs/gst/video/gstvideodecoder.c -old mode 100644 -new mode 100755 -index ac581e1..4278bcd ---- a/gst-libs/gst/video/gstvideodecoder.c -+++ b/gst-libs/gst/video/gstvideodecoder.c -@@ -1068,9 +1068,10 @@ gst_video_decoder_sink_event_default (GstVideoDecoder * decoder, - - /* Error out even if EOS was ok when we had input, but no output */ - if (ret && priv->had_input_data && !priv->had_output_data) { -- GST_ELEMENT_ERROR (decoder, STREAM, DECODE, -+ /* GST_ELEMENT_ERROR (decoder, STREAM, DECODE, - ("No valid frames decoded before end of stream"), -- ("no valid frames found")); -+ ("no valid frames found")); */ -+ GST_ERROR_OBJECT(decoder, "No valid frames decoded before end of stream"); - } - - /* Forward EOS immediately. This is required because no --- -1.7.9.5 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/taglist-not-send-to-down-stream-if-all-the-frame-cor.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/taglist-not-send-to-down-stream-if-all-the-frame-cor.patch deleted file mode 100644 index 51fdc7e177..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/taglist-not-send-to-down-stream-if-all-the-frame-cor.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 68fa1b1425ad2c5f7c5013d0943153a8a6d0934e Mon Sep 17 00:00:00 2001 -From: Jian Li <lj.qfy.sh@gmail.com> -Date: Wed, 24 Sep 2014 17:21:02 +0800 -Subject: [PATCH] taglist not send to down stream if all the frame corrupted - -https://bugzilla.gnome.org/show_bug.cgi?id=737246 - -Upstream status: Pending - -Signed-off-by: Jian Li <lj.qfy.sh@gmail.com> ---- - gst-libs/gst/audio/gstaudiodecoder.c | 9 +++++++++ - gst-libs/gst/video/gstvideodecoder.c | 8 ++++++++ - 2 files changed, 17 insertions(+) - -diff --git a/gst-libs/gst/audio/gstaudiodecoder.c b/gst-libs/gst/audio/gstaudiodecoder.c -index 3504678..3d69efe 100644 ---- a/gst-libs/gst/audio/gstaudiodecoder.c -+++ b/gst-libs/gst/audio/gstaudiodecoder.c -@@ -2083,6 +2083,15 @@ gst_audio_decoder_sink_eventfunc (GstAudioDecoder * dec, GstEvent * event) - gst_audio_decoder_drain (dec); - GST_AUDIO_DECODER_STREAM_UNLOCK (dec); - -+ /* send taglist if no valid frame is decoded util EOS */ -+ if (dec->priv->taglist && dec->priv->taglist_changed) { -+ GST_DEBUG_OBJECT (dec, "codec tag %" GST_PTR_FORMAT, dec->priv->taglist); -+ if (!gst_tag_list_is_empty (dec->priv->taglist)) -+ gst_audio_decoder_push_event (dec, -+ gst_event_new_tag (gst_tag_list_ref (dec->priv->taglist))); -+ dec->priv->taglist_changed = FALSE; -+ } -+ - /* Forward EOS because no buffer or serialized event will come after - * EOS and nothing could trigger another _finish_frame() call. */ - ret = gst_audio_decoder_push_event (dec, event); -diff --git a/gst-libs/gst/video/gstvideodecoder.c b/gst-libs/gst/video/gstvideodecoder.c -index dd8abe3..d9bfe4d 100644 ---- a/gst-libs/gst/video/gstvideodecoder.c -+++ b/gst-libs/gst/video/gstvideodecoder.c -@@ -1024,6 +1024,14 @@ gst_video_decoder_sink_event_default (GstVideoDecoder * decoder, - * parent class' ::sink_event() until a later time. - */ - forward_immediate = TRUE; -+ -+ /* send taglist if no valid frame is decoded util EOS */ -+ if (decoder->priv->tags && decoder->priv->tags_changed) { -+ gst_video_decoder_push_event (decoder, -+ gst_event_new_tag (gst_tag_list_ref (decoder->priv->tags))); -+ decoder->priv->tags_changed = FALSE; -+ } -+ - break; - } - case GST_EVENT_GAP: --- -1.7.9.5 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/videobuffer_updata_alignment_update.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/videobuffer_updata_alignment_update.patch deleted file mode 100755 index 8cfda955a7..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/videobuffer_updata_alignment_update.patch +++ /dev/null @@ -1,53 +0,0 @@ -commit 88d253ea23b06289df40401160b606323f16c910 -Author: Song Bing <b06498@freescale.com> -Date: Mon Dec 15 09:34:35 2014 +0800 - -videopool: update video alignment after video alignment - -Video buffer pool will update video alignment to respect stride alignment -requirement. But haven't update it to video alignment in configure. -Which will cause user get wrong video alignment. - -https://bugzilla.gnome.org/show_bug.cgi?id=741501 - -Upstream-Status: Backport [1.5.1] - -Signed-off-by: Song Bing <b06498@freescale.com> -diff --git a/gst-libs/gst/video/gstvideopool.c b/gst-libs/gst/video/gstvideopool.c -index 4475f45..acef594 100644 ---- a/gst-libs/gst/video/gstvideopool.c -+++ b/gst-libs/gst/video/gstvideopool.c -@@ -167,6 +167,7 @@ video_buffer_pool_set_config (GstBufferPool * pool, GstStructure * config) - /* get an apply the alignment to the info */ - gst_buffer_pool_config_get_video_alignment (config, &priv->video_align); - gst_video_info_align (&info, &priv->video_align); -+ gst_buffer_pool_config_set_video_alignment (config, &priv->video_align); - } - priv->info = info; - -diff --git a/sys/ximage/ximagepool.c b/sys/ximage/ximagepool.c -index 6cc2cfa..6a1cbc9 100644 ---- a/sys/ximage/ximagepool.c -+++ b/sys/ximage/ximagepool.c -@@ -597,6 +597,8 @@ ximage_buffer_pool_set_config (GstBufferPool * pool, GstStructure * config) - /* do padding and alignment */ - gst_video_info_align (&info, &priv->align); - -+ gst_buffer_pool_config_set_video_alignment (config, &priv->align); -+ - /* we need the video metadata too now */ - priv->add_metavideo = TRUE; - } else { -diff --git a/sys/xvimage/xvimagepool.c b/sys/xvimage/xvimagepool.c -index 244a51a..34b1ab2 100644 ---- a/sys/xvimage/xvimagepool.c -+++ b/sys/xvimage/xvimagepool.c -@@ -124,6 +124,8 @@ xvimage_buffer_pool_set_config (GstBufferPool * pool, GstStructure * config) - /* do padding and alignment */ - gst_video_info_align (&info, &priv->align); - -+ gst_buffer_pool_config_set_video_alignment (config, &priv->align); -+ - /* we need the video metadata too now */ - priv->add_metavideo = TRUE; - } else { diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/videoencoder-Keep-sticky-events-around-when-doing-a-soft-.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/videoencoder-Keep-sticky-events-around-when-doing-a-soft-.patch deleted file mode 100644 index b476969111..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/videoencoder-Keep-sticky-events-around-when-doing-a-soft-.patch +++ /dev/null @@ -1,46 +0,0 @@ -From c3f7d36b992a3cbcee3386dea85720f3cb04e1ff Mon Sep 17 00:00:00 2001 -From: Song Bing <b06498@freescale.com> -Date: Fri, 27 Mar 2015 13:39:43 +0800 -Subject: [PATCH] videoencoder: Keep sticky events around when doing a soft - reset - -The current code will first discard all frames, and then tries to copy -all sticky events from the (now discarded) frames. Let's change the order. - -https://bugzilla.gnome.org/show_bug.cgi?id=746865 - -Upstream-Status: Accepted - ---- - gst-libs/gst/video/gstvideoencoder.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/gst-libs/gst/video/gstvideoencoder.c b/gst-libs/gst/video/gstvideoencoder.c -index 614ba2d..4c5b111 100644 ---- a/gst-libs/gst/video/gstvideoencoder.c -+++ b/gst-libs/gst/video/gstvideoencoder.c -@@ -340,10 +340,6 @@ gst_video_encoder_reset (GstVideoEncoder * encoder, gboolean hard) - - priv->drained = TRUE; - -- g_list_foreach (priv->frames, (GFunc) gst_video_codec_frame_unref, NULL); -- g_list_free (priv->frames); -- priv->frames = NULL; -- - priv->bytes = 0; - priv->time = 0; - -@@ -392,6 +388,10 @@ gst_video_encoder_reset (GstVideoEncoder * encoder, gboolean hard) - encoder->priv->current_frame_events); - } - -+ g_list_foreach (priv->frames, (GFunc) gst_video_codec_frame_unref, NULL); -+ g_list_free (priv->frames); -+ priv->frames = NULL; -+ - GST_VIDEO_ENCODER_STREAM_UNLOCK (encoder); - - return ret; --- -1.7.9.5 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.18.5.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.18.5.bb new file mode 100644 index 0000000000..5e2cca3864 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.18.5.bb @@ -0,0 +1,94 @@ +require gstreamer1.0-plugins-common.inc + +DESCRIPTION = "'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" + +SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-${PV}.tar.xz \ + file://0001-ENGR00312515-get-caps-from-src-pad-when-query-caps.patch \ + file://0003-viv-fb-Make-sure-config.h-is-included.patch \ + file://0002-ssaparse-enhance-SSA-text-lines-parsing.patch \ + file://0004-glimagesink-Downrank-to-marginal.patch \ + " +SRC_URI[sha256sum] = "960b7af4585700db0fdd5b843554e11e2564fed9e061f591fae88a7be6446fa3" + +S = "${WORKDIR}/gst-plugins-base-${PV}" + +DEPENDS += "iso-codes util-linux zlib" + +inherit gobject-introspection + +PACKAGES_DYNAMIC =+ "^libgst.*" + +# 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 ??= " \ + ${GSTREAMER_ORC} \ + ${PACKAGECONFIG_GL} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'alsa x11', d)} \ + jpeg ogg pango png theora vorbis \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland egl', '', d)} \ +" + +OPENGL_APIS = 'opengl gles2' +OPENGL_PLATFORMS = 'egl' + +X11DEPENDS = "virtual/libx11 libsm libxrender libxv" +X11ENABLEOPTS = "-Dx11=enabled -Dxvideo=enabled -Dxshm=enabled" +X11DISABLEOPTS = "-Dx11=disabled -Dxvideo=disabled -Dxshm=disabled" + +PACKAGECONFIG[alsa] = "-Dalsa=enabled,-Dalsa=disabled,alsa-lib" +PACKAGECONFIG[cdparanoia] = "-Dcdparanoia=enabled,-Dcdparanoia=disabled,cdparanoia" +PACKAGECONFIG[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" +PACKAGECONFIG[theora] = "-Dtheora=enabled,-Dtheora=disabled,libtheora" +PACKAGECONFIG[tremor] = "-Dtremor=enabled,-Dtremor=disabled,tremor" +PACKAGECONFIG[visual] = "-Dlibvisual=enabled,-Dlibvisual=disabled,libvisual" +PACKAGECONFIG[vorbis] = "-Dvorbis=enabled,-Dvorbis=disabled,libvorbis" +PACKAGECONFIG[x11] = "${X11ENABLEOPTS},${X11DISABLEOPTS},${X11DEPENDS}" + +# OpenGL API packageconfigs +PACKAGECONFIG[opengl] = ",,virtual/libgl libglu" +PACKAGECONFIG[gles2] = ",,virtual/libgles2" + +# OpenGL platform packageconfigs +PACKAGECONFIG[egl] = ",,virtual/egl" + +# OpenGL window systems (except for X11) +PACKAGECONFIG[gbm] = ",,virtual/libgbm libgudev libdrm" +PACKAGECONFIG[wayland] = ",,wayland-native wayland wayland-protocols libdrm" +PACKAGECONFIG[dispmanx] = ",,virtual/libomxil" +PACKAGECONFIG[viv-fb] = ",,virtual/libgles2 virtual/libg2d" + +OPENGL_WINSYS = "${@bb.utils.filter('PACKAGECONFIG', 'x11 gbm wayland dispmanx egl viv-fb', d)}" + +EXTRA_OEMESON += " \ + -Ddoc=disabled \ + -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)} \ +" + +FILES:${PN}-dev += "${libdir}/gstreamer-1.0/include/gst/gl/gstglconfig.h" +FILES:${MLPREFIX}libgsttag-1.0 += "${datadir}/gst-plugins-base/1.0/license-translations.dict" + +def get_opengl_cmdline_list(switch_name, options, d): + selected_options = [] + if bb.utils.contains('DISTRO_FEATURES', 'opengl', True, False, d): + for option in options.split(): + if bb.utils.contains('PACKAGECONFIG', option, True, False, d): + selected_options += [option] + if selected_options: + return '-D' + switch_name + '=' + ','.join(selected_options) + else: + return '' + +CVE_PRODUCT += "gst-plugins-base" diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb deleted file mode 100644 index b09c2cb581..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb +++ /dev/null @@ -1,30 +0,0 @@ -include gstreamer1.0-plugins-base.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=c54ce9345727175ff66d17b67ff51f58 \ - file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607 \ - file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \ - " - -SRC_URI += "file://do-not-change-eos-event-to-gap-event-if.patch \ - file://get-caps-from-src-pad-when-query-caps.patch \ - file://taglist-not-send-to-down-stream-if-all-the-frame-cor.patch \ - file://fix-id3demux-utf16-to-utf8-issue.patch \ - file://handle-audio-video-decoder-error.patch \ - file://videobuffer_updata_alignment_update.patch \ - file://0002-video-frame-Add-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch \ - file://0001-video-frame-Don-t-ref-buffers-twice-when-mapping.patch \ - file://0003-videofilter-Use-new-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch \ - file://videoencoder-Keep-sticky-events-around-when-doing-a-soft-.patch \ - file://do-not-change-eos-event-to-gap-event2.patch \ - file://do-not-change-eos-event-to-gap-event3.patch \ - file://0001-basetextoverlay-make-memory-copy-when-video-buffer-s.patch \ - file://0002-gstplaysink-don-t-set-async-of-custom-text-sink-to-f.patch \ - file://0003-ssaparse-enhance-SSA-text-lines-parsing.patch \ - file://0004-subparse-set-need_segment-after-sink-pad-received-GS.patch \ - file://encodebin-Need-more-buffers-in-output-queue-for-bett.patch \ -" - -SRC_URI[md5sum] = "357165af625c0ca353ab47c5d843920e" -SRC_URI[sha256sum] = "77bd8199e7a312d3d71de9b7ddf761a3b78560a2c2a80829d0815ca39cbd551d" - -S = "${WORKDIR}/gst-plugins-base-${PV}" diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb deleted file mode 100644 index fbe3a42cd7..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb +++ /dev/null @@ -1,19 +0,0 @@ -DEFAULT_PREFERENCE = "-1" - -include gstreamer1.0-plugins-base.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=c54ce9345727175ff66d17b67ff51f58 \ - file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607 \ - file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \ - " - -S = "${WORKDIR}/git" - -SRCREV = "8d4cb64a4b9d84b10076bf350f80a0d6ea68ec2d" - -do_configure_prepend() { - cd ${S} - ./autogen.sh --noconfigure - cd ${B} -} - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-common.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-common.inc new file mode 100644 index 0000000000..54dd92873f --- /dev/null +++ b/meta/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/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good.inc deleted file mode 100644 index 6e316de9f2..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good.inc +++ /dev/null @@ -1,57 +0,0 @@ -require gstreamer1.0-plugins.inc - -LICENSE = "GPLv2+ & LGPLv2.1+" - -# libid3tag -DEPENDS += "gstreamer1.0-plugins-base zlib bzip2 libcap" - -inherit gettext - - -PACKAGECONFIG ??= " \ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)} \ - orc cairo flac gdk-pixbuf gudev jpeg libpng soup speex taglib \ - " - -X11DEPENDS = "virtual/libx11 libsm libxrender libxfixes libxdamage" -X11ENABLEOPTS = "--enable-x --enable-xshm" -X11DISABLEOPTS = "--disable-x --disable-xshm" -PACKAGECONFIG[x11] = "${X11ENABLEOPTS},${X11DISABLEOPTS},${X11DEPENDS}" -PACKAGECONFIG[pulseaudio] = "--enable-pulse,--disable-pulse,pulseaudio" -PACKAGECONFIG[cairo] = "--enable-cairo,--disable-cairo,cairo" -PACKAGECONFIG[flac] = "--enable-flac,--disable-flac,flac" -PACKAGECONFIG[gdk-pixbuf] = "--enable-gdk_pixbuf,--disable-gdk_pixbuf,gdk-pixbuf" -PACKAGECONFIG[gudev] = "--with-gudev,--without-gudev,udev" -PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack" -PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg" -PACKAGECONFIG[libpng] = "--enable-libpng,--disable-libpng,libpng" -PACKAGECONFIG[soup] = "--enable-soup,--disable-soup,libsoup-2.4" -PACKAGECONFIG[speex] = "--enable-speex,--disable-speex,speex" -PACKAGECONFIG[taglib] = "--enable-taglib,--disable-taglib,taglib" -PACKAGECONFIG[vpx] = "--enable-vpx,--disable-vpx,libvpx" -PACKAGECONFIG[wavpack] = "--enable-wavpack,--disable-wavpack,wavpack" - -# the 1394 plugins require both libraw1394 and libiec61883 -# the former is included in meta-oe, the latter isn't -# -> disabled - -EXTRA_OECONF += " \ - --enable-oss \ - --enable-gst_v4l2 \ - --without-libv4l2 \ - --disable-directsound \ - --disable-waveform \ - --disable-oss4 \ - --disable-sunaudio \ - --disable-osx_audio \ - --disable-osx_video \ - --disable-aalib \ - --disable-libcaca \ - --disable-libdv \ - --disable-shout2 \ - --disable-examples \ - --disable-dv1394 \ -" - -FILES_${PN}-equalizer += "${datadir}/gstreamer-1.0/presets/*.prs" diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch deleted file mode 100755 index 53147df42b..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch +++ /dev/null @@ -1,62 +0,0 @@ -From c782a30482908a4b4dd9cd4abff9f9bc4016698f Mon Sep 17 00:00:00 2001 -From: Song Bing <b06498@freescale.com> -Date: Tue, 5 Aug 2014 14:40:46 +0800 -Subject: [PATCH] gstrtpmp4gpay: set dafault value for MPEG4 without codec - data in caps. - -https://bugzilla.gnome.org/show_bug.cgi?id=734263 - -Upstream Status: Submitted - -Signed-off-by: Song Bing <b06498@freescale.com> ---- - gst/rtp/gstrtpmp4gpay.c | 19 ++++++++++++++++++- - 1 file changed, 18 insertions(+), 1 deletion(-) - -diff --git a/gst/rtp/gstrtpmp4gpay.c b/gst/rtp/gstrtpmp4gpay.c -index 7913d9a..1749d39 100644 ---- a/gst/rtp/gstrtpmp4gpay.c -+++ b/gst/rtp/gstrtpmp4gpay.c -@@ -390,6 +390,7 @@ gst_rtp_mp4g_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps) - const GValue *codec_data; - const gchar *media_type = NULL; - gboolean res; -+ const gchar *name; - - rtpmp4gpay = GST_RTP_MP4G_PAY (payload); - -@@ -400,7 +401,6 @@ gst_rtp_mp4g_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps) - GST_LOG_OBJECT (rtpmp4gpay, "got codec_data"); - if (G_VALUE_TYPE (codec_data) == GST_TYPE_BUFFER) { - GstBuffer *buffer; -- const gchar *name; - - buffer = gst_value_get_buffer (codec_data); - GST_LOG_OBJECT (rtpmp4gpay, "configuring codec_data"); -@@ -426,6 +426,23 @@ gst_rtp_mp4g_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps) - - rtpmp4gpay->config = gst_buffer_copy (buffer); - } -+ } else { -+ name = gst_structure_get_name (structure); -+ -+ if (!strcmp (name, "video/mpeg")) { -+ rtpmp4gpay->profile = g_strdup ("1"); -+ -+ /* fixed rate */ -+ rtpmp4gpay->rate = 90000; -+ /* video stream type */ -+ rtpmp4gpay->streamtype = "4"; -+ /* no params for video */ -+ rtpmp4gpay->params = NULL; -+ /* mode */ -+ rtpmp4gpay->mode = "generic"; -+ -+ media_type = "video"; -+ } - } - if (media_type == NULL) - goto config_failed; --- -1.7.9.5 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-qt-include-ext-qt-gstqtgl.h-instead-of-gst-gl-gstglf.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-qt-include-ext-qt-gstqtgl.h-instead-of-gst-gl-gstglf.patch new file mode 100644 index 0000000000..788d752058 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-qt-include-ext-qt-gstqtgl.h-instead-of-gst-gl-gstglf.patch @@ -0,0 +1,56 @@ +From bf8b2fa0f6870589d036f0f33c140a3f85b530a0 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 31 Mar 2020 21:23:28 -0700 +Subject: [PATCH] qt: include ext/qt/gstqtgl.h instead of gst/gl/gstglfuncs.h + +gst/gl/gstglfuncs.h is included via ext/qt/gstqtgl.h which has logic to +prefer qt headers definitions for GLsync + +This helps in fixing build errors like below + +/mnt/b/yoe/build/tmp/work/cortexa7t2hf-neon-vfpv4-yoe-linux-gnueabi/gstreamer1.0-plugins-good/1.16.2-r0/recipe-sysroot/usr/include/QtGui/qopengles2ext.h:24:26: error: conflicting declaration 'typedef struct __GLsync* GLsync' + 24 | typedef struct __GLsync *GLsync; + | ^~~~~~ +In file included from /mnt/b/yoe/build/tmp/work/cortexa7t2hf-neon-vfpv4-yoe-linux-gnueabi/gstreamer1.0-plugins-good/1.16.2-r0/recipe-sysroot/usr/include/gstreamer-1.0/gst/gl/gstglfuncs.h:84, + from ../gst-plugins-good-1.16.2/ext/qt/gstqsgtexture.cc:30: +/mnt/b/yoe/build/tmp/work/cortexa7t2hf-neon-vfpv4-yoe-linux-gnueabi/gstreamer1.0-plugins-good/1.16.2-r0/recipe-sysroot/usr/include/gstreamer-1.0/gst/gl/glprototypes/gstgl_compat.h:40:18: note: previous declaration as 'typedef void* GLsync +' + 40 | typedef gpointer GLsync; + | ^~~~~~ + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + ext/qt/gstqsgtexture.cc | 2 +- + ext/qt/qtwindow.cc | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/ext/qt/gstqsgtexture.cc b/ext/qt/gstqsgtexture.cc +index a05d26e..4cc9fc6 100644 +--- a/ext/qt/gstqsgtexture.cc ++++ b/ext/qt/gstqsgtexture.cc +@@ -27,7 +27,7 @@ + + #include <gst/video/video.h> + #include <gst/gl/gl.h> +-#include <gst/gl/gstglfuncs.h> ++#include <ext/qt/gstqtgl.h> + #include "gstqsgtexture.h" + + #define GST_CAT_DEFAULT gst_qsg_texture_debug +diff --git a/ext/qt/qtwindow.cc b/ext/qt/qtwindow.cc +index 9360c33..0dfd3f1 100644 +--- a/ext/qt/qtwindow.cc ++++ b/ext/qt/qtwindow.cc +@@ -25,7 +25,7 @@ + #include <stdio.h> + + #include <gst/video/video.h> +-#include <gst/gl/gstglfuncs.h> ++#include <ext/qt/gstqtgl.h> + #include "qtwindow.h" + #include "gstqsgtexture.h" + #include "gstqtglutility.h" +-- +2.28.0 + diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/decrease_asteriskh263_rank.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/decrease_asteriskh263_rank.patch deleted file mode 100755 index 7f94f50760..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/decrease_asteriskh263_rank.patch +++ /dev/null @@ -1,25 +0,0 @@ -commit d71d74daac8ed54156ed103958ab455c63c72b0e -Author: Song Bing <b06498@freescale.com> -Date: Mon Nov 10 11:25:47 2014 +0800 - -[asteriskh263] decrease the rank as we havn't this kind of decoder. - -Decrease the rank as we havn't this kind of decoder. - -https://bugzilla.gnome.org/show_bug.cgi?id=739935 - -Upstream Status: Pending - -Signed-off-by: Song Bing <b06498@freescale.com> - -diff --git a/gst/rtp/gstasteriskh263.c b/gst/rtp/gstasteriskh263.c -index a01fbc8..8fa3194 100644 ---- a/gst/rtp/gstasteriskh263.c -+++ b/gst/rtp/gstasteriskh263.c -@@ -226,5 +226,5 @@ gboolean - gst_asteriskh263_plugin_init (GstPlugin * plugin) - { - return gst_element_register (plugin, "asteriskh263", -- GST_RANK_SECONDARY, GST_TYPE_ASTERISK_H263); -+ GST_RANK_SECONDARY - 1, GST_TYPE_ASTERISK_H263); - } diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.18.5.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.18.5.bb new file mode 100644 index 0000000000..ade935df9e --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.18.5.bb @@ -0,0 +1,76 @@ +require gstreamer1.0-plugins-common.inc + +DESCRIPTION = "'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 \ + " + +SRC_URI[sha256sum] = "3aaeeea7765fbf8801acce4a503a9b05f73f04e8a35352e9d00232cfd555796b" + +S = "${WORKDIR}/gst-plugins-good-${PV}" + +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)} \ + ${@bb.utils.contains('TUNE_FEATURES', 'm64', 'asm', '', 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" + +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[soup] = "-Dsoup=enabled,-Dsoup=disabled,libsoup-2.4" +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" diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.4.5.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.4.5.bb deleted file mode 100644 index 943ab60397..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.4.5.bb +++ /dev/null @@ -1,13 +0,0 @@ -include gstreamer1.0-plugins-good.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ - file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607 \ - file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe" - -SRC_URI += "file://0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch \ - file://decrease_asteriskh263_rank.patch \ -" -SRC_URI[md5sum] = "eaf1a6daf73749bc423feac301d60038" -SRC_URI[sha256sum] = "79b1b5f3f7bcaa8a615202eb5e176121eeb8336960f70687e536ad78dbc7e641" - -S = "${WORKDIR}/gst-plugins-good-${PV}" diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb deleted file mode 100644 index 2c0e0efe68..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb +++ /dev/null @@ -1,18 +0,0 @@ -DEFAULT_PREFERENCE = "-1" - -include gstreamer1.0-plugins-good.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ - file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607 \ - file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe" - -S = "${WORKDIR}/git" - -SRCREV = "fd0123800c8c1cf1468c0fa5d592ad0d0d8b4140" - -do_configure_prepend() { - cd ${S} - ./autogen.sh --noconfigure - cd ${B} -} - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc new file mode 100644 index 0000000000..e906053ac0 --- /dev/null +++ b/meta/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:prepend = " split_gstreamer10_packages " +PACKAGESPLITFUNCS:append = " 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, "") + blacklist = [ pn, pn + '-meta' ] + metapkg_rdepends = [] + pkgdest = d.getVar('PKGDEST') + for pkg in oe.utils.packages_filter_out_system(d): + if pkg not in blacklist 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/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly.inc deleted file mode 100644 index 63ba316328..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly.inc +++ /dev/null @@ -1,30 +0,0 @@ -require gstreamer1.0-plugins.inc - -LICENSE = "GPLv2+ & LGPLv2.1+ & LGPLv2+" -LICENSE_FLAGS = "commercial" - -DEPENDS += "gstreamer1.0-plugins-base libid3tag" - -inherit gettext - - -PACKAGECONFIG ??= " \ - orc a52dec lame mad mpeg2dec \ - " - -PACKAGECONFIG[a52dec] = "--enable-a52dec,--disable-a52dec,liba52" -PACKAGECONFIG[cdio] = "--enable-cdio,--disable-cdio,libcdio" -PACKAGECONFIG[dvdread] = "--enable-dvdread,--disable-dvdread,libdvdread" -PACKAGECONFIG[lame] = "--enable-lame,--disable-lame,lame" -PACKAGECONFIG[mad] = "--enable-mad,--disable-mad,libmad" -PACKAGECONFIG[mpeg2dec] = "--enable-mpeg2dec,--disable-mpeg2dec,mpeg2dec" -PACKAGECONFIG[x264] = "--enable-x264,--disable-x264,x264" - - -EXTRA_OECONF += " \ - --disable-amrnb \ - --disable-amrwb \ - --disable-sidplay \ - --disable-twolame \ - " - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.18.5.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.18.5.bb new file mode 100644 index 0000000000..9777aaee19 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.18.5.bb @@ -0,0 +1,43 @@ +require 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] = "df32803e98f8a9979373fa2ca7e05e62f977b1097576d3a80619d9f5c69f66d9" + +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/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.4.5.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.4.5.bb deleted file mode 100644 index 25cb28c060..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.4.5.bb +++ /dev/null @@ -1,10 +0,0 @@ -include gstreamer1.0-plugins-ugly.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ - file://tests/check/elements/xingmux.c;beginline=1;endline=21;md5=4c771b8af188724855cb99cadd390068 " - -SRC_URI[md5sum] = "6954beed7bb9a93e426dee543ff46393" -SRC_URI[sha256sum] = "5cd5e81cf618944f4dc935f1669b2125e8bb2fe9cc7dc8dc15b72237aca49067" - -S = "${WORKDIR}/gst-plugins-ugly-${PV}" - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb deleted file mode 100644 index dcf5ffc3c1..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb +++ /dev/null @@ -1,17 +0,0 @@ -DEFAULT_PREFERENCE = "-1" - -include gstreamer1.0-plugins-ugly.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ - file://tests/check/elements/xingmux.c;beginline=1;endline=21;md5=4c771b8af188724855cb99cadd390068 " - -S = "${WORKDIR}/git" - -SRCREV = "06b8ac10cee85c5c304ca320997aa8f44295a66f" - -do_configure_prepend() { - cd ${S} - ./autogen.sh --noconfigure - cd ${B} -} - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc deleted file mode 100644 index f1783b768b..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc +++ /dev/null @@ -1,59 +0,0 @@ -SUMMARY = "Plugins for the GStreamer multimedia framework 1.x" -HOMEPAGE = "http://gstreamer.freedesktop.org/" -BUGTRACKER = "https://bugzilla.gnome.org/enter_bug.cgi?product=Gstreamer" -SECTION = "multimedia" -DEPENDS = "gstreamer1.0" - -inherit autotools pkgconfig - -GSTREAMER_1_0_DEBUG ?= "--disable-debug" -GSTREAMER_1_0_GIT_BRANCH ?= "master" -EXTRA_OECONF = "--disable-valgrind ${GSTREAMER_1_0_DEBUG} --disable-examples " - -acpaths = "-I ${S}/common/m4 -I ${S}/m4" - -LIBV = "1.0" -require gst-plugins-package.inc - -PACKAGECONFIG[orc] = "--enable-orc,--disable-orc,orc orc-native" - -export ORCC = "${STAGING_DIR_NATIVE}${bindir}/orcc" - -PACKAGES_DYNAMIC = "^${PN}-.*" - -# apply gstreamer hack after Makefile.in.in in source is replaced by our version from -# ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in, but before configure is executed -# http://lists.linuxtogo.org/pipermail/openembedded-core/2012-November/032233.html -oe_runconf_prepend() { - if [ -e ${S}/po/Makefile.in.in ]; then - sed -i -e "1a\\" -e 'GETTEXT_PACKAGE = @GETTEXT_PACKAGE@' ${S}/po/Makefile.in.in - fi -} - -SRC_URI = "${@get_gst_srcuri(d)}" - -def get_gst_srcuri(d): - # check if expected prefix is present - prefix = "gstreamer1.0-" - bpn = d.getVar("BPN", True) - if not bpn.startswith(prefix): - bb.fatal('Invalid GStreamer 1.0 plugin package name "%s" : must start with "%s"' % (bpn, prefix)) - - # replaced prefix with "gst-", which is what is used for the tarball and repository filenames - gstpkg_basename = "gst-" + bpn[len(prefix):] - pv = d.getVar("PV", True) - branch = d.getVar("GSTREAMER_1_0_GIT_BRANCH", True) - - if pv == "git": - s = "git://anongit.freedesktop.org/gstreamer/%s;branch=%s" % (gstpkg_basename, branch) - else: - s = "http://gstreamer.freedesktop.org/src/%s/%s-%s.tar.xz" % (gstpkg_basename, gstpkg_basename, pv) - return s - -delete_liblink_m4_file() { - # This m4 file contains nastiness which conflicts with libtool 2.2.2 - rm "${S}/m4/lib-link.m4" || true -} - -do_configure[prefuncs] += " delete_liblink_m4_file " - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.18.5.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.18.5.bb new file mode 100644 index 0000000000..a32805d129 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.18.5.bb @@ -0,0 +1,34 @@ +SUMMARY = "Python bindings for GStreamer 1.0" +DESCRIPTION = "GStreamer Python binding overrides (complementing the bindings \ +provided by python-gi) " +HOMEPAGE = "http://cgit.freedesktop.org/gstreamer/gst-python/" +SECTION = "multimedia" + +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=c34deae4e395ca07e725ab0076a5f740" + +SRC_URI = "https://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz" +SRC_URI[sha256sum] = "533685871305959d6db89507f3b3aa6c765c2f2b0dacdc32c5a6543e72e5bc52" + +DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base python3-pygobject" +RDEPENDS:${PN} += "gstreamer1.0 gstreamer1.0-plugins-base python3-pygobject" + +PNREAL = "gst-python" + +S = "${WORKDIR}/${PNREAL}-${PV}" + +EXTRA_OEMESON += "-Dlibpython-dir=${libdir}" + +# gobject-introspection is mandatory and cannot be configured +REQUIRED_DISTRO_FEATURES = "gobject-introspection-data" + +inherit meson pkgconfig distutils3-base upstream-version-is-even features_check + +# Generating introspection data depends on a combination of native and target +# introspection tools, and qemu to run the target tools. +DEPENDS:append:class-target = " gobject-introspection gobject-introspection-native qemu-native prelink-native" + +# Even though introspection is disabled on -native, gobject-introspection package is still +# needed for m4 macros. +DEPENDS:append:class-native = " gobject-introspection-native" +DEPENDS:append:class-nativesdk = " gobject-introspection-native" diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server.inc deleted file mode 100644 index 28a9420f85..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server.inc +++ /dev/null @@ -1,14 +0,0 @@ -SUMMARY = "A library on top of GStreamer for building an RTSP server" -SECTION = "multimedia" -LICENSE = "LGPLv2" -HOMEPAGE = "http://cgit.freedesktop.org/gstreamer/gst-rtsp-server/" -DEPENDS = "gstreamer1.0 libcgroup gstreamer1.0-plugins-base" - -PNREAL = "gst-rtsp-server" - -SRC_URI = "http://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz" - -S = "${WORKDIR}/${PNREAL}-${PV}" - -inherit autotools pkgconfig - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.18.5.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.18.5.bb new file mode 100644 index 0000000000..50426ad46d --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.18.5.bb @@ -0,0 +1,31 @@ +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[sha256sum] = "04d63bf48816c6f41c73f6de0f912a7cef0aab39c44162a7bcece1923dfc9d1f" + +S = "${WORKDIR}/${PNREAL}-${PV}" + +inherit meson pkgconfig upstream-version-is-even gobject-introspection + +EXTRA_OEMESON += " \ + -Ddoc=disabled \ + -Dexamples=disabled \ + -Dtests=disabled \ +" + +GIR_MESON_ENABLE_FLAG = "enabled" +GIR_MESON_DISABLE_FLAG = "disabled" + +# Starting with 1.8.0 gst-rtsp-server includes dependency-less plugins as well +require gstreamer1.0-plugins-packaging.inc + +CVE_PRODUCT += "gst-rtsp-server" diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.4.5.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.4.5.bb deleted file mode 100644 index bb9b42b53f..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.4.5.bb +++ /dev/null @@ -1,6 +0,0 @@ -include gstreamer1.0-rtsp-server.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d" - -SRC_URI[md5sum] = "a9f9b8899ec7ab33663cda7627db40d3" -SRC_URI[sha256sum] = "3089254bd31b7c1f1cf2c034a3b3551f92878f9e3cab65cef3a901a04c0f1d37" diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.18.5.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.18.5.bb new file mode 100644 index 0000000000..9a68a3fadf --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.18.5.bb @@ -0,0 +1,53 @@ +SUMMARY = "VA-API support to GStreamer" +HOMEPAGE = "https://gstreamer.freedesktop.org/" +DESCRIPTION = "gstreamer-vaapi consists of a collection of VA-API \ +based plugins for GStreamer and helper libraries: `vaapidecode', \ +`vaapiconvert', and `vaapisink'." + +REALPN = "gstreamer-vaapi" + +LICENSE = "LGPLv2.1+" +LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c" + +SRC_URI = "https://gstreamer.freedesktop.org/src/${REALPN}/${REALPN}-${PV}.tar.xz" + +SRC_URI[sha256sum] = "4a460fb95559f41444eb24864ad2d9e37922b6eea941510310319fc3e0ba727b" + +S = "${WORKDIR}/${REALPN}-${PV}" +DEPENDS = "libva gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad" + +inherit meson pkgconfig features_check upstream-version-is-even + +REQUIRED_DISTRO_FEATURES ?= "opengl" + +EXTRA_OEMESON += " \ + -Ddoc=disabled \ + -Dexamples=disabled \ + -Dtests=enabled \ +" + +PACKAGES =+ "${PN}-tests" + +# OpenGL packageconfig factored out to make it easy for distros +# and BSP layers to pick either glx, egl, or no GL. By default, +# try detecting X11 first, and if found (with OpenGL), use GLX, +# otherwise try to check if EGL can be used. +PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'glx', \ + bb.utils.contains('DISTRO_FEATURES', 'opengl', 'egl', \ + '', d), d)}" + +PACKAGECONFIG ??= "drm encoders \ + ${PACKAGECONFIG_GL} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11', d)}" + +PACKAGECONFIG[drm] = "-Dwith_drm=yes,-Dwith_drm=no,udev libdrm" +PACKAGECONFIG[egl] = "-Dwith_egl=yes,-Dwith_egl=no,virtual/egl" +PACKAGECONFIG[encoders] = "-Dwith_encoders=yes,-Dwith_encoders=no" +PACKAGECONFIG[glx] = "-Dwith_glx=yes,-Dwith_glx=no,virtual/libgl" +PACKAGECONFIG[wayland] = "-Dwith_wayland=yes,-Dwith_wayland=no,wayland-native wayland wayland-protocols" +PACKAGECONFIG[x11] = "-Dwith_x11=yes,-Dwith_x11=no,virtual/libx11 libxrandr libxrender" + +FILES:${PN} += "${libdir}/gstreamer-*/*.so" +FILES:${PN}-dbg += "${libdir}/gstreamer-*/.debug" +FILES:${PN}-dev += "${libdir}/gstreamer-*/*.a" +FILES:${PN}-tests = "${bindir}/*" diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc deleted file mode 100644 index be8aa8f9cb..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc +++ /dev/null @@ -1,29 +0,0 @@ -SUMMARY = "GStreamer 1.0 multimedia framework" -DESCRIPTION = "GStreamer is a multimedia framework for encoding and decoding video and sound. \ -It supports a wide range of formats including mp3, ogg, avi, mpeg and quicktime." -HOMEPAGE = "http://gstreamer.freedesktop.org/" -BUGTRACKER = "https://bugzilla.gnome.org/enter_bug.cgi?product=Gstreamer" -SECTION = "multimedia" -LICENSE = "LGPLv2+" -DEPENDS = "glib-2.0 libxml2 bison-native flex-native" - -inherit autotools pkgconfig gettext - -PACKAGECONFIG[debug] = "--enable-debug,--disable-debug" -PACKAGECONFIG[check] = "--enable-check,--disable-check" - -EXTRA_OECONF = "--disable-docbook --disable-gtk-doc \ - --disable-dependency-tracking \ - --disable-examples --disable-tests \ - --disable-valgrind \ - " - -RRECOMMENDS_${PN}_qemux86 += "kernel-module-snd-ens1370 kernel-module-snd-rawmidi" -RRECOMMENDS_${PN}_qemux86-64 += "kernel-module-snd-ens1370 kernel-module-snd-rawmidi" - -CACHED_CONFIGUREVARS += "ac_cv_header_valgrind_valgrind_h=no" - -FILES_${PN} += " ${libdir}/gstreamer-1.0/*.so" -FILES_${PN}-dev += " ${libdir}/gstreamer-1.0/*.la ${libdir}/gstreamer-1.0/*.a" -FILES_${PN}-dbg += " ${libdir}/gstreamer-1.0/.debug/ ${libexecdir}/gstreamer-1.0/.debug/" - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-Fix-crash-with-gst-inspect.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-Fix-crash-with-gst-inspect.patch deleted file mode 100644 index 94f5cc56e8..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-Fix-crash-with-gst-inspect.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 6b26f3dbf9bf577d71534ab7410de66d06e46ba2 Mon Sep 17 00:00:00 2001 -From: Carlos Rafael Giani <dv@pseudoterminal.org> -Date: Sat, 6 Apr 2013 23:52:11 +0200 -Subject: [PATCH] Fix crash with gst-inspect Chris Lord <chris@openedhand.com> - -Upstream-Status: Pending - -Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org> ---- - tools/gst-inspect.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tools/gst-inspect.c b/tools/gst-inspect.c -index 23b7c44..b79b02e 100644 ---- a/tools/gst-inspect.c -+++ b/tools/gst-inspect.c -@@ -1556,7 +1556,7 @@ main (int argc, char *argv[]) - g_option_context_add_main_entries (ctx, options, GETTEXT_PACKAGE); - g_option_context_add_group (ctx, gst_init_get_option_group ()); - if (!g_option_context_parse (ctx, &argc, &argv, &err)) { -- g_printerr ("Error initializing: %s\n", err->message); -+ g_printerr ("Error initializing: %s\n", err ? err->message : "(null)"); - return -1; - } - g_option_context_free (ctx); --- -1.8.2 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch new file mode 100644 index 0000000000..23ebd5c600 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch @@ -0,0 +1,69 @@ +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/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-gstinfo-Shorten-__FILE__-on-all-platforms.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-gstinfo-Shorten-__FILE__-on-all-platforms.patch deleted file mode 100644 index 8213c4b8b5..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-gstinfo-Shorten-__FILE__-on-all-platforms.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 81fecd367b016e5ac4fb0c04b84da5c474f30da6 Mon Sep 17 00:00:00 2001 -From: Peter Urbanec <git.user@urbanec.net> -Date: Fri, 27 Feb 2015 01:16:58 +1100 -Subject: [PATCH 1/1] gstinfo: Shorten __FILE__ on all platforms. - -This is useful not only for MSVC, but also with gcc/Linux when doing -cross-compilation builds and out-of-tree builds. - -Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=745213] - -Signed-off-by: Peter Urbanec <git.user@urbanec.net> ---- - gst/gstinfo.c | 11 ++++------- - 1 file changed, 4 insertions(+), 7 deletions(-) - -diff --git a/gst/gstinfo.c b/gst/gstinfo.c -index b2a3005..8b61d09 100644 ---- a/gst/gstinfo.c -+++ b/gst/gstinfo.c -@@ -444,7 +444,6 @@ gst_debug_log (GstDebugCategory * category, GstDebugLevel level, - va_end (var_args); - } - --#ifdef G_OS_WIN32 - /* based on g_basename(), which we can't use because it was deprecated */ - static inline const gchar * - gst_path_basename (const gchar * file_name) -@@ -467,7 +466,6 @@ gst_path_basename (const gchar * file_name) - - return file_name; - } --#endif - - /** - * gst_debug_log_valist: -@@ -497,12 +495,11 @@ gst_debug_log_valist (GstDebugCategory * category, GstDebugLevel level, - g_return_if_fail (function != NULL); - g_return_if_fail (format != NULL); - -- /* The predefined macro __FILE__ is always the exact path given to the -- * compiler with MSVC, which may or may not be the basename. We work -- * around it at runtime to improve the readability. */ --#ifdef G_OS_WIN32 -+ /* The predefined macro __FILE__ can be an absolute path in some build -+ * environments, such as MSVC or out-of-tree cross-compiles. This may -+ * be significantly longer than the filename. We work around it at -+ * runtime to improve the readability. */ - file = gst_path_basename (file); --#endif - - message.message = NULL; - message.format = format; --- -2.3.0 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-Remove-unused-valgrind-detection.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-Remove-unused-valgrind-detection.patch new file mode 100644 index 0000000000..5121044734 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-Remove-unused-valgrind-detection.patch @@ -0,0 +1,112 @@ +From e275ba2bd854ac15a4b65a8f07d9f042021950da 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 eefd044..8252ede 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 eea1a21..d3035d6 100644 +--- a/gst/gstinfo.c ++++ b/gst/gstinfo.c +@@ -305,36 +305,6 @@ static gboolean pretty_tags = PRETTY_TAGS_DEFAULT; + static gint G_GNUC_MAY_ALIAS __default_level = GST_LEVEL_DEFAULT; + static 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")) +@@ -2505,12 +2472,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 82a1728..42ae617 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/meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-seek-Don-t-use-too-strict-timeout-for-validati.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-seek-Don-t-use-too-strict-timeout-for-validati.patch new file mode 100644 index 0000000000..e0e64e2c7a --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-seek-Don-t-use-too-strict-timeout-for-validati.patch @@ -0,0 +1,32 @@ +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/meta/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-respect-the-idententaion-used-in-meson.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-respect-the-idententaion-used-in-meson.patch new file mode 100644 index 0000000000..6f571a12d8 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-respect-the-idententaion-used-in-meson.patch @@ -0,0 +1,36 @@ +From 122e5ac3dd16a461b6ae595605490c8f5d1c3a9d 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 + +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 +--- a/tests/check/meson.build ++++ b/tests/check/meson.build +@@ -146,11 +146,11 @@ foreach t : core_tests + + if not skip_test + exe = executable(test_name, fname, +- c_args : gst_c_args + test_defines, +- cpp_args : gst_c_args + test_defines, +- include_directories : [configinc], +- link_with : link_with_libs, +- dependencies : test_deps + glib_deps + gst_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, + ) + + env = environment() +-- +2.31.1 + diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-add-support-for-install-the-tests.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-add-support-for-install-the-tests.patch new file mode 100644 index 0000000000..b77fb5797f --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-add-support-for-install-the-tests.patch @@ -0,0 +1,110 @@ +From c9e93c7a3e4d2773abef4f5e1464af24f36700b3 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 + +This will provide to run the tests using the gnome-desktop-testing [1] + +[1] https://wiki.gnome.org/Initiatives/GnomeGoals/InstalledTests + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789] + +Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> +--- + meson.build | 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 + +diff --git a/meson.build b/meson.build +index c4e8774f5..1abf4eb26 100644 +--- a/meson.build ++++ b/meson.build +@@ -562,6 +562,11 @@ if bashcomp_dep.found() + endif + endif + ++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 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -15,6 +15,7 @@ option('poisoning', type : 'boolean', value : false, description : 'Enable poiso + option('memory-alignment', type: 'combo', + choices : ['1', '2', '4', '8', '16', '32', '64', '128', '256', '512', '1024', '2048', '4096', '8192', 'malloc', 'pagesize'], + value: 'malloc') ++option('installed-tests', type : 'boolean', value : false, description : 'Enable installed tests') + + # Feature options + option('check', type : 'feature', value : 'auto', description : 'Build unit test libraries') +diff --git a/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 +--- a/tests/check/meson.build ++++ b/tests/check/meson.build +@@ -124,10 +124,16 @@ test_defines = [ + '-UG_DISABLE_ASSERT', + '-UG_DISABLE_CAST_CHECKS', + '-DGST_CHECK_TEST_ENVIRONMENT_BEACON="GST_STATE_IGNORE_ELEMENTS"', +- '-DTESTFILE="' + meson.current_source_dir() + '/meson.build"', + '-DGST_DISABLE_DEPRECATED', + ] + ++testfile = meson.current_source_dir() + '/meson.build' ++if installed_tests_enabled ++ install_data(testfile, install_dir : installed_tests_metadir, rename : 'testfile') ++ testfile = installed_tests_metadir + '/testfile' ++endif ++test_defines += '-DTESTFILE="@0@"'.format(testfile) ++ + # sanity checking + if get_option('check').disabled() + if get_option('tests').enabled() +@@ -151,6 +157,8 @@ foreach t : core_tests + include_directories : [configinc], + link_with : link_with_libs, + dependencies : test_deps + glib_deps + gst_deps, ++ install_dir: installed_tests_execdir, ++ install: installed_tests_enabled, + ) + + env = environment() +@@ -162,6 +170,18 @@ foreach t : core_tests + env.set('GST_PLUGIN_SCANNER_1_0', gst_scanner_dir + '/gst-plugin-scanner') + env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer') + ++ if installed_tests_enabled ++ test_conf = configuration_data() ++ test_conf.set('installed_tests_dir', join_paths(prefix, installed_tests_execdir)) ++ test_conf.set('program', test_name) ++ configure_file( ++ input: installed_tests_template, ++ output: test_name + '.test', ++ install_dir: installed_tests_metadir, ++ configuration: test_conf ++ ) ++ endif ++ + test(test_name, exe, env: env, timeout : 3 * 60) + endif + endforeach +-- +2.31.1 + diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0006-tests-use-a-dictionaries-for-environment.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0006-tests-use-a-dictionaries-for-environment.patch new file mode 100644 index 0000000000..46813cec3d --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0006-tests-use-a-dictionaries-for-environment.patch @@ -0,0 +1,48 @@ +From e82dedec1803922656e92285fc1bb75b2cdc0aad Mon Sep 17 00:00:00 2001 +From: Jose Quaresma <quaresma.jose@gmail.com> +Date: Sat, 24 Apr 2021 10:34:47 +0100 +Subject: [PATCH 3/4] tests: use a dictionaries for environment + +meson environment() can't be passed to configure_file and it is needed for installed_tests, +use a dictionary as this is simplest solution to install the environment. + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789] + +Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> +--- + tests/check/meson.build | 19 +++++++++++-------- + 1 file changed, 11 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 + install: installed_tests_enabled, + ) + +- env = environment() +- env.set('GST_PLUGIN_PATH_1_0', meson.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 ++ env = { ++ 'GST_PLUGIN_PATH_1_0': meson.build_root(), ++ 'GST_PLUGIN_SYSTEM_PATH_1_0': '', ++ 'GST_STATE_IGNORE_ELEMENTS': '', ++ 'CK_DEFAULT_TIMEOUT': '20', ++ 'GST_REGISTRY': '@0@/@1@.registry'.format(meson.current_build_dir(), test_name), ++ 'GST_PLUGIN_SCANNER_1_0': gst_scanner_dir + '/gst-plugin-scanner', ++ 'GST_PLUGIN_LOADING_WHITELIST': 'gstreamer', ++ } + + if installed_tests_enabled + test_conf = configuration_data() +-- +2.31.1 + diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0007-tests-install-the-environment-for-installed_tests.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0007-tests-install-the-environment-for-installed_tests.patch new file mode 100644 index 0000000000..eabe7bcbe1 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0007-tests-install-the-environment-for-installed_tests.patch @@ -0,0 +1,58 @@ +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/meta/recipes-multimedia/gstreamer/gstreamer1.0/run-ptest b/meta/recipes-multimedia/gstreamer/gstreamer1.0/run-ptest new file mode 100755 index 0000000000..0cfa955f03 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0/run-ptest @@ -0,0 +1,2 @@ +#!/usr/bin/env sh +gnome-desktop-testing-runner gstreamer diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.18.5.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.18.5.bb new file mode 100644 index 0000000000..0d82dd338c --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.18.5.bb @@ -0,0 +1,75 @@ +SUMMARY = "GStreamer 1.0 multimedia framework" +DESCRIPTION = "GStreamer is a multimedia framework for encoding and decoding video and sound. \ +It supports a wide range of formats including mp3, ogg, avi, mpeg and quicktime." +HOMEPAGE = "http://gstreamer.freedesktop.org/" +BUGTRACKER = "https://bugzilla.gnome.org/enter_bug.cgi?product=Gstreamer" +SECTION = "multimedia" +LICENSE = "LGPLv2+" + +DEPENDS = "glib-2.0 glib-2.0-native libxml2 bison-native flex-native" + +inherit meson pkgconfig gettext upstream-version-is-even gobject-introspection ptest-gnome + +LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \ + file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d" + +S = "${WORKDIR}/gstreamer-${PV}" + +SRC_URI = "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz \ + file://run-ptest \ + file://0001-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 \ + " +SRC_URI[sha256sum] = "55862232a63459bbf56abebde3085ca9aec211b478e891dacea4d6df8cafe80a" + +PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \ + check \ + debug \ + tools" + +PACKAGECONFIG[debug] = "-Dgst_debug=true,-Dgst_debug=false" +PACKAGECONFIG[tracer-hooks] = "-Dtracer_hooks=true,-Dtracer_hooks=false" +PACKAGECONFIG[coretracers] = "-Dcoretracers=enabled,-Dcoretracers=disabled" +PACKAGECONFIG[check] = "-Dcheck=enabled,-Dcheck=disabled" +PACKAGECONFIG[tests] = "-Dtests=enabled -Dinstalled-tests=true,-Dtests=disabled -Dinstalled-tests=false" +PACKAGECONFIG[unwind] = "-Dlibunwind=enabled,-Dlibunwind=disabled,libunwind" +PACKAGECONFIG[dw] = "-Dlibdw=enabled,-Dlibdw=disabled,elfutils" +PACKAGECONFIG[bash-completion] = "-Dbash-completion=enabled,-Dbash-completion=disabled,bash-completion" +PACKAGECONFIG[tools] = "-Dtools=enabled,-Dtools=disabled" +PACKAGECONFIG[setcap] = "-Dptp-helper-permissions=capabilities,,libcap libcap-native" + +# TODO: put this in a gettext.bbclass patch +def gettext_oemeson(d): + if d.getVar('USE_NLS') == 'no': + return '-Dnls=disabled' + # Remove the NLS bits if USE_NLS is no or INHIBIT_DEFAULT_DEPS is set + if d.getVar('INHIBIT_DEFAULT_DEPS') and not oe.utils.inherits(d, 'cross-canadian'): + return '-Dnls=disabled' + return '-Dnls=enabled' + +EXTRA_OEMESON += " \ + -Ddoc=disabled \ + -Dexamples=disabled \ + -Ddbghelp=disabled \ + ${@gettext_oemeson(d)} \ +" + +GIR_MESON_ENABLE_FLAG = "enabled" +GIR_MESON_DISABLE_FLAG = "disabled" + +PACKAGES += "${PN}-bash-completion" + +# Add the core element plugins to the main package +FILES:${PN} += "${libdir}/gstreamer-1.0/*.so" +FILES:${PN}-dev += "${libdir}/gstreamer-1.0/*.a ${libdir}/gstreamer-1.0/include" +FILES:${PN}-bash-completion += "${datadir}/bash-completion/completions/ ${datadir}/bash-completion/helpers/gst*" +FILES:${PN}-dbg += "${datadir}/gdb ${datadir}/gstreamer-1.0/gdb" + +CVE_PRODUCT = "gstreamer" + +PTEST_BUILD_HOST_FILES = "" diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.4.5.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.4.5.bb deleted file mode 100644 index 0a2ce86343..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.4.5.bb +++ /dev/null @@ -1,15 +0,0 @@ -include gstreamer1.0.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \ - file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d" - -SRC_URI = " \ - http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz \ - file://0001-Fix-crash-with-gst-inspect.patch \ - file://0001-gstinfo-Shorten-__FILE__-on-all-platforms.patch \ -" -SRC_URI[md5sum] = "88a9289c64a4950ebb4f544980234289" -SRC_URI[sha256sum] = "40801aa7f979024526258a0e94707ba42b8ab6f7d2206e56adbc4433155cb0ae" - -S = "${WORKDIR}/gstreamer-${PV}" - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb deleted file mode 100644 index cb00d319a7..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb +++ /dev/null @@ -1,18 +0,0 @@ -DEFAULT_PREFERENCE = "-1" - -include gstreamer1.0.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \ - file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d" - -SRC_URI = "git://anongit.freedesktop.org/gstreamer/gstreamer;branch=master" -S = "${WORKDIR}/git" - -SRCREV = "3b8181a8c550e74acaba4e8c55bdc649fa551dc9" - -do_configure_prepend() { - cd ${S} - ./autogen.sh --noconfigure - cd ${B} -} - diff --git a/meta/recipes-multimedia/lame/lame/lame-3.99.5_fix_for_automake-1.12.x.patch b/meta/recipes-multimedia/lame/lame/lame-3.99.5_fix_for_automake-1.12.x.patch deleted file mode 100644 index 571a1d07a3..0000000000 --- a/meta/recipes-multimedia/lame/lame/lame-3.99.5_fix_for_automake-1.12.x.patch +++ /dev/null @@ -1,59 +0,0 @@ -Upstream-Status: Pending - -Fix this kind of errors with automake 1.12.x: -| doc/man/Makefile.am:3: error: automatic de-ANSI-fication support has been removed -| autoreconf: automake failed with exit status: 1 - -Signed-Off-by: Nitin A Kamble <nitin.a.kamble@intel.com> -2012/07/13 - -Index: lame-3.99.5/configure.in -=================================================================== ---- lame-3.99.5.orig/configure.in -+++ lame-3.99.5/configure.in -@@ -77,9 +77,6 @@ if test "${GCC}" = "yes"; then - AC_MSG_RESULT(${GCC_version}) - fi - --dnl more automake stuff --AM_C_PROTOTYPES -- - AC_CHECK_HEADER(dmalloc.h) - if test "${ac_cv_header_dmalloc_h}" = "yes"; then - AM_WITH_DMALLOC -Index: lame-3.99.5/doc/html/Makefile.am -=================================================================== ---- lame-3.99.5.orig/doc/html/Makefile.am -+++ lame-3.99.5/doc/html/Makefile.am -@@ -1,6 +1,6 @@ - ## $Id: Makefile.am,v 1.7 2010/09/30 20:58:40 jaz001 Exp $ - --AUTOMAKE_OPTIONS = foreign ansi2knr -+AUTOMAKE_OPTIONS = foreign - - docdir = $(datadir)/doc - pkgdocdir = $(docdir)/$(PACKAGE) -Index: lame-3.99.5/libmp3lame/i386/Makefile.am -=================================================================== ---- lame-3.99.5.orig/libmp3lame/i386/Makefile.am -+++ lame-3.99.5/libmp3lame/i386/Makefile.am -@@ -1,6 +1,6 @@ - ## $Id: Makefile.am,v 1.26 2011/04/04 09:42:34 aleidinger Exp $ - --AUTOMAKE_OPTIONS = foreign $(top_srcdir)/ansi2knr -+AUTOMAKE_OPTIONS = foreign - - DEFS = @DEFS@ @CONFIG_DEFS@ - -Index: lame-3.99.5/doc/man/Makefile.am -=================================================================== ---- lame-3.99.5.orig/doc/man/Makefile.am -+++ lame-3.99.5/doc/man/Makefile.am -@@ -1,6 +1,6 @@ - ## $Id: Makefile.am,v 1.1 2000/10/22 11:39:44 aleidinger Exp $ - --AUTOMAKE_OPTIONS = foreign ansi2knr -+AUTOMAKE_OPTIONS = foreign - - man_MANS = lame.1 - EXTRA_DIST = ${man_MANS} diff --git a/meta/recipes-multimedia/lame/lame_3.99.5.bb b/meta/recipes-multimedia/lame/lame_3.100.bb index 047761153d..4927c9f2b3 100644 --- a/meta/recipes-multimedia/lame/lame_3.99.5.bb +++ b/meta/recipes-multimedia/lame/lame_3.100.bb @@ -1,30 +1,26 @@ SUMMARY = "High quality MP3 audio encoder" -HOMEPAGE = "http://lame.sourceforge.net/" +DESCRIPTION = "LAME is an educational tool to be used for learning about MP3 encoding." +HOMEPAGE = "https://lame.sourceforge.io/" BUGTRACKER = "http://sourceforge.net/tracker/?group_id=290&atid=100290" SECTION = "console/utils" LICENSE = "LGPLv2+" -LICENSE_FLAGS = "commercial" - -DEPENDS = "ncurses gettext-native" - LIC_FILES_CHKSUM = "file://COPYING;md5=c46bda00ffbb0ba1dac22f8d087f54d9 \ file://include/lame.h;beginline=1;endline=20;md5=a2258182c593c398d15a48262130a92b \ " -PR = "r1" + +DEPENDS = "ncurses gettext-native" SRC_URI = "${SOURCEFORGE_MIRROR}/lame/lame-${PV}.tar.gz \ file://no-gtk1.patch \ - file://lame-3.99.5_fix_for_automake-1.12.x.patch " + " -SRC_URI[md5sum] = "84835b313d4a8b68f5349816d33e07ce" -SRC_URI[sha256sum] = "24346b4158e4af3bd9f2e194bb23eb473c75fb7377011523353196b19b9a23ff" +SRC_URI[md5sum] = "83e260acbe4389b54fe08e0bdbf7cddb" +SRC_URI[sha256sum] = "ddfe36cab873794038ae2c1210557ad34857a4b6bdc515785d1da9e175b1da1e" inherit autotools pkgconfig PACKAGES += "libmp3lame libmp3lame-dev" -FILES_${PN} = "${bindir}/lame" -FILES_libmp3lame = "${libdir}/libmp3lame.so.*" -FILES_libmp3lame-dev = "${includedir} ${libdir}/*" -FILES_${PN}-dev = "" - -CACHED_CONFIGUREVARS_append_x86 = " ac_cv_header_emmintrin_h=no ac_cv_header_xmmintrin_h=no" +FILES:${PN} = "${bindir}/lame" +FILES:libmp3lame = "${libdir}/libmp3lame.so.*" +FILES:libmp3lame-dev = "${includedir} ${libdir}/*" +FILES:${PN}-dev = "" diff --git a/meta/recipes-multimedia/liba52/liba52_0.7.4.bb b/meta/recipes-multimedia/liba52/liba52_0.7.4.bb index 94b66b189e..ea16270cf8 100644 --- a/meta/recipes-multimedia/liba52/liba52_0.7.4.bb +++ b/meta/recipes-multimedia/liba52/liba52_0.7.4.bb @@ -1,4 +1,7 @@ SUMMARY = "ATSC A/52 surround sound stream decoder" +DESCRIPTION = "Library for decoding ATSC A/52 streams. The A/52 standard \ +is used in a variety of applications, including digital television \ +and DVD. It is also known as AC-3." HOMEPAGE = "http://liba52.sourceforge.net/" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ @@ -13,11 +16,14 @@ SRC_URI = "http://liba52.sourceforge.net/files/a52dec-${PV}.tar.gz \ SRC_URI[md5sum] = "caa9f5bc44232dc8aeea773fea56be80" SRC_URI[sha256sum] = "a21d724ab3b3933330194353687df82c475b5dfb997513eef4c25de6c865ec33" + +UPSTREAM_CHECK_URI = "http://liba52.sourceforge.net/downloads.html" + S = "${WORKDIR}/a52dec-${PV}" EXTRA_OECONF = " --enable-shared " PACKAGES =+ "a52dec a52dec-doc" -FILES_a52dec = " ${bindir}/* " -FILES_a52dec-doc = " ${mandir}/man1/* " +FILES:a52dec = " ${bindir}/* " +FILES:a52dec-doc = " ${mandir}/man1/* " diff --git a/meta/recipes-multimedia/libav/libav.inc b/meta/recipes-multimedia/libav/libav.inc deleted file mode 100644 index d3f4b1b55d..0000000000 --- a/meta/recipes-multimedia/libav/libav.inc +++ /dev/null @@ -1,146 +0,0 @@ -SUMMARY = "Open source audio and video processing tools and librairies" -DESCRIPTION = "Libav is a friendly and community-driven effort to provide its users \ - with a set of portable, functional and high-performance libraries for \ - dealing with multimedia formats of all sorts. It originates from the \ - FFmpeg codebase, but goes its own way these days, providing its users \ - with reliable releases and a clear vision how to go forward." -HOMEPAGE = "http://libav.org/" -SECTION = "libs" - -LICENSE = "GPLv2+" -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 = "http://libav.org/releases/${BP}.tar.xz" - -# Provides ffmpeg compat, see http://libav.org/about.html -PROVIDES = "ffmpeg" - -ARM_INSTRUCTION_SET = "arm" - -DEPENDS = "alsa-lib zlib libogg yasm-native" - -inherit autotools pkgconfig - -B = "${S}/build.${HOST_SYS}.${TARGET_SYS}" - -FULL_OPTIMIZATION_armv7a = "-fexpensive-optimizations -fomit-frame-pointer -O4 -ffast-math" -BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}" - -EXTRA_FFCONF_armv7a = "--cpu=cortex-a8" -EXTRA_FFCONF ?= "" - -PACKAGECONFIG ??= "bzip2 x264 theora ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" -PACKAGECONFIG[bzip2] = "--enable-bzlib,--disable-bzlib,bzip2" -PACKAGECONFIG[faac] = "--enable-libfaac,--disable-libfaac,faac" -PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm" -PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack" -PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis" -PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame" -PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl" -PACKAGECONFIG[schroedinger] = "--enable-libschroedinger,--disable-libschroedinger,schroedinger" -PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex" -PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora" -PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva" -PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx" -PACKAGECONFIG[x11] = "--enable-x11grab,--disable-x11grab,virtual/libx11 libxfixes libxext xproto virtual/libsdl" -PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264" - -# Check codecs that require --enable-nonfree -USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'faac', 'openssl' ], 'yes', '', d)}" - -EXTRA_OECONF = " \ - --enable-shared \ - --enable-pthreads \ - --enable-gpl \ - ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \ - --enable-avfilter \ - \ - --cross-prefix=${TARGET_PREFIX} \ - --prefix=${prefix} \ - \ - --enable-avserver \ - --enable-avplay \ - --ld="${CCLD}" \ - --arch=${TARGET_ARCH} \ - --target-os="linux" \ - --enable-cross-compile \ - --extra-cflags="${TARGET_CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \ - --extra-ldflags="${TARGET_LDFLAGS}" \ - --sysroot="${STAGING_DIR_TARGET}" \ - --enable-hardcoded-tables \ - ${EXTRA_FFCONF} \ - --libdir=${libdir} \ - --shlibdir=${libdir} \ -" - -do_configure() { - # We don't have TARGET_PREFIX-pkgconfig - sed -i '/pkg_config_default="${cross_prefix}${pkg_config_default}"/d' ${S}/configure - mkdir -p ${B} - cd ${B} - ${S}/configure ${EXTRA_OECONF} - sed -i -e s:Os:O4:g ${B}/config.h -} - -do_install_append() { - install -m 0644 ${S}/libavfilter/*.h ${D}${includedir}/libavfilter/ -} - -PACKAGES += "${PN}-vhook-dbg ${PN}-vhook ffmpeg-x264-presets" -PACKAGES_DYNAMIC += "^lib(av(codec|device|filter|format|util)|swscale).*" - -RSUGGESTS_${PN} = "mplayer" -FILES_${PN} = "${bindir}" -FILES_${PN}-dev = "${includedir}/${PN}" - -FILES_${PN}-vhook = "${libdir}/vhook" -FILES_${PN}-vhook-dbg += "${libdir}/vhook/.debug" - -FILES_ffmpeg-x264-presets = "${datadir}/*.avpreset" - -LEAD_SONAME = "libavcodec.so" - -FILES_${PN}-dev = "${includedir}" - -python populate_packages_prepend() { - av_libdir = d.expand('${libdir}') - av_pkgconfig = d.expand('${libdir}/pkgconfig') - - # Runtime package - do_split_packages(d, av_libdir, '^lib(.*)\.so\..*', - output_pattern='lib%s', - description='libav %s library', - extra_depends='', - prepend=True, - allow_links=True) - - # Development packages (-dev, -staticdev) - do_split_packages(d, av_libdir, '^lib(.*)\.so$', - output_pattern='lib%s-dev', - description='libav %s development package', - extra_depends='${PN}-dev', - prepend=True, - allow_links=True) - do_split_packages(d, av_pkgconfig, '^lib(.*)\.pc$', - output_pattern='lib%s-dev', - description='libav %s development package', - extra_depends='${PN}-dev', - prepend=True) - do_split_packages(d, av_libdir, '^lib(.*)\.a$', - output_pattern='lib%s-staticdev', - description='libav %s development package - static library', - extra_depends='${PN}-dev', - prepend=True, - allow_links=True) - - if d.getVar('TARGET_ARCH', True) in [ 'i586', 'i686' ]: - # libav can't be build with -fPIC for 32-bit x86 - pkgs = d.getVar('PACKAGES', True).split() - for pkg in pkgs: - d.appendVar('INSANE_SKIP_%s' % pkg, ' textrel') -} diff --git a/meta/recipes-multimedia/libav/libav/libav-fix-CVE-2014-9676.patch b/meta/recipes-multimedia/libav/libav/libav-fix-CVE-2014-9676.patch deleted file mode 100644 index 1e31caa90a..0000000000 --- a/meta/recipes-multimedia/libav/libav/libav-fix-CVE-2014-9676.patch +++ /dev/null @@ -1,98 +0,0 @@ -Upstream-Status: Backport - -Backport patch to fix CVE-2014-9676. - -https://security-tracker.debian.org/tracker/CVE-2014-9676 -https://git.libav.org/?p=libav.git;a=commit;h=b3f04657368a32a9903406395f865e230b1de348 - -Signed-off-by: Kai Kang <kai.kang@windriver.com> ---- -From b3f04657368a32a9903406395f865e230b1de348 Mon Sep 17 00:00:00 2001 -From: Luca Barbato <lu_zero@gentoo.org> -Date: Mon, 5 Jan 2015 10:40:41 +0100 -Subject: [PATCH] segment: Fix the failure paths - -A failure in segment_end() or segment_start() would lead to freeing -a dangling pointer and in general further calls to seg_write_packet() -or to seg_write_trailer() would have the same faulty behaviour. - -CC: libav-stable@libav.org -Reported-By: luodalongde@gmail.com ---- - libavformat/segment.c | 32 ++++++++++++++++++++------------ - 1 file changed, 20 insertions(+), 12 deletions(-) - -diff --git a/libavformat/segment.c b/libavformat/segment.c -index 52da6b9..bcfd1f9 100644 ---- a/libavformat/segment.c -+++ b/libavformat/segment.c -@@ -184,6 +184,13 @@ static void close_null_ctx(AVIOContext *pb) - av_free(pb); - } - -+static void seg_free_context(SegmentContext *seg) -+{ -+ avio_closep(&seg->pb); -+ avformat_free_context(seg->avf); -+ seg->avf = NULL; -+} -+ - static int seg_write_header(AVFormatContext *s) - { - SegmentContext *seg = s->priv_data; -@@ -265,12 +272,9 @@ static int seg_write_header(AVFormatContext *s) - } - - fail: -- if (ret) { -- if (seg->list) -- avio_close(seg->pb); -- if (seg->avf) -- avformat_free_context(seg->avf); -- } -+ if (ret < 0) -+ seg_free_context(seg); -+ - return ret; - } - -@@ -282,6 +286,9 @@ static int seg_write_packet(AVFormatContext *s, AVPacket *pkt) - int64_t end_pts = seg->recording_time * seg->number; - int ret, can_split = 1; - -+ if (!oc) -+ return AVERROR(EINVAL); -+ - if (seg->has_video) { - can_split = st->codec->codec_type == AVMEDIA_TYPE_VIDEO && - pkt->flags & AV_PKT_FLAG_KEY; -@@ -322,11 +329,8 @@ static int seg_write_packet(AVFormatContext *s, AVPacket *pkt) - ret = ff_write_chained(oc, pkt->stream_index, pkt, s); - - fail: -- if (ret < 0) { -- if (seg->list) -- avio_close(seg->pb); -- avformat_free_context(oc); -- } -+ if (ret < 0) -+ seg_free_context(seg); - - return ret; - } -@@ -335,7 +339,11 @@ static int seg_write_trailer(struct AVFormatContext *s) - { - SegmentContext *seg = s->priv_data; - AVFormatContext *oc = seg->avf; -- int ret; -+ int ret = 0; -+ -+ if (!oc) -+ goto fail; -+ - if (!seg->write_header_trailer) { - if ((ret = segment_end(oc, 0)) < 0) - goto fail; --- -2.4.1.314.g9532ead - diff --git a/meta/recipes-multimedia/libav/libav_9.18.bb b/meta/recipes-multimedia/libav/libav_9.18.bb deleted file mode 100644 index 210a649da4..0000000000 --- a/meta/recipes-multimedia/libav/libav_9.18.bb +++ /dev/null @@ -1,6 +0,0 @@ -require libav.inc - -SRC_URI[md5sum] = "75e838068a75fb88e1b4ea0546bc16f0" -SRC_URI[sha256sum] = "0875e835da683eef1a7bac75e1884634194149d7479d1538ba9fbe1614d066d7" - -SRC_URI += "file://libav-fix-CVE-2014-9676.patch" diff --git a/meta/recipes-multimedia/libav/libpostproc_git.bb b/meta/recipes-multimedia/libav/libpostproc_git.bb deleted file mode 100644 index 4aaa50f91d..0000000000 --- a/meta/recipes-multimedia/libav/libpostproc_git.bb +++ /dev/null @@ -1,47 +0,0 @@ -SUMMARY = "FFmpeg derived postprocessing library" -HOMEPAGE = "http://git.videolan.org/?p=libpostproc.git;a=summary" -SECTION = "libs" -DEPENDS = "libav" -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -# because it depends on libav which has commercial flag -LICENSE_FLAGS = "commercial" - -PV = "52.3.0+git${SRCPV}" - -SRCREV = "811db3b957dfde24aef2d0f82e297e5bf552d873" -SRC_URI = "git://github.com/lu-zero/postproc;protocol=https" - -S = "${WORKDIR}/git" - -inherit autotools lib_package pkgconfig - -FULL_OPTIMIZATION_armv7a = "-fexpensive-optimizations -fomit-frame-pointer -O4 -ffast-math" -BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}" - -EXTRA_FFCONF_armv7a = "--cpu=cortex-a8" -EXTRA_FFCONF ?= "" - -EXTRA_OECONF = " \ - --enable-shared \ - --enable-pthreads \ - --enable-gpl \ - --enable-postproc \ - \ - --cross-prefix=${TARGET_PREFIX} \ - --prefix=${prefix} \ - \ - --arch=${TARGET_ARCH} \ - --target-os="linux" \ - --enable-cross-compile \ - --extra-cflags="${TARGET_CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \ - --extra-ldflags="${TARGET_LDFLAGS}" \ - --sysroot="${STAGING_DIR_TARGET}" \ - --shlibdir="${libdir}" \ - ${EXTRA_FFCONF} \ -" - -do_configure() { - ${S}/configure ${EXTRA_OECONF} -} diff --git a/meta/recipes-multimedia/libid3tag/libid3tag/0001-Fix-gperf-3.1-incompatibility.patch b/meta/recipes-multimedia/libid3tag/libid3tag/0001-Fix-gperf-3.1-incompatibility.patch new file mode 100644 index 0000000000..54f49f6f23 --- /dev/null +++ b/meta/recipes-multimedia/libid3tag/libid3tag/0001-Fix-gperf-3.1-incompatibility.patch @@ -0,0 +1,40 @@ +From 91fcf66b9182c75cd2b96d88991d5a1c6307d4b4 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Wed, 2 Aug 2017 16:27:52 +0300 +Subject: [PATCH] Fix gperf 3.1 incompatibility. + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + compat.h | 2 +- + frametype.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/compat.h b/compat.h +index 8af71ec..b3d80d9 100644 +--- a/compat.h ++++ b/compat.h +@@ -34,7 +34,7 @@ struct id3_compat { + }; + + struct id3_compat const *id3_compat_lookup(register char const *, +- register unsigned int); ++ register size_t); + + int id3_compat_fixup(struct id3_tag *); + +diff --git a/frametype.h b/frametype.h +index dd064b2..b5b7593 100644 +--- a/frametype.h ++++ b/frametype.h +@@ -37,6 +37,6 @@ extern struct id3_frametype const id3_frametype_unknown; + extern struct id3_frametype const id3_frametype_obsolete; + + struct id3_frametype const *id3_frametype_lookup(register char const *, +- register unsigned int); ++ register size_t); + + # endif +-- +2.13.2 + diff --git a/meta/recipes-multimedia/libid3tag/libid3tag/10_utf16.patch b/meta/recipes-multimedia/libid3tag/libid3tag/10_utf16.patch new file mode 100644 index 0000000000..10e089018c --- /dev/null +++ b/meta/recipes-multimedia/libid3tag/libid3tag/10_utf16.patch @@ -0,0 +1,34 @@ +libid3tag: patch for CVE-2004-2779 + +The patch comes from +https://sources.debian.org/patches/libid3tag/0.15.1b-13/10_utf16.dpatch + +Upstream-Status: Pending + +CVE: CVE-2004-2779 +CVE: CVE-2017-11551 + +Signed-off-by: Changqing Li <changqing.li@windriver.com> + +diff -urNad libid3tag-0.15.1b/utf16.c /tmp/dpep.tKvO7a/libid3tag-0.15.1b/utf16.c +--- libid3tag-0.15.1b/utf16.c 2006-01-13 15:26:29.000000000 +0100 ++++ /tmp/dpep.tKvO7a/libid3tag-0.15.1b/utf16.c 2006-01-13 15:27:19.000000000 +0100 +@@ -282,5 +282,18 @@ + + free(utf16); + ++ if (end == *ptr && length % 2 != 0) ++ { ++ /* We were called with a bogus length. It should always ++ * be an even number. We can deal with this in a few ways: ++ * - Always give an error. ++ * - Try and parse as much as we can and ++ * - return an error if we're called again when we ++ * already tried to parse everything we can. ++ * - tell that we parsed it, which is what we do here. ++ */ ++ (*ptr)++; ++ } ++ + return ucs4; + } diff --git a/meta/recipes-multimedia/libid3tag/libid3tag/cflags_filter.patch b/meta/recipes-multimedia/libid3tag/libid3tag/cflags_filter.patch new file mode 100644 index 0000000000..1895748d1d --- /dev/null +++ b/meta/recipes-multimedia/libid3tag/libid3tag/cflags_filter.patch @@ -0,0 +1,19 @@ +configure contains CFLAGS filtering code which was removing our prefix-map +flags. We need those to generate reproducible binaries. Allow them through. + +Upstream-Status: Pending +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> + +--- a/configure.ac ++++ b/configure.ac +@@ -99,6 +99,10 @@ do + -mno-cygwin) + shift + ;; ++ -fmacro-prefix-map*|-fdebug-prefix-map*|-ffile-prefix-map*) ++ CFLAGS="$CFLAGS $1" ++ shift ++ ;; + -m*) + arch="$arch $1" + shift diff --git a/meta/recipes-multimedia/libid3tag/libid3tag/unknown-encoding.patch b/meta/recipes-multimedia/libid3tag/libid3tag/unknown-encoding.patch new file mode 100644 index 0000000000..f0867b5f01 --- /dev/null +++ b/meta/recipes-multimedia/libid3tag/libid3tag/unknown-encoding.patch @@ -0,0 +1,39 @@ +In case of an unknown/invalid encoding, id3_parse_string() will +return NULL, but the return value wasn't checked resulting +in segfault in id3_ucs4_length(). This is the only place +the return value wasn't checked. + +Patch taken from Debian: +https://sources.debian.org/patches/libid3tag/0.15.1b-14/11_unknown_encoding.dpatch/ + +CVE: CVE-2017-11550 +Upstream-Status: Pending +Signed-off-by: Ross Burton <ross.burton@intel.com> + +diff -urNad libid3tag-0.15.1b~/compat.gperf libid3tag-0.15.1b/compat.gperf +--- libid3tag-0.15.1b~/compat.gperf 2004-01-23 09:41:32.000000000 +0000 ++++ libid3tag-0.15.1b/compat.gperf 2007-01-14 14:36:53.000000000 +0000 +@@ -236,6 +236,10 @@ + + encoding = id3_parse_uint(&data, 1); + string = id3_parse_string(&data, end - data, encoding, 0); ++ if (!string) ++ { ++ continue; ++ } + + if (id3_ucs4_length(string) < 4) { + free(string); +diff -urNad libid3tag-0.15.1b~/parse.c libid3tag-0.15.1b/parse.c +--- libid3tag-0.15.1b~/parse.c 2004-01-23 09:41:32.000000000 +0000 ++++ libid3tag-0.15.1b/parse.c 2007-01-14 14:37:34.000000000 +0000 +@@ -165,6 +165,9 @@ + case ID3_FIELD_TEXTENCODING_UTF_8: + ucs4 = id3_utf8_deserialize(ptr, length); + break; ++ default: ++ /* FIXME: Unknown encoding! Print warning? */ ++ return NULL; + } + + if (ucs4 && !full) { diff --git a/meta/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb b/meta/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb index 05a8a47631..80581765ac 100644 --- a/meta/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb +++ b/meta/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb @@ -9,10 +9,16 @@ SECTION = "libs" DEPENDS = "zlib gperf-native" PR = "r7" -SRC_URI = "ftp://ftp.mars.org/pub/mpeg/libid3tag-${PV}.tar.gz \ +SRC_URI = "${SOURCEFORGE_MIRROR}/mad/libid3tag-${PV}.tar.gz \ file://addpkgconfig.patch \ file://obsolete_automake_macros.patch \ -" + file://0001-Fix-gperf-3.1-incompatibility.patch \ + file://10_utf16.patch \ + file://unknown-encoding.patch \ + file://cflags_filter.patch \ + " +UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/mad/files/libid3tag/" +UPSTREAM_CHECK_REGEX = "/projects/mad/files/libid3tag/(?P<pver>.*)/$" SRC_URI[md5sum] = "e5808ad997ba32c498803822078748c3" SRC_URI[sha256sum] = "63da4f6e7997278f8a3fef4c6a372d342f705051d1eeb6a46a86b03610e26151" diff --git a/meta/recipes-multimedia/libmad/libmad/add-pkgconfig.patch b/meta/recipes-multimedia/libmad/libmad/add-pkgconfig.patch deleted file mode 100644 index b49dc8c983..0000000000 --- a/meta/recipes-multimedia/libmad/libmad/add-pkgconfig.patch +++ /dev/null @@ -1,70 +0,0 @@ -Here is a patch for adding pkg-config support to libmad. -It would make life a bit easier for distro maintainers if this was applied. -In case you didn't know, pkg-config is a tool for providing LDFLAGS and -CFLAGS for packages using shared libraries. It's on freedesktop.org. -Debian has already been distributing the pkg-config file mad.pc with -libmad for some time, and people developing on debian (notably xmms2 -developers) have started relying on this support being present, causing -some confusion for people installing from source and on some BSDs which -do not provide mad.pc (google: pkgconfig libmad). - -EMH - -Upstream-Status: Inappropriate [configuration] - ---h31gzZEtNLTqOjlF -Content-Type: text/plain; charset=us-ascii -Content-Disposition: attachment; filename="libmad-0.15.1b-pkgconfig.patch" - -diff -Naur libmad-0.15.1b.old/configure.ac libmad-0.15.1b/configure.ac ---- libmad-0.15.1b.old/configure.ac 2004-01-23 10:41:32.000000000 +0100 -+++ libmad-0.15.1b/configure.ac 2004-08-07 02:25:24.633462168 +0200 -@@ -429,5 +429,5 @@ - dnl AC_SUBST(LTLIBOBJS) - - AC_CONFIG_FILES([Makefile msvc++/Makefile \ -- libmad.list]) -+ libmad.list mad.pc]) - AC_OUTPUT -diff -Naur libmad-0.15.1b.old/mad.pc.in libmad-0.15.1b/mad.pc.in ---- libmad-0.15.1b.old/mad.pc.in 1970-01-01 01:00:00.000000000 +0100 -+++ libmad-0.15.1b/mad.pc.in 2004-08-07 02:04:59.617692872 +0200 -@@ -0,0 +1,14 @@ -+# libmad pkg-config source file -+ -+prefix=@prefix@ -+exec_prefix=@exec_prefix@ -+libdir=@libdir@ -+includedir=@includedir@ -+ -+Name: mad -+Description: MPEG Audio Decoder -+Version: @VERSION@ -+Requires: -+Conflicts: -+Libs: -L${libdir} -lmad -lm -+Cflags: -I${includedir} -diff -Naur libmad-0.15.1b.old/Makefile.am libmad-0.15.1b/Makefile.am ---- libmad-0.15.1b.old/Makefile.am 2004-02-17 03:02:03.000000000 +0100 -+++ libmad-0.15.1b/Makefile.am 2004-08-07 02:03:19.859858368 +0200 -@@ -24,6 +24,9 @@ - SUBDIRS = - DIST_SUBDIRS = msvc++ - -+pkgconfigdir = $(libdir)/pkgconfig -+pkgconfig_DATA = mad.pc -+ - lib_LTLIBRARIES = libmad.la - include_HEADERS = mad.h - -@@ -34,7 +37,8 @@ - minimad_LDADD = libmad.la - - EXTRA_DIST = mad.h.sed \ -- CHANGES COPYRIGHT CREDITS README TODO VERSION -+ CHANGES COPYRIGHT CREDITS README TODO VERSION \ -+ mad.pc.in - - exported_headers = version.h fixed.h bit.h timer.h stream.h frame.h \ - synth.h decoder.h - diff --git a/meta/recipes-multimedia/libmad/libmad/automake-foreign.patch b/meta/recipes-multimedia/libmad/libmad/automake-foreign.patch deleted file mode 100644 index 3e544248d9..0000000000 --- a/meta/recipes-multimedia/libmad/libmad/automake-foreign.patch +++ /dev/null @@ -1,12 +0,0 @@ -Pass foreign to AM_INIT_AUTOMAKE so it doesn't enforce GNU strictness. - -Upstream-Status: Pending -Signed-off-by: Ross Burton <ross.burton@intel.com> - -diff --git a/configure.ac b/configure.ac -index e602fd3..e075b86 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -29 +29 @@ AC_CONFIG_SRCDIR([decoder.h]) --AM_INIT_AUTOMAKE -+AM_INIT_AUTOMAKE([foreign]) diff --git a/meta/recipes-multimedia/libmad/libmad/fix_for_mips_with_gcc-4.5.0.patch b/meta/recipes-multimedia/libmad/libmad/fix_for_mips_with_gcc-4.5.0.patch deleted file mode 100644 index 01c7aa3c8c..0000000000 --- a/meta/recipes-multimedia/libmad/libmad/fix_for_mips_with_gcc-4.5.0.patch +++ /dev/null @@ -1,33 +0,0 @@ -gcc 4.4 did this: The MIPS port no longer recognizes the h asm constraint. It was necessary to remove this constraint in order to avoid generating unpredictable code sequences. - -so the libmad build with gcc-4.5.0 was failing. - -Found a solution here: - -http://us.generation-nt.com/answer/bug-568418-libmad0-dev-mpg321-compilation-errors-mips-mipsel-architectures-help-169033451.html - -Upstream-Status: Pending - -2010/07/29 -Nitin A Kamble <nitin.a.kamble@intel.com> - -Index: libmad-0.15.1b/fixed.h -=================================================================== ---- libmad-0.15.1b.orig/fixed.h -+++ libmad-0.15.1b/fixed.h -@@ -297,6 +297,15 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t - - /* --- MIPS ---------------------------------------------------------------- */ - -+# elif defined(FPM_MIPS) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -+ typedef unsigned int u64_di_t __attribute__ ((mode (DI))); -+# define MAD_F_MLX(hi, lo, x, y) \ -+ do { \ -+ u64_di_t __ll = (u64_di_t) (x) * (y); \ -+ hi = __ll >> 32; \ -+ lo = __ll; \ -+ } while (0) -+ - # elif defined(FPM_MIPS) - - /* diff --git a/meta/recipes-multimedia/libmad/libmad/no-force-mem.patch b/meta/recipes-multimedia/libmad/libmad/no-force-mem.patch deleted file mode 100644 index d5e6d206e2..0000000000 --- a/meta/recipes-multimedia/libmad/libmad/no-force-mem.patch +++ /dev/null @@ -1,18 +0,0 @@ -This option no longer exists in gcc 3.4.1 - -RP - 18/07/2008 - -Upstream-Status: Inappropriate [configuration] - -Index: libmad-0.15.1b/configure.ac -=================================================================== ---- libmad-0.15.1b.orig/configure.ac 2008-07-18 15:45:30.000000000 +0100 -+++ libmad-0.15.1b/configure.ac 2008-07-18 15:45:37.000000000 +0100 -@@ -140,7 +140,6 @@ - case "$optimize" in - -O|"-O "*) - optimize="-O" -- optimize="$optimize -fforce-mem" - optimize="$optimize -fforce-addr" - : #x optimize="$optimize -finline-functions" - : #- optimize="$optimize -fstrength-reduce" diff --git a/meta/recipes-multimedia/libmad/libmad/obsolete_automake_macros.patch b/meta/recipes-multimedia/libmad/libmad/obsolete_automake_macros.patch deleted file mode 100644 index cc87d299ed..0000000000 --- a/meta/recipes-multimedia/libmad/libmad/obsolete_automake_macros.patch +++ /dev/null @@ -1,14 +0,0 @@ -Upstream-Status: Submitted [https://sourceforge.net/tracker/?group_id=12349&atid=112349] - -Signed-off-by: Marko Lindqvist <cazfi74@gmail.com> -diff -Nurd libmad-0.15.1b/configure.ac libmad-0.15.1b/configure.ac ---- libmad-0.15.1b/configure.ac 2004-01-23 11:41:32.000000000 +0200 -+++ libmad-0.15.1b/configure.ac 2013-01-03 08:28:23.718693697 +0200 -@@ -28,7 +28,7 @@ - - AM_INIT_AUTOMAKE - --AM_CONFIG_HEADER([config.h]) -+AC_CONFIG_HEADERS([config.h]) - - dnl System type. diff --git a/meta/recipes-multimedia/libmad/libmad_0.15.1b.bb b/meta/recipes-multimedia/libmad/libmad_0.15.1b.bb deleted file mode 100644 index 9e08b16da9..0000000000 --- a/meta/recipes-multimedia/libmad/libmad_0.15.1b.bb +++ /dev/null @@ -1,38 +0,0 @@ -SUMMARY = "MPEG Audio Decoder library" -HOMEPAGE = "http://sourceforge.net/projects/mad/" -BUGTRACKER = "http://sourceforge.net/tracker/?group_id=12349&atid=112349" -LICENSE = "GPLv2+" -LICENSE_FLAGS = "commercial" -LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ - file://COPYRIGHT;md5=8e55eb14894e782b84488d5a239bc23d \ - file://version.h;beginline=1;endline=8;md5=aa07311dd39288d4349f28e1de516454" -SECTION = "libs" -DEPENDS = "libid3tag" -PR = "r3" - -SRC_URI = "ftp://ftp.mars.org/pub/mpeg/libmad-${PV}.tar.gz \ - file://no-force-mem.patch \ - file://add-pkgconfig.patch \ - file://fix_for_mips_with_gcc-4.5.0.patch \ - file://obsolete_automake_macros.patch \ - file://automake-foreign.patch \ -" - -SRC_URI[md5sum] = "1be543bc30c56fb6bea1d7bf6a64e66c" -SRC_URI[sha256sum] = "bbfac3ed6bfbc2823d3775ebb931087371e142bb0e9bb1bee51a76a6e0078690" - -S = "${WORKDIR}/libmad-${PV}" - -inherit autotools pkgconfig - -EXTRA_OECONF = "-enable-speed --enable-shared" -# The ASO's don't take any account of thumb... -EXTRA_OECONF_append_thumb = " --disable-aso --enable-fpm=default" -EXTRA_OECONF_append_arm = " --enable-fpm=arm" - -do_configure_prepend () { -# damn picky automake... - touch NEWS AUTHORS ChangeLog -} - -ARM_INSTRUCTION_SET = "arm" diff --git a/meta/recipes-multimedia/libogg/libogg_1.3.2.bb b/meta/recipes-multimedia/libogg/libogg_1.3.5.bb index 0142e0f4f8..b4f02e404c 100644 --- a/meta/recipes-multimedia/libogg/libogg_1.3.2.bb +++ b/meta/recipes-multimedia/libogg/libogg_1.3.5.bb @@ -5,13 +5,13 @@ necessary to codec libraries like libvorbis." HOMEPAGE = "http://xiph.org/" BUGTRACKER = "https://trac.xiph.org/newticket" SECTION = "libs" -LICENSE = "BSD" +LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://COPYING;md5=db1b7a668b2a6f47b2af88fb008ad555 \ file://include/ogg/ogg.h;beginline=1;endline=11;md5=eda812856f13a3b1326eb8f020cc3b0b" SRC_URI = "http://downloads.xiph.org/releases/ogg/${BP}.tar.xz" -SRC_URI[md5sum] = "5c3a34309d8b98640827e5d0991a4015" -SRC_URI[sha256sum] = "3f687ccdd5ac8b52d76328fbbfebc70c459a40ea891dbf3dccb74a210826e79b" +SRC_URI[md5sum] = "3178c98341559657a15b185bf5d700a5" +SRC_URI[sha256sum] = "c4d91be36fc8e54deae7575241e03f4211eb102afb3fc0775fbbc1b740016705" inherit autotools pkgconfig diff --git a/meta/recipes-multimedia/libomxil/libomxil_0.9.3.bb b/meta/recipes-multimedia/libomxil/libomxil_0.9.3.bb index 40d6df8b6a..864d6bbeea 100644 --- a/meta/recipes-multimedia/libomxil/libomxil_0.9.3.bb +++ b/meta/recipes-multimedia/libomxil/libomxil_0.9.3.bb @@ -4,7 +4,7 @@ DESCRIPTION = "Bellagio is an opensource implementation of the Khronos OpenMAX \ HOMEPAGE = "http://omxil.sourceforge.net/" LICENSE = "LGPLv2.1+" -LICENSE_FLAGS = "commercial" +LICENSE_FLAGS = "${@bb.utils.contains('PACKAGECONFIG', 'amr', 'commercial', '', d)}" LIC_FILES_CHKSUM = "file://COPYING;md5=ae6f0f4dbc7ac193b50f323a6ae191cb \ file://src/omxcore.h;beginline=1;endline=27;md5=806b1e5566c06486fe8e42b461e03a90" @@ -24,16 +24,22 @@ inherit autotools EXTRA_OECONF += "--disable-doc --disable-Werror" +PROVIDES += "virtual/libomxil" + +CFLAGS += "-fcommon" + +PACKAGECONFIG ??= "" + +PACKAGECONFIG[amr] = "--enable-amr,," + # # The .so files under ${libdir}/bellagio are not intended to be versioned and symlinked. # Make sure they get packaged in the main package. # -FILES_${PN} += "${libdir}/bellagio/*.so \ +FILES:${PN} += "${libdir}/bellagio/*.so \ ${libdir}/omxloaders/*${SOLIBS}" -FILES_${PN}-staticdev += "${libdir}/bellagio/*.a \ +FILES:${PN}-staticdev += "${libdir}/bellagio/*.a \ ${libdir}/omxloaders/*.a" -FILES_${PN}-dev += "${libdir}/bellagio/*.la \ +FILES:${PN}-dev += "${libdir}/bellagio/*.la \ ${libdir}/omxloaders/*.la \ ${libdir}/omxloaders/*${SOLIBSDEV}" -FILES_${PN}-dbg += "${libdir}/bellagio/.debug/ \ - ${libdir}/omxloaders/.debug/" diff --git a/meta/recipes-multimedia/libpng/libpng_1.6.17.bb b/meta/recipes-multimedia/libpng/libpng_1.6.17.bb deleted file mode 100644 index 00e5808b98..0000000000 --- a/meta/recipes-multimedia/libpng/libpng_1.6.17.bb +++ /dev/null @@ -1,27 +0,0 @@ -SUMMARY = "PNG image format decoding library" -HOMEPAGE = "http://www.libpng.org/" -SECTION = "libs" -LICENSE = "Libpng" -LIC_FILES_CHKSUM = "file://LICENSE;md5=b9b75399b72e4a8656cf3a6ddfc86d9a \ - file://png.h;endline=16;md5=cc9c2d1eafda17e1277a6f99a9fc29c4 \ - file://png.h;beginline=242;endline=356;md5=599316819d525dde2bfdf28fe3f323af" -DEPENDS = "zlib" -LIBV = "16" - -SRC_URI = "${SOURCEFORGE_MIRROR}/project/libpng/libpng${LIBV}/${PV}/libpng-${PV}.tar.xz \ - " -SRC_URI[md5sum] = "430a9b76b78533235cd4b9b26ce75c7e" -SRC_URI[sha256sum] = "98507b55fbe5cd43c51981f2924e4671fd81fe35d52dc53357e20f2c77fa5dfd" - -BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config" - -inherit autotools binconfig-disabled pkgconfig - -# Work around missing symbols -EXTRA_OECONF_append_class-target = " ${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off" ,d)}" - -PACKAGES =+ "${PN}-tools" - -FILES_${PN}-tools = "${bindir}/png-fix-itxt ${bindir}/pngfix" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-multimedia/libpng/libpng_1.6.37.bb b/meta/recipes-multimedia/libpng/libpng_1.6.37.bb new file mode 100644 index 0000000000..7791b0eecf --- /dev/null +++ b/meta/recipes-multimedia/libpng/libpng_1.6.37.bb @@ -0,0 +1,35 @@ +SUMMARY = "PNG image format decoding library" +DESCRIPTION = "An open source project to develop and maintain the reference \ +library for use in applications that read, create, and manipulate PNG \ +(Portable Network Graphics) raster image files. " +HOMEPAGE = "http://www.libpng.org/" +SECTION = "libs" +LICENSE = "Libpng" +LIC_FILES_CHKSUM = "file://LICENSE;md5=b0085051bf265bac2bfc38bc89f50000" +DEPENDS = "zlib" + +LIBV = "16" + +SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}${LIBV}/${BP}.tar.xz" +SRC_URI[md5sum] = "015e8e15db1eecde5f2eb9eb5b6e59e9" +SRC_URI[sha256sum] = "505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca" + +MIRRORS += "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}${LIBV}/ ${SOURCEFORGE_MIRROR}/${BPN}/${BPN}${LIBV}/older-releases/" + +UPSTREAM_CHECK_URI = "http://libpng.org/pub/png/libpng.html" + +BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config" + +inherit autotools binconfig-disabled pkgconfig + +# Work around missing symbols +EXTRA_OECONF:append:class-target = " ${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off", d)}" + +PACKAGES =+ "${PN}-tools" + +FILES:${PN}-tools = "${bindir}/png-fix-itxt ${bindir}/pngfix ${bindir}/pngcp" + +BBCLASSEXTEND = "native nativesdk" + +# CVE-2019-17371 is actually a memory leak in gif2png 2.x +CVE_CHECK_WHITELIST += "CVE-2019-17371" diff --git a/meta/recipes-multimedia/libsamplerate/libsamplerate0/0001-configure.ac-improve-alsa-handling.patch b/meta/recipes-multimedia/libsamplerate/libsamplerate0/0001-configure.ac-improve-alsa-handling.patch new file mode 100644 index 0000000000..d19b514e6b --- /dev/null +++ b/meta/recipes-multimedia/libsamplerate/libsamplerate0/0001-configure.ac-improve-alsa-handling.patch @@ -0,0 +1,62 @@ +From 957ebce3837588f71016e37ffaf9aad0a9d41cec Mon Sep 17 00:00:00 2001 +From: Tanu Kaskinen <tanuk@iki.fi> +Date: Fri, 23 Sep 2016 12:02:06 +0300 +Subject: [PATCH] configure.ac: improve alsa handling + +Three improvements: + +1) "--enable-alsa" or "--disable-alsa" caused a warning about an +unsupported configure option, because AC_ARG_ENABLE was not used. + +2) If alsa was disabled, the "Have ALSA" item in the summary would print +an empty string instead of "no". + +3) If "--enable-alsa" was passed to configure, but the headers were not +found, configure would still succeed (with alsa disabled). It's better +to fail and abort configure if a feature that was explicitly requested +can't be enabled. + +Upstream-Status: Submitted [sent to src@mega-nerd.com] + +Signed-off-by: Tanu Kaskinen <tanuk@iki.fi> +--- + configure.ac | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 474c6ab..bad597e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -101,6 +101,9 @@ AC_ARG_ENABLE(cpu-clip, + AC_HELP_STRING([--disable-cpu-clip], [disable tricky cpu specific clipper]), + ac_arg_cpu_clip="N", ac_arg_cpu_clip="Y") + ++AC_ARG_ENABLE(alsa, ++ AC_HELP_STRING([--disable-alsa], [disable ALSA support in the varispeed-play example program])) ++ + #==================================================================================== + # Check types and their sizes. + +@@ -194,6 +197,10 @@ if test x$enable_alsa != xno ; then + if test x$ac_cv_header_alsa_asoundlib_h = xyes ; then + ALSA_LIBS="-lasound" + enable_alsa=yes ++ elif test x$enable_alsa = xyes ; then ++ AC_MSG_ERROR(["ALSA headers not found"]) ++ else ++ enable_alsa=no + fi + fi + +@@ -340,7 +347,7 @@ AC_MSG_RESULT([ + Have FFTW : ................... ${ac_cv_fftw3}]) + + AC_MSG_RESULT([ Have libsndfile : ............. ${ac_cv_sndfile}]) +-AC_MSG_RESULT([ Have ALSA : ................... ${ac_cv_header_alsa_asoundlib_h} ++AC_MSG_RESULT([ Have ALSA : ................... ${enable_alsa} + ]) + + AC_MSG_RESULT([ Installation directories : +-- +2.9.3 + diff --git a/meta/recipes-multimedia/libsamplerate/libsamplerate0/shared_version_info.patch b/meta/recipes-multimedia/libsamplerate/libsamplerate0/shared_version_info.patch new file mode 100644 index 0000000000..b42d564b4b --- /dev/null +++ b/meta/recipes-multimedia/libsamplerate/libsamplerate0/shared_version_info.patch @@ -0,0 +1,13 @@ +Index: libsamplerate-0.1.8/configure.ac +=================================================================== +--- libsamplerate-0.1.8.orig/configure.ac ++++ libsamplerate-0.1.8/configure.ac +@@ -53,7 +53,7 @@ AC_PROG_LN_S + # 6. If any interfaces have been removed since the last public release, then set age + # to 0. + +-SHARED_VERSION_INFO="1:8:1" ++SHARED_VERSION_INFO="1:9:1" + + + diff --git a/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.1.8.bb b/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.1.8.bb deleted file mode 100644 index f06935c8ba..0000000000 --- a/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.1.8.bb +++ /dev/null @@ -1,18 +0,0 @@ -SUMMARY = "Audio Sample Rate Conversion library" -HOMEPAGE = "http://www.mega-nerd.com/SRC/" -SECTION = "libs" -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ - file://src/samplerate.c;beginline=1;endline=17;md5=d0807c35fc906466d24a50463534815a" -DEPENDS = "flac libsndfile1" -PR = "r1" - -SRC_URI = "http://www.mega-nerd.com/SRC/libsamplerate-${PV}.tar.gz" - -SRC_URI[md5sum] = "1c7fb25191b4e6e3628d198a66a84f47" -SRC_URI[sha256sum] = "93b54bdf46d5e6d2354b7034395fe329c222a966790de34520702bb9642f1c06" -S = "${WORKDIR}/libsamplerate-${PV}" - -inherit autotools pkgconfig - -PACKAGECONFIG[fftw] = ",--disable-fftw,fftw" diff --git a/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.1.9.bb b/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.1.9.bb new file mode 100644 index 0000000000..8345d6880f --- /dev/null +++ b/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.1.9.bb @@ -0,0 +1,30 @@ +SUMMARY = "Audio Sample Rate Conversion library" +DESCRIPTION = "Also known as Secret Rabbit Code - a library for performing sample rate conversion of audio data." +HOMEPAGE = "http://www.mega-nerd.com/SRC/" +SECTION = "libs" +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://COPYING;md5=336d6faf40fb600bafb0061f4052f1f4 \ + file://src/samplerate.c;beginline=1;endline=7;md5=5b6982a8c2811c7312c13cccbf55f55e" +DEPENDS = "libsndfile1" +PR = "r1" + +SRC_URI = "http://www.mega-nerd.com/SRC/libsamplerate-${PV}.tar.gz \ + file://0001-configure.ac-improve-alsa-handling.patch \ + file://shared_version_info.patch \ +" + +SRC_URI[md5sum] = "2b78ae9fe63b36b9fbb6267fad93f259" +SRC_URI[sha256sum] = "0a7eb168e2f21353fb6d84da152e4512126f7dc48ccb0be80578c565413444c1" + +CVE_PRODUCT = "libsamplerate" + +UPSTREAM_CHECK_URI = "http://www.mega-nerd.com/SRC/download.html" + +S = "${WORKDIR}/libsamplerate-${PV}" + +inherit autotools pkgconfig + +# FFTW and ALSA are only used in tests and examples, so they don't affect +# normal builds. It should be safe to ignore these, but explicitly disabling +# them adds some extra certainty that builds are deterministic. +EXTRA_OECONF = "--disable-fftw --disable-alsa" diff --git a/meta/recipes-multimedia/libsndfile/files/0001-src-sd2.c-Fix-segfault-in-SD2-RSRC-parser.patch b/meta/recipes-multimedia/libsndfile/files/0001-src-sd2.c-Fix-segfault-in-SD2-RSRC-parser.patch deleted file mode 100644 index cd48710fb7..0000000000 --- a/meta/recipes-multimedia/libsndfile/files/0001-src-sd2.c-Fix-segfault-in-SD2-RSRC-parser.patch +++ /dev/null @@ -1,211 +0,0 @@ -From 9341e9c6e70cd3ad76c901c3cf052d4cb52fd827 Mon Sep 17 00:00:00 2001 -From: Erik de Castro Lopo <erikd@mega-nerd.com> -Date: Thu, 27 Jun 2013 18:04:03 +1000 -Subject: [PATCH] src/sd2.c : Fix segfault in SD2 RSRC parser. - -(Upstream commit 9341e9c6e70cd3ad76c901c3cf052d4cb52fd827) - -A specially crafted resource fork for an SD2 file can cause -the SD2 RSRC parser to read data from outside a dynamically -defined buffer. The data that is read is converted into a -short or int and used during further processing. - -Since no write occurs, this is unlikely to be exploitable. - -Bug reported by The Mayhem Team from Cylab, Carnegie Mellon -Univeristy. Paper is: -http://users.ece.cmu.edu/~arebert/papers/mayhem-oakland-12.pdf - -Upstream-Status: Backport - -Signed-off-by: Yue Tao <yue.tao@windriver.com> ---- - src/sd2.c | 93 ++++++++++++++++++++++++++++++++++++------------------------- - 1 file changed, 55 insertions(+), 38 deletions(-) - -diff --git a/src/sd2.c b/src/sd2.c -index 35ce36b..6be150c 100644 ---- a/src/sd2.c -+++ b/src/sd2.c -@@ -1,5 +1,5 @@ - /* --** Copyright (C) 2001-2011 Erik de Castro Lopo <erikd@mega-nerd.com> -+** Copyright (C) 2001-2013 Erik de Castro Lopo <erikd@mega-nerd.com> - ** Copyright (C) 2004 Paavo Jumppanen - ** - ** This program is free software; you can redistribute it and/or modify -@@ -371,44 +371,61 @@ sd2_write_rsrc_fork (SF_PRIVATE *psf, int UNUSED (calc_length)) - */ - - static inline int --read_char (const unsigned char * data, int offset) --{ return data [offset] ; --} /* read_char */ -+read_rsrc_char (const SD2_RSRC *prsrc, int offset) -+{ const unsigned char * data = prsrc->rsrc_data ; -+ if (offset < 0 || offset >= prsrc->rsrc_len) -+ return 0 ; -+ return data [offset] ; -+} /* read_rsrc_char */ - - static inline int --read_short (const unsigned char * data, int offset) --{ return (data [offset] << 8) + data [offset + 1] ; --} /* read_short */ -+read_rsrc_short (const SD2_RSRC *prsrc, int offset) -+{ const unsigned char * data = prsrc->rsrc_data ; -+ if (offset < 0 || offset + 1 >= prsrc->rsrc_len) -+ return 0 ; -+ return (data [offset] << 8) + data [offset + 1] ; -+} /* read_rsrc_short */ - - static inline int --read_int (const unsigned char * data, int offset) --{ return (data [offset] << 24) + (data [offset + 1] << 16) + (data [offset + 2] << 8) + data [offset + 3] ; --} /* read_int */ -+read_rsrc_int (const SD2_RSRC *prsrc, int offset) -+{ const unsigned char * data = prsrc->rsrc_data ; -+ if (offset < 0 || offset + 3 >= prsrc->rsrc_len) -+ return 0 ; -+ return (data [offset] << 24) + (data [offset + 1] << 16) + (data [offset + 2] << 8) + data [offset + 3] ; -+} /* read_rsrc_int */ - - static inline int --read_marker (const unsigned char * data, int offset) --{ -+read_rsrc_marker (const SD2_RSRC *prsrc, int offset) -+{ const unsigned char * data = prsrc->rsrc_data ; -+ -+ if (offset < 0 || offset + 3 >= prsrc->rsrc_len) -+ return 0 ; -+ - if (CPU_IS_BIG_ENDIAN) - return (data [offset] << 24) + (data [offset + 1] << 16) + (data [offset + 2] << 8) + data [offset + 3] ; -- else if (CPU_IS_LITTLE_ENDIAN) -+ if (CPU_IS_LITTLE_ENDIAN) - return data [offset] + (data [offset + 1] << 8) + (data [offset + 2] << 16) + (data [offset + 3] << 24) ; -- else -- return 0x666 ; --} /* read_marker */ -+ -+ return 0 ; -+} /* read_rsrc_marker */ - - static void --read_str (const unsigned char * data, int offset, char * buffer, int buffer_len) --{ int k ; -+read_rsrc_str (const SD2_RSRC *prsrc, int offset, char * buffer, int buffer_len) -+{ const unsigned char * data = prsrc->rsrc_data ; -+ int k ; - - memset (buffer, 0, buffer_len) ; - -+ if (offset < 0 || offset + buffer_len >= prsrc->rsrc_len) -+ return ; -+ - for (k = 0 ; k < buffer_len - 1 ; k++) - { if (psf_isprint (data [offset + k]) == 0) - return ; - buffer [k] = data [offset + k] ; - } ; - return ; --} /* read_str */ -+} /* read_rsrc_str */ - - static int - sd2_parse_rsrc_fork (SF_PRIVATE *psf) -@@ -435,17 +452,17 @@ sd2_parse_rsrc_fork (SF_PRIVATE *psf) - /* Reset the header storage because we have changed to the rsrcdes. */ - psf->headindex = psf->headend = rsrc.rsrc_len ; - -- rsrc.data_offset = read_int (rsrc.rsrc_data, 0) ; -- rsrc.map_offset = read_int (rsrc.rsrc_data, 4) ; -- rsrc.data_length = read_int (rsrc.rsrc_data, 8) ; -- rsrc.map_length = read_int (rsrc.rsrc_data, 12) ; -+ rsrc.data_offset = read_rsrc_int (&rsrc, 0) ; -+ rsrc.map_offset = read_rsrc_int (&rsrc, 4) ; -+ rsrc.data_length = read_rsrc_int (&rsrc, 8) ; -+ rsrc.map_length = read_rsrc_int (&rsrc, 12) ; - - if (rsrc.data_offset == 0x51607 && rsrc.map_offset == 0x20000) - { psf_log_printf (psf, "Trying offset of 0x52 bytes.\n") ; -- rsrc.data_offset = read_int (rsrc.rsrc_data, 0x52 + 0) + 0x52 ; -- rsrc.map_offset = read_int (rsrc.rsrc_data, 0x52 + 4) + 0x52 ; -- rsrc.data_length = read_int (rsrc.rsrc_data, 0x52 + 8) ; -- rsrc.map_length = read_int (rsrc.rsrc_data, 0x52 + 12) ; -+ rsrc.data_offset = read_rsrc_int (&rsrc, 0x52 + 0) + 0x52 ; -+ rsrc.map_offset = read_rsrc_int (&rsrc, 0x52 + 4) + 0x52 ; -+ rsrc.data_length = read_rsrc_int (&rsrc, 0x52 + 8) ; -+ rsrc.map_length = read_rsrc_int (&rsrc, 0x52 + 12) ; - } ; - - psf_log_printf (psf, " data offset : 0x%04X\n map offset : 0x%04X\n" -@@ -488,7 +505,7 @@ sd2_parse_rsrc_fork (SF_PRIVATE *psf) - goto parse_rsrc_fork_cleanup ; - } ; - -- rsrc.string_offset = rsrc.map_offset + read_short (rsrc.rsrc_data, rsrc.map_offset + 26) ; -+ rsrc.string_offset = rsrc.map_offset + read_rsrc_short (&rsrc, rsrc.map_offset + 26) ; - if (rsrc.string_offset > rsrc.rsrc_len) - { psf_log_printf (psf, "Bad string offset (%d).\n", rsrc.string_offset) ; - error = SFE_SD2_BAD_RSRC ; -@@ -497,7 +514,7 @@ sd2_parse_rsrc_fork (SF_PRIVATE *psf) - - rsrc.type_offset = rsrc.map_offset + 30 ; - -- rsrc.type_count = read_short (rsrc.rsrc_data, rsrc.map_offset + 28) + 1 ; -+ rsrc.type_count = read_rsrc_short (&rsrc, rsrc.map_offset + 28) + 1 ; - if (rsrc.type_count < 1) - { psf_log_printf (psf, "Bad type count.\n") ; - error = SFE_SD2_BAD_RSRC ; -@@ -513,11 +530,11 @@ sd2_parse_rsrc_fork (SF_PRIVATE *psf) - - rsrc.str_index = -1 ; - for (k = 0 ; k < rsrc.type_count ; k ++) -- { marker = read_marker (rsrc.rsrc_data, rsrc.type_offset + k * 8) ; -+ { marker = read_rsrc_marker (&rsrc, rsrc.type_offset + k * 8) ; - - if (marker == STR_MARKER) - { rsrc.str_index = k ; -- rsrc.str_count = read_short (rsrc.rsrc_data, rsrc.type_offset + k * 8 + 4) + 1 ; -+ rsrc.str_count = read_rsrc_short (&rsrc, rsrc.type_offset + k * 8 + 4) + 1 ; - error = parse_str_rsrc (psf, &rsrc) ; - goto parse_rsrc_fork_cleanup ; - } ; -@@ -549,26 +566,26 @@ parse_str_rsrc (SF_PRIVATE *psf, SD2_RSRC * rsrc) - for (k = 0 ; data_offset + data_len < rsrc->rsrc_len ; k++) - { int slen ; - -- slen = read_char (rsrc->rsrc_data, str_offset) ; -- read_str (rsrc->rsrc_data, str_offset + 1, name, SF_MIN (SIGNED_SIZEOF (name), slen + 1)) ; -+ slen = read_rsrc_char (rsrc, str_offset) ; -+ read_rsrc_str (rsrc, str_offset + 1, name, SF_MIN (SIGNED_SIZEOF (name), slen + 1)) ; - str_offset += slen + 1 ; - -- rsrc_id = read_short (rsrc->rsrc_data, rsrc->item_offset + k * 12) ; -+ rsrc_id = read_rsrc_short (rsrc, rsrc->item_offset + k * 12) ; - -- data_offset = rsrc->data_offset + read_int (rsrc->rsrc_data, rsrc->item_offset + k * 12 + 4) ; -+ data_offset = rsrc->data_offset + read_rsrc_int (rsrc, rsrc->item_offset + k * 12 + 4) ; - if (data_offset < 0 || data_offset > rsrc->rsrc_len) - { psf_log_printf (psf, "Exiting parser on data offset of %d.\n", data_offset) ; - break ; - } ; - -- data_len = read_int (rsrc->rsrc_data, data_offset) ; -+ data_len = read_rsrc_int (rsrc, data_offset) ; - if (data_len < 0 || data_len > rsrc->rsrc_len) - { psf_log_printf (psf, "Exiting parser on data length of %d.\n", data_len) ; - break ; - } ; - -- slen = read_char (rsrc->rsrc_data, data_offset + 4) ; -- read_str (rsrc->rsrc_data, data_offset + 5, value, SF_MIN (SIGNED_SIZEOF (value), slen + 1)) ; -+ slen = read_rsrc_char (rsrc, data_offset + 4) ; -+ read_rsrc_str (rsrc, data_offset + 5, value, SF_MIN (SIGNED_SIZEOF (value), slen + 1)) ; - - psf_log_printf (psf, " 0x%04x %4d %4d %3d '%s'\n", data_offset, rsrc_id, data_len, slen, value) ; - --- -1.7.9.5 - diff --git a/meta/recipes-multimedia/libsndfile/files/0001-src-sd2.c-Fix-two-potential-buffer-read-overflows.patch b/meta/recipes-multimedia/libsndfile/files/0001-src-sd2.c-Fix-two-potential-buffer-read-overflows.patch deleted file mode 100644 index fa6473d4f8..0000000000 --- a/meta/recipes-multimedia/libsndfile/files/0001-src-sd2.c-Fix-two-potential-buffer-read-overflows.patch +++ /dev/null @@ -1,49 +0,0 @@ -From dbe14f00030af5d3577f4cabbf9861db59e9c378 Mon Sep 17 00:00:00 2001 -From: Erik de Castro Lopo <erikd@mega-nerd.com> -Date: Thu, 25 Dec 2014 19:23:12 +1100 -Subject: [PATCH] src/sd2.c : Fix two potential buffer read overflows. - -(Upstream commit dbe14f00030af5d3577f4cabbf9861db59e9c378) - -Closes: https://github.com/erikd/libsndfile/issues/93 - -Upstream-Status: Backport - -Signed-off-by: Yue Tao <yue.tao@windriver.com> ---- - src/sd2.c | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) - -diff --git a/src/sd2.c b/src/sd2.c -index 0b4e5af..a70a1f1 100644 ---- a/src/sd2.c -+++ b/src/sd2.c -@@ -517,6 +517,11 @@ sd2_parse_rsrc_fork (SF_PRIVATE *psf) - - rsrc.type_offset = rsrc.map_offset + 30 ; - -+ if (rsrc.map_offset + 28 > rsrc.rsrc_len) -+ { psf_log_printf (psf, "Bad map offset.\n") ; -+ goto parse_rsrc_fork_cleanup ; -+ } ; -+ - rsrc.type_count = read_rsrc_short (&rsrc, rsrc.map_offset + 28) + 1 ; - if (rsrc.type_count < 1) - { psf_log_printf (psf, "Bad type count.\n") ; -@@ -533,7 +538,12 @@ sd2_parse_rsrc_fork (SF_PRIVATE *psf) - - rsrc.str_index = -1 ; - for (k = 0 ; k < rsrc.type_count ; k ++) -- { marker = read_rsrc_marker (&rsrc, rsrc.type_offset + k * 8) ; -+ { if (rsrc.type_offset + k * 8 > rsrc.rsrc_len) -+ { psf_log_printf (psf, "Bad rsrc marker.\n") ; -+ goto parse_rsrc_fork_cleanup ; -+ } ; -+ -+ marker = read_rsrc_marker (&rsrc, rsrc.type_offset + k * 8) ; - - if (marker == STR_MARKER) - { rsrc.str_index = k ; --- -1.7.9.5 - diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/0001-a-ulaw-fix-multiple-buffer-overflows-432.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/0001-a-ulaw-fix-multiple-buffer-overflows-432.patch new file mode 100644 index 0000000000..a4679cef2a --- /dev/null +++ b/meta/recipes-multimedia/libsndfile/libsndfile1/0001-a-ulaw-fix-multiple-buffer-overflows-432.patch @@ -0,0 +1,107 @@ +This patch fixes #429 (CVE-2018-19661 CVE-2018-19662) and #344 (CVE-2017-17456 +CVE-2017-17457). As per +https://github.com/erikd/libsndfile/issues/344#issuecomment-448504425 it also +fixes #317 (CVE-2017-14245 CVE-2017-14246). + +CVE: CVE-2017-14245 CVE-2017-14246 +CVE: CVE-2017-17456 CVE-2017-17457 +CVE: CVE-2018-19661 CVE-2018-19662 + +Upstream-Status: Backport [8ddc442d539ca775d80cdbc7af17a718634a743f] +Signed-off-by: Ross Burton <ross.burton@intel.com> + +From 39453899fe1bb39b2e041fdf51a85aecd177e9c7 Mon Sep 17 00:00:00 2001 +From: Changqing Li <changqing.li@windriver.com> +Date: Mon, 7 Jan 2019 15:55:03 +0800 +Subject: [PATCH] a/ulaw: fix multiple buffer overflows (#432) + +i2ulaw_array() and i2alaw_array() fail to handle ptr [count] = INT_MIN +properly, leading to buffer underflow. INT_MIN is a special value +since - INT_MIN cannot be represented as int. + +In this case round - INT_MIN to INT_MAX and proceed as usual. + +f2ulaw_array() and f2alaw_array() fail to handle ptr [count] = NaN +properly, leading to null pointer dereference. + +In this case, arbitrarily set the buffer value to 0. + +This commit fixes #429 (CVE-2018-19661 and CVE-2018-19662) and +fixes #344 (CVE-2017-17456 and CVE-2017-17457). + +--- + src/alaw.c | 9 +++++++-- + src/ulaw.c | 9 +++++++-- + 2 files changed, 14 insertions(+), 4 deletions(-) + +diff --git a/src/alaw.c b/src/alaw.c +index 063fd1a..4220224 100644 +--- a/src/alaw.c ++++ b/src/alaw.c +@@ -19,6 +19,7 @@ + #include "sfconfig.h" + + #include <math.h> ++#include <limits.h> + + #include "sndfile.h" + #include "common.h" +@@ -326,7 +327,9 @@ s2alaw_array (const short *ptr, int count, unsigned char *buffer) + static inline void + i2alaw_array (const int *ptr, int count, unsigned char *buffer) + { while (--count >= 0) +- { if (ptr [count] >= 0) ++ { if (ptr [count] == INT_MIN) ++ buffer [count] = alaw_encode [INT_MAX >> (16 + 4)] ; ++ else if (ptr [count] >= 0) + buffer [count] = alaw_encode [ptr [count] >> (16 + 4)] ; + else + buffer [count] = 0x7F & alaw_encode [- ptr [count] >> (16 + 4)] ; +@@ -346,7 +349,9 @@ f2alaw_array (const float *ptr, int count, unsigned char *buffer, float normfact + static inline void + d2alaw_array (const double *ptr, int count, unsigned char *buffer, double normfact) + { while (--count >= 0) +- { if (ptr [count] >= 0) ++ { if (!isfinite (ptr [count])) ++ buffer [count] = 0 ; ++ else if (ptr [count] >= 0) + buffer [count] = alaw_encode [lrint (normfact * ptr [count])] ; + else + buffer [count] = 0x7F & alaw_encode [- lrint (normfact * ptr [count])] ; +diff --git a/src/ulaw.c b/src/ulaw.c +index e50b4cb..b6070ad 100644 +--- a/src/ulaw.c ++++ b/src/ulaw.c +@@ -19,6 +19,7 @@ + #include "sfconfig.h" + + #include <math.h> ++#include <limits.h> + + #include "sndfile.h" + #include "common.h" +@@ -827,7 +828,9 @@ s2ulaw_array (const short *ptr, int count, unsigned char *buffer) + static inline void + i2ulaw_array (const int *ptr, int count, unsigned char *buffer) + { while (--count >= 0) +- { if (ptr [count] >= 0) ++ { if (ptr [count] == INT_MIN) ++ buffer [count] = ulaw_encode [INT_MAX >> (16 + 2)] ; ++ else if (ptr [count] >= 0) + buffer [count] = ulaw_encode [ptr [count] >> (16 + 2)] ; + else + buffer [count] = 0x7F & ulaw_encode [-ptr [count] >> (16 + 2)] ; +@@ -847,7 +850,9 @@ f2ulaw_array (const float *ptr, int count, unsigned char *buffer, float normfact + static inline void + d2ulaw_array (const double *ptr, int count, unsigned char *buffer, double normfact) + { while (--count >= 0) +- { if (ptr [count] >= 0) ++ { if (!isfinite (ptr [count])) ++ buffer [count] = 0 ; ++ else if (ptr [count] >= 0) + buffer [count] = ulaw_encode [lrint (normfact * ptr [count])] ; + else + buffer [count] = 0x7F & ulaw_encode [- lrint (normfact * ptr [count])] ; +-- +2.7.4 + diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-12562.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-12562.patch new file mode 100644 index 0000000000..491dae3114 --- /dev/null +++ b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-12562.patch @@ -0,0 +1,96 @@ +Heap-based Buffer Overflow in the psf_binheader_writef function in common.c in +libsndfile through 1.0.28 allows remote attackers to cause a denial of service +(application crash) or possibly have unspecified other impact. + +CVE: CVE-2017-12562 +Upstream-Status: Backport [cf7a8182c2642c50f1cf90dddea9ce96a8bad2e8] +Signed-off-by: Ross Burton <ross.burton@intel.com> + +From b6a9d7e95888ffa77d8c75ce3f03e6c7165587cd Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rn=20Heusipp?= <osmanx@problemloesungsmaschine.de> +Date: Wed, 14 Jun 2017 12:25:40 +0200 +Subject: [PATCH] src/common.c: Fix heap buffer overflows when writing strings + in binheader + +Fixes the following problems: + 1. Case 's' only enlarges the buffer by 16 bytes instead of size bytes. + 2. psf_binheader_writef() enlarges the header buffer (if needed) prior to the + big switch statement by an amount (16 bytes) which is enough for all cases + where only a single value gets added. Cases 's', 'S', 'p' however + additionally write an arbitrary length block of data and again enlarge the + buffer to the required amount. However, the required space calculation does + not take into account the size of the length field which gets output before + the data. + 3. Buffer size requirement calculation in case 'S' does not account for the + padding byte ("size += (size & 1) ;" happens after the calculation which + uses "size"). + 4. Case 'S' can overrun the header buffer by 1 byte when no padding is + involved + ("memcpy (&(psf->header.ptr [psf->header.indx]), strptr, size + 1) ;" while + the buffer is only guaranteed to have "size" space available). + 5. "psf->header.ptr [psf->header.indx] = 0 ;" in case 'S' always writes 1 byte + beyond the space which is guaranteed to be allocated in the header buffer. + 6. Case 's' can overrun the provided source string by 1 byte if padding is + involved ("memcpy (&(psf->header.ptr [psf->header.indx]), strptr, size) ;" + where "size" is "strlen (strptr) + 1" (which includes the 0 terminator, + plus optionally another 1 which is padding and not guaranteed to be + readable via the source string pointer). + +Closes: https://github.com/erikd/libsndfile/issues/292 +--- + src/common.c | 15 +++++++-------- + 1 file changed, 7 insertions(+), 8 deletions(-) + +diff --git a/src/common.c b/src/common.c +index 1a6204ca..6b2a2ee9 100644 +--- a/src/common.c ++++ b/src/common.c +@@ -681,16 +681,16 @@ psf_binheader_writef (SF_PRIVATE *psf, const char *format, ...) + /* Write a C string (guaranteed to have a zero terminator). */ + strptr = va_arg (argptr, char *) ; + size = strlen (strptr) + 1 ; +- size += (size & 1) ; + +- if (psf->header.indx + (sf_count_t) size >= psf->header.len && psf_bump_header_allocation (psf, 16)) ++ if (psf->header.indx + 4 + (sf_count_t) size + (sf_count_t) (size & 1) > psf->header.len && psf_bump_header_allocation (psf, 4 + size + (size & 1))) + return count ; + + if (psf->rwf_endian == SF_ENDIAN_BIG) +- header_put_be_int (psf, size) ; ++ header_put_be_int (psf, size + (size & 1)) ; + else +- header_put_le_int (psf, size) ; ++ header_put_le_int (psf, size + (size & 1)) ; + memcpy (&(psf->header.ptr [psf->header.indx]), strptr, size) ; ++ size += (size & 1) ; + psf->header.indx += size ; + psf->header.ptr [psf->header.indx - 1] = 0 ; + count += 4 + size ; +@@ -703,16 +703,15 @@ psf_binheader_writef (SF_PRIVATE *psf, const char *format, ...) + */ + strptr = va_arg (argptr, char *) ; + size = strlen (strptr) ; +- if (psf->header.indx + (sf_count_t) size > psf->header.len && psf_bump_header_allocation (psf, size)) ++ if (psf->header.indx + 4 + (sf_count_t) size + (sf_count_t) (size & 1) > psf->header.len && psf_bump_header_allocation (psf, 4 + size + (size & 1))) + return count ; + if (psf->rwf_endian == SF_ENDIAN_BIG) + header_put_be_int (psf, size) ; + else + header_put_le_int (psf, size) ; +- memcpy (&(psf->header.ptr [psf->header.indx]), strptr, size + 1) ; ++ memcpy (&(psf->header.ptr [psf->header.indx]), strptr, size + (size & 1)) ; + size += (size & 1) ; + psf->header.indx += size ; +- psf->header.ptr [psf->header.indx] = 0 ; + count += 4 + size ; + break ; + +@@ -724,7 +723,7 @@ psf_binheader_writef (SF_PRIVATE *psf, const char *format, ...) + size = (size & 1) ? size : size + 1 ; + size = (size > 254) ? 254 : size ; + +- if (psf->header.indx + (sf_count_t) size > psf->header.len && psf_bump_header_allocation (psf, size)) ++ if (psf->header.indx + 1 + (sf_count_t) size > psf->header.len && psf_bump_header_allocation (psf, 1 + size)) + return count ; + + header_put_byte (psf, size) ; diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-14634.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-14634.patch new file mode 100644 index 0000000000..39b4ec1101 --- /dev/null +++ b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-14634.patch @@ -0,0 +1,42 @@ +From 85c877d5072866aadbe8ed0c3e0590fbb5e16788 Mon Sep 17 00:00:00 2001 +From: Fabian Greffrath <fabian@greffrath.com> +Date: Thu, 28 Sep 2017 12:15:04 +0200 +Subject: [PATCH] double64_init: Check psf->sf.channels against upper bound + +This prevents division by zero later in the code. + +While the trivial case to catch this (i.e. sf.channels < 1) has already +been covered, a crafted file may report a number of channels that is +so high (i.e. > INT_MAX/sizeof(double)) that it "somehow" gets +miscalculated to zero (if this makes sense) in the determination of the +blockwidth. Since we only support a limited number of channels anyway, +make sure to check here as well. + +CVE: CVE-2017-14634 + +Closes: https://github.com/erikd/libsndfile/issues/318 + +Upstream-Status: Backport [https://github.com/erikd/libsndfile/commit/85c877d5072866aadbe8ed0c3e0590fbb5e16788] + +Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com> +Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com> +--- + src/double64.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/double64.c b/src/double64.c +index b318ea8..78dfef7 100644 +--- a/src/double64.c ++++ b/src/double64.c +@@ -91,7 +91,7 @@ int + double64_init (SF_PRIVATE *psf) + { static int double64_caps ; + +- if (psf->sf.channels < 1) ++ if (psf->sf.channels < 1 || psf->sf.channels > SF_MAX_CHANNELS) + { psf_log_printf (psf, "double64_init : internal error : channels = %d\n", psf->sf.channels) ; + return SFE_INTERNAL ; + } ; +-- +2.13.3 + diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-6892.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-6892.patch new file mode 100644 index 0000000000..89552ac2d9 --- /dev/null +++ b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-6892.patch @@ -0,0 +1,34 @@ +From f833c53cb596e9e1792949f762e0b33661822748 Mon Sep 17 00:00:00 2001 +From: Erik de Castro Lopo <erikd@mega-nerd.com> +Date: Tue, 23 May 2017 20:15:24 +1000 +Subject: [PATCH] src/aiff.c: Fix a buffer read overflow + +Secunia Advisory SA76717. + +Found by: Laurent Delosieres, Secunia Research at Flexera Software + +CVE: CVE-2017-6892 +Upstream-Status: Backport + +Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com> + +--- + src/aiff.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/aiff.c b/src/aiff.c +index 5b5f9f5..45864b7 100644 +--- a/src/aiff.c ++++ b/src/aiff.c +@@ -1759,7 +1759,7 @@ aiff_read_chanmap (SF_PRIVATE * psf, unsigned dword) + psf_binheader_readf (psf, "j", dword - bytesread) ; + + if (map_info->channel_map != NULL) +- { size_t chanmap_size = psf->sf.channels * sizeof (psf->channel_map [0]) ; ++ { size_t chanmap_size = SF_MIN (psf->sf.channels, layout_tag & 0xffff) * sizeof (psf->channel_map [0]) ; + + free (psf->channel_map) ; + +-- +1.9.1 + diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-8361-8365.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-8361-8365.patch new file mode 100644 index 0000000000..ac99516bb3 --- /dev/null +++ b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-8361-8365.patch @@ -0,0 +1,73 @@ +From fd0484aba8e51d16af1e3a880f9b8b857b385eb3 Mon Sep 17 00:00:00 2001 +From: Erik de Castro Lopo <erikd@mega-nerd.com> +Date: Wed, 12 Apr 2017 19:45:30 +1000 +Subject: [PATCH] FLAC: Fix a buffer read overrun + +Buffer read overrun occurs when reading a FLAC file that switches +from 2 channels to one channel mid-stream. Only option is to +abort the read. + +Closes: https://github.com/erikd/libsndfile/issues/230 + +CVE: CVE-2017-8361 CVE-2017-8365 + +Upstream-Status: Backport [https://github.com/erikd/libsndfile/commit/fd0484aba8e51d16af1e3a880f9b8b857b385eb3] + +Signed-off-by: Jackie Huang <jackie.huang@windriver.com> +--- + src/common.h | 1 + + src/flac.c | 13 +++++++++++++ + src/sndfile.c | 1 + + 3 files changed, 15 insertions(+) + +diff --git a/src/common.h b/src/common.h +index 0bd810c..e2669b6 100644 +--- a/src/common.h ++++ b/src/common.h +@@ -725,6 +725,7 @@ enum + SFE_FLAC_INIT_DECODER, + SFE_FLAC_LOST_SYNC, + SFE_FLAC_BAD_SAMPLE_RATE, ++ SFE_FLAC_CHANNEL_COUNT_CHANGED, + SFE_FLAC_UNKOWN_ERROR, + + SFE_WVE_NOT_WVE, +diff --git a/src/flac.c b/src/flac.c +index 84de0e2..986a7b8 100644 +--- a/src/flac.c ++++ b/src/flac.c +@@ -434,6 +434,19 @@ sf_flac_meta_callback (const FLAC__StreamDecoder * UNUSED (decoder), const FLAC_ + + switch (metadata->type) + { case FLAC__METADATA_TYPE_STREAMINFO : ++ if (psf->sf.channels > 0 && psf->sf.channels != (int) metadata->data.stream_info.channels) ++ { psf_log_printf (psf, "Error: FLAC stream changed from %d to %d channels\n" ++ "Nothing to be but to error out.\n" , ++ psf->sf.channels, metadata->data.stream_info.channels) ; ++ psf->error = SFE_FLAC_CHANNEL_COUNT_CHANGED ; ++ return ; ++ } ; ++ ++ if (psf->sf.channels > 0 && psf->sf.samplerate != (int) metadata->data.stream_info.sample_rate) ++ { psf_log_printf (psf, "Warning: FLAC stream changed sample rates from %d to %d.\n" ++ "Carrying on as if nothing happened.", ++ psf->sf.samplerate, metadata->data.stream_info.sample_rate) ; ++ } ; + psf->sf.channels = metadata->data.stream_info.channels ; + psf->sf.samplerate = metadata->data.stream_info.sample_rate ; + psf->sf.frames = metadata->data.stream_info.total_samples ; +diff --git a/src/sndfile.c b/src/sndfile.c +index 4187561..e2a87be 100644 +--- a/src/sndfile.c ++++ b/src/sndfile.c +@@ -245,6 +245,7 @@ ErrorStruct SndfileErrors [] = + { SFE_FLAC_INIT_DECODER , "Error : problem with initialization of the flac decoder." }, + { SFE_FLAC_LOST_SYNC , "Error : flac decoder lost sync." }, + { SFE_FLAC_BAD_SAMPLE_RATE, "Error : flac does not support this sample rate." }, ++ { SFE_FLAC_CHANNEL_COUNT_CHANGED, "Error : flac channel changed mid stream." }, + { SFE_FLAC_UNKOWN_ERROR , "Error : unknown error in flac decoder." }, + + { SFE_WVE_NOT_WVE , "Error : not a WVE file." }, +-- +2.7.4 + diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-8362.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-8362.patch new file mode 100644 index 0000000000..9ee7e46a6d --- /dev/null +++ b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-8362.patch @@ -0,0 +1,59 @@ +From ef1dbb2df1c0e741486646de40bd638a9c4cd808 Mon Sep 17 00:00:00 2001 +From: Erik de Castro Lopo <erikd@mega-nerd.com> +Date: Fri, 14 Apr 2017 15:19:16 +1000 +Subject: [PATCH] src/flac.c: Fix a buffer read overflow + +A file (generated by a fuzzer) which increased the number of channels +from one frame to the next could cause a read beyond the end of the +buffer provided by libFLAC. Only option is to abort the read. + +Closes: https://github.com/erikd/libsndfile/issues/231 + +CVE: CVE-2017-8362 + +Upstream-Status: Backport [https://github.com/erikd/libsndfile/commit/ef1dbb2df1c0e741486646de40bd638a9c4cd808] + +Signed-off-by: Jackie Huang <jackie.huang@windriver.com> +--- + src/flac.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/src/flac.c b/src/flac.c +index 5a4f8c2..e4f9aaa 100644 +--- a/src/flac.c ++++ b/src/flac.c +@@ -169,6 +169,14 @@ flac_buffer_copy (SF_PRIVATE *psf) + const int32_t* const *buffer = pflac->wbuffer ; + unsigned i = 0, j, offset, channels, len ; + ++ if (psf->sf.channels != (int) frame->header.channels) ++ { psf_log_printf (psf, "Error: FLAC frame changed from %d to %d channels\n" ++ "Nothing to do but to error out.\n" , ++ psf->sf.channels, frame->header.channels) ; ++ psf->error = SFE_FLAC_CHANNEL_COUNT_CHANGED ; ++ return 0 ; ++ } ; ++ + /* + ** frame->header.blocksize is variable and we're using a constant blocksize + ** of FLAC__MAX_BLOCK_SIZE. +@@ -202,7 +210,6 @@ flac_buffer_copy (SF_PRIVATE *psf) + return 0 ; + } ; + +- + len = SF_MIN (pflac->len, frame->header.blocksize) ; + + if (pflac->remain % channels != 0) +@@ -436,7 +443,7 @@ sf_flac_meta_callback (const FLAC__StreamDecoder * UNUSED (decoder), const FLAC_ + { case FLAC__METADATA_TYPE_STREAMINFO : + if (psf->sf.channels > 0 && psf->sf.channels != (int) metadata->data.stream_info.channels) + { psf_log_printf (psf, "Error: FLAC stream changed from %d to %d channels\n" +- "Nothing to be but to error out.\n" , ++ "Nothing to do but to error out.\n" , + psf->sf.channels, metadata->data.stream_info.channels) ; + psf->error = SFE_FLAC_CHANNEL_COUNT_CHANGED ; + return ; +-- +2.7.4 + diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-8363.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-8363.patch new file mode 100644 index 0000000000..e526e5a346 --- /dev/null +++ b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-8363.patch @@ -0,0 +1,37 @@ +From cd7da8dbf6ee4310d21d9e44b385d6797160d9e8 Mon Sep 17 00:00:00 2001 +From: Erik de Castro Lopo <erikd@mega-nerd.com> +Date: Wed, 12 Apr 2017 20:19:34 +1000 +Subject: [PATCH] src/flac.c: Fix another memory leak + +When the FLAC decoder was passed a malformed file, the associated +`FLAC__StreamDecoder` object was not getting released. + +Closes: https://github.com/erikd/libsndfile/issues/233 + +CVE: CVE-2017-8363 + +Upstream-Status: Backport [https://github.com/erikd/libsndfile/commit/cd7da8dbf6ee4310d21d9e44b385d6797160d9e8] + +Signed-off-by: Jackie Huang <jackie.huang@windriver.com> +--- + src/flac.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/flac.c b/src/flac.c +index 986a7b8..5a4f8c2 100644 +--- a/src/flac.c ++++ b/src/flac.c +@@ -841,7 +841,9 @@ flac_read_header (SF_PRIVATE *psf) + + psf_log_printf (psf, "End\n") ; + +- if (psf->error == 0) ++ if (psf->error != 0) ++ FLAC__stream_decoder_delete (pflac->fsd) ; ++ else + { FLAC__uint64 position ; + + FLAC__stream_decoder_get_decode_position (pflac->fsd, &position) ; +-- +2.7.4 + diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2018-13139.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2018-13139.patch new file mode 100644 index 0000000000..707373d414 --- /dev/null +++ b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2018-13139.patch @@ -0,0 +1,37 @@ +CVE: CVE-2018-13139 +Upstream-Status: Backport [9dc989eb89cd697e19897afa616d6ab0debe4822] +Signed-off-by: Ross Burton <ross.burton@intel.com> + +From 9dc989eb89cd697e19897afa616d6ab0debe4822 Mon Sep 17 00:00:00 2001 +From: "Brett T. Warden" <brett.t.warden@intel.com> +Date: Tue, 28 Aug 2018 12:01:17 -0700 +Subject: [PATCH] Check MAX_CHANNELS in sndfile-deinterleave + +Allocated buffer has space for only 16 channels. Verify that input file +meets this limit. + +Fixes #397 +--- + programs/sndfile-deinterleave.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/programs/sndfile-deinterleave.c b/programs/sndfile-deinterleave.c +index e27593e2..cb497e1f 100644 +--- a/programs/sndfile-deinterleave.c ++++ b/programs/sndfile-deinterleave.c +@@ -89,6 +89,13 @@ main (int argc, char **argv) + exit (1) ; + } ; + ++ if (sfinfo.channels > MAX_CHANNELS) ++ { printf ("\nError : Input file '%s' has too many (%d) channels. Limit is %d.\n", ++ argv [1], sfinfo.channels, MAX_CHANNELS) ; ++ exit (1) ; ++ } ; ++ ++ + state.channels = sfinfo.channels ; + sfinfo.channels = 1 ; + +-- +2.11.0 diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2018-19432.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2018-19432.patch new file mode 100644 index 0000000000..8ded2c0f85 --- /dev/null +++ b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2018-19432.patch @@ -0,0 +1,115 @@ +From 6f3266277bed16525f0ac2f0f03ff4626f1923e5 Mon Sep 17 00:00:00 2001 +From: Erik de Castro Lopo <erikd@mega-nerd.com> +Date: Thu, 8 Mar 2018 18:00:21 +1100 +Subject: [PATCH] Fix max channel count bug + +The code was allowing files to be written with a channel count of exactly +`SF_MAX_CHANNELS` but was failing to read some file formats with the same +channel count. + +Upstream-Status: Backport [https://github.com/erikd/libsndfile/ +commit/6f3266277bed16525f0ac2f0f03ff4626f1923e5] + +CVE: CVE-2018-19432 + +Signed-off-by: Changqing Li <changqing.li@windriver.com> + +--- + src/aiff.c | 6 +++--- + src/rf64.c | 4 ++-- + src/w64.c | 4 ++-- + src/wav.c | 4 ++-- + 4 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/src/aiff.c b/src/aiff.c +index fbd43cb..6386bce 100644 +--- a/src/aiff.c ++++ b/src/aiff.c +@@ -1,5 +1,5 @@ + /* +-** Copyright (C) 1999-2016 Erik de Castro Lopo <erikd@mega-nerd.com> ++** Copyright (C) 1999-2018 Erik de Castro Lopo <erikd@mega-nerd.com> + ** Copyright (C) 2005 David Viens <davidv@plogue.com> + ** + ** This program is free software; you can redistribute it and/or modify +@@ -950,7 +950,7 @@ aiff_read_header (SF_PRIVATE *psf, COMM_ + if (psf->sf.channels < 1) + return SFE_CHANNEL_COUNT_ZERO ; + +- if (psf->sf.channels >= SF_MAX_CHANNELS) ++ if (psf->sf.channels > SF_MAX_CHANNELS) + return SFE_CHANNEL_COUNT ; + + if (! (found_chunk & HAVE_FORM)) +@@ -1030,7 +1030,7 @@ aiff_read_comm_chunk (SF_PRIVATE *psf, C + psf_log_printf (psf, " Sample Rate : %d\n", samplerate) ; + psf_log_printf (psf, " Frames : %u%s\n", comm_fmt->numSampleFrames, (comm_fmt->numSampleFrames == 0 && psf->filelength > 104) ? " (Should not be 0)" : "") ; + +- if (comm_fmt->numChannels < 1 || comm_fmt->numChannels >= SF_MAX_CHANNELS) ++ if (comm_fmt->numChannels < 1 || comm_fmt->numChannels > SF_MAX_CHANNELS) + { psf_log_printf (psf, " Channels : %d (should be >= 1 and < %d)\n", comm_fmt->numChannels, SF_MAX_CHANNELS) ; + return SFE_CHANNEL_COUNT_BAD ; + } ; +diff --git a/src/rf64.c b/src/rf64.c +index d57f0f3..876cd45 100644 +--- a/src/rf64.c ++++ b/src/rf64.c +@@ -1,5 +1,5 @@ + /* +-** Copyright (C) 2008-2017 Erik de Castro Lopo <erikd@mega-nerd.com> ++** Copyright (C) 2008-2018 Erik de Castro Lopo <erikd@mega-nerd.com> + ** Copyright (C) 2009 Uli Franke <cls@nebadje.org> + ** + ** This program is free software; you can redistribute it and/or modify +@@ -382,7 +382,7 @@ rf64_read_header (SF_PRIVATE *psf, int * + if (psf->sf.channels < 1) + return SFE_CHANNEL_COUNT_ZERO ; + +- if (psf->sf.channels >= SF_MAX_CHANNELS) ++ if (psf->sf.channels > SF_MAX_CHANNELS) + return SFE_CHANNEL_COUNT ; + + /* WAVs can be little or big endian */ +diff --git a/src/w64.c b/src/w64.c +index 939b716..a37d2c5 100644 +--- a/src/w64.c ++++ b/src/w64.c +@@ -1,5 +1,5 @@ + /* +-** Copyright (C) 1999-2016 Erik de Castro Lopo <erikd@mega-nerd.com> ++** Copyright (C) 1999-2018 Erik de Castro Lopo <erikd@mega-nerd.com> + ** + ** This program is free software; you can redistribute it and/or modify + ** it under the terms of the GNU Lesser General Public License as published by +@@ -383,7 +383,7 @@ w64_read_header (SF_PRIVATE *psf, int *b + if (psf->sf.channels < 1) + return SFE_CHANNEL_COUNT_ZERO ; + +- if (psf->sf.channels >= SF_MAX_CHANNELS) ++ if (psf->sf.channels > SF_MAX_CHANNELS) + return SFE_CHANNEL_COUNT ; + + psf->endian = SF_ENDIAN_LITTLE ; /* All W64 files are little endian. */ +diff --git a/src/wav.c b/src/wav.c +index 7bd97bc..dc97545 100644 +--- a/src/wav.c ++++ b/src/wav.c +@@ -1,5 +1,5 @@ + /* +-** Copyright (C) 1999-2016 Erik de Castro Lopo <erikd@mega-nerd.com> ++** Copyright (C) 1999-2018 Erik de Castro Lopo <erikd@mega-nerd.com> + ** Copyright (C) 2004-2005 David Viens <davidv@plogue.com> + ** + ** This program is free software; you can redistribute it and/or modify +@@ -627,7 +627,7 @@ wav_read_header (SF_PRIVATE *psf, int *b + if (psf->sf.channels < 1) + return SFE_CHANNEL_COUNT_ZERO ; + +- if (psf->sf.channels >= SF_MAX_CHANNELS) ++ if (psf->sf.channels > SF_MAX_CHANNELS) + return SFE_CHANNEL_COUNT ; + + if (format != WAVE_FORMAT_PCM && (parsestage & HAVE_fact) == 0) +-- +1.7.9.5 + diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2018-19758.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2018-19758.patch new file mode 100644 index 0000000000..c3586f9dfc --- /dev/null +++ b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2018-19758.patch @@ -0,0 +1,34 @@ +There is a heap-based buffer over-read at wav.c in wav_write_header in +libsndfile 1.0.28 that will cause a denial of service. + +CVE: CVE-2018-19758 +Upstream-Status: Backport [42132c543358cee9f7c3e9e9b15bb6c1063a608e] +Signed-off-by: Ross Burton <ross.burton@intel.com> + +From c12173b0197dd0c5cfa2cd27977e982d2ae59486 Mon Sep 17 00:00:00 2001 +From: Erik de Castro Lopo <erikd@mega-nerd.com> +Date: Tue, 1 Jan 2019 20:11:46 +1100 +Subject: [PATCH] src/wav.c: Fix heap read overflow + +This is CVE-2018-19758. + +Closes: https://github.com/erikd/libsndfile/issues/435 +--- + src/wav.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/wav.c b/src/wav.c +index e8405b55..6fb94ae8 100644 +--- a/src/wav.c ++++ b/src/wav.c +@@ -1094,6 +1094,8 @@ wav_write_header (SF_PRIVATE *psf, int calc_length) + psf_binheader_writef (psf, "44", 0, 0) ; /* SMTPE format */ + psf_binheader_writef (psf, "44", psf->instrument->loop_count, 0) ; + ++ /* Loop count is signed 16 bit number so we limit it range to something sensible. */ ++ psf->instrument->loop_count &= 0x7fff ; + for (tmp = 0 ; tmp < psf->instrument->loop_count ; tmp++) + { int type ; + +-- +2.11.0 diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2019-3832.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2019-3832.patch new file mode 100644 index 0000000000..ab37211399 --- /dev/null +++ b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2019-3832.patch @@ -0,0 +1,37 @@ +From 43886efc408c21e1e329086ef70c88860310f25b Mon Sep 17 00:00:00 2001 +From: Emilio Pozuelo Monfort <pochu27@gmail.com> +Date: Tue, 5 Mar 2019 11:27:17 +0100 +Subject: [PATCH] wav_write_header: don't read past the array end + +CVE-2018-19758 wasn't entirely fixed in the fix, so fix it harder. + +CVE: CVE-2019-3832 +Upstream-Status: Backport [7408c4c788ce047d4e652b60a04e7796bcd7267e] +Signed-off-by: Ross Burton <ross.burton@intel.com> + +If loop_count is bigger than the array, truncate it to the array +length (and not to 32k). + +CVE-2019-3832 + +--- + src/wav.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/wav.c b/src/wav.c +index daae3cc..8851549 100644 +--- a/src/wav.c ++++ b/src/wav.c +@@ -1094,8 +1094,10 @@ wav_write_header (SF_PRIVATE *psf, int calc_length) + psf_binheader_writef (psf, "44", 0, 0) ; /* SMTPE format */ + psf_binheader_writef (psf, "44", psf->instrument->loop_count, 0) ; + +- /* Loop count is signed 16 bit number so we limit it range to something sensible. */ +- psf->instrument->loop_count &= 0x7fff ; ++ /* Make sure we don't read past the loops array end. */ ++ if (psf->instrument->loop_count > ARRAY_LEN (psf->instrument->loops)) ++ psf->instrument->loop_count = ARRAY_LEN (psf->instrument->loops) ; ++ + for (tmp = 0 ; tmp < psf->instrument->loop_count ; tmp++) + { int type ; + diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.25.bb b/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.25.bb deleted file mode 100644 index 3e02f4ea78..0000000000 --- a/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.25.bb +++ /dev/null @@ -1,33 +0,0 @@ -SUMMARY = "Audio format Conversion library" -HOMEPAGE = "http://www.mega-nerd.com/libsndfile" -AUTHOR = "Erik de Castro Lopo" -DEPENDS = "sqlite3" -SECTION = "libs/multimedia" -LICENSE = "LGPLv2.1" -PR = "r2" - -SRC_URI = "http://www.mega-nerd.com/libsndfile/files/libsndfile-${PV}.tar.gz \ - file://0001-src-sd2.c-Fix-segfault-in-SD2-RSRC-parser.patch \ - file://0001-src-sd2.c-Fix-two-potential-buffer-read-overflows.patch \ -" - -SRC_URI[md5sum] = "e2b7bb637e01022c7d20f95f9c3990a2" -SRC_URI[sha256sum] = "59016dbd326abe7e2366ded5c344c853829bebfd1702ef26a07ef662d6aa4882" - -LIC_FILES_CHKSUM = "file://COPYING;md5=e77fe93202736b47c07035910f47974a" - -S = "${WORKDIR}/libsndfile-${PV}" - -PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)}" -PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib" - -EXTRA_OECONF = "--disable-external-libs" - -inherit autotools lib_package pkgconfig - -do_configure_prepend_arm() { - export ac_cv_sys_largefile_source=1 - export ac_cv_sys_file_offset_bits=64 - ac_cv_sizeof_off_t=8 -} - diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.28.bb b/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.28.bb new file mode 100644 index 0000000000..443ca95e32 --- /dev/null +++ b/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.28.bb @@ -0,0 +1,46 @@ +SUMMARY = "Audio format Conversion library" +DESCRIPTION = "Library for reading and writing files containing sampled \ +sound (such as MS Windows WAV and the Apple/SGI AIFF format) through \ +one standard library interface." +HOMEPAGE = "http://www.mega-nerd.com/libsndfile" +AUTHOR = "Erik de Castro Lopo" +DEPENDS = "flac libogg libvorbis" +SECTION = "libs/multimedia" +LICENSE = "LGPLv2.1" + +SRC_URI = "http://www.mega-nerd.com/libsndfile/files/libsndfile-${PV}.tar.gz \ + file://CVE-2017-6892.patch \ + file://CVE-2017-8361-8365.patch \ + file://CVE-2017-8362.patch \ + file://CVE-2017-8363.patch \ + file://CVE-2017-14634.patch \ + file://CVE-2018-13139.patch \ + file://0001-a-ulaw-fix-multiple-buffer-overflows-432.patch \ + file://CVE-2018-19432.patch \ + file://CVE-2017-12562.patch \ + file://CVE-2018-19758.patch \ + file://CVE-2019-3832.patch \ + " + +SRC_URI[md5sum] = "646b5f98ce89ac60cdb060fcd398247c" +SRC_URI[sha256sum] = "1ff33929f042fa333aed1e8923aa628c3ee9e1eb85512686c55092d1e5a9dfa9" + +LIC_FILES_CHKSUM = "file://COPYING;md5=e77fe93202736b47c07035910f47974a" + +CVE_PRODUCT = "libsndfile" + +S = "${WORKDIR}/libsndfile-${PV}" + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'alsa', d)}" +PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib" +PACKAGECONFIG[regtest] = "--enable-sqlite,--disable-sqlite,sqlite3" + +inherit autotools lib_package pkgconfig multilib_header + +do_install:append() { + oe_multilib_header sndfile.h +} + +# This can't be replicated and is just a memory leak. +# https://github.com/erikd/libsndfile/issues/398 +CVE_CHECK_WHITELIST += "CVE-2018-13419" diff --git a/meta/recipes-multimedia/libtheora/libtheora_1.1.1.bb b/meta/recipes-multimedia/libtheora/libtheora_1.1.1.bb index 18cb168c52..178e1a9240 100644 --- a/meta/recipes-multimedia/libtheora/libtheora_1.1.1.bb +++ b/meta/recipes-multimedia/libtheora/libtheora_1.1.1.bb @@ -3,7 +3,7 @@ DESCRIPTION = "The libtheora reference implementation provides the standard enco HOMEPAGE = "http://xiph.org/" BUGTRACKER = "https://trac.xiph.org/newticket" SECTION = "libs" -LICENSE = "BSD" +LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://COPYING;md5=cf91718f59eb6a83d06dc7bcaf411132" DEPENDS = "libogg" @@ -15,6 +15,8 @@ SRC_URI = "http://downloads.xiph.org/releases/theora/libtheora-${PV}.tar.bz2 \ SRC_URI[md5sum] = "292ab65cedd5021d6b7ddd117e07cd8e" SRC_URI[sha256sum] = "b6ae1ee2fa3d42ac489287d3ec34c5885730b1296f0801ae577a35193d3affbc" +UPSTREAM_CHECK_REGEX = "libtheora-(?P<pver>\d+(\.\d)+)\.(tar\.gz|tgz)" + inherit autotools pkgconfig EXTRA_OECONF = "--disable-examples" diff --git a/meta/recipes-multimedia/libtiff/files/libtool2.patch b/meta/recipes-multimedia/libtiff/files/libtool2.patch deleted file mode 100644 index 457202eae5..0000000000 --- a/meta/recipes-multimedia/libtiff/files/libtool2.patch +++ /dev/null @@ -1,19 +0,0 @@ -Upstream-Status: Inappropriate [configuration] - ---- - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: tiff-3.9.5/configure.ac -=================================================================== ---- tiff-3.9.5.orig/configure.ac -+++ tiff-3.9.5/configure.ac -@@ -27,7 +27,7 @@ dnl Process this file with autoconf to p - AC_PREREQ(2.64) - AC_INIT([LibTIFF Software],[3.9.5],[tiff@lists.maptools.org],[tiff]) - AC_CONFIG_AUX_DIR(config) --AC_CONFIG_MACRO_DIR(m4) -+dnl AC_CONFIG_MACRO_DIR(m4) - AC_LANG(C) - - dnl Compute the canonical host (run-time) system type variable diff --git a/meta/recipes-multimedia/libtiff/tiff_4.0.4.bb b/meta/recipes-multimedia/libtiff/tiff_4.3.0.bb index cf3a5f04c5..6852758c6a 100644 --- a/meta/recipes-multimedia/libtiff/tiff_4.0.4.bb +++ b/meta/recipes-multimedia/libtiff/tiff_4.3.0.bb @@ -1,16 +1,25 @@ SUMMARY = "Provides support for the Tag Image File Format (TIFF)" +DESCRIPTION = "Library provides support for the Tag Image File Format \ +(TIFF), a widely used format for storing image data. This library \ +provide means to easily access and create TIFF image files." +HOMEPAGE = "http://www.libtiff.org/" LICENSE = "BSD-2-Clause" LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=34da3db46fab7501992f9615d7e158cf" -HOMEPAGE = "http://www.remotesensing.org/libtiff/" -SRC_URI = "ftp://ftp.remotesensing.org/pub/libtiff/tiff-${PV}.tar.gz \ - file://libtool2.patch \ +CVE_PRODUCT = "libtiff" + +SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \ " +SRC_URI[sha256sum] = "0e46e5acb087ce7d1ac53cf4f56a09b221537fc86dfc5daaad1c2e89e1b37ac8" + +# exclude betas +UPSTREAM_CHECK_REGEX = "tiff-(?P<pver>\d+(\.\d+)+).tar" -SRC_URI[md5sum] = "9aee7107408a128c0c7b24286c0db900" -SRC_URI[sha256sum] = "8cb1d90c96f61cdfc0bcf036acc251c9dbe6320334da941c7a83cfe1576ef890" +# Tested with check from https://security-tracker.debian.org/tracker/CVE-2015-7313 +# and 4.3.0 doesn't have the issue +CVE_CHECK_WHITELIST += "CVE-2015-7313" -inherit autotools +inherit autotools multilib_header CACHED_CONFIGUREVARS = "ax_cv_check_gl_libgl=no" @@ -38,7 +47,11 @@ PACKAGECONFIG[check-ycbcr-subsampling] = "--enable-check-ycbcr-subsampling,--dis PACKAGECONFIG[chunky-strip-read] = "--enable-chunky-strip-read,--disable-chunky-strip-read,," PACKAGES =+ "tiffxx tiff-utils" -FILES_tiffxx = "${libdir}/libtiffxx.so.*" -FILES_tiff-utils = "${bindir}/*" +FILES:tiffxx = "${libdir}/libtiffxx.so.*" +FILES:tiff-utils = "${bindir}/*" + +do_install:append() { + oe_multilib_header tiffconf.h +} -BBCLASSEXTEND = "native" +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-multimedia/libvorbis/libvorbis/0001-configure-Check-for-clang.patch b/meta/recipes-multimedia/libvorbis/libvorbis/0001-configure-Check-for-clang.patch new file mode 100644 index 0000000000..b06029b98b --- /dev/null +++ b/meta/recipes-multimedia/libvorbis/libvorbis/0001-configure-Check-for-clang.patch @@ -0,0 +1,56 @@ +From d619ccf6c11ab574466914c57994a82fb99401af Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 22 Mar 2017 16:06:55 +0000 +Subject: [PATCH] configure: Check for clang + +Disable gcc specific options if using clang + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + configure.ac | 19 +++++++++++++++++-- + 1 file changed, 17 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 28b0a14..2d4e984 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -98,6 +98,16 @@ AC_ARG_ENABLE(examples, + + AM_CONDITIONAL(BUILD_EXAMPLES, [test "x$enable_examples" = xyes]) + ++AC_MSG_CHECKING([whether C compiler is clang]) ++$CC -x c /dev/null -dM -E > conftest.txt 2>&1 ++if grep "__clang__" conftest.txt >/dev/null 2>&1; then ++ AC_SUBST([CC_CLANG], [1]) ++ AC_MSG_RESULT([yes]) ++ else ++ AC_SUBST([CC_CLANG], [0]) ++ AC_MSG_RESULT([no]) ++fi ++ + dnl -------------------------------------------------- + dnl Set build flags based on environment + dnl -------------------------------------------------- +@@ -132,10 +142,15 @@ else + AC_MSG_RESULT([$GCC_VERSION]) + case $host in + *86-*-linux*) ++ if test "$CC_CLANG" = "1"; then ++ ieeefp="" ++ else ++ ieefp="-mno-ieee-fp" ++ fi + DEBUG="-g -Wall -Wextra -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char" +- CFLAGS="-O3 -Wall -Wextra -ffast-math -mno-ieee-fp -D_REENTRANT -fsigned-char" ++ CFLAGS="-O3 -Wall -Wextra -ffast-math -D_REENTRANT -fsigned-char ${ieefp}" + # PROFILE="-Wall -Wextra -pg -g -O3 -ffast-math -D_REENTRANT -fsigned-char -fno-inline -static" +- PROFILE="-Wall -Wextra -pg -g -O3 -ffast-math -mno-ieee-fp -D_REENTRANT -fsigned-char -fno-inline" ++ PROFILE="-Wall -Wextra -pg -g -O3 -ffast-math ${ieefp} -D_REENTRANT -fsigned-char -fno-inline" + + # glibc < 2.1.3 has a serious FP bug in the math inline header + # that will cripple Vorbis. Look to see if the magic FP stack +-- +2.17.0 + diff --git a/meta/recipes-multimedia/libvorbis/libvorbis_1.3.5.bb b/meta/recipes-multimedia/libvorbis/libvorbis_1.3.5.bb deleted file mode 100644 index 636e0f307b..0000000000 --- a/meta/recipes-multimedia/libvorbis/libvorbis_1.3.5.bb +++ /dev/null @@ -1,17 +0,0 @@ -SUMMARY = "Ogg Vorbis Audio Codec" -DESCRIPTION = "Ogg Vorbis is a high-quality lossy audio codec \ -that is free of intellectual property restrictions. libvorbis \ -is the main vorbis codec library." -HOMEPAGE = "http://www.vorbis.com/" -BUGTRACKER = "https://trac.xiph.org" -SECTION = "libs" -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://COPYING;md5=7d2c487d2fc7dd3e3c7c465a5b7f6217 \ - file://include/vorbis/vorbisenc.h;beginline=1;endline=11;md5=d1c1d138863d6315131193d4046d81cb" -DEPENDS = "libogg" - -SRC_URI = "http://downloads.xiph.org/releases/vorbis/${BP}.tar.xz" -SRC_URI[md5sum] = "28cb28097c07a735d6af56e598e1c90f" -SRC_URI[sha256sum] = "54f94a9527ff0a88477be0a71c0bab09a4c3febe0ed878b24824906cd4b0e1d1" - -inherit autotools pkgconfig diff --git a/meta/recipes-multimedia/libvorbis/libvorbis_1.3.7.bb b/meta/recipes-multimedia/libvorbis/libvorbis_1.3.7.bb new file mode 100644 index 0000000000..023bce0abe --- /dev/null +++ b/meta/recipes-multimedia/libvorbis/libvorbis_1.3.7.bb @@ -0,0 +1,19 @@ +SUMMARY = "Ogg Vorbis Audio Codec" +DESCRIPTION = "Ogg Vorbis is a high-quality lossy audio codec \ +that is free of intellectual property restrictions. libvorbis \ +is the main vorbis codec library." +HOMEPAGE = "https://xiph.org/vorbis/" +BUGTRACKER = "https://gitlab.xiph.org/xiph/vorbis/-/issues" +SECTION = "libs" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://COPYING;md5=73d9c8942c60b846c3bad13cc6c2e520 \ + file://include/vorbis/vorbisenc.h;beginline=1;endline=11;md5=c95a4ac2b4125f00a9acf61449ebb843" +DEPENDS = "libogg" + +SRC_URI = "http://downloads.xiph.org/releases/vorbis/${BP}.tar.xz \ + file://0001-configure-Check-for-clang.patch \ + " +SRC_URI[md5sum] = "50902641d358135f06a8392e61c9ac77" +SRC_URI[sha256sum] = "b33cc4934322bcbf6efcbacf49e3ca01aadbea4114ec9589d1b1e9d20f72954b" + +inherit autotools pkgconfig diff --git a/meta/recipes-multimedia/mpeg2dec/files/0001-Import-revision-1206-from-upstream-to-fix-PIE-build.patch b/meta/recipes-multimedia/mpeg2dec/files/0001-Import-revision-1206-from-upstream-to-fix-PIE-build.patch new file mode 100644 index 0000000000..b2544cb44d --- /dev/null +++ b/meta/recipes-multimedia/mpeg2dec/files/0001-Import-revision-1206-from-upstream-to-fix-PIE-build.patch @@ -0,0 +1,156 @@ +From 0cafb99b57f43cf6ac2c6208718e49ad2dbe462d Mon Sep 17 00:00:00 2001 +From: Jan Schmidt <thaytan@noraisin.net> +Date: Sun, 10 Nov 2013 00:49:52 +1100 +Subject: [PATCH] Import revision 1206 from upstream to fix PIE build. + +Functions MC_put_o_16_arm, MC_put_o_8_arm, MC_put_x_16_arm, MC_put_x_8_arm +in libmpeg2/motion_comp_arm_s.S have addresses in .text, which is bad +for shared libraries. Some environments demand that .text actually be +read-only all the time, yet MC_put_o_16_arm etc require that the addresses +be modified by the dynamic linking mechanism (dlopen, LoadLibrary, etc.) +Even in those environments which permit the dynamic linker to modify the +.text segment, the runtime cost of doing the relocation can be noticeable. + +This commit rewrites the linkage, discarding the tables of addresses +in favor of tables of offsets. All transfers are local within each individual +function, so there can be no interference by processing that occurs +after assembly, such as link-time re-ordering (even of individual functions.) + +Patch by John Reiser <jreiser@bitwagon.com> +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Upstream-Status: Backport [https://code.videolan.org/videolan/libmpeg2/commit/946bf4b518aacc224f845e73708f99e394744499] +--- + libmpeg2/motion_comp_arm_s.S | 70 +++++++++++++++++------------------- + 1 file changed, 33 insertions(+), 37 deletions(-) + +diff --git a/libmpeg2/motion_comp_arm_s.S b/libmpeg2/motion_comp_arm_s.S +index c921f7c..82143f8 100644 +--- a/libmpeg2/motion_comp_arm_s.S ++++ b/libmpeg2/motion_comp_arm_s.S +@@ -30,9 +30,13 @@ MC_put_o_16_arm: + pld [r1] + stmfd sp!, {r4-r11, lr} @ R14 is also called LR + and r4, r1, #3 +- adr r5, MC_put_o_16_arm_align_jt +- add r5, r5, r4, lsl #2 +- ldr pc, [r5] ++ ldrb r4, [pc, r4] ++ add pc, pc, r4, lsl #2 ++ .byte (MC_put_o_16_arm_align0 - 0f)>>2 ++ .byte (MC_put_o_16_arm_align1 - 0f)>>2 ++ .byte (MC_put_o_16_arm_align2 - 0f)>>2 ++ .byte (MC_put_o_16_arm_align3 - 0f)>>2 ++0: + + MC_put_o_16_arm_align0: + ldmia r1, {r4-r7} +@@ -76,11 +80,6 @@ MC_put_o_16_arm_align3: + 1: PROC(24) + bne 1b + ldmfd sp!, {r4-r11, pc} @@ update PC with LR content. +-MC_put_o_16_arm_align_jt: +- .word MC_put_o_16_arm_align0 +- .word MC_put_o_16_arm_align1 +- .word MC_put_o_16_arm_align2 +- .word MC_put_o_16_arm_align3 + + @ ---------------------------------------------------------------- + .align +@@ -91,9 +90,14 @@ MC_put_o_8_arm: + pld [r1] + stmfd sp!, {r4-r10, lr} @ R14 is also called LR + and r4, r1, #3 +- adr r5, MC_put_o_8_arm_align_jt +- add r5, r5, r4, lsl #2 +- ldr pc, [r5] ++ ldrb r4, [pc, r4] ++ add pc, pc, r4, lsl #2 ++ .byte (MC_put_o_8_arm_align0 - 0f)>>2 ++ .byte (MC_put_o_8_arm_align1 - 0f)>>2 ++ .byte (MC_put_o_8_arm_align2 - 0f)>>2 ++ .byte (MC_put_o_8_arm_align3 - 0f)>>2 ++0: ++ + MC_put_o_8_arm_align0: + ldmia r1, {r4-r5} + add r1, r1, r2 +@@ -135,12 +139,6 @@ MC_put_o_8_arm_align3: + bne 1b + ldmfd sp!, {r4-r10, pc} @@ update PC with LR content. + +-MC_put_o_8_arm_align_jt: +- .word MC_put_o_8_arm_align0 +- .word MC_put_o_8_arm_align1 +- .word MC_put_o_8_arm_align2 +- .word MC_put_o_8_arm_align3 +- + @ ---------------------------------------------------------------- + .macro AVG_PW rW1, rW2 + mov \rW2, \rW2, lsl #24 +@@ -160,12 +158,17 @@ MC_put_x_16_arm: + @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height) + pld [r1] + stmfd sp!, {r4-r11,lr} @ R14 is also called LR ++ ldr r11, 0f + and r4, r1, #3 +- adr r5, MC_put_x_16_arm_align_jt +- ldr r11, [r5] + mvn r12, r11 +- add r5, r5, r4, lsl #2 +- ldr pc, [r5, #4] ++ ldrb r4, [pc, r4] ++ add pc, pc, r4, lsl #2 ++ .byte (MC_put_x_16_arm_align0 - 0f)>>2 ++ .byte (MC_put_x_16_arm_align1 - 0f)>>2 ++ .byte (MC_put_x_16_arm_align2 - 0f)>>2 ++ .byte (MC_put_x_16_arm_align3 - 0f)>>2 ++0: ++ .word 0x01010101 + + .macro ADJ_ALIGN_QW shift, R0, R1, R2, R3, R4 + mov \R0, \R0, lsr #(\shift) +@@ -238,12 +241,6 @@ MC_put_x_16_arm_align3: + add r0, r0, r2 + bne 1b + ldmfd sp!, {r4-r11,pc} @@ update PC with LR content. +-MC_put_x_16_arm_align_jt: +- .word 0x01010101 +- .word MC_put_x_16_arm_align0 +- .word MC_put_x_16_arm_align1 +- .word MC_put_x_16_arm_align2 +- .word MC_put_x_16_arm_align3 + + @ ---------------------------------------------------------------- + .align +@@ -253,12 +250,17 @@ MC_put_x_8_arm: + @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height) + pld [r1] + stmfd sp!, {r4-r11,lr} @ R14 is also called LR ++ ldr r11, 0f + and r4, r1, #3 +- adr r5, MC_put_x_8_arm_align_jt +- ldr r11, [r5] + mvn r12, r11 +- add r5, r5, r4, lsl #2 +- ldr pc, [r5, #4] ++ ldrb r4, [pc, r4] ++ add pc, pc, r4, lsl #2 ++ .byte (MC_put_x_8_arm_align0 - 0f)>>2 ++ .byte (MC_put_x_8_arm_align1 - 0f)>>2 ++ .byte (MC_put_x_8_arm_align2 - 0f)>>2 ++ .byte (MC_put_x_8_arm_align3 - 0f)>>2 ++0: ++ .word 0x01010101 + + .macro ADJ_ALIGN_DW shift, R0, R1, R2 + mov \R0, \R0, lsr #(\shift) +@@ -319,9 +321,3 @@ MC_put_x_8_arm_align3: + add r0, r0, r2 + bne 1b + ldmfd sp!, {r4-r11,pc} @@ update PC with LR content. +-MC_put_x_8_arm_align_jt: +- .word 0x01010101 +- .word MC_put_x_8_arm_align0 +- .word MC_put_x_8_arm_align1 +- .word MC_put_x_8_arm_align2 +- .word MC_put_x_8_arm_align3 diff --git a/meta/recipes-multimedia/mpeg2dec/files/0001-check-for-available-arm-optimizations.patch b/meta/recipes-multimedia/mpeg2dec/files/0001-check-for-available-arm-optimizations.patch new file mode 100644 index 0000000000..5bf68b39ee --- /dev/null +++ b/meta/recipes-multimedia/mpeg2dec/files/0001-check-for-available-arm-optimizations.patch @@ -0,0 +1,55 @@ +From cbcff58ed670c8edc0be1004384cbe0fd07d8d26 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 5 Jul 2017 18:49:21 -0700 +Subject: [PATCH 1/2] check for available arm optimizations + +Taken From +http://sources.debian.net/src/mpeg2dec/0.5.1-7/debian/patches/65_arm-test-with-compiler.patch/ + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + configure.ac | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +diff --git a/configure.ac b/configure.ac +index acdcb1e..2c0a721 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -59,7 +59,7 @@ elif test x"$GCC" = x"yes"; then + AC_TRY_CFLAGS([$TRY_CFLAGS $CFLAGS],[OPT_CFLAGS="$TRY_CFLAGS"]) + + dnl arch-specific flags +- arm_conditional=false ++ build_arm_opt=false + case "$host" in + i?86-* | k?-* | x86_64-* | amd64-*) + AC_DEFINE([ARCH_X86],,[x86 architecture]) +@@ -102,8 +102,12 @@ elif test x"$GCC" = x"yes"; then + alpha*) + AC_DEFINE([ARCH_ALPHA],,[alpha architecture]);; + arm*) +- arm_conditional=: +- AC_DEFINE([ARCH_ARM],,[ARM architecture]);; ++ AC_LANG(C) ++ AC_COMPILE_IFELSE( ++ [AC_LANG_SOURCE([[ ++ void foo(void) { __asm__ volatile("pld [r1]"); }]])], ++ build_arm_opt=true; AC_DEFINE([ARCH_ARM],,[ARM architecture]), ++ build_arm_opt=false);; + esac + elif test x"$CC" = x"tendracc"; then + dnl TenDRA portability checking compiler +@@ -123,7 +127,7 @@ else + esac + fi + +-AM_CONDITIONAL(ARCH_ARM, ${arm_conditional}) ++AM_CONDITIONAL(ARCH_ARM, test x$build_arm_opt = xtrue) + + dnl Checks for libtool - this must be done after we set cflags + AC_LIBTOOL_WIN32_DLL +-- +2.13.2 + diff --git a/meta/recipes-multimedia/mpeg2dec/files/0002-Set-visibility-of-global-symbols-used-in-ARM-specifi.patch b/meta/recipes-multimedia/mpeg2dec/files/0002-Set-visibility-of-global-symbols-used-in-ARM-specifi.patch new file mode 100644 index 0000000000..8301692368 --- /dev/null +++ b/meta/recipes-multimedia/mpeg2dec/files/0002-Set-visibility-of-global-symbols-used-in-ARM-specifi.patch @@ -0,0 +1,63 @@ +From f9d9dc92d75f8910e3cd5fdcbea72e505cdf3493 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 5 Jul 2017 19:03:36 -0700 +Subject: [PATCH 2/2] Set visibility of global symbols used in ARM specific + assembly file to internal + +Taken from +http://sources.debian.net/src/mpeg2dec/0.5.1-7/debian/patches/60_arm-private-symbols.patch/ + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + libmpeg2/motion_comp_arm_s.S | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +diff --git a/libmpeg2/motion_comp_arm_s.S b/libmpeg2/motion_comp_arm_s.S +index f6c3d7d..c921f7c 100644 +--- a/libmpeg2/motion_comp_arm_s.S ++++ b/libmpeg2/motion_comp_arm_s.S +@@ -23,7 +23,8 @@ + + @ ---------------------------------------------------------------- + .align +- .global MC_put_o_16_arm ++ .global MC_put_o_16_arm ++ .internal MC_put_o_16_arm + MC_put_o_16_arm: + @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height) + pld [r1] +@@ -83,7 +84,8 @@ MC_put_o_16_arm_align_jt: + + @ ---------------------------------------------------------------- + .align +- .global MC_put_o_8_arm ++ .global MC_put_o_8_arm ++ .internal MC_put_o_8_arm + MC_put_o_8_arm: + @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height) + pld [r1] +@@ -152,7 +154,8 @@ MC_put_o_8_arm_align_jt: + .endm + + .align +- .global MC_put_x_16_arm ++ .global MC_put_x_16_arm ++ .internal MC_put_x_16_arm + MC_put_x_16_arm: + @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height) + pld [r1] +@@ -244,7 +247,8 @@ MC_put_x_16_arm_align_jt: + + @ ---------------------------------------------------------------- + .align +- .global MC_put_x_8_arm ++ .global MC_put_x_8_arm ++ .internal MC_put_x_8_arm + MC_put_x_8_arm: + @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height) + pld [r1] +-- +2.13.2 + diff --git a/meta/recipes-multimedia/mpeg2dec/files/61_global-symbol-test.patch b/meta/recipes-multimedia/mpeg2dec/files/61_global-symbol-test.patch new file mode 100644 index 0000000000..00b667d336 --- /dev/null +++ b/meta/recipes-multimedia/mpeg2dec/files/61_global-symbol-test.patch @@ -0,0 +1,70 @@ +Rewrite the public symbol check to verify the shared libraries, to check for +more things, and to avoid duplication; fixes make check on ARM + +Taken From +https://sources.debian.org/src/mpeg2dec/0.5.1-8/debian/patches/61_global-symbol-test.patch/ + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + test/globals | 42 +++++++++++++++++++++++++++--------------- + 1 file changed, 27 insertions(+), 15 deletions(-) + +--- mpeg2dec.orig/test/globals ++++ mpeg2dec/test/globals +@@ -1,4 +1,8 @@ + #!/bin/sh ++# TODO ++# - fix checking of .a libs; problem is that "nm -g --defined-only" lists ++# internal symbols; this can be solved by using objdump, but it's probably ++# good enough to just run the tests on the shared lib + + if test x"$srcdir" != x""; then + builddir="." # running from make check, but it does not define that +@@ -14,22 +18,30 @@ builddir=`cd $builddir;pwd` + + error=0 + +-bad_globals=`nm -g --defined-only $builddir/../libmpeg2/*.o |\ +- awk '{if ($3) print $3}' | grep -v '^_\?mpeg2_'` +- +-if test x"$bad_globals" != x""; then +- echo BAD GLOBAL SYMBOLS: +- for s in $bad_globals; do echo $s; done ++# check_bad_public_symbols <symbol prefix> <lib file> [<lib file>...] ++# ++# checks public symbols in shared libs: ++# - allow prefix_anything ++# - reject _prefixanything ++# - allow _anything ++# - reject anything else ++# ++# NB: skips missing files ++check_bad_public_symbols() { ++ symbols_prefix="$1" ++ shift ++ lib_files=`ls "$@" 2>/dev/null` ++ [ -z "$lib_files" ] && return ++ bad_globals=`nm -g --defined-only $lib_files | ++ awk '{if ($3) print $3}' | ++ sed -n "/^${symbols_prefix}_/ d; /^_${symbols_prefix}/ { p; d }; /^_/ d; p"` ++ [ -z "$bad_globals" ] && return + error=1 +-fi +- +-bad_globals=`nm -g --defined-only $builddir/../libmpeg2/convert/*.o |\ +- awk '{if ($3) print $3}' | grep -v '^_\?mpeg2convert_'` ++ echo BAD GLOBAL SYMBOLS in $lib_files: ++ echo "$bad_globals" ++} + +-if test x"$bad_globals" != x""; then +- echo BAD GLOBAL SYMBOLS: +- for s in $bad_globals; do echo $s; done +- error=1 +-fi ++check_bad_public_symbols mpeg2 $builddir/../libmpeg2/.libs/libmpeg2.so ++check_bad_public_symbols mpeg2convert $builddir/../libmpeg2/convert/.libs/libmpeg2convert.so + + exit $error diff --git a/meta/recipes-multimedia/mpeg2dec/mpeg2dec-0.4.1/altivec_h_needed.patch b/meta/recipes-multimedia/mpeg2dec/files/altivec_h_needed.patch index 7dc56436f0..5113ad44fe 100644 --- a/meta/recipes-multimedia/mpeg2dec/mpeg2dec-0.4.1/altivec_h_needed.patch +++ b/meta/recipes-multimedia/mpeg2dec/files/altivec_h_needed.patch @@ -24,10 +24,10 @@ Upstream-Status: Pending Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> -diff -ruN mpeg2dec-0.4.1-orig/configure.in mpeg2dec-0.4.1/configure.in ---- mpeg2dec-0.4.1-orig/configure.in 2010-09-14 20:55:42.399687663 +0800 -+++ mpeg2dec-0.4.1/configure.in 2010-09-14 20:56:43.403204648 +0800 -@@ -75,11 +75,11 @@ +diff -ruN a/configure.in b/configure.in +--- a/configure.ac 2010-09-14 20:55:42.399687663 +0800 ++++ b/configure.ac 2010-09-14 20:56:43.403204648 +0800 +@@ -79,11 +79,11 @@ CFLAGS="$OPT_CFLAGS $TRY_CFLAGS $CFLAGS" AC_MSG_CHECKING([if <altivec.h> is needed]) AC_TRY_COMPILE([], diff --git a/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.4.1.bb b/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.4.1.bb deleted file mode 100644 index cede2bf100..0000000000 --- a/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.4.1.bb +++ /dev/null @@ -1,38 +0,0 @@ -SUMMARY = "Library and test program for decoding MPEG-2 and MPEG-1 video streams" -HOMEPAGE = "http://libmpeg2.sourceforge.net/" -SECTION = "libs" -LICENSE = "GPLv2+" -LICENSE_FLAGS = "commercial" -LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ - file://include/mpeg2.h;beginline=1;endline=22;md5=ead62602d4638329d3b5b86a55803154" - -PR = "r2" - -SRC_URI = "http://libmpeg2.sourceforge.net/files/mpeg2dec-${PV}.tar.gz \ - file://altivec_h_needed.patch" - -SRC_URI[md5sum] = "7631b0a4bcfdd0d78c0bb0083080b0dc" -SRC_URI[sha256sum] = "c74a76068f8ec36d4bb59a03bf1157be44118ca02252180e8b358b0b5e3edeee" - -inherit autotools pkgconfig - -EXTRA_OECONF = "--enable-shared --disable-sdl" - -PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" -PACKAGECONFIG[x11] = "--with-x,--without-x,virtual/libx11 libxext libxv" - -PACKAGES = "mpeg2dec-dbg mpeg2dec mpeg2dec-doc libmpeg2 libmpeg2-dev libmpeg2convert libmpeg2convert-dev libmpeg2-staticdev libmpeg2convert-staticdev" - -FILES_${PN} = "${bindir}/*" -FILES_libmpeg2 = "${libdir}/libmpeg2.so.*" -FILES_libmpeg2convert = "${libdir}/libmpeg2convert.so.*" -FILES_libmpeg2-dev = "${libdir}/libmpeg2.so \ - ${libdir}/libmpeg2.la \ - ${libdir}/pkgconfig/libmpeg2.pc \ - ${includedir}/mpeg2dec/mpeg2.h" -FILES_libmpeg2-staticdev = "${libdir}/libmpeg2.a" -FILES_libmpeg2convert-dev = "${libdir}/libmpeg2convert.so \ - ${libdir}/libmpeg2convert.la \ - ${libdir}/pkgconfig/libmpeg2convert.pc \ - ${includedir}/mpeg2dec/mpeg2convert.h" -FILES_libmpeg2convert-staticdev = "${libdir}/libmpeg2convert.a" diff --git a/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.5.1.bb b/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.5.1.bb new file mode 100644 index 0000000000..ee4b754c12 --- /dev/null +++ b/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.5.1.bb @@ -0,0 +1,51 @@ +SUMMARY = "Library and test program for decoding MPEG-2 and MPEG-1 video streams" +DESCRIPTION = "mpeg2dec is a test program for libmpeg2. It decodes \ +mpeg-1 and mpeg-2 video streams, and also includes a demultiplexer \ +for mpeg-1 and mpeg-2 program streams. The main purpose of mpeg2dec \ +is to have a simple test bed for libmpeg2." +HOMEPAGE = "https://libmpeg2.sourceforge.io/" +SECTION = "libs" +LICENSE = "GPLv2+" +LICENSE_FLAGS = "commercial" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ + file://include/mpeg2.h;beginline=1;endline=22;md5=7766f4fcb58f0f8413c49a746f2ab89b" + +SRC_URI = "http://libmpeg2.sourceforge.net/files/libmpeg2-${PV}.tar.gz \ + file://altivec_h_needed.patch \ + file://0001-check-for-available-arm-optimizations.patch \ + file://0002-Set-visibility-of-global-symbols-used-in-ARM-specifi.patch \ + file://61_global-symbol-test.patch \ + file://0001-Import-revision-1206-from-upstream-to-fix-PIE-build.patch \ + " + +S = "${WORKDIR}/libmpeg2-${PV}" + +SRC_URI[md5sum] = "0f92c7454e58379b4a5a378485bbd8ef" +SRC_URI[sha256sum] = "dee22e893cb5fc2b2b6ebd60b88478ab8556cb3b93f9a0d7ce8f3b61851871d4" + +UPSTREAM_CHECK_URI = "http://libmpeg2.sourceforge.net/downloads.html" + +inherit autotools pkgconfig + +EXTRA_OECONF = "--enable-shared --disable-sdl" + +PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" +PACKAGECONFIG[x11] = "--with-x,--without-x,virtual/libx11 libxext libxv" + +PACKAGES = "mpeg2dec-dbg mpeg2dec mpeg2dec-doc libmpeg2 libmpeg2-dev libmpeg2convert libmpeg2convert-dev libmpeg2-staticdev libmpeg2convert-staticdev" + +FILES:${PN} = "${bindir}/*" +FILES:libmpeg2 = "${libdir}/libmpeg2.so.*" +FILES:libmpeg2convert = "${libdir}/libmpeg2convert.so.*" +FILES:libmpeg2-dev = "${libdir}/libmpeg2.so \ + ${libdir}/libmpeg2.la \ + ${libdir}/libmpeg2arch.la \ + ${libdir}/pkgconfig/libmpeg2.pc \ + ${includedir}/mpeg2dec/mpeg2.h" +FILES:libmpeg2-staticdev = "${libdir}/libmpeg2.a" +FILES:libmpeg2convert-dev = "${libdir}/libmpeg2convert.so \ + ${libdir}/libmpeg2convert.la \ + ${libdir}/libmpeg2convertarch.la \ + ${libdir}/pkgconfig/libmpeg2convert.pc \ + ${includedir}/mpeg2dec/mpeg2convert.h" +FILES:libmpeg2convert-staticdev = "${libdir}/libmpeg2convert.a" diff --git a/meta/recipes-multimedia/mpg123/mpg123_1.29.2.bb b/meta/recipes-multimedia/mpg123/mpg123_1.29.2.bb new file mode 100644 index 0000000000..ba09e1c619 --- /dev/null +++ b/meta/recipes-multimedia/mpg123/mpg123_1.29.2.bb @@ -0,0 +1,52 @@ +SUMMARY = "Audio decoder for MPEG-1 Layer 1/2/3" +DESCRIPTION = "The core of mpg123 is an MPEG-1 Layer 1/2/3 decoding library, which can be used by other programs. \ +mpg123 also comes with a command-line tool which can playback using ALSA, PulseAudio, OSS, and several other APIs, \ +and also can write the decoded audio to WAV." +HOMEPAGE = "http://mpg123.de/" +BUGTRACKER = "http://sourceforge.net/p/mpg123/bugs/" +SECTION = "multimedia" + +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=e7b9c15fcfb986abb4cc5e8400a24169" + +SRC_URI = "https://www.mpg123.de/download/${BP}.tar.bz2" +SRC_URI[sha256sum] = "9071214ebdfc1b6ed0c0a85d530010bbb8ebc044cfe5ae5930e83f7e6b7937e6" + +UPSTREAM_CHECK_REGEX = "mpg123-(?P<pver>\d+(\.\d+)+)\.tar" + +inherit autotools pkgconfig + +# The options should be mutually exclusive for configuration script. +# If both alsa and pulseaudio are specified (as in the default distro features) +# pulseaudio takes precedence. +PACKAGECONFIG_ALSA = "${@bb.utils.filter('DISTRO_FEATURES', 'alsa', d)}" +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '${PACKAGECONFIG_ALSA}', d)}" + +PACKAGECONFIG[alsa] = "--with-default-audio=alsa,,alsa-lib" +PACKAGECONFIG[esd] = ",,esound" +PACKAGECONFIG[jack] = ",,jack" +PACKAGECONFIG[openal] = ",,openal-soft" +PACKAGECONFIG[portaudio] = ",,portaudio-v19" +PACKAGECONFIG[pulseaudio] = "--with-default-audio=pulse,,pulseaudio" +PACKAGECONFIG[sdl] = ",,libsdl2" + +# Following are possible sound output modules: +# alsa arts coreaudio dummy esd jack nas openal os2 oss portaudio pulse sdl sndio sun tinyalsa win32 win32_wasapi +AUDIOMODS += "${@bb.utils.filter('PACKAGECONFIG', 'alsa esd jack openal portaudio sdl', d)}" +AUDIOMODS += "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'pulse', '', d)}" + +EXTRA_OECONF = " \ + --enable-shared \ + --with-audio='${AUDIOMODS}' \ + ${@bb.utils.contains('TUNE_FEATURES', 'neon', '--with-cpu=neon', '', d)} \ + ${@bb.utils.contains('TUNE_FEATURES', 'altivec', '--with-cpu=altivec', '', d)} \ + ${@bb.utils.contains('TARGET_FPU', 'soft', '--with-cpu=generic_nofpu', '', d)} \ +" +# Fails to build with thumb-1 (qemuarm) +#| {standard input}: Assembler messages: +#| {standard input}:47: Error: selected processor does not support Thumb mode `smull r5,r6,r7,r4' +#| {standard input}:48: Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r5,r5,lsr#24' +#... +#| make[3]: *** [equalizer.lo] Error 1 +ARM_INSTRUCTION_SET:armv4 = "arm" +ARM_INSTRUCTION_SET:armv5 = "arm" diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc index 5b806d7611..4a1456d407 100644 --- a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc +++ b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc @@ -1,69 +1,131 @@ SUMMARY = "Sound server for Linux and Unix-like operating systems" +DESCRIPTION = "A general purpose sound server intended to run as a middleware \ +between your applications and your hardware devices, either using ALSA or OSS." HOMEPAGE = "http://www.pulseaudio.org" AUTHOR = "Lennart Poettering" SECTION = "libs/multimedia" -LICENSE = "GPLv2+ & LGPLv2.1" -LIC_FILES_CHKSUM = "file://GPL;md5=4325afd396febcb659c36b49533135d4 \ + +# Most of PulseAudio code is under LGPLv2.1+. There are a few exceptions: +# +# The "adrian" echo canceller variant has code under a non-standard permissive +# license. See src/modules/echo-cancel/adrian-license.txt for details. This +# recipe disables the adrian echo canceller to avoid hassle with the unusual +# license. +# +# The src/modules/reserve* and src/pulsecore/rtkit* files are under the MIT +# license. +# +# The src/pulsecore/filter/ directory contains code under the 3-clause BSD +# license. +# +# People who distribute PulseAudio binaries need to also consider that there +# are some dependencies to GPL libraries. LGPL code that depends on GPL +# libraries probably becomes effectively GPL-licensed (at compile-time? or at +# at link-time?). I'm not a lawyer, though, so I'm not sure of the exact +# implications. The GPL dependencies only affect the server, not the client +# library, with the exception of libdbus that affects both. These are the GPL +# library dependencies: +# +# One of the resampler implementations uses libsamplerate. This recipe doesn't +# enable that resampler, however. +# +# One of the database implementations uses gdbm. This recipe doesn't enable +# that database implementation, however. +# +# module-lirc (enabled by PACKAGECONFIG[lirc]) uses LIRC. +# +# module-equalizer-sink uses FFTW. This recipe disables that, however. +# +# The dependency with the most complicated licensing considerations is libdbus. +# When PACKAGECONFIG[dbus] is enabled (like it is by default), libdbus will be +# used by both the server and the client library (libpulse). Does this affect +# applications that use libpulse? It should be also noted that libdbus is +# dual-licensed: either GPLv2+ or AFL-2 terms apply. Whose decision is it which +# of the licenses apply? What a mess. Some people hold the view that libdbus is +# a system library that is covered by the "special exception" in GPLv2's +# section 3, and therefore libdbus's GPL license doesn't affect PulseAudio. +LICENSE = "LGPLv2.1+ & MIT & BSD-3-Clause" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=0e5cd938de1a7a53ea5adac38cc10c39 \ + file://GPL;md5=4325afd396febcb659c36b49533135d4 \ file://LGPL;md5=2d5025d4aa3495befef8f17206a5b0a1 \ - file://src/pulsecore/resampler.h;beginline=4;endline=21;md5=09794012ae16912c0270f3280cc8ff84" + file://src/modules/echo-cancel/adrian-license.txt;md5=abbab006a561fbffccedf1c3531f34ab \ + file://src/pulsecore/filter/LICENSE.WEBKIT;md5=49defbaffddf8c51faf606ff7fc3b1f7 \ + file://src/pulsecore/resampler.h;beginline=4;endline=21;md5=09794012ae16912c0270f3280cc8ff84 \ + file://src/modules/reserve.h;beginline=6;endline=28;md5=0e23094760367d51b6609750e9b31fbb \ + file://src/pulsecore/rtkit.h;beginline=6;endline=29;md5=3f00ff966716ae0817c31576d1473528 \ + file://src/modules/echo-cancel/adrian-aec.h;beginline=3;endline=12;md5=d3ed4fad1c073f8b06f37495dc5d1026 \ + file://src/pulsecore/filter/biquad.h;beginline=1;endline=4;md5=6d46d1365206528a20137355924233c1 \ +" -DEPENDS = "libatomic-ops liboil libsndfile1 libtool" +# libtool is needed for libltdl, used in module loading. +DEPENDS = "libatomic-ops libsndfile1 libtool" # optional -DEPENDS += "udev alsa-lib glib-2.0 gconf" -DEPENDS += "json-c gdbm speexdsp libxml-parser-perl-native libcap" +DEPENDS += "udev alsa-lib glib-2.0" +DEPENDS += "speexdsp libxml-parser-perl-native libcap" -inherit autotools pkgconfig useradd gettext perlnative bluetooth systemd +inherit bash-completion meson pkgconfig useradd gettext perlnative systemd manpages gsettings # *.desktop rules wont be generated during configure and build will fail # if using --disable-nls USE_NLS = "yes" -EXTRA_OECONF = "\ - --disable-hal-compat \ - --disable-orc \ - --enable-tcpwrap=no \ - --with-access-group=audio \ - --disable-openssl \ - --disable-xen \ - --with-database=simple \ - --without-fftw \ - --without-zsh-completion-dir \ - --with-udev-rules-dir=`pkg-config --variable=udevdir udev`/rules.d \ - ac_cv_header_valgrind_memcheck_h=no \ +EXTRA_OEMESON = "\ + -Dhal-compat=false \ + -Dorc=disabled \ + -Daccess_group=audio \ + -Dopenssl=disabled \ + -Ddatabase=simple \ + -Dzshcompletiondir=no \ + -Dudevrulesdir=`pkg-config --variable=udevdir udev`/rules.d \ + -Dvalgrind=disabled \ + -Dtests=false \ + -Drunning-from-build-tree=false \ " -PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)} \ +# soxr (the SoX Resampler library) doesn't seem to be currently packaged in +# oe-core nor meta-oe, so let's not add a PACKAGECONFIG entry for it for now. +EXTRA_OEMESON += "-Dsoxr=disabled" + +# The FFTW dependency (for module-equalizer-sink) was removed in commit +# ddbd713293 without explaining why it was not made a PACKAGECONFIG item +# instead. Oh well, let's keep it disabled until someone expresses some +# interest in having it enabled. +EXTRA_OEMESON += "-Dfftw=disabled" + +# The "adrian" echo canceller implementation has a non-standard license +# (src/modules/echo-cancel/adrian-license.txt). It's a permissive license, so +# the licensing terms are probably not problematic, but it would be an extra +# hassle to add the license to OE-Core's set of licenses. The canceller isn't +# very good anyway, better alternatives exist (such as the webrtc canceller). +EXTRA_OEMESON += "-Dadrian-aec=false" + +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez5', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', '3g', 'ofono', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \ - dbus \ + ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 systemd x11', d)} \ + dbus gsettings \ " -PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus" -PACKAGECONFIG[bluez4] = "--enable-bluez4,--disable-bluez4,bluez4 sbc" -PACKAGECONFIG[bluez5] = "--enable-bluez5,--disable-bluez5,bluez5 sbc" -PACKAGECONFIG[ofono] = "--enable-bluez5-ofono-headset,--disable-bluez5-ofono-headset,ofono" -PACKAGECONFIG[gtk] = "--enable-gtk3,--disable-gtk3,gtk+3" -PACKAGECONFIG[systemd] = "--enable-systemd-daemon --enable-systemd-login --enable-systemd-journal --with-systemduserunitdir=${systemd_user_unitdir},--disable-systemd-daemon --disable-systemd-login --disable-systemd-journal,systemd" -PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11 libxtst libice libsm libxcb" -PACKAGECONFIG[avahi] = "--enable-avahi,--disable-avahi,avahi" -PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack" +PACKAGECONFIG[dbus] = "-Ddbus=enabled,-Ddbus=disabled,dbus" +PACKAGECONFIG[bluez5] = "-Dbluez5=enabled,-Dbluez5=disabled,bluez5 sbc" +PACKAGECONFIG[gsettings] = "-Dgsettings=enabled,-Dgsettings=disabled,glib-2.0-native glib-2.0" +PACKAGECONFIG[ofono] = "-Dbluez5-ofono-headset=true,-Dbluez5-ofono-headset=false,ofono" +PACKAGECONFIG[gtk] = "-Dgtk=enabled,-Dgtk=disabled,gtk+3" +PACKAGECONFIG[systemd] = "-Dsystemd=enabled -Dsystemduserunitdir=${systemd_user_unitdir},-Dsystemd=disabled,systemd" +PACKAGECONFIG[x11] = "-Dx11=enabled,-Dx11=disabled,virtual/libx11 libxtst libice libsm libxcb" +PACKAGECONFIG[avahi] = "-Davahi=enabled,-Davahi=disabled,avahi" +PACKAGECONFIG[jack] = "-Djack=enabled,-Djack=disabled,jack" # Since many embedded systems don't have non-root users, it's useful to be # able to use pulseaudio autospawn for root as well. PACKAGECONFIG[autospawn-for-root] = ",,," - -EXTRA_OECONF_append_arm = "${@bb.utils.contains("TUNE_FEATURES", "neon", "", " --enable-neon-opt=no", d)}" -EXTRA_OECONF_append_armeb = "${@bb.utils.contains("TUNE_FEATURES", "neon", "", " --enable-neon-opt=no", d)}" - +PACKAGECONFIG[lirc] = "-Dlirc=enabled,-Dlirc=disabled,lirc" +PACKAGECONFIG[webrtc] = "-Dwebrtc-aec=enabled,-Dwebrtc-aec=disabled,webrtc-audio-processing" +PACKAGECONFIG[ipv6] = "-Dipv6=true,-Dipv6=false," +PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false," export TARGET_PFPU = "${TARGET_FPU}" -# TODO: Use more fine granular version -#OE_LT_RPATH_ALLOW=":${libdir}/pulse-0.9:" -OE_LT_RPATH_ALLOW = "any" -OE_LT_RPATH_ALLOW[export]="1" - set_cfg_value () { sed -i -e "s/\(; *\)\?$2 =.*/$2 = $3/" "$1" if ! grep -q "^$2 = $3\$" "$1"; then @@ -71,83 +133,100 @@ set_cfg_value () { fi } -do_compile_append () { +do_compile:append () { if ${@bb.utils.contains('PACKAGECONFIG', 'autospawn-for-root', 'true', 'false', d)}; then - set_cfg_value src/client.conf allow-autospawn-for-root yes + set_cfg_value src/pulse/client.conf allow-autospawn-for-root yes fi } -do_install_append() { +do_install:append() { install -d ${D}${sysconfdir}/default/volatiles - install -m 0644 ${WORKDIR}/volatiles.04_pulse ${D}${sysconfdir}/default/volatiles/volatiles.04_pulse + install -m 0644 ${WORKDIR}/volatiles.04_pulse ${D}${sysconfdir}/default/volatiles/04_pulse } USERADD_PACKAGES = "pulseaudio-server" -GROUPADD_PARAM_pulseaudio-server = "pulse" -USERADD_PARAM_pulseaudio-server = "--system --home /var/run/pulse \ +GROUPADD_PARAM:pulseaudio-server = "--system pulse" +USERADD_PARAM:pulseaudio-server = "--system --home /var/run/pulse \ --no-create-home --shell /bin/false \ --groups audio,pulse --gid pulse pulse" +PACKAGES =+ "\ + libpulse \ + libpulse-mainloop-glib \ + libpulse-simple \ + libpulsecommon \ + libpulsecore \ + ${PN}-pa-info \ + ${PN}-server \ + ${PN}-misc \ + " + # The console-kit module is included here explicitly so bitbake can map to the # RDEPENDS we define for it in this recipe, and thereby ensure that when # adding the console-kit module to an image, we also get the necessary # consolekit package produced. -PACKAGES =+ "libpulsecore libpulsecommon libpulse libpulse-simple libpulse-mainloop-glib \ - pulseaudio-server pulseaudio-misc ${@bb.utils.contains('PACKAGECONFIG', 'dbus', 'pulseaudio-module-console-kit', '', d)}" +PACKAGES =+ "${@bb.utils.contains('PACKAGECONFIG', 'dbus', 'pulseaudio-module-console-kit', '', d)}" #upgrade path: -RREPLACES_pulseaudio-server = "libpulse-bin libpulse-conf" +RREPLACES:pulseaudio-server = "libpulse-bin libpulse-conf" PACKAGES_DYNAMIC += "^pulseaudio-lib-.* ^pulseaudio-module-.*" -FILES_libpulsecore = "${libdir}/libpulsecore*.so" -FILES_libpulsecommon = "${libdir}/pulseaudio/libpulsecommon*.so" +FILES:libpulsecore = "${libdir}/pulseaudio/libpulsecore*.so" +FILES:libpulsecommon = "${libdir}/pulseaudio/libpulsecommon*.so" # client.conf configures the behaviour of libpulse, so it belongs in the same # package. -FILES_libpulse = "${libdir}/libpulse.so.* ${sysconfdir}/pulse/client.conf" +FILES:libpulse = "${libdir}/libpulse.so.* ${sysconfdir}/pulse/client.conf" -FILES_libpulse-simple = "${libdir}/libpulse-simple.so.*" -FILES_libpulse-mainloop-glib = "${libdir}/libpulse-mainloop-glib.so.*" +FILES:libpulse-simple = "${libdir}/libpulse-simple.so.*" +FILES:libpulse-mainloop-glib = "${libdir}/libpulse-mainloop-glib.so.*" -FILES_${PN}-dbg += "${libexecdir}/pulse/.debug \ - ${libdir}/pulse-${PV}/modules/.debug" -FILES_${PN}-dev += "${libdir}/pulse-${PV}/modules/*.la ${datadir}/vala ${libdir}/cmake" -FILES_${PN}-conf = "${sysconfdir}" -FILES_${PN}-bin += "${sysconfdir}/default/volatiles/volatiles.04_pulse" -FILES_${PN}-server = "${bindir}/pulseaudio ${bindir}/start-* ${sysconfdir} ${bindir}/pactl */udev/rules.d/*.rules */*/udev/rules.d/*.rules ${systemd_user_unitdir}/*" +FILES:${PN}-dev += "${libdir}/pulse-${PV}/modules/*.la ${datadir}/vala" +FILES:${PN}-bin += "${sysconfdir}/default/volatiles/04_pulse" +FILES:${PN}-pa-info = "${bindir}/pa-info" +FILES:${PN}-server = "${bindir}/pulseaudio ${bindir}/start-* ${sysconfdir} ${bindir}/pactl */udev/rules.d/*.rules */*/udev/rules.d/*.rules ${systemd_user_unitdir}/*" #SYSTEMD_PACKAGES = "${PN}-server" -SYSTEMD_SERVICE_${PN}-server = "pulseaudio.service" +SYSTEMD_SERVICE:${PN}-server = "pulseaudio.service" -FILES_${PN}-misc = "${bindir}/* ${libdir}/pulseaudio/libpulsedsp.so" +FILES:${PN}-misc = "${bindir}/* ${libdir}/pulseaudio/libpulsedsp.so" # Allow the pulseaudio package to be created empty as a placeholder (-dbg and -dev depend on it) -ALLOW_EMPTY_${PN} = "1" +FILES:${PN} = "" +ALLOW_EMPTY:${PN} = "1" -CONFFILES_libpulse = "${sysconfdir}/pulse/client.conf" +CONFFILES:libpulse = "${sysconfdir}/pulse/client.conf" -CONFFILES_pulseaudio-server = "\ +CONFFILES:pulseaudio-server = "\ ${sysconfdir}/pulse/default.pa \ ${sysconfdir}/pulse/daemon.conf \ ${sysconfdir}/pulse/system.pa \ " -pkg_postinst_${PN}-server() { +pkg_postinst:${PN}-server() { if [ -z "$D" ] && [ -e ${sysconfdir}/init.d/populate-volatile.sh ] ; then ${sysconfdir}/init.d/populate-volatile.sh update fi } -python populate_packages_prepend() { - #d.setVar('PKG_pulseaudio', 'pulseaudio') - +python populate_packages:prepend() { plugindir = d.expand('${libdir}/pulse-${PV}/modules/') - do_split_packages(d, plugindir, '^module-(.*)\.so$', 'pulseaudio-module-%s', 'PulseAudio module for %s', extra_depends='', prepend=True) - do_split_packages(d, plugindir, '^lib(.*)\.so$', 'pulseaudio-lib-%s', 'PulseAudio library for %s', extra_depends='', prepend=True) + do_split_packages(d, plugindir, r'^module-(.*)\.so$', '${PN}-module-%s', 'PulseAudio module for %s', extra_depends='', prepend=True) + do_split_packages(d, plugindir, r'^lib(.*)\.so$', '${PN}-lib-%s', 'PulseAudio library for %s', extra_depends='', prepend=True) } -RDEPENDS_pulseaudio-server = " \ +# pa-info is a bash script that collects information about the audio setup. +# It's primarily useful for attaching an information dump when reporting bugs. +RDEPENDS:${PN}-pa-info = "\ + alsa-utils-amixer \ + alsa-utils-aplay \ + alsa-utils-scripts \ + bash \ + ${PN}-server \ + " + +RDEPENDS:pulseaudio-server = " \ pulseaudio-module-filter-apply \ pulseaudio-module-filter-heuristics \ pulseaudio-module-udev-detect \ @@ -173,25 +252,30 @@ RDEPENDS_pulseaudio-server = " \ # If the server is installed, it's usually desirable to make ALSA applications # use PulseAudio. alsa-plugins-pulseaudio-conf will install the configuration # that makes the PulseAudio plugin the default ALSA device. -RDEPENDS_pulseaudio-server += "alsa-plugins-pulseaudio-conf" +RDEPENDS:pulseaudio-server += "alsa-plugins-pulseaudio-conf" # pulseaudio-module-console-kit is built whenever dbus is enabled by PACKAGECONFIG # but consolekit depends on libx11 and is available only for DISTRO with x11 in DISTRO_FEATURES -RDEPENDS_pulseaudio-module-console-kit =+ "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d)}" -RDEPENDS_pulseaudio-misc += "pulseaudio-module-cli-protocol-unix" +RDEPENDS:pulseaudio-module-console-kit =+ "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d)}" +RDEPENDS:pulseaudio-misc += "pulseaudio-module-cli-protocol-unix" + +FILES:${PN}-module-alsa-card += "${datadir}/pulseaudio/alsa-mixer" -FILES_pulseaudio-module-gconf += "${libexecdir}/pulse/gconf-helper" -FILES_pulseaudio-module-alsa-card += "${datadir}/pulseaudio/alsa-mixer" +GSETTINGS_PACKAGE = "${@bb.utils.contains('PACKAGECONFIG', 'gsettings', '${PN}-module-gsettings', '', d)}" +FILES:${PN}-module-gsettings += "${libexecdir}/pulse/gsettings-helper ${datadir}/GConf/gsettings ${datadir}/glib-2.0/schemas" # The console-kit module is good to have on X11 systems (it keeps PulseAudio # running for the duration of the user login session). The device-manager and # x11-* modules are referenced from the start-pulseaudio-x11 script, so those # modules must be installed when X11 is enabled. -RDEPENDS_pulseaudio-server += "\ +RDEPENDS:pulseaudio-server += "\ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '\ - pulseaudio-module-console-kit \ pulseaudio-module-device-manager \ pulseaudio-module-x11-cork-request \ pulseaudio-module-x11-publish \ pulseaudio-module-x11-xsmp \ ', '', d)}" + +RDEPENDS:pulseaudio-server += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', \ + bb.utils.contains('DISTRO_FEATURES', 'systemd', 'pulseaudio-module-systemd-login', 'pulseaudio-module-console-kit', d), \ + '', d)}" diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-client-conf-Add-allow-autospawn-for-root.patch b/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-client-conf-Add-allow-autospawn-for-root.patch index d19eb7c19b..33f7709ae4 100644 --- a/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-client-conf-Add-allow-autospawn-for-root.patch +++ b/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-client-conf-Add-allow-autospawn-for-root.patch @@ -1,4 +1,4 @@ -From 1cb5647f76dc8cd7bacbce2a64fac9e6c2dc3b16 Mon Sep 17 00:00:00 2001 +From babec3a50dd710d26b72f6c6d43bd79b04e954a6 Mon Sep 17 00:00:00 2001 From: Tanu Kaskinen <tanu.kaskinen@linux.intel.com> Date: Tue, 28 Apr 2015 14:32:43 +0300 Subject: [PATCH] client-conf: Add allow-autospawn-for-root @@ -7,7 +7,12 @@ Usually autospawning for root is a bad idea, since it can easily interfere with other users' PulseAudio instances, but in embedded environments where only root exists, autospawning is fine. -Upstream-Status: Submitted [http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/23549] +Upstream-Status: Denied [Upstream hasn't so far been convinced that +this feature is needed. The view is that running the graphical session +as root doesn't make sense even on embedded systems, or if it does, +running PulseAudio in the system mode should be a good solution for +that use case. If someone can prove otherwise, the patch would +probably be accepted.] Signed-off-by: Tanu Kaskinen <tanu.kaskinen@linux.intel.com> --- @@ -19,10 +24,10 @@ Signed-off-by: Tanu Kaskinen <tanu.kaskinen@linux.intel.com> 5 files changed, 13 insertions(+), 1 deletion(-) diff --git a/man/pulse-client.conf.5.xml.in b/man/pulse-client.conf.5.xml.in -index 1002dbe..0058490 100644 +index b88898c..e737c96 100644 --- a/man/pulse-client.conf.5.xml.in +++ b/man/pulse-client.conf.5.xml.in -@@ -71,6 +71,15 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>. +@@ -82,6 +82,15 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>. </option> <option> @@ -39,7 +44,7 @@ index 1002dbe..0058490 100644 run when autospawning. Defaults to a path configured at compile time.</p> diff --git a/src/pulse/client-conf.c b/src/pulse/client-conf.c -index 83331f8..0474583 100644 +index a3c9486..9f68ee5 100644 --- a/src/pulse/client-conf.c +++ b/src/pulse/client-conf.c @@ -138,6 +138,7 @@ void pa_client_conf_load(pa_client_conf *c, bool load_from_x11, bool load_from_e @@ -51,13 +56,13 @@ index 83331f8..0474583 100644 { "disable-shm", pa_config_parse_bool, &c->disable_shm, NULL }, { "enable-shm", pa_config_parse_not_bool, &c->disable_shm, NULL }, diff --git a/src/pulse/client-conf.h b/src/pulse/client-conf.h -index eac705a..131393a 100644 +index 7691ec7..19db7ed 100644 --- a/src/pulse/client-conf.h +++ b/src/pulse/client-conf.h @@ -38,6 +38,7 @@ typedef struct pa_client_conf { char *cookie_file_from_application; char *cookie_file_from_client_conf; - bool autospawn, disable_shm, auto_connect_localhost, auto_connect_display; + bool autospawn, disable_shm, disable_memfd, auto_connect_localhost, auto_connect_display; + bool allow_autospawn_for_root; size_t shm_size; } pa_client_conf; @@ -75,10 +80,10 @@ index 26b7790..69830ef 100644 ; extra-arguments = --log-target=syslog diff --git a/src/pulse/context.c b/src/pulse/context.c -index 4bc445f..d6c3f6d 100644 +index 69be5f4..d6e13e8 100644 --- a/src/pulse/context.c +++ b/src/pulse/context.c -@@ -976,7 +976,7 @@ int pa_context_connect( +@@ -1027,7 +1027,7 @@ int pa_context_connect( if (!(flags & PA_CONTEXT_NOAUTOSPAWN) && c->conf->autospawn) { #ifdef HAVE_GETUID @@ -88,5 +93,5 @@ index 4bc445f..d6c3f6d 100644 else { c->do_autospawn = true; -- -1.9.3 +2.8.1 diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-conf-parser-add-support-for-.d-directories.patch b/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-conf-parser-add-support-for-.d-directories.patch deleted file mode 100644 index a9f1b2acf3..0000000000 --- a/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-conf-parser-add-support-for-.d-directories.patch +++ /dev/null @@ -1,196 +0,0 @@ -From 8cb643bbf0a287d67794e680d26f49c503f31053 Mon Sep 17 00:00:00 2001 -From: Tanu Kaskinen <tanu.kaskinen@linux.intel.com> -Date: Thu, 21 May 2015 21:00:59 +0300 -Subject: [PATCH] conf-parser: add support for .d directories - -This allows a configuration scheme where prior to loading -configuration from "somefile", the parser first loads configuration -from files in directory "somefile.d". This feature is currently -enabled only for client.conf and daemon.conf. - -This makes it easier to create configuration packages in distributions -when there's need to have different configuration in different setups. -For example, the graphical Sato environment in OpenEmbedded-core needs -to set allow-autospawn-for-root=true in client.conf, but the default -configuration in OpenEmbedded-core should not set that option. With -this patch, I can create a Sato-specific package that simply installs -50-sato.conf in /etc/pulse/client.conf.d without conflicting with the -main client.conf file coming from a different package. - -Upstream-Status: Submitted [http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/23592] - -Signed-off-by: Tanu Kaskinen <tanu.kaskinen@linux.intel.com> ---- - src/daemon/daemon-conf.c | 2 +- - src/modules/alsa/alsa-mixer.c | 4 ++-- - src/modules/module-augment-properties.c | 2 +- - src/pulse/client-conf.c | 2 +- - src/pulsecore/conf-parser.c | 42 +++++++++++++++++++++++++++++++-- - src/pulsecore/conf-parser.h | 8 ++++++- - 6 files changed, 52 insertions(+), 8 deletions(-) - -diff --git a/src/daemon/daemon-conf.c b/src/daemon/daemon-conf.c -index 21a8edb..1332fc6 100644 ---- a/src/daemon/daemon-conf.c -+++ b/src/daemon/daemon-conf.c -@@ -617,7 +617,7 @@ int pa_daemon_conf_load(pa_daemon_conf *c, const char *filename) { - ci.default_channel_map_set = ci.default_sample_spec_set = false; - ci.conf = c; - -- r = f ? pa_config_parse(c->config_file, f, table, NULL, NULL) : 0; -+ r = f ? pa_config_parse(c->config_file, f, table, NULL, true, NULL) : 0; - - if (r >= 0) { - -diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c -index 2314612..988b4fe 100644 ---- a/src/modules/alsa/alsa-mixer.c -+++ b/src/modules/alsa/alsa-mixer.c -@@ -2483,7 +2483,7 @@ pa_alsa_path* pa_alsa_path_new(const char *paths_dir, const char *fname, pa_alsa - - fn = pa_maybe_prefix_path(fname, paths_dir); - -- r = pa_config_parse(fn, NULL, items, p->proplist, p); -+ r = pa_config_parse(fn, NULL, items, p->proplist, false, p); - pa_xfree(fn); - - if (r < 0) -@@ -4288,7 +4288,7 @@ pa_alsa_profile_set* pa_alsa_profile_set_new(const char *fname, const pa_channel - pa_run_from_build_tree() ? PA_SRCDIR "/modules/alsa/mixer/profile-sets/" : - PA_ALSA_PROFILE_SETS_DIR); - -- r = pa_config_parse(fn, NULL, items, NULL, ps); -+ r = pa_config_parse(fn, NULL, items, NULL, false, ps); - pa_xfree(fn); - - if (r < 0) -diff --git a/src/modules/module-augment-properties.c b/src/modules/module-augment-properties.c -index 42b6fd9..541f0e7 100644 ---- a/src/modules/module-augment-properties.c -+++ b/src/modules/module-augment-properties.c -@@ -204,7 +204,7 @@ static void update_rule(struct rule *r) { - table[0].data = &r->application_name; - table[1].data = &r->icon_name; - -- if (pa_config_parse(fn, NULL, table, NULL, r) < 0) -+ if (pa_config_parse(fn, NULL, table, NULL, false, r) < 0) - pa_log_warn("Failed to parse .desktop file %s.", fn); - - pa_xfree(fn); -diff --git a/src/pulse/client-conf.c b/src/pulse/client-conf.c -index 83331f8..3c3384d 100644 ---- a/src/pulse/client-conf.c -+++ b/src/pulse/client-conf.c -@@ -149,7 +149,7 @@ void pa_client_conf_load(pa_client_conf *c, bool load_from_x11, bool load_from_e - - f = pa_open_config_file(DEFAULT_CLIENT_CONFIG_FILE, DEFAULT_CLIENT_CONFIG_FILE_USER, ENV_CLIENT_CONFIG_FILE, &fn); - if (f) { -- pa_config_parse(fn, f, table, NULL, NULL); -+ pa_config_parse(fn, f, table, NULL, true, NULL); - pa_xfree(fn); - fclose(f); - } -diff --git a/src/pulsecore/conf-parser.c b/src/pulsecore/conf-parser.c -index 2dcd45a..d473232 100644 ---- a/src/pulsecore/conf-parser.c -+++ b/src/pulsecore/conf-parser.c -@@ -21,6 +21,7 @@ - #include <config.h> - #endif - -+#include <dirent.h> - #include <string.h> - #include <stdio.h> - #include <errno.h> -@@ -103,7 +104,7 @@ static int parse_line(pa_config_parser_state *state) { - } - } - -- r = pa_config_parse(fn, NULL, state->item_table, state->proplist, state->userdata); -+ r = pa_config_parse(fn, NULL, state->item_table, state->proplist, false, state->userdata); - pa_xfree(path); - return r; - } -@@ -152,8 +153,13 @@ static int parse_line(pa_config_parser_state *state) { - return normal_assignment(state); - } - -+static int conf_filter(const struct dirent *entry) { -+ return pa_endswith(entry->d_name, ".conf"); -+} -+ - /* Go through the file and parse each line */ --int pa_config_parse(const char *filename, FILE *f, const pa_config_item *t, pa_proplist *proplist, void *userdata) { -+int pa_config_parse(const char *filename, FILE *f, const pa_config_item *t, pa_proplist *proplist, bool use_dot_d, -+ void *userdata) { - int r = -1; - bool do_close = !f; - pa_config_parser_state state; -@@ -163,6 +169,38 @@ int pa_config_parse(const char *filename, FILE *f, const pa_config_item *t, pa_p - - pa_zero(state); - -+ if (use_dot_d) { -+ char *dir_name; -+ int n; -+ struct dirent **entries = NULL; -+ -+ dir_name = pa_sprintf_malloc("%s.d", filename); -+ -+ n = scandir(dir_name, &entries, conf_filter, alphasort); -+ if (n >= 0) { -+ int i; -+ -+ for (i = 0; i < n; i++) { -+ char *filename2; -+ -+ filename2 = pa_sprintf_malloc("%s" PA_PATH_SEP "%s", dir_name, entries[i]->d_name); -+ pa_config_parse(filename2, NULL, t, proplist, false, userdata); -+ pa_xfree(filename2); -+ -+ free(entries[i]); -+ } -+ -+ free(entries); -+ } else { -+ if (errno == ENOENT) -+ pa_log_debug("scandir(\"%s\") failed: %s", dir_name, pa_cstrerror(errno)); -+ else -+ pa_log_warn("scandir(\"%s\") failed: %s", dir_name, pa_cstrerror(errno)); -+ } -+ -+ pa_xfree(dir_name); -+ } -+ - if (!f && !(f = pa_fopen_cloexec(filename, "r"))) { - if (errno == ENOENT) { - pa_log_debug("Failed to open configuration file '%s': %s", filename, pa_cstrerror(errno)); -diff --git a/src/pulsecore/conf-parser.h b/src/pulsecore/conf-parser.h -index dbb6f5c..cc20d7d 100644 ---- a/src/pulsecore/conf-parser.h -+++ b/src/pulsecore/conf-parser.h -@@ -59,6 +59,11 @@ struct pa_config_parser_state { - * pa_config_items in *t that is terminated by an item where lvalue is - * NULL. - * -+ * If use_dot_d is true, then before parsing the file named by the filename -+ * argument, the function will parse all files ending with ".conf" in -+ * alphabetical order from a directory whose name is filename + ".d", if such -+ * directory exists. -+ * - * Some configuration files may contain a Properties section, which - * is a bit special. Normally all accepted lvalues must be predefined - * in the pa_config_item table, but in the Properties section the -@@ -68,7 +73,8 @@ struct pa_config_parser_state { - * properties, and those properties will be merged into the given - * proplist. If proplist is NULL, then sections named "Properties" - * are not allowed at all in the configuration file. */ --int pa_config_parse(const char *filename, FILE *f, const pa_config_item *t, pa_proplist *proplist, void *userdata); -+int pa_config_parse(const char *filename, FILE *f, const pa_config_item *t, pa_proplist *proplist, bool use_dot_d, -+ void *userdata); - - /* Generic parsers for integers, size_t, booleans and strings */ - int pa_config_parse_int(pa_config_parser_state *state); --- -1.9.3 - diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-doxygen-meson.build-remove-dependency-on-doxygen-bin.patch b/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-doxygen-meson.build-remove-dependency-on-doxygen-bin.patch new file mode 100644 index 0000000000..b1a43bd7f0 --- /dev/null +++ b/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-doxygen-meson.build-remove-dependency-on-doxygen-bin.patch @@ -0,0 +1,26 @@ +From 4ee244d0824e772ab35abb0f9df5e8088e16fc5d Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Mon, 26 Apr 2021 19:30:40 +0200 +Subject: [PATCH] doxygen/meson.build: remove dependency on doxygen binary + +New meson refuses to complete confuguration if doxygen is absent +even if this target is never actually run. As we never run it, +let's remove it, until upstream and/or meson figure out that it's +optional and should be treated as such. + +Upstream-Status: Inappropriate [needs proper upstream fix] +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + doxygen/meson.build | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/doxygen/meson.build b/doxygen/meson.build +index afc0e49..df55c83 100644 +--- a/doxygen/meson.build ++++ b/doxygen/meson.build +@@ -6,5 +6,3 @@ doxygen_conf = configure_file( + configuration : cdata, + ) + +-run_target('doxygen', +- command : ['doxygen', doxygen_conf]) diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-meson-Check-for-__get_cpuid.patch b/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-meson-Check-for-__get_cpuid.patch new file mode 100644 index 0000000000..c9d8abcbf2 --- /dev/null +++ b/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-meson-Check-for-__get_cpuid.patch @@ -0,0 +1,82 @@ +From 9d0dc8aedd08d77797f90fa6075a59613f18bf0d Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 20 Dec 2020 07:56:07 -0800 +Subject: [PATCH] meson: Check for __get_cpuid + +checking for presence of cpuid.h header alone is not sufficient in some case to use +cpuid related functions. e.g. when using clang which is built for +multiple targets will have cpuid.h header as part of compiler headers in +distribution but one maybe compiling pulseaudion for non-x86 target. The +current check in meson succeeds and then compile fails later because +cpuid.h is x86-specific header. Therefore checking for symbol that is +needed makes this robust, so even if header exist it will try to ensure +the given symbol can be used + +Fixes +src/pulsecore/core-util.c:113: +| /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/pulseaudio/14.0-r0/recipe-sysroot-native/usr/lib/clang/11.0.1/include/cpuid.h:11:2: error: this header is for x86 only +| #error this header is for x86 only +| ^ + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Cc: Tanu Kaskinen <tanuk@iki.fi> +--- + meson.build | 5 ++++- + src/pulsecore/core-util.c | 2 +- + src/pulsecore/cpu-x86.c | 2 +- + 3 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/meson.build b/meson.build +index 2589627..5f5127e 100644 +--- a/meson.build ++++ b/meson.build +@@ -185,7 +185,6 @@ endif + check_headers = [ + 'arpa/inet.h', + 'byteswap.h', +- 'cpuid.h', + 'dlfcn.h', + 'execinfo.h', + 'grp.h', +@@ -243,6 +242,10 @@ if cc.has_header_symbol('pthread.h', 'PTHREAD_PRIO_INHERIT') + cdata.set('HAVE_PTHREAD_PRIO_INHERIT', 1) + endif + ++if cc.has_header_symbol('cpuid.h', '__get_cpuid') ++ cdata.set('HAVE_GET_CPUID', 1) ++endif ++ + # Functions + + check_functions = [ +diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c +index 601b1d1..6f34e7c 100644 +--- a/src/pulsecore/core-util.c ++++ b/src/pulsecore/core-util.c +@@ -109,7 +109,7 @@ + #include <sys/personality.h> + #endif + +-#ifdef HAVE_CPUID_H ++#ifdef HAVE_GET_CPUID + #include <cpuid.h> + #endif + +diff --git a/src/pulsecore/cpu-x86.c b/src/pulsecore/cpu-x86.c +index 4e59e14..86595d4 100644 +--- a/src/pulsecore/cpu-x86.c ++++ b/src/pulsecore/cpu-x86.c +@@ -24,7 +24,7 @@ + + #include <stdint.h> + +-#ifdef HAVE_CPUID_H ++#ifdef HAVE_GET_CPUID + #include <cpuid.h> + #endif + +-- +2.29.2 + diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-padsp-Make-it-compile-on-musl.patch b/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-padsp-Make-it-compile-on-musl.patch deleted file mode 100644 index 85559950e8..0000000000 --- a/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-padsp-Make-it-compile-on-musl.patch +++ /dev/null @@ -1,70 +0,0 @@ -From f6ab3c3aa7a1841c8add04828029356d2a8c88e7 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 6 Apr 2015 21:56:31 -0700 -Subject: [PATCH] padsp: Make it compile on musl - -break assumptions on glibc and there is no stat64 on non -glibc C libraries - -See pulseaudio bug - -https://bugs.freedesktop.org/show_bug.cgi?id=85319 - -Upstream-Status: Pending -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/utils/padsp.c | 15 +++++++++------ - 1 file changed, 9 insertions(+), 6 deletions(-) - -diff --git a/src/utils/padsp.c b/src/utils/padsp.c -index e61373c..684721a 100644 ---- a/src/utils/padsp.c -+++ b/src/utils/padsp.c -@@ -2368,7 +2368,7 @@ fail: - return ret; - } - --#ifdef sun -+#ifndef __GLIBC__ - int ioctl(int fd, int request, ...) { - #else - int ioctl(int fd, unsigned long request, ...) { -@@ -2508,10 +2508,13 @@ int stat(const char *pathname, struct stat *buf) { - - return 0; - } -- - #ifdef HAVE_OPEN64 -- -+#undef stat64 -+#ifdef __GLIBC__ - int stat64(const char *pathname, struct stat64 *buf) { -+#else -+int stat64(const char *pathname, struct stat *buf) { -+#endif - struct stat oldbuf; - int ret; - -@@ -2544,7 +2547,7 @@ int stat64(const char *pathname, struct stat64 *buf) { - - return 0; - } -- -+#undef open64 - int open64(const char *filename, int flags, ...) { - va_list args; - mode_t mode = 0; -@@ -2670,8 +2673,8 @@ FILE* fopen(const char *filename, const char *mode) { - } - - #ifdef HAVE_OPEN64 -- --FILE *fopen64(const char *filename, const char *mode) { -+#undef fopen64 -+FILE *fopen64(const char *__restrict filename, const char *__restrict mode) { - - debug(DEBUG_LEVEL_VERBOSE, __FILE__": fopen64(%s)\n", filename?filename:"NULL"); - --- -2.1.4 - diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-do-not-display-CLFAGS-to-improve-reproducibility-bui.patch b/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-do-not-display-CLFAGS-to-improve-reproducibility-bui.patch new file mode 100644 index 0000000000..48f0492177 --- /dev/null +++ b/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-do-not-display-CLFAGS-to-improve-reproducibility-bui.patch @@ -0,0 +1,30 @@ +From f0ddd7c36556ad05c1398fdd132947323ad26473 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Thu, 6 Dec 2018 11:43:41 +0800 +Subject: [PATCH 2/2] do not display CLFAGS to improve reproducibility build + +Macro PA_CFLAGS contains build path, do not use it to +display CFLAGS which could improve reproducibility build. + +Upstream-Status: Inappropriate [oe specific] +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + src/daemon/main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/daemon/main.c b/src/daemon/main.c +index 30ef499..5c3abf0 100644 +--- a/src/daemon/main.c ++++ b/src/daemon/main.c +@@ -916,7 +916,7 @@ int main(int argc, char *argv[]) { + pa_set_env_and_record("PULSE_SYSTEM", conf->system_instance ? "1" : "0"); + + pa_log_info("This is PulseAudio %s", PACKAGE_VERSION); +- pa_log_debug("Compilation CFLAGS: %s", PA_CFLAGS); ++ pa_log_debug("Compilation CFLAGS: ***"); + + #ifdef HAVE_LIBSAMPLERATE + pa_log_warn("Compiled with DEPRECATED libsamplerate support!"); +-- +2.25.1 + diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio/fix-git-version-gen.patch b/meta/recipes-multimedia/pulseaudio/pulseaudio/fix-git-version-gen.patch deleted file mode 100644 index ed94250401..0000000000 --- a/meta/recipes-multimedia/pulseaudio/pulseaudio/fix-git-version-gen.patch +++ /dev/null @@ -1,24 +0,0 @@ -git-version-gen gets confused if a tarball is being built inside a git directory -(ie your build directory is a subdirectory of a poky clone), and ends up calling -the release 6.0-dirty. Add a shortcut exit so if a tarball is detected it -doesn't attempt to look at the git status. - -Upstream-Status: Submitted (https://bugs.freedesktop.org/show_bug.cgi?id=90936) -Signed-off-by: Ross Burton <ross.burton@intel.com> - -diff --git a/git-version-gen b/git-version-gen -index 7546884..079b93e 100755 ---- a/git-version-gen -+++ b/git-version-gen -@@ -84,7 +84,10 @@ then - v=`cat $tarball_version_file` || exit 1 - case $v in - *$nl*) v= ;; # reject multi-line output -- [0-9]*) ;; -+ [0-9]*) -+ echo "$v" | tr -d '\012' -+ exit 0 -+ ;; - *) v= ;; - esac - test -z "$v" \ diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio_15.0.bb b/meta/recipes-multimedia/pulseaudio/pulseaudio_15.0.bb new file mode 100644 index 0000000000..239d31810b --- /dev/null +++ b/meta/recipes-multimedia/pulseaudio/pulseaudio_15.0.bb @@ -0,0 +1,11 @@ +require pulseaudio.inc + +SRC_URI = "http://freedesktop.org/software/pulseaudio/releases/${BP}.tar.xz \ + file://0001-client-conf-Add-allow-autospawn-for-root.patch \ + file://0002-do-not-display-CLFAGS-to-improve-reproducibility-bui.patch \ + file://0001-meson-Check-for-__get_cpuid.patch \ + file://volatiles.04_pulse \ + file://0001-doxygen-meson.build-remove-dependency-on-doxygen-bin.patch \ + " +SRC_URI[sha256sum] = "a40b887a3ba98cc26976eb11bdb6613988f145b19024d1b6555c6a03c9cba1a0" +UPSTREAM_CHECK_REGEX = "pulseaudio-(?P<pver>\d+(\.(?!99)\d+)+)\.tar" diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio_6.0.bb b/meta/recipes-multimedia/pulseaudio/pulseaudio_6.0.bb deleted file mode 100644 index 31e9096389..0000000000 --- a/meta/recipes-multimedia/pulseaudio/pulseaudio_6.0.bb +++ /dev/null @@ -1,16 +0,0 @@ -require pulseaudio.inc - -SRC_URI = "http://freedesktop.org/software/pulseaudio/releases/${BP}.tar.xz \ - file://0001-padsp-Make-it-compile-on-musl.patch \ - file://0001-client-conf-Add-allow-autospawn-for-root.patch \ - file://0001-conf-parser-add-support-for-.d-directories.patch \ - file://fix-git-version-gen.patch \ - file://volatiles.04_pulse \ -" -SRC_URI[md5sum] = "b691e83b7434c678dffacfa3a027750e" -SRC_URI[sha256sum] = "b50640e0b80b1607600accfad2e45aabb79d379bf6354c9671efa2065477f6f6" - -do_compile_prepend() { - mkdir -p ${S}/libltdl - cp ${STAGING_LIBDIR}/libltdl* ${S}/libltdl -} diff --git a/meta/recipes-multimedia/sbc/sbc/0001-sbc_primitives-Fix-build-on-non-x86.patch b/meta/recipes-multimedia/sbc/sbc/0001-sbc_primitives-Fix-build-on-non-x86.patch new file mode 100644 index 0000000000..11cec74fbb --- /dev/null +++ b/meta/recipes-multimedia/sbc/sbc/0001-sbc_primitives-Fix-build-on-non-x86.patch @@ -0,0 +1,45 @@ +From f4a1224323e386090a44bf70ee0ac9877ba7fb0d Mon Sep 17 00:00:00 2001 +From: Marius Bakke <marius@gnu.org> +Date: Tue, 22 Dec 2020 11:04:26 +0000 +Subject: [PATCH] sbc_primitives: Fix build on non-x86. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Don't call __builtin_cpu_init unless targeting i386 or x86_64. +Otherwise we get an error at link time: + + CC sbc/sbc_primitives.lo +sbc/sbc_primitives.c: In function ‘sbc_init_primitives_x86’: +sbc/sbc_primitives.c:596:2: warning: implicit declaration of function ‘__builtin_cpu_init’; did you mean ‘__builtin_irint’? [-Wimplicit-function-declaration] +[...] + CCLD src/sbcdec +ld: sbc/.libs/libsbc-private.a(sbc_primitives.o): in function `sbc_init_primitives': +sbc_primitives.c:(.text+0x3a30): undefined reference to `__builtin_cpu_init' + +Upstream-Status: Backport +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + sbc/sbc_primitives.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/sbc/sbc_primitives.c b/sbc/sbc_primitives.c +index 97a75be..09c214a 100644 +--- a/sbc/sbc_primitives.c ++++ b/sbc/sbc_primitives.c +@@ -593,6 +593,7 @@ static int sbc_calc_scalefactors_j( + + static void sbc_init_primitives_x86(struct sbc_encoder_state *state) + { ++#if defined(__x86_64__) || defined(__i386__) + __builtin_cpu_init(); + + #ifdef SBC_BUILD_WITH_MMX_SUPPORT +@@ -604,6 +605,7 @@ static void sbc_init_primitives_x86(struct sbc_encoder_state *state) + if (__builtin_cpu_supports("sse4.2")) + sbc_init_primitives_sse(state); + #endif ++#endif + } + + /* diff --git a/meta/recipes-multimedia/sbc/sbc_1.3.bb b/meta/recipes-multimedia/sbc/sbc_1.3.bb deleted file mode 100644 index 2d7f31bc1b..0000000000 --- a/meta/recipes-multimedia/sbc/sbc_1.3.bb +++ /dev/null @@ -1,16 +0,0 @@ -SUMMARY = "SBC Audio Codec" -DESCRIPTION = "Bluetooth low-complexity, subband codec (SBC) library." -HOMEPAGE = "https://www.bluez.org" -SECTION = "libs" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ - file://sbc/sbc.h;beginline=1;endline=26;md5=0f57d0df22b0d40746bdd29805a4361b" - -DEPENDS = "libsndfile1" - -SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/${BP}.tar.xz" - -SRC_URI[md5sum] = "2d8b7841f2c11ab287718d562f2b981c" -SRC_URI[sha256sum] = "e61022cf576f14190241e7071753fdacdce5d1dea89ffd704110fc50be689309" - -inherit autotools pkgconfig diff --git a/meta/recipes-multimedia/sbc/sbc_1.5.bb b/meta/recipes-multimedia/sbc/sbc_1.5.bb new file mode 100644 index 0000000000..13bba6b6b3 --- /dev/null +++ b/meta/recipes-multimedia/sbc/sbc_1.5.bb @@ -0,0 +1,24 @@ +SUMMARY = "SBC Audio Codec" +DESCRIPTION = "Bluetooth low-complexity, subband codec (SBC) library." +HOMEPAGE = "https://www.bluez.org" +SECTION = "libs" +LICENSE = "GPLv2+ & LGPLv2.1+" +LICENSE:${PN} = "LGPLv2.1+" +LICENSE:${PN}-examples = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ + file://COPYING.LIB;md5=fb504b67c50331fc78734fed90fb0e09 \ + file://src/sbcenc.c;beginline=1;endline=24;md5=08e7a70b127f4100ff2cd7d629147d8d \ + file://sbc/sbc.h;beginline=1;endline=26;md5=0f57d0df22b0d40746bdd29805a4361b" + +DEPENDS = "libsndfile1" + +SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/${BP}.tar.xz \ + file://0001-sbc_primitives-Fix-build-on-non-x86.patch \ + " + +SRC_URI[sha256sum] = "0cbad69823a99e8421fe0700e8cf9eeb8fa0c1ad28e8dbc2182b3353507931d2" + +inherit autotools pkgconfig + +PACKAGES =+ "${PN}-examples" +FILES:${PN}-examples += "${bindir}/*" diff --git a/meta/recipes-multimedia/speex/speex_1.2rc2.bb b/meta/recipes-multimedia/speex/speex_1.2.0.bb index f7d23dbd7c..3a0911d6f8 100644 --- a/meta/recipes-multimedia/speex/speex_1.2rc2.bb +++ b/meta/recipes-multimedia/speex/speex_1.2.0.bb @@ -2,15 +2,16 @@ SUMMARY = "Speech Audio Codec" DESCRIPTION = "Speex is an Open Source/Free Software patent-free audio compression format designed for speech." HOMEPAGE = "http://www.speex.org" SECTION = "libs" -LICENSE = "BSD" +LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://COPYING;md5=314649d8ba9dd7045dfb6683f298d0a8 \ file://include/speex/speex.h;beginline=1;endline=34;md5=ef8c8ea4f7198d71cf3509c6ed05ea50" DEPENDS = "libogg speexdsp" -SRC_URI = "http://downloads.us.xiph.org/releases/speex/speex-${PV}.tar.gz" +SRC_URI = "http://downloads.xiph.org/releases/speex/speex-${PV}.tar.gz" +UPSTREAM_CHECK_REGEX = "speex-(?P<pver>\d+(\.\d+)+)\.tar" -SRC_URI[md5sum] = "6ae7db3bab01e1d4b86bacfa8ca33e81" -SRC_URI[sha256sum] = "caa27c7247ff15c8521c2ae0ea21987c9e9710a8f2d3448e8b79da9806bce891" +SRC_URI[md5sum] = "8ab7bb2589110dfaf0ed7fa7757dc49c" +SRC_URI[sha256sum] = "eaae8af0ac742dc7d542c9439ac72f1f385ce838392dc849cae4536af9210094" inherit autotools pkgconfig lib_package diff --git a/meta/recipes-multimedia/speex/speexdsp/0001-Don-t-rely-on-HAVE_STDINT_H-et-al.-being-defined.patch b/meta/recipes-multimedia/speex/speexdsp/0001-Don-t-rely-on-HAVE_STDINT_H-et-al.-being-defined.patch deleted file mode 100644 index c7067daaa0..0000000000 --- a/meta/recipes-multimedia/speex/speexdsp/0001-Don-t-rely-on-HAVE_STDINT_H-et-al.-being-defined.patch +++ /dev/null @@ -1,63 +0,0 @@ -From c73370ceafd138becee8ca3c688ba75756830bfe Mon Sep 17 00:00:00 2001 -From: Tanu Kaskinen <tanu.kaskinen@linux.intel.com> -Date: Sun, 5 Jul 2015 17:48:16 +0300 -Subject: [PATCH] Don't rely on HAVE_STDINT_H et al. being defined - -Not everyone who includes speexdsp_config_types.h will have a test -which defines those, and if we've chosen to use the stdint types at -configure time then we know exactly which header(s) are available, so -just choose the best one then and generate the header to use it. - -This patch, including the above text, is copied from a commit in the -speex repository[1]. The original commit for speex was made by Ron -<ron@debian.org>. - -[1] https://git.xiph.org/?p=speex.git;a=commitdiff;h=774c87d6cb7dd8dabdd17677fc6da753ecf4aa87 - -Upstream-Status: Backport - -Signed-off-by: Tanu Kaskinen <tanu.kaskinen@linux.intel.com> ---- - configure.ac | 6 ++++++ - include/speex/speexdsp_config_types.h.in | 8 +------- - 2 files changed, 7 insertions(+), 7 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 2cd2d1e..1de0c23 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -334,6 +334,12 @@ AC_SUBST([USIZE16]) - AC_SUBST([SIZE32]) - AC_SUBST([USIZE32]) - -+AS_IF([test "$ac_cv_header_stdint_h" = "yes"], [INCLUDE_STDINT="#include <stdint.h>"], -+ [test "$ac_cv_header_inttypes_h" = "yes"], [INCLUDE_STDINT="#include <inttypes.h>"], -+ [test "$ac_cv_header_sys_types_h" = "yes"], [INCLUDE_STDINT="#include <sys/types.h>"]) -+ -+AC_SUBST([INCLUDE_STDINT]) -+ - AC_CONFIG_FILES([ - Makefile libspeexdsp/Makefile doc/Makefile SpeexDSP.spec - include/Makefile include/speex/Makefile speexdsp.pc -diff --git a/include/speex/speexdsp_config_types.h.in b/include/speex/speexdsp_config_types.h.in -index 02b82fd..5ea7b55 100644 ---- a/include/speex/speexdsp_config_types.h.in -+++ b/include/speex/speexdsp_config_types.h.in -@@ -1,13 +1,7 @@ - #ifndef __SPEEX_TYPES_H__ - #define __SPEEX_TYPES_H__ - --#if defined HAVE_STDINT_H --# include <stdint.h> --#elif defined HAVE_INTTYPES_H --# include <inttypes.h> --#elif defined HAVE_SYS_TYPES_H --# include <sys/types.h> --#endif -+@INCLUDE_STDINT@ - - typedef @SIZE16@ spx_int16_t; - typedef @USIZE16@ spx_uint16_t; --- -1.9.3 - diff --git a/meta/recipes-multimedia/speex/speexdsp_1.2.0.bb b/meta/recipes-multimedia/speex/speexdsp_1.2.0.bb new file mode 100644 index 0000000000..bb7bc9aade --- /dev/null +++ b/meta/recipes-multimedia/speex/speexdsp_1.2.0.bb @@ -0,0 +1,27 @@ +SUMMARY = "A patent-free DSP library" +DESCRIPTION = "SpeexDSP is a patent-free, Open Source/Free Software DSP library." +HOMEPAGE = "http://www.speex.org" +SECTION = "libs" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://COPYING;md5=314649d8ba9dd7045dfb6683f298d0a8" + +SRC_URI = "http://downloads.xiph.org/releases/speex/speexdsp-${PV}.tar.gz" + +UPSTREAM_CHECK_REGEX = "speexdsp-(?P<pver>\d+(\.\d+)+)\.tar" + +SRC_URI[md5sum] = "b722df341576dc185d897131321008fc" +SRC_URI[sha256sum] = "682042fc6f9bee6294ec453f470dadc26c6ff29b9c9e9ad2ffc1f4312fd64771" + +inherit autotools pkgconfig + +EXTRA_OECONF = "\ + --disable-examples \ + ${@bb.utils.contains('TARGET_FPU', 'soft', '--enable-fixed-point --disable-float-api', '', d)} \ +" + +# speexdsp was split off from speex in 1.2rc2. Older versions of speex can't +# be installed together with speexdsp, since they contain overlapping files. +RCONFLICTS:${PN} = "speex (< 1.2rc2)" +RCONFLICTS:${PN}-dbg = "speex-dbg (< 1.2rc2)" +RCONFLICTS:${PN}-dev = "speex-dev (< 1.2rc2)" +RCONFLICTS:${PN}-staticdev = "speex-staticdev (< 1.2rc2)" diff --git a/meta/recipes-multimedia/speex/speexdsp_1.2rc3.bb b/meta/recipes-multimedia/speex/speexdsp_1.2rc3.bb deleted file mode 100644 index 6b1acedbef..0000000000 --- a/meta/recipes-multimedia/speex/speexdsp_1.2rc3.bb +++ /dev/null @@ -1,39 +0,0 @@ -SUMMARY = "A patent-free DSP library" -DESCRIPTION = "SpeexDSP is a patent-free, Open Source/Free Software DSP library." -HOMEPAGE = "http://www.speex.org" -SECTION = "libs" -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://COPYING;md5=314649d8ba9dd7045dfb6683f298d0a8" - -SRC_URI = "http://downloads.xiph.org/releases/speex/speexdsp-${PV}.tar.gz \ - file://0001-Don-t-rely-on-HAVE_STDINT_H-et-al.-being-defined.patch" - -SRC_URI[md5sum] = "70d9d31184f7eb761192fd1ef0b73333" -SRC_URI[sha256sum] = "4ae688600039f5d224bdf2e222d2fbde65608447e4c2f681585e4dca6df692f1" - -inherit autotools pkgconfig - -EXTRA_OECONF = "\ - --disable-examples \ - ${@bb.utils.contains('TARGET_FPU', 'soft', '--enable-fixed-point --disable-float-api', '', d)} \ -" - -# Workaround for a build failure when building with MACHINE=qemuarm64. I think -# aarch64 is supposed to support NEON just fine, but building for qemuarm64 -# fails in NEON code: -# -# .../speexdsp-1.2rc3/libspeexdsp/resample_neon.h:148:5: error: impossible constraint in 'asm' -# asm volatile (" cmp %[len], #0\n" -# ^ -# -# I sent an email about the issue to speex-dev. At the time of writing there -# are no responses yet: -# http://thread.gmane.org/gmane.comp.audio.compression.speex.devel/7360 -EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'aarch64', '--disable-neon', '', d)}" - -# speexdsp was split off from speex in 1.2rc2. Older versions of speex can't -# be installed together with speexdsp, since they contain overlapping files. -RCONFLICTS_${PN} = "speex (< 1.2rc2)" -RCONFLICTS_${PN}-dbg = "speex-dbg (< 1.2rc2)" -RCONFLICTS_${PN}-dev = "speex-dev (< 1.2rc2)" -RCONFLICTS_${PN}-staticdev = "speex-staticdev (< 1.2rc2)" diff --git a/meta/recipes-multimedia/tremor/tremor/obsolete_automake_macros.patch b/meta/recipes-multimedia/tremor/tremor/obsolete_automake_macros.patch deleted file mode 100644 index 7e5102903b..0000000000 --- a/meta/recipes-multimedia/tremor/tremor/obsolete_automake_macros.patch +++ /dev/null @@ -1,15 +0,0 @@ -Upstream-Status: Submitted [https://trac.xiph.org/ticket/1922] - -Signed-off-by: Marko Lindqvist <cazfi74@gmail.com> -Index: configure.in -=================================================================== ---- configure.in (revision 18764) -+++ configure.in (working copy) -@@ -9,7 +9,7 @@ - AC_CANONICAL_HOST - AC_CANONICAL_TARGET - --AM_CONFIG_HEADER([config.h]) -+AC_CONFIG_HEADERS([config.h]) - - AM_INIT_AUTOMAKE(libvorbisidec,1.2.1) diff --git a/meta/recipes-multimedia/tremor/tremor/tremor-arm-thumb2.patch b/meta/recipes-multimedia/tremor/tremor/tremor-arm-thumb2.patch deleted file mode 100644 index 2049542227..0000000000 --- a/meta/recipes-multimedia/tremor/tremor/tremor-arm-thumb2.patch +++ /dev/null @@ -1,104 +0,0 @@ -From: Xin Ouyang <Xin.Ouyang@windriver.com> -Date: Mon, 16 Jul 2012 13:29:34 +0800 -Subject: [PATCH] tremor: add IT instructions for arm thumb2 tune flags. - -Upstream-Status: Pending - -In Thumb-2, most instructions do not have a built in condition code (except for -conditional branches). Instead, short sequences of instructions which are to be -executed conditionally can be preceded by a special "IT instruction" which -describes the condition and which of the following instructions should be -executed if the condition is false respectively. - -For the ARM/Thumb IT(If-Then) instruction: -http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0489c/Cjabicci.html - -Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com> ---- - asm_arm.h | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) - -diff --git a/asm_arm.h b/asm_arm.h -index c3bda00..823c54f 100755 ---- a/asm_arm.h -+++ b/asm_arm.h -@@ -108,9 +108,11 @@ static inline void XNPROD31(ogg_int32_t a, ogg_int32_t b, - static inline ogg_int32_t CLIP_TO_15(ogg_int32_t x) { - int tmp; - asm volatile("subs %1, %0, #32768\n\t" -+ "itt pl\n\t" - "movpl %0, #0x7f00\n\t" - "orrpl %0, %0, #0xff\n" - "adds %1, %0, #32768\n\t" -+ "it mi\n\t" - "movmi %0, #0x8000" - : "+r"(x),"=r"(tmp) - : -@@ -139,10 +141,12 @@ static inline void lsp_loop_asm(ogg_uint32_t *qip,ogg_uint32_t *pip, - - "ldmdb r0!,{r1,r3};" - "subs r1,r1,%4;" //ilsp[j]-wi -+ "it mi;" - "rsbmi r1,r1,#0;" //labs(ilsp[j]-wi) - "umull %0,r2,r1,%0;" //qi*=labs(ilsp[j]-wi) - - "subs r1,r3,%4;" //ilsp[j+1]-wi -+ "it mi;" - "rsbmi r1,r1,#0;" //labs(ilsp[j+1]-wi) - "umull %1,r3,r1,%1;" //pi*=labs(ilsp[j+1]-wi) - -@@ -167,6 +171,7 @@ static inline void lsp_loop_asm(ogg_uint32_t *qip,ogg_uint32_t *pip, - "mov r0,#0x4000;\n" - - "subs r1,r1,%4;\n" //ilsp[j]-wi -+ "it mi;\n" - "rsbmi r1,r1,#0;\n" //labs(ilsp[j]-wi) - "umull %0,r2,r1,%0;\n" //qi*=labs(ilsp[j]-wi) - "umull %1,r3,r0,%1;\n" //pi*=labs(ilsp[j+1]-wi) -@@ -190,18 +195,23 @@ static inline void lsp_loop_asm(ogg_uint32_t *qip,ogg_uint32_t *pip, - "mov r2,#0;" - "orr r1,%0,%1;" - "tst r1,#0xff000000;" -+ "itt ne;" - "addne r2,r2,#8;" - "movne r1,r1,lsr #8;" - "tst r1,#0x00f00000;" -+ "itt ne;" - "addne r2,r2,#4;" - "movne r1,r1,lsr #4;" - "tst r1,#0x000c0000;" -+ "itt ne;" - "addne r2,r2,#2;" - "movne r1,r1,lsr #2;" - "tst r1,#0x00020000;" -+ "itt ne;" - "addne r2,r2,#1;" - "movne r1,r1,lsr #1;" - "tst r1,#0x00010000;" -+ "it ne;" - "addne r2,r2,#1;" - "mov %0,%0,lsr r2;" - "mov %1,%1,lsr r2;" -@@ -222,15 +232,19 @@ static inline void lsp_norm_asm(ogg_uint32_t *qip,ogg_int32_t *qexpp){ - ogg_int32_t qexp=*qexpp; - - asm("tst %0,#0x0000ff00;" -+ "itt eq;" - "moveq %0,%0,lsl #8;" - "subeq %1,%1,#8;" - "tst %0,#0x0000f000;" -+ "itt eq;" - "moveq %0,%0,lsl #4;" - "subeq %1,%1,#4;" - "tst %0,#0x0000c000;" -+ "itt eq;" - "moveq %0,%0,lsl #2;" - "subeq %1,%1,#2;" - "tst %0,#0x00008000;" -+ "itt eq;" - "moveq %0,%0,lsl #1;" - "subeq %1,%1,#1;" - : "+r"(qi),"+r"(qexp) --- -1.7.9.5 - diff --git a/meta/recipes-multimedia/tremor/tremor_20150107.bb b/meta/recipes-multimedia/tremor/tremor_20150107.bb deleted file mode 100644 index 937894a73a..0000000000 --- a/meta/recipes-multimedia/tremor/tremor_20150107.bb +++ /dev/null @@ -1,27 +0,0 @@ -SUMMARY = "Fixed-point decoder" -DESCRIPTION = "tremor is a fixed point implementation of the vorbis codec." -SECTION = "libs" -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://COPYING;md5=db1b7a668b2a6f47b2af88fb008ad555 \ - file://os.h;beginline=3;endline=14;md5=5c0af5e1bedef3ce8178c89f48cd6f1f" -DEPENDS = "libogg" -SRCDATE = "${PV}" -PR = "r1" - -# SVN support for upstream version check isn't implemented yet -RECIPE_UPSTREAM_VERSION = "20150107" -RECIPE_UPSTREAM_DATE = "Jan 07, 2015" -CHECK_DATE = "Aug 12, 2015" - -SRC_URI = "svn://svn.xiph.org/trunk;module=Tremor;rev=19427;protocol=http \ - file://obsolete_automake_macros.patch;striplevel=0 \ - file://tremor-arm-thumb2.patch \ -" - -S = "${WORKDIR}/Tremor" - -inherit autotools pkgconfig - -EXTRA_OECONF = "--enable-shared" - -ARM_INSTRUCTION_SET = "arm" diff --git a/meta/recipes-multimedia/webp/libwebp_1.2.1.bb b/meta/recipes-multimedia/webp/libwebp_1.2.1.bb new file mode 100644 index 0000000000..d634e02180 --- /dev/null +++ b/meta/recipes-multimedia/webp/libwebp_1.2.1.bb @@ -0,0 +1,55 @@ +SUMMARY = "WebP is an image format designed for the Web" +DESCRIPTION = "WebP is a method of lossy and lossless compression that can be \ + used on a large variety of photographic, translucent and \ + graphical images found on the web. The degree of lossy \ + compression is adjustable so a user can choose the trade-off \ + between file size and image quality. WebP typically achieves \ + an average of 30% more compression than JPEG and JPEG 2000, \ + without loss of image quality." +HOMEPAGE = "https://developers.google.com/speed/webp/" +SECTION = "libs" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://COPYING;md5=6e8dee932c26f2dab503abf70c96d8bb \ + file://PATENTS;md5=c6926d0cb07d296f886ab6e0cc5a85b7" + +SRC_URI = "http://downloads.webmproject.org/releases/webp/${BP}.tar.gz" +SRC_URI[sha256sum] = "808b98d2f5b84e9b27fdef6c5372dac769c3bda4502febbfa5031bd3c4d7d018" + +UPSTREAM_CHECK_URI = "http://downloads.webmproject.org/releases/webp/index.html" + +EXTRA_OECONF = " \ + --disable-wic \ + --enable-libwebpmux \ + --enable-libwebpdemux \ + --enable-threading \ +" + +# Do not trust configure to determine if neon is available. +# +EXTRA_OECONF_ARM = " \ + ${@bb.utils.contains("TUNE_FEATURES","neon","--enable-neon","--disable-neon",d)} \ +" +EXTRA_OECONF:append:arm = " ${EXTRA_OECONF_ARM}" +EXTRA_OECONF:append:armeb = " ${EXTRA_OECONF_ARM}" + +inherit autotools lib_package + +PACKAGECONFIG ??= "" + +# libwebpdecoder is a subset of libwebp, don't build it unless requested +PACKAGECONFIG[decoder] = "--enable-libwebpdecoder,--disable-libwebpdecoder" + +# Apply for examples programs: cwebp and dwebp +PACKAGECONFIG[gif] = "--enable-gif,--disable-gif,giflib" +PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg" +PACKAGECONFIG[png] = "--enable-png,--disable-png,,libpng" +PACKAGECONFIG[tiff] = "--enable-tiff,--disable-tiff,tiff" + +# Apply only for example program vwebp +PACKAGECONFIG[gl] = "--enable-gl,--disable-gl,mesa-glut" + +PACKAGES =+ "${PN}-gif2webp" + +DESCRIPTION:${PN}-gif2webp = "Simple tool to convert animated GIFs to WebP" +FILES:${PN}-gif2webp = "${bindir}/gif2webp" diff --git a/meta/recipes-multimedia/x264/x264/Fix-X32-build-by-disabling-asm.patch b/meta/recipes-multimedia/x264/x264/Fix-X32-build-by-disabling-asm.patch new file mode 100644 index 0000000000..cb771fb0bf --- /dev/null +++ b/meta/recipes-multimedia/x264/x264/Fix-X32-build-by-disabling-asm.patch @@ -0,0 +1,51 @@ +From 7bc25f4d1aaa5186d2eff3e2326c7245fcd7e7f3 Mon Sep 17 00:00:00 2001 +From: Christopher Larson <chris_larson@mentor.com> +Date: Tue, 13 Dec 2016 14:22:32 -0700 +Subject: [PATCH] Fix X32 build by disabling asm + +This applies gentoo's x32 patch, adjusted slightly, which disables asm support +for x32 as well as correcting -m. + +Debian has a different patch which does the same, and there's a superior yet +out of date patch series on the x264 list which keeps asm support enabled, but +doesn't successfully build at this time, and my assembly is very rusty. + +Upstream-Status: Pending +Signed-off-by: Christopher Larson <chris_larson@mentor.com> + +--- + configure | 14 ++++++++++++-- + 1 file changed, 12 insertions(+), 2 deletions(-) + +diff --git a/configure b/configure +index 51b128d..6ea9469 100755 +--- a/configure ++++ b/configure +@@ -754,7 +754,13 @@ case $host_cpu in + AS_EXT=".asm" + ASFLAGS="$ASFLAGS -DARCH_X86_64=1 -I\$(SRCPATH)/common/x86/" + stack_alignment=16 +- [ $compiler = GNU ] && CFLAGS="-m64 $CFLAGS" && LDFLAGS="-m64 $LDFLAGS" ++ if [ $compiler = GNU ]; then ++ if cpp_check "" "" "__ILP32__" ; then ++ CFLAGS="-mx32 $CFLAGS" && LDFLAGS="-mx32 $LDFLAGS" ++ else ++ CFLAGS="-m64 $CFLAGS" && LDFLAGS="-m64 $LDFLAGS" ++ fi ++ fi + if [ "$SYS" = MACOSX ]; then + ASFLAGS="$ASFLAGS -f macho64 -DPREFIX" + if cc_check '' "-arch x86_64"; then +@@ -773,7 +779,11 @@ case $host_cpu in + RCFLAGS="--target=pe-x86-64 $RCFLAGS" + fi + else +- ASFLAGS="$ASFLAGS -f elf64" ++ if cpp_check "" "" "__ILP32__" ; then ++ asm=no ++ else ++ ASFLAGS="$ASFLAGS -f elf64" ++ fi + fi + ;; + powerpc*) diff --git a/meta/recipes-multimedia/x264/x264/don-t-default-to-cortex-a9-with-neon.patch b/meta/recipes-multimedia/x264/x264/don-t-default-to-cortex-a9-with-neon.patch index bf72fca682..065e3b35b7 100644 --- a/meta/recipes-multimedia/x264/x264/don-t-default-to-cortex-a9-with-neon.patch +++ b/meta/recipes-multimedia/x264/x264/don-t-default-to-cortex-a9-with-neon.patch @@ -1,29 +1,33 @@ --march flag is not in CFLAGS so this will always default to -mcpu=cortex-a8 --mfpu=neon. +From a72bf499a0674fc75eedf15008b424e28f67e4bd Mon Sep 17 00:00:00 2001 +From: Andrei Gherzan <andrei@gherzan.ro> +Date: Fri, 2 Feb 2018 15:10:08 +0200 +Subject: [PATCH] dont default to cortex-a9 with neon + +-march flag is not in CFLAGS so this will always default to + -mcpu=cortex-a8 -mfpu=neon. Upstream-Status: Pending + Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> +Signed-off-by: Maxin B. John <maxin.john@intel.com> +--- + configure | 3 --- + 1 file changed, 3 deletions(-) diff --git a/configure b/configure -index 2916036..f4ece40 100755 +index 0e3ef23..955b993 100755 --- a/configure +++ b/configure -@@ -773,9 +773,6 @@ if [ $asm = auto -a \( $ARCH = X86 -o $ARCH = X86_64 \) ] ; then +@@ -911,9 +911,6 @@ if [ $asm = auto -a \( $ARCH = X86 -o $ARCH = X86_64 \) ] ; then fi if [ $asm = auto -a $ARCH = ARM ] ; then - # set flags so neon is built by default -- echo $CFLAGS | grep -Eq '(-mcpu|-march|-mfpu)' || CFLAGS="$CFLAGS -mcpu=cortex-a8 -mfpu=neon" +- [ $compiler == CL ] || echo $CFLAGS | grep -Eq '(-mcpu|-march|-mfpu)' || CFLAGS="$CFLAGS -mcpu=cortex-a8 -mfpu=neon" - - if cc_check '' '' '__asm__("rev ip, ip");' ; then define HAVE_ARMV6 - cc_check '' '' '__asm__("movt r0, #0");' && define HAVE_ARMV6T2 - cc_check '' '' '__asm__("vadd.i16 q0, q0, q0");' && define HAVE_NEON -@@ -788,8 +785,6 @@ if [ $asm = auto -a $ARCH = ARM ] ; then - fi - - if [ $asm = auto -a $ARCH = AARCH64 ] ; then -- # set flags so neon is built by default -- echo $CFLAGS | grep -Eq '(-mcpu|-march|-mfpu|-arch)' || CFLAGS="$CFLAGS -arch arm64 -mfpu=neon" - - if cc_check '' '' '__asm__("cmeq v0.8h, v0.8h, #0");' ; then define HAVE_NEON - ASFLAGS="$ASFLAGS -c" + cc_check '' '' '__asm__("add r0, r1, r2");' && define HAVE_ARM_INLINE_ASM + if [ $compiler = CL ] && cpp_check '' '' 'defined(_M_ARM) && _M_ARM >= 7' ; then + define HAVE_ARMV6 +-- +2.4.0 + diff --git a/meta/recipes-multimedia/x264/x264_git.bb b/meta/recipes-multimedia/x264/x264_git.bb index 0a69909808..9f23794df1 100644 --- a/meta/recipes-multimedia/x264/x264_git.bb +++ b/meta/recipes-multimedia/x264/x264_git.bb @@ -6,24 +6,28 @@ LICENSE = "GPLv2" LICENSE_FLAGS = "commercial" LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" -DEPENDS = "yasm-native" +DEPENDS = "nasm-native" -SRC_URI = "git://git.videolan.org/x264.git \ +SRC_URI = "git://github.com/mirror/x264;branch=stable \ file://don-t-default-to-cortex-a9-with-neon.patch \ + file://Fix-X32-build-by-disabling-asm.patch \ " +UPSTREAM_CHECK_COMMITS = "1" -SRCREV = "c8a773ebfca148ef04f5a60d42cbd7336af0baf6" +SRCREV = "5db6aa6cab1b146e07b60cc1736a01f21da01154" -PV = "r2491+git${SRCPV}" +PV = "r3039+git${SRCPV}" S = "${WORKDIR}/git" -inherit lib_package pkgconfig perlnative +inherit lib_package pkgconfig X264_DISABLE_ASM = "" -X264_DISABLE_ASM_armv4 = "--disable-asm" -X264_DISABLE_ASM_armv5 = "--disable-asm" -X264_DISABLE_ASM_powerpc = "${@bb.utils.contains("TUNE_FEATURES", "spe", "--disable-asm", "", d)}" +X264_DISABLE_ASM:x86 = "--disable-asm" +X264_DISABLE_ASM:armv4 = "--disable-asm" +X264_DISABLE_ASM:armv5 = "--disable-asm" +X264_DISABLE_ASM:powerpc = "${@bb.utils.contains("TUNE_FEATURES", "spe", "--disable-asm", "", d)}" +X264_DISABLE_ASM:mipsarch = "${@bb.utils.contains("TUNE_FEATURES", "r6", "", "--disable-asm", d)}" EXTRA_OECONF = '--prefix=${prefix} \ --host=${HOST_SYS} \ @@ -34,22 +38,19 @@ EXTRA_OECONF = '--prefix=${prefix} \ --enable-static \ --disable-lavf \ --disable-swscale \ + --disable-opencl \ --enable-pic \ ${X264_DISABLE_ASM} \ ' do_configure() { + install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S} + install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S} ./configure ${EXTRA_OECONF} } -# Get rid of -e -EXTRA_OEMAKE = "" -AS = "${TARGET_PREFIX}gcc" - do_install() { oe_runmake install DESTDIR=${D} } -# PIC can't be enabled for 32-bit x86 -INSANE_SKIP_${PN}_append_x86 = " textrel" - +AS[unexport] = "1" |