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:
Wim Taymans 2021-10-19 16:15:07 +02:00
parent baca092ba5
commit a84e43e3ee
2 changed files with 42 additions and 17 deletions

View file

@ -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: