From 67e8544511d6d1dd220f520fb7d0b08ca08e0280 Mon Sep 17 00:00:00 2001 From: Markus Volk Date: Sun, 9 Mar 2025 08:58:09 +0100 Subject: pipewire: update 1.2.7 -> 1.4.0 - remove backport patch - install libspa.so to libpipewire package PipeWire 1.4.0 (2025-03-06) This is the 1.4 release that is API and ABI compatible with previous 1.2.x and 1.0.x releases. This release contains some of the bigger changes that happened since the 1.2 release last year, including: * client-rt.conf was removed, all clients now use client.conf and are given RT priority in the data threads. * UMP (aka MIDI2) support was added and is now the default format to carry MIDI1 and MIDI2 around in PipeWire. There are helper functions to convert between legacy MIDI and UMP. * The resampler can now precompute (at compile time) some common conversion filters. Delay reporting in the resampler was fixed and improved. * Bluetooth support for BAP broadcast links and support for hearing aids using ASHA was added. A new G722 codec was also added. Delay reporting and configuration in Bluetooth was improved. * The ALSA plugin now supports DSD playback when explicitly allowed with the alsa.formats property. * A PipeWire JACK control API was added. * A system service was added for pipewire-pulse. * Many documentation and translation updates. * Many of the SPA macros are converted to inline functions. All SPA inline functions are now also compiled into a libspa.so library to make it easier to access them from bindings. * The module-filter-chain graph code was moved to a separate filter-graph SPA plugin so that it becomes usable in more places. EBUR128, param_eq and dcblock plugins were added to filter-graph. The filter graph can now also use fftw for doing convolutions. The audioconvert plugin was optimized and support was added to audioconvert to insert extra filter-graphs in the processing pipeline. * New helper functions were added to parse JSON format descriptions. * The profiler now also includes the clock of the followers. * RISCV CPU support and assembler optimisations were added. * The clock used for logging timestamps can be configured now. * The JSON parser was split into core functions and helper. * Support for UCM split PCMs was added. Instead of alsa-lib splitting up PCMs, PipeWire can mark the PCMs with the correct metadata so that the session manager can use native PipeWire features to do this. * Support for webrtc2 was added to echo-cancel. * IEC958 codecs are now detected from the HDMI ELD data. * Conversion between floating point and 32 bits now preserve 25 bits of precision instead of 24 bits. * A new Telephony D-BUS API compatible with ofono was added. * The invoke queues are now more efficient and can be called from multiple threads concurrently. * Clock information in v4l2 was improved. * An ffmpeg based videoconvert plugin was added that can be used with the videoadapter. * The GStreamer elements have improved buffer pool handling and rate matching. * The combine-stream module can now also mix streams. * link-factory now checks that the port and node belong together. * The netjack-manager module has support for autoconnecting streams. * The native-protocol has support for abstract sockets. * The pulse server has support for blocking playback and capture in pulse.rules. * The corked state of stream is now reported correctly in pulse-server. * Fix backwards jumps in pulse-server. * Latency configuration support was added in loopback and raop-sink. * The ROC module has more configuration options. * The SAP module now only send updated SDP when something changed. * RTP source now has a standby mode where it idles when there is no data received. * Support for PTP clocking was added the RTP streams. * The VBAN receiver can now dynamically create streams when they are detected. * Error reporting when making links was improved. * Support for returning (canceling) a dequeued buffer in pw-stream. * Support for emiting events in pw-stream was added. * pw-cat now support stdin and stdout. Highlights (since the previous 1.3.83 release) - Small fixes and improvements. PipeWire - Fix some missing includes in metadata.h - Pass the current error in errno when a stream is in error (#4574) modules - Evaluate node rules before loading adapter follower to ensure properties are set correctly. (#4562) SPA - Avoid a use after free when building PODs. (#4445) - Take headroom into account when calculating resync. Bluetooth - Fix +CLCC parsing. GStreamer - Notify about default device changes in deviceprovider. - Copy frames between pools and avoid splitting video buffers. JACK - Add an option to disable the MIDI2 port flags. (#4584) Older versions: PipeWire 1.3.83 (2025-02-20) This is the third and hopefully last 1.4 release candidate that is (almost) API and (entirely) ABI compatible with previous 1.2.x and 1.0.x releases. We note that in the 1.3.x series, the API is slighty not backwards compatible because some methods previously used to accept void* as a parameter while they now require the correct type. We think this is however a good kind of API breakage and expect projects to patch their code to get things compiled with newer version (which will also compile for older versions). Note also that this is not an ABI break. - Handle JACK transport updates in a better way. - Fix a SAP regression when starting. - Fix regression in rate scaling. - Improve bluetooth source rate handling. - More small bugfixes and improvements. - Handle JACK transport updates in a better way. (#4543) - Check that the link factory port and nodes match. Deprecate the port.id when making links. - Improve profiler output by scaling the quantum with the node rate so that we don't end up with confusing information. (#4555) - Fix sending of the SAP SDP. Handle some SDP parsing errors. - Add some more options to the ROC source module. (#4516) - Fix firewire quirks in udev rules. (#4528) - Fix a bug in the rate scaling in some cases that would make things run with the wrong samplerate. - Improve introspection of control types. - Use the G722 codec from Android instead of FFmpeg for ASHA. - Use the A2DP source rate as the graph rate. (#4555) - Specify the bluetooth source latency property in the rate of the stream to avoid conversions and rounding errors. This is the second 1.4 release candidate that is API and ABI compatible with previous 1.2.x and 1.0.x releases. - Various pw-stream improvements: timing information fixes, avoid locking buffers in some cases and an improved drain event. - A new Telephony D-BUS API compatible with ofono. - Documentation fixes and updates. - More small fixes and improvements. - Improve timing information when rate is unknown. - Avoid locked buffers in pw_stream in some cases. - Improve pw_stream drain event emission. - Improve manager socket handling. Applications can avoid hardcoding the sockets so that they will respect the config settings. - Fix header size calculation when using ipv6. (#4524) - Optimize byteswapped s16 conversions. - Improve event handling for internal events. - Optimize negiotiation when in convert mode, prefer the format of the follower in adapter. - Fix EnumPortConfig for videoadapter without converter. - Fix libcamera property buffer size. - Add systemwide systemd files. - Add a UMP example. - Use the new JackPortMIDI2 flag to mark UMP ports to JACK. - Support BAP hardware volume. - Add a Telephony DBUS API. - Disable buffer pools for audio by default. - Improve the module documentation. This is the first 1.4 release candidate that is API and ABI compatible with previous 1.2.x and 1.0.x releases. In addition to all the changes backported to 1.2.x, this release also contains some new features: - UMP support was added with MIDI 1.0 and MIDI 2.0 support in the ALSA sequencer plugin. By default PipeWire will now use MIDI 2.0 in UMP messages to transport MIDI in the graph, with conversions to/from legacy MIDI where required. This requires UMP support in the kernel. - client-rt.conf is no longer supported. Custom changes made to this config should be moved to client.conf. Clients that try to load the client-rt.conf will emit a warning and be directed to client.conf automatically for backwards compatibility. - The module-filter-chain code was moved to a new filter-graph plugin. This made it possible to add filter-graph support directly in audioconvert. It is now possible to run up to 8 run-time swappable filter-graphs inside streams and nodes. This should make it easier to add effects to streams and device nodes. - Bluetooth support for BAP broadcast links and support for hearing aids using ASHA was added. - Many more bugfixes and improvements. - Nodes are now only scheduled when ready to signal the driver. - Add slovenian translation. (#4156) - Link errors are handled better. - The videoadapter is now enabled by default but no videoconverter is loaded yet by default. - Streams now have support for ProcessLatency. - Streams now have a method to emit events. - The RequestProcess event and command can now pass around extra properties. - Local timestamps are now used for logging. - client-rt.conf is no longer supported. Custom changes made to this config should be moved to client.conf. Clients that try to load the client-rt.conf will emit a warning and be directed to cliert.conf automatically to preserve backwards compatibility. - pw_stream now has an API to return unused buffers. - module-combine-stream can now mix streams. - Links in error are now destroyed by link-factory. - The netjack2 driver can now also create streams that autoconnect when specified. (#4125) - Many updates and bugfixes to the RTP modules. - The netjack2 driver can now bind to a custom IP and port pair. (#4144) - The loopback module and module-raop have support for ProcessLatency, which can be used to query and update the latency. - The profiler module can now reduce the sampling rate. - The filter-chain was optimized some more. - The filter-chain gained some more plugins: param_eq, ebur128, dcblock. - Support for fftw based convolver was added. - Some module arguments can now be overridden. - The VBAN receiver now creates new streams per stream name. (#4400) - The RTP SAP module is now smarter with generating new SAP messages. - The RTP source can now be paused when no data is received. (#4456) - pw-cat can now stream most formats from stdin/stdout. - pw-profiler has a JSON dump option to dump the raw profiler data. - pw-cli now supports unload-module. (#4276) - The resampler can precompute some common coeficients now at compile time. - UMP support was added with MIDI 1.0 and MIDI 2.0 support in the ALSA sequencer plugin. By default PipeWire will now use MIDI 2.0 in UMP messages to transport MIDI in the graph, with conversions to/from legacy MIDI where required. - Control types can now be negotiated. - Support for writing ALSA bind controls was added. - The ALSA sequencer now has better names for the ports. - The F32 to S32 conversion now uses 25 bits for an extra bit of precision. - libcamera controls can now be set in all cases. - The videoadapter has been improved and a dummy and ffmpeg based videoconverter plugin was added. - Negotiation was improved in audioadapter. First a passthrough format is tried. - Some JSON helper functions were added and some duplicate code removed or simplified. - Add support for RISC V CPU detection and add many optimizations in the audio converters. - Add an option to disable ALSA mixer path select. (#4311) - Fix a potential bug with the cleanup of the loop queues. - ALSA nodes now dynamically adjust the DLL bandwidth based on average measured variance. - The loop invoke queue was made more efficient and make it possible to invoke from multiple threads. - The filter-chain code was moved to a new filter-graph plugin. - Most function macros are now static inlined and can also be built into a libspa.so file. This should improve language bindings. - V4l2 clock information was improved. - Supported IEC958 codecs are now autodetected via ELD info. - Audioconvert was optimized some more. - Audioconvert can now include filter-graphs in its processing. - webrtc-audio-processing-2 is now supported in AEC. - The resampler now reports the delay and subsample delay. Also the delay is reported in the samplerate of the input. - The ALSA sequencer now handle kernels without UMP support. (#4507) - Add quirk to block clients from making record and playback streams. - The corked state is now set on stream to always report this state correctly to other clients. - Readiness notification was added to the pulse server with the PIPEWIRE_PULSE_NOTIFICATION_FD environment variable. (#4347) - The pulse.cmd config now supports conditions. - A bug in clearing the ringbuffer was fixed. (#4464) - Support for the default devices was added to the deviceprovider. (#4268) - The graph clock is now used as the source for the GStreamer clock. - The sink now does some rate control. - The ALSA plugin now supports DSD when explicitly enabled. - JACK now supports 2 new extension formats for OSC and UMP. - JACK clients can receive UMP MIDI1 or MIDI2 messages when using the new UMP port format extension. - JACK now reports the PipeWire version in the minor/micro/proto. - Implement more jackserver functions. - Support BAP broadcast links. - Support for ASHA was added. - Delay reporting in A2DP sources was improved. - 2 new examples of pw-stream using spa_ringbuffer were added. - Many updates to the man pages. - More documentation about thread safety of functions in stream and filters. (#4521) Signed-off-by: Markus Volk Signed-off-by: Khem Raj --- .../0ca64277b317b4836beccaa3248ab9055526811c.patch | 46 --- .../recipes-multimedia/pipewire/pipewire_1.2.7.bb | 399 --------------------- .../recipes-multimedia/pipewire/pipewire_1.4.0.bb | 399 +++++++++++++++++++++ 3 files changed, 399 insertions(+), 445 deletions(-) delete mode 100644 meta-multimedia/recipes-multimedia/pipewire/files/0ca64277b317b4836beccaa3248ab9055526811c.patch delete mode 100644 meta-multimedia/recipes-multimedia/pipewire/pipewire_1.2.7.bb create mode 100644 meta-multimedia/recipes-multimedia/pipewire/pipewire_1.4.0.bb diff --git a/meta-multimedia/recipes-multimedia/pipewire/files/0ca64277b317b4836beccaa3248ab9055526811c.patch b/meta-multimedia/recipes-multimedia/pipewire/files/0ca64277b317b4836beccaa3248ab9055526811c.patch deleted file mode 100644 index 9b05e9e4c3..0000000000 --- a/meta-multimedia/recipes-multimedia/pipewire/files/0ca64277b317b4836beccaa3248ab9055526811c.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 0ca64277b317b4836beccaa3248ab9055526811c Mon Sep 17 00:00:00 2001 -From: Wim Taymans -Date: Mon, 30 Sep 2024 10:06:30 +0200 -Subject: [PATCH] spa: initialize all fields explicitly - -Patch by Petar Popovic - -Fixes #4325 - -Upstream-Status: Backport [https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/0ca64277b317b4836beccaa3248ab9055526811c] - -Signed-off-by: Markus Volk ---- - spa/include/spa/pod/builder.h | 2 +- - spa/include/spa/pod/parser.h | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/spa/include/spa/pod/builder.h b/spa/include/spa/pod/builder.h -index 0564d94ea2..6d3e9d54af 100644 ---- a/spa/include/spa/pod/builder.h -+++ b/spa/include/spa/pod/builder.h -@@ -49,7 +49,7 @@ struct spa_pod_builder { - struct spa_callbacks callbacks; - }; - --#define SPA_POD_BUILDER_INIT(buffer,size) ((struct spa_pod_builder){ (buffer), (size), 0, {0}, {0} }) -+#define SPA_POD_BUILDER_INIT(buffer,size) ((struct spa_pod_builder){ (buffer), (size), 0, {0,0,NULL},{NULL,NULL}}) - - static inline void - spa_pod_builder_get_state(struct spa_pod_builder *builder, struct spa_pod_builder_state *state) -diff --git a/spa/include/spa/pod/parser.h b/spa/include/spa/pod/parser.h -index 083f911713..4c1e72acce 100644 ---- a/spa/include/spa/pod/parser.h -+++ b/spa/include/spa/pod/parser.h -@@ -33,7 +33,7 @@ struct spa_pod_parser { - struct spa_pod_parser_state state; - }; - --#define SPA_POD_PARSER_INIT(buffer,size) ((struct spa_pod_parser){ (buffer), (size), 0, {0} }) -+#define SPA_POD_PARSER_INIT(buffer,size) ((struct spa_pod_parser){ (buffer), (size), 0, {0,0,NULL}}) - - static inline void spa_pod_parser_init(struct spa_pod_parser *parser, - const void *data, uint32_t size) --- -GitLab - diff --git a/meta-multimedia/recipes-multimedia/pipewire/pipewire_1.2.7.bb b/meta-multimedia/recipes-multimedia/pipewire/pipewire_1.2.7.bb deleted file mode 100644 index 8c486b9c5e..0000000000 --- a/meta-multimedia/recipes-multimedia/pipewire/pipewire_1.2.7.bb +++ /dev/null @@ -1,399 +0,0 @@ -SUMMARY = "Multimedia processing server for Linux" -DESCRIPTION = "Linux server for handling and routing audio and video streams between applications and multimedia I/O devices" -HOMEPAGE = "https://pipewire.org/" -BUGTRACKER = "https://gitlab.freedesktop.org/pipewire/pipewire/issues" -SECTION = "multimedia" - -LICENSE = "MIT & LGPL-2.1-or-later & GPL-2.0-only" -LIC_FILES_CHKSUM = " \ - file://LICENSE;md5=2158739e172e58dc9ab1bdd2d6ec9c72 \ - file://COPYING;md5=97be96ca4fab23e9657ffa590b931c1a \ -" - -DEPENDS = "dbus ncurses" - -SRCREV = "cc7439187f61dd73b81ca69f5dbccbb52ce970b2" -SRC_URI = "git://gitlab.freedesktop.org/pipewire/pipewire.git;branch=1.2;protocol=https" -SRC_URI += "file://0ca64277b317b4836beccaa3248ab9055526811c.patch" - -S = "${WORKDIR}/git" - -inherit meson pkgconfig systemd gettext useradd - -USERADD_PACKAGES = "${PN}" - -GROUPADD_PARAM:${PN} = "--system pipewire" - -USERADD_PARAM:${PN} = "--system --home / --no-create-home \ - --comment 'PipeWire multimedia daemon' \ - --gid pipewire --groups audio,video \ - pipewire" - -SYSTEMD_PACKAGES = "${PN}" - -# For "EVL", look up https://evlproject.org/ . It involves -# a specially prepared kernel, and is currently unavailable -# in Yocto. -# -# -# manpage generation requires xmltoman, which is not available. -# -# The session-managers list specifies which session managers Meson -# shall download (via git clone) and build as subprojects. In OE, -# this is not how a session manager should be built. Instead, they -# should be integrated as separate OE recipes. To prevent PipeWire -# from using this Meson feature, set an empty list. -# This does not disable support or the need for session managers, -# it just prevents this subproject feature. -# -# AptX and LDAC are not available in OE. Currently, neither -# are lv2, ROC, and libmysofa. -# -# The RTKit module is deprecated in favor of the newer RT module. -# It still exists for legacy setups that still include it in -# their PipeWire configuration files. -EXTRA_OEMESON += " \ - -Devl=disabled \ - -Dtests=disabled \ - -Dudevrulesdir=${nonarch_base_libdir}/udev/rules.d/ \ - -Dsystemd-system-unit-dir=${systemd_system_unitdir} \ - -Dsystemd-user-unit-dir=${systemd_user_unitdir} \ - -Dman=disabled \ - -Dsession-managers='[]' \ - -Dlv2=disabled \ - -Droc=disabled \ - -Dbluez5-codec-aptx=disabled \ - -Dbluez5-codec-ldac=disabled \ - -Dlegacy-rtkit=false \ - -Dlibmysofa=disabled \ -" - -# spa alsa plugin code uses typedef redefinition, which is officially a C11 feature. -# Pipewire builds with 'c_std=gnu99' by default. Recent versions of gcc don't issue this warning in gnu99 -# mode but it looks like clang still does -CFLAGS:append = " -Wno-typedef-redefinition" - -# Specify linking with -latomic on architectures missing 64bit atomics. -LDFLAGS += "${@bb.utils.contains_any('TUNE_FEATURES', 'riscv32 armv5 mips ppc32 m32', '-latomic', '', d)}" - -# According to wireplumber documentation only one session manager should be installed at a time -# Possible options are media-session, which has fewer dependencies but is very simple, -# or wireplumber, which is more powerful. -PIPEWIRE_SESSION_MANAGER ??= "wireplumber" - -FFMPEG_AVAILABLE = "${@bb.utils.contains('LICENSE_FLAGS_ACCEPTED', 'commercial', 'ffmpeg', '', d)}" -BLUETOOTH_AAC = "${@bb.utils.contains('LICENSE_FLAGS_ACCEPTED', 'commercial', 'bluez-aac', '', d)}" - -PACKAGECONFIG:class-target ??= " \ - ${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez bluez-opus ${BLUETOOTH_AAC}', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd systemd-system-service systemd-user-service', '', d)} \ - ${@bb.utils.filter('DISTRO_FEATURES', 'alsa vulkan pulseaudio', d)} \ - ${PIPEWIRE_SESSION_MANAGER} \ - ${FFMPEG_AVAILABLE} avahi flatpak gstreamer gsettings jack libusb pw-cat raop sndfile v4l2 udev volume webrtc-echo-cancelling libcamera readline \ -" - -# "jack" and "pipewire-jack" packageconfigs cannot be both enabled, -# since "jack" imports libjack, and "pipewire-jack" generates -# libjack.so* files, thus colliding with the libpack package. This -# is why these two are marked in their respective packageconfigs -# as being in conflict. -PACKAGECONFIG[alsa] = "-Dalsa=enabled,-Dalsa=disabled,alsa-lib udev,,pipewire-alsa pipewire-alsa-card-profile" -PACKAGECONFIG[avahi] = "-Davahi=enabled,-Davahi=disabled,avahi" -PACKAGECONFIG[bluez] = "-Dbluez5=enabled,-Dbluez5=disabled,bluez5 sbc glib-2.0-native" -PACKAGECONFIG[bluez-aac] = "-Dbluez5-codec-aac=enabled,-Dbluez5-codec-aac=disabled,fdk-aac" -PACKAGECONFIG[bluez-opus] = "-Dbluez5-codec-opus=enabled,-Dbluez5-codec-opus=disabled,libopus" -PACKAGECONFIG[bluez-lc3] = "-Dbluez5-codec-lc3=enabled,-Dbluez5-codec-lc3=disabled,liblc3" -# From the pipewire git log: -# "Some Linux phones doesn't use oFono but ModemManager to control the modem." -# This packageconfig enables modemmanager specific code in the BlueZ backend. -PACKAGECONFIG[bluez-backend-native-mm] = "-Dbluez5-backend-native-mm=enabled,-Dbluez5-backend-native-mm=disabled,modemmanager" -PACKAGECONFIG[docs] = "-Ddocs=enabled,-Ddocs=disabled,doxygen-native graphviz-native" -PACKAGECONFIG[ffmpeg] = "-Dffmpeg=enabled,-Dffmpeg=disabled,ffmpeg" -PACKAGECONFIG[flatpak] = "-Dflatpak=enabled,-Dflatpak=disabled,glib-2.0" -PACKAGECONFIG[gsettings] = "-Dgsettings=enabled,-Dgsettings=disabled,glib-2.0" -PACKAGECONFIG[gstreamer] = "-Dgstreamer=enabled,-Dgstreamer=disabled,glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base,,gstreamer1.0-pipewire" -PACKAGECONFIG[jack] = "-Djack=enabled,-Djack=disabled,jack,,,pipewire-jack" -PACKAGECONFIG[libcamera] = "-Dlibcamera=enabled,-Dlibcamera=disabled,libcamera libdrm" -PACKAGECONFIG[libcanberra] = "-Dlibcanberra=enabled,-Dlibcanberra=disabled,libcanberra" -PACKAGECONFIG[libusb] = "-Dlibusb=enabled,-Dlibusb=disabled,libusb" -PACKAGECONFIG[media-session] = ",,,pipewire-media-session,,wireplumber" -PACKAGECONFIG[pulseaudio] = "-Dlibpulse=enabled,-Dlibpulse=disabled,pulseaudio,,pipewire-pulse" -PACKAGECONFIG[pipewire-alsa] = "-Dpipewire-alsa=enabled,-Dpipewire-alsa=disabled,alsa-lib" -PACKAGECONFIG[pipewire-jack] = "-Dpipewire-jack=enabled -Dlibjack-path=${libdir}/${PW_MODULE_SUBDIR}/jack,-Dpipewire-jack=disabled,jack,,pipewire-jack,jack" -PACKAGECONFIG[pw-cat] = "-Dpw-cat=enabled,-Dpw-cat=disabled" -PACKAGECONFIG[raop] = "-Draop=enabled,-Draop=disabled,openssl" -# Starting with version 0.3.60, readline usage can be turned off in pw-cli. -# If it is disabled, getline() is used as a fallback. -PACKAGECONFIG[readline] = "-Dreadline=enabled,-Dreadline=disabled,readline" -PACKAGECONFIG[sdl2] = "-Dsdl2=enabled,-Dsdl2=disabled,libsdl2" -PACKAGECONFIG[sndfile] = "-Dsndfile=enabled,-Dsndfile=disabled,libsndfile1" -PACKAGECONFIG[systemd] = "-Dsystemd=enabled,-Dsystemd=disabled,systemd" -PACKAGECONFIG[systemd-system-service] = "-Dsystemd-system-service=enabled,-Dsystemd-system-service=disabled,systemd" -# "systemd-user-service" packageconfig will only install service -# files to rootfs but not enable them as systemd.bbclass -# currently lacks the feature of enabling user services. -PACKAGECONFIG[systemd-user-service] = "-Dsystemd-user-service=enabled,-Dsystemd-user-service=disabled,systemd" -# pw-cat needs sndfile packageconfig to be enabled -PACKAGECONFIG[udev] = "-Dudev=enabled,-Dudev=disabled,udev" -PACKAGECONFIG[v4l2] = "-Dv4l2=enabled,-Dv4l2=disabled,udev" -PACKAGECONFIG[volume] = "-Dvolume=enabled,-Dvolume=disabled" -PACKAGECONFIG[vulkan] = "-Dvulkan=enabled,-Dvulkan=disabled,vulkan-headers vulkan-loader" -PACKAGECONFIG[webrtc-echo-cancelling] = "-Decho-cancel-webrtc=enabled,-Decho-cancel-webrtc=disabled,webrtc-audio-processing-1" -PACKAGECONFIG[wireplumber] = ",,,wireplumber,,media-session" - -PACKAGESPLITFUNCS:prepend = " split_dynamic_packages " -PACKAGESPLITFUNCS:append = " set_dynamic_metapkg_rdepends " - -SPA_SUBDIR = "spa-0.2" -PW_MODULE_SUBDIR = "pipewire-0.3" - -remove_unused_installed_files() { - # jack.conf is used by pipewire-jack (not the JACK SPA plugin). - # Remove it if pipewire-jack is not built to avoid creating the - # pipewire-jack package. - if ${@bb.utils.contains('PACKAGECONFIG', 'pipewire-jack', 'false', 'true', d)}; then - rm -f "${D}${datadir}/pipewire/jack.conf" - fi - - # minimal.conf is an example of how to minimally configure the - # daemon and is not meant to be used for production. - rm -f "${D}${datadir}/pipewire/minimal.conf" -} - -do_install[postfuncs] += "remove_unused_installed_files" - -python split_dynamic_packages () { - # Create packages for each SPA plugin. These plugins are located - # in individual subdirectories, so a recursive search is needed. - spa_libdir = d.expand('${libdir}/${SPA_SUBDIR}') - do_split_packages(d, spa_libdir, r'^libspa-(.*)\.so$', d.expand('${PN}-spa-plugins-%s'), 'PipeWire SPA plugin for %s', extra_depends='', recursive=True) - - # Create packages for each PipeWire module. - pw_module_libdir = d.expand('${libdir}/${PW_MODULE_SUBDIR}') - do_split_packages(d, pw_module_libdir, r'^libpipewire-module-(.*)\.so$', d.expand('${PN}-modules-%s'), 'PipeWire %s module', extra_depends='', recursive=False) -} - -python set_dynamic_metapkg_rdepends () { - import os - import oe.utils - - if bb.data.inherits_class('nativesdk', d) or bb.data.inherits_class('native', d): - return - - # Go through all generated SPA plugin and PipeWire module packages - # (excluding the main package and the -meta package itself) and - # add them to the -meta package as RDEPENDS. - - base_pn = d.getVar('PN') - - spa_pn = base_pn + '-spa-plugins' - spa_metapkg = spa_pn + '-meta' - - pw_module_pn = base_pn + '-modules' - pw_module_metapkg = pw_module_pn + '-meta' - - d.setVar('ALLOW_EMPTY:' + spa_metapkg, "1") - d.setVar('FILES:' + spa_metapkg, "") - - d.setVar('ALLOW_EMPTY:' + pw_module_metapkg, "1") - d.setVar('FILES:' + pw_module_metapkg, "") - - blacklist = [ spa_pn, spa_metapkg, pw_module_pn, pw_module_metapkg ] - spa_metapkg_rdepends = [] - pw_module_metapkg_rdepends = [] - pkgdest = d.getVar('PKGDEST') - - for pkg in oe.utils.packages_filter_out_system(d): - if pkg in blacklist: - continue - - is_spa_pkg = pkg.startswith(spa_pn) - is_pw_module_pkg = pkg.startswith(pw_module_pn) - if not is_spa_pkg and not is_pw_module_pkg: - continue - - if pkg in spa_metapkg_rdepends or pkg in pw_module_metapkg_rdepends: - continue - - # See if the package is empty by looking at the contents of its - # PKGDEST subdirectory. If this subdirectory is empty, then then - # package is empty as well. Empty packages do not get added to - # the meta package's RDEPENDS. - pkgdir = os.path.join(pkgdest, pkg) - if os.path.exists(pkgdir): - dir_contents = os.listdir(pkgdir) or [] - else: - dir_contents = [] - is_empty = len(dir_contents) == 0 - if not is_empty: - if is_spa_pkg: - spa_metapkg_rdepends.append(pkg) - if is_pw_module_pkg: - pw_module_metapkg_rdepends.append(pkg) - - d.setVar('RDEPENDS:' + spa_metapkg, ' '.join(spa_metapkg_rdepends)) - d.setVar('DESCRIPTION:' + spa_metapkg, spa_pn + ' meta package') - - d.setVar('RDEPENDS:' + pw_module_metapkg, ' '.join(pw_module_metapkg_rdepends)) - d.setVar('DESCRIPTION:' + pw_module_metapkg, pw_module_pn + ' meta package') -} - -PACKAGES =+ "\ - libpipewire \ - ${PN}-tools \ - ${PN}-pulse \ - ${PN}-alsa \ - ${PN}-jack \ - ${PN}-spa-plugins \ - ${PN}-spa-plugins-meta \ - ${PN}-spa-tools \ - ${PN}-modules \ - ${PN}-modules-meta \ - ${PN}-alsa-card-profile \ - ${PN}-v4l2 \ - ${PN}-aes67 \ - gstreamer1.0-pipewire \ -" - -PACKAGES_DYNAMIC = "^${PN}-spa-plugins.* ^${PN}-modules.*" -PACKAGES_DYNAMIC:class-native = "" - -SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'systemd-system-service', 'pipewire.service', '', d)}" -CONFFILES:${PN} += "${datadir}/pipewire/pipewire.conf" -FILES:${PN} = " \ - ${datadir}/pipewire \ - ${systemd_system_unitdir}/pipewire* \ - ${systemd_user_unitdir} \ - ${bindir}/pipewire \ - ${bindir}/pipewire-avb \ - ${bindir}/pipewire-vulkan \ -" - -RRECOMMENDS:${PN}:class-target += " \ - pipewire-modules-meta \ - pipewire-spa-plugins-meta \ -" - -FILES:${PN}-dev += " \ - ${libdir}/${PW_MODULE_SUBDIR}/jack/libjack*.so \ -" - -CONFFILES:libpipewire += "${datadir}/pipewire/client.conf" -FILES:libpipewire = " \ - ${datadir}/pipewire/client.conf \ - ${libdir}/libpipewire-*.so.* \ -" -# Add the bare minimum modules and plugins required to be able -# to use libpipewire. Without these, it is essentially unusable. -RDEPENDS:libpipewire += " \ - ${PN}-modules-client-node \ - ${PN}-modules-protocol-native \ - ${PN}-spa-plugins-support \ -" - -FILES:${PN}-tools = " \ - ${bindir}/pw-cat \ - ${bindir}/pw-cli \ - ${bindir}/pw-config \ - ${bindir}/pw-container \ - ${bindir}/pw-dot \ - ${bindir}/pw-dsdplay \ - ${bindir}/pw-dump \ - ${bindir}/pw-encplay \ - ${bindir}/pw-link \ - ${bindir}/pw-loopback \ - ${bindir}/pw-metadata \ - ${bindir}/pw-mididump \ - ${bindir}/pw-midiplay \ - ${bindir}/pw-midirecord \ - ${bindir}/pw-mon \ - ${bindir}/pw-play \ - ${bindir}/pw-profiler \ - ${bindir}/pw-record \ - ${bindir}/pw-reserve \ - ${bindir}/pw-top \ -" - -# This is a shim daemon that is intended to be used as a -# drop-in PulseAudio replacement, providing a pulseaudio-compatible -# socket that can be used by applications that use libpulse. -CONFFILES:${PN}-pulse += "${datadir}/pipewire/pipewire-pulse.conf" -FILES:${PN}-pulse = " \ - ${datadir}/pipewire/pipewire-pulse.conf \ - ${systemd_system_unitdir}/pipewire-pulse.* \ - ${systemd_user_unitdir}/pipewire-pulse.* \ - ${bindir}/pipewire-pulse \ -" -RDEPENDS:${PN}-pulse += " \ - ${PN}-modules-protocol-pulse \ -" - -# ALSA plugin to redirect audio to pipewire. -FILES:${PN}-alsa = "\ - ${libdir}/alsa-lib/* \ - ${datadir}/alsa/alsa.conf.d/* \ -" - -# JACK drop-in libraries to redirect audio to pipewire. -CONFFILES:${PN}-jack = "${datadir}/pipewire/jack.conf" -FILES:${PN}-jack = "\ - ${bindir}/pw-jack \ - ${datadir}/pipewire/jack.conf \ - ${libdir}/${PW_MODULE_SUBDIR}/jack/libjack*.so.* \ -" - -# Dynamic SPA plugin packages (see set_dynamic_metapkg_rdepends). -FILES:${PN}-spa-plugins = "" -RRECOMMENDS:${PN}-spa-plugins += "${PN}-spa-plugins-meta" - -FILES:${PN}-spa-plugins-bluez5 += " \ - ${datadir}/${SPA_SUBDIR}/bluez5/* \ -" - -FILES:${PN}-spa-tools = " \ - ${bindir}/spa-* \ -" - -# Dynamic PipeWire module packages (see set_dynamic_metapkg_rdepends). -FILES:${PN}-modules = "" -RRECOMMENDS:${PN}-modules += "${PN}-modules-meta" - -CONFFILES:${PN}-modules-rt = "${datadir}/pipewire/client-rt.conf" -FILES:${PN}-modules-rt += " \ - ${datadir}/pipewire/client-rt.conf \ - ${sysconfdir}/security/limits.d/* \ - " - -CONFFILES:${PN}-modules-filter-chain = "${datadir}/pipewire/filter-chain/*" -FILES:${PN}-modules-filter-chain += " \ - ${datadir}/pipewire/filter-chain/* \ -" - -FILES:${PN}-alsa-card-profile = " \ - ${datadir}/alsa-card-profile/* \ - ${nonarch_base_libdir}/udev/rules.d/90-pipewire-alsa.rules \ -" - -# V4L2 interface emulator for sending/receiving data between PipeWire and V4L2 applications. -FILES:${PN}-v4l2 += " \ - ${bindir}/pw-v4l2 \ - ${libdir}/${PW_MODULE_SUBDIR}/v4l2/libpw-v4l2.so \ -" - -# AES67 is a standard for audio over IP, from the Audio Engineering Society (AES). -FILES:${PN}-aes67 += " \ - ${bindir}/pipewire-aes67 \ -" - -FILES:gstreamer1.0-pipewire = " \ - ${libdir}/gstreamer-1.0/* \ -" - -BBCLASSEXTEND = "native nativesdk" - -do_install:append() { - if ls ${D}${datadir}/doc/pipewire/html/dir_*html; then - sed -i "s,${WORKDIR},,g" ${D}${datadir}/doc/pipewire/html/dir_*html - fi -} diff --git a/meta-multimedia/recipes-multimedia/pipewire/pipewire_1.4.0.bb b/meta-multimedia/recipes-multimedia/pipewire/pipewire_1.4.0.bb new file mode 100644 index 0000000000..d897ddb25d --- /dev/null +++ b/meta-multimedia/recipes-multimedia/pipewire/pipewire_1.4.0.bb @@ -0,0 +1,399 @@ +SUMMARY = "Multimedia processing server for Linux" +DESCRIPTION = "Linux server for handling and routing audio and video streams between applications and multimedia I/O devices" +HOMEPAGE = "https://pipewire.org/" +BUGTRACKER = "https://gitlab.freedesktop.org/pipewire/pipewire/issues" +SECTION = "multimedia" + +LICENSE = "MIT & LGPL-2.1-or-later & GPL-2.0-only" +LIC_FILES_CHKSUM = " \ + file://LICENSE;md5=2158739e172e58dc9ab1bdd2d6ec9c72 \ + file://COPYING;md5=97be96ca4fab23e9657ffa590b931c1a \ +" + +DEPENDS = "dbus ncurses" + +SRCREV = "df1c36aec2aaf9e2eb1596b6b55e72c15fb2088a" +SRC_URI = "git://gitlab.freedesktop.org/pipewire/pipewire.git;branch=master;protocol=https" + +S = "${WORKDIR}/git" + +inherit meson pkgconfig systemd gettext useradd + +USERADD_PACKAGES = "${PN}" + +GROUPADD_PARAM:${PN} = "--system pipewire" + +USERADD_PARAM:${PN} = "--system --home / --no-create-home \ + --comment 'PipeWire multimedia daemon' \ + --gid pipewire --groups audio,video \ + pipewire" + +SYSTEMD_PACKAGES = "${PN}" + +# For "EVL", look up https://evlproject.org/ . It involves +# a specially prepared kernel, and is currently unavailable +# in Yocto. +# +# +# manpage generation requires xmltoman, which is not available. +# +# The session-managers list specifies which session managers Meson +# shall download (via git clone) and build as subprojects. In OE, +# this is not how a session manager should be built. Instead, they +# should be integrated as separate OE recipes. To prevent PipeWire +# from using this Meson feature, set an empty list. +# This does not disable support or the need for session managers, +# it just prevents this subproject feature. +# +# AptX and LDAC are not available in OE. Currently, neither +# are lv2, ROC, and libmysofa. +# +# The RTKit module is deprecated in favor of the newer RT module. +# It still exists for legacy setups that still include it in +# their PipeWire configuration files. +EXTRA_OEMESON += " \ + -Devl=disabled \ + -Dtests=disabled \ + -Dudevrulesdir=${nonarch_base_libdir}/udev/rules.d/ \ + -Dsystemd-system-unit-dir=${systemd_system_unitdir} \ + -Dsystemd-user-unit-dir=${systemd_user_unitdir} \ + -Dman=disabled \ + -Dsession-managers='[]' \ + -Dlv2=disabled \ + -Droc=disabled \ + -Dbluez5-codec-aptx=disabled \ + -Dbluez5-codec-ldac=disabled \ + -Dlegacy-rtkit=false \ + -Dlibmysofa=disabled \ +" + +# spa alsa plugin code uses typedef redefinition, which is officially a C11 feature. +# Pipewire builds with 'c_std=gnu99' by default. Recent versions of gcc don't issue this warning in gnu99 +# mode but it looks like clang still does +CFLAGS:append = " -Wno-typedef-redefinition" + +# Specify linking with -latomic on architectures missing 64bit atomics. +LDFLAGS += "${@bb.utils.contains_any('TUNE_FEATURES', 'riscv32 armv5 mips ppc32 m32', '-latomic', '', d)}" + +# According to wireplumber documentation only one session manager should be installed at a time +# Possible options are media-session, which has fewer dependencies but is very simple, +# or wireplumber, which is more powerful. +PIPEWIRE_SESSION_MANAGER ??= "wireplumber" + +FFMPEG_AVAILABLE = "${@bb.utils.contains('LICENSE_FLAGS_ACCEPTED', 'commercial', 'ffmpeg', '', d)}" +BLUETOOTH_AAC = "${@bb.utils.contains('LICENSE_FLAGS_ACCEPTED', 'commercial', 'bluez-aac', '', d)}" + +PACKAGECONFIG:class-target ??= " \ + ${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez bluez-opus ${BLUETOOTH_AAC}', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd systemd-system-service systemd-user-service', '', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'alsa vulkan pulseaudio', d)} \ + ${PIPEWIRE_SESSION_MANAGER} \ + ${FFMPEG_AVAILABLE} avahi flatpak gstreamer gsettings jack libusb pw-cat raop sndfile v4l2 udev volume webrtc-echo-cancelling libcamera readline \ +" + +# "jack" and "pipewire-jack" packageconfigs cannot be both enabled, +# since "jack" imports libjack, and "pipewire-jack" generates +# libjack.so* files, thus colliding with the libpack package. This +# is why these two are marked in their respective packageconfigs +# as being in conflict. +PACKAGECONFIG[alsa] = "-Dalsa=enabled,-Dalsa=disabled,alsa-lib udev,,pipewire-alsa pipewire-alsa-card-profile" +PACKAGECONFIG[avahi] = "-Davahi=enabled,-Davahi=disabled,avahi" +PACKAGECONFIG[bluez] = "-Dbluez5=enabled,-Dbluez5=disabled,bluez5 sbc glib-2.0-native" +PACKAGECONFIG[bluez-aac] = "-Dbluez5-codec-aac=enabled,-Dbluez5-codec-aac=disabled,fdk-aac" +PACKAGECONFIG[bluez-opus] = "-Dbluez5-codec-opus=enabled,-Dbluez5-codec-opus=disabled,libopus" +PACKAGECONFIG[bluez-lc3] = "-Dbluez5-codec-lc3=enabled,-Dbluez5-codec-lc3=disabled,liblc3" +# From the pipewire git log: +# "Some Linux phones doesn't use oFono but ModemManager to control the modem." +# This packageconfig enables modemmanager specific code in the BlueZ backend. +PACKAGECONFIG[bluez-backend-native-mm] = "-Dbluez5-backend-native-mm=enabled,-Dbluez5-backend-native-mm=disabled,modemmanager" +PACKAGECONFIG[docs] = "-Ddocs=enabled,-Ddocs=disabled,doxygen-native graphviz-native" +PACKAGECONFIG[ffmpeg] = "-Dffmpeg=enabled,-Dffmpeg=disabled,ffmpeg" +PACKAGECONFIG[flatpak] = "-Dflatpak=enabled,-Dflatpak=disabled,glib-2.0" +PACKAGECONFIG[gsettings] = "-Dgsettings=enabled,-Dgsettings=disabled,glib-2.0" +PACKAGECONFIG[gstreamer] = "-Dgstreamer=enabled,-Dgstreamer=disabled,glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base,,gstreamer1.0-pipewire" +PACKAGECONFIG[jack] = "-Djack=enabled,-Djack=disabled,jack,,,pipewire-jack" +PACKAGECONFIG[libcamera] = "-Dlibcamera=enabled,-Dlibcamera=disabled,libcamera libdrm" +PACKAGECONFIG[libcanberra] = "-Dlibcanberra=enabled,-Dlibcanberra=disabled,libcanberra" +PACKAGECONFIG[libusb] = "-Dlibusb=enabled,-Dlibusb=disabled,libusb" +PACKAGECONFIG[media-session] = ",,,pipewire-media-session,,wireplumber" +PACKAGECONFIG[pulseaudio] = "-Dlibpulse=enabled,-Dlibpulse=disabled,pulseaudio,,pipewire-pulse" +PACKAGECONFIG[pipewire-alsa] = "-Dpipewire-alsa=enabled,-Dpipewire-alsa=disabled,alsa-lib" +PACKAGECONFIG[pipewire-jack] = "-Dpipewire-jack=enabled -Dlibjack-path=${libdir}/${PW_MODULE_SUBDIR}/jack,-Dpipewire-jack=disabled,jack,,pipewire-jack,jack" +PACKAGECONFIG[pw-cat] = "-Dpw-cat=enabled,-Dpw-cat=disabled" +PACKAGECONFIG[raop] = "-Draop=enabled,-Draop=disabled,openssl" +# Starting with version 0.3.60, readline usage can be turned off in pw-cli. +# If it is disabled, getline() is used as a fallback. +PACKAGECONFIG[readline] = "-Dreadline=enabled,-Dreadline=disabled,readline" +PACKAGECONFIG[sdl2] = "-Dsdl2=enabled,-Dsdl2=disabled,libsdl2" +PACKAGECONFIG[sndfile] = "-Dsndfile=enabled,-Dsndfile=disabled,libsndfile1" +PACKAGECONFIG[systemd] = "-Dsystemd=enabled,-Dsystemd=disabled,systemd" +PACKAGECONFIG[systemd-system-service] = "-Dsystemd-system-service=enabled,-Dsystemd-system-service=disabled,systemd" +# "systemd-user-service" packageconfig will only install service +# files to rootfs but not enable them as systemd.bbclass +# currently lacks the feature of enabling user services. +PACKAGECONFIG[systemd-user-service] = "-Dsystemd-user-service=enabled,-Dsystemd-user-service=disabled,systemd" +# pw-cat needs sndfile packageconfig to be enabled +PACKAGECONFIG[udev] = "-Dudev=enabled,-Dudev=disabled,udev" +PACKAGECONFIG[v4l2] = "-Dv4l2=enabled,-Dv4l2=disabled,udev" +PACKAGECONFIG[volume] = "-Dvolume=enabled,-Dvolume=disabled" +PACKAGECONFIG[vulkan] = "-Dvulkan=enabled,-Dvulkan=disabled,vulkan-headers vulkan-loader" +PACKAGECONFIG[webrtc-echo-cancelling] = "-Decho-cancel-webrtc=enabled,-Decho-cancel-webrtc=disabled,webrtc-audio-processing-1" +PACKAGECONFIG[wireplumber] = ",,,wireplumber,,media-session" + +PACKAGESPLITFUNCS:prepend = " split_dynamic_packages " +PACKAGESPLITFUNCS:append = " set_dynamic_metapkg_rdepends " + +SPA_SUBDIR = "spa-0.2" +PW_MODULE_SUBDIR = "pipewire-0.3" + +remove_unused_installed_files() { + # jack.conf is used by pipewire-jack (not the JACK SPA plugin). + # Remove it if pipewire-jack is not built to avoid creating the + # pipewire-jack package. + if ${@bb.utils.contains('PACKAGECONFIG', 'pipewire-jack', 'false', 'true', d)}; then + rm -f "${D}${datadir}/pipewire/jack.conf" + fi + + # minimal.conf is an example of how to minimally configure the + # daemon and is not meant to be used for production. + rm -f "${D}${datadir}/pipewire/minimal.conf" +} + +do_install[postfuncs] += "remove_unused_installed_files" + +python split_dynamic_packages () { + # Create packages for each SPA plugin. These plugins are located + # in individual subdirectories, so a recursive search is needed. + spa_libdir = d.expand('${libdir}/${SPA_SUBDIR}') + do_split_packages(d, spa_libdir, r'^libspa-(.*)\.so$', d.expand('${PN}-spa-plugins-%s'), 'PipeWire SPA plugin for %s', extra_depends='', recursive=True) + + # Create packages for each PipeWire module. + pw_module_libdir = d.expand('${libdir}/${PW_MODULE_SUBDIR}') + do_split_packages(d, pw_module_libdir, r'^libpipewire-module-(.*)\.so$', d.expand('${PN}-modules-%s'), 'PipeWire %s module', extra_depends='', recursive=False) +} + +python set_dynamic_metapkg_rdepends () { + import os + import oe.utils + + if bb.data.inherits_class('nativesdk', d) or bb.data.inherits_class('native', d): + return + + # Go through all generated SPA plugin and PipeWire module packages + # (excluding the main package and the -meta package itself) and + # add them to the -meta package as RDEPENDS. + + base_pn = d.getVar('PN') + + spa_pn = base_pn + '-spa-plugins' + spa_metapkg = spa_pn + '-meta' + + pw_module_pn = base_pn + '-modules' + pw_module_metapkg = pw_module_pn + '-meta' + + d.setVar('ALLOW_EMPTY:' + spa_metapkg, "1") + d.setVar('FILES:' + spa_metapkg, "") + + d.setVar('ALLOW_EMPTY:' + pw_module_metapkg, "1") + d.setVar('FILES:' + pw_module_metapkg, "") + + blacklist = [ spa_pn, spa_metapkg, pw_module_pn, pw_module_metapkg ] + spa_metapkg_rdepends = [] + pw_module_metapkg_rdepends = [] + pkgdest = d.getVar('PKGDEST') + + for pkg in oe.utils.packages_filter_out_system(d): + if pkg in blacklist: + continue + + is_spa_pkg = pkg.startswith(spa_pn) + is_pw_module_pkg = pkg.startswith(pw_module_pn) + if not is_spa_pkg and not is_pw_module_pkg: + continue + + if pkg in spa_metapkg_rdepends or pkg in pw_module_metapkg_rdepends: + continue + + # See if the package is empty by looking at the contents of its + # PKGDEST subdirectory. If this subdirectory is empty, then then + # package is empty as well. Empty packages do not get added to + # the meta package's RDEPENDS. + pkgdir = os.path.join(pkgdest, pkg) + if os.path.exists(pkgdir): + dir_contents = os.listdir(pkgdir) or [] + else: + dir_contents = [] + is_empty = len(dir_contents) == 0 + if not is_empty: + if is_spa_pkg: + spa_metapkg_rdepends.append(pkg) + if is_pw_module_pkg: + pw_module_metapkg_rdepends.append(pkg) + + d.setVar('RDEPENDS:' + spa_metapkg, ' '.join(spa_metapkg_rdepends)) + d.setVar('DESCRIPTION:' + spa_metapkg, spa_pn + ' meta package') + + d.setVar('RDEPENDS:' + pw_module_metapkg, ' '.join(pw_module_metapkg_rdepends)) + d.setVar('DESCRIPTION:' + pw_module_metapkg, pw_module_pn + ' meta package') +} + +PACKAGES =+ "\ + libpipewire \ + ${PN}-tools \ + ${PN}-pulse \ + ${PN}-alsa \ + ${PN}-jack \ + ${PN}-spa-plugins \ + ${PN}-spa-plugins-meta \ + ${PN}-spa-tools \ + ${PN}-modules \ + ${PN}-modules-meta \ + ${PN}-alsa-card-profile \ + ${PN}-v4l2 \ + ${PN}-aes67 \ + gstreamer1.0-pipewire \ +" + +PACKAGES_DYNAMIC = "^${PN}-spa-plugins.* ^${PN}-modules.*" +PACKAGES_DYNAMIC:class-native = "" + +SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'systemd-system-service', 'pipewire.service', '', d)}" +CONFFILES:${PN} += "${datadir}/pipewire/pipewire.conf" +FILES:${PN} = " \ + ${datadir}/pipewire \ + ${systemd_system_unitdir}/pipewire* \ + ${systemd_user_unitdir} \ + ${bindir}/pipewire \ + ${bindir}/pipewire-avb \ + ${bindir}/pipewire-vulkan \ +" + +RRECOMMENDS:${PN}:class-target += " \ + pipewire-modules-meta \ + pipewire-spa-plugins-meta \ +" + +FILES:${PN}-dev += " \ + ${libdir}/${PW_MODULE_SUBDIR}/jack/libjack*.so \ +" + +CONFFILES:libpipewire += "${datadir}/pipewire/client.conf" +FILES:libpipewire = " \ + ${datadir}/pipewire/client.conf \ + ${libdir}/libpipewire-*.so.* \ + ${libdir}/${SPA_SUBDIR}/libspa.so \ +" +# Add the bare minimum modules and plugins required to be able +# to use libpipewire. Without these, it is essentially unusable. +RDEPENDS:libpipewire += " \ + ${PN}-modules-client-node \ + ${PN}-modules-protocol-native \ + ${PN}-spa-plugins-support \ +" + +FILES:${PN}-tools = " \ + ${bindir}/pw-cat \ + ${bindir}/pw-cli \ + ${bindir}/pw-config \ + ${bindir}/pw-container \ + ${bindir}/pw-dot \ + ${bindir}/pw-dsdplay \ + ${bindir}/pw-dump \ + ${bindir}/pw-encplay \ + ${bindir}/pw-link \ + ${bindir}/pw-loopback \ + ${bindir}/pw-metadata \ + ${bindir}/pw-mididump \ + ${bindir}/pw-midiplay \ + ${bindir}/pw-midirecord \ + ${bindir}/pw-mon \ + ${bindir}/pw-play \ + ${bindir}/pw-profiler \ + ${bindir}/pw-record \ + ${bindir}/pw-reserve \ + ${bindir}/pw-top \ +" + +# This is a shim daemon that is intended to be used as a +# drop-in PulseAudio replacement, providing a pulseaudio-compatible +# socket that can be used by applications that use libpulse. +CONFFILES:${PN}-pulse += "${datadir}/pipewire/pipewire-pulse.conf" +FILES:${PN}-pulse = " \ + ${datadir}/pipewire/pipewire-pulse.conf \ + ${systemd_system_unitdir}/pipewire-pulse.* \ + ${systemd_user_unitdir}/pipewire-pulse.* \ + ${bindir}/pipewire-pulse \ +" +RDEPENDS:${PN}-pulse += " \ + ${PN}-modules-protocol-pulse \ +" + +# ALSA plugin to redirect audio to pipewire. +FILES:${PN}-alsa = "\ + ${libdir}/alsa-lib/* \ + ${datadir}/alsa/alsa.conf.d/* \ +" + +# JACK drop-in libraries to redirect audio to pipewire. +CONFFILES:${PN}-jack = "${datadir}/pipewire/jack.conf" +FILES:${PN}-jack = "\ + ${bindir}/pw-jack \ + ${datadir}/pipewire/jack.conf \ + ${libdir}/${PW_MODULE_SUBDIR}/jack/libjack*.so.* \ +" + +# Dynamic SPA plugin packages (see set_dynamic_metapkg_rdepends). +FILES:${PN}-spa-plugins = "" +RRECOMMENDS:${PN}-spa-plugins += "${PN}-spa-plugins-meta" + +FILES:${PN}-spa-plugins-bluez5 += " \ + ${datadir}/${SPA_SUBDIR}/bluez5/* \ +" + +FILES:${PN}-spa-tools = " \ + ${bindir}/spa-* \ +" + +# Dynamic PipeWire module packages (see set_dynamic_metapkg_rdepends). +FILES:${PN}-modules = "" +RRECOMMENDS:${PN}-modules += "${PN}-modules-meta" + +CONFFILES:${PN}-modules-rt = "${datadir}/pipewire/client-rt.conf" +FILES:${PN}-modules-rt += " \ + ${datadir}/pipewire/client-rt.conf \ + ${sysconfdir}/security/limits.d/* \ + " + +CONFFILES:${PN}-modules-filter-chain = "${datadir}/pipewire/filter-chain/*" +FILES:${PN}-modules-filter-chain += " \ + ${datadir}/pipewire/filter-chain/* \ +" + +FILES:${PN}-alsa-card-profile = " \ + ${datadir}/alsa-card-profile/* \ + ${nonarch_base_libdir}/udev/rules.d/90-pipewire-alsa.rules \ +" + +# V4L2 interface emulator for sending/receiving data between PipeWire and V4L2 applications. +FILES:${PN}-v4l2 += " \ + ${bindir}/pw-v4l2 \ + ${libdir}/${PW_MODULE_SUBDIR}/v4l2/libpw-v4l2.so \ +" + +# AES67 is a standard for audio over IP, from the Audio Engineering Society (AES). +FILES:${PN}-aes67 += " \ + ${bindir}/pipewire-aes67 \ +" + +FILES:gstreamer1.0-pipewire = " \ + ${libdir}/gstreamer-1.0/* \ +" + +BBCLASSEXTEND = "native nativesdk" + +do_install:append() { + if ls ${D}${datadir}/doc/pipewire/html/dir_*html; then + sed -i "s,${WORKDIR},,g" ${D}${datadir}/doc/pipewire/html/dir_*html + fi +} -- cgit v1.2.3-54-g00ecf