summaryrefslogtreecommitdiffstats
path: root/meta-pipewire/recipes-multimedia/pipewire/pipewire/0004-gst-pwaudioringbuffer-request-pause-play-on-the-appr.patch
diff options
context:
space:
mode:
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2019-10-07 18:28:10 +0300
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2019-10-07 18:28:10 +0300
commita349a7d85434679a7d62fe5affe7074c33f0cb8a (patch)
treec2c80d2e61740de2131b126af003a49d219f3a44 /meta-pipewire/recipes-multimedia/pipewire/pipewire/0004-gst-pwaudioringbuffer-request-pause-play-on-the-appr.patch
parentc5b99b7e8608c1201293d84ba06e4a3ca501d9e8 (diff)
pipewire: update to latest master
Update patches: * remove merged patches * remove the alsa algorithm correction that was needed for qemu, as it seems to cause severe underruns on other platforms now; I will recheck qemu to see if this is still an issue * add a workaround needed to get the audioconvert plugin running in merge+split mode (needed to get all the channels out instead of just the front left channel that we were getting before) Update version to 0.2.91 to reflect the fact that we are now tracking the master branch instead of the work branch. Enable the spa audiomixer plugin which is now required to mix audio on ports Bug-AGL: SPEC-2837 Change-Id: I2558aa5487b9c9918e077bf450230c143abf7e6c Signed-off-by: George Kiagiadakis <george.kiagiadakis@collabora.com>
Diffstat (limited to 'meta-pipewire/recipes-multimedia/pipewire/pipewire/0004-gst-pwaudioringbuffer-request-pause-play-on-the-appr.patch')
-rw-r--r--meta-pipewire/recipes-multimedia/pipewire/pipewire/0004-gst-pwaudioringbuffer-request-pause-play-on-the-appr.patch76
1 files changed, 76 insertions, 0 deletions
diff --git a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0004-gst-pwaudioringbuffer-request-pause-play-on-the-appr.patch b/meta-pipewire/recipes-multimedia/pipewire/pipewire/0004-gst-pwaudioringbuffer-request-pause-play-on-the-appr.patch
new file mode 100644
index 00000000..bc6559f9
--- /dev/null
+++ b/meta-pipewire/recipes-multimedia/pipewire/pipewire/0004-gst-pwaudioringbuffer-request-pause-play-on-the-appr.patch
@@ -0,0 +1,76 @@
+From d2cd5c499528dcd0b6c25a4050a6b4d76c4aa459 Mon Sep 17 00:00:00 2001
+From: George Kiagiadakis <george.kiagiadakis@collabora.com>
+Date: Thu, 11 Jul 2019 16:21:17 +0300
+Subject: [PATCH] gst/pwaudioringbuffer: request pause/play on the appropriate
+ stream state changes
+
+This allows the client to properly go to PAUSED when the session manager
+unlinks the stream and go again to PLAYING when the sm re-links it.
+This allows the session manager to implement policies without letting
+the client pipeline freeze (in the absence of a running audio clock)
+when it is unlinked. Note that in case the client doesn't handle the
+request, there is still no issue. Like in pulseaudio, the clock just
+freezes, so the pipeline stops progressing.
+
+This is similar to the pulseaudio cork/uncork mechanism.
+
+Upstream-Status: Submitted [https://github.com/PipeWire/pipewire/pull/140]
+---
+ src/gst/gstpwaudioringbuffer.c | 27 +++++++++++++++++++++++----
+ 1 file changed, 23 insertions(+), 4 deletions(-)
+
+diff --git a/src/gst/gstpwaudioringbuffer.c b/src/gst/gstpwaudioringbuffer.c
+index 989b2cd7..97350f38 100644
+--- a/src/gst/gstpwaudioringbuffer.c
++++ b/src/gst/gstpwaudioringbuffer.c
+@@ -202,11 +202,16 @@ on_stream_state_changed (void *data, enum pw_stream_state old,
+ enum pw_stream_state state, const char *error)
+ {
+ GstPwAudioRingBuffer *self = GST_PW_AUDIO_RING_BUFFER (data);
++ GstMessage *msg;
+
+ GST_DEBUG_OBJECT (self->elem, "got stream state: %s",
+ pw_stream_state_as_string (state));
+
+ switch (state) {
++ case PW_STREAM_STATE_ERROR:
++ GST_ELEMENT_ERROR (self->elem, RESOURCE, FAILED,
++ ("stream error: %s", error), (NULL));
++ break;
+ case PW_STREAM_STATE_UNCONNECTED:
+ GST_ELEMENT_ERROR (self->elem, RESOURCE, FAILED,
+ ("stream disconnected unexpectedly"), (NULL));
+@@ -214,12 +219,26 @@ on_stream_state_changed (void *data, enum pw_stream_state old,
+ case PW_STREAM_STATE_CONNECTING:
+ case PW_STREAM_STATE_CONFIGURE:
+ case PW_STREAM_STATE_READY:
++ break;
+ case PW_STREAM_STATE_PAUSED:
+- case PW_STREAM_STATE_STREAMING:
++ if (old == PW_STREAM_STATE_STREAMING) {
++ if (GST_STATE (self->elem) != GST_STATE_PAUSED &&
++ GST_STATE_TARGET (self->elem) != GST_STATE_PAUSED) {
++ GST_DEBUG_OBJECT (self->elem, "requesting GST_STATE_PAUSED");
++ msg = gst_message_new_request_state (GST_OBJECT (self->elem),
++ GST_STATE_PAUSED);
++ gst_element_post_message (self->elem, msg);
++ }
++ }
+ break;
+- case PW_STREAM_STATE_ERROR:
+- GST_ELEMENT_ERROR (self->elem, RESOURCE, FAILED,
+- ("stream error: %s", error), (NULL));
++ case PW_STREAM_STATE_STREAMING:
++ if (GST_STATE (self->elem) != GST_STATE_PLAYING &&
++ GST_STATE_TARGET (self->elem) != GST_STATE_PLAYING) {
++ GST_DEBUG_OBJECT (self->elem, "requesting GST_STATE_PLAYING");
++ msg = gst_message_new_request_state (GST_OBJECT (self->elem),
++ GST_STATE_PLAYING);
++ gst_element_post_message (self->elem, msg);
++ }
+ break;
+ }
+ pw_thread_loop_signal (self->main_loop, FALSE);
+--
+2.23.0
+