Go to the documentation of this file.
58 #define AV_FIFO_FLAG_AUTO_GROW (1 << 0)
225 #if FF_API_FIFO_OLD_API
401 #if FF_API_FIFO_PEEK2
416 uint8_t *ptr =
f->rptr + offs;
418 ptr =
f->buffer + (ptr -
f->end);
420 ptr =
f->end - (
f->buffer - ptr);
int(* func)(AVBPrint *dst, const char *in, const char *arg)
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.
void av_fifo_freep2(AVFifo **f)
Free an AVFifo and reset pointer to NULL.
AVFifo * av_fifo_alloc2(size_t elems, size_t elem_size, unsigned int flags)
Allocate and initialize an AVFifo with a given element size.
attribute_deprecated int av_fifo_size(const AVFifoBuffer *f)
Return the amount of data in bytes in the AVFifoBuffer, that is the amount of data you can read from ...
size_t av_fifo_elem_size(const AVFifo *f)
attribute_deprecated int av_fifo_generic_peek_at(AVFifoBuffer *f, void *dest, int offset, int buf_size, void(*func)(void *, void *, int))
Feed data at specific position from an AVFifoBuffer to a user-supplied callback.
attribute_deprecated int av_fifo_realloc2(AVFifoBuffer *f, unsigned int size)
Resize an AVFifoBuffer.
int av_fifo_write(AVFifo *f, const void *buf, size_t nb_elems)
Write data into a FIFO.
size_t av_fifo_can_write(const AVFifo *f)
attribute_deprecated int av_fifo_space(const AVFifoBuffer *f)
Return the amount of space in bytes in the AVFifoBuffer, that is the amount of data you can write int...
void av_fifo_reset2(AVFifo *f)
attribute_deprecated int av_fifo_generic_write(AVFifoBuffer *f, void *src, int size, int(*func)(void *, void *, int))
Feed data from a user-supplied callback to an AVFifoBuffer.
int av_fifo_read(AVFifo *f, void *buf, size_t nb_elems)
Read data from a FIFO.
attribute_deprecated void av_fifo_freep(AVFifoBuffer **f)
Free an AVFifoBuffer and reset pointer to NULL.
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_from_cb(AVFifo *f, AVFifoCB read_cb, void *opaque, size_t *nb_elems)
Write data from a user-provided callback into a FIFO.
attribute_deprecated int av_fifo_generic_read(AVFifoBuffer *f, void *dest, int buf_size, void(*func)(void *, void *, int))
Feed data from an AVFifoBuffer to a user-supplied callback.
attribute_deprecated int av_fifo_grow(AVFifoBuffer *f, unsigned int additional_space)
Enlarge an AVFifoBuffer.
static int read_cb(void *opaque, void *buf, size_t *nb_elems)
#define attribute_deprecated
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf offset
static attribute_deprecated uint8_t * av_fifo_peek2(const AVFifoBuffer *f, int offs)
Return a pointer to the data stored in a FIFO buffer at a certain offset.
attribute_deprecated AVFifoBuffer * av_fifo_alloc(unsigned int size)
Initialize an AVFifoBuffer.
size_t av_fifo_can_read(const AVFifo *f)
int av_fifo_grow2(AVFifo *f, size_t inc)
Enlarge an AVFifo.
attribute_deprecated void av_fifo_reset(AVFifoBuffer *f)
Reset the AVFifoBuffer to the state right after av_fifo_alloc, in particular it is emptied.
the frame and frame reference mechanism is intended to as much as expensive copies of that data while still allowing the filters to produce correct results The data is stored in buffers represented by AVFrame structures Several references can point to the same frame buffer
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.
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.
attribute_deprecated AVFifoBuffer * av_fifo_alloc_array(size_t nmemb, size_t size)
Initialize an AVFifoBuffer.
void av_fifo_drain2(AVFifo *f, size_t size)
Discard the specified amount of data from an AVFifo.
attribute_deprecated void av_fifo_free(AVFifoBuffer *f)
Free an AVFifoBuffer.
attribute_deprecated void av_fifo_drain(AVFifoBuffer *f, int size)
Read and discard the specified amount of data from an AVFifoBuffer.
static int write_cb(void *opaque, void *buf, size_t *nb_elems)
#define flags(name, subs,...)
attribute_deprecated int av_fifo_generic_peek(AVFifoBuffer *f, void *dest, int buf_size, void(*func)(void *, void *, int))
Feed data from an AVFifoBuffer to a user-supplied callback.
int av_fifo_peek(AVFifo *f, void *buf, size_t nb_elems, size_t offset)
Read data from a FIFO without modifying FIFO state.