GstAudioRingBuffer

This object is the base class for audio ringbuffers used by the base audio source and sink classes.

The ringbuffer abstracts a circular buffer of data. One reader and one writer can operate on the data from different threads in a lockfree manner. The base class is sufficiently flexible to be used as an abstraction for DMA based ringbuffers as well as a pure software implementations.

Members

Variables

GstReserved
void*[3] GstReserved;
acquired
bool acquired;

boolean indicating that the ringbuffer is acquired

active
bool active;
callback
GstAudioRingBufferCallback callback;
cbData
void* cbData;
cbDataNotify
GDestroyNotify cbDataNotify;
channelReorderMap
int[64] channelReorderMap;
cond
GCond cond;

used to signal start/stop/pause/resume actions

emptySeg
ubyte* emptySeg;

pointer to memory holding one segment of silence samples

flushing
bool flushing;
mayStart
int mayStart;
memory
ubyte* memory;

data in the ringbuffer

needReorder
bool needReorder;
object
GstObject object;
open
bool open;

boolean indicating that the ringbuffer is open

samplesPerSeg
int samplesPerSeg;

number of samples in one segment

segbase
int segbase;

segment corresponding to segment 0 (unused)

segdone
int segdone;

readpointer in the ringbuffer

size
size_t size;

size of data in the ringbuffer

spec
GstAudioRingBufferSpec spec;

format and layout of the ringbuffer data

state
int state;

state of the buffer

timestamps
GstClockTime* timestamps;
waiting
int waiting;

is a reader or writer waiting for a free segment