FFmpeg
|
#include "libavutil/error.h"
#include "libavutil/fifo.h"
#include "libavutil/frame.h"
#include "libavutil/mem.h"
#include "container_fifo.h"
#include "refstruct.h"
Go to the source code of this file.
Data Structures | |
struct | ContainerFifo |
ContainerFifo is a FIFO for "containers" - dynamically allocated reusable structs (e.g. More... | |
Functions | |
static int | container_fifo_init_entry (FFRefStructOpaque opaque, void *obj) |
static void | container_fifo_reset_entry (FFRefStructOpaque opaque, void *obj) |
static void | container_fifo_free_entry (FFRefStructOpaque opaque, void *obj) |
ContainerFifo * | ff_container_fifo_alloc (void *(*container_alloc)(void), void(*container_reset)(void *obj), void(*container_free)(void *obj), int(*fifo_write)(void *dst, void *src), int(*fifo_read)(void *dst, void *src)) |
Allocate a new ContainerFifo for the container type defined by provided callbacks. More... | |
void | ff_container_fifo_free (ContainerFifo **pcf) |
Free a ContainerFifo and everything in it. More... | |
int | ff_container_fifo_read (ContainerFifo *cf, void *obj) |
Read the next available object from the FIFO into obj. More... | |
int | ff_container_fifo_write (ContainerFifo *cf, void *obj) |
Write the contents of obj to the FIFO. More... | |
size_t | ff_container_fifo_can_read (ContainerFifo *cf) |
static void * | frame_alloc (void) |
static void | frame_reset (void *obj) |
static void | frame_free (void *obj) |
static int | frame_ref (void *dst, void *src) |
static int | frame_move_ref (void *dst, void *src) |
ContainerFifo * | ff_container_fifo_alloc_avframe (unsigned flags) |
Allocate a ContainerFifo instance for AVFrames. More... | |
|
static |
Definition at line 39 of file container_fifo.c.
Referenced by ff_container_fifo_alloc().
|
static |
Definition at line 51 of file container_fifo.c.
Referenced by ff_container_fifo_alloc().
|
static |
Definition at line 57 of file container_fifo.c.
Referenced by ff_container_fifo_alloc().
ContainerFifo* ff_container_fifo_alloc | ( | void *(*)(void) | container_alloc, |
void(*)(void *obj) | container_reset, | ||
void(*)(void *obj) | container_free, | ||
int(*)(void *dst, void *src) | fifo_write, | ||
int(*)(void *dst, void *src) | fifo_read | ||
) |
Allocate a new ContainerFifo for the container type defined by provided callbacks.
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_write | transfer the contents of src to dst, where src is a container instance provided to ff_container_fifo_write() |
fifo_read | transfer the contents of src to dst in other cases |
Definition at line 64 of file container_fifo.c.
Referenced by ff_container_fifo_alloc_avframe().
void ff_container_fifo_free | ( | ContainerFifo ** | pcf | ) |
Free a ContainerFifo and everything in it.
Definition at line 100 of file container_fifo.c.
Referenced by ff_container_fifo_alloc(), and hevc_decode_free().
int ff_container_fifo_read | ( | ContainerFifo * | pf, |
void * | obj | ||
) |
Read the next available object from the FIFO into obj.
The fifo_read() callback previously provided to ff_container_fifo_alloc() will be called with obj as dst in order to perform the actual transfer.
Definition at line 121 of file container_fifo.c.
Referenced by hevc_receive_frame().
int ff_container_fifo_write | ( | ContainerFifo * | pf, |
void * | obj | ||
) |
Write the contents of obj to the FIFO.
The fifo_write() callback previously provided to ff_container_fifo_alloc() will be called with obj as src in order to perform the actual transfer.
Definition at line 136 of file container_fifo.c.
Referenced by ff_hevc_output_frames().
size_t ff_container_fifo_can_read | ( | ContainerFifo * | pf | ) |
Definition at line 159 of file container_fifo.c.
Referenced by hevc_receive_frame().
|
static |
Definition at line 164 of file container_fifo.c.
Referenced by ff_container_fifo_alloc_avframe().
|
static |
Definition at line 169 of file container_fifo.c.
Referenced by ff_container_fifo_alloc_avframe().
|
static |
Definition at line 174 of file container_fifo.c.
Referenced by ff_container_fifo_alloc_avframe().
|
static |
Definition at line 180 of file container_fifo.c.
Referenced by amf_create_buffer_with_frame_ref(), amf_release_buffer_with_frame_ref(), ff_container_fifo_alloc_avframe(), and vp56_render_mb().
|
static |
Definition at line 185 of file container_fifo.c.
Referenced by ff_container_fifo_alloc_avframe().
ContainerFifo* ff_container_fifo_alloc_avframe | ( | unsigned | flags | ) |
Allocate a ContainerFifo instance for AVFrames.
Note that ff_container_fifo_write() will call av_frame_ref() on src, making a new reference in dst and leaving src untouched.
flags | unused currently |
Definition at line 191 of file container_fifo.c.
Referenced by hevc_init_context().