19#ifndef AVUTIL_CONTAINER_FIFO_H
20#define AVUTIL_CONTAINER_FIFO_H
66 void* (*container_alloc)(
void *opaque),
67 void (*container_reset)(
void *opaque,
void *obj),
68 void (*container_free) (
void *opaque,
void *obj),
69 int (*fifo_transfer) (
void *opaque,
void *dst,
void *src,
unsigned flags),
struct AVContainerFifo AVContainerFifo
AVContainerFifo is a FIFO for "containers" - dynamically allocated reusable structs (e....
void av_container_fifo_free(AVContainerFifo **cf)
Free a AVContainerFifo and everything in it.
int av_container_fifo_peek(AVContainerFifo *cf, void **pobj, size_t offset)
Access objects stored in the FIFO without retrieving them.
@ AV_CONTAINER_FIFO_FLAG_REF
Signal to av_container_fifo_write() that it should make a new reference to data in src rather than co...
@ AV_CONTAINER_FIFO_FLAG_USER
This and all higher bits in flags may be set to any value by the caller and are guaranteed to be pass...
int av_container_fifo_write(AVContainerFifo *cf, void *obj, unsigned flags)
Write the contents of obj to the FIFO.
void av_container_fifo_drain(AVContainerFifo *cf, size_t nb_elems)
Discard the specified number of elements from the FIFO.
AVContainerFifo * av_container_fifo_alloc(void *opaque, void *(*container_alloc)(void *opaque), void(*container_reset)(void *opaque, void *obj), void(*container_free)(void *opaque, void *obj), int(*fifo_transfer)(void *opaque, void *dst, void *src, unsigned flags), unsigned flags)
Allocate a new AVContainerFifo for the container type defined by provided callbacks.
int av_container_fifo_read(AVContainerFifo *cf, void *obj, unsigned flags)
Read the next available object from the FIFO into obj.
size_t av_container_fifo_can_read(const AVContainerFifo *cf)
AVContainerFifo * av_container_fifo_alloc_avframe(unsigned flags)
Allocate an AVContainerFifo instance for AVFrames.