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

Members

element (GstBaseSink) –
No description available
ringbuffer (GstAudioRingBuffer *) –
No description available
buffer_time (guint64) –
No description available
latency_time (guint64) –
No description available
next_sample (guint64) –
No description available
provided_clock (GstClock *) –
No description available
eos_rendering (gboolean) –
No description available

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.


GstAudioBaseSink

GObject
    ╰──GInitiallyUnowned
        ╰──GstObject
            ╰──GstElement
                ╰──GstBaseSink
                    ╰──GstAudioBaseSink
                        ╰──GstAudioSink

Members

element (GstBaseSink) –
No description available
ringbuffer (GstAudioRingBuffer) –
No description available
buffer_time (int) –
No description available
latency_time (int) –
No description available
next_sample (int) –
No description available
provided_clock (GstClock) –
No description available
eos_rendering (bool) –
No description available

GstAudioBaseSink

GObject
    ╰──GInitiallyUnowned
        ╰──GstObject
            ╰──GstElement
                ╰──GstBaseSink
                    ╰──GstAudioBaseSink
                        ╰──GstAudioSink

Members

element (GstBaseSink) –
No description available
ringbuffer (GstAudioRingBuffer) –
No description available
buffer_time (Number) –
No description available
latency_time (Number) –
No description available
next_sample (Number) –
No description available
provided_clock (GstClock) –
No description available
eos_rendering (Number) –
No description available

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

a GstAudioBaseSink.

Returns ( [transfer: none] ) –

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:

Returns ( GstAudio.AudioRingBuffer ) –

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:

Returns ( GstAudio.AudioRingBuffer ) –

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

a GstAudioBaseSink

Returns

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:

Returns ( int ) –

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:

Returns ( Number ) –

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

a GstAudioBaseSink

Returns

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:

Returns ( int ) –

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:

Returns ( Number ) –

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

a GstAudioBaseSink

Returns

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:

Returns ( int ) –

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:

Returns ( Number ) –

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

a GstAudioBaseSink

Returns

TRUE if sink will provide a clock.


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:

Returns ( bool ) –

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:

Returns ( Number ) –

true if sink will provide a clock.


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

a GstAudioBaseSink

Returns

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.


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.


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

a GstAudioBaseSink

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


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


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

a GstAudioBaseSink

alignment_threshold

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:

alignment_threshold ( int ) –

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:

alignment_threshold ( Number ) –

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

a GstAudioBaseSink

user_data

user data passed to the callback

notify

called when user_data becomes unused

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 ( variadic ) –

user data passed to the callback

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 ( Object ) –

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.

Parameters:

sink

a GstAudioBaseSink

discont_wait

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:

discont_wait ( int ) –

the new discont wait in nanoseconds


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:

discont_wait ( Number ) –

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.

Parameters:

sink

a GstAudioBaseSink

drift_tolerance

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:

drift_tolerance ( int ) –

the new drift tolerance in microseconds


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:

drift_tolerance ( Number ) –

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.

Parameters:

sink

a GstAudioBaseSink

provide

new state


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.

Parameters:

provide ( bool ) –

new state


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.

Parameters:

provide ( Number ) –

new state


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.

Parameters:

sink

a GstAudioBaseSink

method

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


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


Properties

alignment-threshold

“alignment-threshold” guint64

Flags : Read / Write


alignment_threshold

“self.props.alignment_threshold” int

Flags : Read / Write


alignment-threshold

“alignment-threshold” Number

Flags : Read / Write


buffer-time

“buffer-time” gint64

Flags : Read / Write


buffer_time

“self.props.buffer_time” int

Flags : Read / Write


buffer-time

“buffer-time” Number

Flags : Read / Write


can-activate-pull

“can-activate-pull” gboolean

Flags : Read / Write


can_activate_pull

“self.props.can_activate_pull” bool

Flags : Read / Write


can-activate-pull

“can-activate-pull” Number

Flags : Read / Write


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

“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


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


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

“self.props.drift_tolerance” int

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


latency-time

“latency-time” gint64

Flags : Read / Write


latency_time

“self.props.latency_time” int

Flags : Read / Write


latency-time

“latency-time” Number

Flags : Read / Write


provide-clock

“provide-clock” gboolean

Flags : Read / Write


provide_clock

“self.props.provide_clock” bool

Flags : Read / Write


provide-clock

“provide-clock” Number

Flags : Read / Write


slave-method

“slave-method” GstAudioBaseSinkSlaveMethod *

Flags : Read / Write


slave_method

“self.props.slave_method” GstAudio.AudioBaseSinkSlaveMethod

Flags : Read / Write


slave-method

“slave-method” GstAudio.AudioBaseSinkSlaveMethod

Flags : Read / Write


Virtual Methods

create_ringbuffer

GstAudioRingBuffer *
create_ringbuffer (GstAudioBaseSink * sink)

create and return a GstAudioRingBuffer to write to.

Parameters:

sink
No description available
Returns
No description available

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:

sink ( GstAudio.AudioBaseSink ) –
No description available
Returns ( GstAudio.AudioRingBuffer ) –
No description available

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:

sink ( GstAudio.AudioBaseSink ) –
No description available
Returns ( GstAudio.AudioRingBuffer ) –
No description available

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
No description available
buffer
No description available
Returns
No description available

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:

sink ( GstAudio.AudioBaseSink ) –
No description available
buffer ( Gst.Buffer ) –
No description available
Returns ( Gst.Buffer ) –
No description available

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:

sink ( GstAudio.AudioBaseSink ) –
No description available
buffer ( Gst.Buffer ) –
No description available
Returns ( Gst.Buffer ) –
No description available

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

a GstAudioBaseSink


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

a GstAudioBaseSink


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())


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 gst_audio_base_sink_report_device_failure())


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 gst_audio_base_sink_report_device_failure())


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

a GstAudioBaseSink

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

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:

etime ( int ) –

external clock time

itime ( int ) –

internal clock time

requested_skew ( int ) –

skew amount requested by the callback

discont_reason ( GstAudio.AudioBaseSinkDiscontReason ) –

reason for discontinuity (if any)

user_data ( variadic ) –

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:

etime ( Number ) –

external clock time

itime ( Number ) –

internal clock time

requested_skew ( Number ) –

skew amount requested by the callback

discont_reason ( GstAudio.AudioBaseSinkDiscontReason ) –

reason for discontinuity (if any)

user_data ( Object ) –

user data

Since : 1.6


The results of the search are