gavl
|
Typedefs | |
typedef struct gavl_video_frame_pool_s | gavl_video_frame_pool_t |
Video frame pool. | |
Functions | |
GAVL_PUBLIC gavl_video_frame_pool_t * | gavl_video_frame_pool_create (gavl_video_frame_t *(*create_frame)(void *priv), void *priv) |
Create a video frame pool. | |
GAVL_PUBLIC gavl_video_frame_t * | gavl_video_frame_pool_get (gavl_video_frame_pool_t *p) |
Create a video frame pool. | |
GAVL_PUBLIC void | gavl_video_frame_pool_destroy (gavl_video_frame_pool_t *p) |
Destroy a video frame pool. | |
GAVL_PUBLIC void | gavl_video_frame_pool_reset (gavl_video_frame_pool_t *p) |
Reset a video frame pool. | |
GAVL_PUBLIC void | gavl_video_frame_debayer (gavl_video_options_t *opt, gavl_video_frame_t *src, gavl_video_frame_t *dst, int bayer_format, gavl_video_format_t *dst_format) |
This is used in scenarios where we want optimized video pipelines. Allocated frames can be passed forward or backwards in the pipeline while minimizing the memcpy operations.
The idea is to increment the refcount of a frame if an application intends to use a frame beyond an actual function call and decrement it when it's done with it.
The frame pool takes care of the refcounts and allocates frames on demand if necessary.
typedef struct gavl_video_frame_pool_s gavl_video_frame_pool_t |
Video frame pool.
Since 1.5.0.
GAVL_PUBLIC gavl_video_frame_pool_t * gavl_video_frame_pool_create | ( | gavl_video_frame_t *(*)(void *priv) | create_frame, |
void * | priv | ||
) |
Create a video frame pool.
create_frame | Function used to create one video frame |
priv | Private data to pass to create_frame |
GAVL_PUBLIC gavl_video_frame_t * gavl_video_frame_pool_get | ( | gavl_video_frame_pool_t * | p | ) |
Create a video frame pool.
p | A frame pool |
GAVL_PUBLIC void gavl_video_frame_pool_destroy | ( | gavl_video_frame_pool_t * | p | ) |
Destroy a video frame pool.
p | A frame pool |
This also frees all frames, which were allocated by this frame pool.
GAVL_PUBLIC void gavl_video_frame_pool_reset | ( | gavl_video_frame_pool_t * | p | ) |
Reset a video frame pool.
p | A frame pool |
Set the reference counters of all frames to zero. This is typically called before a seek operation in the stream.