GstAudio.AudioBaseSink¶
- Subclasses:
Methods¶
- Inherited:
GstBase.BaseSink (31), Gst.Element (82), Gst.Object (27), GObject.Object (37)
- Structs:
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
|
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
Timestamp alignment threshold in nanoseconds |
||
r/w |
Size of audio buffer in microseconds, this is the minimum latency that the sink reports |
||
r/w |
Allow pull-based scheduling |
||
r/w |
Window of time in nanoseconds to wait before creating a discontinuity |
||
r/w |
Tolerance for clock drift in microseconds |
||
r/w |
The minimum amount of data to write in each iteration in microseconds |
||
r/w |
Provide a clock to be used as the global pipeline clock |
||
r/w |
Algorithm used to match the rate of the masterclock |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
buffer_time |
r |
||
element |
r |
||
eos_rendering |
r |
||
latency_time |
r |
||
next_sample |
r |
||
provided_clock |
r |
||
ringbuffer |
r |
Class Details¶
- class GstAudio.AudioBaseSink(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
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.
- create_ringbuffer()[source]¶
- Returns:
The new ringbuffer of self.
- Return type:
Create and return the
GstAudio.AudioRingBuffer
for self. This function will call the ::create_ringbuffer vmethod and will set self as the parent of the returned buffer (seeGst.Object.set_parent
()).
- get_alignment_threshold()[source]¶
- Returns:
The current alignment threshold used by self.
- Return type:
Get the current alignment threshold, in nanoseconds, used by self.
- get_discont_wait()[source]¶
- Returns:
The current discont wait used by self.
- Return type:
Get the current discont wait, in nanoseconds, used by self.
- get_drift_tolerance()[source]¶
- Returns:
The current drift tolerance used by self.
- Return type:
Get the current drift tolerance, in microseconds, used by self.
- get_provide_clock()[source]¶
-
Queries whether self will provide a clock or not. See also
GstAudio.AudioBaseSink.set_provide_clock
.
- get_slave_method()[source]¶
- Returns:
The current slave method used by self.
- Return type:
Get the current slave method used by self.
- report_device_failure()[source]¶
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.
New in version 1.6.
- set_alignment_threshold(alignment_threshold)[source]¶
- Parameters:
alignment_threshold (
int
) – the new alignment threshold in nanoseconds
Controls the sink’s alignment threshold.
- set_custom_slaving_callback(callback, *user_data)[source]¶
- Parameters:
callback (
GstAudio.AudioBaseSinkCustomSlavingCallback
) – aGstAudio.AudioBaseSinkCustomSlavingCallback
user_data (
object
orNone
) – user data passed to the callback
Sets the custom slaving callback. This callback will be invoked if the slave-method property is set to
GstAudio.AudioBaseSinkSlaveMethod.CUSTOM
and the audio sink receives and plays samples.Setting the callback to
None
causes the sink to behave as if theGstAudio.AudioBaseSinkSlaveMethod.NONE
method were used.New in version 1.6.
- set_discont_wait(discont_wait)[source]¶
- Parameters:
discont_wait (
int
) – the new discont wait in nanoseconds
Controls how long the sink will wait before creating a discontinuity.
- set_drift_tolerance(drift_tolerance)[source]¶
- Parameters:
drift_tolerance (
int
) – the new drift tolerance in microseconds
Controls the sink’s drift tolerance.
- set_provide_clock(provide)[source]¶
- Parameters:
provide (
bool
) – new state
Controls whether self will provide a clock or not. If provide is
True
,Gst.Element.provide_clock
() will return a clock that reflects the datarate of self. If provide isFalse
,Gst.Element.provide_clock
() will returnNone
.
- set_slave_method(method)[source]¶
- Parameters:
method (
GstAudio.AudioBaseSinkSlaveMethod
) – the new slave method
Controls how clock slaving will be performed in self.
- do_create_ringbuffer() virtual¶
- Returns:
The new ringbuffer of sink.
- Return type:
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 (seeGst.Object.set_parent
()).
- do_payload(buffer) virtual¶
- Parameters:
buffer (
Gst.Buffer
) –- Return type:
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.
Property Details¶
- GstAudio.AudioBaseSink.props.alignment_threshold¶
-
Timestamp alignment threshold in nanoseconds
- GstAudio.AudioBaseSink.props.buffer_time¶
-
Size of audio buffer in microseconds, this is the minimum latency that the sink reports
- GstAudio.AudioBaseSink.props.can_activate_pull¶
-
Allow pull-based scheduling
- GstAudio.AudioBaseSink.props.discont_wait¶
-
A window of time in nanoseconds to wait before creating a discontinuity as a result of breaching the drift-tolerance.
- GstAudio.AudioBaseSink.props.drift_tolerance¶
-
Controls the amount of time in microseconds that clocks are allowed to drift before resynchronisation happens.
- GstAudio.AudioBaseSink.props.latency_time¶
-
The minimum amount of data to write in each iteration in microseconds
- GstAudio.AudioBaseSink.props.provide_clock¶
-
Provide a clock to be used as the global pipeline clock
- GstAudio.AudioBaseSink.props.slave_method¶
- Name:
slave-method
- Type:
- Default Value:
- Flags:
Algorithm used to match the rate of the masterclock