GstAudio.AudioSink¶
- Subclasses:
None
Methods¶
Virtual Methods¶
- Inherited:
GstAudio.AudioBaseSink (2), GstBase.BaseSink (18), Gst.Element (16), Gst.Object (1), GObject.Object (7)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Properties¶
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
element |
r |
||
thread |
r |
Class Details¶
- class GstAudio.AudioSink(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
This is the most simple base class for audio sinks that only requires subclasses to implement a set of simple functions:
open()
:Open
the device.prepare()
:Configure
the device with the specified format.write()
:Write
samples to the device.reset()
:Unblock
writes and flush the device.delay()
:Get
the number of samples written but not yet played by the device.unprepare()
:Undo
operations done by prepare.close()
:Close
the device.
All scheduling of samples and timestamps is done in this base class together with
GstAudio.AudioBaseSink
using a default implementation of aGstAudio.AudioRingBuffer
that uses threads.- do_delay() virtual¶
- Return type:
Return how many frames are still in the device. Participates in computing the time for audio clocks and drives the synchronisation.
- do_open() virtual¶
- Return type:
Open the device. No configuration needs to be done at this point. This function is also used to check if the device is available.
- do_pause() virtual¶
Pause the device and unblock write as fast as possible. For retro compatibility, the audio sink will fallback to calling reset if this vmethod is not provided.
New in version 1.18.
- do_prepare(spec) virtual¶
- Parameters:
spec (
GstAudio.AudioRingBufferSpec
) –- Return type:
Prepare the device to operate with the specified parameters.
- do_reset() virtual¶
Returns as quickly as possible from a write and flush any pending samples from the device. This vmethod is deprecated. Please provide pause and stop instead.
- do_resume() virtual¶
Resume the device.
New in version 1.18.
- do_stop() virtual¶
Stop the device and unblock write as fast as possible. Pending samples are flushed from the device. For retro compatibility, the audio sink will fallback to calling reset if this vmethod is not provided.
New in version 1.18.