AudioSrc

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 #GstAudioBaseSrc using a default implementation of a #GstAudioRingBuffer that uses threads.

Constructors

this
this(void* ptr, Flag!"Take" take)

Members

Functions

self
AudioSrc self()

Returns this, for use in with statements.

Properties

gType
GType gType [@property getter]

Static functions

getGType
GType getGType()

Inherited Members

From AudioBaseSrc

getGType
GType getGType()
gType
GType gType [@property getter]
self
AudioBaseSrc self()

Returns this, for use in with statements.

createRingbuffer
gstaudio.audio_ring_buffer.AudioRingBuffer createRingbuffer()

Create and return the #GstAudioRingBuffer for src. This function will call the ::create_ringbuffer vmethod and will set src as the parent of the returned buffer (see gst.object.ObjectGst.setParent).

getProvideClock
bool getProvideClock()

Queries whether src will provide a clock or not. See also gst_audio_base_src_set_provide_clock.

getSlaveMethod
gstaudio.types.AudioBaseSrcSlaveMethod getSlaveMethod()

Get the current slave method used by src.

setProvideClock
void setProvideClock(bool provide)

Controls whether src will provide a clock or not. If provide is true, gst.element.Element.provideClock will return a clock that reflects the datarate of src. If provide is false, gst.element.Element.provideClock will return NULL.

setSlaveMethod
void setSlaveMethod(gstaudio.types.AudioBaseSrcSlaveMethod method)

Controls how clock slaving will be performed in src.