Merge pull request #125311 from jansol/pipewire

pipewire: 0.3.27 -> 0.3.30
This commit is contained in:
Domen Kožar 2021-06-11 16:48:52 +02:00 committed by GitHub
commit 2072bba95d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 86 additions and 23 deletions

View file

@ -74,7 +74,18 @@
"args": { "args": {
"factory.name": "support.node.driver", "factory.name": "support.node.driver",
"node.name": "Dummy-Driver", "node.name": "Dummy-Driver",
"priority.driver": 8000 "node.group": "pipewire.dummy",
"priority.driver": 20000
}
},
{
"factory": "spa-node-factory",
"args": {
"factory.name": "support.node.driver",
"node.name": "Freewheel-Driver",
"priority.driver": 19000,
"node.group": "pipewire.freewheel",
"node.freewheel": true
} }
} }
], ],

View file

@ -1,30 +1,30 @@
diff --git a/meson.build b/meson.build diff --git a/meson.build b/meson.build
index a27569bd..fcf18344 100644 index b6b4553b..f21c29d8 100644
--- a/meson.build --- a/meson.build
+++ b/meson.build +++ b/meson.build
@@ -36,7 +36,10 @@ pipewire_libexecdir = prefix / get_option('libexecdir') @@ -37,7 +37,10 @@ pipewire_localedir = prefix / get_option('localedir')
pipewire_localedir = prefix / get_option('localedir')
pipewire_sysconfdir = prefix / get_option('sysconfdir') pipewire_sysconfdir = prefix / get_option('sysconfdir')
-pipewire_configdir = pipewire_sysconfdir / 'pipewire' pipewire_configdir = pipewire_sysconfdir / 'pipewire'
+pipewire_configdir = get_option('pipewire_config_dir') -pipewire_confdatadir = pipewire_datadir / 'pipewire'
+if pipewire_configdir == '' +pipewire_confdatadir = get_option('pipewire_confdata_dir')
+ pipewire_configdir = pipewire_sysconfdir / 'pipewire' +if pipewire_confdatadir == ''
+ pipewire_confdatadir = pipewire_datadir / 'pipewire'
+endif +endif
modules_install_dir = pipewire_libdir / pipewire_name modules_install_dir = pipewire_libdir / pipewire_name
if host_machine.system() == 'linux' if host_machine.system() == 'linux'
diff --git a/meson_options.txt b/meson_options.txt diff --git a/meson_options.txt b/meson_options.txt
index 85beb86a..372e8faa 100644 index 9bc33fcd..e4bd2dc1 100644
--- a/meson_options.txt --- a/meson_options.txt
+++ b/meson_options.txt +++ b/meson_options.txt
@@ -67,6 +67,9 @@ option('jack-devel', @@ -61,6 +61,9 @@ option('jack-devel',
option('libjack-path', option('libjack-path',
description: 'Where to install the libjack.so library', description: 'Where to install the libjack.so library',
type: 'string') type: 'string')
+option('pipewire_config_dir', +option('pipewire_confdata_dir',
+ type : 'string', + type: 'string',
+ description : 'Directory for pipewire configuration (defaults to /etc/pipewire)') + description: 'Directory for pipewire default configuration (defaults to /usr/share/pipewire)')
option('spa-plugins', option('spa-plugins',
description: 'Enable spa plugins integration', description: 'Enable spa plugins integration',
type: 'feature', type: 'feature',

View file

@ -0,0 +1,28 @@
diff --git a/src/daemon/pipewire.conf.in b/src/daemon/pipewire.conf.in
index bbafa134..227d3e06 100644
--- a/src/daemon/pipewire.conf.in
+++ b/src/daemon/pipewire.conf.in
@@ -116,7 +116,7 @@ context.modules = [
# access.allowed to list an array of paths of allowed
# apps.
#access.allowed = [
- # @media_session_path@
+ # <media_session_path>
#]
# An array of rejected paths.
@@ -220,12 +220,12 @@ context.exec = [
# but it is better to start it as a systemd service.
# Run the session manager with -h for options.
#
- @comment@{ path = "@media_session_path@" args = "" }
+ @comment@{ path = "<media_session_path>" args = "" }
#
# You can optionally start the pulseaudio-server here as well
# but it is better to start it as a systemd service.
# It can be interesting to start another daemon here that listens
# on another address with the -a option (eg. -a tcp:4713).
#
- @comment@{ path = "@pipewire_path@" args = "-c pipewire-pulse.conf" }
+ @comment@{ path = "<pipewire_path>" args = "-c pipewire-pulse.conf" }
]

View file

@ -2,6 +2,7 @@
, lib , lib
, fetchFromGitLab , fetchFromGitLab
, removeReferencesTo , removeReferencesTo
, python3
, meson , meson
, ninja , ninja
, systemd , systemd
@ -19,6 +20,7 @@
, SDL2 , SDL2
, vulkan-headers , vulkan-headers
, vulkan-loader , vulkan-loader
, webrtc-audio-processing
, ncurses , ncurses
, makeFontsConf , makeFontsConf
, callPackage , callPackage
@ -31,6 +33,8 @@
, nativeHfpSupport ? true , nativeHfpSupport ? true
, ofonoSupport ? true , ofonoSupport ? true
, hsphfpdSupport ? true , hsphfpdSupport ? true
, pulseTunnelSupport ? true, libpulseaudio ? null
, zeroconfSupport ? true, avahi ? null
}: }:
let let
@ -42,7 +46,7 @@ let
self = stdenv.mkDerivation rec { self = stdenv.mkDerivation rec {
pname = "pipewire"; pname = "pipewire";
version = "0.3.27"; version = "0.3.30";
outputs = [ outputs = [
"out" "out"
@ -60,7 +64,7 @@ let
owner = "pipewire"; owner = "pipewire";
repo = "pipewire"; repo = "pipewire";
rev = version; rev = version;
sha256 = "sha256-GfcMODQWtcahBvXnZ98/PKIm4pkqLaz09oOy7zQR4IA="; sha256 = "sha256-DnaPvZoDaegjtJNKBmCJEAZe5FQBnSER79FPnxiWQUE=";
}; };
patches = [ patches = [
@ -72,8 +76,10 @@ let
./0055-pipewire-media-session-path.patch ./0055-pipewire-media-session-path.patch
# Move installed tests into their own output. # Move installed tests into their own output.
./0070-installed-tests-path.patch ./0070-installed-tests-path.patch
# Add flag to specify configuration directory (different from the installation directory). # Add option for changing the config install directory
./0080-pipewire-config-dir.patch ./0080-pipewire-config-dir.patch
# Remove output paths from the comments in the config templates to break dependency cycles
./0090-pipewire-config-template-paths.patch
]; ];
nativeBuildInputs = [ nativeBuildInputs = [
@ -82,6 +88,7 @@ let
meson meson
ninja ninja
pkg-config pkg-config
python3
]; ];
buildInputs = [ buildInputs = [
@ -94,12 +101,15 @@ let
udev udev
vulkan-headers vulkan-headers
vulkan-loader vulkan-loader
webrtc-audio-processing
valgrind valgrind
SDL2 SDL2
systemd systemd
] ++ lib.optionals gstreamerSupport [ gst_all_1.gst-plugins-base gst_all_1.gstreamer ] ] ++ lib.optionals gstreamerSupport [ gst_all_1.gst-plugins-base gst_all_1.gstreamer ]
++ lib.optional ffmpegSupport ffmpeg ++ lib.optional ffmpegSupport ffmpeg
++ lib.optionals bluezSupport [ bluez libopenaptx ldacbt sbc fdk_aac ]; ++ lib.optionals bluezSupport [ bluez libopenaptx ldacbt sbc fdk_aac ]
++ lib.optional pulseTunnelSupport libpulseaudio
++ lib.optional zeroconfSupport avahi;
mesonFlags = [ mesonFlags = [
"-Ddocs=enabled" "-Ddocs=enabled"
@ -112,6 +122,8 @@ let
"-Dmedia-session-prefix=${placeholder "mediaSession"}" "-Dmedia-session-prefix=${placeholder "mediaSession"}"
"-Dlibjack-path=${placeholder "jack"}/lib" "-Dlibjack-path=${placeholder "jack"}/lib"
"-Dlibcamera=disabled" "-Dlibcamera=disabled"
"-Dlibpulse=${mesonEnable pulseTunnelSupport}"
"-Davahi=${mesonEnable zeroconfSupport}"
"-Dgstreamer=${mesonEnable gstreamerSupport}" "-Dgstreamer=${mesonEnable gstreamerSupport}"
"-Dffmpeg=${mesonEnable ffmpegSupport}" "-Dffmpeg=${mesonEnable ffmpegSupport}"
"-Dbluez5=${mesonEnable bluezSupport}" "-Dbluez5=${mesonEnable bluezSupport}"
@ -119,24 +131,35 @@ let
"-Dbluez5-backend-hfp-native=${mesonEnable nativeHfpSupport}" "-Dbluez5-backend-hfp-native=${mesonEnable nativeHfpSupport}"
"-Dbluez5-backend-ofono=${mesonEnable ofonoSupport}" "-Dbluez5-backend-ofono=${mesonEnable ofonoSupport}"
"-Dbluez5-backend-hsphfpd=${mesonEnable hsphfpdSupport}" "-Dbluez5-backend-hsphfpd=${mesonEnable hsphfpdSupport}"
"-Dpipewire_config_dir=/etc/pipewire" "-Dsysconfdir=/etc"
"-Dpipewire_confdata_dir=${placeholder "lib"}/share/pipewire"
]; ];
FONTCONFIG_FILE = fontsConf; # Fontconfig error: Cannot load default config file FONTCONFIG_FILE = fontsConf; # Fontconfig error: Cannot load default config file
doCheck = true; doCheck = true;
postUnpack = ''
patchShebangs source/doc/strip-static.sh
patchShebangs source/spa/tests/gen-cpp-test.py
'';
postInstall = '' postInstall = ''
pushd . pushd $lib/share
cd $out
mkdir -p $out/nix-support/etc/pipewire mkdir -p $out/nix-support/etc/pipewire
for f in etc/pipewire/*.conf; do bin/spa-json-dump "$f" > "$out/nix-support/$f.json"; done for f in pipewire/*.conf; do
echo "Generating JSON from $f"
$out/bin/spa-json-dump "$f" > "$out/nix-support/etc/$f.json"
done
mkdir -p $mediaSession/nix-support/etc/pipewire/media-session.d mkdir -p $mediaSession/nix-support/etc/pipewire/media-session.d
for f in etc/pipewire/media-session.d/*.conf; do bin/spa-json-dump "$f" > "$mediaSession/nix-support/$f.json"; done for f in pipewire/media-session.d/*.conf; do
echo "Generating JSON from $f"
$out/bin/spa-json-dump "$f" > "$mediaSession/nix-support/etc/$f.json"
done
popd popd
moveToOutput "etc/pipewire/media-session.d/*.conf" "$mediaSession" moveToOutput "share/pipewire/media-session.d/*.conf" "$mediaSession"
moveToOutput "share/systemd/user/pipewire-media-session.*" "$mediaSession" moveToOutput "share/systemd/user/pipewire-media-session.*" "$mediaSession"
moveToOutput "lib/systemd/user/pipewire-media-session.*" "$mediaSession" moveToOutput "lib/systemd/user/pipewire-media-session.*" "$mediaSession"
moveToOutput "bin/pipewire-media-session" "$mediaSession" moveToOutput "bin/pipewire-media-session" "$mediaSession"
@ -155,6 +178,7 @@ let
test-paths = callPackage ./test-paths.nix { test-paths = callPackage ./test-paths.nix {
paths-out = [ paths-out = [
"share/alsa/alsa.conf.d/50-pipewire.conf" "share/alsa/alsa.conf.d/50-pipewire.conf"
"nix-support/etc/pipewire/client-rt.conf.json"
"nix-support/etc/pipewire/client.conf.json" "nix-support/etc/pipewire/client.conf.json"
"nix-support/etc/pipewire/jack.conf.json" "nix-support/etc/pipewire/jack.conf.json"
"nix-support/etc/pipewire/pipewire.conf.json" "nix-support/etc/pipewire/pipewire.conf.json"