Functions
GST_AUDIO_RING_BUFFER_BROADCAST()
#define GST_AUDIO_RING_BUFFER_BROADCAST(buf)(g_cond_broadcast (GST_AUDIO_RING_BUFFER_GET_COND (buf)))
GST_AUDIO_RING_BUFFER_GET_COND()
#define GST_AUDIO_RING_BUFFER_GET_COND(buf) (&(((GstAudioRingBuffer *)buf)->cond))
GST_AUDIO_RING_BUFFER_SIGNAL()
#define GST_AUDIO_RING_BUFFER_SIGNAL(buf) (g_cond_signal (GST_AUDIO_RING_BUFFER_GET_COND (buf)))
GST_AUDIO_RING_BUFFER_WAIT()
#define GST_AUDIO_RING_BUFFER_WAIT(buf) (g_cond_wait (GST_AUDIO_RING_BUFFER_GET_COND (buf), GST_OBJECT_GET_LOCK (buf)))
gst_audio_ring_buffer_clear_all ()
void
gst_audio_ring_buffer_clear_all (GstAudioRingBuffer *buf
);
Types and Values
struct GstAudioRingBuffer
struct GstAudioRingBuffer {
GCond cond;
gboolean open;
gboolean acquired;
guint8 *memory;
gsize size;
GstClockTime *timestamps;
GstAudioRingBufferSpec spec;
gint samples_per_seg;
guint8 *empty_seg;
gint state;
gint segdone;
gint segbase;
gint waiting;
};
struct GstAudioRingBufferClass
struct GstAudioRingBufferClass {
GstObjectClass parent_class;
gboolean (*open_device) (GstAudioRingBuffer *buf);
gboolean (*acquire) (GstAudioRingBuffer *buf, GstAudioRingBufferSpec *spec);
gboolean (*release) (GstAudioRingBuffer *buf);
gboolean (*close_device) (GstAudioRingBuffer *buf);
gboolean (*start) (GstAudioRingBuffer *buf);
gboolean (*pause) (GstAudioRingBuffer *buf);
gboolean (*resume) (GstAudioRingBuffer *buf);
gboolean (*stop) (GstAudioRingBuffer *buf);
guint (*delay) (GstAudioRingBuffer *buf);
/* ABI added */
gboolean (*activate) (GstAudioRingBuffer *buf, gboolean active);
guint (*commit) (GstAudioRingBuffer * buf, guint64 *sample,
guint8 * data, gint in_samples,
gint out_samples, gint * accum);
void (*clear_all) (GstAudioRingBuffer * buf);
};
struct GstAudioRingBufferSpec
struct GstAudioRingBufferSpec {
/* in */
GstCaps *caps; /* the caps of the buffer */
/* in/out */
GstAudioRingBufferFormatType type;
GstAudioInfo info;
guint64 latency_time; /* the required/actual latency time, this is the
* actual the size of one segment and the
* minimum possible latency we can achieve. */
guint64 buffer_time; /* the required/actual time of the buffer, this is
* the total size of the buffer and maximum
* latency we can compensate for. */
gint segsize; /* size of one buffer segment in bytes, this value
* should be chosen to match latency_time as
* well as possible. */
gint segtotal; /* total number of segments, this value is the
* number of segments of @segsize and should be
* chosen so that it matches buffer_time as
* close as possible. */
/* ABI added 0.10.20 */
gint seglatency; /* number of segments queued in the lower
* level device, defaults to segtotal. */
};
enum GstAudioRingBufferState
enum GstAudioRingBufferFormatType