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.
GstAudioClock
GObject ╰──GInitiallyUnowned ╰──GstObject ╰──GstClock ╰──GstSystemClock ╰──GstAudioClock
Opaque GstAudioClock.
Members
clock
(GstSystemClock)
–
func
(GstAudioClockGetTimeFunc)
–
user_data
(gpointer)
–
destroy_notify
(GDestroyNotify)
–
Class structure
GstAudio.AudioClock
GObject.Object ╰──GObject.InitiallyUnowned ╰──Gst.Object ╰──Gst.Clock ╰──Gst.SystemClock ╰──GstAudio.AudioClock
Opaque GstAudio.AudioClock.
Members
clock
(Gst.SystemClock)
–
func
(GstAudio.AudioClockGetTimeFunc)
–
user_data
(Object)
–
destroy_notify
(GLib.DestroyNotify)
–
GstAudio.AudioClock
GObject.Object ╰──GObject.InitiallyUnowned ╰──Gst.Object ╰──Gst.Clock ╰──Gst.SystemClock ╰──GstAudio.AudioClock
Opaque GstAudio.AudioClock.
Members
clock
(Gst.SystemClock)
–
func
(GstAudio.AudioClockGetTimeFunc)
–
user_data
(object)
–
destroy_notify
(GLib.DestroyNotify)
–
Constructors
gst_audio_clock_new
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.
Parameters:
name
–
the name of the clock
func
–
a function
user_data
–
user data
destroy_notify
–
GDestroyNotify for user_data
a new GstAudioClock casted to a GstClock.
GstAudio.AudioClock.prototype.new
function GstAudio.AudioClock.prototype.new(name: String, func: GstAudio.AudioClockGetTimeFunc, user_data: Object): {
// javascript wrapper for 'gst_audio_clock_new'
}
Create a new GstAudio.AudioClock 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.
Parameters:
the name of the clock
a function
user data
a new GstAudio.AudioClock casted to a Gst.Clock.
GstAudio.AudioClock.new
def GstAudio.AudioClock.new (name, func, *user_data):
#python wrapper for 'gst_audio_clock_new'
Create a new GstAudio.AudioClock 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.
Parameters:
the name of the clock
a function
user data
a new GstAudio.AudioClock casted to a Gst.Clock.
Methods
gst_audio_clock_adjust
GstClockTime gst_audio_clock_adjust (GstAudioClock * clock, GstClockTime time)
Adjust time with the internal offset of the audio clock.
time adjusted with the internal offset.
GstAudio.AudioClock.prototype.adjust
function GstAudio.AudioClock.prototype.adjust(time: Number): {
// javascript wrapper for 'gst_audio_clock_adjust'
}
Adjust time with the internal offset of the audio clock.
time adjusted with the internal offset.
GstAudio.AudioClock.adjust
def GstAudio.AudioClock.adjust (self, time):
#python wrapper for 'gst_audio_clock_adjust'
Adjust time with the internal offset of the audio clock.
time adjusted with the internal offset.
gst_audio_clock_get_time
GstClockTime gst_audio_clock_get_time (GstAudioClock * clock)
Report the time as returned by the GstAudioClockGetTimeFunc without applying any offsets.
Parameters:
clock
–
the time as reported by the time function of the audio clock
GstAudio.AudioClock.prototype.get_time
function GstAudio.AudioClock.prototype.get_time(): {
// javascript wrapper for 'gst_audio_clock_get_time'
}
Report the time as returned by the GstAudio.AudioClockGetTimeFunc without applying any offsets.
Parameters:
the time as reported by the time function of the audio clock
GstAudio.AudioClock.get_time
def GstAudio.AudioClock.get_time (self):
#python wrapper for 'gst_audio_clock_get_time'
Report the time as returned by the GstAudio.AudioClockGetTimeFunc without applying any offsets.
Parameters:
the time as reported by the time function of the audio clock
gst_audio_clock_invalidate
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.
Parameters:
clock
–
GstAudio.AudioClock.prototype.invalidate
function GstAudio.AudioClock.prototype.invalidate(): {
// javascript wrapper for 'gst_audio_clock_invalidate'
}
Invalidate the clock function. Call this function when the provided GstAudio.AudioClockGetTimeFunc 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.
Parameters:
GstAudio.AudioClock.invalidate
def GstAudio.AudioClock.invalidate (self):
#python wrapper for 'gst_audio_clock_invalidate'
Invalidate the clock function. Call this function when the provided GstAudio.AudioClockGetTimeFunc 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.
Parameters:
gst_audio_clock_reset
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.
GstAudio.AudioClock.prototype.reset
function GstAudio.AudioClock.prototype.reset(time: Number): {
// javascript wrapper for 'gst_audio_clock_reset'
}
Inform clock that future calls to GstAudio.AudioClockGetTimeFunc 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 Gst.Clock object.
GstAudio.AudioClock.reset
def GstAudio.AudioClock.reset (self, time):
#python wrapper for 'gst_audio_clock_reset'
Inform clock that future calls to GstAudio.AudioClockGetTimeFunc 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 Gst.Clock object.
Function Macros
GST_AUDIO_CLOCK_CAST
#define GST_AUDIO_CLOCK_CAST(obj) \ ((GstAudioClock*)(obj))
Constants
GST_TYPE_AUDIO_CLOCK
#define GST_TYPE_AUDIO_CLOCK \ (gst_audio_clock_get_type())
Callbacks
GstAudioClockGetTimeFunc
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.
the current time or GST_CLOCK_TIME_NONE if the previous time should be used.
GstAudio.AudioClockGetTimeFunc
function GstAudio.AudioClockGetTimeFunc(clock: Gst.Clock, user_data: Object): {
// javascript wrapper for 'GstAudioClockGetTimeFunc'
}
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.
the current time or Gst.CLOCK_TIME_NONE if the previous time should be used.
GstAudio.AudioClockGetTimeFunc
def GstAudio.AudioClockGetTimeFunc (clock, *user_data):
#python wrapper for 'GstAudioClockGetTimeFunc'
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.
the current time or Gst.CLOCK_TIME_NONE if the previous time should be used.
The results of the search are