mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-04-10 08:21:03 -04:00
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:
parent
bca83c8eee
commit
d5e2cc94cd
3 changed files with 99 additions and 4 deletions
|
|
@ -31,6 +31,7 @@ struct _GstPipeWireStream {
|
|||
GstClock *clock;
|
||||
|
||||
guint64 position;
|
||||
guint64 buf_duration;
|
||||
struct spa_dll dll;
|
||||
double err_avg, err_var, err_wdw;
|
||||
guint64 last_ts;
|
||||
|
|
@ -41,6 +42,8 @@ struct _GstPipeWireStream {
|
|||
struct pw_stream *pwstream;
|
||||
struct spa_hook pwstream_listener;
|
||||
|
||||
struct spa_io_position *io_position;
|
||||
|
||||
/* common properties */
|
||||
int fd;
|
||||
gchar *path;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue