mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
examples: update some examples with RequestProcess
Let video-src unconditionally call _trigger_process() when it is ready. This will either start the graph when it is the driver or emit a RequestProcess event to the driver. Let video-play-pull intercept the RequestProcess command and use it to do a trigger_process(). Otherwise use a timer to pull in the next frame.
This commit is contained in:
parent
baca092ba5
commit
a84e43e3ee
2 changed files with 42 additions and 17 deletions
|
|
@ -214,9 +214,8 @@ static void on_stream_state_changed(void *_data, enum pw_stream_state old, enum
|
|||
interval.tv_sec = 0;
|
||||
interval.tv_nsec = 40 * SPA_NSEC_PER_MSEC;
|
||||
|
||||
if (pw_stream_is_driving(data->stream))
|
||||
pw_loop_update_timer(pw_main_loop_get_loop(data->loop),
|
||||
data->timer, &timeout, &interval, false);
|
||||
pw_loop_update_timer(pw_main_loop_get_loop(data->loop),
|
||||
data->timer, &timeout, &interval, false);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue