mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-03 05:59:10 +00:00
audioringbuffer: Introduce accessor macros
This follows the design ideas behind GstVideoInfo to provide an API capable of hiding any underlying ABI compatibility mechanisms. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3901>
This commit is contained in:
parent
8c5a8f4466
commit
4cce9a77c9
1 changed files with 8 additions and 0 deletions
|
@ -156,6 +156,14 @@ struct _GstAudioRingBufferSpec
|
|||
gpointer _gst_reserved[GST_PADDING];
|
||||
};
|
||||
|
||||
#define GST_AUDIO_RING_BUFFER_SPEC_FORMAT_TYPE(spec) ((spec)->type)
|
||||
#define GST_AUDIO_RING_BUFFER_SPEC_INFO(spec) ((spec)->info)
|
||||
#define GST_AUDIO_RING_BUFFER_SPEC_LATENCY_TIME(spec) ((spec)->latency_time)
|
||||
#define GST_AUDIO_RING_BUFFER_SPEC_BUFFER_TIME(spec) ((spec)->buffer_time)
|
||||
#define GST_AUDIO_RING_BUFFER_SPEC_SEGSIZE(spec) ((spec)->segsize)
|
||||
#define GST_AUDIO_RING_BUFFER_SPEC_SEGTOTAL(spec) ((spec)->segtotal)
|
||||
#define GST_AUDIO_RING_BUFFER_SPEC_SEGLATENCY(spec) ((spec)->seglatency)
|
||||
|
||||
#define GST_AUDIO_RING_BUFFER_GET_COND(buf) (&(((GstAudioRingBuffer *)buf)->cond))
|
||||
#define GST_AUDIO_RING_BUFFER_WAIT(buf) (g_cond_wait (GST_AUDIO_RING_BUFFER_GET_COND (buf), GST_OBJECT_GET_LOCK (buf)))
|
||||
#define GST_AUDIO_RING_BUFFER_SIGNAL(buf) (g_cond_signal (GST_AUDIO_RING_BUFFER_GET_COND (buf)))
|
||||
|
|
Loading…
Reference in a new issue