mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
ringbuffer: add method to check the flushing state
This commit is contained in:
parent
75fe950c33
commit
44dab50b7a
2 changed files with 25 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue