Top | ![]() |
![]() |
![]() |
![]() |
guint64 | alignment-threshold | Read / Write |
gint64 | buffer-time | Read / Write |
gboolean | can-activate-pull | Read / Write |
guint64 | discont-wait | Read / Write |
gint64 | drift-tolerance | Read / Write |
gint64 | latency-time | Read / Write |
gboolean | provide-clock | Read / Write |
GstAudioBaseSinkSlaveMethod | slave-method | Read / Write |
struct | GstAudioBaseSink |
struct | GstAudioBaseSinkClass |
enum | GstAudioBaseSinkSlaveMethod |
GObject ╰── GInitiallyUnowned ╰── GstObject ╰── GstElement ╰── GstBaseSink ╰── GstAudioBaseSink ╰── GstAudioSink
This is the base class for audio sinks. Subclasses need to implement the ::create_ringbuffer vmethod. This base class will then take care of writing samples to the ringbuffer, synchronisation, clipping and flushing.
#define GST_AUDIO_BASE_SINK_CLOCK(obj) (GST_AUDIO_BASE_SINK (obj)->clock)
Get the GstClock of obj
.
#define GST_AUDIO_BASE_SINK_PAD(obj) (GST_BASE_SINK (obj)->sinkpad)
Get the sink GstPad of obj
.
GstAudioRingBuffer *
gst_audio_base_sink_create_ringbuffer (GstAudioBaseSink *sink
);
Create and return the GstAudioRingBuffer for sink
. This function will
call the ::create_ringbuffer vmethod and will set sink
as the parent of
the returned buffer (see gst_object_set_parent()
).
void gst_audio_base_sink_set_provide_clock (GstAudioBaseSink *sink
,gboolean provide
);
Controls whether sink
will provide a clock or not. If provide
is TRUE
,
gst_element_provide_clock()
will return a clock that reflects the datarate
of sink
. If provide
is FALSE
, gst_element_provide_clock()
will return
NULL.
gboolean
gst_audio_base_sink_get_provide_clock (GstAudioBaseSink *sink
);
Queries whether sink
will provide a clock or not. See also
gst_audio_base_sink_set_provide_clock.
void gst_audio_base_sink_set_slave_method (GstAudioBaseSink *sink
,GstAudioBaseSinkSlaveMethod method
);
Controls how clock slaving will be performed in sink
.
GstAudioBaseSinkSlaveMethod
gst_audio_base_sink_get_slave_method (GstAudioBaseSink *sink
);
Get the current slave method used by sink
.
void gst_audio_base_sink_set_drift_tolerance (GstAudioBaseSink *sink
,gint64 drift_tolerance
);
Controls the sink's drift tolerance.
gint64
gst_audio_base_sink_get_drift_tolerance
(GstAudioBaseSink *sink
);
Get the current drift tolerance, in microseconds, used by sink
.
void gst_audio_base_sink_set_alignment_threshold (GstAudioBaseSink *sink
,GstClockTime alignment_threshold
);
Controls the sink's alignment threshold.
GstClockTime
gst_audio_base_sink_get_alignment_threshold
(GstAudioBaseSink *sink
);
Get the current alignment threshold, in nanoseconds, used by sink
.
void gst_audio_base_sink_set_discont_wait (GstAudioBaseSink *sink
,GstClockTime discont_wait
);
Controls how long the sink will wait before creating a discontinuity.
GstClockTime
gst_audio_base_sink_get_discont_wait (GstAudioBaseSink *sink
);
Get the current discont wait, in nanoseconds, used by sink
.
struct GstAudioBaseSinkClass { GstBaseSinkClass parent_class; /* subclass ringbuffer allocation */ GstAudioRingBuffer* (*create_ringbuffer) (GstAudioBaseSink *sink); /* subclass payloader */ GstBuffer* (*payload) (GstAudioBaseSink *sink, GstBuffer *buffer); };
GstAudioBaseSink class. Override the vmethod to implement functionality.
the parent class. |
||
create and return a GstAudioRingBuffer to write to. |
||
payload data in a format suitable to write to the sink. If no payloading is required, returns a reffed copy of the original buffer, else returns the payloaded buffer with all other metadata copied. |
“alignment-threshold”
property“alignment-threshold” guint64
Timestamp alignment threshold in nanoseconds.
Flags: Read / Write
Allowed values: [1,18446744073709551614]
Default value: 40000000
“buffer-time”
property“buffer-time” gint64
Size of audio buffer in microseconds, this is the minimum latency that the sink reports.
Flags: Read / Write
Allowed values: >= 1
Default value: 200000
“can-activate-pull”
property“can-activate-pull” gboolean
Allow pull-based scheduling.
Flags: Read / Write
Default value: FALSE
“discont-wait”
property“discont-wait” guint64
A window of time in nanoseconds to wait before creating a discontinuity as a result of breaching the drift-tolerance.
Flags: Read / Write
Allowed values: <= 18446744073709551614
Default value: 1000000000
“drift-tolerance”
property“drift-tolerance” gint64
Controls the amount of time in microseconds that clocks are allowed to drift before resynchronisation happens.
Flags: Read / Write
Allowed values: >= 1
Default value: 40000
“latency-time”
property“latency-time” gint64
The minimum amount of data to write in each iteration in microseconds.
Flags: Read / Write
Allowed values: >= 1
Default value: 10000
“provide-clock”
property“provide-clock” gboolean
Provide a clock to be used as the global pipeline clock.
Flags: Read / Write
Default value: TRUE
“slave-method”
property“slave-method” GstAudioBaseSinkSlaveMethod
Algorithm used to match the rate of the masterclock.
Flags: Read / Write
Default value: GST_AUDIO_BASE_SINK_SLAVE_SKEW