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

Methods

Inherited:

GstAudio.AudioBaseSrc (5), GstBase.BaseSrc (23), Gst.Element (82), Gst.Object (27), GObject.Object (37)

Structs:

Gst.ElementClass (10), GObject.ObjectClass (5)

Virtual Methods

Inherited:

GstAudio.AudioBaseSrc (1), GstBase.PushSrc (3), GstBase.BaseSrc (19), Gst.Element (16), Gst.Object (1), GObject.Object (7)

do_close ()

do_delay ()

do_open ()

do_prepare (spec)

do_read (data)

do_reset ()

do_unprepare ()

Properties

Inherited:

GstAudio.AudioBaseSrc (6), GstBase.BaseSrc (5), Gst.Object (2)

Signals

Inherited:

Gst.Element (3), Gst.Object (1), GObject.Object (1)

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) virtual
Parameters:

data (bytes) – the sample data

Returns:

timestamp:

a #GstClockTime

Return type:

(int, timestamp: int)

Read samples from the device.

do_reset() virtual
do_unprepare() virtual
Return type:

bool