GstAudioSink
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 GstAudioBaseSink using a default implementation of a GstAudioRingBuffer that uses threads.
GstAudioSink
GObject ╰──GInitiallyUnowned ╰──GstObject ╰──GstElement ╰──GstBaseSink ╰──GstAudioBaseSink ╰──GstAudioSink
Opaque GstAudioSink.
Members
element
(GstAudioBaseSink)
–
Class structure
GstAudioSinkClass
Fields
parent_class
(GstAudioBaseSinkClass)
–
the parent class structure.
extension
(GstAudioSinkClassExtension *)
–
class extension structure. Since: 1.18
GstAudio.AudioSinkClass
Attributes
parent_class
(GstAudio.AudioBaseSinkClass)
–
the parent class structure.
extension
(GstAudio.AudioSinkClassExtension)
–
class extension structure. Since: 1.18
GstAudio.AudioSinkClass
Attributes
parent_class
(GstAudio.AudioBaseSinkClass)
–
the parent class structure.
extension
(GstAudio.AudioSinkClassExtension)
–
class extension structure. Since: 1.18
GstAudioSink
GObject ╰──GInitiallyUnowned ╰──GstObject ╰──GstElement ╰──GstBaseSink ╰──GstAudioBaseSink ╰──GstAudioSink
Opaque GstAudioSink.
Members
element
(GstAudioBaseSink)
–
GstAudioSink
GObject ╰──GInitiallyUnowned ╰──GstObject ╰──GstElement ╰──GstBaseSink ╰──GstAudioBaseSink ╰──GstAudioSink
Opaque GstAudioSink.
Members
element
(GstAudioBaseSink)
–
Virtual Methods
close
gboolean close (GstAudioSink * sink)
Close the device.
Parameters:
sink
–
close
function close(sink: GstAudio.AudioSink): {
// javascript implementation of the 'close' virtual method
}
Close the device.
Parameters:
sink
(
GstAudio.AudioSink
)
–
close
def close (sink):
#python implementation of the 'close' virtual method
Close the device.
Parameters:
sink
(
GstAudio.AudioSink
)
–
delay
guint delay (GstAudioSink * sink)
Return how many frames are still in the device. Participates in computing the time for audio clocks and drives the synchronisation.
Parameters:
sink
–
delay
function delay(sink: GstAudio.AudioSink): {
// javascript implementation of the 'delay' virtual method
}
Return how many frames are still in the device. Participates in computing the time for audio clocks and drives the synchronisation.
Parameters:
sink
(
GstAudio.AudioSink
)
–
delay
def delay (sink):
#python implementation of the 'delay' virtual method
Return how many frames are still in the device. Participates in computing the time for audio clocks and drives the synchronisation.
Parameters:
sink
(
GstAudio.AudioSink
)
–
open
gboolean open (GstAudioSink * sink)
Open the device. No configuration needs to be done at this point. This function is also used to check if the device is available.
Parameters:
sink
–
open
function open(sink: GstAudio.AudioSink): {
// javascript implementation of the 'open' virtual method
}
Open the device. No configuration needs to be done at this point. This function is also used to check if the device is available.
Parameters:
sink
(
GstAudio.AudioSink
)
–
open
def open (sink):
#python implementation of the 'open' virtual method
Open the device. No configuration needs to be done at this point. This function is also used to check if the device is available.
Parameters:
sink
(
GstAudio.AudioSink
)
–
pause
pause (GstAudioSink * sink)
Pause the device and unblock write as fast as possible. For retro compatibility, the audio sink will fallback to calling reset if this vmethod is not provided. Since: 1.18
Parameters:
sink
–
pause
function pause(sink: GstAudio.AudioSink): {
// javascript implementation of the 'pause' virtual method
}
Pause the device and unblock write as fast as possible. For retro compatibility, the audio sink will fallback to calling reset if this vmethod is not provided. Since: 1.18
Parameters:
sink
(
GstAudio.AudioSink
)
–
pause
def pause (sink):
#python implementation of the 'pause' virtual method
Pause the device and unblock write as fast as possible. For retro compatibility, the audio sink will fallback to calling reset if this vmethod is not provided. Since: 1.18
Parameters:
sink
(
GstAudio.AudioSink
)
–
prepare
gboolean prepare (GstAudioSink * sink, GstAudioRingBufferSpec * spec)
Prepare the device to operate with the specified parameters.
Parameters:
sink
–
spec
–
prepare
function prepare(sink: GstAudio.AudioSink, spec: GstAudio.AudioRingBufferSpec): {
// javascript implementation of the 'prepare' virtual method
}
Prepare the device to operate with the specified parameters.
Parameters:
sink
(
GstAudio.AudioSink
)
–
spec
(
GstAudio.AudioRingBufferSpec
)
–
prepare
def prepare (sink, spec):
#python implementation of the 'prepare' virtual method
Prepare the device to operate with the specified parameters.
Parameters:
sink
(
GstAudio.AudioSink
)
–
spec
(
GstAudio.AudioRingBufferSpec
)
–
reset
reset (GstAudioSink * sink)
Returns as quickly as possible from a write and flush any pending samples from the device. This vmethod is deprecated. Please provide pause and stop instead.
Parameters:
sink
–
reset
function reset(sink: GstAudio.AudioSink): {
// javascript implementation of the 'reset' virtual method
}
Returns as quickly as possible from a write and flush any pending samples from the device. This vmethod is deprecated. Please provide pause and stop instead.
Parameters:
sink
(
GstAudio.AudioSink
)
–
reset
def reset (sink):
#python implementation of the 'reset' virtual method
Returns as quickly as possible from a write and flush any pending samples from the device. This vmethod is deprecated. Please provide pause and stop instead.
Parameters:
sink
(
GstAudio.AudioSink
)
–
resume
resume (GstAudioSink * sink)
Resume the device. Since: 1.18
Parameters:
sink
–
resume
function resume(sink: GstAudio.AudioSink): {
// javascript implementation of the 'resume' virtual method
}
Resume the device. Since: 1.18
Parameters:
sink
(
GstAudio.AudioSink
)
–
resume
def resume (sink):
#python implementation of the 'resume' virtual method
Resume the device. Since: 1.18
Parameters:
sink
(
GstAudio.AudioSink
)
–
stop
stop (GstAudioSink * sink)
Stop the device and unblock write as fast as possible. Pending samples are flushed from the device. For retro compatibility, the audio sink will fallback to calling reset if this vmethod is not provided. Since: 1.18
Parameters:
sink
–
stop
function stop(sink: GstAudio.AudioSink): {
// javascript implementation of the 'stop' virtual method
}
Stop the device and unblock write as fast as possible. Pending samples are flushed from the device. For retro compatibility, the audio sink will fallback to calling reset if this vmethod is not provided. Since: 1.18
Parameters:
sink
(
GstAudio.AudioSink
)
–
stop
def stop (sink):
#python implementation of the 'stop' virtual method
Stop the device and unblock write as fast as possible. Pending samples are flushed from the device. For retro compatibility, the audio sink will fallback to calling reset if this vmethod is not provided. Since: 1.18
Parameters:
sink
(
GstAudio.AudioSink
)
–
unprepare
gboolean unprepare (GstAudioSink * sink)
Undo operations done in prepare.
Parameters:
sink
–
unprepare
function unprepare(sink: GstAudio.AudioSink): {
// javascript implementation of the 'unprepare' virtual method
}
Undo operations done in prepare.
Parameters:
sink
(
GstAudio.AudioSink
)
–
unprepare
def unprepare (sink):
#python implementation of the 'unprepare' virtual method
Undo operations done in prepare.
Parameters:
sink
(
GstAudio.AudioSink
)
–
write
gint write (GstAudioSink * sink, gpointer data, guint length)
Write data to the device. This vmethod is allowed to block until all the data is written. If such is the case then it is expected that pause, stop and reset will unblock the write when called.
Parameters:
sink
–
data
–
length
–
write
function write(sink: GstAudio.AudioSink, data: Object, length: Number): {
// javascript implementation of the 'write' virtual method
}
Write data to the device. This vmethod is allowed to block until all the data is written. If such is the case then it is expected that pause, stop and reset will unblock the write when called.
Parameters:
sink
(
GstAudio.AudioSink
)
–
data
(
Object
)
–
length
(
Number
)
–
write
def write (sink, data, length):
#python implementation of the 'write' virtual method
Write data to the device. This vmethod is allowed to block until all the data is written. If such is the case then it is expected that pause, stop and reset will unblock the write when called.
Parameters:
sink
(
GstAudio.AudioSink
)
–
data
(
object
)
–
length
(
int
)
–
GstAudioSinkClassExtension
GstAudio.AudioSinkClassExtension
GstAudio.AudioSinkClassExtension
The results of the search are