mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-08 13:30:08 -05:00
stream: schedule process from main thread when asked
Use 2 lockfree queues so that we can queue and dequeue from different threads. Call the process function from the main thread when requested Rework the data push and pull logic to go through the queues Update the examples for this new feature, video-play does not need to schedule the process in the main thread anymore and block for it to complete, this avoid a deadlock between the data and mainloop when shutting down.
This commit is contained in:
parent
67e567b9c7
commit
bcddac6e2b
3 changed files with 253 additions and 173 deletions
|
|
@ -235,7 +235,8 @@ static void on_state_changed(void *_data, enum pw_remote_state old, enum pw_remo
|
|||
|
||||
pw_stream_connect(data->stream,
|
||||
PW_DIRECTION_OUTPUT,
|
||||
NULL, PW_STREAM_FLAG_NONE,
|
||||
NULL,
|
||||
PW_STREAM_FLAG_DRIVER,
|
||||
params, 1);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue