From 4cce9a77c990e296b78aa31a3969cd06ee3135fc Mon Sep 17 00:00:00 2001 From: Carlos Rafael Giani Date: Tue, 18 Oct 2022 12:09:46 +0200 Subject: [PATCH] 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: --- .../gst-libs/gst/audio/gstaudioringbuffer.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/subprojects/gst-plugins-base/gst-libs/gst/audio/gstaudioringbuffer.h b/subprojects/gst-plugins-base/gst-libs/gst/audio/gstaudioringbuffer.h index 615041f71d..f33ceb14c9 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/audio/gstaudioringbuffer.h +++ b/subprojects/gst-plugins-base/gst-libs/gst/audio/gstaudioringbuffer.h @@ -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)))