GstAudio.AudioBaseSrc

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 GstBase.PushSrc GstBase.PushSrc GstBase.BaseSrc->GstBase.PushSrc GstBase.PushSrc->GstAudio.AudioBaseSrc

Subclasses:

GstAudio.AudioSrc

Methods

Inherited:

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

Structs:

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

create_ringbuffer ()

get_provide_clock ()

get_slave_method ()

set_provide_clock (provide)

set_slave_method (method)

Virtual Methods

Inherited:

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

do_create_ringbuffer ()

Properties

Inherited:

GstBase.BaseSrc (5), Gst.Object (2)

Name

Type

Flags

Short Description

actual-buffer-time

int

r

Actual configured size of audio buffer in microseconds

actual-latency-time

int

r

Actual configured audio latency in microseconds

buffer-time

int

r/w

Size of audio buffer in microseconds. This is the maximum amount of data that is buffered in the device and the maximum latency that the source reports. This value might be ignored by the element if necessary; see “actual-buffer-time”

latency-time

int

r/w

The minimum amount of data to read in each iteration in microseconds. This is the minimum latency that the source reports. This value might be ignored by the element if necessary; see “actual-latency-time”

provide-clock

bool

r/w

Provide a clock to be used as the global pipeline clock

slave-method

GstAudio.AudioBaseSrcSlaveMethod

r/w

Algorithm used to match the rate of the masterclock

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

buffer_time

int

r

clock

Gst.Clock

r

element

GstBase.PushSrc

r

latency_time

int

r

next_sample

int

r

ringbuffer

GstAudio.AudioRingBuffer

r

Class Details

class GstAudio.AudioBaseSrc(**kwargs)
Bases:

GstBase.PushSrc

Abstract:

No

Structure:

GstAudio.AudioBaseSrcClass

This is the base class for audio sources. Subclasses need to implement the ::create_ringbuffer vmethod. This base class will then take care of reading samples from the ringbuffer, synchronisation and flushing.

create_ringbuffer()[source]
Returns:

The new ringbuffer of self.

Return type:

GstAudio.AudioRingBuffer or None

Create and return the GstAudio.AudioRingBuffer for self. This function will call the ::create_ringbuffer vmethod and will set self as the parent of the returned buffer (see Gst.Object.set_parent()).

get_provide_clock()[source]
Returns:

True if self will provide a clock.

Return type:

bool

Queries whether self will provide a clock or not. See also GstAudio.AudioBaseSrc.set_provide_clock.

get_slave_method()[source]
Returns:

The current slave method used by self.

Return type:

GstAudio.AudioBaseSrcSlaveMethod

Get the current slave method used by self.

set_provide_clock(provide)[source]
Parameters:

provide (bool) – new state

Controls whether self will provide a clock or not. If provide is True, Gst.Element.provide_clock() will return a clock that reflects the datarate of self. If provide is False, Gst.Element.provide_clock() will return None.

set_slave_method(method)[source]
Parameters:

method (GstAudio.AudioBaseSrcSlaveMethod) – the new slave method

Controls how clock slaving will be performed in self.

do_create_ringbuffer() virtual
Returns:

The new ringbuffer of src.

Return type:

GstAudio.AudioRingBuffer or None

Create and return the GstAudio.AudioRingBuffer for src. This function will call the ::create_ringbuffer vmethod and will set src as the parent of the returned buffer (see Gst.Object.set_parent()).

Property Details

GstAudio.AudioBaseSrc.props.actual_buffer_time
Name:

actual-buffer-time

Type:

int

Default Value:

-1

Flags:

READABLE

Actual configured size of audio buffer in microseconds.

GstAudio.AudioBaseSrc.props.actual_latency_time
Name:

actual-latency-time

Type:

int

Default Value:

-1

Flags:

READABLE

Actual configured audio latency in microseconds.

GstAudio.AudioBaseSrc.props.buffer_time
Name:

buffer-time

Type:

int

Default Value:

200000

Flags:

READABLE, WRITABLE

Size of audio buffer in microseconds. This is the maximum amount of data that is buffered in the device and the maximum latency that the source reports. This value might be ignored by the element if necessary; see “actual-buffer-time”

GstAudio.AudioBaseSrc.props.latency_time
Name:

latency-time

Type:

int

Default Value:

10000

Flags:

READABLE, WRITABLE

The minimum amount of data to read in each iteration in microseconds. This is the minimum latency that the source reports. This value might be ignored by the element if necessary; see “actual-latency-time”

GstAudio.AudioBaseSrc.props.provide_clock
Name:

provide-clock

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE

Provide a clock to be used as the global pipeline clock

GstAudio.AudioBaseSrc.props.slave_method
Name:

slave-method

Type:

GstAudio.AudioBaseSrcSlaveMethod

Default Value:

GstAudio.AudioBaseSrcSlaveMethod.SKEW

Flags:

READABLE, WRITABLE

Algorithm used to match the rate of the masterclock