GstAudio.AudioSrc

g GObject.InitiallyUnowned GObject.InitiallyUnowned Gst.Object Gst.Object GObject.InitiallyUnowned->Gst.Object GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gst.Element Gst.Element GstBase.BaseSrc GstBase.BaseSrc Gst.Element->GstBase.BaseSrc Gst.Object->Gst.Element GstAudio.AudioBaseSrc GstAudio.AudioBaseSrc GstAudio.AudioSrc GstAudio.AudioSrc GstAudio.AudioBaseSrc->GstAudio.AudioSrc GstBase.PushSrc GstBase.PushSrc GstBase.BaseSrc->GstBase.PushSrc GstBase.PushSrc->GstAudio.AudioBaseSrc

Subclasses:None

Fields

Inherited:Gst.Element (3), Gst.Object (1), GObject.Object (1)
Name Type Access Description
element GstAudio.AudioBaseSrc r  
thread GLib.Thread r  

Class Details

class GstAudio.AudioSrc(**kwargs)
Bases:GstAudio.AudioBaseSrc
Abstract:No
Structure:GstAudio.AudioSrcClass

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 a GstAudio.AudioRingBuffer that uses threads.

do_close() virtual
Return type:bool
do_delay() virtual
Return type:int
do_open() virtual
Return type:bool
do_prepare(spec) virtual
Parameters:spec (GstAudio.AudioRingBufferSpec) –
Return type:bool
do_read(data, length, timestamp) virtual
Parameters:
Return type:

int

do_reset() virtual
do_unprepare() virtual
Return type:bool