gst: sink: update clock before every trigger process

Get the clock pointer using the io_changed stream event.
and update the clock before triggering the process

The clock needs to be updated in the data loop thread
and before triggering the process so move the calls to
`pw_stream_trigger_process` from gstreamer thread context
into the data loop thread context by invoking a callback
and update the clock inside the data loop callback
before the trigger
This commit is contained in:
Taruntej Kanakamalla 2025-04-18 23:01:56 +05:30
parent bca83c8eee
commit d5e2cc94cd
3 changed files with 99 additions and 4 deletions

View file

@ -70,6 +70,8 @@ struct _GstPipeWireSink {
gboolean rate_match;
gint rate;
gboolean is_rawvideo;
gboolean first_buffer;
GstClockTime first_buffer_pts;
GstPipeWireSinkMode mode;
GstPipeWireSinkSlaveMethod slave_method;