History

lavfi/framepool: rename FFVideoFramePool to FFFramePool

Matthieu Bouron committed 10 years ago

Commit b1f68f01 parent e71b8115 files · +41 −41Browse files

Unified · Split

5 files
  1. libavfilter/avfilter.c +1 −1
  2. libavfilter/avfilter.h +2 −2
  3. libavfilter/framepool.c +12 −12
  4. libavfilter/framepool.h +16 −16
  5. libavfilter/video.c +10 −10
libavfilter/avfilter.c+1−1
@@ -179,7 +179,7 @@ void avfilter_link_free(AVFilterLink **link) · 178 unmodified lines
179179
180180 av_frame_free(&(*link)->partial_buf);
181181 ff_framequeue_free(&(*link)->fifo);
182− ff_video_frame_pool_uninit((FFVideoFramePool**)&(*link)->video_frame_pool);
182+ ff_frame_pool_uninit((FFFramePool**)&(*link)->frame_pool);
183183
184184 av_freep(link);
185185 }
libavfilter/avfilter.h+2−2
@@ -531,9 +531,9 @@ struct AVFilterLink { · 530 unmodified lines
531531 int64_t frame_count_in, frame_count_out;
532532
533533 /**
534− * A pointer to a FFVideoFramePool struct.
534+ * A pointer to a FFFramePool struct.
535535 */
536− void *video_frame_pool;
536+ void *frame_pool;
537537
538538 /**
539539 * True if a frame is currently wanted on the output of this filter.
libavfilter/framepool.c+12−12
@@ -26,7 +26,7 @@ · 25 unmodified lines
2626 #include "libavutil/mem.h"
2727 #include "libavutil/pixfmt.h"
2828
29−struct FFVideoFramePool {
29+struct FFFramePool {
3030
3131 int width;
3232 int height;
@@ -37,20 +37,20 @@ struct FFVideoFramePool { · 4 unmodified lines
3737
3838 };
3939
40−FFVideoFramePool *ff_video_frame_pool_init(AVBufferRef* (*alloc)(int size),
41− int width,
42− int height,
43− enum AVPixelFormat format,
44− int align)
40+FFFramePool *ff_frame_pool_video_init(AVBufferRef* (*alloc)(int size),
41+ int width,
42+ int height,
43+ enum AVPixelFormat format,
44+ int align)
4545 {
4646 int i, ret;
47− FFVideoFramePool *pool;
47+ FFFramePool *pool;
4848 const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(format);
4949
5050 if (!desc)
5151 return NULL;
5252
53− pool = av_mallocz(sizeof(FFVideoFramePool));
53+ pool = av_mallocz(sizeof(FFFramePool));
5454 if (!pool)
5555 return NULL;
5656
@@ -100,11 +100,11 @@ FFVideoFramePool *ff_video_frame_pool_init(AVBufferRef* (*alloc)(int size), · 43 unmodified lines
100100 return pool;
101101
102102 fail:
103− ff_video_frame_pool_uninit(&pool);
103+ ff_frame_pool_uninit(&pool);
104104 return NULL;
105105 }
106106
107−int ff_video_frame_pool_get_config(FFVideoFramePool *pool,
107+int ff_frame_pool_get_video_config(FFFramePool *pool,
108108 int *width,
109109 int *height,
110110 enum AVPixelFormat *format,
@@ -122,7 +122,7 @@ int ff_video_frame_pool_get_config(FFVideoFramePool *pool, · 11 unmodified lines
122122 }
123123
124124
125−AVFrame *ff_video_frame_pool_get(FFVideoFramePool *pool)
125+AVFrame *ff_frame_pool_get(FFFramePool *pool)
126126 {
127127 int i;
128128 AVFrame *frame;
@@ -174,7 +174,7 @@ fail: · 45 unmodified lines
174174 return NULL;
175175 }
176176
177−void ff_video_frame_pool_uninit(FFVideoFramePool **pool)
177+void ff_frame_pool_uninit(FFFramePool **pool)
178178 {
179179 int i;
180180
libavfilter/framepool.h+16−16
@@ -25,11 +25,11 @@ · 24 unmodified lines
2525 #include "libavutil/frame.h"
2626
2727 /**
28− * Video frame pool. This structure is opaque and not meant to be accessed
29− * directly. It is allocated with ff_video_frame_pool_init() and freed with
30− * ff_video_frame_pool_uninit().
28+ * Frame pool. This structure is opaque and not meant to be accessed
29+ * directly. It is allocated with ff_frame_pool_init() and freed with
30+ * ff_frame_pool_uninit().
3131 */
32−typedef struct FFVideoFramePool FFVideoFramePool;
32+typedef struct FFFramePool FFFramePool;
3333
3434 /**
3535 * Allocate and initialize a video frame pool.
@@ -41,21 +41,21 @@ typedef struct FFVideoFramePool FFVideoFramePool; · 5 unmodified lines
4141 * @param height height of each frame in this pool
4242 * @param format format of each frame in this pool
4343 * @param align buffers alignement of each frame in this pool
44− * @return newly created video frame pool on success, NULL on error.
44+ * @return newly created frame pool on success, NULL on error.
4545 */
46−FFVideoFramePool *ff_video_frame_pool_init(AVBufferRef* (*alloc)(int size),
47− int width,
48− int height,
49− enum AVPixelFormat format,
50− int align);
46+FFFramePool *ff_frame_pool_video_init(AVBufferRef* (*alloc)(int size),
47+ int width,
48+ int height,
49+ enum AVPixelFormat format,
50+ int align);
5151
5252 /**
53− * Deallocate the video frame pool. It is safe to call this function while
54− * some of the allocated video frame are still in use.
53+ * Deallocate the frame pool. It is safe to call this function while
54+ * some of the allocated frame are still in use.
5555 *
56− * @param pool pointer to the video frame pool to be freed. It will be set to NULL.
56+ * @param pool pointer to the frame pool to be freed. It will be set to NULL.
5757 */
58−void ff_video_frame_pool_uninit(FFVideoFramePool **pool);
58+void ff_frame_pool_uninit(FFFramePool **pool);
5959
6060 /**
6161 * Get the video frame pool configuration.
@@ -66,7 +66,7 @@ void ff_video_frame_pool_uninit(FFVideoFramePool **pool); · 4 unmodified lines
6666 * @param align buffers alignement of each frame in this pool
6767 * @return 0 on success, a negative AVERROR otherwise.
6868 */
69−int ff_video_frame_pool_get_config(FFVideoFramePool *pool,
69+int ff_frame_pool_get_video_config(FFFramePool *pool,
7070 int *width,
7171 int *height,
7272 enum AVPixelFormat *format,
@@ -78,7 +78,7 @@ int ff_video_frame_pool_get_config(FFVideoFramePool *pool, · 5 unmodified lines
7878 *
7979 * @return a new AVFrame on success, NULL on error.
8080 */
81−AVFrame *ff_video_frame_pool_get(FFVideoFramePool *pool);
81+AVFrame *ff_frame_pool_get(FFFramePool *pool);
8282
8383
8484 #endif /* AVFILTER_FRAMEPOOL_H */
libavfilter/video.c+10−10
@@ -47,13 +47,13 @@ AVFrame *ff_default_get_video_buffer(AVFilterLink *link, int w, int h) · 46 unmodified lines
4747 int pool_align = 0;
4848 enum AVPixelFormat pool_format = AV_PIX_FMT_NONE;
4949
50− if (!link->video_frame_pool) {
51− link->video_frame_pool = ff_video_frame_pool_init(av_buffer_allocz, w, h,
52− link->format, BUFFER_ALIGN);
53− if (!link->video_frame_pool)
50+ if (!link->frame_pool) {
51+ link->frame_pool = ff_frame_pool_video_init(av_buffer_allocz, w, h,
52+ link->format, BUFFER_ALIGN);
53+ if (!link->frame_pool)
5454 return NULL;
5555 } else {
56− if (ff_video_frame_pool_get_config(link->video_frame_pool,
56+ if (ff_frame_pool_get_video_config(link->frame_pool,
5757 &pool_width, &pool_height,
5858 &pool_format, &pool_align) < 0) {
5959 return NULL;
@@ -62,15 +62,15 @@ AVFrame *ff_default_get_video_buffer(AVFilterLink *link, int w, int h) · 2 unmodified lines
6262 if (pool_width != w || pool_height != h ||
6363 pool_format != link->format || pool_align != BUFFER_ALIGN) {
6464
65− ff_video_frame_pool_uninit((FFVideoFramePool **)&link->video_frame_pool);
66− link->video_frame_pool = ff_video_frame_pool_init(av_buffer_allocz, w, h,
67− link->format, BUFFER_ALIGN);
68− if (!link->video_frame_pool)
65+ ff_frame_pool_uninit((FFFramePool **)&link->frame_pool);
66+ link->frame_pool = ff_frame_pool_video_init(av_buffer_allocz, w, h,
67+ link->format, BUFFER_ALIGN);
68+ if (!link->frame_pool)
6969 return NULL;
7070 }
7171 }
7272
73− return ff_video_frame_pool_get(link->video_frame_pool);
73+ return ff_frame_pool_get(link->frame_pool);
7474 }
7575
7676 AVFrame *ff_get_video_buffer(AVFilterLink *link, int w, int h)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t