1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

lavfi/framepool: rename FFVideoFramePool to FFFramePool

This commit is contained in:
Matthieu Bouron 2016-05-10 17:45:59 +02:00 committed by Matthieu Bouron
parent e71b8119e7
commit b1f68f00b1
5 changed files with 41 additions and 41 deletions

View File

@ -179,7 +179,7 @@ void avfilter_link_free(AVFilterLink **link)
av_frame_free(&(*link)->partial_buf);
ff_framequeue_free(&(*link)->fifo);
ff_video_frame_pool_uninit((FFVideoFramePool**)&(*link)->video_frame_pool);
ff_frame_pool_uninit((FFFramePool**)&(*link)->frame_pool);
av_freep(link);
}

View File

@ -531,9 +531,9 @@ struct AVFilterLink {
int64_t frame_count_in, frame_count_out;
/**
* A pointer to a FFVideoFramePool struct.
* A pointer to a FFFramePool struct.
*/
void *video_frame_pool;
void *frame_pool;
/**
* True if a frame is currently wanted on the output of this filter.

View File

@ -26,7 +26,7 @@
#include "libavutil/mem.h"
#include "libavutil/pixfmt.h"
struct FFVideoFramePool {
struct FFFramePool {
int width;
int height;
@ -37,20 +37,20 @@ struct FFVideoFramePool {
};
FFVideoFramePool *ff_video_frame_pool_init(AVBufferRef* (*alloc)(int size),
FFFramePool *ff_frame_pool_video_init(AVBufferRef* (*alloc)(int size),
int width,
int height,
enum AVPixelFormat format,
int align)
{
int i, ret;
FFVideoFramePool *pool;
FFFramePool *pool;
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(format);
if (!desc)
return NULL;
pool = av_mallocz(sizeof(FFVideoFramePool));
pool = av_mallocz(sizeof(FFFramePool));
if (!pool)
return NULL;
@ -100,11 +100,11 @@ FFVideoFramePool *ff_video_frame_pool_init(AVBufferRef* (*alloc)(int size),
return pool;
fail:
ff_video_frame_pool_uninit(&pool);
ff_frame_pool_uninit(&pool);
return NULL;
}
int ff_video_frame_pool_get_config(FFVideoFramePool *pool,
int ff_frame_pool_get_video_config(FFFramePool *pool,
int *width,
int *height,
enum AVPixelFormat *format,
@ -122,7 +122,7 @@ int ff_video_frame_pool_get_config(FFVideoFramePool *pool,
}
AVFrame *ff_video_frame_pool_get(FFVideoFramePool *pool)
AVFrame *ff_frame_pool_get(FFFramePool *pool)
{
int i;
AVFrame *frame;
@ -174,7 +174,7 @@ fail:
return NULL;
}
void ff_video_frame_pool_uninit(FFVideoFramePool **pool)
void ff_frame_pool_uninit(FFFramePool **pool)
{
int i;

View File

@ -25,11 +25,11 @@
#include "libavutil/frame.h"
/**
* Video frame pool. This structure is opaque and not meant to be accessed
* directly. It is allocated with ff_video_frame_pool_init() and freed with
* ff_video_frame_pool_uninit().
* Frame pool. This structure is opaque and not meant to be accessed
* directly. It is allocated with ff_frame_pool_init() and freed with
* ff_frame_pool_uninit().
*/
typedef struct FFVideoFramePool FFVideoFramePool;
typedef struct FFFramePool FFFramePool;
/**
* Allocate and initialize a video frame pool.
@ -41,21 +41,21 @@ typedef struct FFVideoFramePool FFVideoFramePool;
* @param height height of each frame in this pool
* @param format format of each frame in this pool
* @param align buffers alignement of each frame in this pool
* @return newly created video frame pool on success, NULL on error.
* @return newly created frame pool on success, NULL on error.
*/
FFVideoFramePool *ff_video_frame_pool_init(AVBufferRef* (*alloc)(int size),
FFFramePool *ff_frame_pool_video_init(AVBufferRef* (*alloc)(int size),
int width,
int height,
enum AVPixelFormat format,
int align);
/**
* Deallocate the video frame pool. It is safe to call this function while
* some of the allocated video frame are still in use.
* Deallocate the frame pool. It is safe to call this function while
* some of the allocated frame are still in use.
*
* @param pool pointer to the video frame pool to be freed. It will be set to NULL.
* @param pool pointer to the frame pool to be freed. It will be set to NULL.
*/
void ff_video_frame_pool_uninit(FFVideoFramePool **pool);
void ff_frame_pool_uninit(FFFramePool **pool);
/**
* Get the video frame pool configuration.
@ -66,7 +66,7 @@ void ff_video_frame_pool_uninit(FFVideoFramePool **pool);
* @param align buffers alignement of each frame in this pool
* @return 0 on success, a negative AVERROR otherwise.
*/
int ff_video_frame_pool_get_config(FFVideoFramePool *pool,
int ff_frame_pool_get_video_config(FFFramePool *pool,
int *width,
int *height,
enum AVPixelFormat *format,
@ -78,7 +78,7 @@ int ff_video_frame_pool_get_config(FFVideoFramePool *pool,
*
* @return a new AVFrame on success, NULL on error.
*/
AVFrame *ff_video_frame_pool_get(FFVideoFramePool *pool);
AVFrame *ff_frame_pool_get(FFFramePool *pool);
#endif /* AVFILTER_FRAMEPOOL_H */

View File

@ -47,13 +47,13 @@ AVFrame *ff_default_get_video_buffer(AVFilterLink *link, int w, int h)
int pool_align = 0;
enum AVPixelFormat pool_format = AV_PIX_FMT_NONE;
if (!link->video_frame_pool) {
link->video_frame_pool = ff_video_frame_pool_init(av_buffer_allocz, w, h,
if (!link->frame_pool) {
link->frame_pool = ff_frame_pool_video_init(av_buffer_allocz, w, h,
link->format, BUFFER_ALIGN);
if (!link->video_frame_pool)
if (!link->frame_pool)
return NULL;
} else {
if (ff_video_frame_pool_get_config(link->video_frame_pool,
if (ff_frame_pool_get_video_config(link->frame_pool,
&pool_width, &pool_height,
&pool_format, &pool_align) < 0) {
return NULL;
@ -62,15 +62,15 @@ AVFrame *ff_default_get_video_buffer(AVFilterLink *link, int w, int h)
if (pool_width != w || pool_height != h ||
pool_format != link->format || pool_align != BUFFER_ALIGN) {
ff_video_frame_pool_uninit((FFVideoFramePool **)&link->video_frame_pool);
link->video_frame_pool = ff_video_frame_pool_init(av_buffer_allocz, w, h,
ff_frame_pool_uninit((FFFramePool **)&link->frame_pool);
link->frame_pool = ff_frame_pool_video_init(av_buffer_allocz, w, h,
link->format, BUFFER_ALIGN);
if (!link->video_frame_pool)
if (!link->frame_pool)
return NULL;
}
}
return ff_video_frame_pool_get(link->video_frame_pool);
return ff_frame_pool_get(link->frame_pool);
}
AVFrame *ff_get_video_buffer(AVFilterLink *link, int w, int h)