| Top |  |  |  |  | 
GObject ╰── GInitiallyUnowned ╰── GstObject ╰── GstClock ╰── GstSystemClock ╰── GstAudioClock
GstAudioClock makes it easy for elements to implement a GstClock, they simply need to provide a function that returns the current clock time.
This object is internally used to implement the clock in GstAudioBaseSink.
GstClockTime (*GstAudioClockGetTimeFunc) (GstClock *clock,gpointer user_data);
This function will be called whenever the current clock time needs to be calculated. If this function returns GST_CLOCK_TIME_NONE, the last reported time will be returned by the clock.
GstClock * gst_audio_clock_new (const gchar *name,GstAudioClockGetTimeFunc func,gpointer user_data,GDestroyNotify destroy_notify);
Create a new GstAudioClock instance. Whenever the clock time should be
calculated it will call func
 with user_data
. When func
 returns
GST_CLOCK_TIME_NONE, the clock will return the last reported time.
| name | the name of the clock | |
| func | a function | |
| user_data | user data | |
| destroy_notify | GDestroyNotify for  | 
GstClockTime gst_audio_clock_adjust (GstAudioClock *clock,GstClockTime time);
Adjust time
 with the internal offset of the audio clock.
GstClockTime
gst_audio_clock_get_time (GstAudioClock *clock);
Report the time as returned by the GstAudioClockGetTimeFunc without applying any offsets.
void gst_audio_clock_reset (GstAudioClock *clock,GstClockTime time);
Inform clock
 that future calls to GstAudioClockGetTimeFunc will return values
starting from time
. The clock will update an internal offset to make sure that
future calls to internal_time will return an increasing result as required by
the GstClock object.
void
gst_audio_clock_invalidate (GstAudioClock *clock);
Invalidate the clock function. Call this function when the provided GstAudioClockGetTimeFunc cannot be called anymore, for example, when the user_data becomes invalid.
After calling this function, clock
 will return the last returned time for
the rest of its lifetime.