GstAudio.AudioSrc¶
- Subclasses:
None
Methods¶
Virtual Methods¶
- Inherited:
GstAudio.AudioBaseSrc (1), GstBase.PushSrc (3), GstBase.BaseSrc (19), Gst.Element (16), Gst.Object (1), GObject.Object (7)
|
|
|
|
|
|
|
|
|
|
|
|
|
Properties¶
- Inherited:
GstAudio.AudioBaseSrc (6), GstBase.BaseSrc (5), Gst.Object (2)
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
element |
r |
||
thread |
r |
Class Details¶
- class GstAudio.AudioSrc(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
This is the most simple base class for audio sources that only requires subclasses to implement a set of simple functions:
open()
:Open
the device.prepare()
:Configure
the device with the specified format.read()
:Read
samples from the device.reset()
:Unblock
reads and flush the device.delay()
:Get
the number of samples in the device but not yet read.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.AudioBaseSrc
using a default implementation of aGstAudio.AudioRingBuffer
that uses threads.- do_prepare(spec) virtual¶
- Parameters:
spec (
GstAudio.AudioRingBufferSpec
) –- Return type:
configure device with format
- do_read(data) virtual¶
- Parameters:
data (
bytes
) – the sample data- Returns:
- timestamp:
a #GstClockTime
- Return type:
Read samples from the device.
- do_reset() virtual¶
unblock a read to the device and reset.