AudioClock

#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.

Constructors

this
this(string name, gstaudio.types.AudioClockGetTimeFunc func)

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.

Members

Functions

adjust
gst.types.ClockTime adjust(gst.types.ClockTime time)

Adjust time with the internal offset of the audio clock.

getTime
gst.types.ClockTime getTime()

Report the time as returned by the #GstAudioClockGetTimeFunc without applying any offsets.

invalidate
void invalidate()

Invalidate the clock function. Call this function when the provided #GstAudioClockGetTimeFunc cannot be called anymore, for example, when the user_data becomes invalid.

reset
void reset(gst.types.ClockTime 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.

Inherited Members

From SystemClock

obtain
gst.clock.Clock obtain()

Get a handle to the default system clock. The refcount of the clock will be increased so you need to unref the clock after usage.

setDefault
void setDefault(gst.clock.Clock newClock)

Sets the default system clock that can be obtained with gst.system_clock.SystemClock.obtain.