51typedef int AVFifoCB(
void *opaque,
void *buf,
size_t *nb_elems);
58#define AV_FIFO_FLAG_AUTO_GROW (1 << 0)
138 void *opaque,
size_t *nb_elems);
169 void *opaque,
size_t *nb_elems);
203 size_t *nb_elems,
size_t offset);
225#if FF_API_FIFO_OLD_API
226typedef struct AVFifoBuffer {
228 uint8_t *rptr, *wptr, *end;
239AVFifoBuffer *av_fifo_alloc(
unsigned int size);
249AVFifoBuffer *av_fifo_alloc_array(
size_t nmemb,
size_t size);
257void av_fifo_free(AVFifoBuffer *f);
265void av_fifo_freep(AVFifoBuffer **f);
273void av_fifo_reset(AVFifoBuffer *f);
283int av_fifo_size(
const AVFifoBuffer *f);
293int av_fifo_space(
const AVFifoBuffer *f);
310int av_fifo_generic_peek_at(AVFifoBuffer *f,
void *dest,
int offset,
int buf_size,
void (*func)(
void*,
void*,
int));
326int av_fifo_generic_peek(AVFifoBuffer *f,
void *dest,
int buf_size,
void (*func)(
void*,
void*,
int));
341int av_fifo_generic_read(AVFifoBuffer *f,
void *dest,
int buf_size,
void (*func)(
void*,
void*,
int));
360int av_fifo_generic_write(AVFifoBuffer *f,
void *src,
int size,
int (*func)(
void*,
void*,
int));
374int av_fifo_realloc2(AVFifoBuffer *f,
unsigned int size);
389int av_fifo_grow(AVFifoBuffer *f,
unsigned int additional_space);
399void av_fifo_drain(AVFifoBuffer *f,
int size);
414static inline uint8_t *av_fifo_peek2(
const AVFifoBuffer *f,
int offs)
416 uint8_t *ptr = f->rptr + offs;
418 ptr = f->buffer + (ptr - f->end);
419 else if (ptr < f->buffer)
420 ptr = f->end - (f->buffer - ptr);
Macro definitions for various function/variable attributes.
#define attribute_deprecated
int av_fifo_peek_to_cb(AVFifo *f, AVFifoCB write_cb, void *opaque, size_t *nb_elems, size_t offset)
Feed data from a FIFO into a user-provided callback.
AVFifo * av_fifo_alloc2(size_t elems, size_t elem_size, unsigned int flags)
Allocate and initialize an AVFifo with a given element size.
void av_fifo_freep2(AVFifo **f)
Free an AVFifo and reset pointer to NULL.
void av_fifo_reset2(AVFifo *f)
int av_fifo_peek(AVFifo *f, void *buf, size_t nb_elems, size_t offset)
Read data from a FIFO without modifying FIFO state.
size_t av_fifo_can_write(const AVFifo *f)
size_t av_fifo_can_read(const AVFifo *f)
int av_fifo_read_to_cb(AVFifo *f, AVFifoCB write_cb, void *opaque, size_t *nb_elems)
Feed data from a FIFO into a user-provided callback.
size_t av_fifo_elem_size(const AVFifo *f)
int av_fifo_write_from_cb(AVFifo *f, AVFifoCB read_cb, void *opaque, size_t *nb_elems)
Write data from a user-provided callback into a FIFO.
int av_fifo_grow2(AVFifo *f, size_t inc)
Enlarge an AVFifo.
int AVFifoCB(void *opaque, void *buf, size_t *nb_elems)
Callback for writing or reading from a FIFO, passed to (and invoked from) the av_fifo_*_cb() function...
int av_fifo_write(AVFifo *f, const void *buf, size_t nb_elems)
Write data into a FIFO.
void av_fifo_auto_grow_limit(AVFifo *f, size_t max_elems)
Set the maximum size (in elements) to which the FIFO can be resized automatically.
void av_fifo_drain2(AVFifo *f, size_t size)
Discard the specified amount of data from an AVFifo.
int av_fifo_read(AVFifo *f, void *buf, size_t nb_elems)
Read data from a FIFO.