|
FFmpeg
|
#include "framepool.h"#include "libavutil/avassert.h"#include "libavutil/avutil.h"#include "libavutil/buffer.h"#include "libavutil/frame.h"#include "libavutil/imgutils.h"#include "libavutil/imgutils_internal.h"#include "libavutil/mem.h"#include "libavutil/pixfmt.h"Go to the source code of this file.
Functions | |
| static av_cold int | frame_pool_video_init (int width, int height, enum AVPixelFormat format, int align, FFFramePool *pool) |
| static av_cold int | frame_pool_audio_init (int channels, int nb_samples, enum AVSampleFormat format, int align, FFFramePool *pool) |
| AVFrame * | ff_frame_pool_get (FFFramePool *pool) |
| Allocate a new AVFrame, reusing old buffers from the pool when available. More... | |
| av_cold void | ff_frame_pool_uninit (FFFramePool *pool) |
| Deallocate the frame pool. More... | |
| int | ff_frame_pool_video_reinit (FFFramePool *pool, int width, int height, enum AVPixelFormat format, int align) |
| Recreate the video frame pool if its current configuration differs from the provided configuration. More... | |
| int | ff_frame_pool_audio_reinit (FFFramePool *pool, int channels, int nb_samples, enum AVSampleFormat format, int align) |
| Recreate the audio frame pool if its current configuration differs from the provided configuration. More... | |
|
static |
Definition at line 31 of file framepool.c.
Referenced by ff_frame_pool_video_reinit().
|
static |
Definition at line 87 of file framepool.c.
Referenced by ff_frame_pool_audio_reinit().
| AVFrame* ff_frame_pool_get | ( | FFFramePool * | pool | ) |
Allocate a new AVFrame, reusing old buffers from the pool when available.
This function may be called simultaneously from multiple threads.
Definition at line 128 of file framepool.c.
Referenced by ff_default_get_audio_buffer(), and ff_default_get_video_buffer2().
| av_cold void ff_frame_pool_uninit | ( | FFFramePool * | pool | ) |
Deallocate the frame pool.
It is safe to call this function while some of the allocated frame are still in use.
| pool | pointer to the frame pool to be uninitialized |
Definition at line 215 of file framepool.c.
Referenced by ff_frame_pool_audio_reinit(), ff_frame_pool_video_reinit(), frame_pool_audio_init(), frame_pool_video_init(), link_free(), and sws_freeContext().
| int ff_frame_pool_video_reinit | ( | FFFramePool * | pool, |
| int | width, | ||
| int | height, | ||
| enum AVPixelFormat | format, | ||
| int | align | ||
| ) |
Recreate the video frame pool if its current configuration differs from the provided configuration.
If initialization fails, the old pool is kept unchanged.
| pool | pointer to the frame pool to be (re)initialized |
| width | width of each frame in this pool |
| height | height of each frame in this pool |
| format | format of each frame in this pool |
| align | buffers alignment of each frame in this pool |
Definition at line 226 of file framepool.c.
Referenced by ff_default_get_video_buffer2(), and sws_frame_setup().
| int ff_frame_pool_audio_reinit | ( | FFFramePool * | pool, |
| int | channels, | ||
| int | nb_samples, | ||
| enum AVSampleFormat | format, | ||
| int | align | ||
| ) |
Recreate the audio frame pool if its current configuration differs from the provided configuration.
If initialization fails, the old pool is kept unchanged.
| pool | pointer to the frame pool to be (re)initialized |
| channels | channels of each frame in this pool |
| nb_samples | number of samples of each frame in this pool |
| format | format of each frame in this pool |
| align | buffers alignment of each frame in this pool |
Definition at line 247 of file framepool.c.
Referenced by ff_default_get_audio_buffer().
1.8.17