GstAudioBaseSink
This is the base class for audio sinks. Subclasses need to implement the ::create_ringbuffer vmethod. This base class will then take care of writing samples to the ringbuffer, synchronisation, clipping and flushing.
GstAudioBaseSink
GObject ╰──GInitiallyUnowned ╰──GstObject ╰──GstElement ╰──GstBaseSink ╰──GstAudioBaseSink ╰──GstAudioSink
Opaque GstAudioBaseSink.
Members
element
(GstBaseSink)
–
ringbuffer
(GstAudioRingBuffer *)
–
buffer_time
(guint64)
–
latency_time
(guint64)
–
next_sample
(guint64)
–
provided_clock
(GstClock *)
–
eos_rendering
(gboolean)
–
Class structure
GstAudioBaseSinkClass
GstAudioBaseSink class. Override the vmethod to implement functionality.
Fields
parent_class
(GstBaseSinkClass)
–
the parent class.
GstAudio.AudioBaseSinkClass
GstAudio.AudioBaseSink class. Override the vmethod to implement functionality.
Attributes
parent_class
(GstBase.BaseSinkClass)
–
the parent class.
GstAudio.AudioBaseSinkClass
GstAudio.AudioBaseSink class. Override the vmethod to implement functionality.
Attributes
parent_class
(GstBase.BaseSinkClass)
–
the parent class.
GstAudio.AudioBaseSink
GObject.Object ╰──GObject.InitiallyUnowned ╰──Gst.Object ╰──Gst.Element ╰──GstBase.BaseSink ╰──GstAudio.AudioBaseSink ╰──GstAudio.AudioSink
Opaque GstAudio.AudioBaseSink.
Members
element
(GstBase.BaseSink)
–
ringbuffer
(GstAudio.AudioRingBuffer)
–
buffer_time
(Number)
–
latency_time
(Number)
–
next_sample
(Number)
–
provided_clock
(Gst.Clock)
–
eos_rendering
(Number)
–
GstAudio.AudioBaseSink
GObject.Object ╰──GObject.InitiallyUnowned ╰──Gst.Object ╰──Gst.Element ╰──GstBase.BaseSink ╰──GstAudio.AudioBaseSink ╰──GstAudio.AudioSink
Opaque GstAudio.AudioBaseSink.
Members
element
(GstBase.BaseSink)
–
ringbuffer
(GstAudio.AudioRingBuffer)
–
buffer_time
(int)
–
latency_time
(int)
–
next_sample
(int)
–
provided_clock
(Gst.Clock)
–
eos_rendering
(bool)
–
Methods
gst_audio_base_sink_create_ringbuffer
GstAudioRingBuffer * gst_audio_base_sink_create_ringbuffer (GstAudioBaseSink * sink)
Create and return the GstAudioRingBuffer for sink. This function will call the ::create_ringbuffer vmethod and will set sink as the parent of the returned buffer (see gst_object_set_parent).
Parameters:
sink
–
The new ringbuffer of sink.
GstAudio.AudioBaseSink.prototype.create_ringbuffer
function GstAudio.AudioBaseSink.prototype.create_ringbuffer(): {
// javascript wrapper for 'gst_audio_base_sink_create_ringbuffer'
}
Create and return the GstAudio.AudioRingBuffer for sink. This function will call the ::create_ringbuffer vmethod and will set sink as the parent of the returned buffer (see Gst.Object.prototype.set_parent).
Parameters:
The new ringbuffer of sink.
GstAudio.AudioBaseSink.create_ringbuffer
def GstAudio.AudioBaseSink.create_ringbuffer (self):
#python wrapper for 'gst_audio_base_sink_create_ringbuffer'
Create and return the GstAudio.AudioRingBuffer for sink. This function will call the ::create_ringbuffer vmethod and will set sink as the parent of the returned buffer (see Gst.Object.set_parent).
Parameters:
The new ringbuffer of sink.
gst_audio_base_sink_get_alignment_threshold
GstClockTime gst_audio_base_sink_get_alignment_threshold (GstAudioBaseSink * sink)
Get the current alignment threshold, in nanoseconds, used by sink.
Parameters:
sink
–
The current alignment threshold used by sink.
GstAudio.AudioBaseSink.prototype.get_alignment_threshold
function GstAudio.AudioBaseSink.prototype.get_alignment_threshold(): {
// javascript wrapper for 'gst_audio_base_sink_get_alignment_threshold'
}
Get the current alignment threshold, in nanoseconds, used by sink.
Parameters:
The current alignment threshold used by sink.
GstAudio.AudioBaseSink.get_alignment_threshold
def GstAudio.AudioBaseSink.get_alignment_threshold (self):
#python wrapper for 'gst_audio_base_sink_get_alignment_threshold'
Get the current alignment threshold, in nanoseconds, used by sink.
Parameters:
The current alignment threshold used by sink.
gst_audio_base_sink_get_discont_wait
GstClockTime gst_audio_base_sink_get_discont_wait (GstAudioBaseSink * sink)
Get the current discont wait, in nanoseconds, used by sink.
Parameters:
sink
–
The current discont wait used by sink.
GstAudio.AudioBaseSink.prototype.get_discont_wait
function GstAudio.AudioBaseSink.prototype.get_discont_wait(): {
// javascript wrapper for 'gst_audio_base_sink_get_discont_wait'
}
Get the current discont wait, in nanoseconds, used by sink.
Parameters:
The current discont wait used by sink.
GstAudio.AudioBaseSink.get_discont_wait
def GstAudio.AudioBaseSink.get_discont_wait (self):
#python wrapper for 'gst_audio_base_sink_get_discont_wait'
Get the current discont wait, in nanoseconds, used by sink.
Parameters:
The current discont wait used by sink.
gst_audio_base_sink_get_drift_tolerance
gint64 gst_audio_base_sink_get_drift_tolerance (GstAudioBaseSink * sink)
Get the current drift tolerance, in microseconds, used by sink.
Parameters:
sink
–
The current drift tolerance used by sink.
GstAudio.AudioBaseSink.prototype.get_drift_tolerance
function GstAudio.AudioBaseSink.prototype.get_drift_tolerance(): {
// javascript wrapper for 'gst_audio_base_sink_get_drift_tolerance'
}
Get the current drift tolerance, in microseconds, used by sink.
Parameters:
The current drift tolerance used by sink.
GstAudio.AudioBaseSink.get_drift_tolerance
def GstAudio.AudioBaseSink.get_drift_tolerance (self):
#python wrapper for 'gst_audio_base_sink_get_drift_tolerance'
Get the current drift tolerance, in microseconds, used by sink.
Parameters:
The current drift tolerance used by sink.
gst_audio_base_sink_get_provide_clock
gboolean gst_audio_base_sink_get_provide_clock (GstAudioBaseSink * sink)
Queries whether sink will provide a clock or not. See also gst_audio_base_sink_set_provide_clock.
Parameters:
sink
–
TRUE if sink will provide a clock.
GstAudio.AudioBaseSink.prototype.get_provide_clock
function GstAudio.AudioBaseSink.prototype.get_provide_clock(): {
// javascript wrapper for 'gst_audio_base_sink_get_provide_clock'
}
Queries whether sink will provide a clock or not. See also gst_audio_base_sink_set_provide_clock.
Parameters:
GstAudio.AudioBaseSink.get_provide_clock
def GstAudio.AudioBaseSink.get_provide_clock (self):
#python wrapper for 'gst_audio_base_sink_get_provide_clock'
Queries whether sink will provide a clock or not. See also gst_audio_base_sink_set_provide_clock.
Parameters:
gst_audio_base_sink_get_slave_method
GstAudioBaseSinkSlaveMethod gst_audio_base_sink_get_slave_method (GstAudioBaseSink * sink)
Get the current slave method used by sink.
Parameters:
sink
–
The current slave method used by sink.
GstAudio.AudioBaseSink.prototype.get_slave_method
function GstAudio.AudioBaseSink.prototype.get_slave_method(): {
// javascript wrapper for 'gst_audio_base_sink_get_slave_method'
}
Get the current slave method used by sink.
Parameters:
The current slave method used by sink.
GstAudio.AudioBaseSink.get_slave_method
def GstAudio.AudioBaseSink.get_slave_method (self):
#python wrapper for 'gst_audio_base_sink_get_slave_method'
Get the current slave method used by sink.
Parameters:
The current slave method used by sink.
gst_audio_base_sink_report_device_failure
gst_audio_base_sink_report_device_failure (GstAudioBaseSink * sink)
Informs this base class that the audio output device has failed for some reason, causing a discontinuity (for example, because the device recovered from the error, but lost all contents of its ring buffer). This function is typically called by derived classes, and is useful for the custom slave method.
Parameters:
sink
–
Since : 1.6
GstAudio.AudioBaseSink.prototype.report_device_failure
function GstAudio.AudioBaseSink.prototype.report_device_failure(): {
// javascript wrapper for 'gst_audio_base_sink_report_device_failure'
}
Informs this base class that the audio output device has failed for some reason, causing a discontinuity (for example, because the device recovered from the error, but lost all contents of its ring buffer). This function is typically called by derived classes, and is useful for the custom slave method.
Parameters:
Since : 1.6
GstAudio.AudioBaseSink.report_device_failure
def GstAudio.AudioBaseSink.report_device_failure (self):
#python wrapper for 'gst_audio_base_sink_report_device_failure'
Informs this base class that the audio output device has failed for some reason, causing a discontinuity (for example, because the device recovered from the error, but lost all contents of its ring buffer). This function is typically called by derived classes, and is useful for the custom slave method.
Parameters:
Since : 1.6
gst_audio_base_sink_set_alignment_threshold
gst_audio_base_sink_set_alignment_threshold (GstAudioBaseSink * sink, GstClockTime alignment_threshold)
Controls the sink's alignment threshold.
Parameters:
sink
–
alignment_threshold
–
the new alignment threshold in nanoseconds
GstAudio.AudioBaseSink.prototype.set_alignment_threshold
function GstAudio.AudioBaseSink.prototype.set_alignment_threshold(alignment_threshold: Number): {
// javascript wrapper for 'gst_audio_base_sink_set_alignment_threshold'
}
Controls the sink's alignment threshold.
Parameters:
the new alignment threshold in nanoseconds
GstAudio.AudioBaseSink.set_alignment_threshold
def GstAudio.AudioBaseSink.set_alignment_threshold (self, alignment_threshold):
#python wrapper for 'gst_audio_base_sink_set_alignment_threshold'
Controls the sink's alignment threshold.
Parameters:
the new alignment threshold in nanoseconds
gst_audio_base_sink_set_custom_slaving_callback
gst_audio_base_sink_set_custom_slaving_callback (GstAudioBaseSink * sink, GstAudioBaseSinkCustomSlavingCallback callback, gpointer user_data, GDestroyNotify notify)
Sets the custom slaving callback. This callback will be invoked if the slave-method property is set to GST_AUDIO_BASE_SINK_SLAVE_CUSTOM and the audio sink receives and plays samples.
Setting the callback to NULL causes the sink to behave as if the GST_AUDIO_BASE_SINK_SLAVE_NONE method were used.
Parameters:
sink
–
callback
–
user_data
–
user data passed to the callback
notify
–
called when user_data becomes unused
Since : 1.6
GstAudio.AudioBaseSink.prototype.set_custom_slaving_callback
function GstAudio.AudioBaseSink.prototype.set_custom_slaving_callback(callback: GstAudio.AudioBaseSinkCustomSlavingCallback, user_data: Object): {
// javascript wrapper for 'gst_audio_base_sink_set_custom_slaving_callback'
}
Sets the custom slaving callback. This callback will be invoked if the slave-method property is set to GST_AUDIO_BASE_SINK_SLAVE_CUSTOM and the audio sink receives and plays samples.
Setting the callback to NULL causes the sink to behave as if the GST_AUDIO_BASE_SINK_SLAVE_NONE method were used.
Parameters:
user data passed to the callback
Since : 1.6
GstAudio.AudioBaseSink.set_custom_slaving_callback
def GstAudio.AudioBaseSink.set_custom_slaving_callback (self, callback, *user_data):
#python wrapper for 'gst_audio_base_sink_set_custom_slaving_callback'
Sets the custom slaving callback. This callback will be invoked if the slave-method property is set to GST_AUDIO_BASE_SINK_SLAVE_CUSTOM and the audio sink receives and plays samples.
Setting the callback to NULL causes the sink to behave as if the GST_AUDIO_BASE_SINK_SLAVE_NONE method were used.
Parameters:
user data passed to the callback
Since : 1.6
gst_audio_base_sink_set_discont_wait
gst_audio_base_sink_set_discont_wait (GstAudioBaseSink * sink, GstClockTime discont_wait)
Controls how long the sink will wait before creating a discontinuity.
GstAudio.AudioBaseSink.prototype.set_discont_wait
function GstAudio.AudioBaseSink.prototype.set_discont_wait(discont_wait: Number): {
// javascript wrapper for 'gst_audio_base_sink_set_discont_wait'
}
Controls how long the sink will wait before creating a discontinuity.
Parameters:
the new discont wait in nanoseconds
GstAudio.AudioBaseSink.set_discont_wait
def GstAudio.AudioBaseSink.set_discont_wait (self, discont_wait):
#python wrapper for 'gst_audio_base_sink_set_discont_wait'
Controls how long the sink will wait before creating a discontinuity.
Parameters:
the new discont wait in nanoseconds
gst_audio_base_sink_set_drift_tolerance
gst_audio_base_sink_set_drift_tolerance (GstAudioBaseSink * sink, gint64 drift_tolerance)
Controls the sink's drift tolerance.
GstAudio.AudioBaseSink.prototype.set_drift_tolerance
function GstAudio.AudioBaseSink.prototype.set_drift_tolerance(drift_tolerance: Number): {
// javascript wrapper for 'gst_audio_base_sink_set_drift_tolerance'
}
Controls the sink's drift tolerance.
Parameters:
the new drift tolerance in microseconds
GstAudio.AudioBaseSink.set_drift_tolerance
def GstAudio.AudioBaseSink.set_drift_tolerance (self, drift_tolerance):
#python wrapper for 'gst_audio_base_sink_set_drift_tolerance'
Controls the sink's drift tolerance.
Parameters:
the new drift tolerance in microseconds
gst_audio_base_sink_set_provide_clock
gst_audio_base_sink_set_provide_clock (GstAudioBaseSink * sink, gboolean provide)
Controls whether sink will provide a clock or not. If provide is TRUE, gst_element_provide_clock will return a clock that reflects the datarate of sink. If provide is FALSE, gst_element_provide_clock will return NULL.
GstAudio.AudioBaseSink.prototype.set_provide_clock
function GstAudio.AudioBaseSink.prototype.set_provide_clock(provide: Number): {
// javascript wrapper for 'gst_audio_base_sink_set_provide_clock'
}
Controls whether sink will provide a clock or not. If provide is true, Gst.Element.prototype.provide_clock will return a clock that reflects the datarate of sink. If provide is false, Gst.Element.prototype.provide_clock will return NULL.
GstAudio.AudioBaseSink.set_provide_clock
def GstAudio.AudioBaseSink.set_provide_clock (self, provide):
#python wrapper for 'gst_audio_base_sink_set_provide_clock'
Controls whether sink will provide a clock or not. If provide is True, Gst.Element.provide_clock will return a clock that reflects the datarate of sink. If provide is False, Gst.Element.provide_clock will return NULL.
gst_audio_base_sink_set_slave_method
gst_audio_base_sink_set_slave_method (GstAudioBaseSink * sink, GstAudioBaseSinkSlaveMethod method)
Controls how clock slaving will be performed in sink.
GstAudio.AudioBaseSink.prototype.set_slave_method
function GstAudio.AudioBaseSink.prototype.set_slave_method(method: GstAudio.AudioBaseSinkSlaveMethod): {
// javascript wrapper for 'gst_audio_base_sink_set_slave_method'
}
Controls how clock slaving will be performed in sink.
Parameters:
the new slave method
GstAudio.AudioBaseSink.set_slave_method
def GstAudio.AudioBaseSink.set_slave_method (self, method):
#python wrapper for 'gst_audio_base_sink_set_slave_method'
Controls how clock slaving will be performed in sink.
Parameters:
the new slave method
Properties
discont-wait
“discont-wait” guint64
A window of time in nanoseconds to wait before creating a discontinuity as a result of breaching the drift-tolerance.
Flags : Read / Write
discont-wait
“discont-wait” Number
A window of time in nanoseconds to wait before creating a discontinuity as a result of breaching the drift-tolerance.
Flags : Read / Write
discont_wait
“self.props.discont_wait” int
A window of time in nanoseconds to wait before creating a discontinuity as a result of breaching the drift-tolerance.
Flags : Read / Write
drift-tolerance
“drift-tolerance” gint64
Controls the amount of time in microseconds that clocks are allowed to drift before resynchronisation happens.
Flags : Read / Write
drift-tolerance
“drift-tolerance” Number
Controls the amount of time in microseconds that clocks are allowed to drift before resynchronisation happens.
Flags : Read / Write
drift_tolerance
“self.props.drift_tolerance” int
Controls the amount of time in microseconds that clocks are allowed to drift before resynchronisation happens.
Flags : Read / Write
Virtual Methods
create_ringbuffer
GstAudioRingBuffer * create_ringbuffer (GstAudioBaseSink * sink)
create and return a GstAudioRingBuffer to write to.
Parameters:
sink
–
vfunc_create_ringbuffer
function vfunc_create_ringbuffer(sink: GstAudio.AudioBaseSink): {
// javascript implementation of the 'create_ringbuffer' virtual method
}
create and return a GstAudio.AudioRingBuffer to write to.
Parameters:
do_create_ringbuffer
def do_create_ringbuffer (sink):
#python implementation of the 'create_ringbuffer' virtual method
create and return a GstAudio.AudioRingBuffer to write to.
Parameters:
payload
GstBuffer * payload (GstAudioBaseSink * sink, GstBuffer * buffer)
payload data in a format suitable to write to the sink. If no payloading is required, returns a reffed copy of the original buffer, else returns the payloaded buffer with all other metadata copied.
Parameters:
sink
–
buffer
–
vfunc_payload
function vfunc_payload(sink: GstAudio.AudioBaseSink, buffer: Gst.Buffer): {
// javascript implementation of the 'payload' virtual method
}
payload data in a format suitable to write to the sink. If no payloading is required, returns a reffed copy of the original buffer, else returns the payloaded buffer with all other metadata copied.
Parameters:
do_payload
def do_payload (sink, buffer):
#python implementation of the 'payload' virtual method
payload data in a format suitable to write to the sink. If no payloading is required, returns a reffed copy of the original buffer, else returns the payloaded buffer with all other metadata copied.
Parameters:
Function Macros
GST_AUDIO_BASE_SINK_CAST
#define GST_AUDIO_BASE_SINK_CAST(obj) ((GstAudioBaseSink*)obj)
GST_AUDIO_BASE_SINK_CLOCK
#define GST_AUDIO_BASE_SINK_CLOCK(obj) (GST_AUDIO_BASE_SINK (obj)->clock)
Get the GstClock of obj.
Parameters:
obj
–
GST_AUDIO_BASE_SINK_PAD
#define GST_AUDIO_BASE_SINK_PAD(obj) (GST_BASE_SINK (obj)->sinkpad)
Get the sink GstPad of obj.
Parameters:
obj
–
Enumerations
GstAudioBaseSinkDiscontReason
Different possible reasons for discontinuities. This enum is useful for the custom slave method.
Members
GST_AUDIO_BASE_SINK_DISCONT_REASON_NO_DISCONT
(0)
–
No discontinuity occurred
GST_AUDIO_BASE_SINK_DISCONT_REASON_NEW_CAPS
(1)
–
New caps are set, causing renegotiotion
GST_AUDIO_BASE_SINK_DISCONT_REASON_FLUSH
(2)
–
Samples have been flushed
GST_AUDIO_BASE_SINK_DISCONT_REASON_SYNC_LATENCY
(3)
–
Sink was synchronized to the estimated latency (occurs during initialization)
GST_AUDIO_BASE_SINK_DISCONT_REASON_ALIGNMENT
(4)
–
Aligning buffers failed because the timestamps are too discontinuous
GST_AUDIO_BASE_SINK_DISCONT_REASON_DEVICE_FAILURE
(5)
–
Audio output device experienced and recovered from an error but introduced latency in the process (see also gst_audio_base_sink_report_device_failure)
Since : 1.6
GstAudio.AudioBaseSinkDiscontReason
Different possible reasons for discontinuities. This enum is useful for the custom slave method.
Members
GstAudio.AudioBaseSinkDiscontReason.NO_DISCONT
(0)
–
No discontinuity occurred
GstAudio.AudioBaseSinkDiscontReason.NEW_CAPS
(1)
–
New caps are set, causing renegotiotion
GstAudio.AudioBaseSinkDiscontReason.FLUSH
(2)
–
Samples have been flushed
GstAudio.AudioBaseSinkDiscontReason.SYNC_LATENCY
(3)
–
Sink was synchronized to the estimated latency (occurs during initialization)
GstAudio.AudioBaseSinkDiscontReason.ALIGNMENT
(4)
–
Aligning buffers failed because the timestamps are too discontinuous
GstAudio.AudioBaseSinkDiscontReason.DEVICE_FAILURE
(5)
–
Audio output device experienced and recovered from an error but introduced latency in the process (see also GstAudio.AudioBaseSink.prototype.report_device_failure)
Since : 1.6
GstAudio.AudioBaseSinkDiscontReason
Different possible reasons for discontinuities. This enum is useful for the custom slave method.
Members
GstAudio.AudioBaseSinkDiscontReason.NO_DISCONT
(0)
–
No discontinuity occurred
GstAudio.AudioBaseSinkDiscontReason.NEW_CAPS
(1)
–
New caps are set, causing renegotiotion
GstAudio.AudioBaseSinkDiscontReason.FLUSH
(2)
–
Samples have been flushed
GstAudio.AudioBaseSinkDiscontReason.SYNC_LATENCY
(3)
–
Sink was synchronized to the estimated latency (occurs during initialization)
GstAudio.AudioBaseSinkDiscontReason.ALIGNMENT
(4)
–
Aligning buffers failed because the timestamps are too discontinuous
GstAudio.AudioBaseSinkDiscontReason.DEVICE_FAILURE
(5)
–
Audio output device experienced and recovered from an error but introduced latency in the process (see also GstAudio.AudioBaseSink.report_device_failure)
Since : 1.6
GstAudioBaseSinkSlaveMethod
Different possible clock slaving algorithms used when the internal audio clock is not selected as the pipeline master clock.
Members
GST_AUDIO_BASE_SINK_SLAVE_RESAMPLE
(0)
–
Resample to match the master clock
GST_AUDIO_BASE_SINK_SLAVE_SKEW
(1)
–
Adjust playout pointer when master clock drifts too much.
GST_AUDIO_BASE_SINK_SLAVE_NONE
(2)
–
No adjustment is done.
GST_AUDIO_BASE_SINK_SLAVE_CUSTOM
(3)
–
Use custom clock slaving algorithm (Since: 1.6)
GstAudio.AudioBaseSinkSlaveMethod
Different possible clock slaving algorithms used when the internal audio clock is not selected as the pipeline master clock.
Members
GstAudio.AudioBaseSinkSlaveMethod.RESAMPLE
(0)
–
Resample to match the master clock
GstAudio.AudioBaseSinkSlaveMethod.SKEW
(1)
–
Adjust playout pointer when master clock drifts too much.
GstAudio.AudioBaseSinkSlaveMethod.NONE
(2)
–
No adjustment is done.
GstAudio.AudioBaseSinkSlaveMethod.CUSTOM
(3)
–
Use custom clock slaving algorithm (Since: 1.6)
GstAudio.AudioBaseSinkSlaveMethod
Different possible clock slaving algorithms used when the internal audio clock is not selected as the pipeline master clock.
Members
GstAudio.AudioBaseSinkSlaveMethod.RESAMPLE
(0)
–
Resample to match the master clock
GstAudio.AudioBaseSinkSlaveMethod.SKEW
(1)
–
Adjust playout pointer when master clock drifts too much.
GstAudio.AudioBaseSinkSlaveMethod.NONE
(2)
–
No adjustment is done.
GstAudio.AudioBaseSinkSlaveMethod.CUSTOM
(3)
–
Use custom clock slaving algorithm (Since: 1.6)
Callbacks
GstAudioBaseSinkCustomSlavingCallback
(*GstAudioBaseSinkCustomSlavingCallback) (GstAudioBaseSink * sink, GstClockTime etime, GstClockTime itime, GstClockTimeDiff * requested_skew, GstAudioBaseSinkDiscontReason discont_reason, gpointer user_data)
This function is set with gst_audio_base_sink_set_custom_slaving_callback and is called during playback. It receives the current time of external and internal clocks, which the callback can then use to apply any custom slaving/synchronization schemes.
The external clock is the sink's element clock, the internal one is the internal audio clock. The internal audio clock's calibration is applied to the timestamps before they are passed to the callback. The difference between etime and itime is the skew; how much internal and external clock lie apart from each other. A skew of 0 means both clocks are perfectly in sync. itime > etime means the external clock is going slower, while itime < etime means it is going faster than the internal clock. etime and itime are always valid timestamps, except for when a discontinuity happens.
requested_skew is an output value the callback can write to. It informs the sink of whether or not it should move the playout pointer, and if so, by how much. This pointer is only NULL if a discontinuity occurs; otherwise, it is safe to write to *requested_skew. The default skew is 0.
The sink may experience discontinuities. If one happens, discont is TRUE, itime, etime are set to GST_CLOCK_TIME_NONE, and requested_skew is NULL. This makes it possible to reset custom clock slaving algorithms when a discontinuity happens.
Parameters:
sink
–
etime
–
external clock time
itime
–
internal clock time
requested_skew
–
skew amount requested by the callback
discont_reason
–
reason for discontinuity (if any)
user_data
–
user data
Since : 1.6
GstAudio.AudioBaseSinkCustomSlavingCallback
function GstAudio.AudioBaseSinkCustomSlavingCallback(sink: GstAudio.AudioBaseSink, etime: Number, itime: Number, requested_skew: Number, discont_reason: GstAudio.AudioBaseSinkDiscontReason, user_data: Object): {
// javascript wrapper for 'GstAudioBaseSinkCustomSlavingCallback'
}
This function is set with GstAudio.AudioBaseSink.prototype.set_custom_slaving_callback and is called during playback. It receives the current time of external and internal clocks, which the callback can then use to apply any custom slaving/synchronization schemes.
The external clock is the sink's element clock, the internal one is the internal audio clock. The internal audio clock's calibration is applied to the timestamps before they are passed to the callback. The difference between etime and itime is the skew; how much internal and external clock lie apart from each other. A skew of 0 means both clocks are perfectly in sync. itime > etime means the external clock is going slower, while itime < etime means it is going faster than the internal clock. etime and itime are always valid timestamps, except for when a discontinuity happens.
requested_skew is an output value the callback can write to. It informs the sink of whether or not it should move the playout pointer, and if so, by how much. This pointer is only NULL if a discontinuity occurs; otherwise, it is safe to write to *requested_skew. The default skew is 0.
The sink may experience discontinuities. If one happens, discont is TRUE, itime, etime are set to GST_CLOCK_TIME_NONE, and requested_skew is NULL. This makes it possible to reset custom clock slaving algorithms when a discontinuity happens.
Parameters:
external clock time
internal clock time
skew amount requested by the callback
reason for discontinuity (if any)
user data
Since : 1.6
GstAudio.AudioBaseSinkCustomSlavingCallback
def GstAudio.AudioBaseSinkCustomSlavingCallback (sink, etime, itime, requested_skew, discont_reason, *user_data):
#python wrapper for 'GstAudioBaseSinkCustomSlavingCallback'
This function is set with GstAudio.AudioBaseSink.set_custom_slaving_callback and is called during playback. It receives the current time of external and internal clocks, which the callback can then use to apply any custom slaving/synchronization schemes.
The external clock is the sink's element clock, the internal one is the internal audio clock. The internal audio clock's calibration is applied to the timestamps before they are passed to the callback. The difference between etime and itime is the skew; how much internal and external clock lie apart from each other. A skew of 0 means both clocks are perfectly in sync. itime > etime means the external clock is going slower, while itime < etime means it is going faster than the internal clock. etime and itime are always valid timestamps, except for when a discontinuity happens.
requested_skew is an output value the callback can write to. It informs the sink of whether or not it should move the playout pointer, and if so, by how much. This pointer is only NULL if a discontinuity occurs; otherwise, it is safe to write to *requested_skew. The default skew is 0.
The sink may experience discontinuities. If one happens, discont is TRUE, itime, etime are set to GST_CLOCK_TIME_NONE, and requested_skew is NULL. This makes it possible to reset custom clock slaving algorithms when a discontinuity happens.
Parameters:
external clock time
internal clock time
skew amount requested by the callback
reason for discontinuity (if any)
user data
Since : 1.6
The results of the search are