FFmpeg
|
#include <stddef.h>
Go to the source code of this file.
Enumerations | |
enum | AVContainerFifoFlags { AV_CONTAINER_FIFO_FLAG_REF = (1 << 0), AV_CONTAINER_FIFO_FLAG_USER = (1 << 16) } |
Functions | |
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. More... | |
AVContainerFifo * | av_container_fifo_alloc_avframe (unsigned flags) |
Allocate an AVContainerFifo instance for AVFrames. More... | |
void | av_container_fifo_free (AVContainerFifo **cf) |
Free a AVContainerFifo and everything in it. More... | |
int | av_container_fifo_write (AVContainerFifo *cf, void *obj, unsigned flags) |
Write the contents of obj to the FIFO. More... | |
int | av_container_fifo_read (AVContainerFifo *cf, void *obj, unsigned flags) |
Read the next available object from the FIFO into obj. More... | |
int | av_container_fifo_peek (AVContainerFifo *cf, void **pobj, size_t offset) |
Access objects stored in the FIFO without retrieving them. More... | |
void | av_container_fifo_drain (AVContainerFifo *cf, size_t nb_elems) |
Discard the specified number of elements from the FIFO. More... | |
size_t | av_container_fifo_can_read (const AVContainerFifo *cf) |
enum AVContainerFifoFlags |
Enumerator | |
---|---|
AV_CONTAINER_FIFO_FLAG_REF | Signal to av_container_fifo_write() that it should make a new reference to data in src rather than consume its contents.
|
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 passed through to the fifo_transfer() callback and not be interpreted by AVContainerFifo code. |
Definition at line 31 of file container_fifo.h.
AVContainerFifo* av_container_fifo_alloc | ( | void * | opaque, |
void *(*)(void *opaque) | container_alloc, | ||
void(*)(void *opaque, void *obj) | container_reset, | ||
void(*)(void *opaque, void *obj) | container_free, | ||
int(*)(void *opaque, void *dst, void *src, unsigned flags) | fifo_transfer, | ||
unsigned | flags | ||
) |
Allocate a new AVContainerFifo for the container type defined by provided callbacks.
opaque | user data that will be passed to the callbacks provided to this function |
container_alloc | allocate a new container instance and return a pointer to it, or NULL on failure |
container_reset | reset the provided container instance to a clean state |
container_free | free the provided container instance |
fifo_transfer | Transfer the contents of container src to dst. |
flags | currently unused |
Definition at line 64 of file container_fifo.c.
Referenced by av_container_fifo_alloc_avframe(), and av_container_fifo_alloc_avpacket().
AVContainerFifo* av_container_fifo_alloc_avframe | ( | unsigned | flags | ) |
Allocate an AVContainerFifo instance for AVFrames.
flags | currently unused |
Definition at line 215 of file container_fifo.c.
Referenced by hevc_init_context(), sq_add_stream(), and tq_alloc().
void av_container_fifo_free | ( | AVContainerFifo ** | cf | ) |
Free a AVContainerFifo and everything in it.
Definition at line 101 of file container_fifo.c.
Referenced by av_container_fifo_alloc(), hevc_decode_free(), sq_free(), and tq_free().
int av_container_fifo_write | ( | AVContainerFifo * | cf, |
void * | obj, | ||
unsigned | flags | ||
) |
Write the contents of obj to the FIFO.
The fifo_transfer() callback previously provided to av_container_fifo_alloc() will be called with obj as src in order to perform the actual transfer.
Definition at line 162 of file container_fifo.c.
Referenced by ff_hevc_output_frames(), sq_send(), and tq_send().
int av_container_fifo_read | ( | AVContainerFifo * | cf, |
void * | obj, | ||
unsigned | flags | ||
) |
Read the next available object from the FIFO into obj.
The fifo_read() callback previously provided to av_container_fifo_alloc() will be called with obj as dst in order to perform the actual transfer.
Definition at line 122 of file container_fifo.c.
Referenced by hevc_receive_frame(), receive_for_stream(), and receive_locked().
int av_container_fifo_peek | ( | AVContainerFifo * | cf, |
void ** | pobj, | ||
size_t | offset | ||
) |
Access objects stored in the FIFO without retrieving them.
The fifo_transfer() callback will NOT be invoked and the FIFO state will not be modified.
pobj | Pointer to the object stored in the FIFO will be written here on success. The object remains owned by the FIFO and the caller may only access it as long as the FIFO is not modified. |
offset | Position of the object to retrieve - 0 is the next item that would be read, 1 the one after, etc. Must be smaller than av_container_fifo_can_read(). |
0 | success, a pointer was written into pobj |
AVERROR(EINVAL) | invalid offset value |
Definition at line 137 of file container_fifo.c.
Referenced by overflow_heartbeat(), receive_for_stream(), and receive_samples().
void av_container_fifo_drain | ( | AVContainerFifo * | cf, |
size_t | nb_elems | ||
) |
Discard the specified number of elements from the FIFO.
nb_elems | number of elements to discard, MUST NOT be larger than av_fifo_can_read(f) |
Definition at line 151 of file container_fifo.c.
Referenced by receive_samples().
size_t av_container_fifo_can_read | ( | const AVContainerFifo * | cf | ) |
Definition at line 185 of file container_fifo.c.
Referenced by hevc_receive_frame(), receive_for_stream(), tb_update(), and tq_receive().