| Top |
| struct | GstAudioRingBuffer |
| struct | GstAudioRingBufferClass |
| struct | GstAudioRingBufferSpec |
| enum | GstAudioRingBufferState |
| enum | GstAudioRingBufferFormatType |
void (*GstAudioRingBufferCallback) (GstAudioRingBuffer *rbuf,guint8 *data,guint len,gpointer user_data);
#define GST_AUDIO_RING_BUFFER_BROADCAST(buf)(g_cond_broadcast (GST_AUDIO_RING_BUFFER_GET_COND (buf)))
#define GST_AUDIO_RING_BUFFER_GET_COND(buf) (&(((GstAudioRingBuffer *)buf)->cond))
#define GST_AUDIO_RING_BUFFER_SIGNAL(buf) (g_cond_signal (GST_AUDIO_RING_BUFFER_GET_COND (buf)))
#define GST_AUDIO_RING_BUFFER_WAIT(buf) (g_cond_wait (GST_AUDIO_RING_BUFFER_GET_COND (buf), GST_OBJECT_GET_LOCK (buf)))
void gst_audio_ring_buffer_set_callback (GstAudioRingBuffer *buf,GstAudioRingBufferCallback cb,gpointer user_data);
gboolean gst_audio_ring_buffer_acquire (GstAudioRingBuffer *buf,GstAudioRingBufferSpec *spec);
gboolean
gst_audio_ring_buffer_is_acquired (GstAudioRingBuffer *buf);
gboolean gst_audio_ring_buffer_activate (GstAudioRingBuffer *buf,gboolean active);
gboolean
gst_audio_ring_buffer_is_active (GstAudioRingBuffer *buf);
guint64
gst_audio_ring_buffer_samples_done (GstAudioRingBuffer *buf);
void gst_audio_ring_buffer_set_sample (GstAudioRingBuffer *buf,guint64 sample);
guint gst_audio_ring_buffer_commit (GstAudioRingBuffer *buf,guint64 *sample,guint8 *data,gint in_samples,gint out_samples,gint *accum);
gboolean gst_audio_ring_buffer_convert (GstAudioRingBuffer *buf,GstFormat src_fmt,gint64 src_val,GstFormat dest_fmt,gint64 *dest_val);
gboolean gst_audio_ring_buffer_prepare_read (GstAudioRingBuffer *buf,gint *segment,guint8 **readptr,gint *len);
guint gst_audio_ring_buffer_read (GstAudioRingBuffer *buf,guint64 sample,guint8 *data,guint len,GstClockTime *timestamp);
void gst_audio_ring_buffer_clear (GstAudioRingBuffer *buf,gint segment);
void gst_audio_ring_buffer_advance (GstAudioRingBuffer *buf,guint advance);
gboolean
gst_audio_ring_buffer_close_device (GstAudioRingBuffer *buf);
gboolean
gst_audio_ring_buffer_open_device (GstAudioRingBuffer *buf);
gboolean
gst_audio_ring_buffer_device_is_open (GstAudioRingBuffer *buf);
void gst_audio_ring_buffer_may_start (GstAudioRingBuffer *buf,gboolean allowed);
gboolean gst_audio_ring_buffer_parse_caps (GstAudioRingBufferSpec *spec,GstCaps *caps);
void gst_audio_ring_buffer_set_flushing (GstAudioRingBuffer *buf,gboolean flushing);
gboolean
gst_audio_ring_buffer_is_flushing (GstAudioRingBuffer *buf);
void gst_audio_ring_buffer_set_channel_positions (GstAudioRingBuffer *buf,const GstAudioChannelPosition *position);
void gst_audio_ring_buffer_set_timestamp (GstAudioRingBuffer *buf,gint readseg,GstClockTime timestamp);
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 {
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 {
/* 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. */
};