gst: handle clock reset

The clock time is reset to 0 after a new format is negotiated. Make sure
the time reported by the gstreamer clock is increasing in this case.
This commit is contained in:
Wim Taymans 2019-03-11 15:09:28 +01:00
parent 8591d85710
commit 4faa28fd96
4 changed files with 31 additions and 2 deletions

View file

@ -52,6 +52,7 @@ struct _GstPipeWireClock {
struct pw_stream *stream;
GstClockTime last_time;
GstClockTimeDiff time_offset;
};
struct _GstPipeWireClockClass {
@ -62,6 +63,8 @@ GType gst_pipewire_clock_get_type (void);
GstClock * gst_pipewire_clock_new (struct pw_stream *stream,
GstClockTime last_time);
void gst_pipewire_clock_reset (GstPipeWireClock *clock,
GstClockTime time);
G_END_DECLS