From 81d5c270b403bf36dd8a6f5ab39dd15400632fbf Mon Sep 17 00:00:00 2001 From: DistroBaker Date: Fri, 30 Oct 2020 17:44:49 +0000 Subject: [PATCH] Merged update from upstream sources This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/pipewire.git#c9b38583fc09faee999557578f1c65197541aff5 --- .gitignore | 1 + 0001-acp-pass-right-user_data-to-event.patch | 25 ---- ...-alsa-monitor-avoid-crash-in-release.patch | 53 -------- 0001-conf-disable-bluez5.patch | 2 +- ...dd-option-to-disable-device-provider.patch | 96 -------------- ...make-sure-we-don-t-read-invalid-data.patch | 123 ------------------ 0001-pulse-limit-get_writable_size.patch | 61 --------- pipewire.spec | 17 +-- sources | 2 +- 9 files changed, 8 insertions(+), 372 deletions(-) delete mode 100644 0001-acp-pass-right-user_data-to-event.patch delete mode 100644 0001-alsa-monitor-avoid-crash-in-release.patch delete mode 100644 0001-gst-add-option-to-disable-device-provider.patch delete mode 100644 0001-media-session-make-sure-we-don-t-read-invalid-data.patch delete mode 100644 0001-pulse-limit-get_writable_size.patch diff --git a/.gitignore b/.gitignore index 4856895..168c472 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,4 @@ /pipewire-0.3.11.tar.gz /pipewire-0.3.12.tar.gz /pipewire-0.3.13.tar.gz +/pipewire-0.3.14.tar.gz diff --git a/0001-acp-pass-right-user_data-to-event.patch b/0001-acp-pass-right-user_data-to-event.patch deleted file mode 100644 index 916bc58..0000000 --- a/0001-acp-pass-right-user_data-to-event.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 735eefa2fb17219cd2067f084c16f08d42d84aa6 Mon Sep 17 00:00:00 2001 -From: Wim Taymans -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 - diff --git a/0001-alsa-monitor-avoid-crash-in-release.patch b/0001-alsa-monitor-avoid-crash-in-release.patch deleted file mode 100644 index 0f24826..0000000 --- a/0001-alsa-monitor-avoid-crash-in-release.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 81ca70af9bb6c60e2998b4aaf939b82eba257472 Mon Sep 17 00:00:00 2001 -From: Wim Taymans -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 - diff --git a/0001-conf-disable-bluez5.patch b/0001-conf-disable-bluez5.patch index 512db49..37d1881 100644 --- a/0001-conf-disable-bluez5.patch +++ b/0001-conf-disable-bluez5.patch @@ -18,7 +18,7 @@ index 574cba4f..4ecec24f 100644 # 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 ++exec @media_session_path@ -d bluez5,pulse-bridge # -d alsa-seq,alsa-pcm,metadata -- 2.26.2 diff --git a/0001-gst-add-option-to-disable-device-provider.patch b/0001-gst-add-option-to-disable-device-provider.patch deleted file mode 100644 index e47a8ed..0000000 --- a/0001-gst-add-option-to-disable-device-provider.patch +++ /dev/null @@ -1,96 +0,0 @@ -From ea14ff1998ccc59946d9bede5b60081409a3b74f Mon Sep 17 00:00:00 2001 -From: Wim Taymans -Date: Tue, 13 Oct 2020 12:40:48 +0200 -Subject: [PATCH] gst: add option to disable device provider - ---- - config.h.meson | 2 ++ - meson.build | 6 ++++++ - meson_options.txt | 4 ++++ - src/gst/gstpipewire.c | 2 ++ - src/gst/meson.build | 5 ++++- - 5 files changed, 18 insertions(+), 1 deletion(-) - -diff --git a/config.h.meson b/config.h.meson -index a8acb340..ae2c2d0d 100644 ---- a/config.h.meson -+++ b/config.h.meson -@@ -468,3 +468,5 @@ - - #mesondefine PA_ALSA_PATHS_DIR - #mesondefine PA_ALSA_PROFILE_SETS_DIR -+ -+#mesondefine HAVE_GSTREAMER_DEVICE_PROVIDER -diff --git a/meson.build b/meson.build -index 06b46343..f8dcfcb0 100644 ---- a/meson.build -+++ b/meson.build -@@ -296,6 +296,12 @@ if get_option('bluez5') - endif - endif - -+if get_option('gstreamer') -+ if get_option('gstreamer-device-provider') -+ cdata.set('HAVE_GSTREAMER_DEVICE_PROVIDER', 1) -+ endif -+endif -+ - configure_file(input : 'config.h.meson', - output : 'config.h', - configuration : cdata) -diff --git a/meson_options.txt b/meson_options.txt -index 6a8bb071..72f6e721 100644 ---- a/meson_options.txt -+++ b/meson_options.txt -@@ -22,6 +22,10 @@ option('gstreamer', - description: 'Build GStreamer plugins', - type: 'boolean', - value: true) -+option('gstreamer-device-provider', -+ description: 'Build GStreamer device provider plugin', -+ type: 'boolean', -+ value: true) - option('systemd', - description: 'Enable systemd integration', - type: 'boolean', -diff --git a/src/gst/gstpipewire.c b/src/gst/gstpipewire.c -index 786ad195..9f752fe2 100644 ---- a/src/gst/gstpipewire.c -+++ b/src/gst/gstpipewire.c -@@ -53,9 +53,11 @@ plugin_init (GstPlugin *plugin) - gst_element_register (plugin, "pipewiresink", GST_RANK_NONE, - GST_TYPE_PIPEWIRE_SINK); - -+#if HAVE_GSTREAMER_DEVICE_PROVIDER - if (!gst_device_provider_register (plugin, "pipewiredeviceprovider", - GST_RANK_PRIMARY + 1, GST_TYPE_PIPEWIRE_DEVICE_PROVIDER)) - return FALSE; -+#endif - - GST_DEBUG_CATEGORY_INIT (pipewire_debug, "pipewire", 0, "PipeWire elements"); - -diff --git a/src/gst/meson.build b/src/gst/meson.build -index e6c097f1..66ea5261 100644 ---- a/src/gst/meson.build -+++ b/src/gst/meson.build -@@ -2,13 +2,16 @@ pipewire_gst_sources = [ - 'gstpipewire.c', - 'gstpipewirecore.c', - 'gstpipewireclock.c', -- 'gstpipewiredeviceprovider.c', - 'gstpipewireformat.c', - 'gstpipewirepool.c', - 'gstpipewiresink.c', - 'gstpipewiresrc.c', - ] - -+if get_option('gstreamer-device-provider') -+ pipewire_gst_sources += [ 'gstpipewiredeviceprovider.c' ] -+endif -+ - pipewire_gst_headers = [ - 'gstpipewireclock.h', - 'gstpipewirecore.h', --- -2.26.2 - diff --git a/0001-media-session-make-sure-we-don-t-read-invalid-data.patch b/0001-media-session-make-sure-we-don-t-read-invalid-data.patch deleted file mode 100644 index e883376..0000000 --- a/0001-media-session-make-sure-we-don-t-read-invalid-data.patch +++ /dev/null @@ -1,123 +0,0 @@ -From 0da406d30407f574f4cc28a0e3532aec4dd9fdb6 Mon Sep 17 00:00:00 2001 -From: Wim Taymans -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 - diff --git a/0001-pulse-limit-get_writable_size.patch b/0001-pulse-limit-get_writable_size.patch deleted file mode 100644 index 5312733..0000000 --- a/0001-pulse-limit-get_writable_size.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 62ef0145c3bffdca23c6087117d7cf7830b13a28 Mon Sep 17 00:00:00 2001 -From: Wim Taymans -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 - diff --git a/pipewire.spec b/pipewire.spec index 06177a4..7a290c1 100644 --- a/pipewire.spec +++ b/pipewire.spec @@ -1,6 +1,6 @@ %global majorversion 0 %global minorversion 3 -%global microversion 13 +%global microversion 14 %global apiversion 0.3 %global spaversion 0.2 @@ -29,7 +29,7 @@ Name: pipewire Summary: Media Sharing Server Version: %{majorversion}.%{minorversion}.%{microversion} -Release: 6%{?snap:.%{snap}git%{shortcommit}}%{?dist} +Release: 1%{?snap:.%{snap}git%{shortcommit}}%{?dist} License: MIT URL: https://pipewire.org/ %if 0%{?gitrel} @@ -41,11 +41,6 @@ Source0: https://gitlab.freedesktop.org/pipewire/pipewire/-/archive/%{version}/p %endif ## 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 -Patch5: 0001-gst-add-option-to-disable-device-provider.patch ## upstreamable patches @@ -224,11 +219,6 @@ This package provides a PulseAudio implementation based on PipeWire %setup -q -T -b0 -n %{name}-%{version}%{?gitrel:-%{gitrel}-g%{shortcommit}} %patch0 -p1 -b .0000 -%patch1 -p1 -b .0001 -%patch2 -p1 -b .0002 -%patch3 -p1 -b .0003 -%patch4 -p1 -b .0004 -%patch5 -p1 -b .0005 %build %meson \ @@ -425,6 +415,9 @@ systemctl --no-reload preset --global pipewire.socket >/dev/null 2>&1 || : %endif %changelog +* Fri Oct 30 2020 Wim Taymans - 0.3.14-1 +- Update to 0.3.14 + * Sun Oct 18 2020 Neal Gompa - 0.3.13-6 - Fix jack and pulseaudio subpackages to generate dependencies properly diff --git a/sources b/sources index 45d4fca..34b7db7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pipewire-0.3.13.tar.gz) = 38ce7d8808e69935db0148c077340cfbc1b85f5a016a0a57eff2c076560c42f0695cfe681c9f16ebf15796d773dd113c9a84631eb50ac44dfb09f91ed3fc61f0 +SHA512 (pipewire-0.3.14.tar.gz) = fe83150b7e1d346a0cf4095f6849d0ec8120f6c60c2bc880204e882c84b07a4b24fc858d2fa122b2feaebfc525a8b91921cb01e31f2be60aabe40d2404f5225e