|  |  |  | GStreamer Base Plugins 0.10 Library Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Properties | ||||
#include <gst/audio/gstbaseaudiosink.h> struct GstBaseAudioSink; struct GstBaseAudioSinkClass; enum GstBaseAudioSinkSlaveMethod; #define GST_BASE_AUDIO_SINK_CLOCK (obj) #define GST_BASE_AUDIO_SINK_PAD (obj) GstRingBuffer * gst_base_audio_sink_create_ringbuffer (GstBaseAudioSink *sink); void gst_base_audio_sink_set_provide_clock (GstBaseAudioSink *sink,gboolean provide); gboolean gst_base_audio_sink_get_provide_clock (GstBaseAudioSink *sink); void gst_base_audio_sink_set_slave_method (GstBaseAudioSink *sink,GstBaseAudioSinkSlaveMethod method); GstBaseAudioSinkSlaveMethod gst_base_audio_sink_get_slave_method (GstBaseAudioSink *sink); gint64 gst_base_audio_sink_get_drift_tolerance (GstBaseAudioSink *sink); void gst_base_audio_sink_set_drift_tolerance (GstBaseAudioSink *sink,gint64 drift_tolerance);
GObject +----GstObject +----GstElement +----GstBaseSink +----GstBaseAudioSink +----GstAudioSink
"alignment-threshold" guint64 : Read / Write "buffer-time" gint64 : Read / Write "can-activate-pull" gboolean : Read / Write "discont-wait" guint64 : Read / Write "drift-tolerance" gint64 : Read / Write "latency-time" gint64 : Read / Write "provide-clock" gboolean : Read / Write "slave-method" GstBaseAudioSinkSlaveMethod : Read / Write
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.
Last reviewed on 2006-09-27 (0.10.12)
struct GstBaseAudioSinkClass {
  GstBaseSinkClass parent_class;
  /* subclass ringbuffer allocation */
  GstRingBuffer* (*create_ringbuffer)  (GstBaseAudioSink *sink);
  /* subclass payloader */
  GstBuffer*     (*payload)            (GstBaseAudioSink *sink,
                                        GstBuffer        *buffer);
};
GstBaseAudioSink class. Override the vmethod to implement functionality.
| GstBaseSinkClass  | the parent class. | 
| create and return a GstRingBuffer 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. (Since: 0.10.36) | 
typedef enum {
  GST_BASE_AUDIO_SINK_SLAVE_RESAMPLE,
  GST_BASE_AUDIO_SINK_SLAVE_SKEW,
  GST_BASE_AUDIO_SINK_SLAVE_NONE
} GstBaseAudioSinkSlaveMethod;
Different possible clock slaving algorithms used when the internal audio clock is not selected as the pipeline master clock.
#define GST_BASE_AUDIO_SINK_CLOCK(obj) (GST_BASE_AUDIO_SINK (obj)->clock)
Get the GstClock of obj.
| 
 | a GstBaseAudioSink | 
#define GST_BASE_AUDIO_SINK_PAD(obj) (GST_BASE_SINK (obj)->sinkpad)
Get the sink GstPad of obj.
| 
 | a GstBaseAudioSink | 
GstRingBuffer *     gst_base_audio_sink_create_ringbuffer
                                                        (GstBaseAudioSink *sink);
Create and return the GstRingBuffer 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()).
| 
 | a GstBaseAudioSink. | 
| Returns : | The new ringbuffer of sink. | 
void gst_base_audio_sink_set_provide_clock (GstBaseAudioSink *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.
| 
 | a GstBaseAudioSink | 
| 
 | new state | 
Since 0.10.16
gboolean            gst_base_audio_sink_get_provide_clock
                                                        (GstBaseAudioSink *sink);
Queries whether sink will provide a clock or not. See also
gst_base_audio_sink_set_provide_clock.
| 
 | a GstBaseAudioSink | 
| Returns : | TRUEifsinkwill provide a clock. | 
Since 0.10.16
void gst_base_audio_sink_set_slave_method (GstBaseAudioSink *sink,GstBaseAudioSinkSlaveMethod method);
Controls how clock slaving will be performed in sink.
| 
 | a GstBaseAudioSink | 
| 
 | the new slave method | 
Since 0.10.16
GstBaseAudioSinkSlaveMethod gst_base_audio_sink_get_slave_method
                                                        (GstBaseAudioSink *sink);
Get the current slave method used by sink.
| 
 | a GstBaseAudioSink | 
| Returns : | The current slave method used by sink. | 
Since 0.10.16
gint64              gst_base_audio_sink_get_drift_tolerance
                                                        (GstBaseAudioSink *sink);
Get the current drift tolerance, in microseconds, used by sink.
| 
 | a GstBaseAudioSink | 
| Returns : | The current drift tolerance used by sink. | 
Since 0.10.31
void gst_base_audio_sink_set_drift_tolerance (GstBaseAudioSink *sink,gint64 drift_tolerance);
Controls the sink's drift tolerance.
| 
 | a GstBaseAudioSink | 
| 
 | the new drift tolerance in microseconds | 
Since 0.10.31
"alignment-threshold" property  "alignment-threshold"      guint64               : Read / Write
Timestamp alignment threshold in nanoseconds.
Allowed values: [1,18446744073709551614]
Default value: 40000000
"buffer-time" property  "buffer-time"              gint64                : Read / Write
Size of audio buffer in microseconds.
Allowed values: >= 1
Default value: 200000
"can-activate-pull" property"can-activate-pull" gboolean : Read / Write
Allow pull-based scheduling.
Default value: FALSE
"discont-wait" property  "discont-wait"             guint64               : Read / Write
A window of time in nanoseconds to wait before creating a discontinuity as a result of breaching the drift-tolerance.
Allowed values: <= 18446744073709551614
Default value: 1000000000
Since 0.10.36
"drift-tolerance" property  "drift-tolerance"          gint64                : Read / Write
Controls the amount of time in microseconds that clocks are allowed to drift before resynchronisation happens.
Allowed values: >= 1
Default value: 40000
Since 0.10.26
"latency-time" property  "latency-time"             gint64                : Read / Write
Audio latency in microseconds.
Allowed values: >= 1
Default value: 10000
"provide-clock" property"provide-clock" gboolean : Read / Write
Provide a clock to be used as the global pipeline clock.
Default value: TRUE
"slave-method" property"slave-method" GstBaseAudioSinkSlaveMethod : Read / Write
Algorithm to use to match the rate of the masterclock.
Default value: GST_BASE_AUDIO_SINK_SLAVE_SKEW