mirror of
https://abf.rosa.ru/djam/pipewire.git
synced 2025-02-23 15:42:55 +00:00
update version 0.3.13
This commit is contained in:
parent
4c1892025b
commit
145b80e20d
8 changed files with 615 additions and 81 deletions
2
.abf.yml
2
.abf.yml
|
@ -1,2 +1,2 @@
|
|||
sources:
|
||||
pipewire-0.2.3.tar.gz: 03b8b73cff6725fd834bdd44c0aa7ab14b75c725
|
||||
pipewire-0.3.13.tar.gz: 0e119a7108d10448f828fc7a092d429f69ef1bc4
|
||||
|
|
25
0001-acp-pass-right-user_data-to-event.patch
Normal file
25
0001-acp-pass-right-user_data-to-event.patch
Normal file
|
@ -0,0 +1,25 @@
|
|||
From 735eefa2fb17219cd2067f084c16f08d42d84aa6 Mon Sep 17 00:00:00 2001
|
||||
From: Wim Taymans <wtaymans@redhat.com>
|
||||
Date: Thu, 1 Oct 2020 11:31:52 +0200
|
||||
Subject: [PATCH] acp: pass right user_data to event
|
||||
|
||||
---
|
||||
spa/plugins/alsa/acp/acp.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/spa/plugins/alsa/acp/acp.c b/spa/plugins/alsa/acp/acp.c
|
||||
index 6106bbba..35a6dfc9 100644
|
||||
--- a/spa/plugins/alsa/acp/acp.c
|
||||
+++ b/spa/plugins/alsa/acp/acp.c
|
||||
@@ -568,7 +568,7 @@ static int hdmi_eld_changed(snd_mixer_elem_t *melem, unsigned int mask)
|
||||
pa_proplist_as_dict(p->proplist, &p->port.props);
|
||||
|
||||
if (changed && mask != 0 && impl->events && impl->events->props_changed)
|
||||
- impl->events->props_changed(impl);
|
||||
+ impl->events->props_changed(impl->user_data);
|
||||
return 0;
|
||||
}
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
53
0001-alsa-monitor-avoid-crash-in-release.patch
Normal file
53
0001-alsa-monitor-avoid-crash-in-release.patch
Normal file
|
@ -0,0 +1,53 @@
|
|||
From 81ca70af9bb6c60e2998b4aaf939b82eba257472 Mon Sep 17 00:00:00 2001
|
||||
From: Wim Taymans <wtaymans@redhat.com>
|
||||
Date: Mon, 28 Sep 2020 18:23:23 +0200
|
||||
Subject: [PATCH] alsa-monitor: avoid crash in release
|
||||
|
||||
Only try to release the device when we have a proxy.
|
||||
|
||||
Fixes #310
|
||||
---
|
||||
src/examples/media-session/alsa-monitor.c | 13 +++++++++++--
|
||||
1 file changed, 11 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/examples/media-session/alsa-monitor.c b/src/examples/media-session/alsa-monitor.c
|
||||
index a27370b8..6154d4ca 100644
|
||||
--- a/src/examples/media-session/alsa-monitor.c
|
||||
+++ b/src/examples/media-session/alsa-monitor.c
|
||||
@@ -594,6 +594,12 @@ static void reserve_acquired(void *data, struct rd_device *d)
|
||||
rd_device_release(device->reserve);
|
||||
}
|
||||
|
||||
+static void complete_release(struct device *device)
|
||||
+{
|
||||
+ if (device->reserve)
|
||||
+ rd_device_complete_release(device->reserve, true);
|
||||
+}
|
||||
+
|
||||
static void sync_complete_done(void *data, int seq)
|
||||
{
|
||||
struct device *device = data;
|
||||
@@ -605,8 +611,7 @@ static void sync_complete_done(void *data, int seq)
|
||||
spa_hook_remove(&device->sync_listener);
|
||||
device->seq = 0;
|
||||
|
||||
- if (device->reserve)
|
||||
- rd_device_complete_release(device->reserve, true);
|
||||
+ complete_release(device);
|
||||
}
|
||||
|
||||
static void sync_destroy(void *data)
|
||||
@@ -627,6 +632,10 @@ static void reserve_release(void *data, struct rd_device *d, int forced)
|
||||
struct device *device = data;
|
||||
|
||||
pw_log_info("%p: reserve release", device);
|
||||
+ if (device->sdevice == NULL || device->sdevice->obj.proxy == NULL) {
|
||||
+ complete_release(device);
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
set_profile(device, 0);
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
24
0001-conf-disable-bluez5.patch
Normal file
24
0001-conf-disable-bluez5.patch
Normal file
|
@ -0,0 +1,24 @@
|
|||
From 13945e27434951366960dd3a0461c58487df82a2 Mon Sep 17 00:00:00 2001
|
||||
From: Wim Taymans <wtaymans@redhat.com>
|
||||
Date: Mon, 30 Mar 2020 15:32:04 +0200
|
||||
Subject: [PATCH] conf: disable bluez5
|
||||
|
||||
Disable bluetooth handling by default to avoid causing
|
||||
conflicts with pulseaudio.
|
||||
---
|
||||
src/daemon/pipewire.conf.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/daemon/pipewire.conf.in b/src/daemon/pipewire.conf.in
|
||||
index 574cba4f..4ecec24f 100644
|
||||
--- a/src/daemon/pipewire.conf.in
|
||||
+++ b/src/daemon/pipewire.conf.in
|
||||
@@ -71,4 +71,4 @@ create-object spa-node-factory factory.name=support.node.driver node.name=Dummy
|
||||
# Execute the given program. This is usually used to start the
|
||||
# session manager. run the session manager with -h for options
|
||||
#
|
||||
-exec @media_session_path@ # -d alsa-seq,alsa-pcm,bluez5,metadata
|
||||
+exec @media_session_path@ -d bluez5 # -d alsa-seq,alsa-pcm,metadata
|
||||
--
|
||||
2.26.2
|
||||
|
123
0001-media-session-make-sure-we-don-t-read-invalid-data.patch
Normal file
123
0001-media-session-make-sure-we-don-t-read-invalid-data.patch
Normal file
|
@ -0,0 +1,123 @@
|
|||
From 0da406d30407f574f4cc28a0e3532aec4dd9fdb6 Mon Sep 17 00:00:00 2001
|
||||
From: Wim Taymans <wtaymans@redhat.com>
|
||||
Date: Thu, 1 Oct 2020 11:32:40 +0200
|
||||
Subject: [PATCH] media-session: make sure we don't read invalid data
|
||||
|
||||
---
|
||||
src/examples/media-session/default-routes.c | 23 ++++++++++++------
|
||||
src/examples/media-session/restore-stream.c | 26 ++++++++++++++++-----
|
||||
2 files changed, 36 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/src/examples/media-session/default-routes.c b/src/examples/media-session/default-routes.c
|
||||
index 6c3a4627..ef7fcda3 100644
|
||||
--- a/src/examples/media-session/default-routes.c
|
||||
+++ b/src/examples/media-session/default-routes.c
|
||||
@@ -176,10 +176,13 @@ static int restore_route(struct device *dev, const char *val, uint32_t index, ui
|
||||
spa_pod_builder_prop(&b, SPA_PARAM_ROUTE_props, 0);
|
||||
spa_pod_builder_push_object(&b, &f[1],
|
||||
SPA_TYPE_OBJECT_Props, SPA_PARAM_Route);
|
||||
- for (p = val; *p; p++) {
|
||||
+
|
||||
+ p = val;
|
||||
+ while (*p) {
|
||||
if (strstr(p, "volume:") == p) {
|
||||
- vol = strtof(p+7, &end);
|
||||
- if (end == p + 7)
|
||||
+ p += 7;
|
||||
+ vol = strtof(p, &end);
|
||||
+ if (end == p)
|
||||
continue;
|
||||
spa_pod_builder_prop(&b, SPA_PROP_volume, 0);
|
||||
spa_pod_builder_float(&b, vol);
|
||||
@@ -192,14 +195,18 @@ static int restore_route(struct device *dev, const char *val, uint32_t index, ui
|
||||
p+=6;
|
||||
}
|
||||
else if (strstr(p, "volumes:") == p) {
|
||||
- n_vols = strtol(p+8, &end, 10);
|
||||
- if (end == p+8 || n_vols >= SPA_AUDIO_MAX_CHANNELS)
|
||||
+ p += 8;
|
||||
+ n_vols = strtol(p, &end, 10);
|
||||
+ if (end == p)
|
||||
continue;
|
||||
p = end;
|
||||
+ if (n_vols >= SPA_AUDIO_MAX_CHANNELS)
|
||||
+ continue;
|
||||
vols = alloca(n_vols * sizeof(float));
|
||||
for (i = 0; i < n_vols && *p == ','; i++) {
|
||||
- vols[i] = strtof(p+1, &end);
|
||||
- if (end == p+1)
|
||||
+ p++;
|
||||
+ vols[i] = strtof(p, &end);
|
||||
+ if (end == p)
|
||||
break;
|
||||
p = end;
|
||||
}
|
||||
@@ -209,6 +216,8 @@ static int restore_route(struct device *dev, const char *val, uint32_t index, ui
|
||||
spa_pod_builder_prop(&b, SPA_PROP_channelVolumes, 0);
|
||||
spa_pod_builder_array(&b, sizeof(float), SPA_TYPE_Float,
|
||||
n_vols, vols);
|
||||
+ } else {
|
||||
+ p++;
|
||||
}
|
||||
}
|
||||
spa_pod_builder_pop(&b, &f[1]);
|
||||
diff --git a/src/examples/media-session/restore-stream.c b/src/examples/media-session/restore-stream.c
|
||||
index 094a2b1b..237683a3 100644
|
||||
--- a/src/examples/media-session/restore-stream.c
|
||||
+++ b/src/examples/media-session/restore-stream.c
|
||||
@@ -202,9 +202,13 @@ static int restore_stream(struct stream *str, const char *val)
|
||||
|
||||
spa_pod_builder_push_object(&b, &f[0],
|
||||
SPA_TYPE_OBJECT_Props, SPA_PARAM_Props);
|
||||
- for (p = val; *p; p++) {
|
||||
+ p = val;
|
||||
+ while (*p) {
|
||||
if (strstr(p, "volume:") == p) {
|
||||
- vol = strtof(p+7, &end);
|
||||
+ p += 7;
|
||||
+ vol = strtof(p, &end);
|
||||
+ if (end == p)
|
||||
+ continue;
|
||||
spa_pod_builder_prop(&b, SPA_PROP_volume, 0);
|
||||
spa_pod_builder_float(&b, vol);
|
||||
p = end;
|
||||
@@ -216,15 +220,23 @@ static int restore_stream(struct stream *str, const char *val)
|
||||
p+=6;
|
||||
}
|
||||
else if (strstr(p, "volumes:") == p) {
|
||||
- n_vols = strtol(p+8, &end, 10);
|
||||
- if (n_vols >= SPA_AUDIO_MAX_CHANNELS)
|
||||
+ p += 8;
|
||||
+ n_vols = strtol(p, &end, 10);
|
||||
+ if (end == p)
|
||||
continue;
|
||||
p = end;
|
||||
+ if (n_vols >= SPA_AUDIO_MAX_CHANNELS)
|
||||
+ continue;
|
||||
vols = alloca(n_vols * sizeof(float));
|
||||
- for (i = 0; i < n_vols; i++) {
|
||||
- vols[i] = strtof(p+1, &end);
|
||||
+ for (i = 0; i < n_vols && *p == ','; i++) {
|
||||
+ p++;
|
||||
+ vols[i] = strtof(p, &end);
|
||||
+ if (end == p)
|
||||
+ break;
|
||||
p = end;
|
||||
}
|
||||
+ if (i != n_vols)
|
||||
+ continue;
|
||||
spa_pod_builder_prop(&b, SPA_PROP_channelVolumes, 0);
|
||||
spa_pod_builder_array(&b, sizeof(float), SPA_TYPE_Float,
|
||||
n_vols, vols);
|
||||
@@ -238,6 +250,8 @@ static int restore_stream(struct stream *str, const char *val)
|
||||
i = end - p;
|
||||
strncpy(target, p, i);
|
||||
target[i-1] = 0;
|
||||
+ } else {
|
||||
+ p++;
|
||||
}
|
||||
}
|
||||
param = spa_pod_builder_pop(&b, &f[0]);
|
||||
--
|
||||
2.26.2
|
||||
|
61
0001-pulse-limit-get_writable_size.patch
Normal file
61
0001-pulse-limit-get_writable_size.patch
Normal file
|
@ -0,0 +1,61 @@
|
|||
From 62ef0145c3bffdca23c6087117d7cf7830b13a28 Mon Sep 17 00:00:00 2001
|
||||
From: Wim Taymans <wtaymans@redhat.com>
|
||||
Date: Tue, 29 Sep 2020 09:56:14 +0200
|
||||
Subject: [PATCH] pulse: limit get_writable_size()
|
||||
|
||||
Try to limit the amount of data we can write. Fixes chrome playback.
|
||||
---
|
||||
pipewire-pulseaudio/src/stream.c | 19 ++++++++++---------
|
||||
1 file changed, 10 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/pipewire-pulseaudio/src/stream.c b/pipewire-pulseaudio/src/stream.c
|
||||
index c30cd00e..0a398c66 100644
|
||||
--- a/pipewire-pulseaudio/src/stream.c
|
||||
+++ b/pipewire-pulseaudio/src/stream.c
|
||||
@@ -493,8 +493,7 @@ static void stream_process(void *data)
|
||||
s, queued, target, wanted, required);
|
||||
|
||||
if (s->write_callback && s->state == PA_STREAM_READY &&
|
||||
- queued < wanted &&
|
||||
- wanted >= required)
|
||||
+ queued < wanted && wanted >= required)
|
||||
s->write_callback(s, wanted, s->write_userdata);
|
||||
}
|
||||
else {
|
||||
@@ -1283,7 +1282,7 @@ SPA_EXPORT
|
||||
size_t pa_stream_writable_size(PA_CONST pa_stream *s)
|
||||
{
|
||||
const pa_timing_info *i;
|
||||
- uint64_t now, then, queued, writable, elapsed, required;
|
||||
+ uint64_t now, then, queued, target, wanted, elapsed, required;
|
||||
struct timespec ts;
|
||||
|
||||
spa_assert(s);
|
||||
@@ -1306,16 +1305,18 @@ size_t pa_stream_writable_size(PA_CONST pa_stream *s)
|
||||
}
|
||||
|
||||
queued = queued_size(s, elapsed);
|
||||
- writable = writable_size(s, queued);
|
||||
+ target = target_queue(s);
|
||||
+ wanted = wanted_size(s, queued, target);
|
||||
required = required_size(s);
|
||||
|
||||
- pw_log_debug("stream %p: writable:%"PRIu64" queued:%"PRIu64" required:%"PRIu64, s,
|
||||
- writable, queued, required);
|
||||
+ pw_log_debug("stream %p: queued:%"PRIu64" target:%"PRIu64
|
||||
+ " wanted:%"PRIu64" required:%"PRIu64, s,
|
||||
+ queued, target, wanted, required);
|
||||
|
||||
- if (writable < required)
|
||||
- writable = 0;
|
||||
+ if (queued >= wanted || wanted < required)
|
||||
+ wanted = 0;
|
||||
|
||||
- return writable;
|
||||
+ return wanted;
|
||||
}
|
||||
|
||||
SPA_EXPORT
|
||||
--
|
||||
2.26.2
|
||||
|
405
pipewire.spec
405
pipewire.spec
|
@ -1,24 +1,57 @@
|
|||
%define spa_api 0.1
|
||||
%define api 0.2
|
||||
%define major 1
|
||||
%global api 0.3
|
||||
%global spa_api 0.2
|
||||
%define major 0
|
||||
|
||||
%define libname %mklibname %{name} %{api} %{major}
|
||||
%define devname %mklibname %{name} -d
|
||||
|
||||
#global snap 20141103
|
||||
#global gitrel 327
|
||||
#global gitcommit aec811798cd883a454b9b5cd82c77831906bbd2d
|
||||
#global shortcommit %(c=%{gitcommit}; echo ${c:0:5})
|
||||
|
||||
%global enable_alsa 1
|
||||
%global enable_jack 1
|
||||
%global enable_pulse 1
|
||||
%global enable_vulkan 1
|
||||
|
||||
# libpulse and libjack subpackages shouldn't have library provides
|
||||
# as the files they ship are not in the linker path. We also have
|
||||
# to exclude requires or else the subpackages wind up requiring the
|
||||
# libs they're no longer providing
|
||||
# FIXME: the jack-audio-connection-kit and pulseaudio subpackages
|
||||
# should get the auto-generated Provides: instead, but they do not,
|
||||
# either with or without the lines below, not sure how to fix that
|
||||
%global __provides_exclude_from ^%{_libdir}/pipewire-%{api}/.*$
|
||||
%global __requires_exclude_from ^%{_libdir}/pipewire-%{api}/.*$
|
||||
|
||||
Name: pipewire
|
||||
Summary: Media Sharing Server
|
||||
Version: 0.2.3
|
||||
Release: 3
|
||||
License: LGPLv2+
|
||||
Version: 0.3.13
|
||||
Release: 4%{?snap:.%{snap}git%{shortcommit}}%{?dist}
|
||||
Group: System/Servers
|
||||
License: MIT
|
||||
URL: https://pipewire.org/
|
||||
Source0: https://github.com/PipeWire/pipewire/archive/%{version}/%{name}-%{version}.tar.gz
|
||||
%if 0%{?gitrel}
|
||||
# git clone git://anongit.freedesktop.org/gstreamer/pipewire
|
||||
# cd pipewire; git reset --hard %{gitcommit}; ./autogen.sh; make; make distcheck
|
||||
Source0: pipewire-%{version}-%{gitrel}-g%{shortcommit}.tar.gz
|
||||
%else
|
||||
Source0: https://gitlab.freedesktop.org/pipewire/pipewire/-/archive/%{version}/pipewire-%{version}.tar.gz
|
||||
%endif
|
||||
Source1: %{name}.sysusers.conf
|
||||
## upstream patches
|
||||
Patch1: 0001-pulse-limit-get_writable_size.patch
|
||||
Patch2: 0001-alsa-monitor-avoid-crash-in-release.patch
|
||||
Patch3: 0001-acp-pass-right-user_data-to-event.patch
|
||||
Patch4: 0001-media-session-make-sure-we-don-t-read-invalid-data.patch
|
||||
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: gcc
|
||||
BuildRequires: graphviz
|
||||
BuildRequires: meson >= 0.35.0
|
||||
BuildRequires: xmltoman
|
||||
## upstreamable patches
|
||||
|
||||
## fedora patches
|
||||
Patch0: 0001-conf-disable-bluez5.patch
|
||||
|
||||
BuildRequires: meson >= 0.49.0
|
||||
BuildRequires: pkgconfig(libudev)
|
||||
BuildRequires: pkgconfig(dbus-1)
|
||||
BuildRequires: pkgconfig(glib-2.0) >= 2.32
|
||||
|
@ -28,127 +61,339 @@ BuildRequires: pkgconfig(gstreamer-base-1.0) >= 1.10.0
|
|||
BuildRequires: pkgconfig(gstreamer-plugins-base-1.0) >= 1.10.0
|
||||
BuildRequires: pkgconfig(gstreamer-net-1.0) >= 1.10.0
|
||||
BuildRequires: pkgconfig(gstreamer-allocators-1.0) >= 1.10.0
|
||||
%if 0%{?enable_vulkan}
|
||||
BuildRequires: pkgconfig(vulkan)
|
||||
%endif
|
||||
BuildRequires: pkgconfig(bluez)
|
||||
BuildRequires: pkgconfig(systemd) >= 184
|
||||
BuildRequires: pkgconfig(alsa)
|
||||
BuildRequires: pkgconfig(libavcodec)
|
||||
BuildRequires: pkgconfig(libva)
|
||||
BuildRequires: pkgconfig(libv4l2)
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: xmltoman
|
||||
BuildRequires: graphviz
|
||||
BuildRequires: pkgconfig(sbc)
|
||||
BuildRequires: pkgconfig(sdl2)
|
||||
|
||||
Requires(post): /bin/systemd-sysusers
|
||||
Requires: %{libname} = %{EVRD}
|
||||
Requires: systemd >= 184
|
||||
Requires: rtkit
|
||||
Requires(pre): shadow-utils
|
||||
|
||||
%description
|
||||
PipeWire is a multimedia server for Linux and other Unix like operating
|
||||
systems.
|
||||
|
||||
%files
|
||||
%doc LICENSE GPL LGPL
|
||||
%doc README
|
||||
%{_sysconfdir}/%{name}
|
||||
%{_userunitdir}/%{name}.*
|
||||
%{_bindir}/%{name}
|
||||
%{_libdir}/%{name}-%{api}/
|
||||
%{_libdir}/spa/
|
||||
%{_mandir}/man1/%{name}.1*
|
||||
%license LICENSE COPYING
|
||||
%doc README.md
|
||||
%{_userunitdir}/pipewire.*
|
||||
%{_bindir}/pipewire
|
||||
%{_bindir}/pipewire-media-session
|
||||
%{_mandir}/man1/pipewire.1*
|
||||
%dir %{_sysconfdir}/pipewire/
|
||||
%config(noreplace) %{_sysconfdir}/pipewire/pipewire.conf
|
||||
%{_mandir}/man5/pipewire.conf.5*
|
||||
%{_sysusersdir}/%{name}.conf
|
||||
|
||||
#------------------------------------------------
|
||||
%post
|
||||
# create user and group
|
||||
%sysusers_create %{name}.conf
|
||||
%systemd_user_post pipewire.service
|
||||
%systemd_user_post pipewire.socket
|
||||
|
||||
%package -n %{libname}
|
||||
Summary: Libraries for PipeWire clients
|
||||
#-------------------------------------------------------------------------
|
||||
%package -n %{libname}
|
||||
Summary: Libraries for PipeWire clients
|
||||
Group: System/Libraries
|
||||
Recommends: %{name}%{?_isa} = %{EVRD}
|
||||
|
||||
%description -n %{libname}
|
||||
This package contains the runtime libraries for any application that
|
||||
wishes to interface with a PipeWire media server.
|
||||
%description -n %{libname}
|
||||
This package contains the runtime libraries for any application that wishes
|
||||
to interface with a PipeWire media server.
|
||||
|
||||
%files -n %{libname}
|
||||
%doc LICENSE GPL LGPL
|
||||
%doc README
|
||||
%{_libdir}/lib%{name}-%{api}.so.%{major}*
|
||||
%license LICENSE COPYING
|
||||
%doc README.md
|
||||
%{_libdir}/libpipewire-%{api}.so.%{major}*
|
||||
%{_libdir}/pipewire-%{api}/libpipewire-*.so
|
||||
%dir %{_datadir}/alsa-card-profile/
|
||||
%dir %{_datadir}/alsa-card-profile/mixer/
|
||||
%{_datadir}/alsa-card-profile/mixer/paths/
|
||||
%{_datadir}/alsa-card-profile/mixer/profile-sets/
|
||||
%{_prefix}/lib/udev/rules.d/90-pipewire-alsa.rules
|
||||
%dir %{_libdir}/spa-%{spa_api}
|
||||
%{_libdir}/spa-%{spa_api}/alsa/
|
||||
%{_libdir}/spa-%{spa_api}/audioconvert/
|
||||
%{_libdir}/spa-%{spa_api}/audiomixer/
|
||||
%{_libdir}/spa-%{spa_api}/bluez5/
|
||||
%{_libdir}/spa-%{spa_api}/control/
|
||||
%{_libdir}/spa-%{spa_api}/support/
|
||||
%{_libdir}/spa-%{spa_api}/v4l2/
|
||||
%{_libdir}/spa-%{spa_api}/videoconvert/
|
||||
%if 0%{?enable_vulkan}
|
||||
%{_libdir}/spa-%{spa_api}/vulkan/
|
||||
%endif
|
||||
|
||||
#------------------------------------------------
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
%package -n %{devname}
|
||||
Summary: Headers and libraries for PipeWire client development
|
||||
%package gstreamer
|
||||
Summary: GStreamer elements for PipeWire
|
||||
Group: System/Servers
|
||||
Recommends: %{name}%{?_isa} = %{EVRD}
|
||||
Requires: %{libname} = %{EVRD}
|
||||
|
||||
%description gstreamer
|
||||
This package contains GStreamer elements to interface with a
|
||||
PipeWire media server.
|
||||
|
||||
%files gstreamer
|
||||
%{_libdir}/gstreamer-1.0/libgstpipewire.*
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
%package -n %{devname}
|
||||
Summary: Headers and libraries for PipeWire client development
|
||||
Group: Development/C++
|
||||
Requires: %{libname} = %{version}-%{release}
|
||||
Provides: %{name}-devel = %{version}-%{release}
|
||||
Provides: spa-devel = %{version}-%{release}
|
||||
Requires: %{libname} = %{EVRD}
|
||||
Provides: %{name}-devel = %{EVRD}
|
||||
|
||||
%description -n %{devname}
|
||||
Headers and libraries for developing applications that can communicate
|
||||
with a PipeWire media server.
|
||||
%description -n %{devname}
|
||||
Headers and libraries for developing applications that can communicate with
|
||||
a PipeWire media server.
|
||||
|
||||
%files -n %{devname}
|
||||
%{_includedir}/%{name}/
|
||||
%{_includedir}/spa/
|
||||
%{_libdir}/lib%{name}-%{api}.so
|
||||
%{_libdir}/pkgconfig/lib%{name}-%{api}.pc
|
||||
%{_libdir}/libpipewire-%{api}.so
|
||||
%{_includedir}/pipewire-%{api}/
|
||||
%{_includedir}/spa-%{spa_api}/
|
||||
%{_libdir}/pkgconfig/libpipewire-%{api}.pc
|
||||
%{_libdir}/pkgconfig/libspa-%{spa_api}.pc
|
||||
|
||||
#------------------------------------------------
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
%package doc
|
||||
%package doc
|
||||
Summary: PipeWire media server documentation
|
||||
Group: Documentation
|
||||
BuildArch: noarch
|
||||
Requires: %{name} >= %{version}-%{release}
|
||||
|
||||
%description doc
|
||||
%description doc
|
||||
This package contains documentation for the PipeWire media server.
|
||||
|
||||
#------------------------------------------------
|
||||
%files doc
|
||||
%{_datadir}/doc/pipewire/html
|
||||
|
||||
%package utils
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
%package utils
|
||||
Summary: PipeWire media server utilities
|
||||
Group: System/Servers
|
||||
Requires: %{name}%{?_isa} = %{EVRD}
|
||||
Requires: %{libname} = %{EVRD}
|
||||
|
||||
%description utils
|
||||
This package contains command line utilities for the PipeWire
|
||||
media server.
|
||||
%description utils
|
||||
This package contains command line utilities for the PipeWire media server.
|
||||
|
||||
%files utils
|
||||
%{_bindir}/%{name}-monitor
|
||||
%{_bindir}/%{name}-cli
|
||||
%{_mandir}/man1/%{name}.conf.5*
|
||||
%{_mandir}/man1/%{name}-monitor.1*
|
||||
%{_mandir}/man1/%{name}-cli.1*
|
||||
%{_bindir}/spa-monitor
|
||||
%{_bindir}/pw-mon
|
||||
%{_bindir}/pw-metadata
|
||||
%{_bindir}/pw-mididump
|
||||
%{_bindir}/pw-midiplay
|
||||
%{_bindir}/pw-midirecord
|
||||
%{_bindir}/pw-cli
|
||||
%{_bindir}/pw-dot
|
||||
%{_bindir}/pw-cat
|
||||
%{_bindir}/pw-play
|
||||
%{_bindir}/pw-profiler
|
||||
%{_bindir}/pw-record
|
||||
%{_bindir}/pw-reserve
|
||||
%{_mandir}/man1/pw-mon.1*
|
||||
%{_mandir}/man1/pw-cli.1*
|
||||
%{_mandir}/man1/pw-cat.1*
|
||||
%{_mandir}/man1/pw-dot.1*
|
||||
%{_mandir}/man1/pw-metadata.1*
|
||||
%{_mandir}/man1/pw-mididump.1*
|
||||
%{_mandir}/man1/pw-profiler.1*
|
||||
|
||||
%{_bindir}/spa-acp-tool
|
||||
%{_bindir}/spa-inspect
|
||||
%{_bindir}/spa-monitor
|
||||
%{_bindir}/spa-resample
|
||||
|
||||
#------------------------------------------------
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
%package -n gstreamer1.0-%{name}
|
||||
Summary: GStreamer 1.0 plugin for the PipeWire multimedia server
|
||||
%if 0%{?enable_alsa}
|
||||
%package alsa
|
||||
Summary: PipeWire media server ALSA support
|
||||
Group: System/Servers
|
||||
BuildRequires: pkgconfig(alsa)
|
||||
Recommends: %{name}%{?_isa} = %{EVRD}
|
||||
Requires: %{libname} = %{EVRD}
|
||||
|
||||
%description -n gstreamer1.0-%{name}
|
||||
GStreamer 1.0 plugin for the PipeWire multimedia server.
|
||||
%description alsa
|
||||
This package contains an ALSA plugin for the PipeWire media server.
|
||||
|
||||
%files -n gstreamer1.0-%{name}
|
||||
%{_libdir}/gstreamer-1.0/libgst%{name}.so
|
||||
%files alsa
|
||||
%{_libdir}/alsa-lib/libasound_module_pcm_pipewire.so
|
||||
%{_libdir}/alsa-lib/libasound_module_ctl_pipewire.so
|
||||
%{_datadir}/alsa/alsa.conf.d/50-pipewire.conf
|
||||
%{_datadir}/alsa/alsa.conf.d/99-pipewire-default.conf
|
||||
%config(noreplace) %{_sysconfdir}/alsa/conf.d/50-pipewire.conf
|
||||
%config(noreplace) %{_sysconfdir}/alsa/conf.d/99-pipewire-default.conf
|
||||
|
||||
#------------------------------------------------
|
||||
%endif
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
%if 0%{?enable_jack}
|
||||
%package libjack
|
||||
Summary: PipeWire libjack library
|
||||
Group: System/Servers
|
||||
BuildRequires: pkgconfig(jack) >= 1.9.10
|
||||
Requires: %{libname} = %{EVRD}
|
||||
Recommends: %{name}%{?_isa} = %{EVRD}
|
||||
# Renamed in F32
|
||||
Obsoletes: pipewire-jack < 0.2.96-2
|
||||
|
||||
%description libjack
|
||||
This package contains a PipeWire replacement for JACK audio connection kit
|
||||
"libjack" library.
|
||||
|
||||
%files libjack
|
||||
%{_libdir}/pipewire-%{api}/jack/libjack.so*
|
||||
%{_libdir}/pipewire-%{api}/jack/libjacknet.so*
|
||||
%{_libdir}/pipewire-%{api}/jack/libjackserver.so*
|
||||
%{_bindir}/pw-jack
|
||||
%{_mandir}/man1/pw-jack.1*
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
%package jack-audio-connection-kit
|
||||
Summary: PipeWire JACK implementation
|
||||
Group: System/Servers
|
||||
BuildRequires: pkgconfig(jack) >= 1.9.10
|
||||
Requires: %{name}-libjack%{?_isa} = %{EVRD}
|
||||
Recommends: %{name}%{?_isa} = %{EVRD}
|
||||
Conflicts: jack-audio-connection-kit
|
||||
Conflicts: jack-audio-connection-kit-dbus
|
||||
Provides: jack-audio-connection-kit
|
||||
|
||||
%description jack-audio-connection-kit
|
||||
This package provides a JACK implementation based on PipeWire
|
||||
|
||||
%files jack-audio-connection-kit
|
||||
%{_libdir}/libjack.so.*
|
||||
%{_libdir}/libjackserver.so.*
|
||||
%{_libdir}/libjacknet.so.*
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
%package plugin-jack
|
||||
Summary: PipeWire media server JACK support
|
||||
Group: System/Servers
|
||||
BuildRequires: pkgconfig(jack)
|
||||
Recommends: %{name}%{?_isa} = %{EVRD}
|
||||
Requires: %{libname} = %{EVRD}
|
||||
|
||||
%description plugin-jack
|
||||
This package contains the PipeWire spa plugin to connect to a JACK server.
|
||||
|
||||
%files plugin-jack
|
||||
%{_libdir}/spa-%{spa_api}/jack/
|
||||
|
||||
%endif
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
%if 0%{?enable_pulse}
|
||||
%package libpulse
|
||||
Summary: PipeWire libpulse library
|
||||
Group: System/Servers
|
||||
BuildRequires: pulseaudio-devel
|
||||
Requires: %{libname} = %{EVRD}
|
||||
Recommends: %{name}%{?_isa} = %{EVRD}
|
||||
# Renamed in F32
|
||||
Obsoletes: pipewire-pulseaudio < 0.2.96-2
|
||||
|
||||
%description libpulse
|
||||
This package contains a PipeWire replacement for PulseAudio "libpulse" library.
|
||||
|
||||
%files libpulse
|
||||
%{_libdir}/pipewire-%{api}/pulse/libpulse.so*
|
||||
%{_libdir}/pipewire-%{api}/pulse/libpulse-simple.so*
|
||||
%{_libdir}/pipewire-%{api}/pulse/libpulse-mainloop-glib.so*
|
||||
%{_bindir}/pw-pulse
|
||||
%{_mandir}/man1/pw-pulse.1*
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
%package pulseaudio
|
||||
Summary: PipeWire PulseAudio implementation
|
||||
Group: System/Servers
|
||||
Recommends: %{name}%{?_isa} = %{EVRD}
|
||||
Requires: %{name}-libpulse%{?_isa} = %{EVRD}
|
||||
BuildRequires: pulseaudio-devel
|
||||
Conflicts: pulseaudio
|
||||
Conflicts: pulseaudio-glib2
|
||||
Provides: pulseaudio
|
||||
Provides: pulseaudio-glib2
|
||||
|
||||
%description pulseaudio
|
||||
This package provides a PulseAudio implementation based on PipeWire
|
||||
|
||||
%files pulseaudio
|
||||
%{_libdir}/libpulse.so.0
|
||||
%{_libdir}/libpulse-simple.so.0
|
||||
%{_libdir}/libpulse-mainloop-glib.so.0
|
||||
%endif
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
%prep
|
||||
%setup -q -T -b0
|
||||
%autosetup -p1 -T -b0 -n %{name}-%{version}%{?gitrel:-%{gitrel}-g%{shortcommit}}
|
||||
|
||||
|
||||
%build
|
||||
%meson -D docs=true -D man=true -D gstreamer=true -D systemd=true
|
||||
%meson \
|
||||
-D docs=true -D man=true -D gstreamer=true -D systemd=true \
|
||||
%{!?enable_jack:-D jack=false -D pipewire-jack=false} \
|
||||
%{!?enable_pulse:-D pipewire-pulseaudio=false} \
|
||||
%{!?enable_alsa:-D pipewire-alsa=false} \
|
||||
%{!?enable_vulkan:-D vulkan=false}
|
||||
%meson_build
|
||||
|
||||
%install
|
||||
%meson_install
|
||||
sed -i 's#//#/#' %{buildroot}%{_libdir}/pkgconfig/lib%{name}-%{api}.pc
|
||||
|
||||
%if 0%{?enable_jack}
|
||||
ln -s pipewire-%{api}/jack/libjack.so.0 %{buildroot}%{_libdir}/libjack.so.0.1.0
|
||||
ln -s libjack.so.0.1.0 %{buildroot}%{_libdir}/libjack.so.0
|
||||
ln -s pipewire-%{api}/jack/libjackserver.so.0 %{buildroot}%{_libdir}/libjackserver.so.0.1.0
|
||||
ln -s libjackserver.so.0.1.0 %{buildroot}%{_libdir}/libjackserver.so.0
|
||||
ln -s pipewire-%{api}/jack/libjacknet.so.0 %{buildroot}%{_libdir}/libjacknet.so.0.1.0
|
||||
ln -s libjacknet.so.0.1.0 %{buildroot}%{_libdir}/libjacknet.so.0
|
||||
%endif
|
||||
|
||||
%if 0%{?enable_pulse}
|
||||
ln -s pipewire-%{api}/pulse/libpulse.so.0 %{buildroot}%{_libdir}/libpulse.so.0
|
||||
ln -s pipewire-%{api}/pulse/libpulse-simple.so.0 %{buildroot}%{_libdir}/libpulse-simple.so.0
|
||||
ln -s pipewire-%{api}/pulse/libpulse-mainloop-glib.so.0 %{buildroot}%{_libdir}/libpulse-mainloop-glib.so.0
|
||||
%endif
|
||||
|
||||
%if 0%{?enable_alsa}
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/alsa/conf.d/
|
||||
cp %{buildroot}%{_datadir}/alsa/alsa.conf.d/50-pipewire.conf \
|
||||
%{buildroot}%{_sysconfdir}/alsa/conf.d/50-pipewire.conf
|
||||
cp %{buildroot}%{_datadir}/alsa/alsa.conf.d/99-pipewire-default.conf \
|
||||
%{buildroot}%{_sysconfdir}/alsa/conf.d/99-pipewire-default.conf
|
||||
%endif
|
||||
|
||||
# upstream should use udev.pc
|
||||
mkdir -p %{buildroot}%{_prefix}/lib/udev/rules.d
|
||||
mv -fv %{buildroot}/lib/udev/rules.d/90-pipewire-alsa.rules %{buildroot}%{_prefix}/lib/udev/rules.d
|
||||
|
||||
#install sysuser config
|
||||
install -d %{buildroot}%{_sysusersdir}/
|
||||
install -m0644 %{SOURCE1} %{buildroot}%{_sysusersdir}/%{name}.conf
|
||||
|
||||
%check
|
||||
%meson_test
|
||||
|
||||
%pre
|
||||
getent group pipewire >/dev/null || groupadd -r pipewire
|
||||
getent passwd pipewire >/dev/null || \
|
||||
useradd -r -g pipewire -d /var/run/pipewire -s /sbin/nologin -c "PipeWire System Daemon" pipewire
|
||||
exit 0
|
||||
%meson_test || TESTS_ERROR=$?
|
||||
if [ "${TESTS_ERROR}" != "" ]; then
|
||||
echo "test failed"
|
||||
fi
|
||||
|
|
3
pipewire.sysusers.conf
Normal file
3
pipewire.sysusers.conf
Normal file
|
@ -0,0 +1,3 @@
|
|||
u pipewire - "PipeWire system daemon" /var/run/pipewire /sbin/nologin
|
||||
g pipewire - -
|
||||
m pipewire pipewire
|
Loading…
Add table
Reference in a new issue