1 From a9fb1fa9ce662ee3f06afda5fd9eb2182520ea4d Mon Sep 17 00:00:00 2001
2 From: George Kiagiadakis <george.kiagiadakis@collabora.com>
3 Date: Tue, 20 Aug 2019 18:33:35 +0300
4 Subject: [PATCH] gst: pwaudioringbuffer: set node.latency to get scheduled
5 correctly in capture mode
7 Upstream-Status: Pending
9 src/gst/gstpwaudioringbuffer.c | 7 ++++---
10 1 file changed, 4 insertions(+), 3 deletions(-)
12 diff --git a/src/gst/gstpwaudioringbuffer.c b/src/gst/gstpwaudioringbuffer.c
13 index 3efec6ec..8136b815 100644
14 --- a/src/gst/gstpwaudioringbuffer.c
15 +++ b/src/gst/gstpwaudioringbuffer.c
16 @@ -402,11 +402,9 @@ gst_pw_audio_ring_buffer_acquire (GstAudioRingBuffer *buf,
18 /* construct param & props objects */
20 + props = pw_properties_new (NULL, NULL);
21 if (self->props->properties) {
22 - props = pw_properties_new (NULL, NULL);
23 gst_structure_foreach (self->props->properties, copy_properties, props);
28 spa_pod_builder_init (&b, buffer, sizeof (buffer));
29 @@ -423,6 +421,9 @@ gst_pw_audio_ring_buffer_acquire (GstAudioRingBuffer *buf,
30 self->rate = GST_AUDIO_INFO_RATE (&spec->info);
33 + pw_properties_setf(props, PW_KEY_NODE_LATENCY, "%u/%u",
34 + self->segsize / self->bpf, self->rate);
38 pw_thread_loop_lock (self->main_loop);