mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
Add stream for control - 2
This commit is contained in:
parent
9dc20765e1
commit
61a5701493
1 changed files with 15 additions and 1 deletions
|
|
@ -1243,7 +1243,7 @@ static void control_process(void *d)
|
|||
static void playback_process(void *d)
|
||||
{
|
||||
struct impl *impl = d;
|
||||
struct pw_buffer *in, *out;
|
||||
struct pw_buffer *in, *out, *control;
|
||||
uint32_t i, data_size = 0;
|
||||
int32_t stride = 0;
|
||||
struct spa_data *bd;
|
||||
|
|
@ -1262,6 +1262,18 @@ static void playback_process(void *d)
|
|||
if (in == NULL)
|
||||
pw_log_debug("%p: out of capture buffers: %m", impl);
|
||||
|
||||
control = NULL;
|
||||
while (true) {
|
||||
struct pw_buffer *t;
|
||||
if ((t = pw_stream_dequeue_buffer(impl->control)) == NULL)
|
||||
break;
|
||||
if (control)
|
||||
pw_stream_queue_buffer(impl->control, control);
|
||||
control = t;
|
||||
}
|
||||
if (control == NULL)
|
||||
pw_log_debug("%p: out of control buffers: %m", impl);
|
||||
|
||||
if ((out = pw_stream_dequeue_buffer(impl->playback)) == NULL)
|
||||
pw_log_debug("%p: out of playback buffers: %m", impl);
|
||||
|
||||
|
|
@ -1309,6 +1321,8 @@ done:
|
|||
pw_stream_queue_buffer(impl->capture, in);
|
||||
if (out != NULL)
|
||||
pw_stream_queue_buffer(impl->playback, out);
|
||||
if (control != NULL)
|
||||
pw_stream_queue_buffer(impl->control, control);
|
||||
}
|
||||
|
||||
static int activate_graph(struct impl *impl)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue