Accepting request 807946 from GNOME:Factory

(forwarded request 807933 from alarrosa)

OBS-URL: https://build.opensuse.org/request/show/807946
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pipewire?expand=0&rev=9
This commit is contained in:
Yuchen Lin 2020-05-26 15:14:29 +00:00 committed by Git OBS Bridge
parent 5dd2e653c8
commit 286cc95b09
8 changed files with 255 additions and 76 deletions

View File

@ -3,7 +3,7 @@
<service name="obs_scm" mode="disabled">
<param name="scm">git</param>
<param name="url">https://gitlab.freedesktop.org/pipewire/pipewire.git</param>
<param name="revision">0.3.2</param>
<param name="revision">0.3.5</param>
<param name="versionformat">@PARENT_TAG@+@TAG_OFFSET@</param>
<param name="versionrewrite-pattern">(.*)\+0</param>
<param name="versionrewrite-replacement">\1</param>

View File

@ -0,0 +1,75 @@
From: Antonio Larrosa <alarrosa@suse.com>
Subject: Fix build with old alsa-devel
Revert part of https://github.com/PipeWire/pipewire/commit/c658574c0119d3a1f199fe17091fc4d5f37f1e71
since the alsa version in SLE/Leap doesn't have a snd_pcm_ioplug_hw_avail function.
Index: pipewire-0.3.5/pipewire-alsa/alsa-plugins/pcm_pipewire.c
===================================================================
--- pipewire-0.3.5.orig/pipewire-alsa/alsa-plugins/pcm_pipewire.c
+++ pipewire-0.3.5/pipewire-alsa/alsa-plugins/pcm_pipewire.c
@@ -192,7 +192,6 @@ snd_pcm_pipewire_process_playback(snd_pc
index = 0;
avail = maxsize - filled;
avail = SPA_MIN(avail, pw->min_avail * bpf);
- avail = SPA_MIN(avail, *hw_avail * bpf);
do {
offset = index % maxsize;
@@ -236,7 +235,8 @@ snd_pcm_pipewire_process_playback(snd_pc
pw->hw_ptr -= pw->boundary;
xfer += frames;
}
- *hw_avail -= xfer;
+
+ pcm_poll_unblock_check(io); /* unblock socket for polling if needed */
done:
index += nbytes;
@@ -271,7 +271,7 @@ snd_pcm_pipewire_process_record(snd_pcm_
d = b->buffer->datas;
maxsize = d[0].chunk->size;
- avail = SPA_MIN(maxsize, *hw_avail * bpf);
+ avail = maxsize;
index = d[0].chunk->offset;
do {
@@ -309,7 +309,9 @@ snd_pcm_pipewire_process_record(snd_pcm_
pw->hw_ptr -= pw->boundary;
xfer += frames;
}
- *hw_avail -= xfer;
+
+ pcm_poll_unblock_check(io); /* unblock socket for polling if needed */
+
avail -= nbytes;
index += nbytes;
} while (avail > 0);
@@ -355,9 +357,6 @@ static void on_stream_process(void *data
snd_pcm_pipewire_t *pw = data;
snd_pcm_ioplug_t *io = &pw->io;
struct pw_buffer *b;
- snd_pcm_uframes_t hw_avail;
-
- hw_avail = snd_pcm_ioplug_hw_avail(io, pw->hw_ptr, io->appl_ptr);
if (pw->drained) {
pcm_poll_unblock_check(io); /* unblock socket for polling if needed */
@@ -369,13 +368,13 @@ static void on_stream_process(void *data
return;
if (io->stream == SND_PCM_STREAM_PLAYBACK)
- snd_pcm_pipewire_process_playback(pw, b, &hw_avail);
+ snd_pcm_pipewire_process_playback(pw, b, 0L);
else
- snd_pcm_pipewire_process_record(pw, b, &hw_avail);
+ snd_pcm_pipewire_process_record(pw, b, 0L);
pw_stream_queue_buffer(pw->stream, b);
- if (io->state == SND_PCM_STATE_DRAINING && !pw->draining && hw_avail == 0) {
+ if (io->state == SND_PCM_STATE_DRAINING && !pw->draining == 0) {
pw_stream_flush(pw->stream, true);
pw->draining = true;
pw->drained = false;

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e066c2bd5a3a14001fdf2d1988c0c20432e61dd60ccd4d98c396d538259b1c8d
size 5146125

3
pipewire-0.3.5.obscpio Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3083c324a1de8ce784d9b5be282f2d3a13049a602e7e86d6ab8130bd073e0fb7
size 5389837

4
pipewire-rpmlintrc Normal file
View File

@ -0,0 +1,4 @@
# .so files in pipewire-libjack and pipewire-libpulse aren't
# really devel files
addFilter("devel-file-in-non-devel-package.*/jack/libjack")
addFilter("devel-file-in-non-devel-package.*/pulse/libpulse")

View File

@ -1,3 +1,83 @@
-------------------------------------------------------------------
Thu May 21 08:50:18 UTC 2020 - Antonio Larrosa <alarrosa@suse.com>
- Filter out libpulse.so.0 and libjack.so.0 automatic provides so
this is not considered an alternative when resolving dependencies
in the distribution.
-------------------------------------------------------------------
Thu May 21 07:51:29 UTC 2020 - Antonio Larrosa <alarrosa@suse.com>
- Add patch to fix build in SLE/Leap where alsa doesn't have a
snd_pcm_ioplug_hw_avail function:
* do-not-use-snd_pcm_ioplug_hw_avail.patch
-------------------------------------------------------------------
Tue May 19 07:54:52 UTC 2020 - Antonio Larrosa <alarrosa@suse.com>
- Update to version 0.3.5:
* Compiler fixes
* Add pw-midiplay and pw-midirecord aliases
* Add pw-mididump tool
* Add pw-metadata tool to inspect, add and remove metadata
for objects.
* Docs updates, man pages
* install alsa config files
* Fix linked sink/source in pulseaudio
* ratelimit graph processing warnings
* improve buffer handling in GStreamer elements
* Fix power usage by removing the queue for the alsa
sequencer system announce messages.
* Fix metadata clear() method dispatch.
* Improve parameter enumeration, make it possible to detect
missing parameters vs no-compatible parameters so that we
can use defaults in the first case and error in the second
case.
* Fix cleanup of proxy objects. Stability improvements on
plug/unplug in session manager.
* Make it possible to set log level from config file
* improve debug of param negotiation errors. Log the
parameters to stderr/journal.
* Make it possible to configure global logger
implementation.
* Fix NEON detection
* JACK and PulseAudio compatibility improvements
- Update to version 0.3.4:
* A quick update with some important stability fixes.
- Update to version 0.3.3:
* NEON optimizations for audio conversion (32 and 64 bits)
* rework of session manager implementation
* Add option to disable modules in the session manager
* Release midi hardware devices when suspended
* various build fixes
* Clean up options of various utils
* Stability improvements
* Mayor improvements in pulseaudio emulation. Improved
timings and compatibility.
* Implementation of drain and flush in pulse and alsa
emulation.
* Implement poll on file descriptors.
* Improvement of metadata for jack emulation.
* Fix memory and thread problems in jack emulation.
* Simplification of state changes. Should make more use
cases work in the jack emulation.
* Improvements in the gstreamer elements. Removal of
extra internal queue. pipewiresink can now be used to
play audio.
* Add pw-jack and pw-pulse scripts to run pulseaudio and
jack applications with the right library path.
- Replace libpulse* replacement packages with a single
pipewire-libpulse-0_3 package that includes all libraries
installed in the non-standard directory
%{_libdir}/pipewire-0.3/pulse and a new pw-pulse wrapper script.
Likewise for the jack replacement libraries in a new
pipewire-libjack-0_3 package.
- Use update-alternatives for the wrapper scripts.
-------------------------------------------------------------------
Wed Apr 1 07:35:48 UTC 2020 - Antonio Larrosa <alarrosa@suse.com>

View File

@ -1,5 +1,5 @@
name: pipewire
version: 0.3.2
mtime: 1585222494
commit: f0f3a0a66032cf693a979dae6187cac07fa353ee
version: 0.3.5
mtime: 1589196932
commit: ba215efed0da8d6c9f3f2414d76a8e2c75352501

View File

@ -17,21 +17,30 @@
#
%define libpipewire libpipewire-0_3-0
%define sover 0_3_2
%define _use_internal_dependency_generator 0
%global provfind sh -c "grep -v -e 'libpulse.*\\.so' -e 'libjack.*\\.so' | %__find_provides"
%global __find_provides %provfind
%define sover 0_3_5
%define apiver 0.3
%define apiver_str 0_3
%define spa_ver 0.2
%define spa_ver_str 0_2
%define libpipewire libpipewire-%{apiver_str}-0
Name: pipewire
Version: 0.3.2
Version: 0.3.5
Release: 0
Summary: A Multimedia Framework designed to be an audio and video server and more
License: MIT
Group: Development/Libraries/C and C++
URL: https://pipewire.org/
Source0: %{name}-%{version}.tar.xz
Source1: %{name}-rpmlintrc
Patch0: fix-memfd_create-call.patch
Patch1: do-not-use-snd_pcm_ioplug_hw_avail.patch
BuildRequires: doxygen
BuildRequires: fdupes
@ -104,12 +113,14 @@ Some of its features include:
This package provides the PipeWire shared library.
%package -n libjack-pw%{sover}
Summary: A Multimedia Framework designed to be an audio and video server and more
%package libjack-%{apiver_str}
Summary: PipeWire libjack replacement libraries
License: MIT
Group: Development/Libraries/C and C++
Requires(post): update-alternatives
Requires(postun): update-alternatives
%description -n libjack-pw%{sover}
%description libjack-%{apiver_str}
PipeWire is a server and user space API to deal with multimedia pipelines.
Some of its features include:
@ -120,51 +131,17 @@ Some of its features include:
* GStreamer plugins for easy use and integration in current applications;
* Sandboxed applications support.
This package provides the PipeWire shared library.
This package provides the PipeWire replacement libraries for libjack.
%package -n libpulse-mainloop-glib-pw%{sover}
%package libpulse-%{apiver_str}
Summary: A Multimedia Framework designed to be an audio and video server and more
License: LGPL-2.1-or-later
Group: Development/Libraries/C and C++
Requires(post): update-alternatives
Requires(postun): update-alternatives
%description -n libpulse-mainloop-glib-pw%{sover}
PipeWire is a server and user space API to deal with multimedia pipelines.
Some of its features include:
* Capture and playback of audio and video with minimal latency;
* Real-time Multimedia processing on audio and video;
* Multiprocess architecture to let applications share multimedia content;
* GStreamer plugins for easy use and integration in current applications;
* Sandboxed applications support.
This package provides the PipeWire shared library.
%package -n libpulse-pw%{sover}
Summary: A Multimedia Framework designed to be an audio and video server and more
License: LGPL-2.1-or-later
Group: Development/Libraries/C and C++
%description -n libpulse-pw%{sover}
PipeWire is a server and user space API to deal with multimedia pipelines.
Some of its features include:
* Capture and playback of audio and video with minimal latency;
* Real-time Multimedia processing on audio and video;
* Multiprocess architecture to let applications share multimedia content;
* GStreamer plugins for easy use and integration in current applications;
* Sandboxed applications support.
This package provides the PipeWire shared library.
%package -n libpulse-simple-pw%{sover}
Summary: A Multimedia Framework designed to be an audio and video server and more
License: LGPL-2.1-or-later
Group: Development/Libraries/C and C++
%description -n libpulse-simple-pw%{sover}
%description libpulse-%{apiver_str}
PipeWire is a server and user space API to deal with multimedia pipelines.
Some of its features include:
@ -274,6 +251,10 @@ This package contains documentation for the PipeWire media server.
%patch0 -p1
%endif
%if %{pkg_vcmp alsa-devel < 1.2.2}
%patch1 -p1
%endif
%build
%if %{pkg_vcmp gcc < 8}
export CC=gcc-9
@ -285,11 +266,26 @@ export CC=gcc-9
-Dffmpeg=true \
-Dsystemd=true \
-Dvulkan=true \
-Dtest=true \
-Daudiotestsrc=true \
%{nil}
%meson_build
%install
%meson_install
mkdir -p %{buildroot}%{_sysconfdir}/alsa/conf.d/
for filename in 50-pipewire.conf \
99-pipewire-default.conf ; do
cp -a pipewire-alsa/conf/"$filename" %{buildroot}%{_sysconfdir}/alsa/conf.d/
done
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
for wrapper in pw-pulse pw-jack ; do
mv %{buildroot}%{_bindir}/$wrapper %{buildroot}%{_bindir}/$wrapper-%{apiver}
ln -s -f %{_sysconfdir}/alternatives/$wrapper %{buildroot}%{_bindir}/$wrapper
done
%fdupes -s %{buildroot}/%{_datadir}/doc/pipewire/html
%check
@ -298,17 +294,21 @@ export CC=gcc-9
%post -n %{libpipewire} -p /sbin/ldconfig
%postun -n %{libpipewire} -p /sbin/ldconfig
%post -n libjack-pw%{sover} -p /sbin/ldconfig
%postun -n libjack-pw%{sover} -p /sbin/ldconfig
%post libpulse-%{apiver_str}
%{_sbindir}/update-alternatives --install %{_bindir}/pw-pulse pw-pulse %{_bindir}/pw-pulse-%{apiver} 20
%post -n libpulse-mainloop-glib-pw%{sover} -p /sbin/ldconfig
%postun -n libpulse-mainloop-glib-pw%{sover} -p /sbin/ldconfig
%postun libpulse-%{apiver_str}
if [ ! -e %{_bindir}/pw-pulse-%{apiver} ] ; then
%{_sbindir}/update-alternatives --remove pw-pulse %{_bindir}/pw-pulse-%{apiver}
fi
%post -n libpulse-pw%{sover} -p /sbin/ldconfig
%postun -n libpulse-pw%{sover} -p /sbin/ldconfig
%post libjack-%{apiver_str}
%{_sbindir}/update-alternatives --install %{_bindir}/pw-jack pw-jack %{_bindir}/pw-jack-%{apiver} 20
%post -n libpulse-simple-pw%{sover} -p /sbin/ldconfig
%postun -n libpulse-simple-pw%{sover} -p /sbin/ldconfig
%postun libjack-%{apiver_str}
if [ ! -e %{_bindir}/pw-jack-%{apiver} ] ; then
%{_sbindir}/update-alternatives --remove pw-jack %{_bindir}/pw-jack-%{apiver}
fi
%files
%{_bindir}/pipewire
@ -323,26 +323,37 @@ export CC=gcc-9
%dir %{_libdir}/alsa-lib
%{_libdir}/alsa-lib/libasound_module_pcm_pipewire.so
%dir %{_datadir}/alsa/alsa.conf.d
%{_datadir}/alsa/alsa.conf.d/50-pipewire.conf
%{_datadir}/alsa/alsa.conf.d/99-pipewire-default.conf
%dir %{_sysconfdir}/alsa
%dir %{_sysconfdir}/alsa/conf.d
%config(noreplace) %{_sysconfdir}/alsa/conf.d/50-pipewire.conf
%config(noreplace) %{_sysconfdir}/alsa/conf.d/99-pipewire-default.conf
%files -n %{libpipewire}
%license LICENSE COPYING
%doc README.md
%{_libdir}/libpipewire-%{apiver}.so.*
%files -n libjack-pw%{sover}
%{_libdir}/libjack-pw.so.*
%files libjack-%{apiver_str}
%dir %{_libdir}/pipewire-%{apiver}/jack
%{_libdir}/pipewire-%{apiver}/jack/libjack.so*
%{_libdir}/pipewire-%{apiver}/jack/libjacknet.so*
%{_libdir}/pipewire-%{apiver}/jack/libjackserver.so*
%ghost %{_sysconfdir}/alternatives/pw-jack
%{_bindir}/pw-jack-%{apiver}
%{_bindir}/pw-jack
%files -n libpulse-mainloop-glib-pw%{sover}
%files libpulse-%{apiver_str}
%license pipewire-pulseaudio/LICENSE
%{_libdir}/libpulse-mainloop-glib-pw.so.*
%files -n libpulse-pw%{sover}
%license pipewire-pulseaudio/LICENSE
%{_libdir}/libpulse-pw.so.*
%files -n libpulse-simple-pw%{sover}
%license pipewire-pulseaudio/LICENSE
%{_libdir}/libpulse-simple-pw.so.*
%dir %{_libdir}/pipewire-%{apiver}/pulse
%{_libdir}/pipewire-%{apiver}/pulse/libpulse.so*
%{_libdir}/pipewire-%{apiver}/pulse/libpulse-simple.so*
%{_libdir}/pipewire-%{apiver}/pulse/libpulse-mainloop-glib.so*
%ghost %{_sysconfdir}/alternatives/pw-pulse
%{_bindir}/pw-pulse-%{apiver}
%{_bindir}/pw-pulse
%files -n gstreamer-plugin-pipewire
%{_libdir}/gstreamer-1.0/libgstpipewire.so
@ -355,8 +366,17 @@ export CC=gcc-9
%{_bindir}/pw-cat
%{_bindir}/pw-play
%{_bindir}/pw-record
%{_bindir}/pw-metadata
%{_bindir}/pw-mididump
%{_bindir}/pw-midiplay
%{_bindir}/pw-midirecord
%{_mandir}/man1/pw-cli.1%{ext_man}
%{_mandir}/man1/pw-mon.1%{ext_man}
%{_mandir}/man1/pw-cat.1%{ext_man}
%{_mandir}/man1/pw-dot.1%{ext_man}
%{_mandir}/man1/pw-metadata.1%{ext_man}
%{_mandir}/man1/pw-mididump.1%{ext_man}
%{_mandir}/man1/pw-profiler.1%{ext_man}
%files spa-tools
%{_bindir}/spa-inspect
@ -392,6 +412,8 @@ export CC=gcc-9
%{_libdir}/spa-%{spa_ver}/v4l2/libspa-v4l2.so
%{_libdir}/spa-%{spa_ver}/videoconvert/libspa-videoconvert.so
%{_libdir}/spa-%{spa_ver}/vulkan/libspa-vulkan.so
%{_libdir}/spa-%{spa_ver}/audiotestsrc/libspa-audiotestsrc.so
%{_libdir}/spa-%{spa_ver}/test/libspa-test.so
%dir %{_libdir}/spa-%{spa_ver}
%dir %{_libdir}/spa-%{spa_ver}/alsa
@ -405,13 +427,11 @@ export CC=gcc-9
%dir %{_libdir}/spa-%{spa_ver}/v4l2
%dir %{_libdir}/spa-%{spa_ver}/videoconvert
%dir %{_libdir}/spa-%{spa_ver}/vulkan
%dir %{_libdir}/spa-%{spa_ver}/audiotestsrc
%dir %{_libdir}/spa-%{spa_ver}/test
%files devel
%{_libdir}/libpipewire-%{apiver}.so
%{_libdir}/libjack-pw.so
%{_libdir}/libpulse-mainloop-glib-pw.so
%{_libdir}/libpulse-pw.so
%{_libdir}/libpulse-simple-pw.so
%{_libdir}/pkgconfig/libpipewire-%{apiver}.pc
%{_libdir}/pkgconfig/libspa-%{spa_ver}.pc
%{_includedir}/pipewire-%{apiver}/