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.ObjectGst.setParent).
Get the current alignment threshold, in nanoseconds, used by sink.
Get the current discont wait, in nanoseconds, used by sink.
Get the current drift tolerance, in microseconds, used by sink.
Queries whether sink will provide a clock or not. See also gst_audio_base_sink_set_provide_clock.
Get the current slave method used by sink.
Informs this base class that the audio output device has failed for some reason, causing a discontinuity (for example, because the device recovered from the error, but lost all contents of its ring buffer). This function is typically called by derived classes, and is useful for the custom slave method.
Controls the sink's alignment threshold.
Sets the custom slaving callback. This callback will be invoked if the slave-method property is set to GST_AUDIO_BASE_SINK_SLAVE_CUSTOM and the audio sink receives and plays samples.
Controls how long the sink will wait before creating a discontinuity.
Controls the sink's drift tolerance.
Controls whether sink will provide a clock or not. If provide is true, gst.element.Element.provideClock will return a clock that reflects the datarate of sink. If provide is false, gst.element.Element.provideClock will return NULL.
Controls how clock slaving will be performed in sink.
If the sink spawns its own thread for pulling buffers from upstream it should call this method after it has pulled a buffer. If the element needed to preroll, this function will perform the preroll and will then block until the element state is changed.
Get the number of bytes that the sink will pull when it is operating in pull mode.
Checks if sink is currently configured to drop buffers which are outside the current segment
Get the last sample that arrived in the sink and was used for preroll or for rendering. This property can be used to generate thumbnails.
Get the currently configured latency.
Get the maximum amount of bits per second that the sink will render.
Gets the max lateness value. See gstbase.base_sink.BaseSink.setMaxLateness for more details.
Get the processing deadline of sink. see gstbase.base_sink.BaseSink.setProcessingDeadline for more information about the processing deadline.
Get the render delay of sink. see gstbase.base_sink.BaseSink.setRenderDelay for more information about the render delay.
Return various #GstBaseSink statistics. This function returns a #GstStructure with name application/x-gst-base-sink-stats with the following fields:
Checks if sink is currently configured to synchronize against the clock.
Get the time that will be inserted between frames to control the maximum buffers per second.
Get the synchronisation offset of sink.
Checks if sink is currently configured to perform asynchronous state changes to PAUSED.
Checks if sink is currently configured to store the last received sample in the last-sample property.
Checks if sink is currently configured to send Quality-of-Service events upstream.
Query the sink for the latency parameters. The latency will be queried from the upstream elements. live will be true if sink is configured to synchronize against the clock. upstream_live will be true if an upstream element is live.
Configures sink to perform all state changes asynchronously. When async is disabled, the sink will immediately go to PAUSED instead of waiting for a preroll buffer. This feature is useful if the sink does not synchronize against the clock or when it is dealing with sparse streams.
Set the number of bytes that the sink will pull when it is operating in pull mode.
Configure sink to drop buffers which are outside the current segment
Configures sink to store the last received sample in the last-sample property.
Set the maximum amount of bits per second that the sink will render.
Sets the new max lateness value to max_lateness. This value is used to decide if a buffer should be dropped or not based on the buffer timestamp and the current clock time. A value of -1 means an unlimited time.
Maximum amount of time (in nanoseconds) that the pipeline can take for processing the buffer. This is added to the latency of live pipelines.
Configures sink to send Quality-of-Service events upstream.
Set the render delay in sink to delay. The render delay is the time between actual rendering of a buffer and its synchronisation time. Some devices might delay media rendering which can be compensated for with this function.
Configures sink to synchronize on the clock or not. When sync is false, incoming samples will be played as fast as possible. If sync is true, the timestamps of the incoming buffers will be used to schedule the exact render time of its contents.
Set the time that will be inserted between rendered buffers. This can be used to control the maximum buffers per second that the sink will render.
Adjust the synchronisation of sink with offset. A negative value will render buffers earlier than their timestamp. A positive value will delay rendering. This function can be used to fix playback of badly timestamped buffers.
This function will wait for preroll to complete and will then block until time is reached. It is usually called by subclasses that use their own internal synchronisation but want to let some synchronization (like EOS) be handled by the base class.
This function will block until time is reached. It is usually called by subclasses that use their own internal synchronisation.
If the #GstBaseSinkClass::render method performs its own synchronisation against the clock it must unblock when going from PLAYING to the PAUSED state and call this method before continuing to render the remaining data.
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.