GstAudioSrc
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.
GstAudioSrc
GObject ╰──GInitiallyUnowned ╰──GstObject ╰──GstElement ╰──GstBaseSrc ╰──GstPushSrc ╰──GstAudioBaseSrc ╰──GstAudioSrc
Base class for simple audio sources.
Members
element
(GstAudioBaseSrc)
–
Class structure
GstAudioSrcClass
GstAudioSrc class. Override the vmethod to implement functionality.
Fields
parent_class
(GstAudioBaseSrcClass)
–
the parent class.
GstAudio.AudioSrcClass
GstAudio.AudioSrc class. Override the vmethod to implement functionality.
Attributes
parent_class
(GstAudio.AudioBaseSrcClass)
–
the parent class.
GstAudio.AudioSrcClass
GstAudio.AudioSrc class. Override the vmethod to implement functionality.
Attributes
parent_class
(GstAudio.AudioBaseSrcClass)
–
the parent class.
GstAudioSrc
GObject ╰──GInitiallyUnowned ╰──GstObject ╰──GstElement ╰──GstBaseSrc ╰──GstPushSrc ╰──GstAudioBaseSrc ╰──GstAudioSrc
Base class for simple audio sources.
Members
element
(GstAudioBaseSrc)
–
GstAudioSrc
GObject ╰──GInitiallyUnowned ╰──GstObject ╰──GstElement ╰──GstBaseSrc ╰──GstPushSrc ╰──GstAudioBaseSrc ╰──GstAudioSrc
Base class for simple audio sources.
Members
element
(GstAudioBaseSrc)
–
Virtual Methods
close
gboolean close (GstAudioSrc * src)
close the device
Parameters:
src
–
close
function close(src: GstAudio.AudioSrc): {
// javascript implementation of the 'close' virtual method
}
close the device
Parameters:
src
(
GstAudio.AudioSrc
)
–
close
def close (src):
#python implementation of the 'close' virtual method
close the device
Parameters:
src
(
GstAudio.AudioSrc
)
–
delay
guint delay (GstAudioSrc * src)
the number of frames queued in the device
Parameters:
src
–
delay
function delay(src: GstAudio.AudioSrc): {
// javascript implementation of the 'delay' virtual method
}
the number of frames queued in the device
Parameters:
src
(
GstAudio.AudioSrc
)
–
delay
def delay (src):
#python implementation of the 'delay' virtual method
the number of frames queued in the device
Parameters:
src
(
GstAudio.AudioSrc
)
–
open
gboolean open (GstAudioSrc * src)
open the device with the specified caps
Parameters:
src
–
open
function open(src: GstAudio.AudioSrc): {
// javascript implementation of the 'open' virtual method
}
open the device with the specified caps
Parameters:
src
(
GstAudio.AudioSrc
)
–
open
def open (src):
#python implementation of the 'open' virtual method
open the device with the specified caps
Parameters:
src
(
GstAudio.AudioSrc
)
–
prepare
gboolean prepare (GstAudioSrc * src, GstAudioRingBufferSpec * spec)
configure device with format
Parameters:
src
–
spec
–
prepare
function prepare(src: GstAudio.AudioSrc, spec: GstAudio.AudioRingBufferSpec): {
// javascript implementation of the 'prepare' virtual method
}
configure device with format
Parameters:
src
(
GstAudio.AudioSrc
)
–
spec
(
GstAudio.AudioRingBufferSpec
)
–
prepare
def prepare (src, spec):
#python implementation of the 'prepare' virtual method
configure device with format
Parameters:
src
(
GstAudio.AudioSrc
)
–
spec
(
GstAudio.AudioRingBufferSpec
)
–
read
guint read (GstAudioSrc * src, gpointer data, guint length, GstClockTime * timestamp)
read samples from the audio device
Parameters:
src
–
data
–
length
–
timestamp
–
read
function read(src: GstAudio.AudioSrc, data: Object, length: Number, timestamp: Number): {
// javascript implementation of the 'read' virtual method
}
read samples from the audio device
Parameters:
src
(
GstAudio.AudioSrc
)
–
data
(
Object
)
–
length
(
Number
)
–
timestamp
(
Number
)
–
read
def read (src, data, length, timestamp):
#python implementation of the 'read' virtual method
read samples from the audio device
Parameters:
src
(
GstAudio.AudioSrc
)
–
data
(
object
)
–
length
(
int
)
–
timestamp
(
int
)
–
reset
reset (GstAudioSrc * src)
unblock a read to the device and reset.
Parameters:
src
–
reset
function reset(src: GstAudio.AudioSrc): {
// javascript implementation of the 'reset' virtual method
}
unblock a read to the device and reset.
Parameters:
src
(
GstAudio.AudioSrc
)
–
reset
def reset (src):
#python implementation of the 'reset' virtual method
unblock a read to the device and reset.
Parameters:
src
(
GstAudio.AudioSrc
)
–
unprepare
gboolean unprepare (GstAudioSrc * src)
undo the configuration
Parameters:
src
–
unprepare
function unprepare(src: GstAudio.AudioSrc): {
// javascript implementation of the 'unprepare' virtual method
}
undo the configuration
Parameters:
src
(
GstAudio.AudioSrc
)
–
unprepare
def unprepare (src):
#python implementation of the 'unprepare' virtual method
undo the configuration
Parameters:
src
(
GstAudio.AudioSrc
)
–
The results of the search are