|
FFmpeg
|
a very simple circular buffer FIFO implementation More...
Go to the source code of this file.
Classes | |
| struct | AVFifoBuffer |
Typedefs | |
| typedef struct AVFifoBuffer | AVFifoBuffer |
Functions | |
| AVFifoBuffer * | av_fifo_alloc (unsigned int size) |
| Initialize an AVFifoBuffer. More... | |
| AVFifoBuffer * | av_fifo_alloc_array (size_t nmemb, size_t size) |
| Initialize an AVFifoBuffer. More... | |
| void | av_fifo_free (AVFifoBuffer *f) |
| Free an AVFifoBuffer. More... | |
| void | av_fifo_freep (AVFifoBuffer **f) |
| Free an AVFifoBuffer and reset pointer to NULL. More... | |
| void | av_fifo_reset (AVFifoBuffer *f) |
| Reset the AVFifoBuffer to the state right after av_fifo_alloc, in particular it is emptied. More... | |
| 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 it. More... | |
| 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 into it. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| int | av_fifo_realloc2 (AVFifoBuffer *f, unsigned int size) |
| Resize an AVFifoBuffer. More... | |
| int | av_fifo_grow (AVFifoBuffer *f, unsigned int additional_space) |
| Enlarge an AVFifoBuffer. More... | |
| void | av_fifo_drain (AVFifoBuffer *f, int size) |
| Read and discard the specified amount of data from an AVFifoBuffer. More... | |
a very simple circular buffer FIFO implementation
| AVFifoBuffer* av_fifo_alloc | ( | unsigned int | size | ) |
Initialize an AVFifoBuffer.
| size | of FIFO |
| AVFifoBuffer* av_fifo_alloc_array | ( | size_t | nmemb, |
| size_t | size | ||
| ) |
Initialize an AVFifoBuffer.
| nmemb | number of elements |
| size | size of the single element |
| void av_fifo_drain | ( | AVFifoBuffer * | f, |
| int | size | ||
| ) |
Read and discard the specified amount of data from an AVFifoBuffer.
| f | AVFifoBuffer to read from |
| size | amount of data to read in bytes |
Read and discard the specified amount of data from an AVFifoBuffer.
| void av_fifo_free | ( | AVFifoBuffer * | f | ) |
Free an AVFifoBuffer.
| f | AVFifoBuffer to free |
| void av_fifo_freep | ( | AVFifoBuffer ** | f | ) |
Free an AVFifoBuffer and reset pointer to NULL.
| f | AVFifoBuffer to free |
| int av_fifo_generic_peek | ( | AVFifoBuffer * | f, |
| void * | dest, | ||
| int | buf_size, | ||
| void(*)(void *, void *, int) | func | ||
| ) |
Feed data from an AVFifoBuffer to a user-supplied callback.
Similar as av_fifo_gereric_read but without discarding data.
| f | AVFifoBuffer to read from |
| buf_size | number of bytes to read |
| func | generic read function |
| dest | data destination |
| int av_fifo_generic_peek_at | ( | AVFifoBuffer * | f, |
| void * | dest, | ||
| int | offset, | ||
| int | buf_size, | ||
| void(*)(void *, void *, int) | func | ||
| ) |
Feed data at specific position from an AVFifoBuffer to a user-supplied callback.
Similar as av_fifo_gereric_read but without discarding data.
| f | AVFifoBuffer to read from |
| offset | offset from current read position |
| buf_size | number of bytes to read |
| func | generic read function |
| dest | data destination |
| int av_fifo_generic_read | ( | AVFifoBuffer * | f, |
| void * | dest, | ||
| int | buf_size, | ||
| void(*)(void *, void *, int) | func | ||
| ) |
Feed data from an AVFifoBuffer to a user-supplied callback.
| f | AVFifoBuffer to read from |
| buf_size | number of bytes to read |
| func | generic read function |
| dest | data destination |
| int av_fifo_generic_write | ( | AVFifoBuffer * | f, |
| void * | src, | ||
| int | size, | ||
| int(*)(void *, void *, int) | func | ||
| ) |
Feed data from a user-supplied callback to an AVFifoBuffer.
| f | AVFifoBuffer to write to |
| src | data source; non-const since it may be used as a modifiable context by the function defined in func |
| size | number of bytes to write |
| func | generic write function; the first parameter is src, the second is dest_buf, the third is dest_buf_size. func must return the number of bytes written to dest_buf, or <= 0 to indicate no more data available to write. If func is NULL, src is interpreted as a simple byte array for source data. |
| int av_fifo_grow | ( | AVFifoBuffer * | f, |
| unsigned int | additional_space | ||
| ) |
Enlarge an AVFifoBuffer.
In case of reallocation failure, the old FIFO is kept unchanged. The new fifo size may be larger than the requested size.
| f | AVFifoBuffer to resize |
| additional_space | the amount of space in bytes to allocate in addition to av_fifo_size() |
| int av_fifo_realloc2 | ( | AVFifoBuffer * | f, |
| unsigned int | size | ||
| ) |
Resize an AVFifoBuffer.
In case of reallocation failure, the old FIFO is kept unchanged.
| f | AVFifoBuffer to resize |
| size | new AVFifoBuffer size in bytes |
| void av_fifo_reset | ( | AVFifoBuffer * | f | ) |
Reset the AVFifoBuffer to the state right after av_fifo_alloc, in particular it is emptied.
| f | AVFifoBuffer to reset |
| 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 it.
| f | AVFifoBuffer to read from |
| 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 into it.
| f | AVFifoBuffer to write into |
1.8.12