GstAudio.AudioSink

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.BaseSink GstBase.BaseSink Gst.Element->GstBase.BaseSink Gst.Object->Gst.Element GstAudio.AudioBaseSink GstAudio.AudioBaseSink GstAudio.AudioSink GstAudio.AudioSink GstAudio.AudioBaseSink->GstAudio.AudioSink GstBase.BaseSink->GstAudio.AudioBaseSink

Subclasses:

None

Methods

Inherited:

GstAudio.AudioBaseSink (13), GstBase.BaseSink (31), Gst.Element (82), Gst.Object (27), GObject.Object (37)

Structs:

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

Virtual Methods

Inherited:

GstAudio.AudioBaseSink (2), GstBase.BaseSink (18), Gst.Element (16), Gst.Object (1), GObject.Object (7)

do_close ()

do_delay ()

do_open ()

do_pause ()

do_prepare (spec)

do_reset ()

do_resume ()

do_stop ()

do_unprepare ()

do_write (data)

Properties

Inherited:

GstAudio.AudioBaseSink (8), GstBase.BaseSink (13), 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.AudioBaseSink

r

thread

GLib.Thread

r

Class Details

class GstAudio.AudioSink(**kwargs)
Bases:

GstAudio.AudioBaseSink

Abstract:

No

Structure:

GstAudio.AudioSinkClass

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 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_pause() virtual
do_prepare(spec) virtual
Parameters:

spec (GstAudio.AudioRingBufferSpec) –

Return type:

bool

do_reset() virtual
do_resume() virtual
do_stop() virtual
do_unprepare() virtual
Return type:

bool

do_write(data) virtual
Parameters:

data (bytes) – the sample data

Return type:

int

Write samples to the device.