summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2025-11-07 13:31:53 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-11-07 13:31:53 +0000
commit8c22ff0d8b70d9b12f0487ef696a7e915b9e3173 (patch)
treeefdc32587159d0050a69009bdf2330a531727d95 /meta/recipes-multimedia
parentd412d2747595c1cc4a5e3ca975e3adc31b2f7891 (diff)
downloadpoky-8c22ff0d8b70d9b12f0487ef696a7e915b9e3173.tar.gz
The poky repository master branch is no longer being updated.
You can either: a) switch to individual clones of bitbake, openembedded-core, meta-yocto and yocto-docs b) use the new bitbake-setup You can find information about either approach in our documentation: https://docs.yoctoproject.org/ Note that "poky" the distro setting is still available in meta-yocto as before and we continue to use and maintain that. Long live Poky! Some further information on the background of this change can be found in: https://lists.openembedded.org/g/openembedded-architecture/message/2179 Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-multimedia')
-rw-r--r--meta/recipes-multimedia/alsa/alsa-lib_1.2.14.bb44
-rw-r--r--meta/recipes-multimedia/alsa/alsa-plugins_1.2.12.bb175
-rw-r--r--meta/recipes-multimedia/alsa/alsa-tools_1.2.14.bb89
-rw-r--r--meta/recipes-multimedia/alsa/alsa-topology-conf_1.2.5.1.bb23
-rw-r--r--meta/recipes-multimedia/alsa/alsa-ucm-conf_1.2.14.bb24
-rw-r--r--meta/recipes-multimedia/alsa/alsa-utils_1.2.14.bb124
-rw-r--r--meta/recipes-multimedia/ffmpeg/ffmpeg_8.0.bb168
-rw-r--r--meta/recipes-multimedia/flac/flac/0001-API-documentation-replace-modules.html-by-topics.htm.patch45
-rw-r--r--meta/recipes-multimedia/flac/flac_1.5.0.bb45
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-devtools/0001-connect-has-a-different-signature-on-musl.patch38
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-devtools_1.26.5.bb53
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-examples/0001-Make-player-examples-installable.patch37
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-examples/gst-player.desktop10
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-examples_1.26.5.bb38
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.26.5.bb29
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb67
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-fix-maybe-uninitialized-warnings-when-compiling-with.patch25
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-avoid-including-sys-poll.h-directly.patch27
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch32
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.26.5.bb178
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-ENGR00312515-get-caps-from-src-pad-when-query-caps.patch41
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-ssaparse-enhance-SSA-text-lines-parsing.patch226
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-viv-fb-Make-sure-config.h-is-included.patch29
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.26.5.bb96
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-common.inc47
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.26.5.bb81
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-license.inc19
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc73
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.26.5.bb44
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.26.5.bb30
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.26.5.bb31
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.26.5.bb53
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-tests-respect-the-idententaion-used-in-meson.patch33
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-tests-add-support-for-install-the-tests.patch106
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-use-a-dictionaries-for-environment.patch47
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-add-helper-script-to-run-the-installed_tests.patch71
-rwxr-xr-xmeta/recipes-multimedia/gstreamer/gstreamer1.0/run-ptest26
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0_1.26.5.bb74
-rw-r--r--meta/recipes-multimedia/lame/lame/clang.patch99
-rw-r--r--meta/recipes-multimedia/lame/lame/no-gtk1.patch20
-rw-r--r--meta/recipes-multimedia/lame/lame_3.100.bb26
-rw-r--r--meta/recipes-multimedia/libogg/libogg_1.3.6.bb16
-rw-r--r--meta/recipes-multimedia/libpng/files/run-ptest7
-rw-r--r--meta/recipes-multimedia/libpng/libpng_1.6.50.bb71
-rw-r--r--meta/recipes-multimedia/libsamplerate/libsamplerate0_0.2.2.bb26
-rw-r--r--meta/recipes-multimedia/libsndfile/libsndfile1/0001-Include-stdbool.h-instead-of-redefining-bool-true-an.patch65
-rw-r--r--meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2024-50612.patch409
-rw-r--r--meta/recipes-multimedia/libsndfile/libsndfile1/cve-2022-33065.patch739
-rw-r--r--meta/recipes-multimedia/libsndfile/libsndfile1/noopus.patch68
-rw-r--r--meta/recipes-multimedia/libsndfile/libsndfile1_1.2.2.bb34
-rw-r--r--meta/recipes-multimedia/libtheora/libtheora/0001-add-missing-files.patch769
-rw-r--r--meta/recipes-multimedia/libtheora/libtheora_1.2.0.bb28
-rw-r--r--meta/recipes-multimedia/libtiff/tiff_4.7.1.bb65
-rw-r--r--meta/recipes-multimedia/libvorbis/libvorbis/0001-configure-Check-for-clang.patch68
-rw-r--r--meta/recipes-multimedia/libvorbis/libvorbis_1.3.7.bb18
-rw-r--r--meta/recipes-multimedia/mpg123/mpg123_1.33.2.bb55
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio.inc294
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio/0001-client-conf-Add-allow-autospawn-for-root.patch97
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio/0001-doxygen-meson.build-remove-dependency-on-doxygen-bin.patch26
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio/0002-do-not-display-CLFAGS-to-improve-reproducibility-bui.patch30
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio/volatiles.04_pulse2
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio_17.0.bb10
-rw-r--r--meta/recipes-multimedia/sbc/sbc_2.1.bb25
-rw-r--r--meta/recipes-multimedia/speex/speex_1.2.1.bb20
-rw-r--r--meta/recipes-multimedia/speex/speexdsp_1.2.1.bb28
-rw-r--r--meta/recipes-multimedia/webp/libwebp_1.6.0.bb57
-rw-r--r--meta/recipes-multimedia/x264/x264/32c3b801191522961102d4bea292cdb61068d0dd.patch39
-rw-r--r--meta/recipes-multimedia/x264/x264_git.bb60
68 files changed, 0 insertions, 5669 deletions
diff --git a/meta/recipes-multimedia/alsa/alsa-lib_1.2.14.bb b/meta/recipes-multimedia/alsa/alsa-lib_1.2.14.bb
deleted file mode 100644
index 41a42f9ecc..0000000000
--- a/meta/recipes-multimedia/alsa/alsa-lib_1.2.14.bb
+++ /dev/null
@@ -1,44 +0,0 @@
1SUMMARY = "ALSA sound library"
2DESCRIPTION = "(Occasionally a.k.a. libasound) is a userspace library that \
3provides a level of abstraction over the /dev interfaces provided by the kernel modules."
4HOMEPAGE = "http://www.alsa-project.org"
5BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking"
6SECTION = "libs/multimedia"
7LICENSE = "LGPL-2.1-only & GPL-2.0-or-later"
8LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7 \
9 file://src/socket.c;md5=285675b45e83f571c6a957fe4ab79c93;beginline=9;endline=24 \
10 "
11
12SRC_URI = "https://www.alsa-project.org/files/pub/lib/${BP}.tar.bz2"
13SRC_URI[sha256sum] = "be9c88a0b3604367dd74167a2b754a35e142f670292ae47a2fdef27a2ee97a32"
14
15inherit autotools pkgconfig
16
17EXTRA_OECONF += " \
18 ${@bb.utils.contains('TARGET_FPU', 'soft', '--with-softfloat', '', d)} \
19 --disable-python --disable-old-symbols \
20"
21
22PACKAGES =+ "alsa-server alsa-conf libatopology"
23
24FILES:alsa-server = "${bindir}/*"
25FILES:alsa-conf = "${datadir}/alsa/"
26FILES:libatopology = "${libdir}/libatopology.so.*"
27
28RDEPENDS:${PN}:class-target = "alsa-conf alsa-ucm-conf"
29RDEPENDS:libatopology:class-target = "alsa-topology-conf"
30
31# upgrade path
32RPROVIDES:${PN} = "libasound"
33RREPLACES:${PN} = "libasound"
34RCONFLICTS:${PN} = "libasound"
35
36RPROVIDES:${PN}-dev = "alsa-dev"
37RREPLACES:${PN}-dev = "alsa-dev"
38RCONFLICTS:${PN}-dev = "alsa-dev"
39
40RPROVIDES:alsa-conf = "alsa-conf-base"
41RREPLACES:alsa-conf = "alsa-conf-base"
42RCONFLICTS:alsa-conf = "alsa-conf-base"
43
44BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-multimedia/alsa/alsa-plugins_1.2.12.bb b/meta/recipes-multimedia/alsa/alsa-plugins_1.2.12.bb
deleted file mode 100644
index 7db0c4d677..0000000000
--- a/meta/recipes-multimedia/alsa/alsa-plugins_1.2.12.bb
+++ /dev/null
@@ -1,175 +0,0 @@
1SUMMARY = "ALSA Plugins"
2DESCRIPTION = "Used to create virtual devices that can be used like normal \
3hardware devices but cause extra processing of the sound stream to take place. \
4They are used while configuring ALSA in the .asoundrc file."
5HOMEPAGE = "http://alsa-project.org"
6BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking"
7SECTION = "multimedia"
8CVE_PRODUCT = "alsa"
9
10# The primary license of alsa-plugins is LGPL-2.1-only.
11#
12# m4/attributes.m4 is licensed under GPL-2.0-or-later. m4/attributes.m4 is part
13# of the build system, and doesn't affect the licensing of the build result.
14#
15# The samplerate plugin source code is licensed under GPL-2.0-or-later to be
16# consistent with the libsamplerate license. However, if the licensee has a
17# commercial license for libsamplerate, the samplerate plugin may be used under
18# the terms of LGPL-2.1-only like the rest of the plugins.
19LICENSE = "LGPL-2.1-only & GPL-2.0-or-later"
20LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7 \
21 file://COPYING.GPL;md5=59530bdf33659b29e73d4adb9f9f6552 \
22 file://m4/attributes.m4;endline=33;md5=bb8c6b2a67ac15156961e242fec33e50 \
23 file://rate/rate_samplerate.c;endline=35;md5=07fcfc9e83a7159ad14a7196ecdc7d48 \
24 "
25
26SRC_URI = "https://www.alsa-project.org/files/pub/plugins/${BP}.tar.bz2"
27SRC_URI[sha256sum] = "7bd8a83d304e8e2d86a25895d8dcb0ef0245a8df32e271959cdbdc6af39b66f2"
28
29DEPENDS += "alsa-lib"
30
31inherit autotools pkgconfig
32
33PACKAGECONFIG ??= "\
34 samplerate \
35 speexdsp \
36 ${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio', d)} \
37"
38PACKAGECONFIG[aaf] = "--enable-aaf,--disable-aaf,libavtp"
39PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack"
40PACKAGECONFIG[libav] = "--enable-libav,--disable-libav,libav"
41PACKAGECONFIG[maemo-plugin] = "--enable-maemo-plugin,--disable-maemo-plugin"
42PACKAGECONFIG[maemo-resource-manager] = "--enable-maemo-resource-manager,--disable-maemo-resource-manager,dbus"
43PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio"
44PACKAGECONFIG[samplerate] = "--enable-samplerate,--disable-samplerate,libsamplerate0"
45PACKAGECONFIG[speexdsp] = "--with-speex=lib,--with-speex=no,speexdsp"
46
47PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'alsa-plugins-pulseaudio-conf', '', d)}"
48
49PACKAGES_DYNAMIC = "^libasound-module-.*"
50
51# The alsa-plugins package doesn't itself contain anything, it just depends on
52# all built plugins.
53FILES:${PN} = ""
54ALLOW_EMPTY:${PN} = "1"
55
56do_install:append() {
57 rm -f ${D}${libdir}/alsa-lib/*.la
58
59 if [ "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'yes', 'no', d)}" = "yes" ]; then
60 # We use the example as is. Upstream installs the file under
61 # /etc, but we move it under /usr/share and add a symlink under
62 # /etc to be consistent with other installed configuration
63 # files.
64 mv ${D}${sysconfdir}/alsa/conf.d/99-pulseaudio-default.conf.example ${D}${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf
65 ln -s ${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf ${D}${sysconfdir}/alsa/conf.d/99-pulseaudio-default.conf
66 fi
67}
68
69python populate_packages:prepend() {
70 plugindir = d.expand('${libdir}/alsa-lib/')
71 packages = " ".join(do_split_packages(d, plugindir, r'^libasound_module_(.*)\.so$', 'libasound-module-%s', 'Alsa plugin for %s', extra_depends=''))
72 d.setVar("RDEPENDS:alsa-plugins", packages)
73}
74
75# Many plugins have a configuration file (plus a symlink in /etc) associated
76# with them. We put the plugin and it's configuration usually in the same
77# package, but that's problematic when the configuration file is related to
78# multiple plugins, as is the case with the pulse, oss and maemo plugins. In
79# case of the pulse plugins, we have a separate alsa-plugins-pulseaudio-conf
80# package that depends on all the pulse plugins, which ensures that all plugins
81# that the configuration references are installed. The oss and maemo
82# configuration files, on the other hand, are in the respective pcm plugin
83# packages. Therefore it's possible to install the configuration file without
84# the ctl plugin that the configuration file references. This is unlikely to
85# cause big problems, but some kind of improvement to the packaging could
86# probably be done here (at least it would be good to handle the different
87# plugins in a consistent way).
88FILES:${MLPREFIX}libasound-module-ctl-arcam-av += "\
89 ${datadir}/alsa/alsa.conf.d/50-arcam-av-ctl.conf \
90 ${sysconfdir}/alsa/conf.d/50-arcam-av-ctl.conf \
91"
92FILES:${MLPREFIX}libasound-module-pcm-a52 += "\
93 ${datadir}/alsa/alsa.conf.d/60-a52-encoder.conf \
94 ${sysconfdir}/alsa/conf.d/60-a52-encoder.conf \
95"
96FILES:${MLPREFIX}libasound-module-pcm-alsa-dsp += "\
97 ${datadir}/alsa/alsa.conf.d/98-maemo.conf \
98 ${sysconfdir}/alsa/conf.d/98-maemo.conf \
99"
100FILES:${MLPREFIX}libasound-module-pcm-jack += "\
101 ${datadir}/alsa/alsa.conf.d/50-jack.conf \
102 ${sysconfdir}/alsa/conf.d/50-jack.conf \
103"
104FILES:${MLPREFIX}libasound-module-pcm-oss += "\
105 ${datadir}/alsa/alsa.conf.d/50-oss.conf \
106 ${sysconfdir}/alsa/conf.d/50-oss.conf \
107"
108FILES:${MLPREFIX}libasound-module-pcm-speex += "\
109 ${datadir}/alsa/alsa.conf.d/60-speex.conf \
110 ${sysconfdir}/alsa/conf.d/60-speex.conf \
111"
112FILES:${MLPREFIX}libasound-module-pcm-upmix += "\
113 ${datadir}/alsa/alsa.conf.d/60-upmix.conf \
114 ${sysconfdir}/alsa/conf.d/60-upmix.conf \
115"
116FILES:${MLPREFIX}libasound-module-pcm-usb-stream += "\
117 ${datadir}/alsa/alsa.conf.d/98-usb-stream.conf \
118 ${sysconfdir}/alsa/conf.d/98-usb-stream.conf \
119"
120FILES:${MLPREFIX}libasound-module-pcm-vdownmix += "\
121 ${datadir}/alsa/alsa.conf.d/60-vdownmix.conf \
122 ${sysconfdir}/alsa/conf.d/60-vdownmix.conf \
123"
124FILES:${MLPREFIX}libasound-module-rate-lavrate += "\
125 ${datadir}/alsa/alsa.conf.d/10-rate-lav.conf \
126 ${sysconfdir}/alsa/conf.d/10-rate-lav.conf \
127"
128FILES:${MLPREFIX}libasound-module-rate-samplerate += "\
129 ${datadir}/alsa/alsa.conf.d/10-samplerate.conf \
130 ${sysconfdir}/alsa/conf.d/10-samplerate.conf \
131"
132FILES:${MLPREFIX}libasound-module-rate-speexrate += "\
133 ${datadir}/alsa/alsa.conf.d/10-speexrate.conf \
134 ${sysconfdir}/alsa/conf.d/10-speexrate.conf \
135"
136
137# The rate plugins create some symlinks. For example, the samplerate plugin
138# creates these links to the main plugin file:
139#
140# libasound_module_rate_samplerate_best.so
141# libasound_module_rate_samplerate_linear.so
142# libasound_module_rate_samplerate_medium.so
143# libasound_module_rate_samplerate_order.so
144#
145# The other rate plugins create similar links. We have to add the links to
146# FILES manually, because do_split_packages() skips the links (which is good,
147# because we wouldn't want do_split_packages() to create separate packages for
148# the symlinks).
149#
150# The symlinks cause QA errors, because usually it's a bug if a non
151# -dev/-dbg/-nativesdk package contains links to .so files, but in this case
152# the errors are false positives, so we disable the QA checks.
153FILES:${MLPREFIX}libasound-module-rate-lavrate += "${libdir}/alsa-lib/*rate_lavrate_*.so"
154FILES:${MLPREFIX}libasound-module-rate-samplerate += "${libdir}/alsa-lib/*rate_samplerate_*.so"
155FILES:${MLPREFIX}libasound-module-rate-speexrate += "${libdir}/alsa-lib/*rate_speexrate_*.so"
156INSANE_SKIP:${MLPREFIX}libasound-module-rate-lavrate = "dev-so"
157INSANE_SKIP:${MLPREFIX}libasound-module-rate-samplerate = "dev-so"
158INSANE_SKIP:${MLPREFIX}libasound-module-rate-speexrate = "dev-so"
159
160# 50-pulseaudio.conf defines a device named "pulse" that applications can use
161# if they explicitly want to use the PulseAudio plugin.
162# 99-pulseaudio-default.conf configures the "default" device to use the
163# PulseAudio plugin.
164FILES:${PN}-pulseaudio-conf += "\
165 ${datadir}/alsa/alsa.conf.d/50-pulseaudio.conf \
166 ${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf \
167 ${sysconfdir}/alsa/conf.d/50-pulseaudio.conf \
168 ${sysconfdir}/alsa/conf.d/99-pulseaudio-default.conf \
169"
170
171RDEPENDS:${PN}-pulseaudio-conf += "\
172 ${MLPREFIX}libasound-module-conf-pulse \
173 ${MLPREFIX}libasound-module-ctl-pulse \
174 ${MLPREFIX}libasound-module-pcm-pulse \
175"
diff --git a/meta/recipes-multimedia/alsa/alsa-tools_1.2.14.bb b/meta/recipes-multimedia/alsa/alsa-tools_1.2.14.bb
deleted file mode 100644
index 751d9e8a76..0000000000
--- a/meta/recipes-multimedia/alsa/alsa-tools_1.2.14.bb
+++ /dev/null
@@ -1,89 +0,0 @@
1SUMMARY = "Advanced tools for certain ALSA sound card drivers"
2DESCRIPTION = "Package containing a number of tools ranging from envy24control \
3which provides complete control over all devices with an envy24 chip, to \
4firmware loaders for pcmcia, USB and the hdsp devices."
5HOMEPAGE = "http://www.alsa-project.org"
6BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking"
7SECTION = "console/utils"
8LICENSE = "GPL-2.0-only & LGPL-2.0-or-later"
9DEPENDS = "alsa-lib"
10
11LIC_FILES_CHKSUM = "file://hdsploader/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
12 file://ld10k1/COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7 \
13 "
14
15SRC_URI = "https://www.alsa-project.org/files/pub/tools/${BP}.tar.bz2"
16
17SRC_URI[sha256sum] = "faef6fdd39ec79c9a5473dc63aa1b6331bf7664a9d452a0a8198cec7016cbc6f"
18
19inherit autotools-brokensep pkgconfig
20# brokensep as as10k1 (and probably more) fail out of tree
21CLEANBROKEN = "1"
22
23# Here we use PACKAGECONFIG options to pick which directories we configure/build.
24# Remember on upgrades to check that no new tools have been added.
25PACKAGECONFIG ??= "as10k1 hdajacksensetest hda-verb hdsploader ld10k1 mixartloader pcxhrloader \
26 sb16_csp seq--sbiload sscape_ctl us428control usx2yloader vxloader \
27 ${@bb.utils.contains_any('DISTRO_FEATURES', '${GTK3DISTROFEATURES}', 'hdajackretask', '', d)} \
28 "
29
30PACKAGECONFIG[as10k1] = ""
31PACKAGECONFIG[echomixer] = ",,gtk+"
32PACKAGECONFIG[envy24control] = ",,gtk+"
33PACKAGECONFIG[hda-verb] = ""
34PACKAGECONFIG[hdajackretask] = ",,gtk+3"
35PACKAGECONFIG[hdajacksensetest] = ",,glib-2.0"
36PACKAGECONFIG[hdspconf] = ",,fltk"
37PACKAGECONFIG[hdsploader] = ""
38PACKAGECONFIG[hdspmixer] = ",,fltk"
39PACKAGECONFIG[ld10k1] = ""
40PACKAGECONFIG[mixartloader] = ""
41PACKAGECONFIG[pcxhrloader] = ""
42PACKAGECONFIG[qlo10k1] = ",,qt-x11-free"
43PACKAGECONFIG[rmedigicontrol] = ",,gtk+"
44PACKAGECONFIG[sb16_csp] = ""
45PACKAGECONFIG[seq--sbiload] = ""
46PACKAGECONFIG[sscape_ctl] = ""
47PACKAGECONFIG[us428control] = ""
48PACKAGECONFIG[usx2yloader] = ""
49PACKAGECONFIG[vxloader] = ""
50
51# At the time of writing pyalsa is not packaged for OE, so this is not expected
52# to work.
53PACKAGECONFIG[hwmixvolume] = ",,,python-core python-pygobject pyalsa"
54
55python do_configure() {
56 for subdir in d.getVar("PACKAGECONFIG").split():
57 subdir = subdir.replace("--", "/")
58 bb.note("Configuring %s" % subdir)
59 dd = d.createCopy()
60 dd.setVar("S", os.path.join(d.getVar("S"), subdir))
61 bb.build.exec_func("autotools_do_configure", dd)
62}
63
64python do_compile() {
65 for subdir in d.getVar("PACKAGECONFIG").split():
66 subdir = subdir.replace("--", "/")
67 bb.note("Compiling %s" % subdir)
68 dd = d.createCopy()
69 dd.setVar("S", os.path.join(d.getVar("S"), subdir))
70 bb.build.exec_func("autotools_do_compile", dd)
71}
72
73python do_install() {
74 d.delVarFlag("autotools_do_install", "cleandirs")
75 for subdir in d.getVar("PACKAGECONFIG").split():
76 subdir = subdir.replace("--", "/")
77 bb.note("Installing %s" % subdir)
78 dd = d.createCopy()
79 dd.setVar("S", os.path.join(d.getVar("S"), subdir))
80 bb.build.exec_func("autotools_do_install", dd)
81
82 # Just remove bash-needing init script that isn't installed as an init script
83 try:
84 os.remove(oe.path.join(d.getVar("D"), d.getVar("sbindir"), "ld10k1d"))
85 except:
86 pass
87}
88
89FILES:${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
deleted file mode 100644
index 4374a6bb6d..0000000000
--- a/meta/recipes-multimedia/alsa/alsa-topology-conf_1.2.5.1.bb
+++ /dev/null
@@ -1,23 +0,0 @@
1SUMMARY = "ALSA topology configuration files"
2DESCRIPTION = "Provides a method for audio drivers to load their mixers, \
3routing, PCMs and capabilities from user space at runtime without changing \
4any driver source code."
5HOMEPAGE = "https://alsa-project.org"
6BUGTRACKER = "https://alsa-project.org/wiki/Bug_Tracking"
7LICENSE = "BSD-3-Clause"
8LIC_FILES_CHKSUM = "file://LICENSE;md5=20d74d74db9741697903372ad001d3b4"
9
10SRC_URI = "https://www.alsa-project.org/files/pub/lib/${BP}.tar.bz2"
11SRC_URI[sha256sum] = "f7c5bae1545abcd73824bc97f4e72c340e11abea188ba0f1c06f5e0ad776b179"
12# Something went wrong at upstream tarballing
13
14inherit allarch
15
16do_install() {
17 install -d "${D}${datadir}/alsa"
18 cp -r "${S}/topology" "${D}${datadir}/alsa"
19}
20
21PACKAGES = "${PN}"
22
23FILES:${PN} = "*"
diff --git a/meta/recipes-multimedia/alsa/alsa-ucm-conf_1.2.14.bb b/meta/recipes-multimedia/alsa/alsa-ucm-conf_1.2.14.bb
deleted file mode 100644
index d9ef831937..0000000000
--- a/meta/recipes-multimedia/alsa/alsa-ucm-conf_1.2.14.bb
+++ /dev/null
@@ -1,24 +0,0 @@
1SUMMARY = "ALSA Use Case Manager configuration"
2DESCRIPTION = "This package contains ALSA Use Case Manager configuration \
3of audio input/output names and routing for specific audio hardware. \
4They can be used with the alsaucm tool. "
5HOMEPAGE = "https://alsa-project.org"
6BUGTRACKER = "https://alsa-project.org/wiki/Bug_Tracking"
7LICENSE = "BSD-3-Clause"
8LIC_FILES_CHKSUM = "file://LICENSE;md5=20d74d74db9741697903372ad001d3b4"
9
10SRC_URI = "https://www.alsa-project.org/files/pub/lib/${BP}.tar.bz2"
11SRC_URI[sha256sum] = "32e9809f592d92b978aa1032e35293c33b8d0f1ec475f937022c3ee9a3069c21"
12# Something went wrong at upstream tarballing
13
14inherit allarch
15
16do_install() {
17 install -d "${D}${datadir}/alsa"
18 cp -r "${S}/ucm" "${D}${datadir}/alsa"
19 cp -r "${S}/ucm2" "${D}${datadir}/alsa"
20}
21
22PACKAGES = "${PN}"
23
24FILES:${PN} = "*"
diff --git a/meta/recipes-multimedia/alsa/alsa-utils_1.2.14.bb b/meta/recipes-multimedia/alsa/alsa-utils_1.2.14.bb
deleted file mode 100644
index 3cbb9b464b..0000000000
--- a/meta/recipes-multimedia/alsa/alsa-utils_1.2.14.bb
+++ /dev/null
@@ -1,124 +0,0 @@
1SUMMARY = "ALSA sound utilities"
2DESCRIPTION = "collection of small and often extremely powerful applications \
3designed to allow users to control the various parts of the ALSA system."
4HOMEPAGE = "http://www.alsa-project.org"
5BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking"
6SECTION = "console/utils"
7# Some parts are GPL-2.0-or-later, some are GPL-2.0-only (e.g. axfer, alsactl)
8# so result is GPL-2.0-only
9LICENSE = "GPL-2.0-only"
10LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
11 file://alsactl/utils.c;beginline=3;endline=18;md5=96cc06a4cebe5eb7975688ffb0e65642"
12DEPENDS = "alsa-lib ncurses libsamplerate0"
13
14PACKAGECONFIG ??= "udev"
15
16# alsabat can be built also without fftw support (with reduced functionality).
17# It would be better to always enable alsabat, but provide an option for
18# enabling/disabling fftw. The configure script doesn't support that, however
19# (at least in any obvious way), so for now we only support alsabat with fftw
20# or no alsabat at all.
21PACKAGECONFIG[bat] = "--enable-bat,--disable-bat,fftwf"
22
23PACKAGECONFIG[udev] = "--with-udev-rules-dir=`pkg-config --variable=udevdir udev`/rules.d,--with-udev-rules-dir=/unwanted/rules.d,udev"
24PACKAGECONFIG[manpages] = "--enable-xmlto, --disable-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
25
26# alsa-utils specified in SRC_URI due to alsa-utils-scripts recipe
27SRC_URI = "https://www.alsa-project.org/files/pub/utils/alsa-utils-${PV}.tar.bz2"
28SRC_URI[sha256sum] = "0794c74d33fed943e7c50609c13089e409312b6c403d6ae8984fc429c0960741"
29
30# On build machines with python-docutils (not python3-docutils !!) installed
31# rst2man (not rst2man.py) is detected and compile fails with
32# | make[1]: *** No rule to make target 'alsaucm.1', needed by 'all-am'. Stop.
33# Avoid this by disabling expicitly
34EXTRA_OECONF = "--disable-rst2man"
35
36inherit autotools gettext pkgconfig manpages
37
38# This are all packages that we need to make. Also, the now empty alsa-utils
39# ipk depends on them.
40
41ALSA_UTILS_PKGS = "\
42 ${@bb.utils.contains('PACKAGECONFIG', 'bat', 'alsa-utils-alsabat', '', d)} \
43 alsa-utils-alsamixer \
44 alsa-utils-alsatplg \
45 alsa-utils-midi \
46 alsa-utils-aplay \
47 alsa-utils-amixer \
48 alsa-utils-aconnect \
49 alsa-utils-iecset \
50 alsa-utils-speakertest \
51 alsa-utils-aseqnet \
52 alsa-utils-aseqdump \
53 alsa-utils-aseqsend \
54 alsa-utils-alsactl \
55 alsa-utils-alsaloop \
56 alsa-utils-alsaucm \
57 alsa-utils-scripts \
58 alsa-utils-nhltdmicinfo \
59 "
60
61PACKAGES += "${ALSA_UTILS_PKGS}"
62RDEPENDS:${PN} += "${ALSA_UTILS_PKGS}"
63
64FILES:${PN} = ""
65ALLOW_EMPTY:alsa-utils = "1"
66FILES:alsa-utils-alsabat = "${bindir}/alsabat"
67FILES:alsa-utils-alsatplg = "${bindir}/alsatplg ${libdir}/alsa-topology"
68FILES:alsa-utils-aplay = "${bindir}/aplay ${bindir}/arecord ${bindir}/axfer"
69FILES:alsa-utils-amixer = "${bindir}/amixer"
70FILES:alsa-utils-alsamixer = "${bindir}/alsamixer"
71FILES:alsa-utils-speakertest = "${bindir}/speaker-test ${datadir}/sounds/alsa/ ${datadir}/alsa/speaker-test/"
72FILES:alsa-utils-midi = "${bindir}/aplaymidi* ${bindir}/arecordmidi* ${bindir}/amidi"
73FILES:alsa-utils-aconnect = "${bindir}/aconnect"
74FILES:alsa-utils-aseqnet = "${bindir}/aseqnet"
75FILES:alsa-utils-aseqsend = "${bindir}/aseqsend"
76FILES:alsa-utils-iecset = "${bindir}/iecset"
77FILES: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/"
78FILES:alsa-utils-aseqdump = "${bindir}/aseqdump"
79FILES:alsa-utils-alsaloop = "${bindir}/alsaloop"
80FILES:alsa-utils-alsaucm = "${bindir}/alsaucm */udev/rules.d/89-alsa-ucm.rules */*/udev/rules.d/89-alsa-ucm.rules"
81FILES:alsa-utils-scripts = "${sbindir}/alsaconf \
82 ${sbindir}/alsa-info.sh \
83 ${sbindir}/alsabat-test.sh \
84 "
85FILES:alsa-utils-nhltdmicinfo = "${bindir}/nhlt-dmic-info"
86
87SUMMARY:alsa-utils-alsabat = "Command-line sound tester for ALSA sound card driver"
88SUMMARY:alsa-utils-alsatplg = "Converts topology text files into binary format for kernel"
89SUMMARY:alsa-utils-aplay = "Play (and record) sound files using ALSA"
90SUMMARY:alsa-utils-amixer = "Command-line control for ALSA mixer and settings"
91SUMMARY:alsa-utils-alsamixer = "ncurses-based control for ALSA mixer and settings"
92SUMMARY:alsa-utils-speakertest = "ALSA surround speaker test utility"
93SUMMARY:alsa-utils-midi = "Miscellaneous MIDI utilities for ALSA"
94SUMMARY:alsa-utils-aconnect = "ALSA sequencer connection manager"
95SUMMARY:alsa-utils-aseqnet = "Network client/server for ALSA sequencer"
96SUMMARY:alsa-utils-iecset = "ALSA utility for setting/showing IEC958 (S/PDIF) status bits"
97SUMMARY:alsa-utils-alsactl = "Saves/restores ALSA-settings in /etc/asound.state"
98SUMMARY:alsa-utils-aseqdump = "Shows the events received at an ALSA sequencer port"
99SUMMARY:alsa-utils-alsaloop = "ALSA PCM loopback utility"
100SUMMARY:alsa-utils-alsaucm = "ALSA Use Case Manager"
101SUMMARY:alsa-utils-scripts = "Shell scripts that show help info and create ALSA configuration files"
102SUMMARY:alsa-utils-nhltdmicinfo = "Dumps microphone array information from ACPI NHLT table"
103
104RRECOMMENDS:alsa-utils-alsactl = "alsa-states"
105
106do_install() {
107 autotools_do_install
108
109 install -d ${D}${sbindir}
110 install -m 0755 ${B}/alsaconf/alsaconf ${D}${sbindir}/
111 install -m 0755 ${S}/alsa-info/alsa-info.sh ${D}${sbindir}/
112 if ${@bb.utils.contains('PACKAGECONFIG', 'bat', 'true', 'false', d)}; then
113 install -m 0755 ${S}/bat/alsabat-test.sh ${D}${sbindir}/
114 fi
115
116 # If udev is disabled, we told configure to install the rules
117 # in /unwanted, so we can remove them now. If udev is enabled,
118 # then /unwanted won't exist and this will have no effect.
119 rm -rf ${D}/unwanted
120}
121
122PROVIDES = "alsa-utils-alsaconf alsa-utils-scripts"
123
124RDEPENDS:${PN}-scripts += "bash"
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_8.0.bb b/meta/recipes-multimedia/ffmpeg/ffmpeg_8.0.bb
deleted file mode 100644
index ecaced7690..0000000000
--- a/meta/recipes-multimedia/ffmpeg/ffmpeg_8.0.bb
+++ /dev/null
@@ -1,168 +0,0 @@
1SUMMARY = "A complete, cross-platform solution to record, convert and stream audio and video."
2DESCRIPTION = "FFmpeg is the leading multimedia framework, able to decode, encode, transcode, \
3 mux, demux, stream, filter and play pretty much anything that humans and machines \
4 have created. It supports the most obscure ancient formats up to the cutting edge."
5HOMEPAGE = "https://www.ffmpeg.org/"
6SECTION = "libs"
7
8LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later & ISC & MIT & BSD-2-Clause & BSD-3-Clause & IJG"
9LICENSE:${PN} = "GPL-2.0-or-later"
10LICENSE:libavcodec = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}"
11LICENSE:libavdevice = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}"
12LICENSE:libavfilter = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}"
13LICENSE:libavformat = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}"
14LICENSE:libavutil = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}"
15LICENSE:libswresample = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}"
16LICENSE:libswscale = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}"
17LICENSE_FLAGS = "commercial"
18
19LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
20 file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
21 file://COPYING.LGPLv2.1;md5=eed22b3456132611e3d4aa7a7ec64dac \
22 file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02 \
23 "
24
25SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz"
26
27SRC_URI[sha256sum] = "b2751fccb6cc4c77708113cd78b561059b6fa904b24162fa0be2d60273d27b8e"
28
29# Build fails when thumb is enabled: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717
30ARM_INSTRUCTION_SET:armv4 = "arm"
31ARM_INSTRUCTION_SET:armv5 = "arm"
32ARM_INSTRUCTION_SET:armv6 = "arm"
33
34# Should be API compatible with libav (which was a fork of ffmpeg)
35PROVIDES = "libav"
36
37DEPENDS:append:x86 = " nasm-native"
38DEPENDS:append:x86-64 = " nasm-native"
39
40inherit autotools pkgconfig
41
42PACKAGECONFIG ??= "avdevice avfilter avcodec avformat swresample swscale \
43 alsa bzlib lzma theora zlib \
44 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xv xcb', '', d)}"
45
46# libraries to build in addition to avutil
47PACKAGECONFIG[avdevice] = "--enable-avdevice,--disable-avdevice"
48PACKAGECONFIG[avfilter] = "--enable-avfilter,--disable-avfilter"
49PACKAGECONFIG[avcodec] = "--enable-avcodec,--disable-avcodec"
50PACKAGECONFIG[avformat] = "--enable-avformat,--disable-avformat"
51PACKAGECONFIG[swresample] = "--enable-swresample,--disable-swresample"
52PACKAGECONFIG[swscale] = "--enable-swscale,--disable-swscale"
53
54# features to support
55PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib"
56PACKAGECONFIG[altivec] = "--enable-altivec,--disable-altivec,"
57PACKAGECONFIG[bzlib] = "--enable-bzlib,--disable-bzlib,bzip2"
58PACKAGECONFIG[fdk-aac] = "--enable-libfdk-aac --enable-nonfree,--disable-libfdk-aac,fdk-aac"
59PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl"
60PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm"
61PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack"
62PACKAGECONFIG[libopus] = "--enable-libopus,--disable-libopus,libopus"
63PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis"
64PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz"
65PACKAGECONFIG[mfx] = "--enable-libmfx,--disable-libmfx,intel-mediasdk"
66PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame"
67PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
68PACKAGECONFIG[sdl2] = "--enable-sdl2,--disable-sdl2,virtual/libsdl2"
69PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex"
70PACKAGECONFIG[srt] = "--enable-libsrt,--disable-libsrt,srt"
71PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora libogg"
72PACKAGECONFIG[v4l2] = "--enable-libv4l2,--disable-libv4l2,v4l-utils"
73PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva"
74PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau"
75PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx"
76PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264"
77PACKAGECONFIG[x265] = "--enable-libx265,--disable-libx265,x265"
78PACKAGECONFIG[xcb] = "--enable-libxcb,--disable-libxcb,libxcb"
79PACKAGECONFIG[xv] = "--enable-outdev=xv,--disable-outdev=xv,libxv"
80PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib"
81
82# Check codecs that require --enable-nonfree
83USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'openssl' ], 'yes', '', d)}"
84
85def cpu(d):
86 for arg in (d.getVar('TUNE_CCARGS') or '').split():
87 if arg.startswith('-mcpu='):
88 return arg[6:]
89 return 'generic'
90
91EXTRA_OECONF = " \
92 --disable-stripping \
93 --enable-pic \
94 --enable-shared \
95 --enable-pthreads \
96 ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \
97 \
98 --cross-prefix=${TARGET_PREFIX} \
99 \
100 --ld='${CCLD}' \
101 --cc='${CC}' \
102 --cxx='${CXX}' \
103 --arch=${TARGET_ARCH} \
104 --target-os='linux' \
105 --enable-cross-compile \
106 --extra-cflags='${CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}' \
107 --extra-ldflags='${LDFLAGS}' \
108 --sysroot='${STAGING_DIR_TARGET}' \
109 ${EXTRA_FFCONF} \
110 --libdir=${libdir} \
111 --shlibdir=${libdir} \
112 --datadir=${datadir}/ffmpeg \
113 ${@bb.utils.contains('AVAILTUNES', 'mips32r2', '', '--disable-mipsdsp --disable-mipsdspr2', d)} \
114 --cpu=${@cpu(d)} \
115 --pkg-config=pkg-config \
116"
117
118EXTRA_OECONF:append:linux-gnux32 = " --disable-asm"
119# --enable-pic is used and x86 assembly is not PIC on x86
120EXTRA_OECONF:append:x86 = " --disable-asm"
121
122EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa64r6', '--disable-mips64r2 --disable-mips32r2', '', d)}"
123EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa64r2', '--disable-mips64r6 --disable-mips32r6', '', d)}"
124EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mips32r2', '--disable-mips64r6 --disable-mips32r6', '', d)}"
125EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mips32r6', '--disable-mips64r2 --disable-mips32r2', '', d)}"
126EXTRA_OECONF:append:mips = " --extra-libs=-latomic --disable-mips32r5 --disable-mipsdsp --disable-mipsdspr2 \
127 --disable-loongson2 --disable-loongson3 --disable-mmi --disable-msa"
128EXTRA_OECONF:append:riscv32 = " --extra-libs=-latomic --disable-rvv --disable-asm"
129EXTRA_OECONF:append:armv5 = " --extra-libs=-latomic"
130EXTRA_OECONF:append:powerpc = " --extra-libs=-latomic"
131EXTRA_OECONF:append:armv7a = "${@bb.utils.contains('TUNE_FEATURES','neon','',' --disable-neon',d)}"
132EXTRA_OECONF:append:armv7ve = "${@bb.utils.contains('TUNE_FEATURES','neon','',' --disable-neon',d)}"
133
134LDFLAGS:append:x86 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' -fuse-ld=bfd ', '', d)}"
135
136EXTRA_OEMAKE = "V=1"
137
138do_configure() {
139 export TMPDIR="${B}/tmp"
140 mkdir -p ${B}/tmp
141 ${S}/configure ${EXTRA_OECONF}
142 sed -i -e "s,^X86ASMFLAGS=.*,& --debug-prefix-map=${S}=${TARGET_DBGSRC_DIR} --debug-prefix-map=${B}=${TARGET_DBGSRC_DIR},g" ${B}/ffbuild/config.mak
143}
144
145# patch out build host paths for reproducibility
146do_compile:prepend:class-target() {
147 sed -i -e "s,${WORKDIR},,g" ${B}/config.h
148}
149
150PACKAGES =+ "libavcodec \
151 libavdevice \
152 libavfilter \
153 libavformat \
154 libavutil \
155 libswresample \
156 libswscale \
157 ${PN}-examples"
158
159FILES:libavcodec = "${libdir}/libavcodec${SOLIBS}"
160FILES:libavdevice = "${libdir}/libavdevice${SOLIBS}"
161FILES:libavfilter = "${libdir}/libavfilter${SOLIBS}"
162FILES:libavformat = "${libdir}/libavformat${SOLIBS}"
163FILES:libavutil = "${libdir}/libavutil${SOLIBS}"
164FILES:libswresample = "${libdir}/libswresample${SOLIBS}"
165FILES:libswscale = "${libdir}/libswscale${SOLIBS}"
166FILES:${PN}-examples = "${datadir}/${BPN}/examples"
167
168CVE_PRODUCT = "ffmpeg libswresample libavcodec"
diff --git a/meta/recipes-multimedia/flac/flac/0001-API-documentation-replace-modules.html-by-topics.htm.patch b/meta/recipes-multimedia/flac/flac/0001-API-documentation-replace-modules.html-by-topics.htm.patch
deleted file mode 100644
index 0e6be8c8d2..0000000000
--- a/meta/recipes-multimedia/flac/flac/0001-API-documentation-replace-modules.html-by-topics.htm.patch
+++ /dev/null
@@ -1,45 +0,0 @@
1From 6ad5b6a9ce81383ef75e6f7b88f54d3c29294e63 Mon Sep 17 00:00:00 2001
2From: Michael Opdenacker <michael.opdenacker@rootcommit.com>
3Date: Sat, 15 Mar 2025 11:50:08 +0100
4Subject: [PATCH] API documentation: replace modules.html by topics.html
5
6This fixes the issue reported on
7https://lists.xiph.org/pipermail/flac-dev/2025-February/006696.html
8
9Newer Doxygen versions call what was previously api/modules.html
10api/topics.html instead.
11
12Signed-off-by: Michael Opdenacker <michael.opdenacker@rootcommit.com>
13Suggested-by: Christian Weisgerber <naddy@mips.inka.de>
14Upstream-Status: Submitted [https://github.com/xiph/flac/pull/824]
15---
16 configure.ac | 2 +-
17 include/FLAC/all.h | 2 +-
18 2 files changed, 2 insertions(+), 2 deletions(-)
19
20diff --git a/configure.ac b/configure.ac
21index 8eb82320..74295eec 100644
22--- a/configure.ac
23+++ b/configure.ac
24@@ -296,7 +296,7 @@ if test "x$enable_doxygen_docs" != xfalse ; then
25 fi
26 AM_CONDITIONAL(FLaC__HAS_DOXYGEN, test -n "$DOXYGEN")
27
28-if test ! -n "$DOXYGEN" && test -f "$srcdir/doc/FLAC.tag" && test -f "$srcdir/doc/api/modules.html" ; then
29+if test ! -n "$DOXYGEN" && test -f "$srcdir/doc/FLAC.tag" && test -f "$srcdir/doc/api/topics.html" ; then
30 HAS_PREBUILT_DOXYGEN=yes
31 fi
32 AM_CONDITIONAL(FLaC__HAS_PREBUILT_DOXYGEN, test "x$HAS_PREBUILT_DOXYGEN" = xyes)
33diff --git a/include/FLAC/all.h b/include/FLAC/all.h
34index f29aa010..0be26fd7 100644
35--- a/include/FLAC/all.h
36+++ b/include/FLAC/all.h
37@@ -102,7 +102,7 @@
38 * \section getting_started Getting Started
39 *
40 * A good starting point for learning the API is to browse through
41- * the <A HREF="modules.html">modules</A>. Modules are logical
42+ * the <A HREF="topics.html">modules</A>. Modules are logical
43 * groupings of related functions or classes, which correspond roughly
44 * to header files or sections of header files. Each module includes a
45 * detailed description of the general usage of its functions or
diff --git a/meta/recipes-multimedia/flac/flac_1.5.0.bb b/meta/recipes-multimedia/flac/flac_1.5.0.bb
deleted file mode 100644
index d6df801aec..0000000000
--- a/meta/recipes-multimedia/flac/flac_1.5.0.bb
+++ /dev/null
@@ -1,45 +0,0 @@
1SUMMARY = "Free Lossless Audio Codec"
2DESCRIPTION = "FLAC stands for Free Lossless Audio Codec, a lossless audio compression format."
3HOMEPAGE = "https://xiph.org/flac/"
4BUGTRACKER = "https://github.com/xiph/flac/issues"
5SECTION = "libs"
6LICENSE = "GFDL-1.3 & GPL-2.0-or-later & LGPL-2.1-or-later & BSD-3-Clause"
7LIC_FILES_CHKSUM = "file://COPYING.FDL;md5=802e79e394e372d01e863e3f4058cf40 \
8 file://src/Makefile.am;beginline=1;endline=17;md5=9c882153132df8f3a1cb1a8ca1f2350f \
9 file://COPYING.GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
10 file://src/flac/main.c;beginline=1;endline=18;md5=1e826b5083ba1e028852fe7ceec6a8ad \
11 file://COPYING.LGPL;md5=fbc093901857fcd118f065f900982c24 \
12 file://COPYING.Xiph;md5=78a131b2ea50675d245d280ccc34f8b6 \
13 file://include/FLAC/all.h;beginline=65;endline=70;md5=39aaf5e03c7364363884c8b8ddda8eea \
14 "
15
16SRC_URI = "http://downloads.xiph.org/releases/flac/${BP}.tar.xz \
17 file://0001-API-documentation-replace-modules.html-by-topics.htm.patch"
18
19SRC_URI[sha256sum] = "f2c1c76592a82ffff8413ba3c4a1299b6c7ab06c734dee03fd88630485c2b920"
20
21CVE_PRODUCT = "libflac flac"
22
23inherit autotools gettext
24
25EXTRA_OECONF = "--disable-oggtest \
26 --without-libiconv-prefix \
27 "
28
29PACKAGECONFIG ??= " \
30 ogg \
31"
32PACKAGECONFIG[avx] = "--enable-avx,--disable-avx"
33PACKAGECONFIG[ogg] = "--enable-ogg --with-ogg-libraries=${STAGING_LIBDIR} --with-ogg-includes=${STAGING_INCDIR},--disable-ogg,libogg"
34
35PACKAGES += "libflac libflac++"
36FILES:${PN} = "${bindir}/*"
37FILES:libflac = "${libdir}/libFLAC.so.*"
38FILES:libflac++ = "${libdir}/libFLAC++.so.*"
39
40do_install:append() {
41 # make the links in documentation relative to avoid buildpaths reproducibility problem
42 sed -i "s#${S}/include#${includedir}#g" ${D}${docdir}/flac/FLAC.tag ${D}${docdir}/flac/api/*.html
43 # there is also one root path without trailing slash
44 sed -i "s#${S}#/#g" ${D}${docdir}/flac/api/*.html
45}
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
deleted file mode 100644
index 34fcf6a30a..0000000000
--- a/meta/recipes-multimedia/gstreamer/gst-devtools/0001-connect-has-a-different-signature-on-musl.patch
+++ /dev/null
@@ -1,38 +0,0 @@
1From 13b0d8e55ad490c8e867c740da2a00eb49319f8e Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 9 Sep 2018 17:38:10 -0700
4Subject: [PATCH] connect has a different signature on musl
5
6On linux when not using glibc and using musl for C library, connect
7API has a different signature, this patch fixes this so it can compile
8on musl, the functionality should remain same as it is immediately
9typcasted to struct sockaddr_in* type inside the function before use
10
11Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8767]
12
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 validate/plugins/fault_injection/socket_interposer.c | 7 ++++++-
16 1 file changed, 6 insertions(+), 1 deletion(-)
17
18diff --git a/validate/plugins/fault_injection/socket_interposer.c b/validate/plugins/fault_injection/socket_interposer.c
19index 53c1ebb..ad7adf8 100644
20--- a/validate/plugins/fault_injection/socket_interposer.c
21+++ b/validate/plugins/fault_injection/socket_interposer.c
22@@ -100,10 +100,15 @@ socket_interposer_set_callback (struct sockaddr_in *addrin,
23 }
24
25 int
26-connect (int socket, const struct sockaddr_in *addrin, socklen_t address_len)
27+#if defined(__linux__) && !defined(__GLIBC__)
28+connect (int socket, const struct sockaddr *addr, socklen_t address_len)
29+#else
30+connect (int socket, const struct sockaddr_in *addr, socklen_t address_len)
31+#endif
32 {
33 size_t i;
34 int override_errno = 0;
35+ struct sockaddr_in* addrin = (struct sockaddr_in*)addr;
36 typedef ssize_t (*real_connect_fn) (int, const struct sockaddr_in *,
37 socklen_t);
38 static real_connect_fn real_connect = 0;
diff --git a/meta/recipes-multimedia/gstreamer/gst-devtools_1.26.5.bb b/meta/recipes-multimedia/gstreamer/gst-devtools_1.26.5.bb
deleted file mode 100644
index b0de19c10d..0000000000
--- a/meta/recipes-multimedia/gstreamer/gst-devtools_1.26.5.bb
+++ /dev/null
@@ -1,53 +0,0 @@
1SUMMARY = "Gstreamer validation tool"
2DESCRIPTION = "A Tool to test GStreamer components"
3HOMEPAGE = "https://gstreamer.freedesktop.org/documentation/gst-devtools/index.html"
4SECTION = "multimedia"
5
6LICENSE = "LGPL-2.1-or-later"
7LIC_FILES_CHKSUM = "file://validate/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343"
8
9#S = "${WORKDIR}/gst-devtools-${PV}"
10
11SRC_URI = "https://gstreamer.freedesktop.org/src/gst-devtools/gst-devtools-${PV}.tar.xz \
12 file://0001-connect-has-a-different-signature-on-musl.patch \
13 "
14
15SRC_URI[sha256sum] = "63d46a8effa8a225e25a464ba7538ace853fe0dc1e70366b27c208135e5401ce"
16
17DEPENDS = "json-glib glib-2.0 glib-2.0-native gstreamer1.0 gstreamer1.0-plugins-base"
18RRECOMMENDS:${PN} = "git"
19
20FILES:${PN} += "${datadir}/gstreamer-1.0/* ${libdir}/gst-validate-launcher/* ${libdir}/gstreamer-1.0/*"
21
22inherit meson pkgconfig gettext upstream-version-is-even gobject-introspection
23
24# TODO: put this in a gettext.bbclass patch
25def gettext_oemeson(d):
26 if d.getVar('USE_NLS') == 'no':
27 return '-Dnls=disabled'
28 # Remove the NLS bits if USE_NLS is no or INHIBIT_DEFAULT_DEPS is set
29 if d.getVar('INHIBIT_DEFAULT_DEPS') and not oe.utils.inherits(d, 'cross-canadian'):
30 return '-Dnls=disabled'
31 return '-Dnls=enabled'
32
33# Build GstValidateVideo
34PACKAGECONFIG[cairo] = "-Dcairo=enabled,-Dcairo=disabled,cairo"
35
36EXTRA_OEMESON += " \
37 -Ddoc=disabled \
38 -Ddebug_viewer=disabled \
39 -Dtests=disabled \
40 -Ddots_viewer=disabled \
41 -Dvalidate=enabled \
42 ${@gettext_oemeson(d)} \
43"
44
45do_install:append () {
46 for fn in ${bindir}/gst-validate-launcher \
47 ${libdir}/gst-validate-launcher/python/launcher/config.py; do
48 sed -i -e 's,${B},/usr/src/debug/${PN},g' -e 's,${S},/usr/src/debug/${PN},g' ${D}$fn
49 done
50}
51
52GIR_MESON_ENABLE_FLAG = "enabled"
53GIR_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
deleted file mode 100644
index 828c87dc9a..0000000000
--- a/meta/recipes-multimedia/gstreamer/gst-examples/0001-Make-player-examples-installable.patch
+++ /dev/null
@@ -1,37 +0,0 @@
1From 7924016fce2d0b435891a335cdae52fc939c7e3b Mon Sep 17 00:00:00 2001
2From: Jussi Kukkonen <jussi.kukkonen@intel.com>
3Date: Thu, 17 Aug 2017 11:07:02 +0300
4Subject: [PATCH] Make player examples installable
5
6Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
7Upstream-Status: Denied [Upstream considers these code examples, for now a least]
8
9https://bugzilla.gnome.org/show_bug.cgi?id=777827
10
11---
12 playback/player/gst-play/meson.build | 1 +
13 playback/player/gtk/meson.build | 1 +
14 2 files changed, 2 insertions(+)
15
16Index: gst-examples/playback/player/gst-play/meson.build
17===================================================================
18--- gst-examples.orig/playback/player/gst-play/meson.build
19+++ gst-examples/playback/player/gst-play/meson.build
20@@ -2,5 +2,6 @@ executable('gst-play',
21 ['gst-play.c',
22 'gst-play-kb.c',
23 'gst-play-kb.h'],
24+ install: true,
25 dependencies : [gst_dep, dependency('gstreamer-play-1.0'), m_dep])
26
27Index: gst-examples/playback/player/gtk/meson.build
28===================================================================
29--- gst-examples.orig/playback/player/gtk/meson.build
30+++ gst-examples/playback/player/gtk/meson.build
31@@ -20,5 +20,6 @@ if gtk_dep.found()
32 'gtk-video-renderer.h',
33 'gtk-video-renderer.c'],
34 c_args : extra_c_args,
35+ install: true,
36 dependencies : [gst_dep, gsttag_dep, gstplay_dep, gtk_dep, x11_dep])
37 endif
diff --git a/meta/recipes-multimedia/gstreamer/gst-examples/gst-player.desktop b/meta/recipes-multimedia/gstreamer/gst-examples/gst-player.desktop
deleted file mode 100644
index d165e5d910..0000000000
--- a/meta/recipes-multimedia/gstreamer/gst-examples/gst-player.desktop
+++ /dev/null
@@ -1,10 +0,0 @@
1[Desktop Entry]
2Name=Media Player
3Comment=Basic media player
4Icon=video-player
5TryExec=gtk-play
6Exec=gtk-play
7StartupNotify=true
8Terminal=false
9Type=Application
10Categories=GTK;AudioVideo;
diff --git a/meta/recipes-multimedia/gstreamer/gst-examples_1.26.5.bb b/meta/recipes-multimedia/gstreamer/gst-examples_1.26.5.bb
deleted file mode 100644
index 2fa4ef11fe..0000000000
--- a/meta/recipes-multimedia/gstreamer/gst-examples_1.26.5.bb
+++ /dev/null
@@ -1,38 +0,0 @@
1SUMMARY = "GStreamer examples (including gtk-play, gst-play)"
2DESCRIPTION = "GStreamer example applications"
3HOMEPAGE = "https://gitlab.freedesktop.org/gstreamer/gst-examples"
4BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-examples/-/issues"
5LICENSE = "LGPL-2.0-or-later"
6LIC_FILES_CHKSUM = "file://playback/player/gtk/gtk-play.c;beginline=1;endline=20;md5=f8c72dae3d36823ec716a9ebcae593b9"
7
8DEPENDS = "glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad gtk+3 json-glib glib-2.0-native"
9
10SRC_URI = "git://gitlab.freedesktop.org/gstreamer/gstreamer.git;protocol=https;branch=1.26;tag=${PV} \
11 file://0001-Make-player-examples-installable.patch \
12 file://gst-player.desktop \
13 "
14
15SRCREV = "82cbccedf7946a32d28a5aaec8ebbcb627770c19"
16
17S = "${UNPACKDIR}/${BP}/subprojects/gst-examples"
18
19inherit meson pkgconfig features_check
20
21# gtk-play has runtime errors otherwise
22TARGET_LDFLAGS += "-rdynamic"
23
24UPSTREAM_CHECK_GITTAGREGEX = "^(?P<pver>\d+\.(\d*[02468])+(\.\d+)+)"
25
26ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
27
28do_install:append() {
29 install -m 0644 -D ${UNPACKDIR}/gst-player.desktop ${D}${datadir}/applications/gst-player.desktop
30}
31
32RDEPENDS:${PN} = "gstreamer1.0-plugins-base-playback"
33RRECOMMENDS:${PN} = "gstreamer1.0-plugins-base-meta \
34 gstreamer1.0-plugins-good-meta \
35 gstreamer1.0-plugins-bad-meta \
36 ${@bb.utils.contains("LICENSE_FLAGS_ACCEPTED", "commercial", "gstreamer1.0-libav", "", d)} \
37 ${@bb.utils.contains("LICENSE_FLAGS_ACCEPTED", "commercial", "gstreamer1.0-plugins-ugly-meta", "", d)}"
38RPROVIDES:${PN} += "gst-player gst-player-bin"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.26.5.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.26.5.bb
deleted file mode 100644
index c3ee529497..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.26.5.bb
+++ /dev/null
@@ -1,29 +0,0 @@
1SUMMARY = "Libav-based GStreamer 1.x plugin"
2DESCRIPTION = "Contains a GStreamer plugin for using the encoders, decoders, \
3muxers, and demuxers provided by FFmpeg."
4HOMEPAGE = "http://gstreamer.freedesktop.org/"
5SECTION = "multimedia"
6
7# ffmpeg has comercial license flags so add it as we need ffmpeg as a dependency
8LICENSE_FLAGS = "commercial"
9LICENSE = "LGPL-2.1-or-later"
10LIC_FILES_CHKSUM = "file://COPYING;md5=69333daa044cb77e486cc36129f7a770 \
11 file://ext/libav/gstav.h;beginline=1;endline=18;md5=a752c35267d8276fd9ca3db6994fca9c \
12 "
13
14SRC_URI = "https://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${PV}.tar.xz"
15SRC_URI[sha256sum] = "d6de05884ef42376dd8cde89940f7b50ced96f4f6f52888e764cd8233e74f052"
16
17S = "${UNPACKDIR}/gst-libav-${PV}"
18
19DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base ffmpeg"
20
21inherit meson pkgconfig upstream-version-is-even
22
23EXTRA_OEMESON += " \
24 -Dtests=disabled \
25 -Ddoc=disabled \
26"
27
28FILES:${PN} += "${libdir}/gstreamer-1.0/*.so"
29FILES:${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb
deleted file mode 100644
index dcb5c0e6b5..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb
+++ /dev/null
@@ -1,67 +0,0 @@
1SUMMARY = "Gstreamer1.0 package groups"
2LICENSE = "MIT"
3
4# Due to use of COMBINED_FEATURES
5PACKAGE_ARCH = "${MACHINE_ARCH}"
6
7inherit packagegroup
8
9COMMERCIAL_PLUGINS = "${COMMERCIAL_AUDIO_PLUGINS} ${COMMERCIAL_VIDEO_PLUGINS}"
10DEPENDS_UGLY = "${@'gstreamer1.0-plugins-ugly' if 'ugly' in COMMERCIAL_PLUGINS.split('-') else ''}"
11DEPENDS_BAD = "${@'gstreamer1.0-plugins-bad' if 'bad' in COMMERCIAL_PLUGINS.split('-') else ''}"
12DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good ${DEPENDS_UGLY} ${DEPENDS_BAD}"
13
14PACKAGES = "\
15 gstreamer1.0-meta-base \
16 gstreamer1.0-meta-x11-base \
17 gstreamer1.0-meta-audio \
18 gstreamer1.0-meta-debug \
19 gstreamer1.0-meta-video"
20
21ALLOW_EMPTY:gstreamer1.0-meta-base = "1"
22ALLOW_EMPTY:gstreamer1.0-meta-x11-base = "1"
23ALLOW_EMPTY:gstreamer1.0-meta-audio = "1"
24ALLOW_EMPTY:gstreamer1.0-meta-debug = "1"
25ALLOW_EMPTY:gstreamer1.0-meta-video = "1"
26
27RDEPENDS:gstreamer1.0-meta-base = "\
28 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gstreamer1.0-meta-x11-base', '', d)} \
29 gstreamer1.0 \
30 gstreamer1.0-plugins-base-playback \
31 gstreamer1.0-plugins-base-gio \
32 ${@bb.utils.contains('COMBINED_FEATURES', 'alsa', 'gstreamer1.0-plugins-base-alsa', '',d)} \
33 gstreamer1.0-plugins-base-volume \
34 gstreamer1.0-plugins-base-audioconvert \
35 gstreamer1.0-plugins-base-audioresample \
36 gstreamer1.0-plugins-base-typefindfunctions \
37 gstreamer1.0-plugins-base-videoconvertscale \
38 gstreamer1.0-plugins-good-autodetect \
39 gstreamer1.0-plugins-good-soup"
40
41RRECOMMENDS:gstreamer1.0-meta-x11-base = "\
42 gstreamer1.0-plugins-base-ximagesink \
43 gstreamer1.0-plugins-base-xvimagesink"
44
45RDEPENDS:gstreamer1.0-meta-audio = "\
46 gstreamer1.0-meta-base \
47 gstreamer1.0-plugins-base-vorbis \
48 gstreamer1.0-plugins-base-ogg \
49 gstreamer1.0-plugins-good-wavparse \
50 gstreamer1.0-plugins-good-flac \
51 ${COMMERCIAL_AUDIO_PLUGINS}"
52
53RDEPENDS:gstreamer1.0-meta-debug = "\
54 gstreamer1.0-meta-base \
55 gstreamer1.0-plugins-good-debug \
56 gstreamer1.0-plugins-base-audiotestsrc \
57 gstreamer1.0-plugins-base-videotestsrc"
58
59RDEPENDS:gstreamer1.0-meta-video = "\
60 gstreamer1.0-meta-base \
61 gstreamer1.0-plugins-good-avi \
62 gstreamer1.0-plugins-good-matroska \
63 gstreamer1.0-plugins-base-theora \
64 ${COMMERCIAL_VIDEO_PLUGINS}"
65
66RRECOMMENDS:gstreamer1.0-meta-video = "\
67 gstreamer1.0-meta-audio"
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
deleted file mode 100644
index 307d669645..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-fix-maybe-uninitialized-warnings-when-compiling-with.patch
+++ /dev/null
@@ -1,25 +0,0 @@
1From d24bb949e547a0ad69f3f47e4cf262a75bb9fe73 Mon Sep 17 00:00:00 2001
2From: Andre McCurdy <armccurdy@gmail.com>
3Date: Tue, 26 Jan 2016 15:16:01 -0800
4Subject: [PATCH] fix maybe-uninitialized warnings when compiling with -Os
5
6Upstream-Status: Pending
7
8Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
9---
10 gst-libs/gst/codecparsers/gstvc1parser.c | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-)
12
13diff --git a/gst-libs/gst/codecparsers/gstvc1parser.c b/gst-libs/gst/codecparsers/gstvc1parser.c
14index ac8c378..3fc5298 100644
15--- a/gst-libs/gst/codecparsers/gstvc1parser.c
16+++ b/gst-libs/gst/codecparsers/gstvc1parser.c
17@@ -1732,7 +1732,7 @@ gst_vc1_parse_sequence_layer (const guint8 * data, gsize size,
18 GstVC1SeqLayer * seqlayer)
19 {
20 guint32 tmp;
21- guint8 tmp8;
22+ guint8 tmp8 = 0;
23 guint8 structA[8] = { 0, };
24 guint8 structB[12] = { 0, };
25 GstBitReader br;
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
deleted file mode 100644
index 7da8994e3d..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-avoid-including-sys-poll.h-directly.patch
+++ /dev/null
@@ -1,27 +0,0 @@
1From 728238129a8a91cad857023d2e7131591321409d Mon Sep 17 00:00:00 2001
2From: Andre McCurdy <armccurdy@gmail.com>
3Date: Wed, 3 Feb 2016 18:05:41 -0800
4Subject: [PATCH] avoid including <sys/poll.h> directly
5
6musl libc generates warnings if <sys/poll.h> is included directly.
7
8Upstream-Status: Pending
9
10Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
11---
12 sys/dvb/gstdvbsrc.c | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/sys/dvb/gstdvbsrc.c b/sys/dvb/gstdvbsrc.c
16index ef565f7..6254420 100644
17--- a/sys/dvb/gstdvbsrc.c
18+++ b/sys/dvb/gstdvbsrc.c
19@@ -98,7 +98,7 @@
20 #include <gst/gst.h>
21 #include <gst/glib-compat-private.h>
22 #include <sys/ioctl.h>
23-#include <sys/poll.h>
24+#include <poll.h>
25 #include <fcntl.h>
26 #include <errno.h>
27 #include <stdio.h>
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
deleted file mode 100644
index 1edcf07c14..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch
+++ /dev/null
@@ -1,32 +0,0 @@
1From 8f7a1c5591e27681f294ae5edf0f32689198abff Mon Sep 17 00:00:00 2001
2From: Andrey Zhizhikin <andrey.z@gmail.com>
3Date: Mon, 27 Jan 2020 10:22:35 +0000
4Subject: [PATCH] opencv: resolve missing opencv data dir in yocto build
5
6When Yocto build is performed, opencv searches for data dir using simple
7'test' command, this fails because pkg-config provides an absolute
8path on the target which needs to be prepended by PKG_CONFIG_SYSROOT_DIR
9in order for the 'test' utility to pick up the absolute path.
10
11Upstream-Status: Inappropriate [OE-specific]
12
13Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
14Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
15---
16 gst-libs/gst/opencv/meson.build | 3 +++
17 1 file changed, 3 insertions(+)
18
19diff --git a/gst-libs/gst/opencv/meson.build b/gst-libs/gst/opencv/meson.build
20index 64e913e..42a0958 100644
21--- a/gst-libs/gst/opencv/meson.build
22+++ b/gst-libs/gst/opencv/meson.build
23@@ -61,6 +61,9 @@ gstopencv_cargs += ['-DOPENCV_PREFIX="' + opencv_prefix + '"']
24 # /usr/include/opencv4/opencv2/flann/logger.h:83:36: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
25 gstopencv_cargs += cxx.get_supported_arguments(['-Wno-missing-include-dirs', '-Wno-format-nonliteral'])
26
27+pkgconf_sysroot = run_command(python3, '-c', 'import os; print(os.environ.get("PKG_CONFIG_SYSROOT_DIR"))').stdout().strip()
28+opencv_prefix = pkgconf_sysroot + opencv_prefix
29+
30 # Check the data dir used by opencv for its xml data files
31 # Use prefix from pkg-config to be compatible with cross-compilation
32 fsmod = import('fs')
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.26.5.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.26.5.bb
deleted file mode 100644
index c1d416c2bc..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.26.5.bb
+++ /dev/null
@@ -1,178 +0,0 @@
1require gstreamer1.0-plugins-common.inc
2require gstreamer1.0-plugins-license.inc
3
4SUMMARY = "'Bad' GStreamer plugins and helper libraries "
5HOMEPAGE = "https://gstreamer.freedesktop.org/"
6BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues"
7
8SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-${PV}.tar.xz \
9 file://0001-fix-maybe-uninitialized-warnings-when-compiling-with.patch \
10 file://0002-avoid-including-sys-poll.h-directly.patch \
11 file://0004-opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch \
12 "
13SRC_URI[sha256sum] = "9890f262f3b2a9564dcb629e9eb697d77b93d1f71897eda1a8170b7dcfe73294"
14
15S = "${UNPACKDIR}/gst-plugins-bad-${PV}"
16
17LICENSE = "LGPL-2.1-or-later & GPL-2.0-or-later"
18LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
19
20DEPENDS += "gstreamer1.0-plugins-base"
21
22inherit gobject-introspection
23
24PACKAGECONFIG ??= " \
25 ${GSTREAMER_ORC} \
26 ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
27 ${@bb.utils.filter('DISTRO_FEATURES', 'directfb vulkan x11', d)} \
28 ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \
29 ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gl', '', d)} \
30 bz2 closedcaption curl dash dtls hls openssl sbc smoothstreaming \
31 sndfile ttml uvch264 webp analytics \
32 ${@bb.utils.contains('TUNE_FEATURES', 'mx32', '', 'rsvg', d)} \
33"
34
35PACKAGECONFIG[analytics] = "-Danalyticsoverlay=enabled,-Danalyticsoverlay=disabled,"
36PACKAGECONFIG[aom] = "-Daom=enabled,-Daom=disabled,aom"
37PACKAGECONFIG[assrender] = "-Dassrender=enabled,-Dassrender=disabled,libass"
38PACKAGECONFIG[avtp] = "-Davtp=enabled,-Davtp=disabled,libavtp"
39PACKAGECONFIG[bluez] = "-Dbluez=enabled,-Dbluez=disabled,bluez5"
40PACKAGECONFIG[bz2] = "-Dbz2=enabled,-Dbz2=disabled,bzip2"
41PACKAGECONFIG[closedcaption] = "-Dclosedcaption=enabled,-Dclosedcaption=disabled,pango cairo"
42PACKAGECONFIG[curl] = "-Dcurl=enabled,-Dcurl=disabled,curl"
43PACKAGECONFIG[dash] = "-Ddash=enabled,-Ddash=disabled,libxml2"
44PACKAGECONFIG[dc1394] = "-Ddc1394=enabled,-Ddc1394=disabled,libdc1394"
45PACKAGECONFIG[directfb] = "-Ddirectfb=enabled,-Ddirectfb=disabled,directfb"
46PACKAGECONFIG[dtls] = "-Ddtls=enabled,-Ddtls=disabled,openssl"
47PACKAGECONFIG[faac] = "-Dfaac=enabled,-Dfaac=disabled,faac"
48PACKAGECONFIG[faad] = "-Dfaad=enabled,-Dfaad=disabled,faad2"
49PACKAGECONFIG[fluidsynth] = "-Dfluidsynth=enabled,-Dfluidsynth=disabled,fluidsynth"
50PACKAGECONFIG[gtk3] = "-Dgtk3=enabled,-Dgtk3=disabled,gtk3+"
51PACKAGECONFIG[hls] = "-Dhls=enabled,-Dhls=disabled,"
52# Pick atleast one crypto backend below when enabling hls
53PACKAGECONFIG[nettle] = "-Dhls-crypto=nettle,,nettle"
54PACKAGECONFIG[openssl] = "-Dhls-crypto=openssl,,openssl"
55PACKAGECONFIG[gcrypt] = "-Dhls-crypto=libgcrypt,,libgcrypt"
56# the gl packageconfig enables OpenGL elements that haven't been ported
57# to -base yet. They depend on the gstgl library in -base, so we do
58# not add GL dependencies here, since these are taken care of in -base.
59PACKAGECONFIG[gl] = "-Dgl=enabled,-Dgl=disabled,"
60PACKAGECONFIG[kms] = "-Dkms=enabled,-Dkms=disabled,libdrm"
61PACKAGECONFIG[libde265] = "-Dlibde265=enabled,-Dlibde265=disabled,libde265"
62PACKAGECONFIG[libssh2] = "-Dcurl-ssh2=enabled,-Dcurl-ssh2=disabled,libssh2"
63PACKAGECONFIG[lcms2] = "-Dcolormanagement=enabled,-Dcolormanagement=disabled,lcms"
64PACKAGECONFIG[modplug] = "-Dmodplug=enabled,-Dmodplug=disabled,libmodplug"
65PACKAGECONFIG[msdk] = "-Dmsdk=enabled -Dmfx_api=oneVPL,-Dmsdk=disabled,vpl-gpu-rt"
66PACKAGECONFIG[neon] = "-Dneon=enabled,-Dneon=disabled,neon"
67PACKAGECONFIG[openal] = "-Dopenal=enabled,-Dopenal=disabled,openal-soft"
68PACKAGECONFIG[opencv] = "-Dopencv=enabled,-Dopencv=disabled,opencv"
69PACKAGECONFIG[openh264] = "-Dopenh264=enabled,-Dopenh264=disabled,openh264"
70PACKAGECONFIG[openjpeg] = "-Dopenjpeg=enabled,-Dopenjpeg=disabled,openjpeg"
71PACKAGECONFIG[openmpt] = "-Dopenmpt=enabled,-Dopenmpt=disabled,libopenmpt"
72# the opus encoder/decoder elements are now in the -base package,
73# but the opus parser remains in -bad
74PACKAGECONFIG[opusparse] = "-Dopus=enabled,-Dopus=disabled,libopus"
75PACKAGECONFIG[resindvd] = "-Dresindvd=enabled,-Dresindvd=disabled,libdvdread libdvdnav"
76PACKAGECONFIG[rsvg] = "-Drsvg=enabled,-Drsvg=disabled,librsvg"
77PACKAGECONFIG[rtmp] = "-Drtmp=enabled,-Drtmp=disabled,rtmpdump"
78PACKAGECONFIG[sbc] = "-Dsbc=enabled,-Dsbc=disabled,sbc"
79PACKAGECONFIG[sctp] = "-Dsctp=enabled,-Dsctp=disabled"
80PACKAGECONFIG[smoothstreaming] = "-Dsmoothstreaming=enabled,-Dsmoothstreaming=disabled,libxml2"
81PACKAGECONFIG[sndfile] = "-Dsndfile=enabled,-Dsndfile=disabled,libsndfile1"
82PACKAGECONFIG[srt] = "-Dsrt=enabled,-Dsrt=disabled,srt"
83PACKAGECONFIG[srtp] = "-Dsrtp=enabled,-Dsrtp=disabled,libsrtp"
84PACKAGECONFIG[tinyalsa] = "-Dtinyalsa=enabled,-Dtinyalsa=disabled,tinyalsa"
85PACKAGECONFIG[ttml] = "-Dttml=enabled,-Dttml=disabled,libxml2 pango cairo"
86PACKAGECONFIG[uvch264] = "-Duvch264=enabled,-Duvch264=disabled,libusb1 libgudev"
87# this enables support for stateless V4L2 mem2mem codecs, which is a newer form of
88# V4L2 codec; the V4L2 code in -base supports the older stateful V4L2 mem2mem codecs
89PACKAGECONFIG[v4l2codecs] = "-Dv4l2codecs=enabled,-Dv4l2codecs=disabled,libgudev"
90PACKAGECONFIG[va] = "-Dva=enabled,-Dva=disabled,libva"
91PACKAGECONFIG[voaacenc] = "-Dvoaacenc=enabled,-Dvoaacenc=disabled,vo-aacenc"
92PACKAGECONFIG[voamrwbenc] = "-Dvoamrwbenc=enabled,-Dvoamrwbenc=disabled,vo-amrwbenc"
93PACKAGECONFIG[vulkan] = "-Dvulkan=enabled,-Dvulkan=disabled,vulkan-loader shaderc-native"
94PACKAGECONFIG[wayland] = "-Dwayland=enabled,-Dwayland=disabled,wayland-native wayland wayland-protocols libdrm"
95PACKAGECONFIG[webp] = "-Dwebp=enabled,-Dwebp=disabled,libwebp"
96PACKAGECONFIG[webrtc] = "-Dwebrtc=enabled,-Dwebrtc=disabled,libnice"
97PACKAGECONFIG[webrtcdsp] = "-Dwebrtcdsp=enabled,-Dwebrtcdsp=disabled,webrtc-audio-processing-1"
98PACKAGECONFIG[zbar] = "-Dzbar=enabled,-Dzbar=disabled,zbar"
99PACKAGECONFIG[x11] = "-Dx11=enabled,-Dx11=disabled,libxcb libxkbcommon"
100PACKAGECONFIG[x265] = "-Dx265=enabled,-Dx265=disabled,x265"
101
102GSTREAMER_GPL = "${@bb.utils.filter('PACKAGECONFIG', 'faad resindvd x265', d)}"
103
104EXTRA_OEMESON += " \
105 -Ddoc=disabled \
106 -Daes=enabled \
107 -Dcodecalpha=enabled \
108 -Ddecklink=enabled \
109 -Ddvb=enabled \
110 -Dfbdev=enabled \
111 -Dipcpipeline=enabled \
112 -Dshm=enabled \
113 -Dtranscode=enabled \
114 -Dandroidmedia=disabled \
115 -Dapplemedia=disabled \
116 -Dasio=disabled \
117 -Dbs2b=disabled \
118 -Dchromaprint=disabled \
119 -Dd3dvideosink=disabled \
120 -Dd3d11=disabled \
121 -Ddirectsound=disabled \
122 -Ddts=disabled \
123 -Dfdkaac=disabled \
124 -Dflite=disabled \
125 -Dgme=disabled \
126 -Dgs=disabled \
127 -Dgsm=disabled \
128 -Diqa=disabled \
129 -Dladspa=disabled \
130 -Dldac=disabled \
131 -Dlv2=disabled \
132 -Dmagicleap=disabled \
133 -Dmediafoundation=disabled \
134 -Dmicrodns=disabled \
135 -Dmpeg2enc=disabled \
136 -Dmplex=disabled \
137 -Dmusepack=disabled \
138 -Dnvcodec=disabled \
139 -Dopenexr=disabled \
140 -Dopenni2=disabled \
141 -Dopenaptx=disabled \
142 -Dopensles=disabled \
143 -Donnx=disabled \
144 -Dqroverlay=disabled \
145 -Dsoundtouch=disabled \
146 -Dspandsp=disabled \
147 -Dsvthevcenc=disabled \
148 -Dteletext=disabled \
149 -Dwasapi=disabled \
150 -Dwasapi2=disabled \
151 -Dwildmidi=disabled \
152 -Dwinks=disabled \
153 -Dwinscreencap=disabled \
154 -Dwpe=disabled \
155 -Dzxing=disabled \
156 -Dlcevcdecoder=disabled \
157 -Dlcevcencoder=disabled \
158 -Dtensordecoders=disabled \
159 -Dnvcomp=disabled \
160 -Dnvdswrapper=disabled \
161 -Dsvtjpegxs=disabled \
162 -Dwebview2=disabled \
163 -Daja=disabled \
164 -Dcuda-nvmm=disabled \
165 -Dd3d12=disabled \
166"
167
168export OPENCV_PREFIX = "${STAGING_DIR_TARGET}${prefix}"
169
170ARM_INSTRUCTION_SET:armv4 = "arm"
171ARM_INSTRUCTION_SET:armv5 = "arm"
172
173CVE_PRODUCT = "gst-plugins-bad"
174
175FILES:${PN}-freeverb += "${datadir}/gstreamer-1.0/presets/GstFreeverb.prs"
176FILES:${PN}-opencv += "${datadir}/gst-plugins-bad/1.0/opencv*"
177FILES:${PN}-transcode += "${datadir}/gstreamer-1.0/encoding-profiles"
178FILES:${PN}-voamrwbenc += "${datadir}/gstreamer-1.0/presets/GstVoAmrwbEnc.prs"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-ENGR00312515-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
deleted file mode 100644
index 719c73d3e3..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-ENGR00312515-get-caps-from-src-pad-when-query-caps.patch
+++ /dev/null
@@ -1,41 +0,0 @@
1From a37f0063103e98f5109132ea302b919b92e26a38 Mon Sep 17 00:00:00 2001
2From: zhouming <b42586@freescale.com>
3Date: Wed, 14 May 2014 10:16:20 +0800
4Subject: [PATCH] ENGR00312515: get caps from src pad when query caps
5
6https://bugzilla.gnome.org/show_bug.cgi?id=728312
7
8Upstream-Status: Pending
9
10Signed-off-by: zhouming <b42586@freescale.com>
11---
12 gst-libs/gst/tag/gsttagdemux.c | 13 +++++++++++++
13 1 file changed, 13 insertions(+)
14 mode change 100644 => 100755 gst-libs/gst/tag/gsttagdemux.c
15
16diff --git a/gst-libs/gst/tag/gsttagdemux.c b/gst-libs/gst/tag/gsttagdemux.c
17old mode 100644
18new mode 100755
19index 975fe83..df82840
20--- a/gst-libs/gst/tag/gsttagdemux.c
21+++ b/gst-libs/gst/tag/gsttagdemux.c
22@@ -1796,6 +1796,19 @@ gst_tag_demux_pad_query (GstPad * pad, GstObject * parent, GstQuery * query)
23 }
24 break;
25 }
26+ case GST_QUERY_CAPS:
27+ {
28+
29+ /* We can hijack caps query if we typefind already */
30+ if (demux->priv->src_caps) {
31+ gst_query_set_caps_result (query, demux->priv->src_caps);
32+ res = TRUE;
33+ } else {
34+ res = gst_pad_query_default (pad, parent, query);
35+ }
36+ break;
37+ }
38+
39 default:
40 res = gst_pad_query_default (pad, parent, query);
41 break;
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-ssaparse-enhance-SSA-text-lines-parsing.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-ssaparse-enhance-SSA-text-lines-parsing.patch
deleted file mode 100644
index bf1e2a89e3..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-ssaparse-enhance-SSA-text-lines-parsing.patch
+++ /dev/null
@@ -1,226 +0,0 @@
1From f892f0be8ae88acc6482f4b9a9a4db5f03b7adf8 Mon Sep 17 00:00:00 2001
2From: Mingke Wang <mingke.wang@freescale.com>
3Date: Thu, 19 Mar 2015 14:17:10 +0800
4Subject: [PATCH] ssaparse: enhance SSA text lines parsing.
5
6some parser will pass in the original ssa text line which starts with "Dialog:"
7and there's are maybe multiple Dialog lines in one input buffer.
8
9Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/178]
10
11Signed-off-by: Mingke Wang <mingke.wang@freescale.com>
12---
13 gst/subparse/gstssaparse.c | 150 +++++++++++++++++++++++++++++++++----
14 1 file changed, 134 insertions(+), 16 deletions(-)
15 mode change 100644 => 100755 gst/subparse/gstssaparse.c
16
17diff --git a/gst/subparse/gstssaparse.c b/gst/subparse/gstssaparse.c
18old mode 100644
19new mode 100755
20index c162a54..bd8afd9
21--- a/gst/subparse/gstssaparse.c
22+++ b/gst/subparse/gstssaparse.c
23@@ -304,6 +304,7 @@ gst_ssa_parse_remove_override_codes (GstSsaParse * parse, gchar * txt)
24 * gst_ssa_parse_push_line:
25 * @parse: caller element
26 * @txt: text to push
27+ * @size: text size need to be parse
28 * @start: timestamp for the buffer
29 * @duration: duration for the buffer
30 *
31@@ -313,27 +314,133 @@ gst_ssa_parse_remove_override_codes (GstSsaParse * parse, gchar * txt)
32 * Returns: result of the push of the created buffer
33 */
34 static GstFlowReturn
35-gst_ssa_parse_push_line (GstSsaParse * parse, gchar * txt,
36+gst_ssa_parse_push_line (GstSsaParse * parse, gchar * txt, gint size,
37 GstClockTime start, GstClockTime duration)
38 {
39 GstFlowReturn ret;
40 GstBuffer *buf;
41- gchar *t, *escaped;
42+ gchar *t, *text, *p, *escaped, *p_start, *p_end;
43 gint num, i, len;
44+ GstClockTime start_time = G_MAXUINT64, end_time = 0;
45
46- num = atoi (txt);
47- GST_LOG_OBJECT (parse, "Parsing line #%d at %" GST_TIME_FORMAT,
48- num, GST_TIME_ARGS (start));
49-
50- /* skip all non-text fields before the actual text */
51+ p = text = g_malloc(size + 1);
52+ *p = '\0';
53 t = txt;
54- for (i = 0; i < 8; ++i) {
55- t = strchr (t, ',');
56+
57+ /* there are may have multiple dialogue lines at a time */
58+ while (*t) {
59+ /* ignore leading white space characters */
60+ while (isspace(*t))
61+ t++;
62+
63+ /* ignore Format: and Style: lines */
64+ if (strncmp(t, "Format:", 7) == 0 || strncmp(t, "Style:", 6) == 0) {
65+ while (*t != '\0' && *t != '\n') {
66+ t++;
67+ }
68+ }
69+
70+ if (*t == '\0')
71+ break;
72+
73+ /* continue with next line */
74+ if (*t == '\n') {
75+ t++;
76+ continue;
77+ }
78+
79+ if(strncmp(t, "Dialogue:", 9) != 0) {
80+ /* not started with "Dialogue:", it must be a line trimmed by demuxer */
81+ num = atoi (t);
82+ GST_LOG_OBJECT (parse, "Parsing line #%d at %" GST_TIME_FORMAT,
83+ num, GST_TIME_ARGS (start));
84+
85+ /* skip all non-text fields before the actual text */
86+ for (i = 0; i < 8; ++i) {
87+ t = strchr (t, ',');
88+ if (t == NULL)
89+ break;
90+ ++t;
91+ }
92+ } else {
93+ /* started with "Dialogue:", update timestamp and duration */
94+ /* time format are like Dialog:Mark,0:00:01.02,0:00:03.04,xx,xxx,... */
95+ guint hour, min, sec, msec, len;
96+ GstClockTime tmp;
97+ gchar t_str[12] = {0};
98+
99+ /* find the first ',' */
100+ p_start = strchr (t, ',');
101+ if (p_start)
102+ p_end = strchr (++p_start, ',');
103+
104+ if (p_start && p_end) {
105+ /* copy text between first ',' and second ',' */
106+ strncpy(t_str, p_start, p_end - p_start);
107+ if (sscanf (t_str, "%u:%u:%u.%u", &hour, &min, &sec, &msec) == 4) {
108+ tmp = ((hour*3600) + (min*60) + sec) * GST_SECOND + msec*GST_MSECOND;
109+ GST_DEBUG_OBJECT (parse, "Get start time:%02d:%02d:%02d:%03d\n",
110+ hour, min, sec, msec);
111+ if (start_time > tmp)
112+ start_time = tmp;
113+ } else {
114+ GST_WARNING_OBJECT (parse,
115+ "failed to parse ssa start timestamp string :%s", t_str);
116+ }
117+
118+ p_start = p_end;
119+ p_end = strchr (++p_start, ',');
120+ if (p_end) {
121+ /* copy text between second ',' and third ',' */
122+ strncpy(t_str, p_start, p_end - p_start);
123+ if (sscanf (t_str, "%u:%u:%u.%u", &hour, &min, &sec, &msec) == 4) {
124+ tmp = ((hour*3600) + (min*60) + sec)*GST_SECOND + msec*GST_MSECOND;
125+ GST_DEBUG_OBJECT(parse, "Get end time:%02d:%02d:%02d:%03d\n",
126+ hour, min, sec, msec);
127+ if (end_time < tmp)
128+ end_time = tmp;
129+ } else {
130+ GST_WARNING_OBJECT (parse,
131+ "failed to parse ssa end timestamp string :%s", t_str);
132+ }
133+ }
134+ }
135+
136+ /* now skip all non-text fields before the actual text */
137+ for (i = 0; i <= 8; ++i) {
138+ t = strchr (t, ',');
139+ if (t == NULL)
140+ break;
141+ ++t;
142+ }
143+ }
144+
145+ /* line end before expected number of ',', not a Dialogue line */
146 if (t == NULL)
147- return GST_FLOW_ERROR;
148- ++t;
149+ break;
150+
151+ /* if not the first line, and the last character of previous line is '\0',
152+ * then replace it with '\N' */
153+ if (p != text && *p == '\0') {
154+ *p++ = '\\';
155+ *p++ = 'N';
156+ }
157+
158+ /* copy all actual text of this line */
159+ while ((*t != '\0') && (*t != '\n'))
160+ *p++ = *t++;
161+
162+ /* add a terminator at the end */
163+ *p = '\0';
164+ }
165+
166+ /* not valid text found in this buffer return OK to let caller unref buffer */
167+ if (strlen(text) <= 0) {
168+ GST_WARNING_OBJECT (parse, "Not valid text found in this buffer\n");
169+ return GST_FLOW_ERROR;
170 }
171
172+ t = text;
173 GST_LOG_OBJECT (parse, "Text : %s", t);
174
175 if (gst_ssa_parse_remove_override_codes (parse, t)) {
176@@ -351,13 +458,22 @@ gst_ssa_parse_push_line (GstSsaParse * parse, gchar * txt,
177 gst_buffer_fill (buf, 0, escaped, len + 1);
178 gst_buffer_set_size (buf, len);
179 g_free (escaped);
180+ g_free(t);
181+
182+ if (start_time != G_MAXUINT64)
183+ GST_BUFFER_TIMESTAMP (buf) = start_time;
184+ else
185+ GST_BUFFER_TIMESTAMP (buf) = start;
186
187- GST_BUFFER_TIMESTAMP (buf) = start;
188- GST_BUFFER_DURATION (buf) = duration;
189+ if (end_time > start_time)
190+ GST_BUFFER_DURATION (buf) = end_time - start_time;
191+ else
192+ GST_BUFFER_DURATION (buf) = duration;
193
194 GST_LOG_OBJECT (parse, "Pushing buffer with timestamp %" GST_TIME_FORMAT
195- " and duration %" GST_TIME_FORMAT, GST_TIME_ARGS (start),
196- GST_TIME_ARGS (duration));
197+ " and duration %" GST_TIME_FORMAT,
198+ GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)),
199+ GST_TIME_ARGS (GST_BUFFER_DURATION (buf)));
200
201 ret = gst_pad_push (parse->srcpad, buf);
202
203@@ -377,6 +493,7 @@ gst_ssa_parse_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buf)
204 GstClockTime ts;
205 gchar *txt;
206 GstMapInfo map;
207+ gint size;
208
209 if (G_UNLIKELY (!parse->framed))
210 goto not_framed;
211@@ -394,13 +511,14 @@ gst_ssa_parse_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buf)
212 /* make double-sure it's 0-terminated and all */
213 gst_buffer_map (buf, &map, GST_MAP_READ);
214 txt = g_strndup ((gchar *) map.data, map.size);
215+ size = map.size;
216 gst_buffer_unmap (buf, &map);
217
218 if (txt == NULL)
219 goto empty_text;
220
221 ts = GST_BUFFER_TIMESTAMP (buf);
222- ret = gst_ssa_parse_push_line (parse, txt, ts, GST_BUFFER_DURATION (buf));
223+ ret = gst_ssa_parse_push_line (parse, txt, size, ts, GST_BUFFER_DURATION (buf));
224
225 if (ret != GST_FLOW_OK && GST_CLOCK_TIME_IS_VALID (ts)) {
226 GstSegment segment;
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
deleted file mode 100644
index 1a988b99de..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-viv-fb-Make-sure-config.h-is-included.patch
+++ /dev/null
@@ -1,29 +0,0 @@
1From 6f06f4b2f13f028250189225a46a39f402428930 Mon Sep 17 00:00:00 2001
2From: Carlos Rafael Giani <crg7475@mailbox.org>
3Date: Tue, 21 May 2019 14:01:11 +0200
4Subject: [PATCH] viv-fb: Make sure config.h is included
5
6This prevents build errors due to missing GST_API_* symbols
7
8Upstream-Status: Pending
9
10Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
11---
12 gst-libs/gst/gl/gl-prelude.h | 4 ++++
13 1 file changed, 4 insertions(+)
14
15diff --git a/gst-libs/gst/gl/gl-prelude.h b/gst-libs/gst/gl/gl-prelude.h
16index 85fca5a..946c729 100644
17--- a/gst-libs/gst/gl/gl-prelude.h
18+++ b/gst-libs/gst/gl/gl-prelude.h
19@@ -22,6 +22,10 @@
20 #ifndef __GST_GL_PRELUDE_H__
21 #define __GST_GL_PRELUDE_H__
22
23+#ifdef HAVE_CONFIG_H
24+#include "config.h"
25+#endif
26+
27 #include <gst/gst.h>
28
29 #ifdef BUILDING_GST_GL
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.26.5.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.26.5.bb
deleted file mode 100644
index f12d81cda9..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.26.5.bb
+++ /dev/null
@@ -1,96 +0,0 @@
1require gstreamer1.0-plugins-common.inc
2
3SUMMARY = "'Base' GStreamer plugins and helper libraries"
4HOMEPAGE = "https://gstreamer.freedesktop.org/"
5BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues"
6LICENSE = "LGPL-2.1-or-later"
7LIC_FILES_CHKSUM = "file://COPYING;md5=69333daa044cb77e486cc36129f7a770"
8
9SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-${PV}.tar.xz \
10 file://0001-ENGR00312515-get-caps-from-src-pad-when-query-caps.patch \
11 file://0003-viv-fb-Make-sure-config.h-is-included.patch \
12 file://0002-ssaparse-enhance-SSA-text-lines-parsing.patch \
13 "
14SRC_URI[sha256sum] = "f0c0e26cbedaa57732cb6a578e8cc13a1164bf18d737d55c333061c52f0c48d7"
15
16S = "${UNPACKDIR}/gst-plugins-base-${PV}"
17
18DEPENDS += "iso-codes util-linux zlib"
19
20inherit gobject-introspection
21
22# opengl packageconfig factored out to make it easy for distros
23# and BSP layers to choose OpenGL APIs/platforms/window systems
24PACKAGECONFIG_X11 = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'opengl glx', '', d)}"
25PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl ${PACKAGECONFIG_X11}', '', d)}"
26
27PACKAGECONFIG ??= " \
28 ${GSTREAMER_ORC} \
29 ${PACKAGECONFIG_GL} \
30 ${@bb.utils.filter('DISTRO_FEATURES', 'alsa x11', d)} \
31 jpeg ogg pango png theora vorbis \
32 ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland egl', '', d)} \
33"
34
35OPENGL_APIS = 'opengl gles2'
36OPENGL_PLATFORMS = 'egl glx'
37
38X11DEPENDS = "virtual/libx11 libsm libxrender libxv"
39X11ENABLEOPTS = "-Dx11=enabled -Dxvideo=enabled -Dxshm=enabled"
40X11DISABLEOPTS = "-Dx11=disabled -Dxvideo=disabled -Dxshm=disabled"
41
42PACKAGECONFIG[alsa] = "-Dalsa=enabled,-Dalsa=disabled,alsa-lib"
43PACKAGECONFIG[cdparanoia] = "-Dcdparanoia=enabled,-Dcdparanoia=disabled,cdparanoia"
44PACKAGECONFIG[graphene] = "-Dgl-graphene=enabled,-Dgl-graphene=disabled,graphene"
45PACKAGECONFIG[jpeg] = "-Dgl-jpeg=enabled,-Dgl-jpeg=disabled,jpeg"
46PACKAGECONFIG[ogg] = "-Dogg=enabled,-Dogg=disabled,libogg"
47PACKAGECONFIG[opus] = "-Dopus=enabled,-Dopus=disabled,libopus"
48PACKAGECONFIG[pango] = "-Dpango=enabled,-Dpango=disabled,pango"
49PACKAGECONFIG[png] = "-Dgl-png=enabled,-Dgl-png=disabled,libpng"
50# This enables Qt5 QML examples in -base. The Qt5 GStreamer
51# qmlglsink and qmlglsrc plugins still exist in -good.
52PACKAGECONFIG[qt5] = "-Dqt5=enabled,-Dqt5=disabled,qtbase qtdeclarative qtbase-native"
53PACKAGECONFIG[theora] = "-Dtheora=enabled,-Dtheora=disabled,libtheora"
54PACKAGECONFIG[tremor] = "-Dtremor=enabled,-Dtremor=disabled,tremor"
55PACKAGECONFIG[visual] = "-Dlibvisual=enabled,-Dlibvisual=disabled,libvisual"
56PACKAGECONFIG[vorbis] = "-Dvorbis=enabled,-Dvorbis=disabled,libvorbis"
57PACKAGECONFIG[x11] = "${X11ENABLEOPTS},${X11DISABLEOPTS},${X11DEPENDS}"
58
59# OpenGL API packageconfigs
60PACKAGECONFIG[opengl] = ",,virtual/libgl libglu"
61PACKAGECONFIG[gles2] = ",,virtual/libgles2"
62
63# OpenGL platform packageconfigs
64PACKAGECONFIG[egl] = ",,virtual/egl"
65PACKAGECONFIG[glx] = ",,virtual/libgl"
66
67# OpenGL window systems (except for X11)
68PACKAGECONFIG[gbm] = ",,virtual/libgbm libgudev libdrm"
69PACKAGECONFIG[wayland] = ",,wayland-native wayland wayland-protocols libdrm"
70PACKAGECONFIG[dispmanx] = ",,virtual/libomxil"
71PACKAGECONFIG[viv-fb] = ",,virtual/libgles2 virtual/libg2d"
72
73OPENGL_WINSYS = "${@bb.utils.filter('PACKAGECONFIG', 'x11 gbm wayland dispmanx egl viv-fb', d)}"
74
75EXTRA_OEMESON += " \
76 -Ddoc=disabled \
77 ${@get_opengl_cmdline_list('gl_api', d.getVar('OPENGL_APIS'), d)} \
78 ${@get_opengl_cmdline_list('gl_platform', d.getVar('OPENGL_PLATFORMS'), d)} \
79 ${@get_opengl_cmdline_list('gl_winsys', d.getVar('OPENGL_WINSYS'), d)} \
80"
81
82FILES:${PN}-dev += "${libdir}/gstreamer-1.0/include/gst/gl/gstglconfig.h"
83FILES:${MLPREFIX}libgsttag-1.0 += "${datadir}/gst-plugins-base/1.0/license-translations.dict"
84
85def get_opengl_cmdline_list(switch_name, options, d):
86 selected_options = []
87 if bb.utils.contains('DISTRO_FEATURES', 'opengl', True, False, d):
88 for option in options.split():
89 if bb.utils.contains('PACKAGECONFIG', option, True, False, d):
90 selected_options += [option]
91 if selected_options:
92 return '-D' + switch_name + '=' + ','.join(selected_options)
93 else:
94 return ''
95
96CVE_PRODUCT += "gst-plugins-base"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-common.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-common.inc
deleted file mode 100644
index 54dd92873f..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-common.inc
+++ /dev/null
@@ -1,47 +0,0 @@
1# This .inc file contains the common setup for the gstreamer1.0-plugins-*
2# plugin set recipes.
3
4# SUMMARY is set in the actual .bb recipes
5HOMEPAGE = "https://gstreamer.freedesktop.org/"
6BUGTRACKER = "https://bugzilla.gnome.org/enter_bug.cgi?product=Gstreamer"
7SECTION = "multimedia"
8
9DEPENDS = "gstreamer1.0 glib-2.0-native"
10
11inherit gettext meson pkgconfig upstream-version-is-even
12
13require gstreamer1.0-plugins-packaging.inc
14
15# Orc enables runtime JIT compilation of data processing routines from Orc
16# bytecode to SIMD instructions for various architectures (currently SSE, MMX,
17# MIPS, Altivec and NEON are supported).
18# This value is used in the PACKAGECONFIG values for each plugin set recipe.
19# By modifying it, Orc can be enabled/disabled in all of these recipes at once.
20GSTREAMER_ORC ?= "orc"
21# workaround to disable orc on mips to fix the build failure
22# {standard input}: Assembler messages:
23# {standard input}:46587: Error: branch out of range
24GSTREAMER_ORC:mips = ""
25PACKAGECONFIG[orc] = "-Dorc=enabled,-Dorc=disabled,orc orc-native"
26
27# TODO: put this in a gettext.bbclass patch (with variables to allow for
28# configuring the option name and the enabled/disabled values).
29def gettext_oemeson(d):
30 if d.getVar('USE_NLS') == 'no':
31 return '-Dnls=disabled'
32 # Remove the NLS bits if USE_NLS is no or INHIBIT_DEFAULT_DEPS is set
33 if d.getVar('INHIBIT_DEFAULT_DEPS') and not oe.utils.inherits(d, 'cross-canadian'):
34 return '-Dnls=disabled'
35 return '-Dnls=enabled'
36
37# Not all plugin sets contain examples, so the -Dexamples
38# option needs to be added conditionally.
39GST_PLUGIN_SET_HAS_EXAMPLES ?= "1"
40
41EXTRA_OEMESON += " \
42 ${@bb.utils.contains('GST_PLUGIN_SET_HAS_EXAMPLES', '1', '-Dexamples=disabled', '', d)} \
43 ${@gettext_oemeson(d)} \
44"
45
46GIR_MESON_ENABLE_FLAG = "enabled"
47GIR_MESON_DISABLE_FLAG = "disabled"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.26.5.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.26.5.bb
deleted file mode 100644
index 4adbc982b7..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.26.5.bb
+++ /dev/null
@@ -1,81 +0,0 @@
1require gstreamer1.0-plugins-common.inc
2
3SUMMARY = "'Good' GStreamer plugins"
4HOMEPAGE = "https://gstreamer.freedesktop.org/"
5BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues"
6
7SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-${PV}.tar.xz"
8
9SRC_URI[sha256sum] = "eb0862e93404b073e98ec50350ece7e6685ea2936cab8118c2b8e938e2cbea8b"
10
11S = "${UNPACKDIR}/gst-plugins-good-${PV}"
12
13LICENSE = "LGPL-2.1-or-later"
14LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
15 file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe"
16
17DEPENDS += "gstreamer1.0-plugins-base libcap zlib"
18RPROVIDES:${PN}-pulseaudio += "${PN}-pulse"
19RPROVIDES:${PN}-soup += "${PN}-souphttpsrc"
20RDEPENDS:${PN}-soup += "${MLPREFIX}${@bb.utils.contains('PACKAGECONFIG', 'soup2', 'libsoup-2.4', 'libsoup', d)}"
21
22PACKAGECONFIG_SOUP ?= "soup3"
23
24PACKAGECONFIG ??= " \
25 ${GSTREAMER_ORC} \
26 ${PACKAGECONFIG_SOUP} \
27 ${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio x11', d)} \
28 ${@bb.utils.contains('TUNE_FEATURES', 'm64', 'asm', '', d)} \
29 bz2 cairo flac gdk-pixbuf gudev jpeg lame libpng mpg123 speex taglib v4l2 \
30"
31
32X11DEPENDS = "virtual/libx11 libsm libxrender libxfixes libxdamage"
33X11ENABLEOPTS = "-Dximagesrc=enabled -Dximagesrc-xshm=enabled -Dximagesrc-xfixes=enabled -Dximagesrc-xdamage=enabled"
34X11DISABLEOPTS = "-Dximagesrc=disabled -Dximagesrc-xshm=disabled -Dximagesrc-xfixes=disabled -Dximagesrc-xdamage=disabled"
35
36QT5WAYLANDDEPENDS = "${@bb.utils.contains("DISTRO_FEATURES", "wayland", "qtwayland", "", d)}"
37
38PACKAGECONFIG[amrnb] = "-Damrnb=enabled,-Damrnb=disabled,opencore-amr"
39PACKAGECONFIG[amrwb] = "-Damrwbdec=enabled,-Damrwbdec=disabled,opencore-amr"
40PACKAGECONFIG[asm] = "-Dasm=enabled,-Dasm=disabled,nasm-native"
41PACKAGECONFIG[bz2] = "-Dbz2=enabled,-Dbz2=disabled,bzip2"
42PACKAGECONFIG[cairo] = "-Dcairo=enabled,-Dcairo=disabled,cairo"
43PACKAGECONFIG[dv1394] = "-Ddv1394=enabled,-Ddv1394=disabled,libiec61883 libavc1394 libraw1394"
44PACKAGECONFIG[flac] = "-Dflac=enabled,-Dflac=disabled,flac"
45PACKAGECONFIG[gdk-pixbuf] = "-Dgdk-pixbuf=enabled,-Dgdk-pixbuf=disabled,gdk-pixbuf"
46PACKAGECONFIG[gtk] = "-Dgtk3=enabled,-Dgtk3=disabled,gtk+3"
47PACKAGECONFIG[gudev] = "-Dv4l2-gudev=enabled,-Dv4l2-gudev=disabled,libgudev"
48PACKAGECONFIG[jack] = "-Djack=enabled,-Djack=disabled,jack"
49PACKAGECONFIG[jpeg] = "-Djpeg=enabled,-Djpeg=disabled,jpeg"
50PACKAGECONFIG[lame] = "-Dlame=enabled,-Dlame=disabled,lame"
51PACKAGECONFIG[libpng] = "-Dpng=enabled,-Dpng=disabled,libpng"
52PACKAGECONFIG[libv4l2] = "-Dv4l2-libv4l2=enabled,-Dv4l2-libv4l2=disabled,v4l-utils"
53PACKAGECONFIG[mpg123] = "-Dmpg123=enabled,-Dmpg123=disabled,mpg123"
54PACKAGECONFIG[pulseaudio] = "-Dpulse=enabled,-Dpulse=disabled,pulseaudio"
55PACKAGECONFIG[qt5] = "-Dqt5=enabled,-Dqt5=disabled,qtbase qtdeclarative qtbase-native qttools-native ${QT5WAYLANDDEPENDS}"
56PACKAGECONFIG[soup2] = "-Dsoup=enabled,,libsoup-2.4,,,soup3"
57PACKAGECONFIG[soup3] = "-Dsoup=enabled,,libsoup,,,soup2"
58PACKAGECONFIG[speex] = "-Dspeex=enabled,-Dspeex=disabled,speex"
59PACKAGECONFIG[rpi] = "-Drpicamsrc=enabled,-Drpicamsrc=disabled,userland"
60PACKAGECONFIG[taglib] = "-Dtaglib=enabled,-Dtaglib=disabled,taglib"
61PACKAGECONFIG[v4l2] = "-Dv4l2=enabled -Dv4l2-probe=true,-Dv4l2=disabled -Dv4l2-probe=false"
62PACKAGECONFIG[vpx] = "-Dvpx=enabled,-Dvpx=disabled,libvpx"
63PACKAGECONFIG[wavpack] = "-Dwavpack=enabled,-Dwavpack=disabled,wavpack"
64PACKAGECONFIG[x11] = "${X11ENABLEOPTS},${X11DISABLEOPTS},${X11DEPENDS}"
65
66EXTRA_OEMESON += " \
67 -Ddoc=disabled \
68 -Daalib=disabled \
69 -Ddirectsound=disabled \
70 -Ddv=disabled \
71 -Dlibcaca=disabled \
72 -Doss=enabled \
73 -Doss4=disabled \
74 -Dosxaudio=disabled \
75 -Dosxvideo=disabled \
76 -Dshout2=disabled \
77 -Dtwolame=disabled \
78 -Dwaveform=disabled \
79"
80
81FILES:${PN}-equalizer += "${datadir}/gstreamer-1.0/presets/*.prs"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-license.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-license.inc
deleted file mode 100644
index 8b1c001111..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-license.inc
+++ /dev/null
@@ -1,19 +0,0 @@
1# This .inc file contains functionality for automatically setting
2# the the license of all plugins according to the GSTREAMER_GPL.
3
4PACKAGESPLITFUNCS += "set_gstreamer_license"
5
6python set_gstreamer_license () {
7 import oe.utils
8 pn = d.getVar('PN') + '-'
9 gpl_plugins_names = [pn+plugin for plugin in d.getVar('GSTREAMER_GPL').split()]
10 for pkg in oe.utils.packages_filter_out_system(d):
11 if pkg in gpl_plugins_names:
12 d.setVar('LICENSE:' + pkg, 'GPL-2.0-or-later')
13 else:
14 d.setVar('LICENSE:' + pkg, 'LGPL-2.1-or-later')
15}
16
17EXTRA_OEMESON += " \
18 ${@bb.utils.contains_any('PACKAGECONFIG', "${GSTREAMER_GPL}", '-Dgpl=enabled', '-Dgpl=disabled', d)} \
19 "
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc
deleted file mode 100644
index d77aeed8a2..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc
+++ /dev/null
@@ -1,73 +0,0 @@
1# This .inc file contains functionality for automatically splitting
2# built plugins into individual packages for each plugin. A -meta
3# package is also set up that has no files of its own, but contains
4# the names of all plugin packages in its RDEPENDS list.
5#
6# This is mainly used by the gstreamer1.0-plugins-* plugin set recipes,
7# but can be used in any recipe that produces GStreamer plugins.
8
9# Dynamically generate packages for all enabled plugins
10PACKAGES_DYNAMIC = "^${PN}-.* ^libgst.*"
11
12PACKAGESPLITFUNCS =+ "split_gstreamer10_packages"
13PACKAGESPLITFUNCS += "set_gstreamer10_metapkg_rdepends"
14
15python split_gstreamer10_packages () {
16 gst_libdir = d.expand('${libdir}/gstreamer-1.0')
17 postinst = d.getVar('plugin_postinst')
18 glibdir = d.getVar('libdir')
19
20 # GStreamer libraries
21 do_split_packages(d, glibdir, r'^lib(.*)\.so\.*', 'lib%s', 'GStreamer 1.0 %s library', extra_depends='', allow_links=True)
22 # GStreamer plugin shared objects
23 do_split_packages(d, gst_libdir, r'libgst(.*)\.so$', d.expand('${PN}-%s'), 'GStreamer 1.0 plugin for %s', postinst=postinst, extra_depends='')
24 # GObject introspection files for GStreamer plugins
25 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='')
26 # Static GStreamer libraries for development
27 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')
28}
29
30python set_gstreamer10_metapkg_rdepends () {
31 import os
32 import oe.utils
33
34 # Go through all generated packages (excluding the main package and
35 # the -meta package itself) and add them to the -meta package as RDEPENDS.
36
37 pn = d.getVar('PN')
38 metapkg = pn + '-meta'
39 d.setVar('ALLOW_EMPTY:' + metapkg, "1")
40 d.setVar('FILES:' + metapkg, "")
41 exclude = [ pn, pn + '-meta' ]
42 metapkg_rdepends = []
43 pkgdest = d.getVar('PKGDEST')
44 for pkg in oe.utils.packages_filter_out_system(d):
45 if pkg not in exclude and pkg not in metapkg_rdepends:
46 # See if the package is empty by looking at the contents of its PKGDEST subdirectory.
47 # If this subdirectory is empty, then the package is.
48 # Empty packages do not get added to the meta package's RDEPENDS
49 pkgdir = os.path.join(pkgdest, pkg)
50 if os.path.exists(pkgdir):
51 dir_contents = os.listdir(pkgdir) or []
52 else:
53 dir_contents = []
54 is_empty = len(dir_contents) == 0
55 if not is_empty:
56 metapkg_rdepends.append(pkg)
57 d.setVar('RDEPENDS:' + metapkg, ' '.join(metapkg_rdepends))
58 d.setVar('DESCRIPTION:' + metapkg, pn + ' meta package')
59}
60
61# each plugin-dev depends on PN-dev, plugin-staticdev on PN-staticdev
62# so we need them even when empty (like in gst-plugins-good case)
63ALLOW_EMPTY:${PN} = "1"
64ALLOW_EMPTY:${PN}-dev = "1"
65ALLOW_EMPTY:${PN}-staticdev = "1"
66
67PACKAGES += "${PN}-apps ${PN}-meta ${PN}-glib"
68
69FILES:${PN} = ""
70FILES:${PN}-apps = "${bindir}"
71FILES:${PN}-glib = "${datadir}/glib-2.0"
72
73RRECOMMENDS:${PN} += "${PN}-meta"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.26.5.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.26.5.bb
deleted file mode 100644
index 5583c2f128..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.26.5.bb
+++ /dev/null
@@ -1,44 +0,0 @@
1require gstreamer1.0-plugins-common.inc
2require gstreamer1.0-plugins-license.inc
3
4SUMMARY = "'Ugly GStreamer plugins"
5HOMEPAGE = "https://gstreamer.freedesktop.org/"
6BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly/-/issues"
7
8LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
9 "
10
11LICENSE = "LGPL-2.1-or-later & GPL-2.0-or-later"
12LICENSE_FLAGS = "commercial"
13
14SRC_URI = " \
15 https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-${PV}.tar.xz \
16 "
17
18SRC_URI[sha256sum] = "3dfc43435be97e110816bac6d602b0f206a038546279683d9d25372ff127db52"
19
20S = "${UNPACKDIR}/gst-plugins-ugly-${PV}"
21
22DEPENDS += "gstreamer1.0-plugins-base"
23
24GST_PLUGIN_SET_HAS_EXAMPLES = "0"
25
26PACKAGECONFIG ??= " \
27 ${GSTREAMER_ORC} \
28"
29
30PACKAGECONFIG[a52dec] = "-Da52dec=enabled,-Da52dec=disabled,liba52"
31PACKAGECONFIG[cdio] = "-Dcdio=enabled,-Dcdio=disabled,libcdio"
32PACKAGECONFIG[dvdread] = "-Ddvdread=enabled,-Ddvdread=disabled,libdvdread"
33PACKAGECONFIG[mpeg2dec] = "-Dmpeg2dec=enabled,-Dmpeg2dec=disabled,mpeg2dec"
34PACKAGECONFIG[x264] = "-Dx264=enabled,-Dx264=disabled,x264"
35
36GSTREAMER_GPL = "${@bb.utils.filter('PACKAGECONFIG', 'a52dec cdio dvdread mpeg2dec x264', d)}"
37
38EXTRA_OEMESON += " \
39 -Ddoc=disabled \
40 -Dsidplay=disabled \
41"
42
43FILES:${PN}-amrnb += "${datadir}/gstreamer-1.0/presets/GstAmrnbEnc.prs"
44FILES:${PN}-x264 += "${datadir}/gstreamer-1.0/presets/GstX264Enc.prs"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.26.5.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.26.5.bb
deleted file mode 100644
index 12340245e8..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.26.5.bb
+++ /dev/null
@@ -1,30 +0,0 @@
1SUMMARY = "Python bindings for GStreamer 1.0"
2DESCRIPTION = "GStreamer Python binding overrides (complementing the bindings \
3provided by python-gi) "
4HOMEPAGE = "http://cgit.freedesktop.org/gstreamer/gst-python/"
5SECTION = "multimedia"
6
7LICENSE = "LGPL-2.1-or-later"
8LIC_FILES_CHKSUM = "file://COPYING;md5=c34deae4e395ca07e725ab0076a5f740"
9
10SRC_URI = "https://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz"
11SRC_URI[sha256sum] = "86e2fe2b1bba7ffc18b1d4abe1035fe1c33b20fe4e077cce2f90dbfa445b2341"
12
13DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base python3-pygobject gstreamer1.0-plugins-bad"
14RDEPENDS:${PN} += "gstreamer1.0 gstreamer1.0-plugins-base python3-pygobject"
15
16PNREAL = "gst-python"
17
18S = "${UNPACKDIR}/${PNREAL}-${PV}"
19
20EXTRA_OEMESON += "\
21 -Dtests=disabled \
22 -Dplugin=enabled \
23 -Dlibpython-dir=${libdir} \
24"
25
26inherit meson pkgconfig setuptools3-base upstream-version-is-even features_check
27
28FILES:${PN} += "${libdir}/gstreamer-1.0"
29
30REQUIRED_DISTRO_FEATURES = "gobject-introspection-data"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.26.5.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.26.5.bb
deleted file mode 100644
index a6bfd1d2b0..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.26.5.bb
+++ /dev/null
@@ -1,31 +0,0 @@
1SUMMARY = "A library on top of GStreamer for building an RTSP server"
2HOMEPAGE = "http://cgit.freedesktop.org/gstreamer/gst-rtsp-server/"
3SECTION = "multimedia"
4LICENSE = "LGPL-2.1-or-later"
5LIC_FILES_CHKSUM = "file://COPYING;md5=69333daa044cb77e486cc36129f7a770"
6
7DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base"
8
9PNREAL = "gst-rtsp-server"
10
11SRC_URI = "https://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz"
12
13SRC_URI[sha256sum] = "328dff2457419683f2a4f06ca119cfd22beb632cee1ad6830591213325353c44"
14
15S = "${UNPACKDIR}/${PNREAL}-${PV}"
16
17inherit meson pkgconfig upstream-version-is-even gobject-introspection
18
19EXTRA_OEMESON += " \
20 -Ddoc=disabled \
21 -Dexamples=disabled \
22 -Dtests=disabled \
23"
24
25GIR_MESON_ENABLE_FLAG = "enabled"
26GIR_MESON_DISABLE_FLAG = "disabled"
27
28# Starting with 1.8.0 gst-rtsp-server includes dependency-less plugins as well
29require gstreamer1.0-plugins-packaging.inc
30
31CVE_PRODUCT += "gst-rtsp-server"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.26.5.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.26.5.bb
deleted file mode 100644
index f61125105d..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.26.5.bb
+++ /dev/null
@@ -1,53 +0,0 @@
1SUMMARY = "VA-API support to GStreamer"
2HOMEPAGE = "https://gstreamer.freedesktop.org/"
3DESCRIPTION = "gstreamer-vaapi consists of a collection of VA-API \
4based plugins for GStreamer and helper libraries: `vaapidecode', \
5`vaapiconvert', and `vaapisink'."
6
7REALPN = "gstreamer-vaapi"
8
9LICENSE = "LGPL-2.1-or-later"
10LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
11
12SRC_URI = "https://gstreamer.freedesktop.org/src/${REALPN}/${REALPN}-${PV}.tar.xz"
13
14SRC_URI[sha256sum] = "b42d44db63f3195a6f33296e1ead32c14d01ef27452b7068f1a2d86624f55ea9"
15
16S = "${UNPACKDIR}/${REALPN}-${PV}"
17DEPENDS = "libva gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad"
18
19inherit meson pkgconfig features_check upstream-version-is-even
20
21REQUIRED_DISTRO_FEATURES ?= "opengl"
22
23EXTRA_OEMESON += " \
24 -Ddoc=disabled \
25 -Dexamples=disabled \
26 -Dtests=enabled \
27"
28
29PACKAGES =+ "${PN}-tests"
30
31# OpenGL packageconfig factored out to make it easy for distros
32# and BSP layers to pick either glx, egl, or no GL. By default,
33# try detecting X11 first, and if found (with OpenGL), use GLX,
34# otherwise try to check if EGL can be used.
35PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'glx', \
36 bb.utils.contains('DISTRO_FEATURES', 'opengl', 'egl', \
37 '', d), d)}"
38
39PACKAGECONFIG ??= "drm encoders \
40 ${PACKAGECONFIG_GL} \
41 ${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11', d)}"
42
43PACKAGECONFIG[drm] = "-Ddrm=enabled,-Ddrm=disabled,udev libdrm"
44PACKAGECONFIG[egl] = "-Degl=enabled,-Degl=disabled,virtual/egl"
45PACKAGECONFIG[encoders] = "-Dencoders=enabled,-Dencoders=disabled"
46PACKAGECONFIG[glx] = "-Dglx=enabled,-Dglx=disabled,virtual/libgl"
47PACKAGECONFIG[wayland] = "-Dwayland=enabled,-Dwayland=disabled,wayland-native wayland wayland-protocols"
48PACKAGECONFIG[x11] = "-Dx11=enabled,-Dx11=disabled,virtual/libx11 libxrandr libxrender"
49
50FILES:${PN} += "${libdir}/gstreamer-*/*.so"
51FILES:${PN}-dbg += "${libdir}/gstreamer-*/.debug"
52FILES:${PN}-dev += "${libdir}/gstreamer-*/*.a"
53FILES:${PN}-tests = "${bindir}/*"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-tests-respect-the-idententaion-used-in-meson.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-tests-respect-the-idententaion-used-in-meson.patch
deleted file mode 100644
index e1d870b040..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-tests-respect-the-idententaion-used-in-meson.patch
+++ /dev/null
@@ -1,33 +0,0 @@
1From ad4c577ff8d29f6dbaf5ca2d013e9d21c44f9122 Mon Sep 17 00:00:00 2001
2From: Jose Quaresma <quaresma.jose@gmail.com>
3Date: Sun, 11 Apr 2021 19:48:13 +0100
4Subject: [PATCH] tests: respect the idententaion used in meson
5
6Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789]
7
8Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
9---
10 tests/check/meson.build | 10 +++++-----
11 1 file changed, 5 insertions(+), 5 deletions(-)
12
13diff --git a/tests/check/meson.build b/tests/check/meson.build
14index 78a6f9a..e3cb966 100644
15--- a/tests/check/meson.build
16+++ b/tests/check/meson.build
17@@ -154,11 +154,11 @@ foreach t : core_tests
18
19 if not skip_test
20 exe = executable(test_name, fname,
21- c_args : gst_c_args + test_defines,
22- cpp_args : gst_c_args + test_defines,
23- include_directories : [configinc],
24- link_with : link_with_libs,
25- dependencies : gst_deps + test_deps,
26+ c_args : gst_c_args + test_defines,
27+ cpp_args : gst_c_args + test_defines,
28+ include_directories : [configinc],
29+ link_with : link_with_libs,
30+ dependencies : gst_deps + test_deps,
31 )
32
33 env = environment()
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-tests-add-support-for-install-the-tests.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-tests-add-support-for-install-the-tests.patch
deleted file mode 100644
index ccfc869813..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-tests-add-support-for-install-the-tests.patch
+++ /dev/null
@@ -1,106 +0,0 @@
1From c33063360791e178de138304e29ab2264582d917 Mon Sep 17 00:00:00 2001
2From: Jose Quaresma <quaresma.jose@gmail.com>
3Date: Sun, 11 Apr 2021 19:48:13 +0100
4Subject: [PATCH] tests: add support for install the tests
5
6This will provide to run the tests using the gnome-desktop-testing [1]
7
8[1] https://wiki.gnome.org/Initiatives/GnomeGoals/InstalledTests
9
10Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789]
11
12Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
13---
14 meson.build | 4 ++++
15 meson_options.txt | 1 +
16 tests/check/meson.build | 22 +++++++++++++++++++++-
17 tests/check/template.test.in | 3 +++
18 4 files changed, 29 insertions(+), 1 deletion(-)
19 create mode 100644 tests/check/template.test.in
20
21diff --git a/meson.build b/meson.build
22index 0a77e90..cadfaeb 100644
23--- a/meson.build
24+++ b/meson.build
25@@ -664,6 +664,10 @@ if bashcomp_dep.found()
26 endif
27 endif
28
29+installed_tests_enabled = get_option('installed_tests')
30+installed_tests_metadir = join_paths(datadir, 'installed-tests', meson.project_name())
31+installed_tests_execdir = join_paths(libexecdir, 'installed-tests', meson.project_name())
32+
33 plugins_install_dir = join_paths(get_option('libdir'), 'gstreamer-1.0')
34
35 pkgconfig = import('pkgconfig')
36diff --git a/meson_options.txt b/meson_options.txt
37index 39255cf..78af552 100644
38--- a/meson_options.txt
39+++ b/meson_options.txt
40@@ -16,6 +16,7 @@ option('poisoning', type : 'boolean', value : false, description : 'Enable poiso
41 option('memory-alignment', type: 'combo',
42 choices : ['1', '2', '4', '8', '16', '32', '64', '128', '256', '512', '1024', '2048', '4096', '8192', 'malloc', 'pagesize'],
43 value: 'malloc')
44+option('installed_tests', type : 'boolean', value : false, description : 'Enable installed tests')
45
46 # Feature options
47 option('check', type : 'feature', value : 'auto', description : 'Build unit test libraries')
48diff --git a/tests/check/meson.build b/tests/check/meson.build
49index e3cb966..e4df289 100644
50--- a/tests/check/meson.build
51+++ b/tests/check/meson.build
52@@ -133,10 +133,16 @@ test_defines = [
53 '-UG_DISABLE_ASSERT',
54 '-UG_DISABLE_CAST_CHECKS',
55 '-DGST_CHECK_TEST_ENVIRONMENT_BEACON="GST_STATE_IGNORE_ELEMENTS"',
56- '-DTESTFILE="' + fsmod.as_posix(meson.current_source_dir()) + '/meson.build"',
57 '-DGST_DISABLE_DEPRECATED',
58 ]
59
60+testfile = meson.current_source_dir() + '/meson.build'
61+if installed_tests_enabled
62+ install_data(testfile, install_dir : installed_tests_metadir, rename : 'testfile')
63+ testfile = installed_tests_metadir + '/testfile'
64+endif
65+test_defines += '-DTESTFILE="@0@"'.format(testfile)
66+
67 # sanity checking
68 if get_option('check').disabled()
69 if get_option('tests').enabled()
70@@ -159,6 +165,8 @@ foreach t : core_tests
71 include_directories : [configinc],
72 link_with : link_with_libs,
73 dependencies : gst_deps + test_deps,
74+ install_dir: installed_tests_execdir,
75+ install: installed_tests_enabled,
76 )
77
78 env = environment()
79@@ -170,6 +178,18 @@ foreach t : core_tests
80 env.set('GST_PLUGIN_SCANNER_1_0', gst_scanner_dir + '/gst-plugin-scanner')
81 env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer')
82
83+ if installed_tests_enabled
84+ test_conf = configuration_data()
85+ test_conf.set('installed_tests_dir', join_paths(prefix, installed_tests_execdir))
86+ test_conf.set('program', test_name)
87+ configure_file(
88+ input: 'template.test.in',
89+ output: test_name + '.test',
90+ install_dir: installed_tests_metadir,
91+ configuration: test_conf
92+ )
93+ endif
94+
95 test(test_name, exe, env: env, timeout : 3 * 60)
96 endif
97 endforeach
98diff --git a/tests/check/template.test.in b/tests/check/template.test.in
99new file mode 100644
100index 0000000..f701627
101--- /dev/null
102+++ b/tests/check/template.test.in
103@@ -0,0 +1,3 @@
104+[Test]
105+Type=session
106+Exec=@installed_tests_dir@/@program@
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-use-a-dictionaries-for-environment.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-use-a-dictionaries-for-environment.patch
deleted file mode 100644
index 1236290e2b..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-use-a-dictionaries-for-environment.patch
+++ /dev/null
@@ -1,47 +0,0 @@
1From 374c6ace83e9697aae0b21ba26f316b79279c39c Mon Sep 17 00:00:00 2001
2From: Jose Quaresma <quaresma.jose@gmail.com>
3Date: Sat, 24 Apr 2021 10:34:47 +0100
4Subject: [PATCH] tests: use a dictionaries for environment
5
6meson environment() can't be passed to configure_file and it is needed for installed_tests,
7use a dictionary as this is simplest solution to install the environment.
8
9Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789]
10
11Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
12---
13 tests/check/meson.build | 21 +++++++++++++--------
14 1 file changed, 13 insertions(+), 8 deletions(-)
15
16diff --git a/tests/check/meson.build b/tests/check/meson.build
17index e4df289..b840005 100644
18--- a/tests/check/meson.build
19+++ b/tests/check/meson.build
20@@ -169,14 +169,19 @@ foreach t : core_tests
21 install: installed_tests_enabled,
22 )
23
24- env = environment()
25- env.set('GST_PLUGIN_PATH_1_0', meson.project_build_root())
26- env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
27- env.set('GST_STATE_IGNORE_ELEMENTS', '')
28- env.set('CK_DEFAULT_TIMEOUT', '20')
29- env.set('GST_REGISTRY', '@0@/@1@.registry'.format(meson.current_build_dir(), test_name))
30- env.set('GST_PLUGIN_SCANNER_1_0', gst_scanner_dir + '/gst-plugin-scanner')
31- env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer')
32+ # meson environment object can't be passed to configure_file and
33+ # installed tests uses configure_file to install the environment.
34+ # use a dictionary as this is the simplest solution
35+ # to install the environment.
36+ env = {
37+ 'GST_PLUGIN_PATH_1_0': meson.project_build_root(),
38+ 'GST_PLUGIN_SYSTEM_PATH_1_0': '',
39+ 'GST_STATE_IGNORE_ELEMENTS': '',
40+ 'CK_DEFAULT_TIMEOUT': '20',
41+ 'GST_REGISTRY': '@0@/@1@.registry'.format(meson.current_build_dir(), test_name),
42+ 'GST_PLUGIN_SCANNER_1_0': gst_scanner_dir + '/gst-plugin-scanner',
43+ 'GST_PLUGIN_LOADING_WHITELIST': 'gstreamer',
44+ }
45
46 if installed_tests_enabled
47 test_conf = configuration_data()
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-add-helper-script-to-run-the-installed_tests.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-add-helper-script-to-run-the-installed_tests.patch
deleted file mode 100644
index df382a4445..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-add-helper-script-to-run-the-installed_tests.patch
+++ /dev/null
@@ -1,71 +0,0 @@
1From e31ab477eed061cc72ed6795b483795d53af6dfc Mon Sep 17 00:00:00 2001
2From: Jose Quaresma <quaresma.jose@gmail.com>
3Date: Sun, 2 May 2021 01:58:01 +0100
4Subject: [PATCH] tests: add helper script to run the installed_tests
5
6- this is a bash script that will run the installed_tests
7with some of the environment variables used in the meson
8testing framework.
9
10Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789]
11
12Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
13---
14 tests/check/meson.build | 17 +++++++++++++++++
15 tests/check/template.sh.in | 9 +++++++++
16 tests/check/template.test.in | 2 +-
17 3 files changed, 27 insertions(+), 1 deletion(-)
18 create mode 100755 tests/check/template.sh.in
19
20diff --git a/tests/check/meson.build b/tests/check/meson.build
21index b840005..252da14 100644
22--- a/tests/check/meson.build
23+++ b/tests/check/meson.build
24@@ -193,6 +193,23 @@ foreach t : core_tests
25 install_dir: installed_tests_metadir,
26 configuration: test_conf
27 )
28+
29+ # All the tests will be deployed on the target machine and
30+ # we use the home folder ~ for the registry which will then expand at runtime.
31+ # Using the /tmp/gstreamer-1.0/@0@.registry can be problematic as it mostly
32+ # is mounted using tmpfs and if the machine crash from some reason we can lost the registry
33+ # that is useful for debug propose of the tests itself.
34+ env += {'GST_REGISTRY': '~/.cache/gstreamer-1.0/@0@.registry'.format(test_name)}
35+
36+ # Set the full path for the test it self.
37+ env += {'TEST': '@0@/@1@'.format(join_paths(prefix, installed_tests_execdir), test_name)}
38+
39+ configure_file(
40+ input : 'template.sh.in',
41+ output: test_name + '.sh',
42+ install_dir: installed_tests_execdir,
43+ configuration : env,
44+ )
45 endif
46
47 test(test_name, exe, env: env, timeout : 3 * 60)
48diff --git a/tests/check/template.sh.in b/tests/check/template.sh.in
49new file mode 100755
50index 0000000..f1318fa
51--- /dev/null
52+++ b/tests/check/template.sh.in
53@@ -0,0 +1,9 @@
54+#!/bin/sh
55+
56+set -ax
57+
58+CK_DEFAULT_TIMEOUT="@CK_DEFAULT_TIMEOUT@"
59+GST_PLUGIN_LOADING_WHITELIST="@GST_PLUGIN_LOADING_WHITELIST@"
60+GST_REGISTRY=@GST_REGISTRY@
61+GST_STATE_IGNORE_ELEMENTS="@GST_STATE_IGNORE_ELEMENTS@"
62+exec @TEST@ "$@"
63diff --git a/tests/check/template.test.in b/tests/check/template.test.in
64index f701627..b74ef6a 100644
65--- a/tests/check/template.test.in
66+++ b/tests/check/template.test.in
67@@ -1,3 +1,3 @@
68 [Test]
69 Type=session
70-Exec=@installed_tests_dir@/@program@
71+Exec=@installed_tests_dir@/@program@.sh
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/run-ptest b/meta/recipes-multimedia/gstreamer/gstreamer1.0/run-ptest
deleted file mode 100755
index 44dc350eb3..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0/run-ptest
+++ /dev/null
@@ -1,26 +0,0 @@
1#! /bin/sh
2
3# Multiply all timeouts by five so they're more likely to work
4# on a loaded system. The default timeout is 20s so this makes it
5# one minute.
6export CK_TIMEOUT_MULTIPLIER=5
7
8# Skip some tests that we know are problematic
9export GST_CHECKS_IGNORE=""
10
11# gstnetclientclock.c:test_functioning is very sensitive to load
12GST_CHECKS_IGNORE="$GST_CHECKS_IGNORE,test_functioning"
13
14# aggregator.c:test_infinite_seek_50_src_live is known to be flaky
15# https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/410
16GST_CHECKS_IGNORE="$GST_CHECKS_IGNORE,test_infinite_seek_50_src_live"
17
18# Known unreliable tests as per subprojects/gst-devtools/validate/launcher/testsuites/check.py:
19GST_CHECKS_IGNORE="$GST_CHECKS_IGNORE,parser_pull_short_read"
20
21# These tests are fragile
22# https://bugzilla.yoctoproject.org/show_bug.cgi?id=14884
23# https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3524
24GST_CHECKS_IGNORE="$GST_CHECKS_IGNORE,parser_convert_duration,parser_pull_frame_growth,parser_reverse_playback"
25
26gnome-desktop-testing-runner --parallel=4 gstreamer "$@"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.26.5.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.26.5.bb
deleted file mode 100644
index 4c800c22d4..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.26.5.bb
+++ /dev/null
@@ -1,74 +0,0 @@
1SUMMARY = "GStreamer 1.0 multimedia framework"
2DESCRIPTION = "GStreamer is a multimedia framework for encoding and decoding video and sound. \
3It supports a wide range of formats including mp3, ogg, avi, mpeg and quicktime."
4HOMEPAGE = "http://gstreamer.freedesktop.org/"
5BUGTRACKER = "https://bugzilla.gnome.org/enter_bug.cgi?product=Gstreamer"
6SECTION = "multimedia"
7LICENSE = "LGPL-2.1-or-later"
8
9DEPENDS = "glib-2.0 glib-2.0-native libxml2 bison-native flex-native"
10
11inherit meson pkgconfig gettext upstream-version-is-even gobject-introspection ptest-gnome
12
13LIC_FILES_CHKSUM = "file://COPYING;md5=69333daa044cb77e486cc36129f7a770 \
14 file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d"
15
16S = "${UNPACKDIR}/gstreamer-${PV}"
17
18SRC_URI = "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz \
19 file://run-ptest \
20 file://0001-tests-respect-the-idententaion-used-in-meson.patch \
21 file://0002-tests-add-support-for-install-the-tests.patch \
22 file://0003-tests-use-a-dictionaries-for-environment.patch \
23 file://0004-tests-add-helper-script-to-run-the-installed_tests.patch \
24 "
25SRC_URI[sha256sum] = "0a7edb0e7b42dbe6b575fce61a4808a3f6b20e085a1eaecbc025d0ec21f1e774"
26
27PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \
28 check \
29 debug \
30 tools"
31
32PACKAGECONFIG[debug] = "-Dgst_debug=true,-Dgst_debug=false"
33PACKAGECONFIG[tracer-hooks] = "-Dtracer_hooks=true,-Dtracer_hooks=false"
34PACKAGECONFIG[coretracers] = "-Dcoretracers=enabled,-Dcoretracers=disabled"
35PACKAGECONFIG[check] = "-Dcheck=enabled,-Dcheck=disabled"
36PACKAGECONFIG[tests] = "-Dtests=enabled -Dinstalled_tests=true,-Dtests=disabled -Dinstalled_tests=false"
37PACKAGECONFIG[unwind] = "-Dlibunwind=enabled,-Dlibunwind=disabled,libunwind"
38PACKAGECONFIG[dw] = "-Dlibdw=enabled,-Dlibdw=disabled,elfutils"
39PACKAGECONFIG[bash-completion] = "-Dbash-completion=enabled,-Dbash-completion=disabled,bash-completion"
40PACKAGECONFIG[tools] = "-Dtools=enabled,-Dtools=disabled"
41PACKAGECONFIG[setcap] = "-Dptp-helper-permissions=capabilities,,libcap libcap-native"
42
43# TODO: put this in a gettext.bbclass patch
44def gettext_oemeson(d):
45 if d.getVar('USE_NLS') == 'no':
46 return '-Dnls=disabled'
47 # Remove the NLS bits if USE_NLS is no or INHIBIT_DEFAULT_DEPS is set
48 if d.getVar('INHIBIT_DEFAULT_DEPS') and not oe.utils.inherits(d, 'cross-canadian'):
49 return '-Dnls=disabled'
50 return '-Dnls=enabled'
51
52EXTRA_OEMESON += " \
53 -Ddoc=disabled \
54 -Dexamples=disabled \
55 -Ddbghelp=disabled \
56 ${@gettext_oemeson(d)} \
57"
58
59GIR_MESON_ENABLE_FLAG = "enabled"
60GIR_MESON_DISABLE_FLAG = "disabled"
61
62PACKAGES += "${PN}-bash-completion"
63
64# Add the core element plugins to the main package
65FILES:${PN} += "${libdir}/gstreamer-1.0/*.so"
66FILES:${PN}-dev += "${libdir}/gstreamer-1.0/*.a ${libdir}/gstreamer-1.0/include"
67FILES:${PN}-bash-completion += "${datadir}/bash-completion/completions/ ${datadir}/bash-completion/helpers/gst*"
68FILES:${PN}-dbg += "${datadir}/gdb ${datadir}/gstreamer-1.0/gdb"
69
70RDEPENDS:${PN}-ptest:append:libc-glibc = " glibc-gconv-iso8859-5"
71
72CVE_PRODUCT = "gstreamer"
73
74PTEST_BUILD_HOST_FILES = ""
diff --git a/meta/recipes-multimedia/lame/lame/clang.patch b/meta/recipes-multimedia/lame/lame/clang.patch
deleted file mode 100644
index 116000c577..0000000000
--- a/meta/recipes-multimedia/lame/lame/clang.patch
+++ /dev/null
@@ -1,99 +0,0 @@
1Don't use -march=native when building with clang
2
3Because of a logic error, lame's configure always passes -march=native
4when building with clang.
5
6This is a terrible idea in general as it's not often your build machine
7and target hardware aligns, and leads to some amusing errors:
8
9 unknown target CPU 'neoverse-n1'
10 note: valid target CPU values are: i386, i486, ...
11
12Move the HAVE_CLANG block up into the FULL_OPTIMIZATION case, alongside
13HAVE_GCC. This option is never enabled (as it's basically "use native")
14so resolves the build failure.
15
16Upstream-Status: Pending
17Signed-off-by: Ross Burton <ross.burton@arm.com>
18
19diff --git i/configure.in w/configure.in
20index 5e43179..d51b017 100644
21--- i/configure.in
22+++ w/configure.in
23@@ -960,45 +960,43 @@ if test "x$HAVE_GCC" = "xyes" -o "x$HAVE_CLANG" = "xyes"; then
24 ;;
25 esac
26 fi
27+
28+ if test "x${HAVE_CLANG}" = "xyes"; then
29+ case "${CLANG_VERSION}" in
30+ 3.[89]*|[45].*)
31+ OPTIMIZATION="-Ofast"
32+ ;;
33+ *)
34+ OPTIMIZATION="-O3"
35+ ;;
36+ esac
37+
38+ # generic CPU specific options
39+ case ${host_cpu} in
40+ *486)
41+ OPTIMIZATION="${OPTIMIZATION} -march=i486"
42+ ;;
43+ *586)
44+ OPTIMIZATION="${OPTIMIZATION} -march=i586 \
45+ -mtune=native"
46+ ;;
47+ *686)
48+ OPTIMIZATION="${OPTIMIZATION} -march=i686 \
49+ -mtune=native"
50+ ;;
51+ *86)
52+ OPTIMIZATION="${OPTIMIZATION} -march=native \
53+ -mtune=native"
54+ ;;
55+ esac
56+
57+ fi
58 ;;
59 *)
60 AC_MSG_ERROR(bad value �${CONFIG_EXPOPT}� for expopt option)
61 ;;
62 esac
63
64-
65- if test "x${HAVE_CLANG}" = "xyes"; then
66- case "${CLANG_VERSION}" in
67- 3.[89]*|[45].*)
68- OPTIMIZATION="-Ofast"
69- ;;
70- *)
71- OPTIMIZATION="-O3"
72- ;;
73- esac
74-
75- # generic CPU specific options
76- case ${host_cpu} in
77- *486)
78- OPTIMIZATION="${OPTIMIZATION} -march=i486"
79- ;;
80- *586)
81- OPTIMIZATION="${OPTIMIZATION} -march=i586 \
82- -mtune=native"
83- ;;
84- *686)
85- OPTIMIZATION="${OPTIMIZATION} -march=i686 \
86- -mtune=native"
87- ;;
88- *86)
89- OPTIMIZATION="${OPTIMIZATION} -march=native \
90- -mtune=native"
91- ;;
92- esac
93-
94- fi
95-
96-
97 if test "${expopt_msg_result_printed}" = "no" ; then
98 AC_MSG_RESULT(${CONFIG_EXPOPT})
99 fi
diff --git a/meta/recipes-multimedia/lame/lame/no-gtk1.patch b/meta/recipes-multimedia/lame/lame/no-gtk1.patch
deleted file mode 100644
index e88d7f1bb4..0000000000
--- a/meta/recipes-multimedia/lame/lame/no-gtk1.patch
+++ /dev/null
@@ -1,20 +0,0 @@
1Upstream-Status: Inappropriate [configuration]
2
3# Acquired from OpenEmbedded
4
5--- lame-3.96.1/configure.in~no-gtk1.patch 2004-07-25 15:52:12.000000000 +0100
6+++ lame-3.96.1/configure.in 2004-09-10 15:54:39.000000000 +0100
7@@ -363,7 +363,12 @@
8
9 dnl configure use of features
10
11-AM_PATH_GTK(1.2.0, HAVE_GTK="yes", HAVE_GTK="no")
12+#AM_PATH_GTK(1.2.0, HAVE_GTK="yes", HAVE_GTK="no")
13+HAVE_GTK="no"
14+GTK_CFLAGS=""
15+GTK_LIBS=""
16+AC_SUBST(GTK_CFLAGS)
17+AC_SUBST(GTK_LIBS)
18
19 dnl ElectricFence malloc debugging
20 AC_MSG_CHECKING(use of ElectricFence malloc debugging)
diff --git a/meta/recipes-multimedia/lame/lame_3.100.bb b/meta/recipes-multimedia/lame/lame_3.100.bb
deleted file mode 100644
index 42689df351..0000000000
--- a/meta/recipes-multimedia/lame/lame_3.100.bb
+++ /dev/null
@@ -1,26 +0,0 @@
1SUMMARY = "High quality MP3 audio encoder"
2DESCRIPTION = "LAME is an educational tool to be used for learning about MP3 encoding."
3HOMEPAGE = "https://lame.sourceforge.io/"
4BUGTRACKER = "http://sourceforge.net/tracker/?group_id=290&atid=100290"
5SECTION = "console/utils"
6LICENSE = "LGPL-2.0-or-later"
7LIC_FILES_CHKSUM = "file://COPYING;md5=c46bda00ffbb0ba1dac22f8d087f54d9 \
8 file://include/lame.h;beginline=1;endline=20;md5=a2258182c593c398d15a48262130a92b \
9"
10
11DEPENDS = "ncurses gettext-native"
12
13SRC_URI = "${SOURCEFORGE_MIRROR}/lame/lame-${PV}.tar.gz \
14 file://no-gtk1.patch \
15 file://clang.patch \
16 "
17
18SRC_URI[sha256sum] = "ddfe36cab873794038ae2c1210557ad34857a4b6bdc515785d1da9e175b1da1e"
19
20inherit autotools pkgconfig sourceforge-releases
21
22PACKAGES += "libmp3lame libmp3lame-dev"
23FILES:${PN} = "${bindir}/lame"
24FILES:libmp3lame = "${libdir}/libmp3lame.so.*"
25FILES:libmp3lame-dev = "${includedir} ${libdir}/*"
26FILES:${PN}-dev = ""
diff --git a/meta/recipes-multimedia/libogg/libogg_1.3.6.bb b/meta/recipes-multimedia/libogg/libogg_1.3.6.bb
deleted file mode 100644
index 4810f156f2..0000000000
--- a/meta/recipes-multimedia/libogg/libogg_1.3.6.bb
+++ /dev/null
@@ -1,16 +0,0 @@
1SUMMARY = "Ogg bitstream and framing libary"
2DESCRIPTION = "libogg is the bitstream and framing library \
3for the Ogg project. It provides functions which are \
4necessary to codec libraries like libvorbis."
5HOMEPAGE = "http://xiph.org/"
6BUGTRACKER = "https://trac.xiph.org/newticket"
7SECTION = "libs"
8LICENSE = "BSD-3-Clause"
9LIC_FILES_CHKSUM = "file://COPYING;md5=db1b7a668b2a6f47b2af88fb008ad555 \
10 file://include/ogg/ogg.h;beginline=1;endline=11;md5=eda812856f13a3b1326eb8f020cc3b0b"
11
12SRC_URI = "http://downloads.xiph.org/releases/ogg/${BP}.tar.xz"
13
14SRC_URI[sha256sum] = "5c8253428e181840cd20d41f3ca16557a9cc04bad4a3d04cce84808677fa1061"
15
16inherit autotools pkgconfig
diff --git a/meta/recipes-multimedia/libpng/files/run-ptest b/meta/recipes-multimedia/libpng/files/run-ptest
deleted file mode 100644
index 85051a59f5..0000000000
--- a/meta/recipes-multimedia/libpng/files/run-ptest
+++ /dev/null
@@ -1,7 +0,0 @@
1#!/bin/sh
2
3set -eux
4
5cd src
6
7make check-TESTS
diff --git a/meta/recipes-multimedia/libpng/libpng_1.6.50.bb b/meta/recipes-multimedia/libpng/libpng_1.6.50.bb
deleted file mode 100644
index aa2dc99f10..0000000000
--- a/meta/recipes-multimedia/libpng/libpng_1.6.50.bb
+++ /dev/null
@@ -1,71 +0,0 @@
1SUMMARY = "PNG image format decoding library"
2DESCRIPTION = "An open source project to develop and maintain the reference \
3library for use in applications that read, create, and manipulate PNG \
4(Portable Network Graphics) raster image files. "
5HOMEPAGE = "http://www.libpng.org/"
6SECTION = "libs"
7LICENSE = "Libpng"
8LIC_FILES_CHKSUM = "file://LICENSE;md5=5516d77a3cf75f55a0d37254e3e65a20"
9DEPENDS = "zlib"
10
11LIBV = "16"
12
13SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}${LIBV}/${BP}.tar.xz \
14 file://run-ptest \
15"
16
17SRC_URI[sha256sum] = "4df396518620a7aa3651443e87d1b2862e4e88cad135a8b93423e01706232307"
18
19MIRRORS += "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/ ${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/older-releases/"
20
21UPSTREAM_CHECK_URI = "http://libpng.org/pub/png/libpng.html"
22
23BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config"
24
25inherit autotools binconfig-disabled pkgconfig ptest
26
27# Work around missing symbols
28ARMNEON = "${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off", d)}"
29ARMNEON:aarch64 = "--enable-hardware-optimizations=on"
30EXTRA_OECONF += "${ARMNEON}"
31
32PACKAGES =+ "${PN}-tools"
33
34FILES:${PN}-tools = "${bindir}/png-fix-itxt ${bindir}/pngfix ${bindir}/pngcp"
35
36RDEPENDS:${PN}-ptest += "make bash gawk"
37
38do_install_ptest() {
39 # Install test scripts to ptest path
40 install -d ${D}${PTEST_PATH}/src/tests
41 install -m 755 ${S}/tests/* ${D}${PTEST_PATH}/src/tests
42 install -m 755 ${S}/test-driver ${D}${PTEST_PATH}
43 install -d ${D}${PTEST_PATH}/src/tests/scripts
44 install -m 755 ${S}/scripts/*.awk ${D}${PTEST_PATH}/src/tests/scripts
45 install -m 644 ${S}/scripts/pnglib* ${S}/scripts/*.c ${S}/scripts/*.def ${S}/scripts/macro.lst ${D}${PTEST_PATH}/src/tests/scripts
46 install -m 644 ${S}/scripts/pnglibconf.h.prebuilt ${D}${PTEST_PATH}/src/tests/scripts/pnglibconf.h
47 install -d ${D}${PTEST_PATH}/src/contrib/tools
48 install -m 755 ${S}/contrib/tools/*.sh ${D}${PTEST_PATH}/src/contrib/tools
49 install -m 644 ${S}/contrib/tools/*.c ${S}/contrib/tools/*.h ${D}${PTEST_PATH}/src/contrib/tools
50
51 # Install .libs directory binaries to ptest path
52 install -m 755 ${B}/.libs/pngtest ${B}/.libs/pngstest ${B}/.libs/pngimage ${B}/.libs/pngunknown ${B}/.libs/pngvalid ${D}${PTEST_PATH}/src
53
54 # Copy png files to ptest path
55 cd ${S} && find contrib -name '*.png' | cpio -pd ${D}${PTEST_PATH}/src
56
57 # Install Makefile and png files
58 install -m 644 ${S}/pngtest.png ${D}${PTEST_PATH}/src
59 install -m 644 ${S}/*.png ${S}/*.h ${S}/*.c ${S}/*.dfa ${B}/pnglibconf.out ${S}/Makefile.am ${S}/Makefile.in ${D}${PTEST_PATH}/src/tests
60
61 sed -e 's/^abs_srcdir = ..*/abs_srcdir = \.\./' \
62 -e 's/^top_srcdir = ..*/top_srcdir = \.\./' \
63 -e 's/^srcdir = ..*/srcdir = \./' \
64 -e 's/^Makefile: ..*/Makefile: /' \
65 -e 's/check-TESTS: $(check_PROGRAMS)/check-TESTS:/g' \
66 ${B}/Makefile > ${D}${PTEST_PATH}/src/Makefile
67
68 sed -e 's|#!/bin/awk|#!/usr/bin/awk|g' -i ${D}${PTEST_PATH}/src/tests/scripts/*.awk
69}
70
71BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.2.2.bb b/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.2.2.bb
deleted file mode 100644
index 819096878b..0000000000
--- a/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.2.2.bb
+++ /dev/null
@@ -1,26 +0,0 @@
1SUMMARY = "Audio Sample Rate Conversion library"
2DESCRIPTION = "Also known as Secret Rabbit Code - a library for performing sample rate conversion of audio data."
3HOMEPAGE = "https://libsndfile.github.io/libsamplerate/"
4SECTION = "libs"
5LICENSE = "BSD-2-Clause"
6LIC_FILES_CHKSUM = "file://COPYING;md5=336d6faf40fb600bafb0061f4052f1f4 \
7 file://src/samplerate.c;beginline=1;endline=7;md5=7a4238289dc36bfb70968ccaa5bd0d4f"
8DEPENDS = "libsndfile1"
9
10SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/libsamplerate-${PV}.tar.xz \
11"
12
13SRC_URI[sha256sum] = "3258da280511d24b49d6b08615bbe824d0cacc9842b0e4caf11c52cf2b043893"
14
15CVE_PRODUCT = "libsamplerate"
16
17GITHUB_BASE_URI = "https://github.com/libsndfile/libsamplerate/releases"
18
19S = "${UNPACKDIR}/libsamplerate-${PV}"
20
21inherit autotools pkgconfig github-releases
22
23# FFTW and ALSA are only used in tests and examples, so they don't affect
24# normal builds. It should be safe to ignore these, but explicitly disabling
25# them adds some extra certainty that builds are deterministic.
26EXTRA_OECONF = "--disable-fftw --disable-alsa"
diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/0001-Include-stdbool.h-instead-of-redefining-bool-true-an.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/0001-Include-stdbool.h-instead-of-redefining-bool-true-an.patch
deleted file mode 100644
index 542a783859..0000000000
--- a/meta/recipes-multimedia/libsndfile/libsndfile1/0001-Include-stdbool.h-instead-of-redefining-bool-true-an.patch
+++ /dev/null
@@ -1,65 +0,0 @@
1From 0ba5ab2fb7f29a01dbe570c324011e8cffc89d82 Mon Sep 17 00:00:00 2001
2From: Fabian Greffrath <fabian@greffrath.com>
3Date: Tue, 17 Dec 2024 10:38:47 +0100
4Subject: [PATCH] Include <stdbool.h> instead of redefining `bool`, `true` and
5 `false` keywords
6
7Fixes #1049
8
9Upstream-Status: Submitted [https://github.com/libsndfile/libsndfile/pull/1055]
10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 src/ALAC/alac_decoder.c | 6 +-----
14 src/ALAC/alac_encoder.c | 7 +------
15 2 files changed, 2 insertions(+), 11 deletions(-)
16
17diff --git a/src/ALAC/alac_decoder.c b/src/ALAC/alac_decoder.c
18index 46d3330..1b4a87c 100644
19--- a/src/ALAC/alac_decoder.c
20+++ b/src/ALAC/alac_decoder.c
21@@ -26,6 +26,7 @@
22 #include <stdio.h>
23 #include <stdlib.h>
24 #include <stddef.h>
25+#include <stdbool.h>
26 #include <string.h>
27
28 #include "alac_codec.h"
29@@ -38,11 +39,6 @@
30 #include "ALACBitUtilities.h"
31 #include "EndianPortable.h"
32
33-typedef enum
34-{ false = 0,
35- true = 1
36-} bool ;
37-
38 // constants/data
39 const uint32_t kMaxBitDepth = 32 ; // max allowed bit depth is 32
40
41diff --git a/src/ALAC/alac_encoder.c b/src/ALAC/alac_encoder.c
42index 599399a..f303311 100644
43--- a/src/ALAC/alac_encoder.c
44+++ b/src/ALAC/alac_encoder.c
45@@ -30,6 +30,7 @@
46 // headers
47 #include <stdio.h>
48 #include <stdlib.h>
49+#include <stdbool.h>
50 #include <string.h>
51
52 #include "sfendian.h"
53@@ -44,12 +45,6 @@
54 #include "ALACAudioTypes.h"
55 #include "EndianPortable.h"
56
57-typedef enum
58-{
59- false = 0,
60- true = 1
61-} bool ;
62-
63 static void GetConfig (ALAC_ENCODER *p, ALACSpecificConfig * config) ;
64
65 static int32_t EncodeStereo (ALAC_ENCODER *p, struct BitBuffer * bitstream, const int32_t * input, uint32_t stride, uint32_t channelIndex, uint32_t numSamples) ;
diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2024-50612.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2024-50612.patch
deleted file mode 100644
index 368dd5446b..0000000000
--- a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2024-50612.patch
+++ /dev/null
@@ -1,409 +0,0 @@
1From 4755f5bd7854611d92ad0f1295587b439f9950ba Mon Sep 17 00:00:00 2001
2From: Arthur Taylor <art@ified.ca>
3Date: Fri, 15 Nov 2024 19:46:53 -0800
4Subject: [PATCH] src/ogg: better error checking for vorbis. Fixes #1035
5
6CVE: CVE-2024-50612
7Upstream-Status: Backport [4755f5bd7854611d92ad0f1295587b439f9950ba]
8Signed-off-by: Ross Burton <ross.burton@arm.com>
9---
10 src/ogg.c | 12 ++--
11 src/ogg_opus.c | 17 +++--
12 src/ogg_vorbis.c | 170 ++++++++++++++++++++++++++---------------------
13 3 files changed, 114 insertions(+), 85 deletions(-)
14
15diff --git a/src/ogg.c b/src/ogg.c
16index 529941af8..e2d679d41 100644
17--- a/src/ogg.c
18+++ b/src/ogg.c
19@@ -211,12 +211,16 @@ ogg_read_first_page (SF_PRIVATE *psf, OGG_PRIVATE *odata)
20
21 int
22 ogg_write_page (SF_PRIVATE *psf, ogg_page *page)
23-{ int bytes ;
24+{ int n ;
25
26- bytes = psf_fwrite (page->header, 1, page->header_len, psf) ;
27- bytes += psf_fwrite (page->body, 1, page->body_len, psf) ;
28+ n = psf_fwrite (page->header, 1, page->header_len, psf) ;
29+ if (n == page->header_len)
30+ n += psf_fwrite (page->body, 1, page->body_len, psf) ;
31
32- return bytes == page->header_len + page->body_len ;
33+ if (n != page->body_len + page->header_len)
34+ return -1 ;
35+
36+ return n ;
37 } /* ogg_write_page */
38
39 sf_count_t
40diff --git a/src/ogg_opus.c b/src/ogg_opus.c
41index 511653ecc..e01224b99 100644
42--- a/src/ogg_opus.c
43+++ b/src/ogg_opus.c
44@@ -827,15 +827,16 @@ ogg_opus_write_header (SF_PRIVATE *psf, int UNUSED (calc_length))
45
46 /* The first page MUST only contain the header, so flush it out now */
47 ogg_stream_packetin (&odata->ostream, &op) ;
48- for ( ; (nn = ogg_stream_flush (&odata->ostream, &odata->opage)) ; )
49- { if (! (nn = ogg_write_page (psf, &odata->opage)))
50+ while (ogg_stream_flush (&odata->ostream, &odata->opage))
51+ { nn = ogg_write_page (psf, &odata->opage) ;
52+ if (nn < 0)
53 { psf_log_printf (psf, "Opus : Failed to write header!\n") ;
54 if (psf->error)
55 return psf->error ;
56 return SFE_INTERNAL ;
57 } ;
58 psf->dataoffset += nn ;
59- }
60+ } ;
61
62 /*
63 ** Metadata Tags (manditory)
64@@ -850,15 +851,16 @@ ogg_opus_write_header (SF_PRIVATE *psf, int UNUSED (calc_length))
65 vorbiscomment_write_tags (psf, &op, &opustags_ident, opus_get_version_string (), - (OGG_OPUS_COMMENT_PAD)) ;
66 op.packetno = 2 ;
67 ogg_stream_packetin (&odata->ostream, &op) ;
68- for ( ; (nn = ogg_stream_flush (&odata->ostream, &odata->opage)) ; )
69- { if (! (nn = ogg_write_page (psf, &odata->opage)))
70+ while (ogg_stream_flush (&odata->ostream, &odata->opage))
71+ { nn = ogg_write_page (psf, &odata->opage) ;
72+ if (nn < 0)
73 { psf_log_printf (psf, "Opus : Failed to write comments!\n") ;
74 if (psf->error)
75 return psf->error ;
76 return SFE_INTERNAL ;
77 } ;
78 psf->dataoffset += nn ;
79- }
80+ } ;
81
82 return 0 ;
83 } /* ogg_opus_write_header */
84@@ -1132,7 +1134,8 @@ ogg_opus_write_out (SF_PRIVATE *psf, OGG_PRIVATE *odata, OPUS_PRIVATE *oopus)
85 if (nbytes > 0)
86 { oopus->u.encode.last_segments -= ogg_page_segments (&odata->opage) ;
87 oopus->pg_pos = oopus->pkt_pos ;
88- ogg_write_page (psf, &odata->opage) ;
89+ if (ogg_write_page (psf, &odata->opage) < 0)
90+ return -1 ;
91 }
92 else
93 break ;
94diff --git a/src/ogg_vorbis.c b/src/ogg_vorbis.c
95index add123966..fae252ca0 100644
96--- a/src/ogg_vorbis.c
97+++ b/src/ogg_vorbis.c
98@@ -82,28 +82,6 @@
99 /* How many seconds in the future to not bother bisection searching for. */
100 #define VORBIS_SEEK_THRESHOLD 2
101
102-typedef int convert_func (SF_PRIVATE *psf, int, void *, int, int, float **) ;
103-
104-static int vorbis_read_header (SF_PRIVATE *psf) ;
105-static int vorbis_write_header (SF_PRIVATE *psf, int calc_length) ;
106-static int vorbis_close (SF_PRIVATE *psf) ;
107-static int vorbis_command (SF_PRIVATE *psf, int command, void *data, int datasize) ;
108-static int vorbis_byterate (SF_PRIVATE *psf) ;
109-static int vorbis_calculate_granulepos (SF_PRIVATE *psf, uint64_t *gp_out) ;
110-static int vorbis_skip (SF_PRIVATE *psf, uint64_t target_gp) ;
111-static int vorbis_seek_trysearch (SF_PRIVATE *psf, uint64_t target_gp) ;
112-static sf_count_t vorbis_seek (SF_PRIVATE *psf, int mode, sf_count_t offset) ;
113-static sf_count_t vorbis_read_s (SF_PRIVATE *psf, short *ptr, sf_count_t len) ;
114-static sf_count_t vorbis_read_i (SF_PRIVATE *psf, int *ptr, sf_count_t len) ;
115-static sf_count_t vorbis_read_f (SF_PRIVATE *psf, float *ptr, sf_count_t len) ;
116-static sf_count_t vorbis_read_d (SF_PRIVATE *psf, double *ptr, sf_count_t len) ;
117-static sf_count_t vorbis_write_s (SF_PRIVATE *psf, const short *ptr, sf_count_t len) ;
118-static sf_count_t vorbis_write_i (SF_PRIVATE *psf, const int *ptr, sf_count_t len) ;
119-static sf_count_t vorbis_write_f (SF_PRIVATE *psf, const float *ptr, sf_count_t len) ;
120-static sf_count_t vorbis_write_d (SF_PRIVATE *psf, const double *ptr, sf_count_t len) ;
121-static sf_count_t vorbis_read_sample (SF_PRIVATE *psf, void *ptr, sf_count_t lens, convert_func *transfn) ;
122-static int vorbis_rnull (SF_PRIVATE *psf, int samples, void *vptr, int off , int channels, float **pcm) ;
123-
124 typedef struct
125 { int id ;
126 const char *name ;
127@@ -145,6 +123,45 @@ typedef struct
128 sf_count_t last_page ;
129 } VORBIS_PRIVATE ;
130
131+typedef int convert_func (SF_PRIVATE *psf, int, void *, int, int, float **) ;
132+
133+static int vorbis_read_header (SF_PRIVATE *psf) ;
134+static int vorbis_write_header (SF_PRIVATE *psf, int calc_length) ;
135+static int vorbis_close (SF_PRIVATE *psf) ;
136+static int vorbis_command (SF_PRIVATE *psf, int command, void *data, int datasize) ;
137+static int vorbis_byterate (SF_PRIVATE *psf) ;
138+static int vorbis_calculate_granulepos (SF_PRIVATE *psf, uint64_t *gp_out) ;
139+static int vorbis_skip (SF_PRIVATE *psf, uint64_t target_gp) ;
140+static int vorbis_seek_trysearch (SF_PRIVATE *psf, uint64_t target_gp) ;
141+static sf_count_t vorbis_seek (SF_PRIVATE *psf, int mode, sf_count_t offset) ;
142+static sf_count_t vorbis_read_s (SF_PRIVATE *psf, short *ptr, sf_count_t len) ;
143+static sf_count_t vorbis_read_i (SF_PRIVATE *psf, int *ptr, sf_count_t len) ;
144+static sf_count_t vorbis_read_f (SF_PRIVATE *psf, float *ptr, sf_count_t len) ;
145+static sf_count_t vorbis_read_d (SF_PRIVATE *psf, double *ptr, sf_count_t len) ;
146+static sf_count_t vorbis_write_s (SF_PRIVATE *psf, const short *ptr, sf_count_t len) ;
147+static sf_count_t vorbis_write_i (SF_PRIVATE *psf, const int *ptr, sf_count_t len) ;
148+static sf_count_t vorbis_write_f (SF_PRIVATE *psf, const float *ptr, sf_count_t len) ;
149+static sf_count_t vorbis_write_d (SF_PRIVATE *psf, const double *ptr, sf_count_t len) ;
150+static sf_count_t vorbis_read_sample (SF_PRIVATE *psf, void *ptr, sf_count_t lens, convert_func *transfn) ;
151+static int vorbis_write_samples (SF_PRIVATE *psf, OGG_PRIVATE *odata, VORBIS_PRIVATE *vdata, int in_frames) ;
152+static int vorbis_rnull (SF_PRIVATE *psf, int samples, void *vptr, int off , int channels, float **pcm) ;
153+static void vorbis_log_error (SF_PRIVATE *psf, int error) ;
154+
155+
156+static void
157+vorbis_log_error(SF_PRIVATE *psf, int error) {
158+ switch (error)
159+ { case 0: return;
160+ case OV_EIMPL: psf->error = SFE_UNIMPLEMENTED ; break ;
161+ case OV_ENOTVORBIS: psf->error = SFE_MALFORMED_FILE ; break ;
162+ case OV_EBADHEADER: psf->error = SFE_MALFORMED_FILE ; break ;
163+ case OV_EVERSION: psf->error = SFE_UNSUPPORTED_ENCODING ; break ;
164+ case OV_EFAULT:
165+ case OV_EINVAL:
166+ default: psf->error = SFE_INTERNAL ;
167+ } ;
168+} ;
169+
170 static int
171 vorbis_read_header (SF_PRIVATE *psf)
172 { OGG_PRIVATE *odata = (OGG_PRIVATE *) psf->container_data ;
173@@ -380,7 +397,6 @@ vorbis_write_header (SF_PRIVATE *psf, int UNUSED (calc_length))
174 { ogg_packet header ;
175 ogg_packet header_comm ;
176 ogg_packet header_code ;
177- int result ;
178
179 vorbis_analysis_headerout (&vdata->vdsp, &vdata->vcomment, &header, &header_comm, &header_code) ;
180 ogg_stream_packetin (&odata->ostream, &header) ; /* automatically placed in its own page */
181@@ -390,9 +406,9 @@ vorbis_write_header (SF_PRIVATE *psf, int UNUSED (calc_length))
182 /* This ensures the actual
183 * audio data will start on a new page, as per spec
184 */
185- while ((result = ogg_stream_flush (&odata->ostream, &odata->opage)) != 0)
186- { ogg_write_page (psf, &odata->opage) ;
187- } ;
188+ while (ogg_stream_flush (&odata->ostream, &odata->opage))
189+ if (ogg_write_page (psf, &odata->opage) < 0)
190+ return -1 ;
191 }
192
193 return 0 ;
194@@ -402,6 +418,7 @@ static int
195 vorbis_close (SF_PRIVATE *psf)
196 { OGG_PRIVATE* odata = psf->container_data ;
197 VORBIS_PRIVATE *vdata = psf->codec_data ;
198+ int ret = 0 ;
199
200 if (odata == NULL || vdata == NULL)
201 return 0 ;
202@@ -412,34 +429,14 @@ vorbis_close (SF_PRIVATE *psf)
203 if (psf->file.mode == SFM_WRITE)
204 {
205 if (psf->write_current <= 0)
206- vorbis_write_header (psf, 0) ;
207-
208- vorbis_analysis_wrote (&vdata->vdsp, 0) ;
209- while (vorbis_analysis_blockout (&vdata->vdsp, &vdata->vblock) == 1)
210- {
211+ ret = vorbis_write_header (psf, 0) ;
212
213- /* analysis, assume we want to use bitrate management */
214- vorbis_analysis (&vdata->vblock, NULL) ;
215- vorbis_bitrate_addblock (&vdata->vblock) ;
216-
217- while (vorbis_bitrate_flushpacket (&vdata->vdsp, &odata->opacket))
218- { /* weld the packet into the bitstream */
219- ogg_stream_packetin (&odata->ostream, &odata->opacket) ;
220-
221- /* write out pages (if any) */
222- while (!odata->eos)
223- { int result = ogg_stream_pageout (&odata->ostream, &odata->opage) ;
224- if (result == 0) break ;
225- ogg_write_page (psf, &odata->opage) ;
226-
227- /* this could be set above, but for illustrative purposes, I do
228- it here (to show that vorbis does know where the stream ends) */
229-
230- if (ogg_page_eos (&odata->opage)) odata->eos = 1 ;
231- }
232- }
233- }
234- }
235+ if (ret == 0)
236+ { /* A write of zero samples tells Vorbis the stream is done and to
237+ flush. */
238+ ret = vorbis_write_samples (psf, odata, vdata, 0) ;
239+ } ;
240+ } ;
241
242 /* ogg_page and ogg_packet structs always point to storage in
243 libvorbis. They are never freed or manipulated directly */
244@@ -449,7 +446,7 @@ vorbis_close (SF_PRIVATE *psf)
245 vorbis_comment_clear (&vdata->vcomment) ;
246 vorbis_info_clear (&vdata->vinfo) ;
247
248- return 0 ;
249+ return ret ;
250 } /* vorbis_close */
251
252 int
253@@ -688,33 +685,40 @@ vorbis_read_d (SF_PRIVATE *psf, double *ptr, sf_count_t lens)
254 /*==============================================================================
255 */
256
257-static void
258+static int
259 vorbis_write_samples (SF_PRIVATE *psf, OGG_PRIVATE *odata, VORBIS_PRIVATE *vdata, int in_frames)
260-{
261- vorbis_analysis_wrote (&vdata->vdsp, in_frames) ;
262+{ int ret ;
263+
264+ if ((ret = vorbis_analysis_wrote (&vdata->vdsp, in_frames)) != 0)
265+ return ret ;
266
267 /*
268 ** Vorbis does some data preanalysis, then divvies up blocks for
269 ** more involved (potentially parallel) processing. Get a single
270 ** block for encoding now.
271 */
272- while (vorbis_analysis_blockout (&vdata->vdsp, &vdata->vblock) == 1)
273+ while ((ret = vorbis_analysis_blockout (&vdata->vdsp, &vdata->vblock)) == 1)
274 {
275 /* analysis, assume we want to use bitrate management */
276- vorbis_analysis (&vdata->vblock, NULL) ;
277- vorbis_bitrate_addblock (&vdata->vblock) ;
278+ if ((ret = vorbis_analysis (&vdata->vblock, NULL)) != 0)
279+ return ret ;
280+ if ((ret = vorbis_bitrate_addblock (&vdata->vblock)) != 0)
281+ return ret ;
282
283- while (vorbis_bitrate_flushpacket (&vdata->vdsp, &odata->opacket))
284+ while ((ret = vorbis_bitrate_flushpacket (&vdata->vdsp, &odata->opacket)) == 1)
285 {
286 /* weld the packet into the bitstream */
287- ogg_stream_packetin (&odata->ostream, &odata->opacket) ;
288+ if ((ret = ogg_stream_packetin (&odata->ostream, &odata->opacket)) != 0)
289+ return ret ;
290
291 /* write out pages (if any) */
292 while (!odata->eos)
293- { int result = ogg_stream_pageout (&odata->ostream, &odata->opage) ;
294- if (result == 0)
295+ { ret = ogg_stream_pageout (&odata->ostream, &odata->opage) ;
296+ if (ret == 0)
297 break ;
298- ogg_write_page (psf, &odata->opage) ;
299+
300+ if (ogg_write_page (psf, &odata->opage) < 0)
301+ return -1 ;
302
303 /* This could be set above, but for illustrative purposes, I do
304 ** it here (to show that vorbis does know where the stream ends) */
305@@ -722,16 +726,22 @@ vorbis_write_samples (SF_PRIVATE *psf, OGG_PRIVATE *odata, VORBIS_PRIVATE *vdata
306 odata->eos = 1 ;
307 } ;
308 } ;
309+ if (ret != 0)
310+ return ret ;
311 } ;
312+ if (ret != 0)
313+ return ret ;
314
315 vdata->gp += in_frames ;
316+
317+ return 0 ;
318 } /* vorbis_write_data */
319
320
321 static sf_count_t
322 vorbis_write_s (SF_PRIVATE *psf, const short *ptr, sf_count_t lens)
323 {
324- int i, m, j = 0 ;
325+ int i, m, j = 0, ret ;
326 OGG_PRIVATE *odata = (OGG_PRIVATE *) psf->container_data ;
327 VORBIS_PRIVATE *vdata = (VORBIS_PRIVATE *) psf->codec_data ;
328 int in_frames = lens / psf->sf.channels ;
329@@ -740,14 +750,17 @@ vorbis_write_s (SF_PRIVATE *psf, const short *ptr, sf_count_t lens)
330 for (m = 0 ; m < psf->sf.channels ; m++)
331 buffer [m][i] = (float) (ptr [j++]) / 32767.0f ;
332
333- vorbis_write_samples (psf, odata, vdata, in_frames) ;
334+ if ((ret = vorbis_write_samples (psf, odata, vdata, in_frames)))
335+ { vorbis_log_error (psf, ret) ;
336+ return 0 ;
337+ } ;
338
339 return lens ;
340 } /* vorbis_write_s */
341
342 static sf_count_t
343 vorbis_write_i (SF_PRIVATE *psf, const int *ptr, sf_count_t lens)
344-{ int i, m, j = 0 ;
345+{ int i, m, j = 0, ret ;
346 OGG_PRIVATE *odata = (OGG_PRIVATE *) psf->container_data ;
347 VORBIS_PRIVATE *vdata = (VORBIS_PRIVATE *) psf->codec_data ;
348 int in_frames = lens / psf->sf.channels ;
349@@ -756,14 +769,17 @@ vorbis_write_i (SF_PRIVATE *psf, const int *ptr, sf_count_t lens)
350 for (m = 0 ; m < psf->sf.channels ; m++)
351 buffer [m][i] = (float) (ptr [j++]) / 2147483647.0f ;
352
353- vorbis_write_samples (psf, odata, vdata, in_frames) ;
354+ if ((ret = vorbis_write_samples (psf, odata, vdata, in_frames)))
355+ { vorbis_log_error (psf, ret) ;
356+ return 0 ;
357+ } ;
358
359 return lens ;
360 } /* vorbis_write_i */
361
362 static sf_count_t
363 vorbis_write_f (SF_PRIVATE *psf, const float *ptr, sf_count_t lens)
364-{ int i, m, j = 0 ;
365+{ int i, m, j = 0, ret ;
366 OGG_PRIVATE *odata = (OGG_PRIVATE *) psf->container_data ;
367 VORBIS_PRIVATE *vdata = (VORBIS_PRIVATE *) psf->codec_data ;
368 int in_frames = lens / psf->sf.channels ;
369@@ -772,14 +788,17 @@ vorbis_write_f (SF_PRIVATE *psf, const float *ptr, sf_count_t lens)
370 for (m = 0 ; m < psf->sf.channels ; m++)
371 buffer [m][i] = ptr [j++] ;
372
373- vorbis_write_samples (psf, odata, vdata, in_frames) ;
374+ if ((ret = vorbis_write_samples (psf, odata, vdata, in_frames)) != 0)
375+ { vorbis_log_error (psf, ret) ;
376+ return 0 ;
377+ } ;
378
379 return lens ;
380 } /* vorbis_write_f */
381
382 static sf_count_t
383 vorbis_write_d (SF_PRIVATE *psf, const double *ptr, sf_count_t lens)
384-{ int i, m, j = 0 ;
385+{ int i, m, j = 0, ret ;
386 OGG_PRIVATE *odata = (OGG_PRIVATE *) psf->container_data ;
387 VORBIS_PRIVATE *vdata = (VORBIS_PRIVATE *) psf->codec_data ;
388 int in_frames = lens / psf->sf.channels ;
389@@ -788,7 +807,10 @@ vorbis_write_d (SF_PRIVATE *psf, const double *ptr, sf_count_t lens)
390 for (m = 0 ; m < psf->sf.channels ; m++)
391 buffer [m][i] = (float) ptr [j++] ;
392
393- vorbis_write_samples (psf, odata, vdata, in_frames) ;
394+ if ((ret = vorbis_write_samples (psf, odata, vdata, in_frames)) != 0)
395+ { vorbis_log_error (psf, ret) ;
396+ return 0 ;
397+ } ;
398
399 return lens ;
400 } /* vorbis_write_d */
401@@ -884,7 +906,7 @@ vorbis_seek_trysearch (SF_PRIVATE *psf, uint64_t target_gp)
402 return 0 ;
403
404 /* Search for a position a half large-block before our target. As Vorbis is
405- ** lapped, every sample position come from two blocks, the "left" half of
406+ ** lapped, every sample position comes from two blocks, the "left" half of
407 ** one block and the "right" half of the previous block. The granule
408 ** position of an Ogg page of a Vorbis stream is the sample offset of the
409 ** last finished sample in the stream that can be decoded from a page. A
diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/cve-2022-33065.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/cve-2022-33065.patch
deleted file mode 100644
index fa4b2fc08b..0000000000
--- a/meta/recipes-multimedia/libsndfile/libsndfile1/cve-2022-33065.patch
+++ /dev/null
@@ -1,739 +0,0 @@
1From c7ce5b0ebeeb58934825077d1324960aa0747718 Mon Sep 17 00:00:00 2001
2From: Alex Stewart <alex.stewart@ni.com>
3Date: Tue, 10 Oct 2023 16:10:34 -0400
4Subject: [PATCH] mat4/mat5: fix int overflow in dataend calculation
5
6The clang sanitizer warns of a possible signed integer overflow when
7calculating the `dataend` value in `mat4_read_header()`.
8
9```
10src/mat4.c:323:41: runtime error: signed integer overflow: 205 * -100663296 cannot be represented in type 'int'
11SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior src/mat4.c:323:41 in
12src/mat4.c:323:48: runtime error: signed integer overflow: 838860800 * 4 cannot be represented in type 'int'
13SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior src/mat4.c:323:48 in
14```
15
16Cast the offending `rows` and `cols` ints to `sf_count_t` (the type of
17`dataend` before performing the calculation, to avoid the issue.
18
19CVE: CVE-2022-33065
20Fixes: https://github.com/libsndfile/libsndfile/issues/789
21Fixes: https://github.com/libsndfile/libsndfile/issues/833
22
23Upstream-Status: Backport [9a829113c88a51e57c1e46473e90609e4b7df151]
24
25Signed-off-by: Alex Stewart <alex.stewart@ni.com>
26---
27 src/mat4.c | 2 +-
28 1 file changed, 1 insertion(+), 1 deletion(-)
29
30diff --git a/src/mat4.c b/src/mat4.c
31index 0b1b414b..575683ba 100644
32--- a/src/mat4.c
33+++ b/src/mat4.c
34@@ -320,7 +320,7 @@ mat4_read_header (SF_PRIVATE *psf)
35 psf->filelength - psf->dataoffset, psf->sf.channels * psf->sf.frames * psf->bytewidth) ;
36 }
37 else if ((psf->filelength - psf->dataoffset) > psf->sf.channels * psf->sf.frames * psf->bytewidth)
38- psf->dataend = psf->dataoffset + rows * cols * psf->bytewidth ;
39+ psf->dataend = psf->dataoffset + (sf_count_t) rows * (sf_count_t) cols * psf->bytewidth ;
40
41 psf->datalength = psf->filelength - psf->dataoffset - psf->dataend ;
42
43From 842303f984b2081481e74cb84a9a24ecbe3dec1a Mon Sep 17 00:00:00 2001
44From: Alex Stewart <alex.stewart@ni.com>
45Date: Wed, 11 Oct 2023 16:36:02 -0400
46Subject: [PATCH] au: avoid int overflow while calculating data_end
47
48At several points in au_read_header(), we calculate the functional end
49of the data segment by adding the (int)au_fmt.dataoffset and the
50(int)au_fmt.datasize. This can overflow the implicit int_32 return value
51and cause undefined behavior.
52
53Instead, precalculate the value and assign it to a 64-bit
54(sf_count_t)data_end variable.
55
56CVE: CVE-2022-33065
57Fixes: https://github.com/libsndfile/libsndfile/issues/833
58
59Signed-off-by: Alex Stewart <alex.stewart@ni.com>
60---
61 src/au.c | 10 ++++++----
62 1 file changed, 6 insertions(+), 4 deletions(-)
63
64diff --git a/src/au.c b/src/au.c
65index 62bd691d..f68f2587 100644
66--- a/src/au.c
67+++ b/src/au.c
68@@ -291,6 +291,7 @@ static int
69 au_read_header (SF_PRIVATE *psf)
70 { AU_FMT au_fmt ;
71 int marker, dword ;
72+ sf_count_t data_end ;
73
74 memset (&au_fmt, 0, sizeof (au_fmt)) ;
75 psf_binheader_readf (psf, "pm", 0, &marker) ;
76@@ -317,14 +318,15 @@ au_read_header (SF_PRIVATE *psf)
77 return SFE_AU_EMBED_BAD_LEN ;
78 } ;
79
80+ data_end = (sf_count_t) au_fmt.dataoffset + (sf_count_t) au_fmt.datasize ;
81 if (psf->fileoffset > 0)
82- { psf->filelength = au_fmt.dataoffset + au_fmt.datasize ;
83+ { psf->filelength = data_end ;
84 psf_log_printf (psf, " Data Size : %d\n", au_fmt.datasize) ;
85 }
86- else if (au_fmt.datasize == -1 || au_fmt.dataoffset + au_fmt.datasize == psf->filelength)
87+ else if (au_fmt.datasize == -1 || data_end == psf->filelength)
88 psf_log_printf (psf, " Data Size : %d\n", au_fmt.datasize) ;
89- else if (au_fmt.dataoffset + au_fmt.datasize < psf->filelength)
90- { psf->filelength = au_fmt.dataoffset + au_fmt.datasize ;
91+ else if (data_end < psf->filelength)
92+ { psf->filelength = data_end ;
93 psf_log_printf (psf, " Data Size : %d\n", au_fmt.datasize) ;
94 }
95 else
96From 0754d3380a54e3fbdde0f684b88955c80c79f58f Mon Sep 17 00:00:00 2001
97From: Alex Stewart <alex.stewart@ni.com>
98Date: Wed, 11 Oct 2023 16:46:29 -0400
99Subject: [PATCH] avr: fix int overflow in avr_read_header()
100
101Pre-cast hdr.frames to sf_count_t, to provide the calculation with
102enough numeric space to avoid an int-overflow.
103
104CVE: CVE-2022-33065
105Fixes: https://github.com/libsndfile/libsndfile/issues/833
106
107Signed-off-by: Alex Stewart <alex.stewart@ni.com>
108---
109 src/avr.c | 2 +-
110 1 file changed, 1 insertion(+), 1 deletion(-)
111
112diff --git a/src/avr.c b/src/avr.c
113index 6c78ff69..1bc1ffc9 100644
114--- a/src/avr.c
115+++ b/src/avr.c
116@@ -162,7 +162,7 @@ avr_read_header (SF_PRIVATE *psf)
117 psf->endian = SF_ENDIAN_BIG ;
118
119 psf->dataoffset = AVR_HDR_SIZE ;
120- psf->datalength = hdr.frames * (hdr.rez / 8) ;
121+ psf->datalength = (sf_count_t) hdr.frames * (hdr.rez / 8) ;
122
123 if (psf->fileoffset > 0)
124 psf->filelength = AVR_HDR_SIZE + psf->datalength ;
125From 6ac31a68a614e2bba4a05b54e5558d6270c98376 Mon Sep 17 00:00:00 2001
126From: Alex Stewart <alex.stewart@ni.com>
127Date: Wed, 11 Oct 2023 16:54:21 -0400
128Subject: [PATCH] sds: fix int overflow warning in sample calculations
129
130The sds_*byte_read() functions compose their uint_32 sample buffers by
131shifting 7bit samples into a 32bit wide buffer, and adding them
132together. Because the 7bit samples are stored in 32bit ints, code
133fuzzers become concerned that the addition operation can overflow and
134cause undefined behavior.
135
136Instead, bitwise-OR the bytes together - which should accomplish the
137same arithmetic operation, without risking an int-overflow.
138
139CVE: CVE-2022-33065
140Fixes: https://github.com/libsndfile/libsndfile/issues/833
141
142Signed-off-by: Alex Stewart <alex.stewart@ni.com>
143
144Do the same for the 3byte and 4byte read functions.
145---
146 src/sds.c | 6 +++---
147 1 file changed, 3 insertions(+), 3 deletions(-)
148
149diff --git a/src/sds.c b/src/sds.c
150index 6bc76171..2a0f164c 100644
151--- a/src/sds.c
152+++ b/src/sds.c
153@@ -454,7 +454,7 @@ sds_2byte_read (SF_PRIVATE *psf, SDS_PRIVATE *psds)
154
155 ucptr = psds->read_data + 5 ;
156 for (k = 0 ; k < 120 ; k += 2)
157- { sample = arith_shift_left (ucptr [k], 25) + arith_shift_left (ucptr [k + 1], 18) ;
158+ { sample = arith_shift_left (ucptr [k], 25) | arith_shift_left (ucptr [k + 1], 18) ;
159 psds->read_samples [k / 2] = (int) (sample - 0x80000000) ;
160 } ;
161
162@@ -498,7 +498,7 @@ sds_3byte_read (SF_PRIVATE *psf, SDS_PRIVATE *psds)
163
164 ucptr = psds->read_data + 5 ;
165 for (k = 0 ; k < 120 ; k += 3)
166- { sample = (((uint32_t) ucptr [k]) << 25) + (ucptr [k + 1] << 18) + (ucptr [k + 2] << 11) ;
167+ { sample = (((uint32_t) ucptr [k]) << 25) | (ucptr [k + 1] << 18) | (ucptr [k + 2] << 11) ;
168 psds->read_samples [k / 3] = (int) (sample - 0x80000000) ;
169 } ;
170
171@@ -542,7 +542,7 @@ sds_4byte_read (SF_PRIVATE *psf, SDS_PRIVATE *psds)
172
173 ucptr = psds->read_data + 5 ;
174 for (k = 0 ; k < 120 ; k += 4)
175- { sample = (((uint32_t) ucptr [k]) << 25) + (ucptr [k + 1] << 18) + (ucptr [k + 2] << 11) + (ucptr [k + 3] << 4) ;
176+ { sample = (((uint32_t) ucptr [k]) << 25) | (ucptr [k + 1] << 18) | (ucptr [k + 2] << 11) | (ucptr [k + 3] << 4) ;
177 psds->read_samples [k / 4] = (int) (sample - 0x80000000) ;
178 } ;
179
180From 96428e1dd4998f1cd47df24f8fe9b0da35d7b947 Mon Sep 17 00:00:00 2001
181From: Alex Stewart <alex.stewart@ni.com>
182Date: Wed, 11 Oct 2023 17:26:51 -0400
183Subject: [PATCH] aiff: fix int overflow when counting header elements
184
185aiff_read_basc_chunk() tries to count the AIFF header size by keeping
186track of the bytes returned by psf_binheader_readf(). Though improbable,
187it is technically possible for these added bytes to exceed the int-sized
188`count` accumulator.
189
190Use a 64-bit sf_count_t type for `count`, to ensure that it always has
191enough numeric space.
192
193CVE: CVE-2022-33065
194Fixes: https://github.com/libsndfile/libsndfile/issues/833
195
196Signed-off-by: Alex Stewart <alex.stewart@ni.com>
197---
198 src/aiff.c | 2 +-
199 1 file changed, 1 insertion(+), 1 deletion(-)
200
201diff --git a/src/aiff.c b/src/aiff.c
202index a2bda8f4..6b244302 100644
203--- a/src/aiff.c
204+++ b/src/aiff.c
205@@ -1702,7 +1702,7 @@ static int
206 aiff_read_basc_chunk (SF_PRIVATE * psf, int datasize)
207 { const char * type_str ;
208 basc_CHUNK bc ;
209- int count ;
210+ sf_count_t count ;
211
212 count = psf_binheader_readf (psf, "E442", &bc.version, &bc.numBeats, &bc.rootNote) ;
213 count += psf_binheader_readf (psf, "E222", &bc.scaleType, &bc.sigNumerator, &bc.sigDenominator) ;
214From b352c350d35bf978e4d3a32e5d9df1f2284445f4 Mon Sep 17 00:00:00 2001
215From: Alex Stewart <alex.stewart@ni.com>
216Date: Wed, 11 Oct 2023 17:43:02 -0400
217Subject: [PATCH] ircam: fix int overflow in ircam_read_header()
218
219When reading the IRCAM header, it is possible for the calculated
220blockwidth to exceed the bounds of a signed int32.
221
222Use a 64bit sf_count_t to store the blockwidth.
223
224CVE: CVE-2022-33065
225Fixes: https://github.com/libsndfile/libsndfile/issues/833
226
227Signed-off-by: Alex Stewart <alex.stewart@ni.com>
228---
229 src/common.h | 2 +-
230 src/ircam.c | 10 +++++-----
231 2 files changed, 6 insertions(+), 6 deletions(-)
232
233diff --git a/src/common.h b/src/common.h
234index d92eabde..5369cb67 100644
235--- a/src/common.h
236+++ b/src/common.h
237@@ -439,7 +439,7 @@ typedef struct sf_private_tag
238 sf_count_t datalength ; /* Length in bytes of the audio data. */
239 sf_count_t dataend ; /* Offset to file tailer. */
240
241- int blockwidth ; /* Size in bytes of one set of interleaved samples. */
242+ sf_count_t blockwidth ; /* Size in bytes of one set of interleaved samples. */
243 int bytewidth ; /* Size in bytes of one sample (one channel). */
244
245 void *dither ;
246diff --git a/src/ircam.c b/src/ircam.c
247index 8e7cdba8..3d73ba44 100644
248--- a/src/ircam.c
249+++ b/src/ircam.c
250@@ -171,35 +171,35 @@ ircam_read_header (SF_PRIVATE *psf)
251 switch (encoding)
252 { case IRCAM_PCM_16 :
253 psf->bytewidth = 2 ;
254- psf->blockwidth = psf->sf.channels * psf->bytewidth ;
255+ psf->blockwidth = (sf_count_t) psf->sf.channels * psf->bytewidth ;
256
257 psf->sf.format = SF_FORMAT_IRCAM | SF_FORMAT_PCM_16 ;
258 break ;
259
260 case IRCAM_PCM_32 :
261 psf->bytewidth = 4 ;
262- psf->blockwidth = psf->sf.channels * psf->bytewidth ;
263+ psf->blockwidth = (sf_count_t) psf->sf.channels * psf->bytewidth ;
264
265 psf->sf.format = SF_FORMAT_IRCAM | SF_FORMAT_PCM_32 ;
266 break ;
267
268 case IRCAM_FLOAT :
269 psf->bytewidth = 4 ;
270- psf->blockwidth = psf->sf.channels * psf->bytewidth ;
271+ psf->blockwidth = (sf_count_t) psf->sf.channels * psf->bytewidth ;
272
273 psf->sf.format = SF_FORMAT_IRCAM | SF_FORMAT_FLOAT ;
274 break ;
275
276 case IRCAM_ALAW :
277 psf->bytewidth = 1 ;
278- psf->blockwidth = psf->sf.channels * psf->bytewidth ;
279+ psf->blockwidth = (sf_count_t) psf->sf.channels * psf->bytewidth ;
280
281 psf->sf.format = SF_FORMAT_IRCAM | SF_FORMAT_ALAW ;
282 break ;
283
284 case IRCAM_ULAW :
285 psf->bytewidth = 1 ;
286- psf->blockwidth = psf->sf.channels * psf->bytewidth ;
287+ psf->blockwidth = (sf_count_t) psf->sf.channels * psf->bytewidth ;
288
289 psf->sf.format = SF_FORMAT_IRCAM | SF_FORMAT_ULAW ;
290 break ;
291From 3bcd291e57867f88f558fa6f80990e84311df78c Mon Sep 17 00:00:00 2001
292From: Alex Stewart <alex.stewart@ni.com>
293Date: Wed, 11 Oct 2023 16:12:22 -0400
294Subject: [PATCH] mat4/mat5: fix int overflow when calculating blockwidth
295
296Pre-cast the components of the blockwidth calculation to sf_count_t to
297avoid overflowing integers during calculation.
298
299CVE: CVE-2022-33065
300Fixes: https://github.com/libsndfile/libsndfile/issues/833
301
302Signed-off-by: Alex Stewart <alex.stewart@ni.com>
303---
304 src/mat4.c | 2 +-
305 src/mat5.c | 2 +-
306 2 files changed, 2 insertions(+), 2 deletions(-)
307
308diff --git a/src/mat4.c b/src/mat4.c
309index 575683ba..9f046f0c 100644
310--- a/src/mat4.c
311+++ b/src/mat4.c
312@@ -104,7 +104,7 @@ mat4_open (SF_PRIVATE *psf)
313
314 psf->container_close = mat4_close ;
315
316- psf->blockwidth = psf->bytewidth * psf->sf.channels ;
317+ psf->blockwidth = (sf_count_t) psf->bytewidth * psf->sf.channels ;
318
319 switch (subformat)
320 { case SF_FORMAT_PCM_16 :
321diff --git a/src/mat5.c b/src/mat5.c
322index da5a6eca..20f0ea64 100644
323--- a/src/mat5.c
324+++ b/src/mat5.c
325@@ -114,7 +114,7 @@ mat5_open (SF_PRIVATE *psf)
326
327 psf->container_close = mat5_close ;
328
329- psf->blockwidth = psf->bytewidth * psf->sf.channels ;
330+ psf->blockwidth = (sf_count_t) psf->bytewidth * psf->sf.channels ;
331
332 switch (subformat)
333 { case SF_FORMAT_PCM_U8 :
334From c177e292d47ef73b1d3c1bb391320299a0ed2ff9 Mon Sep 17 00:00:00 2001
335From: Alex Stewart <alex.stewart@ni.com>
336Date: Mon, 16 Oct 2023 12:37:47 -0400
337Subject: [PATCH] common: fix int overflow in psf_binheader_readf()
338
339The psf_binheader_readf() function attempts to count and return the
340number of bytes traversed in the header. During this accumulation, it is
341possible to overflow the int-sized byte_count variable.
342
343Avoid this overflow by checking that the accumulated bytes do not exceed
344INT_MAX and throwing an error if they do. This implies that files with
345multi-gigabyte headers threaten to produce this error, but I imagine
346those files don't really exist - and this error is better than the
347undefined behavior which would have resulted previously.
348
349CVE: CVE-2022-33065
350Fixes: https://github.com/libsndfile/libsndfile/issues/833
351
352Signed-off-by: Alex Stewart <alex.stewart@ni.com>
353---
354 src/common.c | 36 ++++++++++++++++++++++++------------
355 1 file changed, 24 insertions(+), 12 deletions(-)
356
357diff --git a/src/common.c b/src/common.c
358index 1c3d951d..7f6cceca 100644
359--- a/src/common.c
360+++ b/src/common.c
361@@ -18,6 +18,7 @@
362
363 #include <config.h>
364
365+#include <limits.h>
366 #include <stdarg.h>
367 #include <string.h>
368 #if HAVE_UNISTD_H
369@@ -990,6 +991,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...)
370 double *doubleptr ;
371 char c ;
372 int byte_count = 0, count = 0 ;
373+ int read_bytes = 0 ;
374
375 if (! format)
376 return psf_ftell (psf) ;
377@@ -998,6 +1000,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...)
378
379 while ((c = *format++))
380 {
381+ read_bytes = 0 ;
382 if (psf->header.indx + 16 >= psf->header.len && psf_bump_header_allocation (psf, 16))
383 break ;
384
385@@ -1014,7 +1017,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...)
386 intptr = va_arg (argptr, unsigned int*) ;
387 *intptr = 0 ;
388 ucptr = (unsigned char*) intptr ;
389- byte_count += header_read (psf, ucptr, sizeof (int)) ;
390+ read_bytes = header_read (psf, ucptr, sizeof (int)) ;
391 *intptr = GET_MARKER (ucptr) ;
392 break ;
393
394@@ -1022,7 +1025,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...)
395 intptr = va_arg (argptr, unsigned int*) ;
396 *intptr = 0 ;
397 ucptr = (unsigned char*) intptr ;
398- byte_count += header_read (psf, sixteen_bytes, sizeof (sixteen_bytes)) ;
399+ read_bytes = header_read (psf, sixteen_bytes, sizeof (sixteen_bytes)) ;
400 { int k ;
401 intdata = 0 ;
402 for (k = 0 ; k < 16 ; k++)
403@@ -1034,14 +1037,14 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...)
404 case '1' :
405 charptr = va_arg (argptr, char*) ;
406 *charptr = 0 ;
407- byte_count += header_read (psf, charptr, sizeof (char)) ;
408+ read_bytes = header_read (psf, charptr, sizeof (char)) ;
409 break ;
410
411 case '2' : /* 2 byte value with the current endian-ness */
412 shortptr = va_arg (argptr, unsigned short*) ;
413 *shortptr = 0 ;
414 ucptr = (unsigned char*) shortptr ;
415- byte_count += header_read (psf, ucptr, sizeof (short)) ;
416+ read_bytes = header_read (psf, ucptr, sizeof (short)) ;
417 if (psf->rwf_endian == SF_ENDIAN_BIG)
418 *shortptr = GET_BE_SHORT (ucptr) ;
419 else
420@@ -1051,7 +1054,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...)
421 case '3' : /* 3 byte value with the current endian-ness */
422 intptr = va_arg (argptr, unsigned int*) ;
423 *intptr = 0 ;
424- byte_count += header_read (psf, sixteen_bytes, 3) ;
425+ read_bytes = header_read (psf, sixteen_bytes, 3) ;
426 if (psf->rwf_endian == SF_ENDIAN_BIG)
427 *intptr = GET_BE_3BYTE (sixteen_bytes) ;
428 else
429@@ -1062,7 +1065,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...)
430 intptr = va_arg (argptr, unsigned int*) ;
431 *intptr = 0 ;
432 ucptr = (unsigned char*) intptr ;
433- byte_count += header_read (psf, ucptr, sizeof (int)) ;
434+ read_bytes = header_read (psf, ucptr, sizeof (int)) ;
435 if (psf->rwf_endian == SF_ENDIAN_BIG)
436 *intptr = psf_get_be32 (ucptr, 0) ;
437 else
438@@ -1072,7 +1075,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...)
439 case '8' : /* 8 byte value with the current endian-ness */
440 countptr = va_arg (argptr, sf_count_t *) ;
441 *countptr = 0 ;
442- byte_count += header_read (psf, sixteen_bytes, 8) ;
443+ read_bytes = header_read (psf, sixteen_bytes, 8) ;
444 if (psf->rwf_endian == SF_ENDIAN_BIG)
445 countdata = psf_get_be64 (sixteen_bytes, 0) ;
446 else
447@@ -1083,7 +1086,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...)
448 case 'f' : /* Float conversion */
449 floatptr = va_arg (argptr, float *) ;
450 *floatptr = 0.0 ;
451- byte_count += header_read (psf, floatptr, sizeof (float)) ;
452+ read_bytes = header_read (psf, floatptr, sizeof (float)) ;
453 if (psf->rwf_endian == SF_ENDIAN_BIG)
454 *floatptr = float32_be_read ((unsigned char*) floatptr) ;
455 else
456@@ -1093,7 +1096,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...)
457 case 'd' : /* double conversion */
458 doubleptr = va_arg (argptr, double *) ;
459 *doubleptr = 0.0 ;
460- byte_count += header_read (psf, doubleptr, sizeof (double)) ;
461+ read_bytes = header_read (psf, doubleptr, sizeof (double)) ;
462 if (psf->rwf_endian == SF_ENDIAN_BIG)
463 *doubleptr = double64_be_read ((unsigned char*) doubleptr) ;
464 else
465@@ -1117,7 +1120,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...)
466 charptr = va_arg (argptr, char*) ;
467 count = va_arg (argptr, size_t) ;
468 memset (charptr, 0, count) ;
469- byte_count += header_read (psf, charptr, count) ;
470+ read_bytes = header_read (psf, charptr, count) ;
471 break ;
472
473 case 'G' :
474@@ -1128,7 +1131,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...)
475 if (psf->header.indx + count >= psf->header.len && psf_bump_header_allocation (psf, count))
476 break ;
477
478- byte_count += header_gets (psf, charptr, count) ;
479+ read_bytes = header_gets (psf, charptr, count) ;
480 break ;
481
482 case 'z' :
483@@ -1152,7 +1155,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...)
484 case 'j' : /* Seek to position from current position. */
485 count = va_arg (argptr, size_t) ;
486 header_seek (psf, count, SEEK_CUR) ;
487- byte_count += count ;
488+ read_bytes = count ;
489 break ;
490
491 case '!' : /* Clear buffer, forcing re-read. */
492@@ -1164,8 +1167,17 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...)
493 psf->error = SFE_INTERNAL ;
494 break ;
495 } ;
496+
497+ if (read_bytes > 0 && byte_count > (INT_MAX - read_bytes))
498+ { psf_log_printf (psf, "Header size exceeds INT_MAX. Aborting.", c) ;
499+ psf->error = SFE_INTERNAL ;
500+ break ;
501+ } else
502+ { byte_count += read_bytes ;
503 } ;
504
505+ } ; /*end while*/
506+
507 va_end (argptr) ;
508
509 return byte_count ;
510From a23d563386e7c8d93dcdbe7d5b1d63cad6009116 Mon Sep 17 00:00:00 2001
511From: Alex Stewart <alex.stewart@ni.com>
512Date: Thu, 19 Oct 2023 14:07:19 -0400
513Subject: [PATCH] nms_adpcm: fix int overflow in signal estimate
514
515It is possible (though functionally incorrect) for the signal estimate
516calculation in nms_adpcm_update() to overflow the int value of s_e,
517resulting in undefined behavior.
518
519Since adpcm state signal values are never practically larger than
52016 bits, use smaller numeric sizes throughout the file to avoid the
521overflow.
522
523CVE: CVE-2022-33065
524Fixes: https://github.com/libsndfile/libsndfile/issues/833
525
526Authored-by: Arthur Taylor <art@ified.ca>
527Signed-off-by: Alex Stewart <alex.stewart@ni.com>
528Rebased-by: Alex Stewart <alex.stewart@ni.com>
529---
530 src/nms_adpcm.c | 85 ++++++++++++++++++++++++-------------------------
531 1 file changed, 42 insertions(+), 43 deletions(-)
532
533diff --git a/src/nms_adpcm.c b/src/nms_adpcm.c
534index 96d6ad26..460ea077 100644
535--- a/src/nms_adpcm.c
536+++ b/src/nms_adpcm.c
537@@ -48,36 +48,36 @@
538 /* Variable names from ITU G.726 spec */
539 struct nms_adpcm_state
540 { /* Log of the step size multiplier. Operated on by codewords. */
541- int yl ;
542+ short yl ;
543
544 /* Quantizer step size multiplier. Generated from yl. */
545- int y ;
546+ short y ;
547
548- /* Coefficents of the pole predictor */
549- int a [2] ;
550+ /* Coefficients of the pole predictor */
551+ short a [2] ;
552
553- /* Coefficents of the zero predictor */
554- int b [6] ;
555+ /* Coefficients of the zero predictor */
556+ short b [6] ;
557
558 /* Previous quantized deltas (multiplied by 2^14) */
559- int d_q [7] ;
560+ short d_q [7] ;
561
562 /* d_q [x] + s_ez [x], used by the pole-predictor for signs only. */
563- int p [3] ;
564+ short p [3] ;
565
566 /* Previous reconstructed signal values. */
567- int s_r [2] ;
568+ short s_r [2] ;
569
570 /* Zero predictor components of the signal estimate. */
571- int s_ez ;
572+ short s_ez ;
573
574 /* Signal estimate, (including s_ez). */
575- int s_e ;
576+ short s_e ;
577
578 /* The most recent codeword (enc:generated, dec:inputted) */
579- int Ik ;
580+ char Ik ;
581
582- int parity ;
583+ char parity ;
584
585 /*
586 ** Offset into code tables for the bitrate.
587@@ -109,7 +109,7 @@ typedef struct
588 } NMS_ADPCM_PRIVATE ;
589
590 /* Pre-computed exponential interval used in the antilog approximation. */
591-static unsigned int table_expn [] =
592+static unsigned short table_expn [] =
593 { 0x4000, 0x4167, 0x42d5, 0x444c, 0x45cb, 0x4752, 0x48e2, 0x4a7a,
594 0x4c1b, 0x4dc7, 0x4f7a, 0x5138, 0x52ff, 0x54d1, 0x56ac, 0x5892,
595 0x5a82, 0x5c7e, 0x5e84, 0x6096, 0x62b4, 0x64dd, 0x6712, 0x6954,
596@@ -117,21 +117,21 @@ static unsigned int table_expn [] =
597 } ;
598
599 /* Table mapping codewords to scale factor deltas. */
600-static int table_scale_factor_step [] =
601+static short table_scale_factor_step [] =
602 { 0x0, 0x0, 0x0, 0x0, 0x4b0, 0x0, 0x0, 0x0, /* 2-bit */
603 -0x3c, 0x0, 0x90, 0x0, 0x2ee, 0x0, 0x898, 0x0, /* 3-bit */
604 -0x30, 0x12, 0x6b, 0xc8, 0x188, 0x2e0, 0x551, 0x1150, /* 4-bit */
605 } ;
606
607 /* Table mapping codewords to quantized delta interval steps. */
608-static unsigned int table_step [] =
609+static unsigned short table_step [] =
610 { 0x73F, 0, 0, 0, 0x1829, 0, 0, 0, /* 2-bit */
611 0x3EB, 0, 0xC18, 0, 0x1581, 0, 0x226E, 0, /* 3-bit */
612 0x20C, 0x635, 0xA83, 0xF12, 0x1418, 0x19E3, 0x211A, 0x2BBA, /* 4-bit */
613 } ;
614
615 /* Binary search lookup table for quantizing using table_step. */
616-static int table_step_search [] =
617+static short table_step_search [] =
618 { 0, 0x1F6D, 0, -0x1F6D, 0, 0, 0, 0, /* 2-bit */
619 0x1008, 0x1192, 0, -0x219A, 0x1656, -0x1656, 0, 0, /* 3-bit */
620 0x872, 0x1277, -0x8E6, -0x232B, 0xD06, -0x17D7, -0x11D3, 0, /* 4-bit */
621@@ -179,23 +179,23 @@ static sf_count_t nms_adpcm_seek (SF_PRIVATE *psf, int mode, sf_count_t offset)
622 ** Maps [1,20480] to [1,1024] in an exponential relationship. This is
623 ** approximately ret = b^exp where b = e^(ln(1024)/ln(20480)) ~= 1.0003385
624 */
625-static inline int
626-nms_adpcm_antilog (int exp)
627-{ int ret ;
628+static inline short
629+nms_adpcm_antilog (short exp)
630+{ int_fast32_t r ;
631
632- ret = 0x1000 ;
633- ret += (((exp & 0x3f) * 0x166b) >> 12) ;
634- ret *= table_expn [(exp & 0x7c0) >> 6] ;
635- ret >>= (26 - (exp >> 11)) ;
636+ r = 0x1000 ;
637+ r += (((int_fast32_t) (exp & 0x3f) * 0x166b) >> 12) ;
638+ r *= table_expn [(exp & 0x7c0) >> 6] ;
639+ r >>= (26 - (exp >> 11)) ;
640
641- return ret ;
642+ return (short) r ;
643 } /* nms_adpcm_antilog */
644
645 static void
646 nms_adpcm_update (struct nms_adpcm_state *s)
647 { /* Variable names from ITU G.726 spec */
648- int a1ul ;
649- int fa1 ;
650+ short a1ul, fa1 ;
651+ int_fast32_t se ;
652 int i ;
653
654 /* Decay and Modify the scale factor in the log domain based on the codeword. */
655@@ -222,7 +222,7 @@ nms_adpcm_update (struct nms_adpcm_state *s)
656 else if (fa1 > 256)
657 fa1 = 256 ;
658
659- s->a [0] = (0xff * s->a [0]) >> 8 ;
660+ s->a [0] = (s->a [0] * 0xff) >> 8 ;
661 if (s->p [0] != 0 && s->p [1] != 0 && ((s->p [0] ^ s->p [1]) < 0))
662 s->a [0] -= 192 ;
663 else
664@@ -230,7 +230,7 @@ nms_adpcm_update (struct nms_adpcm_state *s)
665 fa1 = -fa1 ;
666 }
667
668- s->a [1] = fa1 + ((0xfe * s->a [1]) >> 8) ;
669+ s->a [1] = fa1 + ((s->a [1] * 0xfe) >> 8) ;
670 if (s->p [0] != 0 && s->p [2] != 0 && ((s->p [0] ^ s->p [2]) < 0))
671 s->a [1] -= 128 ;
672 else
673@@ -250,19 +250,18 @@ nms_adpcm_update (struct nms_adpcm_state *s)
674 s->a [0] = a1ul ;
675 } ;
676
677- /* Compute the zero predictor estimate. Rotate past deltas too. */
678- s->s_ez = 0 ;
679+ /* Compute the zero predictor estimate and rotate past deltas. */
680+ se = 0 ;
681 for (i = 5 ; i >= 0 ; i--)
682- { s->s_ez += s->d_q [i] * s->b [i] ;
683+ { se += (int_fast32_t) s->d_q [i] * s->b [i] ;
684 s->d_q [i + 1] = s->d_q [i] ;
685 } ;
686+ s->s_ez = se >> 14 ;
687
688- /* Compute the signal estimate. */
689- s->s_e = s->a [0] * s->s_r [0] + s->a [1] * s->s_r [1] + s->s_ez ;
690-
691- /* Return to scale */
692- s->s_ez >>= 14 ;
693- s->s_e >>= 14 ;
694+ /* Complete the signal estimate. */
695+ se += (int_fast32_t) s->a [0] * s->s_r [0] ;
696+ se += (int_fast32_t) s->a [1] * s->s_r [1] ;
697+ s->s_e = se >> 14 ;
698
699 /* Rotate members to prepare for next iteration. */
700 s->s_r [1] = s->s_r [0] ;
701@@ -274,7 +273,7 @@ nms_adpcm_update (struct nms_adpcm_state *s)
702 static int16_t
703 nms_adpcm_reconstruct_sample (struct nms_adpcm_state *s, uint8_t I)
704 { /* Variable names from ITU G.726 spec */
705- int dqx ;
706+ int_fast32_t dqx ;
707
708 /*
709 ** The ordering of the 12-bit right-shift is a precision loss. It agrees
710@@ -308,17 +307,17 @@ nms_adpcm_codec_init (struct nms_adpcm_state *s, enum nms_enc_type type)
711 /*
712 ** nms_adpcm_encode_sample()
713 **
714-** Encode a linear 16-bit pcm sample into a 2,3, or 4 bit NMS-ADPCM codeword
715+** Encode a linear 16-bit pcm sample into a 2, 3, or 4 bit NMS-ADPCM codeword
716 ** using and updating the predictor state.
717 */
718 static uint8_t
719 nms_adpcm_encode_sample (struct nms_adpcm_state *s, int16_t sl)
720 { /* Variable names from ITU G.726 spec */
721- int d ;
722+ int_fast32_t d ;
723 uint8_t I ;
724
725 /* Down scale the sample from 16 => ~14 bits. */
726- sl = (sl * 0x1fdf) / 0x7fff ;
727+ sl = ((int_fast32_t) sl * 0x1fdf) / 0x7fff ;
728
729 /* Compute estimate, and delta from actual value */
730 nms_adpcm_update (s) ;
731@@ -407,7 +406,7 @@ nms_adpcm_encode_sample (struct nms_adpcm_state *s, int16_t sl)
732 */
733 static int16_t
734 nms_adpcm_decode_sample (struct nms_adpcm_state *s, uint8_t I)
735-{ int sl ;
736+{ int_fast32_t sl ;
737
738 nms_adpcm_update (s) ;
739 sl = nms_adpcm_reconstruct_sample (s, I) ;
diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/noopus.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/noopus.patch
deleted file mode 100644
index cb1778bede..0000000000
--- a/meta/recipes-multimedia/libsndfile/libsndfile1/noopus.patch
+++ /dev/null
@@ -1,68 +0,0 @@
1From 593256a3e386a4e17fe26cfbfb813cf4996447d7 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de>
3Date: Mon, 4 Apr 2022 19:46:44 +0200
4Subject: [PATCH] Disable opus library
5
6We don't have opus in OE-Core which causes all the external libs to be disabled
7silently. The silent issue is discussed in the link below and hints a patch
8to make things configurable may be accepted.
9
10This patch removing the opus piece at least gets most of the functionality
11we previously used back whilst the issue is discussed.
12
13Upstream-Status: Denied [https://github.com/libsndfile/libsndfile/pull/812]
14
15Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
16Signed-off-by: Alexander Kanavin <alex@linutronix.de>
17---
18 configure.ac | 10 +++++-----
19 src/ogg_opus.c | 2 +-
20 2 files changed, 6 insertions(+), 6 deletions(-)
21
22diff --git a/configure.ac b/configure.ac
23index 727b67bc..f9d2e447 100644
24--- a/configure.ac
25+++ b/configure.ac
26@@ -373,13 +373,13 @@ AS_IF([test -n "$PKG_CONFIG"], [
27 enable_external_libs=yes
28 ])
29
30- AS_IF([test "x$ac_cv_flac$ac_cv_ogg$ac_cv_vorbis$ac_cv_vorbisenc$ac_cv_opus" = "xyesyesyesyesyes"], [
31+ AS_IF([test "x$ac_cv_flac$ac_cv_ogg$ac_cv_vorbis$ac_cv_vorbisenc" = "xyesyesyesyes"], [
32 HAVE_EXTERNAL_XIPH_LIBS=1
33 enable_external_libs=yes
34
35- EXTERNAL_XIPH_CFLAGS="$FLAC_CFLAGS $VORBIS_CFLAGS $VORBISENC_CFLAGS $SPEEX_CFLAGS $OPUS_CFLAGS $OGG_CFLAGS "
36- EXTERNAL_XIPH_LIBS="$FLAC_LIBS $VORBIS_LIBS $VORBISENC_LIBS $SPEEX_LIBS $OPUS_LIBS $OGG_LIBS "
37- EXTERNAL_XIPH_REQUIRE="flac ogg vorbis vorbisenc opus"
38+ EXTERNAL_XIPH_CFLAGS="$FLAC_CFLAGS $VORBIS_CFLAGS $VORBISENC_CFLAGS $SPEEX_CFLAGS $OGG_CFLAGS "
39+ EXTERNAL_XIPH_LIBS="$FLAC_LIBS $VORBIS_LIBS $VORBISENC_LIBS $SPEEX_LIBS $OGG_LIBS "
40+ EXTERNAL_XIPH_REQUIRE="flac ogg vorbis vorbisenc"
41
42 if test x$ac_cv_speex = "xyes" ; then
43 EXTERNAL_XIPH_REQUIRE="$EXTERNAL_XIPH_REQUIRE speex"
44@@ -788,7 +788,7 @@ AC_MSG_RESULT([
45
46 Experimental code : ................... ${enable_experimental:-no}
47 Using ALSA in example programs : ...... ${enable_alsa:-no}
48- External FLAC/Ogg/Vorbis/Opus : ....... ${enable_external_libs:-no}
49+ External FLAC/Ogg/Vorbis : ....... ${enable_external_libs:-no}
50 External MPEG Lame/MPG123 : ........... ${enable_mpeg:-no}
51 Building Octave interface : ........... ${OCTAVE_BUILD}
52
53diff --git a/src/ogg_opus.c b/src/ogg_opus.c
54index dfa446ee..0d4fe57b 100644
55--- a/src/ogg_opus.c
56+++ b/src/ogg_opus.c
57@@ -159,7 +159,7 @@
58 #include "sfendian.h"
59 #include "common.h"
60
61-#if HAVE_EXTERNAL_XIPH_LIBS
62+#if 0
63
64 #include <ogg/ogg.h>
65 #include <opus/opus.h>
66--
672.30.2
68
diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1_1.2.2.bb b/meta/recipes-multimedia/libsndfile/libsndfile1_1.2.2.bb
deleted file mode 100644
index 0ec40dda7a..0000000000
--- a/meta/recipes-multimedia/libsndfile/libsndfile1_1.2.2.bb
+++ /dev/null
@@ -1,34 +0,0 @@
1SUMMARY = "Audio format Conversion library"
2DESCRIPTION = "Library for reading and writing files containing sampled \
3sound (such as MS Windows WAV and the Apple/SGI AIFF format) through \
4one standard library interface."
5HOMEPAGE = "https://libsndfile.github.io/libsndfile/"
6DEPENDS = "flac libogg libvorbis"
7SECTION = "libs/multimedia"
8LICENSE = "LGPL-2.1-only"
9
10SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/libsndfile-${PV}.tar.xz \
11 file://noopus.patch \
12 file://cve-2022-33065.patch \
13 file://CVE-2024-50612.patch \
14 file://0001-Include-stdbool.h-instead-of-redefining-bool-true-an.patch \
15 "
16GITHUB_BASE_URI = "https://github.com/libsndfile/libsndfile/releases/"
17
18SRC_URI[sha256sum] = "3799ca9924d3125038880367bf1468e53a1b7e3686a934f098b7e1d286cdb80e"
19
20LIC_FILES_CHKSUM = "file://COPYING;md5=e77fe93202736b47c07035910f47974a"
21
22CVE_PRODUCT = "libsndfile"
23
24S = "${UNPACKDIR}/libsndfile-${PV}"
25
26PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'alsa', d)}"
27PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib"
28PACKAGECONFIG[regtest] = "--enable-sqlite,--disable-sqlite,sqlite3"
29
30inherit autotools lib_package pkgconfig multilib_header github-releases
31
32do_install:append() {
33 oe_multilib_header sndfile.h
34}
diff --git a/meta/recipes-multimedia/libtheora/libtheora/0001-add-missing-files.patch b/meta/recipes-multimedia/libtheora/libtheora/0001-add-missing-files.patch
deleted file mode 100644
index 323ac7da83..0000000000
--- a/meta/recipes-multimedia/libtheora/libtheora/0001-add-missing-files.patch
+++ /dev/null
@@ -1,769 +0,0 @@
1From 0880595f9b08d15da0e72cefaf24841cbb930883 Mon Sep 17 00:00:00 2001
2From: Gyorgy Sarvari <skandigraun@gmail.com>
3Date: Sat, 7 Jun 2025 14:10:40 +0200
4Subject: [PATCH] add missing files
5
6Due to a release issue, two files were not added to the libtheora 1.2.0
7release tarball - these files are required to be able to build the
8library for 32-bit ARM systems along with assembly optimization.
9
10This patch adds these files.
11
12This is not a code issue per-se, rather a tarballing one, as the files
13are present in the source code repository.
14
15Upstream-Status: Backport [https://gitlab.xiph.org/xiph/theora/-/issues/2338]
16
17Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
18---
19 lib/arm/armenc.c | 57 ++++
20 lib/arm/armloop.s | 676 ++++++++++++++++++++++++++++++++++++++++++++++
21 2 files changed, 733 insertions(+)
22 create mode 100644 lib/arm/armenc.c
23 create mode 100644 lib/arm/armloop.s
24
25diff --git a/lib/arm/armenc.c b/lib/arm/armenc.c
26new file mode 100644
27index 0000000..4cfb8a7
28--- /dev/null
29+++ b/lib/arm/armenc.c
30@@ -0,0 +1,57 @@
31+/********************************************************************
32+ * *
33+ * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. *
34+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
35+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
36+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
37+ * *
38+ * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2010 *
39+ * by the Xiph.Org Foundation and contributors *
40+ * https://www.xiph.org/ *
41+ * *
42+ ********************************************************************
43+
44+ function:
45+
46+ ********************************************************************/
47+#include "armenc.h"
48+
49+#if defined(OC_ARM_ASM)
50+
51+void oc_enc_accel_init_arm(oc_enc_ctx *_enc){
52+ ogg_uint32_t cpu_flags;
53+ cpu_flags=_enc->state.cpu_flags;
54+ oc_enc_accel_init_c(_enc);
55+# if defined(OC_ENC_USE_VTABLE)
56+ /*TODO: Add ARMv4 functions here.*/
57+# endif
58+# if defined(OC_ARM_ASM_EDSP)
59+ if(cpu_flags&OC_CPU_ARM_EDSP){
60+# if defined(OC_STATE_USE_VTABLE)
61+ /*TODO: Add EDSP functions here.*/
62+# endif
63+ }
64+# if defined(OC_ARM_ASM_MEDIA)
65+ if(cpu_flags&OC_CPU_ARM_MEDIA){
66+# if defined(OC_STATE_USE_VTABLE)
67+ /*TODO: Add Media functions here.*/
68+# endif
69+ }
70+# if defined(OC_ARM_ASM_NEON)
71+ if(cpu_flags&OC_CPU_ARM_NEON){
72+# if defined(OC_STATE_USE_VTABLE)
73+ _enc->opt_vtable.frag_satd=oc_enc_frag_satd_neon;
74+ _enc->opt_vtable.frag_satd2=oc_enc_frag_satd2_neon;
75+ _enc->opt_vtable.frag_intra_satd=oc_enc_frag_intra_satd_neon;
76+ _enc->opt_vtable.enquant_table_init=oc_enc_enquant_table_init_neon;
77+ _enc->opt_vtable.enquant_table_fixup=oc_enc_enquant_table_fixup_neon;
78+ _enc->opt_vtable.quantize=oc_enc_quantize_neon;
79+# endif
80+ _enc->opt_data.enquant_table_size=128*sizeof(ogg_uint16_t);
81+ _enc->opt_data.enquant_table_alignment=16;
82+ }
83+# endif
84+# endif
85+# endif
86+}
87+#endif
88diff --git a/lib/arm/armloop.s b/lib/arm/armloop.s
89new file mode 100644
90index 0000000..c35da0f
91--- /dev/null
92+++ b/lib/arm/armloop.s
93@@ -0,0 +1,676 @@
94+;********************************************************************
95+;* *
96+;* THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. *
97+;* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
98+;* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
99+;* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
100+;* *
101+;* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2010 *
102+;* by the Xiph.Org Foundation and contributors *
103+;* https://www.xiph.org/ *
104+;* *
105+;********************************************************************
106+; Original implementation:
107+; Copyright (C) 2009 Robin Watts for Pinknoise Productions Ltd
108+;********************************************************************
109+
110+ AREA |.text|, CODE, READONLY
111+
112+ GET armopts.s
113+
114+ EXPORT oc_loop_filter_frag_rows_arm
115+
116+; Which bit this is depends on the order of packing within a bitfield.
117+; Hopefully that doesn't change among any of the relevant compilers.
118+OC_FRAG_CODED_FLAG * 1
119+
120+ ; Vanilla ARM v4 version
121+loop_filter_h_arm PROC
122+ ; r0 = unsigned char *_pix
123+ ; r1 = int _ystride
124+ ; r2 = int *_bv
125+ ; preserves r0-r3
126+ STMFD r13!,{r3-r6,r14}
127+ MOV r14,#8
128+ MOV r6, #255
129+lfh_arm_lp
130+ LDRB r3, [r0, #-2] ; r3 = _pix[0]
131+ LDRB r12,[r0, #1] ; r12= _pix[3]
132+ LDRB r4, [r0, #-1] ; r4 = _pix[1]
133+ LDRB r5, [r0] ; r5 = _pix[2]
134+ SUB r3, r3, r12 ; r3 = _pix[0]-_pix[3]+4
135+ ADD r3, r3, #4
136+ SUB r12,r5, r4 ; r12= _pix[2]-_pix[1]
137+ ADD r12,r12,r12,LSL #1 ; r12= 3*(_pix[2]-_pix[1])
138+ ADD r12,r12,r3 ; r12= _pix[0]-_pix[3]+3*(_pix[2]-_pix[1])+4
139+ MOV r12,r12,ASR #3
140+ LDRSB r12,[r2, r12]
141+ ; Stall (2 on Xscale)
142+ ADDS r4, r4, r12
143+ CMPGT r6, r4
144+ EORLT r4, r6, r4, ASR #32
145+ SUBS r5, r5, r12
146+ CMPGT r6, r5
147+ EORLT r5, r6, r5, ASR #32
148+ STRB r4, [r0, #-1]
149+ STRB r5, [r0], r1
150+ SUBS r14,r14,#1
151+ BGT lfh_arm_lp
152+ SUB r0, r0, r1, LSL #3
153+ LDMFD r13!,{r3-r6,PC}
154+ ENDP
155+
156+loop_filter_v_arm PROC
157+ ; r0 = unsigned char *_pix
158+ ; r1 = int _ystride
159+ ; r2 = int *_bv
160+ ; preserves r0-r3
161+ STMFD r13!,{r3-r6,r14}
162+ MOV r14,#8
163+ MOV r6, #255
164+lfv_arm_lp
165+ LDRB r3, [r0, -r1, LSL #1] ; r3 = _pix[0]
166+ LDRB r12,[r0, r1] ; r12= _pix[3]
167+ LDRB r4, [r0, -r1] ; r4 = _pix[1]
168+ LDRB r5, [r0] ; r5 = _pix[2]
169+ SUB r3, r3, r12 ; r3 = _pix[0]-_pix[3]+4
170+ ADD r3, r3, #4
171+ SUB r12,r5, r4 ; r12= _pix[2]-_pix[1]
172+ ADD r12,r12,r12,LSL #1 ; r12= 3*(_pix[2]-_pix[1])
173+ ADD r12,r12,r3 ; r12= _pix[0]-_pix[3]+3*(_pix[2]-_pix[1])+4
174+ MOV r12,r12,ASR #3
175+ LDRSB r12,[r2, r12]
176+ ; Stall (2 on Xscale)
177+ ADDS r4, r4, r12
178+ CMPGT r6, r4
179+ EORLT r4, r6, r4, ASR #32
180+ SUBS r5, r5, r12
181+ CMPGT r6, r5
182+ EORLT r5, r6, r5, ASR #32
183+ STRB r4, [r0, -r1]
184+ STRB r5, [r0], #1
185+ SUBS r14,r14,#1
186+ BGT lfv_arm_lp
187+ SUB r0, r0, #8
188+ LDMFD r13!,{r3-r6,PC}
189+ ENDP
190+
191+oc_loop_filter_frag_rows_arm PROC
192+ ; r0 = _ref_frame_data
193+ ; r1 = _ystride
194+ ; r2 = _bv
195+ ; r3 = _frags
196+ ; r4 = _fragi0
197+ ; r5 = _fragi0_end
198+ ; r6 = _fragi_top
199+ ; r7 = _fragi_bot
200+ ; r8 = _frag_buf_offs
201+ ; r9 = _nhfrags
202+ MOV r12,r13
203+ STMFD r13!,{r0,r4-r11,r14}
204+ LDMFD r12,{r4-r9}
205+ ADD r2, r2, #127 ; _bv += 127
206+ CMP r4, r5 ; if(_fragi0>=_fragi0_end)
207+ BGE oslffri_arm_end ; bail
208+ SUBS r9, r9, #1 ; r9 = _nhfrags-1 if (r9<=0)
209+ BLE oslffri_arm_end ; bail
210+ ADD r3, r3, r4, LSL #2 ; r3 = &_frags[fragi]
211+ ADD r8, r8, r4, LSL #2 ; r8 = &_frag_buf_offs[fragi]
212+ SUB r7, r7, r9 ; _fragi_bot -= _nhfrags;
213+oslffri_arm_lp1
214+ MOV r10,r4 ; r10= fragi = _fragi0
215+ ADD r11,r4, r9 ; r11= fragi_end-1=fragi+_nhfrags-1
216+oslffri_arm_lp2
217+ LDR r14,[r3], #4 ; r14= _frags[fragi] _frags++
218+ LDR r0, [r13] ; r0 = _ref_frame_data
219+ LDR r12,[r8], #4 ; r12= _frag_buf_offs[fragi] _frag_buf_offs++
220+ TST r14,#OC_FRAG_CODED_FLAG
221+ BEQ oslffri_arm_uncoded
222+ CMP r10,r4 ; if (fragi>_fragi0)
223+ ADD r0, r0, r12 ; r0 = _ref_frame_data + _frag_buf_offs[fragi]
224+ BLGT loop_filter_h_arm
225+ CMP r4, r6 ; if (_fragi0>_fragi_top)
226+ BLGT loop_filter_v_arm
227+ CMP r10,r11 ; if(fragi+1<fragi_end)===(fragi<fragi_end-1)
228+ LDRLT r12,[r3] ; r12 = _frags[fragi+1]
229+ ADD r0, r0, #8
230+ ADD r10,r10,#1 ; r10 = fragi+1;
231+ ANDLT r12,r12,#OC_FRAG_CODED_FLAG
232+ CMPLT r12,#OC_FRAG_CODED_FLAG ; && _frags[fragi+1].coded==0
233+ BLLT loop_filter_h_arm
234+ CMP r10,r7 ; if (fragi<_fragi_bot)
235+ LDRLT r12,[r3, r9, LSL #2] ; r12 = _frags[fragi+1+_nhfrags-1]
236+ SUB r0, r0, #8
237+ ADD r0, r0, r1, LSL #3
238+ ANDLT r12,r12,#OC_FRAG_CODED_FLAG
239+ CMPLT r12,#OC_FRAG_CODED_FLAG
240+ BLLT loop_filter_v_arm
241+ CMP r10,r11 ; while(fragi<=fragi_end-1)
242+ BLE oslffri_arm_lp2
243+ MOV r4, r10 ; r4 = fragi0 += _nhfrags
244+ CMP r4, r5
245+ BLT oslffri_arm_lp1
246+oslffri_arm_end
247+ LDMFD r13!,{r0,r4-r11,PC}
248+oslffri_arm_uncoded
249+ ADD r10,r10,#1
250+ CMP r10,r11
251+ BLE oslffri_arm_lp2
252+ MOV r4, r10 ; r4 = _fragi0 += _nhfrags
253+ CMP r4, r5
254+ BLT oslffri_arm_lp1
255+ LDMFD r13!,{r0,r4-r11,PC}
256+ ENDP
257+
258+ [ OC_ARM_ASM_MEDIA
259+ EXPORT oc_loop_filter_init_v6
260+ EXPORT oc_loop_filter_frag_rows_v6
261+
262+oc_loop_filter_init_v6 PROC
263+ ; r0 = _bv
264+ ; r1 = _flimit (=L from the spec)
265+ MVN r1, r1, LSL #1 ; r1 = <0xFFFFFF|255-2*L>
266+ AND r1, r1, #255 ; r1 = ll=r1&0xFF
267+ ORR r1, r1, r1, LSL #8 ; r1 = <ll|ll>
268+ PKHBT r1, r1, r1, LSL #16 ; r1 = <ll|ll|ll|ll>
269+ STR r1, [r0]
270+ MOV PC,r14
271+ ENDP
272+
273+; We could use the same strategy as the v filter below, but that would require
274+; 40 instructions to load the data and transpose it into columns and another
275+; 32 to write out the results at the end, plus the 52 instructions to do the
276+; filtering itself.
277+; This is slightly less, and less code, even assuming we could have shared the
278+; 52 instructions in the middle with the other function.
279+; It executes slightly fewer instructions than the ARMv6 approach David Conrad
280+; proposed for FFmpeg, but not by much:
281+; http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2010-February/083141.html
282+; His is a lot less code, though, because it only does two rows at once instead
283+; of four.
284+loop_filter_h_v6 PROC
285+ ; r0 = unsigned char *_pix
286+ ; r1 = int _ystride
287+ ; r2 = int _ll
288+ ; preserves r0-r3
289+ STMFD r13!,{r4-r11,r14}
290+ LDR r12,=0x10003
291+ BL loop_filter_h_core_v6
292+ ADD r0, r0, r1, LSL #2
293+ BL loop_filter_h_core_v6
294+ SUB r0, r0, r1, LSL #2
295+ LDMFD r13!,{r4-r11,PC}
296+ ENDP
297+
298+loop_filter_h_core_v6 PROC
299+ ; r0 = unsigned char *_pix
300+ ; r1 = int _ystride
301+ ; r2 = int _ll
302+ ; r12= 0x10003
303+ ; Preserves r0-r3, r12; Clobbers r4-r11.
304+ LDR r4,[r0, #-2]! ; r4 = <p3|p2|p1|p0>
305+ ; Single issue
306+ LDR r5,[r0, r1]! ; r5 = <q3|q2|q1|q0>
307+ UXTB16 r6, r4, ROR #16 ; r6 = <p0|p2>
308+ UXTB16 r4, r4, ROR #8 ; r4 = <p3|p1>
309+ UXTB16 r7, r5, ROR #16 ; r7 = <q0|q2>
310+ UXTB16 r5, r5, ROR #8 ; r5 = <q3|q1>
311+ PKHBT r8, r4, r5, LSL #16 ; r8 = <__|q1|__|p1>
312+ PKHBT r9, r6, r7, LSL #16 ; r9 = <__|q2|__|p2>
313+ SSUB16 r6, r4, r6 ; r6 = <p3-p0|p1-p2>
314+ SMLAD r6, r6, r12,r12 ; r6 = <????|(p3-p0)+3*(p1-p2)+3>
315+ SSUB16 r7, r5, r7 ; r7 = <q3-q0|q1-q2>
316+ SMLAD r7, r7, r12,r12 ; r7 = <????|(q0-q3)+3*(q2-q1)+4>
317+ LDR r4,[r0, r1]! ; r4 = <r3|r2|r1|r0>
318+ MOV r6, r6, ASR #3 ; r6 = <??????|(p3-p0)+3*(p1-p2)+3>>3>
319+ LDR r5,[r0, r1]! ; r5 = <s3|s2|s1|s0>
320+ PKHBT r11,r6, r7, LSL #13 ; r11= <??|-R_q|??|-R_p>
321+ UXTB16 r6, r4, ROR #16 ; r6 = <r0|r2>
322+ UXTB16 r11,r11 ; r11= <__|-R_q|__|-R_p>
323+ UXTB16 r4, r4, ROR #8 ; r4 = <r3|r1>
324+ UXTB16 r7, r5, ROR #16 ; r7 = <s0|s2>
325+ PKHBT r10,r6, r7, LSL #16 ; r10= <__|s2|__|r2>
326+ SSUB16 r6, r4, r6 ; r6 = <r3-r0|r1-r2>
327+ UXTB16 r5, r5, ROR #8 ; r5 = <s3|s1>
328+ SMLAD r6, r6, r12,r12 ; r6 = <????|(r3-r0)+3*(r2-r1)+3>
329+ SSUB16 r7, r5, r7 ; r7 = <r3-r0|r1-r2>
330+ SMLAD r7, r7, r12,r12 ; r7 = <????|(s0-s3)+3*(s2-s1)+4>
331+ ORR r9, r9, r10, LSL #8 ; r9 = <s2|q2|r2|p2>
332+ MOV r6, r6, ASR #3 ; r6 = <??????|(r0-r3)+3*(r2-r1)+4>>3>
333+ PKHBT r10,r4, r5, LSL #16 ; r10= <__|s1|__|r1>
334+ PKHBT r6, r6, r7, LSL #13 ; r6 = <??|-R_s|??|-R_r>
335+ ORR r8, r8, r10, LSL #8 ; r8 = <s1|q1|r1|p1>
336+ UXTB16 r6, r6 ; r6 = <__|-R_s|__|-R_r>
337+ MOV r10,#0
338+ ORR r6, r11,r6, LSL #8 ; r6 = <-R_s|-R_q|-R_r|-R_p>
339+ ; Single issue
340+ ; There's no min, max or abs instruction.
341+ ; SSUB8 and SEL will work for abs, and we can do all the rest with
342+ ; unsigned saturated adds, which means the GE flags are still all
343+ ; set when we're done computing lflim(abs(R_i),L).
344+ ; This allows us to both add and subtract, and split the results by
345+ ; the original sign of R_i.
346+ SSUB8 r7, r10,r6
347+ ; Single issue
348+ SEL r7, r7, r6 ; r7 = abs(R_i)
349+ ; Single issue
350+ UQADD8 r4, r7, r2 ; r4 = 255-max(2*L-abs(R_i),0)
351+ ; Single issue
352+ UQADD8 r7, r7, r4
353+ ; Single issue
354+ UQSUB8 r7, r7, r4 ; r7 = min(abs(R_i),max(2*L-abs(R_i),0))
355+ ; Single issue
356+ UQSUB8 r4, r8, r7
357+ UQADD8 r5, r9, r7
358+ UQADD8 r8, r8, r7
359+ UQSUB8 r9, r9, r7
360+ SEL r8, r8, r4 ; r8 = p1+lflim(R_i,L)
361+ SEL r9, r9, r5 ; r9 = p2-lflim(R_i,L)
362+ MOV r5, r9, LSR #24 ; r5 = s2
363+ STRB r5, [r0,#2]!
364+ MOV r4, r8, LSR #24 ; r4 = s1
365+ STRB r4, [r0,#-1]
366+ MOV r5, r9, LSR #8 ; r5 = r2
367+ STRB r5, [r0,-r1]!
368+ MOV r4, r8, LSR #8 ; r4 = r1
369+ STRB r4, [r0,#-1]
370+ MOV r5, r9, LSR #16 ; r5 = q2
371+ STRB r5, [r0,-r1]!
372+ MOV r4, r8, LSR #16 ; r4 = q1
373+ STRB r4, [r0,#-1]
374+ ; Single issue
375+ STRB r9, [r0,-r1]!
376+ ; Single issue
377+ STRB r8, [r0,#-1]
378+ MOV PC,r14
379+ ENDP
380+
381+; This uses the same strategy as the MMXEXT version for x86, except that UHADD8
382+; computes (a+b>>1) instead of (a+b+1>>1) like PAVGB.
383+; This works just as well, with the following procedure for computing the
384+; filter value, f:
385+; u = ~UHADD8(p1,~p2);
386+; v = UHADD8(~p1,p2);
387+; m = v-u;
388+; a = m^UHADD8(m^p0,m^~p3);
389+; f = UHADD8(UHADD8(a,u1),v1);
390+; where f = 127+R, with R in [-127,128] defined as in the spec.
391+; This is exactly the same amount of arithmetic as the version that uses PAVGB
392+; as the basic operator.
393+; It executes about 2/3 the number of instructions of David Conrad's approach,
394+; but requires more code, because it does all eight columns at once, instead
395+; of four at a time.
396+loop_filter_v_v6 PROC
397+ ; r0 = unsigned char *_pix
398+ ; r1 = int _ystride
399+ ; r2 = int _ll
400+ ; preserves r0-r11
401+ STMFD r13!,{r4-r11,r14}
402+ LDRD r6, [r0, -r1]! ; r7, r6 = <p5|p1>
403+ LDRD r4, [r0, -r1] ; r5, r4 = <p4|p0>
404+ LDRD r8, [r0, r1]! ; r9, r8 = <p6|p2>
405+ MVN r14,r6 ; r14= ~p1
406+ LDRD r10,[r0, r1] ; r11,r10= <p7|p3>
407+ ; Filter the first four columns.
408+ MVN r12,r8 ; r12= ~p2
409+ UHADD8 r14,r14,r8 ; r14= v1=~p1+p2>>1
410+ UHADD8 r12,r12,r6 ; r12= p1+~p2>>1
411+ MVN r10, r10 ; r10=~p3
412+ MVN r12,r12 ; r12= u1=~p1+p2+1>>1
413+ SSUB8 r14,r14,r12 ; r14= m1=v1-u1
414+ ; Single issue
415+ EOR r4, r4, r14 ; r4 = m1^p0
416+ EOR r10,r10,r14 ; r10= m1^~p3
417+ UHADD8 r4, r4, r10 ; r4 = (m1^p0)+(m1^~p3)>>1
418+ ; Single issue
419+ EOR r4, r4, r14 ; r4 = a1=m1^((m1^p0)+(m1^~p3)>>1)
420+ SADD8 r14,r14,r12 ; r14= v1=m1+u1
421+ UHADD8 r4, r4, r12 ; r4 = a1+u1>>1
422+ MVN r12,r9 ; r12= ~p6
423+ UHADD8 r4, r4, r14 ; r4 = f1=(a1+u1>>1)+v1>>1
424+ ; Filter the second four columns.
425+ MVN r14,r7 ; r14= ~p5
426+ UHADD8 r12,r12,r7 ; r12= p5+~p6>>1
427+ UHADD8 r14,r14,r9 ; r14= v2=~p5+p6>>1
428+ MVN r12,r12 ; r12= u2=~p5+p6+1>>1
429+ MVN r11,r11 ; r11=~p7
430+ SSUB8 r10,r14,r12 ; r10= m2=v2-u2
431+ ; Single issue
432+ EOR r5, r5, r10 ; r5 = m2^p4
433+ EOR r11,r11,r10 ; r11= m2^~p7
434+ UHADD8 r5, r5, r11 ; r5 = (m2^p4)+(m2^~p7)>>1
435+ ; Single issue
436+ EOR r5, r5, r10 ; r5 = a2=m2^((m2^p4)+(m2^~p7)>>1)
437+ ; Single issue
438+ UHADD8 r5, r5, r12 ; r5 = a2+u2>>1
439+ LDR r12,=0x7F7F7F7F ; r12 = {127}x4
440+ UHADD8 r5, r5, r14 ; r5 = f2=(a2+u2>>1)+v2>>1
441+ ; Now split f[i] by sign.
442+ ; There's no min or max instruction.
443+ ; We could use SSUB8 and SEL, but this is just as many instructions and
444+ ; dual issues more (for v7 without NEON).
445+ UQSUB8 r10,r4, r12 ; r10= R_i>0?R_i:0
446+ UQSUB8 r4, r12,r4 ; r4 = R_i<0?-R_i:0
447+ UQADD8 r11,r10,r2 ; r11= 255-max(2*L-abs(R_i<0),0)
448+ UQADD8 r14,r4, r2 ; r14= 255-max(2*L-abs(R_i>0),0)
449+ UQADD8 r10,r10,r11
450+ UQADD8 r4, r4, r14
451+ UQSUB8 r10,r10,r11 ; r10= min(abs(R_i<0),max(2*L-abs(R_i<0),0))
452+ UQSUB8 r4, r4, r14 ; r4 = min(abs(R_i>0),max(2*L-abs(R_i>0),0))
453+ UQSUB8 r11,r5, r12 ; r11= R_i>0?R_i:0
454+ UQADD8 r6, r6, r10
455+ UQSUB8 r8, r8, r10
456+ UQSUB8 r5, r12,r5 ; r5 = R_i<0?-R_i:0
457+ UQSUB8 r6, r6, r4 ; r6 = p1+lflim(R_i,L)
458+ UQADD8 r8, r8, r4 ; r8 = p2-lflim(R_i,L)
459+ UQADD8 r10,r11,r2 ; r10= 255-max(2*L-abs(R_i<0),0)
460+ UQADD8 r14,r5, r2 ; r14= 255-max(2*L-abs(R_i>0),0)
461+ UQADD8 r11,r11,r10
462+ UQADD8 r5, r5, r14
463+ UQSUB8 r11,r11,r10 ; r11= min(abs(R_i<0),max(2*L-abs(R_i<0),0))
464+ UQSUB8 r5, r5, r14 ; r5 = min(abs(R_i>0),max(2*L-abs(R_i>0),0))
465+ UQADD8 r7, r7, r11
466+ UQSUB8 r9, r9, r11
467+ UQSUB8 r7, r7, r5 ; r7 = p5+lflim(R_i,L)
468+ STRD r6, [r0, -r1] ; [p5:p1] = [r7: r6]
469+ UQADD8 r9, r9, r5 ; r9 = p6-lflim(R_i,L)
470+ STRD r8, [r0] ; [p6:p2] = [r9: r8]
471+ LDMFD r13!,{r4-r11,PC}
472+ ENDP
473+
474+oc_loop_filter_frag_rows_v6 PROC
475+ ; r0 = _ref_frame_data
476+ ; r1 = _ystride
477+ ; r2 = _bv
478+ ; r3 = _frags
479+ ; r4 = _fragi0
480+ ; r5 = _fragi0_end
481+ ; r6 = _fragi_top
482+ ; r7 = _fragi_bot
483+ ; r8 = _frag_buf_offs
484+ ; r9 = _nhfrags
485+ MOV r12,r13
486+ STMFD r13!,{r0,r4-r11,r14}
487+ LDMFD r12,{r4-r9}
488+ LDR r2, [r2] ; ll = *(int *)_bv
489+ CMP r4, r5 ; if(_fragi0>=_fragi0_end)
490+ BGE oslffri_v6_end ; bail
491+ SUBS r9, r9, #1 ; r9 = _nhfrags-1 if (r9<=0)
492+ BLE oslffri_v6_end ; bail
493+ ADD r3, r3, r4, LSL #2 ; r3 = &_frags[fragi]
494+ ADD r8, r8, r4, LSL #2 ; r8 = &_frag_buf_offs[fragi]
495+ SUB r7, r7, r9 ; _fragi_bot -= _nhfrags;
496+oslffri_v6_lp1
497+ MOV r10,r4 ; r10= fragi = _fragi0
498+ ADD r11,r4, r9 ; r11= fragi_end-1=fragi+_nhfrags-1
499+oslffri_v6_lp2
500+ LDR r14,[r3], #4 ; r14= _frags[fragi] _frags++
501+ LDR r0, [r13] ; r0 = _ref_frame_data
502+ LDR r12,[r8], #4 ; r12= _frag_buf_offs[fragi] _frag_buf_offs++
503+ TST r14,#OC_FRAG_CODED_FLAG
504+ BEQ oslffri_v6_uncoded
505+ CMP r10,r4 ; if (fragi>_fragi0)
506+ ADD r0, r0, r12 ; r0 = _ref_frame_data + _frag_buf_offs[fragi]
507+ BLGT loop_filter_h_v6
508+ CMP r4, r6 ; if (fragi0>_fragi_top)
509+ BLGT loop_filter_v_v6
510+ CMP r10,r11 ; if(fragi+1<fragi_end)===(fragi<fragi_end-1)
511+ LDRLT r12,[r3] ; r12 = _frags[fragi+1]
512+ ADD r0, r0, #8
513+ ADD r10,r10,#1 ; r10 = fragi+1;
514+ ANDLT r12,r12,#OC_FRAG_CODED_FLAG
515+ CMPLT r12,#OC_FRAG_CODED_FLAG ; && _frags[fragi+1].coded==0
516+ BLLT loop_filter_h_v6
517+ CMP r10,r7 ; if (fragi<_fragi_bot)
518+ LDRLT r12,[r3, r9, LSL #2] ; r12 = _frags[fragi+1+_nhfrags-1]
519+ SUB r0, r0, #8
520+ ADD r0, r0, r1, LSL #3
521+ ANDLT r12,r12,#OC_FRAG_CODED_FLAG
522+ CMPLT r12,#OC_FRAG_CODED_FLAG
523+ BLLT loop_filter_v_v6
524+ CMP r10,r11 ; while(fragi<=fragi_end-1)
525+ BLE oslffri_v6_lp2
526+ MOV r4, r10 ; r4 = fragi0 += nhfrags
527+ CMP r4, r5
528+ BLT oslffri_v6_lp1
529+oslffri_v6_end
530+ LDMFD r13!,{r0,r4-r11,PC}
531+oslffri_v6_uncoded
532+ ADD r10,r10,#1
533+ CMP r10,r11
534+ BLE oslffri_v6_lp2
535+ MOV r4, r10 ; r4 = fragi0 += nhfrags
536+ CMP r4, r5
537+ BLT oslffri_v6_lp1
538+ LDMFD r13!,{r0,r4-r11,PC}
539+ ENDP
540+ ]
541+
542+ [ OC_ARM_ASM_NEON
543+ EXPORT oc_loop_filter_init_neon
544+ EXPORT oc_loop_filter_frag_rows_neon
545+
546+oc_loop_filter_init_neon PROC
547+ ; r0 = _bv
548+ ; r1 = _flimit (=L from the spec)
549+ MOV r1, r1, LSL #1 ; r1 = 2*L
550+ VDUP.S16 Q15, r1 ; Q15= 2L in U16s
551+ VST1.64 {D30,D31}, [r0@128]
552+ MOV PC,r14
553+ ENDP
554+
555+loop_filter_h_neon PROC
556+ ; r0 = unsigned char *_pix
557+ ; r1 = int _ystride
558+ ; r2 = int *_bv
559+ ; preserves r0-r3
560+ ; We assume Q15= 2*L in U16s
561+ ; My best guesses at cycle counts (and latency)--vvv
562+ SUB r12,r0, #2
563+ ; Doing a 2-element structure load saves doing two VTRN's below, at the
564+ ; cost of using two more slower single-lane loads vs. the faster
565+ ; all-lane loads.
566+ ; It's less code this way, though, and benches a hair faster, but it
567+ ; leaves D2 and D4 swapped.
568+ VLD2.16 {D0[],D2[]}, [r12], r1 ; D0 = ____________1100 2,1
569+ ; D2 = ____________3322
570+ VLD2.16 {D4[],D6[]}, [r12], r1 ; D4 = ____________5544 2,1
571+ ; D6 = ____________7766
572+ VLD2.16 {D0[1],D2[1]},[r12], r1 ; D0 = ________99881100 3,1
573+ ; D2 = ________BBAA3322
574+ VLD2.16 {D4[1],D6[1]},[r12], r1 ; D4 = ________DDCC5544 3,1
575+ ; D6 = ________FFEE7766
576+ VLD2.16 {D0[2],D2[2]},[r12], r1 ; D0 = ____GGHH99881100 3,1
577+ ; D2 = ____JJIIBBAA3322
578+ VLD2.16 {D4[2],D6[2]},[r12], r1 ; D4 = ____KKLLDDCC5544 3,1
579+ ; D6 = ____NNMMFFEE7766
580+ VLD2.16 {D0[3],D2[3]},[r12], r1 ; D0 = PPOOGGHH99881100 3,1
581+ ; D2 = RRQQJJIIBBAA3322
582+ VLD2.16 {D4[3],D6[3]},[r12], r1 ; D4 = TTSSKKLLDDCC5544 3,1
583+ ; D6 = VVUUNNMMFFEE7766
584+ VTRN.8 D0, D4 ; D0 = SSOOKKGGCC884400 D4 = TTPPLLHHDD995511 1,1
585+ VTRN.8 D2, D6 ; D2 = UUQQMMIIEEAA6622 D6 = VVRRNNJJFFBB7733 1,1
586+ VSUBL.U8 Q0, D0, D6 ; Q0 = 00 - 33 in S16s 1,3
587+ VSUBL.U8 Q8, D2, D4 ; Q8 = 22 - 11 in S16s 1,3
588+ ADD r12,r0, #8
589+ VADD.S16 Q0, Q0, Q8 ; 1,3
590+ PLD [r12]
591+ VADD.S16 Q0, Q0, Q8 ; 1,3
592+ PLD [r12,r1]
593+ VADD.S16 Q0, Q0, Q8 ; Q0 = [0-3]+3*[2-1] 1,3
594+ PLD [r12,r1, LSL #1]
595+ VRSHR.S16 Q0, Q0, #3 ; Q0 = f = ([0-3]+3*[2-1]+4)>>3 1,4
596+ ADD r12,r12,r1, LSL #2
597+ ; We want to do
598+ ; f = CLAMP(MIN(-2L-f,0), f, MAX(2L-f,0))
599+ ; = ((f >= 0) ? MIN( f ,MAX(2L- f ,0)) : MAX( f , MIN(-2L- f ,0)))
600+ ; = ((f >= 0) ? MIN(|f|,MAX(2L-|f|,0)) : MAX(-|f|, MIN(-2L+|f|,0)))
601+ ; = ((f >= 0) ? MIN(|f|,MAX(2L-|f|,0)) :-MIN( |f|,-MIN(-2L+|f|,0)))
602+ ; = ((f >= 0) ? MIN(|f|,MAX(2L-|f|,0)) :-MIN( |f|, MAX( 2L-|f|,0)))
603+ ; So we've reduced the left and right hand terms to be the same, except
604+ ; for a negation.
605+ ; Stall x3
606+ VABS.S16 Q9, Q0 ; Q9 = |f| in U16s 1,4
607+ PLD [r12,-r1]
608+ VSHR.S16 Q0, Q0, #15 ; Q0 = -1 or 0 according to sign 1,3
609+ PLD [r12]
610+ VQSUB.U16 Q10,Q15,Q9 ; Q10= MAX(2L-|f|,0) in U16s 1,4
611+ PLD [r12,r1]
612+ VMOVL.U8 Q1, D2 ; Q2 = __UU__QQ__MM__II__EE__AA__66__22 2,3
613+ PLD [r12,r1,LSL #1]
614+ VMIN.U16 Q9, Q10,Q9 ; Q9 = MIN(|f|,MAX(2L-|f|)) 1,4
615+ ADD r12,r12,r1, LSL #2
616+ ; Now we need to correct for the sign of f.
617+ ; For negative elements of Q0, we want to subtract the appropriate
618+ ; element of Q9. For positive elements we want to add them. No NEON
619+ ; instruction exists to do this, so we need to negate the negative
620+ ; elements, and we can then just add them. a-b = a-(1+!b) = a-1+!b
621+ VADD.S16 Q9, Q9, Q0 ; 1,3
622+ PLD [r12,-r1]
623+ VEOR.S16 Q9, Q9, Q0 ; Q9 = real value of f 1,3
624+ ; Bah. No VRSBW.U8
625+ ; Stall (just 1 as Q9 not needed to second pipeline stage. I think.)
626+ VADDW.U8 Q2, Q9, D4 ; Q1 = xxTTxxPPxxLLxxHHxxDDxx99xx55xx11 1,3
627+ VSUB.S16 Q1, Q1, Q9 ; Q2 = xxUUxxQQxxMMxxIIxxEExxAAxx66xx22 1,3
628+ VQMOVUN.S16 D4, Q2 ; D4 = TTPPLLHHDD995511 1,1
629+ VQMOVUN.S16 D2, Q1 ; D2 = UUQQMMIIEEAA6622 1,1
630+ SUB r12,r0, #1
631+ VTRN.8 D4, D2 ; D4 = QQPPIIHHAA992211 D2 = MMLLEEDD6655 1,1
632+ VST1.16 {D4[0]}, [r12], r1
633+ VST1.16 {D2[0]}, [r12], r1
634+ VST1.16 {D4[1]}, [r12], r1
635+ VST1.16 {D2[1]}, [r12], r1
636+ VST1.16 {D4[2]}, [r12], r1
637+ VST1.16 {D2[2]}, [r12], r1
638+ VST1.16 {D4[3]}, [r12], r1
639+ VST1.16 {D2[3]}, [r12], r1
640+ MOV PC,r14
641+ ENDP
642+
643+loop_filter_v_neon PROC
644+ ; r0 = unsigned char *_pix
645+ ; r1 = int _ystride
646+ ; r2 = int *_bv
647+ ; preserves r0-r3
648+ ; We assume Q15= 2*L in U16s
649+ ; My best guesses at cycle counts (and latency)--vvv
650+ SUB r12,r0, r1, LSL #1
651+ VLD1.64 {D0}, [r12@64], r1 ; D0 = SSOOKKGGCC884400 2,1
652+ VLD1.64 {D2}, [r12@64], r1 ; D2 = TTPPLLHHDD995511 2,1
653+ VLD1.64 {D4}, [r12@64], r1 ; D4 = UUQQMMIIEEAA6622 2,1
654+ VLD1.64 {D6}, [r12@64] ; D6 = VVRRNNJJFFBB7733 2,1
655+ VSUBL.U8 Q8, D4, D2 ; Q8 = 22 - 11 in S16s 1,3
656+ VSUBL.U8 Q0, D0, D6 ; Q0 = 00 - 33 in S16s 1,3
657+ ADD r12, #8
658+ VADD.S16 Q0, Q0, Q8 ; 1,3
659+ PLD [r12]
660+ VADD.S16 Q0, Q0, Q8 ; 1,3
661+ PLD [r12,r1]
662+ VADD.S16 Q0, Q0, Q8 ; Q0 = [0-3]+3*[2-1] 1,3
663+ SUB r12, r0, r1
664+ VRSHR.S16 Q0, Q0, #3 ; Q0 = f = ([0-3]+3*[2-1]+4)>>3 1,4
665+ ; We want to do
666+ ; f = CLAMP(MIN(-2L-f,0), f, MAX(2L-f,0))
667+ ; = ((f >= 0) ? MIN( f ,MAX(2L- f ,0)) : MAX( f , MIN(-2L- f ,0)))
668+ ; = ((f >= 0) ? MIN(|f|,MAX(2L-|f|,0)) : MAX(-|f|, MIN(-2L+|f|,0)))
669+ ; = ((f >= 0) ? MIN(|f|,MAX(2L-|f|,0)) :-MIN( |f|,-MIN(-2L+|f|,0)))
670+ ; = ((f >= 0) ? MIN(|f|,MAX(2L-|f|,0)) :-MIN( |f|, MAX( 2L-|f|,0)))
671+ ; So we've reduced the left and right hand terms to be the same, except
672+ ; for a negation.
673+ ; Stall x3
674+ VABS.S16 Q9, Q0 ; Q9 = |f| in U16s 1,4
675+ VSHR.S16 Q0, Q0, #15 ; Q0 = -1 or 0 according to sign 1,3
676+ ; Stall x2
677+ VQSUB.U16 Q10,Q15,Q9 ; Q10= MAX(2L-|f|,0) in U16s 1,4
678+ VMOVL.U8 Q2, D4 ; Q2 = __UU__QQ__MM__II__EE__AA__66__22 2,3
679+ ; Stall x2
680+ VMIN.U16 Q9, Q10,Q9 ; Q9 = MIN(|f|,MAX(2L-|f|)) 1,4
681+ ; Now we need to correct for the sign of f.
682+ ; For negative elements of Q0, we want to subtract the appropriate
683+ ; element of Q9. For positive elements we want to add them. No NEON
684+ ; instruction exists to do this, so we need to negate the negative
685+ ; elements, and we can then just add them. a-b = a-(1+!b) = a-1+!b
686+ ; Stall x3
687+ VADD.S16 Q9, Q9, Q0 ; 1,3
688+ ; Stall x2
689+ VEOR.S16 Q9, Q9, Q0 ; Q9 = real value of f 1,3
690+ ; Bah. No VRSBW.U8
691+ ; Stall (just 1 as Q9 not needed to second pipeline stage. I think.)
692+ VADDW.U8 Q1, Q9, D2 ; Q1 = xxTTxxPPxxLLxxHHxxDDxx99xx55xx11 1,3
693+ VSUB.S16 Q2, Q2, Q9 ; Q2 = xxUUxxQQxxMMxxIIxxEExxAAxx66xx22 1,3
694+ VQMOVUN.S16 D2, Q1 ; D2 = TTPPLLHHDD995511 1,1
695+ VQMOVUN.S16 D4, Q2 ; D4 = UUQQMMIIEEAA6622 1,1
696+ VST1.64 {D2}, [r12@64], r1
697+ VST1.64 {D4}, [r12@64], r1
698+ MOV PC,r14
699+ ENDP
700+
701+oc_loop_filter_frag_rows_neon PROC
702+ ; r0 = _ref_frame_data
703+ ; r1 = _ystride
704+ ; r2 = _bv
705+ ; r3 = _frags
706+ ; r4 = _fragi0
707+ ; r5 = _fragi0_end
708+ ; r6 = _fragi_top
709+ ; r7 = _fragi_bot
710+ ; r8 = _frag_buf_offs
711+ ; r9 = _nhfrags
712+ MOV r12,r13
713+ STMFD r13!,{r0,r4-r11,r14}
714+ LDMFD r12,{r4-r9}
715+ CMP r4, r5 ; if(_fragi0>=_fragi0_end)
716+ BGE oslffri_neon_end; bail
717+ SUBS r9, r9, #1 ; r9 = _nhfrags-1 if (r9<=0)
718+ BLE oslffri_neon_end ; bail
719+ VLD1.64 {D30,D31}, [r2@128] ; Q15= 2L in U16s
720+ ADD r3, r3, r4, LSL #2 ; r3 = &_frags[fragi]
721+ ADD r8, r8, r4, LSL #2 ; r8 = &_frag_buf_offs[fragi]
722+ SUB r7, r7, r9 ; _fragi_bot -= _nhfrags;
723+oslffri_neon_lp1
724+ MOV r10,r4 ; r10= fragi = _fragi0
725+ ADD r11,r4, r9 ; r11= fragi_end-1=fragi+_nhfrags-1
726+oslffri_neon_lp2
727+ LDR r14,[r3], #4 ; r14= _frags[fragi] _frags++
728+ LDR r0, [r13] ; r0 = _ref_frame_data
729+ LDR r12,[r8], #4 ; r12= _frag_buf_offs[fragi] _frag_buf_offs++
730+ TST r14,#OC_FRAG_CODED_FLAG
731+ BEQ oslffri_neon_uncoded
732+ CMP r10,r4 ; if (fragi>_fragi0)
733+ ADD r0, r0, r12 ; r0 = _ref_frame_data + _frag_buf_offs[fragi]
734+ BLGT loop_filter_h_neon
735+ CMP r4, r6 ; if (_fragi0>_fragi_top)
736+ BLGT loop_filter_v_neon
737+ CMP r10,r11 ; if(fragi+1<fragi_end)===(fragi<fragi_end-1)
738+ LDRLT r12,[r3] ; r12 = _frags[fragi+1]
739+ ADD r0, r0, #8
740+ ADD r10,r10,#1 ; r10 = fragi+1;
741+ ANDLT r12,r12,#OC_FRAG_CODED_FLAG
742+ CMPLT r12,#OC_FRAG_CODED_FLAG ; && _frags[fragi+1].coded==0
743+ BLLT loop_filter_h_neon
744+ CMP r10,r7 ; if (fragi<_fragi_bot)
745+ LDRLT r12,[r3, r9, LSL #2] ; r12 = _frags[fragi+1+_nhfrags-1]
746+ SUB r0, r0, #8
747+ ADD r0, r0, r1, LSL #3
748+ ANDLT r12,r12,#OC_FRAG_CODED_FLAG
749+ CMPLT r12,#OC_FRAG_CODED_FLAG
750+ BLLT loop_filter_v_neon
751+ CMP r10,r11 ; while(fragi<=fragi_end-1)
752+ BLE oslffri_neon_lp2
753+ MOV r4, r10 ; r4 = _fragi0 += _nhfrags
754+ CMP r4, r5
755+ BLT oslffri_neon_lp1
756+oslffri_neon_end
757+ LDMFD r13!,{r0,r4-r11,PC}
758+oslffri_neon_uncoded
759+ ADD r10,r10,#1
760+ CMP r10,r11
761+ BLE oslffri_neon_lp2
762+ MOV r4, r10 ; r4 = _fragi0 += _nhfrags
763+ CMP r4, r5
764+ BLT oslffri_neon_lp1
765+ LDMFD r13!,{r0,r4-r11,PC}
766+ ENDP
767+ ]
768+
769+ END
diff --git a/meta/recipes-multimedia/libtheora/libtheora_1.2.0.bb b/meta/recipes-multimedia/libtheora/libtheora_1.2.0.bb
deleted file mode 100644
index 04de8507fb..0000000000
--- a/meta/recipes-multimedia/libtheora/libtheora_1.2.0.bb
+++ /dev/null
@@ -1,28 +0,0 @@
1SUMMARY = "Theora Video Codec"
2DESCRIPTION = "The libtheora reference implementation provides the standard encoder and decoder under a BSD license."
3HOMEPAGE = "http://xiph.org/"
4BUGTRACKER = "https://trac.xiph.org/newticket"
5SECTION = "libs"
6LICENSE = "BSD-3-Clause"
7LIC_FILES_CHKSUM = "file://COPYING;md5=cf91718f59eb6a83d06dc7bcaf411132"
8DEPENDS = "libogg"
9
10SRC_URI = "http://downloads.xiph.org/releases/theora/libtheora-${PV}.tar.xz \
11 file://0001-add-missing-files.patch"
12
13SRC_URI[sha256sum] = "ebdf77a8f5c0a8f7a9e42323844fa09502b34eb1d1fece7b5f54da41fe2122ec"
14
15UPSTREAM_CHECK_REGEX = "libtheora-(?P<pver>\d+(\.\d)+)\.(tar\.gz|tgz)"
16
17inherit autotools pkgconfig
18
19EXTRA_OECONF = "--disable-examples --disable-doc"
20
21# theora 1.2.0 has broken 32-bit arm assembler, see:
22# https://gitlab.xiph.org/xiph/theora/-/issues/2339
23# https://gitlab.xiph.org/xiph/theora/-/issues/2340
24EXTRA_OECONF:append:arm = " --disable-asm"
25
26# these old architectures don't support all the instructions from the asm source files
27EXTRA_OECONF:append:armv4 = " --disable-asm "
28EXTRA_OECONF:append:armv5 = " --disable-asm "
diff --git a/meta/recipes-multimedia/libtiff/tiff_4.7.1.bb b/meta/recipes-multimedia/libtiff/tiff_4.7.1.bb
deleted file mode 100644
index 0d4b3a4abd..0000000000
--- a/meta/recipes-multimedia/libtiff/tiff_4.7.1.bb
+++ /dev/null
@@ -1,65 +0,0 @@
1SUMMARY = "Provides support for the Tag Image File Format (TIFF)"
2DESCRIPTION = "Library provides support for the Tag Image File Format \
3(TIFF), a widely used format for storing image data. This library \
4provide means to easily access and create TIFF image files."
5HOMEPAGE = "http://www.libtiff.org/"
6LICENSE = "libtiff & BSD-4.3TAHOE"
7LIC_FILES_CHKSUM = "file://LICENSE.md;md5=4ab490c3088a0acff254eb2f8c577547"
8
9CVE_PRODUCT = "libtiff"
10
11SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \
12 "
13
14SRC_URI[sha256sum] = "f698d94f3103da8ca7438d84e0344e453fe0ba3b7486e04c5bf7a9a3fabe9b69"
15
16# exclude betas
17UPSTREAM_CHECK_REGEX = "tiff-(?P<pver>\d+(\.\d+)+).tar"
18
19CVE_STATUS[CVE-2015-7313] = "fixed-version: Tested with check from https://security-tracker.debian.org/tracker/CVE-2015-7313 and already 4.3.0 doesn't have the issue"
20CVE_STATUS[CVE-2023-52356] = "fixed-version: Fixed since 4.7.0, NVD tracks this as version-less vulnerability"
21CVE_STATUS[CVE-2023-6228] = "fixed-version: Fixed since 4.7.0, NVD tracks this as version-less vulnerability"
22CVE_STATUS[CVE-2023-6277] = "fixed-version: Fixed since 4.7.0, NVD tracks this as version-less vulnerability"
23CVE_STATUS[CVE-2025-8851] = "fixed-version: Fixed since 4.7.0, NVD tracks this as fixed in 2024-08-11 vulnerability"
24
25inherit autotools multilib_header
26
27CACHED_CONFIGUREVARS = "ax_cv_check_gl_libgl=no"
28
29PACKAGECONFIG ?= "cxx jpeg zlib lzma \
30 strip-chopping extrasample-as-alpha check-ycbcr-subsampling"
31
32PACKAGECONFIG[cxx] = "--enable-cxx,--disable-cxx,,"
33PACKAGECONFIG[jbig] = "--enable-jbig,--disable-jbig,jbig,"
34PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg,"
35PACKAGECONFIG[lerc] = "--enable-lerc,--disable-lerc,liblerc,"
36PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib,"
37PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz,"
38PACKAGECONFIG[webp] = "--enable-webp,--disable-webp,libwebp,"
39PACKAGECONFIG[zstd] = "--enable-zstd,--disable-zstd,zstd,"
40PACKAGECONFIG[libdeflate] = "--enable-libdeflate,--disable-libdeflate,libdeflate,"
41
42# Convert single-strip uncompressed images to multiple strips of specified
43# size (default: 8192) to reduce memory usage
44PACKAGECONFIG[strip-chopping] = "--enable-strip-chopping,--disable-strip-chopping,,"
45
46# Treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA
47PACKAGECONFIG[extrasample-as-alpha] = "--enable-extrasample-as-alpha,--disable-extrasample-as-alpha,,"
48
49# Control picking up YCbCr subsample info. Disable to support files lacking
50# the tag
51PACKAGECONFIG[check-ycbcr-subsampling] = "--enable-check-ycbcr-subsampling,--disable-check-ycbcr-subsampling,,"
52
53# Support a mechanism allowing reading large strips (usually one strip files)
54# in chunks when using TIFFReadScanline. Experimental 4.0+ feature
55PACKAGECONFIG[chunky-strip-read] = "--enable-chunky-strip-read,--disable-chunky-strip-read,,"
56
57PACKAGES =+ "tiffxx tiff-utils"
58FILES:tiffxx = "${libdir}/libtiffxx.so.*"
59FILES:tiff-utils = "${bindir}/*"
60
61do_install:append() {
62 oe_multilib_header tiffconf.h
63}
64
65BBCLASSEXTEND = "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
deleted file mode 100644
index 36f47f9173..0000000000
--- a/meta/recipes-multimedia/libvorbis/libvorbis/0001-configure-Check-for-clang.patch
+++ /dev/null
@@ -1,68 +0,0 @@
1From d619ccf6c11ab574466914c57994a82fb99401af Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 22 Mar 2017 16:06:55 +0000
4Subject: [PATCH] configure: Check for clang
5
6Disable gcc specific options if using clang
7
8Upstream-Status: Inactive-Upstream [https://gitlab.xiph.org/xiph/vorbis,https://github.com/xiph/vorbis]
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11
12 configure.ac | 19 +++++++++++++++++--
13 1 file changed, 17 insertions(+), 2 deletions(-)
14
15--- a/configure.ac
16+++ b/configure.ac
17@@ -98,6 +98,16 @@ AC_ARG_ENABLE(examples,
18
19 AM_CONDITIONAL(BUILD_EXAMPLES, [test "x$enable_examples" = xyes])
20
21+AC_MSG_CHECKING([whether C compiler is clang])
22+$CC -x c /dev/null -dM -E > conftest.txt 2>&1
23+if grep "__clang__" conftest.txt >/dev/null 2>&1; then
24+ AC_SUBST([CC_CLANG], [1])
25+ AC_MSG_RESULT([yes])
26+ else
27+ AC_SUBST([CC_CLANG], [0])
28+ AC_MSG_RESULT([no])
29+fi
30+
31 dnl --------------------------------------------------
32 dnl Set build flags based on environment
33 dnl --------------------------------------------------
34@@ -132,10 +142,15 @@ else
35 AC_MSG_RESULT([$GCC_VERSION])
36 case $host in
37 *86-*-linux*)
38+ if test "$CC_CLANG" = "1"; then
39+ ieeefp=""
40+ else
41+ ieefp="-mno-ieee-fp"
42+ fi
43 DEBUG="-g -Wall -Wextra -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char"
44- CFLAGS="-O3 -Wall -Wextra -ffast-math -mno-ieee-fp -D_REENTRANT -fsigned-char"
45+ CFLAGS="-O3 -Wall -Wextra -ffast-math -D_REENTRANT -fsigned-char ${ieefp}"
46 # PROFILE="-Wall -Wextra -pg -g -O3 -ffast-math -D_REENTRANT -fsigned-char -fno-inline -static"
47- PROFILE="-Wall -Wextra -pg -g -O3 -ffast-math -mno-ieee-fp -D_REENTRANT -fsigned-char -fno-inline"
48+ PROFILE="-Wall -Wextra -pg -g -O3 -ffast-math ${ieefp} -D_REENTRANT -fsigned-char -fno-inline"
49
50 # glibc < 2.1.3 has a serious FP bug in the math inline header
51 # that will cripple Vorbis. Look to see if the magic FP stack
52@@ -178,12 +193,12 @@ else
53 fi;;
54 powerpc-*-linux*spe)
55 DEBUG="-g -Wall -Wextra -D_REENTRANT -D__NO_MATH_INLINES"
56- CFLAGS="-O3 -Wall -Wextra -ffast-math -mfused-madd -D_REENTRANT"
57- PROFILE="-pg -g -O3 -ffast-math -mfused-madd -D_REENTRANT";;
58+ CFLAGS="-O3 -Wall -Wextra -ffast-math -D_REENTRANT"
59+ PROFILE="-pg -g -O3 -ffast-math -D_REENTRANT";;
60 powerpc-*-linux*)
61 DEBUG="-g -Wall -Wextra -D_REENTRANT -D__NO_MATH_INLINES"
62- CFLAGS="-O3 -Wall -Wextra -ffast-math -mfused-madd -mcpu=750 -D_REENTRANT"
63- PROFILE="-pg -g -O3 -ffast-math -mfused-madd -mcpu=750 -D_REENTRANT";;
64+ CFLAGS="-O3 -Wall -Wextra -ffast-math -mcpu=750 -D_REENTRANT"
65+ PROFILE="-pg -g -O3 -ffast-math -mcpu=750 -D_REENTRANT";;
66 *-*-linux*)
67 DEBUG="-g -Wall -Wextra -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char"
68 CFLAGS="-O3 -Wall -Wextra -ffast-math -D_REENTRANT -fsigned-char"
diff --git a/meta/recipes-multimedia/libvorbis/libvorbis_1.3.7.bb b/meta/recipes-multimedia/libvorbis/libvorbis_1.3.7.bb
deleted file mode 100644
index d5bf5ff0fa..0000000000
--- a/meta/recipes-multimedia/libvorbis/libvorbis_1.3.7.bb
+++ /dev/null
@@ -1,18 +0,0 @@
1SUMMARY = "Ogg Vorbis Audio Codec"
2DESCRIPTION = "Ogg Vorbis is a high-quality lossy audio codec \
3that is free of intellectual property restrictions. libvorbis \
4is the main vorbis codec library."
5HOMEPAGE = "https://xiph.org/vorbis/"
6BUGTRACKER = "https://gitlab.xiph.org/xiph/vorbis/-/issues"
7SECTION = "libs"
8LICENSE = "BSD-3-Clause"
9LIC_FILES_CHKSUM = "file://COPYING;md5=73d9c8942c60b846c3bad13cc6c2e520 \
10 file://include/vorbis/vorbisenc.h;beginline=1;endline=11;md5=c95a4ac2b4125f00a9acf61449ebb843"
11DEPENDS = "libogg"
12
13SRC_URI = "http://downloads.xiph.org/releases/vorbis/${BP}.tar.xz \
14 file://0001-configure-Check-for-clang.patch \
15 "
16SRC_URI[sha256sum] = "b33cc4934322bcbf6efcbacf49e3ca01aadbea4114ec9589d1b1e9d20f72954b"
17
18inherit autotools pkgconfig
diff --git a/meta/recipes-multimedia/mpg123/mpg123_1.33.2.bb b/meta/recipes-multimedia/mpg123/mpg123_1.33.2.bb
deleted file mode 100644
index 23bb400ce5..0000000000
--- a/meta/recipes-multimedia/mpg123/mpg123_1.33.2.bb
+++ /dev/null
@@ -1,55 +0,0 @@
1SUMMARY = "Audio decoder for MPEG-1 Layer 1/2/3"
2DESCRIPTION = "The core of mpg123 is an MPEG-1 Layer 1/2/3 decoding library, which can be used by other programs. \
3mpg123 also comes with a command-line tool which can playback using ALSA, PulseAudio, OSS, and several other APIs, \
4and also can write the decoded audio to WAV."
5HOMEPAGE = "http://mpg123.de/"
6BUGTRACKER = "http://sourceforge.net/p/mpg123/bugs/"
7SECTION = "multimedia"
8
9LICENSE = "LGPL-2.1-only"
10LIC_FILES_CHKSUM = "file://COPYING;md5=e7b9c15fcfb986abb4cc5e8400a24169"
11
12SRC_URI = "https://www.mpg123.de/download/${BP}.tar.bz2"
13SRC_URI[sha256sum] = "2c54fabbfa696dce8f9b137c8ef7a429a061f8fe633cd7d0a511809855f2c219"
14
15UPSTREAM_CHECK_REGEX = "mpg123-(?P<pver>\d+(\.\d+)+)\.tar"
16
17inherit autotools pkgconfig
18
19# The options should be mutually exclusive for configuration script.
20# If both alsa and pulseaudio are specified (as in the default distro features)
21# pulseaudio takes precedence.
22PACKAGECONFIG_ALSA = "${@bb.utils.filter('DISTRO_FEATURES', 'alsa', d)}"
23PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '${PACKAGECONFIG_ALSA}', d)}"
24
25PACKAGECONFIG[alsa] = "--with-default-audio=alsa,,alsa-lib"
26PACKAGECONFIG[esd] = ",,esound"
27PACKAGECONFIG[jack] = ",,jack"
28PACKAGECONFIG[openal] = ",,openal-soft"
29PACKAGECONFIG[portaudio] = ",,portaudio-v19"
30PACKAGECONFIG[pulseaudio] = "--with-default-audio=pulse,,pulseaudio"
31PACKAGECONFIG[sdl] = ",,virtual/libsdl2"
32
33# Following are possible sound output modules:
34# alsa arts coreaudio dummy esd jack nas openal os2 oss portaudio pulse sdl sndio sun tinyalsa win32 win32_wasapi
35AUDIOMODS += "${@bb.utils.filter('PACKAGECONFIG', 'alsa esd jack openal portaudio sdl', d)}"
36AUDIOMODS += "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'pulse', '', d)}"
37
38CACHED_CONFIGUREVARS:libc-musl = "ac_cv_sys_file_offset_bits=no"
39
40EXTRA_OECONF = " \
41 --enable-shared \
42 --enable-largefile \
43 --with-audio='${AUDIOMODS}' \
44 ${@bb.utils.contains('TUNE_FEATURES', 'neon', '--with-cpu=neon', '', d)} \
45 ${@bb.utils.contains('TUNE_FEATURES', 'altivec', '--with-cpu=altivec', '', d)} \
46 ${@bb.utils.contains('TARGET_FPU', 'soft', '--with-cpu=generic_nofpu', '', d)} \
47"
48# Fails to build with thumb-1 (qemuarm)
49#| {standard input}: Assembler messages:
50#| {standard input}:47: Error: selected processor does not support Thumb mode `smull r5,r6,r7,r4'
51#| {standard input}:48: Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r5,r5,lsr#24'
52#...
53#| make[3]: *** [equalizer.lo] Error 1
54ARM_INSTRUCTION_SET:armv4 = "arm"
55ARM_INSTRUCTION_SET:armv5 = "arm"
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
deleted file mode 100644
index 246d3363eb..0000000000
--- a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
+++ /dev/null
@@ -1,294 +0,0 @@
1SUMMARY = "Sound server for Linux and Unix-like operating systems"
2DESCRIPTION = "A general purpose sound server intended to run as a middleware \
3between your applications and your hardware devices, either using ALSA or OSS."
4HOMEPAGE = "http://www.pulseaudio.org"
5SECTION = "libs/multimedia"
6
7# Most of PulseAudio code is under LGPL-2.1-or-later. There are a few
8# exceptions:
9#
10# The "adrian" echo canceller variant has code under a non-standard permissive
11# license. See src/modules/echo-cancel/adrian-license.txt for details. This
12# recipe disables the adrian echo canceller to avoid hassle with the unusual
13# license.
14#
15# The src/modules/reserve* and src/pulsecore/rtkit* files are under the MIT
16# license.
17#
18# The src/pulsecore/filter/ directory contains code under the 3-clause BSD
19# license.
20#
21# People who distribute PulseAudio binaries need to also consider that there
22# are some dependencies to GPL libraries. LGPL code that depends on GPL
23# libraries probably becomes effectively GPL-licensed (at compile-time? or at
24# at link-time?). I'm not a lawyer, though, so I'm not sure of the exact
25# implications. The GPL dependencies only affect the server, not the client
26# library, with the exception of libdbus that affects both. These are the GPL
27# library dependencies:
28#
29# One of the resampler implementations uses libsamplerate. This recipe doesn't
30# enable that resampler, however.
31#
32# One of the database implementations uses gdbm. This recipe doesn't enable
33# that database implementation, however.
34#
35# module-lirc (enabled by PACKAGECONFIG[lirc]) uses LIRC.
36#
37# module-equalizer-sink uses FFTW. This recipe disables that, however.
38#
39# The dependency with the most complicated licensing considerations is libdbus.
40# When PACKAGECONFIG[dbus] is enabled (like it is by default), libdbus will be
41# used by both the server and the client library (libpulse). Does this affect
42# applications that use libpulse? It should also be noted that libdbus is
43# dual-licensed: either GPL-2.0-or-later or AFL-2.0 terms apply. Whose decision
44# is it which of the licenses apply? What a mess. Some people hold the view that
45# libdbus is a system library that is covered by the "special exception" in
46# GPLv2's section 3, and therefore libdbus's GPL license doesn't affect
47# PulseAudio.
48LICENSE = "LGPL-2.1-or-later & MIT & BSD-3-Clause"
49
50LIC_FILES_CHKSUM = "file://LICENSE;md5=0e5cd938de1a7a53ea5adac38cc10c39 \
51 file://GPL;md5=4325afd396febcb659c36b49533135d4 \
52 file://LGPL;md5=2d5025d4aa3495befef8f17206a5b0a1 \
53 file://src/modules/echo-cancel/adrian-license.txt;md5=abbab006a561fbffccedf1c3531f34ab \
54 file://src/pulsecore/filter/LICENSE.WEBKIT;md5=49defbaffddf8c51faf606ff7fc3b1f7 \
55 file://src/pulsecore/resampler.h;beginline=4;endline=21;md5=09794012ae16912c0270f3280cc8ff84 \
56 file://src/modules/reserve.h;beginline=6;endline=28;md5=0e23094760367d51b6609750e9b31fbb \
57 file://src/pulsecore/rtkit.h;beginline=6;endline=29;md5=3f00ff966716ae0817c31576d1473528 \
58 file://src/modules/echo-cancel/adrian-aec.h;beginline=3;endline=12;md5=d3ed4fad1c073f8b06f37495dc5d1026 \
59 file://src/pulsecore/filter/biquad.h;beginline=1;endline=4;md5=6d46d1365206528a20137355924233c1 \
60"
61
62# libtool is needed for libltdl, used in module loading.
63DEPENDS = "m4-native libatomic-ops libsndfile1 libtool"
64# optional
65DEPENDS += "udev alsa-lib glib-2.0"
66DEPENDS += "speexdsp libxml-parser-perl-native libcap"
67
68inherit bash-completion meson pkgconfig useradd gettext perlnative systemd manpages gsettings
69
70# *.desktop rules wont be generated during configure and build will fail
71# if using --disable-nls
72USE_NLS = "yes"
73
74# Helps tests for -msse fail on non-SSE architectures which is all non-x86
75TUNE_CCARGS:append:toolchain-clang = " -Werror=unused-command-line-argument"
76
77# mix_neon.c:179:9: error: invalid operand in inline asm: 'vld1.s32 ${0:h}, [$2]
78# vld1.s32 ${1:h}, [$3] '
79TOOLCHAIN:armv7ve = "gcc"
80TOOLCHAIN:armv7a = "gcc"
81
82EXTRA_OEMESON = "\
83 -Dhal-compat=false \
84 -Dorc=disabled \
85 -Daccess_group=audio \
86 -Dopenssl=disabled \
87 -Ddatabase=simple \
88 -Dzshcompletiondir=no \
89 -Dudevrulesdir=`pkg-config --variable=udevdir udev`/rules.d \
90 -Dvalgrind=disabled \
91 -Dtests=false \
92 -Drunning-from-build-tree=false \
93"
94
95# soxr (the SoX Resampler library) doesn't seem to be currently packaged in
96# oe-core nor meta-oe, so let's not add a PACKAGECONFIG entry for it for now.
97EXTRA_OEMESON += "-Dsoxr=disabled"
98
99# The FFTW dependency (for module-equalizer-sink) was removed in commit
100# ddbd713293 without explaining why it was not made a PACKAGECONFIG item
101# instead. Oh well, let's keep it disabled until someone expresses some
102# interest in having it enabled.
103EXTRA_OEMESON += "-Dfftw=disabled"
104
105# The "adrian" echo canceller implementation has a non-standard license
106# (src/modules/echo-cancel/adrian-license.txt). It's a permissive license, so
107# the licensing terms are probably not problematic, but it would be an extra
108# hassle to add the license to OE-Core's set of licenses. The canceller isn't
109# very good anyway, better alternatives exist (such as the webrtc canceller).
110EXTRA_OEMESON += "-Dadrian-aec=false"
111
112PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez5', '', d)} \
113 ${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
114 ${@bb.utils.contains('DISTRO_FEATURES', '3g', 'ofono', '', d)} \
115 ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 systemd x11', d)} \
116 dbus gsettings \
117 "
118
119PACKAGECONFIG[dbus] = "-Ddbus=enabled,-Ddbus=disabled,dbus"
120PACKAGECONFIG[bluez5] = "-Dbluez5=enabled,-Dbluez5=disabled,bluez5 sbc"
121PACKAGECONFIG[gsettings] = "-Dgsettings=enabled,-Dgsettings=disabled,glib-2.0-native glib-2.0"
122PACKAGECONFIG[ofono] = "-Dbluez5-ofono-headset=true,-Dbluez5-ofono-headset=false,ofono"
123PACKAGECONFIG[gtk] = "-Dgtk=enabled,-Dgtk=disabled,gtk+3"
124PACKAGECONFIG[systemd] = "-Dsystemd=enabled -Dsystemduserunitdir=${systemd_user_unitdir},-Dsystemd=disabled,systemd"
125PACKAGECONFIG[x11] = "-Dx11=enabled,-Dx11=disabled,virtual/libx11 libxtst libice libsm libxcb"
126PACKAGECONFIG[avahi] = "-Davahi=enabled,-Davahi=disabled,avahi"
127PACKAGECONFIG[jack] = "-Djack=enabled,-Djack=disabled,jack"
128# Since many embedded systems don't have non-root users, it's useful to be
129# able to use pulseaudio autospawn for root as well.
130PACKAGECONFIG[autospawn-for-root] = ",,,"
131PACKAGECONFIG[lirc] = "-Dlirc=enabled,-Dlirc=disabled,lirc"
132PACKAGECONFIG[webrtc] = "-Dwebrtc-aec=enabled,-Dwebrtc-aec=disabled,webrtc-audio-processing-1"
133PACKAGECONFIG[ipv6] = "-Dipv6=true,-Dipv6=false,"
134PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false,"
135PACKAGECONFIG[oss-output] = "-Doss-output=enabled,-Doss-output=disabled,"
136
137export TARGET_PFPU = "${TARGET_FPU}"
138
139set_cfg_value () {
140 sed -i -e "s/\(; *\)\?$2 =.*/$2 = $3/" "$1"
141 if ! grep -q "^$2 = $3\$" "$1"; then
142 die "Use of sed to set '$2' to '$3' in '$1' failed"
143 fi
144}
145
146do_compile:append () {
147 if ${@bb.utils.contains('PACKAGECONFIG', 'autospawn-for-root', 'true', 'false', d)}; then
148 set_cfg_value src/pulse/client.conf allow-autospawn-for-root yes
149 fi
150}
151
152do_install:append() {
153 install -d ${D}${sysconfdir}/default/volatiles
154 install -m 0644 ${UNPACKDIR}/volatiles.04_pulse ${D}${sysconfdir}/default/volatiles/04_pulse
155}
156
157USERADD_PACKAGES = "pulseaudio-server"
158GROUPADD_PARAM:pulseaudio-server = "--system audio; --system pulse"
159USERADD_PARAM:pulseaudio-server = "--system --home /var/run/pulse \
160 --no-create-home --shell /bin/false \
161 --groups audio,pulse --gid pulse pulse"
162
163PACKAGES =+ "\
164 libpulse \
165 libpulse-mainloop-glib \
166 libpulse-simple \
167 libpulsecommon \
168 libpulsecore \
169 ${PN}-pa-info \
170 ${PN}-server \
171 ${PN}-misc \
172 "
173
174# The console-kit module is included here explicitly so bitbake can map to the
175# RDEPENDS we define for it in this recipe, and thereby ensure that when
176# adding the console-kit module to an image, we also get the necessary
177# consolekit package produced.
178PACKAGES =+ "${@bb.utils.contains('PACKAGECONFIG', 'dbus', 'pulseaudio-module-console-kit', '', d)}"
179
180#upgrade path:
181RREPLACES:pulseaudio-server = "libpulse-bin libpulse-conf"
182
183PACKAGES_DYNAMIC += "^pulseaudio-lib-.* ^pulseaudio-module-.*"
184
185FILES:libpulsecore = "${libdir}/pulseaudio/libpulsecore*.so"
186FILES:libpulsecommon = "${libdir}/pulseaudio/libpulsecommon*.so"
187
188# client.conf configures the behaviour of libpulse, so it belongs in the same
189# package.
190FILES:libpulse = "${libdir}/libpulse.so.* ${sysconfdir}/pulse/client.conf"
191
192FILES:libpulse-simple = "${libdir}/libpulse-simple.so.*"
193FILES:libpulse-mainloop-glib = "${libdir}/libpulse-mainloop-glib.so.*"
194
195FILES:${PN}-dev += "${libdir}/pulse-${PV}/modules/*.la ${datadir}/vala"
196FILES:${PN}-bin += "${sysconfdir}/default/volatiles/04_pulse"
197FILES:${PN}-pa-info = "${bindir}/pa-info"
198FILES:${PN}-server = "${bindir}/pulseaudio ${bindir}/start-* ${sysconfdir} ${bindir}/pactl */udev/rules.d/*.rules */*/udev/rules.d/*.rules ${systemd_user_unitdir}/*"
199FILES:${PN}-server += "${datadir}/dbus-1/system.d/pulseaudio-system.conf"
200
201#SYSTEMD_PACKAGES = "${PN}-server"
202SYSTEMD_SERVICE:${PN}-server = "pulseaudio.service"
203
204FILES:${PN}-misc = "${bindir}/* ${libdir}/pulseaudio/libpulsedsp.so"
205
206# Allow the pulseaudio package to be created empty as a placeholder (-dbg and -dev depend on it)
207FILES:${PN} = ""
208ALLOW_EMPTY:${PN} = "1"
209
210CONFFILES:libpulse = "${sysconfdir}/pulse/client.conf"
211
212CONFFILES:pulseaudio-server = "\
213 ${sysconfdir}/pulse/default.pa \
214 ${sysconfdir}/pulse/daemon.conf \
215 ${sysconfdir}/pulse/system.pa \
216 "
217
218pkg_postinst:${PN}-server() {
219 if [ -z "$D" ] && [ -e ${sysconfdir}/init.d/populate-volatile.sh ] ; then
220 ${sysconfdir}/init.d/populate-volatile.sh update
221 fi
222}
223
224python populate_packages:prepend() {
225 plugindir = d.expand('${libdir}/pulseaudio/modules/')
226 do_split_packages(d, plugindir, r'^module-(.*)\.so$', '${PN}-module-%s', 'PulseAudio module for %s', extra_depends='', prepend=True)
227 do_split_packages(d, plugindir, r'^lib(.*)\.so$', '${PN}-lib-%s', 'PulseAudio library for %s', extra_depends='', prepend=True)
228}
229
230# pa-info is a bash script that collects information about the audio setup.
231# It's primarily useful for attaching an information dump when reporting bugs.
232RDEPENDS:${PN}-pa-info = "\
233 alsa-utils-amixer \
234 alsa-utils-aplay \
235 alsa-utils-scripts \
236 bash \
237 ${PN}-server \
238 "
239
240RDEPENDS:pulseaudio-server = " \
241 pulseaudio-module-filter-apply \
242 pulseaudio-module-filter-heuristics \
243 pulseaudio-module-udev-detect \
244 pulseaudio-module-null-sink \
245 pulseaudio-module-device-restore \
246 pulseaudio-module-stream-restore \
247 pulseaudio-module-card-restore \
248 pulseaudio-module-augment-properties \
249 pulseaudio-module-detect \
250 pulseaudio-module-alsa-sink \
251 pulseaudio-module-alsa-source \
252 pulseaudio-module-alsa-card \
253 pulseaudio-module-native-protocol-unix \
254 pulseaudio-module-default-device-restore \
255 pulseaudio-module-intended-roles \
256 pulseaudio-module-rescue-streams \
257 pulseaudio-module-always-sink \
258 pulseaudio-module-suspend-on-idle \
259 pulseaudio-module-position-event-sounds \
260 pulseaudio-module-role-cork \
261 pulseaudio-module-switch-on-port-available"
262
263# If the server is installed, it's usually desirable to make ALSA applications
264# use PulseAudio. alsa-plugins-pulseaudio-conf will install the configuration
265# that makes the PulseAudio plugin the default ALSA device.
266RDEPENDS:pulseaudio-server += "${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'alsa-plugins-pulseaudio-conf', '', d)}"
267
268# pulseaudio-module-console-kit is built whenever dbus is enabled by PACKAGECONFIG
269# but consolekit depends on libx11 and is available only for DISTRO with x11 in DISTRO_FEATURES
270RDEPENDS:pulseaudio-module-console-kit =+ "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit x11', 'consolekit', '', d)}"
271RDEPENDS:pulseaudio-misc += "pulseaudio-module-cli-protocol-unix"
272
273FILES:${PN}-module-alsa-card += "${datadir}/pulseaudio/alsa-mixer"
274
275GSETTINGS_PACKAGE = "${@bb.utils.contains('PACKAGECONFIG', 'gsettings', '${PN}-module-gsettings', '', d)}"
276FILES:${PN}-module-gsettings += "${libexecdir}/pulse/gsettings-helper ${datadir}/GConf/gsettings ${datadir}/glib-2.0/schemas"
277
278# The console-kit module is good to have on X11 systems (it keeps PulseAudio
279# running for the duration of the user login session). The device-manager and
280# x11-* modules are referenced from the start-pulseaudio-x11 script, so those
281# modules must be installed when X11 is enabled.
282RDEPENDS:pulseaudio-server += "\
283 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '\
284 pulseaudio-module-device-manager \
285 pulseaudio-module-x11-cork-request \
286 pulseaudio-module-x11-publish \
287 pulseaudio-module-x11-xsmp \
288 ', '', d)}"
289
290RDEPENDS:pulseaudio-server += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', \
291 bb.utils.contains('DISTRO_FEATURES', 'systemd', 'pulseaudio-module-systemd-login', 'pulseaudio-module-console-kit', d), \
292 '', d)}"
293
294CVE_STATUS[CVE-2024-11586] = "not-applicable-platform: specific to Ubuntu 16.04"
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
deleted file mode 100644
index 33f7709ae4..0000000000
--- a/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-client-conf-Add-allow-autospawn-for-root.patch
+++ /dev/null
@@ -1,97 +0,0 @@
1From babec3a50dd710d26b72f6c6d43bd79b04e954a6 Mon Sep 17 00:00:00 2001
2From: Tanu Kaskinen <tanu.kaskinen@linux.intel.com>
3Date: Tue, 28 Apr 2015 14:32:43 +0300
4Subject: [PATCH] client-conf: Add allow-autospawn-for-root
5
6Usually autospawning for root is a bad idea, since it can easily
7interfere with other users' PulseAudio instances, but in embedded
8environments where only root exists, autospawning is fine.
9
10Upstream-Status: Denied [Upstream hasn't so far been convinced that
11this feature is needed. The view is that running the graphical session
12as root doesn't make sense even on embedded systems, or if it does,
13running PulseAudio in the system mode should be a good solution for
14that use case. If someone can prove otherwise, the patch would
15probably be accepted.]
16
17Signed-off-by: Tanu Kaskinen <tanu.kaskinen@linux.intel.com>
18---
19 man/pulse-client.conf.5.xml.in | 9 +++++++++
20 src/pulse/client-conf.c | 1 +
21 src/pulse/client-conf.h | 1 +
22 src/pulse/client.conf.in | 1 +
23 src/pulse/context.c | 2 +-
24 5 files changed, 13 insertions(+), 1 deletion(-)
25
26diff --git a/man/pulse-client.conf.5.xml.in b/man/pulse-client.conf.5.xml.in
27index b88898c..e737c96 100644
28--- a/man/pulse-client.conf.5.xml.in
29+++ b/man/pulse-client.conf.5.xml.in
30@@ -82,6 +82,15 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
31 </option>
32
33 <option>
34+ <p><opt>allow-autospawn-for-root=</opt> Allow autospawning also for root.
35+ Takes a boolean value, defaults to <opt>no</opt>. If the <opt>autospawn
36+ </opt> option is disabled, this option has no effect. Autospawning for
37+ root is disabled by default, because running PulseAudio as root will
38+ interfere with regular users' PulseAudio instances. This option should be
39+ enabled only in environments where there are no regular users at all.</p>
40+ </option>
41+
42+ <option>
43 <p><opt>daemon-binary=</opt> Path to the PulseAudio daemon to
44 run when autospawning. Defaults to a path configured at compile
45 time.</p>
46diff --git a/src/pulse/client-conf.c b/src/pulse/client-conf.c
47index a3c9486..9f68ee5 100644
48--- a/src/pulse/client-conf.c
49+++ b/src/pulse/client-conf.c
50@@ -138,6 +138,7 @@ void pa_client_conf_load(pa_client_conf *c, bool load_from_x11, bool load_from_e
51 { "default-server", pa_config_parse_string, &c->default_server, NULL },
52 { "default-dbus-server", pa_config_parse_string, &c->default_dbus_server, NULL },
53 { "autospawn", pa_config_parse_bool, &c->autospawn, NULL },
54+ { "allow-autospawn-for-root", pa_config_parse_bool, &c->allow_autospawn_for_root, NULL },
55 { "cookie-file", pa_config_parse_string, &c->cookie_file_from_client_conf, NULL },
56 { "disable-shm", pa_config_parse_bool, &c->disable_shm, NULL },
57 { "enable-shm", pa_config_parse_not_bool, &c->disable_shm, NULL },
58diff --git a/src/pulse/client-conf.h b/src/pulse/client-conf.h
59index 7691ec7..19db7ed 100644
60--- a/src/pulse/client-conf.h
61+++ b/src/pulse/client-conf.h
62@@ -38,6 +38,7 @@ typedef struct pa_client_conf {
63 char *cookie_file_from_application;
64 char *cookie_file_from_client_conf;
65 bool autospawn, disable_shm, disable_memfd, auto_connect_localhost, auto_connect_display;
66+ bool allow_autospawn_for_root;
67 size_t shm_size;
68 } pa_client_conf;
69
70diff --git a/src/pulse/client.conf.in b/src/pulse/client.conf.in
71index 26b7790..69830ef 100644
72--- a/src/pulse/client.conf.in
73+++ b/src/pulse/client.conf.in
74@@ -23,6 +23,7 @@
75 ; default-dbus-server =
76
77 ; autospawn = yes
78+; allow-autospawn-for-root = no
79 ; daemon-binary = @PA_BINARY@
80 ; extra-arguments = --log-target=syslog
81
82diff --git a/src/pulse/context.c b/src/pulse/context.c
83index 69be5f4..d6e13e8 100644
84--- a/src/pulse/context.c
85+++ b/src/pulse/context.c
86@@ -1027,7 +1027,7 @@ int pa_context_connect(
87 if (!(flags & PA_CONTEXT_NOAUTOSPAWN) && c->conf->autospawn) {
88
89 #ifdef HAVE_GETUID
90- if (getuid() == 0)
91+ if (!c->conf->allow_autospawn_for_root && getuid() == 0)
92 pa_log_debug("Not doing autospawn since we are root.");
93 else {
94 c->do_autospawn = true;
95--
962.8.1
97
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
deleted file mode 100644
index b1a43bd7f0..0000000000
--- a/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-doxygen-meson.build-remove-dependency-on-doxygen-bin.patch
+++ /dev/null
@@ -1,26 +0,0 @@
1From 4ee244d0824e772ab35abb0f9df5e8088e16fc5d Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Mon, 26 Apr 2021 19:30:40 +0200
4Subject: [PATCH] doxygen/meson.build: remove dependency on doxygen binary
5
6New meson refuses to complete confuguration if doxygen is absent
7even if this target is never actually run. As we never run it,
8let's remove it, until upstream and/or meson figure out that it's
9optional and should be treated as such.
10
11Upstream-Status: Inappropriate [needs proper upstream fix]
12Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
13---
14 doxygen/meson.build | 2 --
15 1 file changed, 2 deletions(-)
16
17diff --git a/doxygen/meson.build b/doxygen/meson.build
18index afc0e49..df55c83 100644
19--- a/doxygen/meson.build
20+++ b/doxygen/meson.build
21@@ -6,5 +6,3 @@ doxygen_conf = configure_file(
22 configuration : cdata,
23 )
24
25-run_target('doxygen',
26- command : ['doxygen', doxygen_conf])
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
deleted file mode 100644
index 48f0492177..0000000000
--- a/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-do-not-display-CLFAGS-to-improve-reproducibility-bui.patch
+++ /dev/null
@@ -1,30 +0,0 @@
1From f0ddd7c36556ad05c1398fdd132947323ad26473 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Thu, 6 Dec 2018 11:43:41 +0800
4Subject: [PATCH 2/2] do not display CLFAGS to improve reproducibility build
5
6Macro PA_CFLAGS contains build path, do not use it to
7display CFLAGS which could improve reproducibility build.
8
9Upstream-Status: Inappropriate [oe specific]
10Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
11---
12 src/daemon/main.c | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/src/daemon/main.c b/src/daemon/main.c
16index 30ef499..5c3abf0 100644
17--- a/src/daemon/main.c
18+++ b/src/daemon/main.c
19@@ -916,7 +916,7 @@ int main(int argc, char *argv[]) {
20 pa_set_env_and_record("PULSE_SYSTEM", conf->system_instance ? "1" : "0");
21
22 pa_log_info("This is PulseAudio %s", PACKAGE_VERSION);
23- pa_log_debug("Compilation CFLAGS: %s", PA_CFLAGS);
24+ pa_log_debug("Compilation CFLAGS: ***");
25
26 #ifdef HAVE_LIBSAMPLERATE
27 pa_log_warn("Compiled with DEPRECATED libsamplerate support!");
28--
292.25.1
30
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio/volatiles.04_pulse b/meta/recipes-multimedia/pulseaudio/pulseaudio/volatiles.04_pulse
deleted file mode 100644
index 5b1998032b..0000000000
--- a/meta/recipes-multimedia/pulseaudio/pulseaudio/volatiles.04_pulse
+++ /dev/null
@@ -1,2 +0,0 @@
1# <type> <owner> <group> <mode> <path> <linksource>
2d pulse pulse 0755 /var/run/pulse none
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio_17.0.bb b/meta/recipes-multimedia/pulseaudio/pulseaudio_17.0.bb
deleted file mode 100644
index 6c172b4ec7..0000000000
--- a/meta/recipes-multimedia/pulseaudio/pulseaudio_17.0.bb
+++ /dev/null
@@ -1,10 +0,0 @@
1require pulseaudio.inc
2
3SRC_URI = "http://www.freedesktop.org/software/pulseaudio/releases/${BP}.tar.xz \
4 file://0001-client-conf-Add-allow-autospawn-for-root.patch \
5 file://0002-do-not-display-CLFAGS-to-improve-reproducibility-bui.patch \
6 file://volatiles.04_pulse \
7 file://0001-doxygen-meson.build-remove-dependency-on-doxygen-bin.patch \
8 "
9SRC_URI[sha256sum] = "053794d6671a3e397d849e478a80b82a63cb9d8ca296bd35b73317bb5ceb87b5"
10UPSTREAM_CHECK_REGEX = "pulseaudio-(?P<pver>\d+(\.(?!99)\d+)+)\.tar"
diff --git a/meta/recipes-multimedia/sbc/sbc_2.1.bb b/meta/recipes-multimedia/sbc/sbc_2.1.bb
deleted file mode 100644
index 8b91e7e65b..0000000000
--- a/meta/recipes-multimedia/sbc/sbc_2.1.bb
+++ /dev/null
@@ -1,25 +0,0 @@
1SUMMARY = "SBC Audio Codec"
2DESCRIPTION = "Bluetooth low-complexity, subband codec (SBC) library."
3HOMEPAGE = "https://www.bluez.org"
4SECTION = "libs"
5LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later"
6LICENSE:${PN} = "LGPL-2.1-or-later"
7LICENSE:${PN}-examples = "GPL-2.0-or-later"
8LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
9 file://COPYING.LIB;md5=fb504b67c50331fc78734fed90fb0e09 \
10 file://src/sbcenc.c;beginline=1;endline=8;md5=cfac6012e2dea914de8b3b7693591622 \
11 file://sbc/sbc.h;beginline=1;endline=10;md5=bbf642bd99160e4f2a5bbd5d174a8320 \
12 "
13
14DEPENDS = "libsndfile1"
15
16SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/${BP}.tar.xz"
17
18SRC_URI[sha256sum] = "426633cabd7c798236443516dfa8335b47e004b0ef37ff107e0c7ead3299fcc2"
19
20inherit autotools pkgconfig
21
22CFLAGS += "-std=gnu17"
23
24PACKAGES =+ "${PN}-examples"
25FILES:${PN}-examples += "${bindir}/*"
diff --git a/meta/recipes-multimedia/speex/speex_1.2.1.bb b/meta/recipes-multimedia/speex/speex_1.2.1.bb
deleted file mode 100644
index c40198fa8f..0000000000
--- a/meta/recipes-multimedia/speex/speex_1.2.1.bb
+++ /dev/null
@@ -1,20 +0,0 @@
1SUMMARY = "Speech Audio Codec"
2DESCRIPTION = "Speex is an Open Source/Free Software patent-free audio compression format designed for speech."
3HOMEPAGE = "http://www.speex.org"
4SECTION = "libs"
5LICENSE = "BSD-3-Clause"
6LIC_FILES_CHKSUM = "file://COPYING;md5=eff3f76350f52a99a3df5eec6b79c02a \
7 file://include/speex/speex.h;beginline=1;endline=34;md5=ef8c8ea4f7198d71cf3509c6ed05ea50 \
8 "
9DEPENDS = "libogg speexdsp"
10
11SRC_URI = "http://downloads.xiph.org/releases/speex/speex-${PV}.tar.gz"
12UPSTREAM_CHECK_REGEX = "speex-(?P<pver>\d+(\.\d+)+)\.tar"
13
14SRC_URI[sha256sum] = "4b44d4f2b38a370a2d98a78329fefc56a0cf93d1c1be70029217baae6628feea"
15
16inherit autotools pkgconfig lib_package
17
18EXTRA_OECONF = "\
19 ${@bb.utils.contains('TARGET_FPU', 'soft', '--enable-fixed-point --disable-float-api --disable-vbr', '', d)} \
20"
diff --git a/meta/recipes-multimedia/speex/speexdsp_1.2.1.bb b/meta/recipes-multimedia/speex/speexdsp_1.2.1.bb
deleted file mode 100644
index 435b56bbb8..0000000000
--- a/meta/recipes-multimedia/speex/speexdsp_1.2.1.bb
+++ /dev/null
@@ -1,28 +0,0 @@
1SUMMARY = "A patent-free DSP library"
2DESCRIPTION = "SpeexDSP is a patent-free, Open Source/Free Software DSP library."
3HOMEPAGE = "http://www.speex.org"
4SECTION = "libs"
5LICENSE = "BSD-3-Clause"
6LIC_FILES_CHKSUM = "file://COPYING;md5=eff3f76350f52a99a3df5eec6b79c02a"
7
8SRC_URI = "http://downloads.xiph.org/releases/speex/speexdsp-${PV}.tar.gz"
9
10UPSTREAM_CHECK_REGEX = "speexdsp-(?P<pver>\d+(\.\d+)+)\.tar"
11
12SRC_URI[sha256sum] = "8c777343e4a6399569c72abc38a95b24db56882c83dbdb6c6424a5f4aeb54d3d"
13
14inherit autotools pkgconfig
15
16EXTRA_OECONF = "\
17 --disable-examples \
18 ${@bb.utils.contains('TARGET_FPU', 'soft', '--enable-fixed-point --disable-float-api', '', d)} \
19"
20
21# speexdsp was split off from speex in 1.2rc2. Older versions of speex can't
22# be installed together with speexdsp, since they contain overlapping files.
23RCONFLICTS:${PN} = "speex (< 1.2rc2)"
24RCONFLICTS:${PN}-dbg = "speex-dbg (< 1.2rc2)"
25RCONFLICTS:${PN}-dev = "speex-dev (< 1.2rc2)"
26RCONFLICTS:${PN}-staticdev = "speex-staticdev (< 1.2rc2)"
27
28BBCLASSEXTEND = "native"
diff --git a/meta/recipes-multimedia/webp/libwebp_1.6.0.bb b/meta/recipes-multimedia/webp/libwebp_1.6.0.bb
deleted file mode 100644
index 0ba90c406a..0000000000
--- a/meta/recipes-multimedia/webp/libwebp_1.6.0.bb
+++ /dev/null
@@ -1,57 +0,0 @@
1SUMMARY = "WebP is an image format designed for the Web"
2DESCRIPTION = "WebP is a method of lossy and lossless compression that can be \
3 used on a large variety of photographic, translucent and \
4 graphical images found on the web. The degree of lossy \
5 compression is adjustable so a user can choose the trade-off \
6 between file size and image quality. WebP typically achieves \
7 an average of 30% more compression than JPEG and JPEG 2000, \
8 without loss of image quality."
9HOMEPAGE = "https://developers.google.com/speed/webp/"
10SECTION = "libs"
11
12LICENSE = "BSD-3-Clause"
13LIC_FILES_CHKSUM = "file://COPYING;md5=6e8dee932c26f2dab503abf70c96d8bb \
14 file://PATENTS;md5=c6926d0cb07d296f886ab6e0cc5a85b7"
15
16SRC_URI = "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/${BP}.tar.gz"
17SRC_URI[sha256sum] = "e4ab7009bf0629fd11982d4c2aa83964cf244cffba7347ecd39019a9e38c4564"
18
19UPSTREAM_CHECK_URI = "http://downloads.webmproject.org/releases/webp/index.html"
20
21EXTRA_OECONF = " \
22 --disable-wic \
23 --enable-libwebpmux \
24 --enable-libwebpdemux \
25 --enable-threading \
26"
27
28# Do not trust configure to determine if neon is available.
29#
30EXTRA_OECONF_ARM = " \
31 ${@bb.utils.contains("TUNE_FEATURES","neon","--enable-neon","--disable-neon",d)} \
32"
33EXTRA_OECONF:append:arm = " ${EXTRA_OECONF_ARM}"
34EXTRA_OECONF:append:armeb = " ${EXTRA_OECONF_ARM}"
35
36inherit autotools lib_package
37
38PACKAGECONFIG ??= ""
39
40# libwebpdecoder is a subset of libwebp, don't build it unless requested
41PACKAGECONFIG[decoder] = "--enable-libwebpdecoder,--disable-libwebpdecoder"
42
43# Apply for examples programs: cwebp and dwebp
44PACKAGECONFIG[gif] = "--enable-gif,--disable-gif,giflib"
45PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg"
46PACKAGECONFIG[png] = "--enable-png,--disable-png,,libpng"
47PACKAGECONFIG[tiff] = "--enable-tiff,--disable-tiff,tiff"
48
49# Apply only for example program vwebp
50PACKAGECONFIG[gl] = "--enable-gl,--disable-gl,mesa-glut"
51
52PACKAGES =+ "${PN}-gif2webp"
53
54DESCRIPTION:${PN}-gif2webp = "Simple tool to convert animated GIFs to WebP"
55FILES:${PN}-gif2webp = "${bindir}/gif2webp"
56
57BBCLASSEXTEND += "native nativesdk"
diff --git a/meta/recipes-multimedia/x264/x264/32c3b801191522961102d4bea292cdb61068d0dd.patch b/meta/recipes-multimedia/x264/x264/32c3b801191522961102d4bea292cdb61068d0dd.patch
deleted file mode 100644
index fb0f313cdb..0000000000
--- a/meta/recipes-multimedia/x264/x264/32c3b801191522961102d4bea292cdb61068d0dd.patch
+++ /dev/null
@@ -1,39 +0,0 @@
1From 32c3b801191522961102d4bea292cdb61068d0dd Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin@martin.st>
3Date: Fri, 4 Apr 2025 16:59:34 +0300
4Subject: [PATCH] lavf: Update the code to work with the latest libavutil API
5
6Upstream-Status: Backport [https://code.videolan.org/videolan/x264/-/commit/32c3b801191522961102d4bea292cdb61068d0dd]
7---
8 input/lavf.c | 6 ++++++
9 1 file changed, 6 insertions(+)
10
11diff --git a/input/lavf.c b/input/lavf.c
12index 90f4cec5..e2489963 100644
13--- a/input/lavf.c
14+++ b/input/lavf.c
15@@ -33,6 +33,7 @@
16 #include <libavutil/error.h>
17 #include <libavutil/mem.h>
18 #include <libavutil/pixdesc.h>
19+#include <libavutil/version.h>
20
21 #define FAIL_IF_ERROR( cond, ... ) FAIL_IF_ERR( cond, "lavf", __VA_ARGS__ )
22
23@@ -141,8 +142,13 @@ static int read_frame_internal( cli_pic_t *p_pic, lavf_hnd_t *h, int i_frame, vi
24 if( info )
25 {
26 info->fullrange = is_fullrange;
27+#if LIBAVUTIL_VERSION_MAJOR < 60
28 info->interlaced = h->frame->interlaced_frame;
29 info->tff = h->frame->top_field_first;
30+#else
31+ info->interlaced = !!(h->frame->flags & AV_FRAME_FLAG_INTERLACED);
32+ info->tff = !!(h->frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST);
33+#endif
34 }
35
36 if( h->vfr_input )
37--
38GitLab
39
diff --git a/meta/recipes-multimedia/x264/x264_git.bb b/meta/recipes-multimedia/x264/x264_git.bb
deleted file mode 100644
index eb72ba006a..0000000000
--- a/meta/recipes-multimedia/x264/x264_git.bb
+++ /dev/null
@@ -1,60 +0,0 @@
1SUMMARY = "H.264/MPEG-4 AVC video encoder"
2DESCRIPTION = "A free software library and application for encoding video streams into the H.264/MPEG-4 AVC format."
3HOMEPAGE = "http://www.videolan.org/developers/x264.html"
4
5LICENSE = "GPL-2.0-only"
6LICENSE_FLAGS = "commercial"
7LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
8
9DEPENDS = "nasm-native"
10
11SRC_URI = "git://code.videolan.org/videolan/x264.git;branch=stable;protocol=https \
12 file://32c3b801191522961102d4bea292cdb61068d0dd.patch \
13 "
14UPSTREAM_CHECK_COMMITS = "1"
15
16SRCREV = "31e19f92f00c7003fa115047ce50978bc98c3a0d"
17
18PV = "r3039+git"
19
20inherit lib_package pkgconfig
21
22X264_DISABLE_ASM = ""
23X264_DISABLE_ASM:x86 = "--disable-asm"
24X264_DISABLE_ASM:armv4 = "--disable-asm"
25X264_DISABLE_ASM:armv5 = "--disable-asm"
26X264_DISABLE_ASM:powerpc = "${@bb.utils.contains("TUNE_FEATURES", "spe", "--disable-asm", "", d)}"
27X264_DISABLE_ASM:mipsarch = "${@bb.utils.contains("TUNE_FEATURES", "r6", "", "--disable-asm", d)}"
28
29PACKAGECONFIG ?= " \
30 ffmpeg \
31 ${@bb.utils.filter("DISTRO_FEATURES", "opencl", d)} \
32"
33PACKAGECONFIG[ffmpeg] = "--enable-lavf --enable-swscale,--disable-lavf --disable-swscale,ffmpeg"
34PACKAGECONFIG[opencl] = "--enable-opencl,--disable-opencl,"
35
36EXTRA_OECONF = '--prefix=${prefix} \
37 --host=${HOST_SYS} \
38 --libdir=${libdir} \
39 --cross-prefix=${TARGET_PREFIX} \
40 --sysroot=${STAGING_DIR_TARGET} \
41 --enable-shared \
42 --enable-static \
43 --enable-pic \
44 ${X264_DISABLE_ASM} \
45 --extra-cflags="${TUNE_CCARGS}" \
46 '
47
48do_configure() {
49 install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}
50 install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}
51 ./configure ${EXTRA_OECONF}
52}
53
54do_install() {
55 oe_runmake install DESTDIR=${D}
56}
57
58AS[unexport] = "1"
59
60COMPATIBLE_HOST:x86-x32 = "null"