Commit 44dab50b authored by Wim Taymans's avatar Wim Taymans

ringbuffer: add method to check the flushing state

parent 75fe950c
......@@ -833,6 +833,30 @@ gst_audio_ring_buffer_set_flushing (GstAudioRingBuffer * buf, gboolean flushing)
GST_OBJECT_UNLOCK (buf);
}
/**
* gst_audio_ring_buffer_is_flushing:
* @buf: the #GstAudioRingBuffer
*
* Check if @buf is flushing.
*
* MT safe.
*
* Returns: TRUE if the device is flushing.
*/
gboolean
gst_audio_ring_buffer_is_flushing (GstAudioRingBuffer * buf)
{
gboolean res;
g_return_val_if_fail (GST_IS_AUDIO_RING_BUFFER (buf), TRUE);
GST_OBJECT_LOCK (buf);
res = buf->flushing;
GST_OBJECT_UNLOCK (buf);
return res;
}
/**
* gst_audio_ring_buffer_start:
* @buf: the #GstAudioRingBuffer to start
......
......@@ -288,6 +288,7 @@ gboolean gst_audio_ring_buffer_is_active (GstAudioRingBuffer *buf);
/* flushing */
void gst_audio_ring_buffer_set_flushing (GstAudioRingBuffer *buf, gboolean flushing);
gboolean gst_audio_ring_buffer_is_flushing (GstAudioRingBuffer *buf);
/* playback/pause */
gboolean gst_audio_ring_buffer_start (GstAudioRingBuffer *buf);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment