Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
b1f68f00
Commit
b1f68f00
authored
May 10, 2016
by
Matthieu Bouron
Committed by
Matthieu Bouron
Jan 12, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/framepool: rename FFVideoFramePool to FFFramePool
parent
e71b8119
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
41 deletions
+41
-41
avfilter.c
libavfilter/avfilter.c
+1
-1
avfilter.h
libavfilter/avfilter.h
+2
-2
framepool.c
libavfilter/framepool.c
+12
-12
framepool.h
libavfilter/framepool.h
+16
-16
video.c
libavfilter/video.c
+10
-10
No files found.
libavfilter/avfilter.c
View file @
b1f68f00
...
...
@@ -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
);
}
...
...
libavfilter/avfilter.h
View file @
b1f68f00
...
...
@@ -531,9 +531,9 @@ struct AVFilterLink {
int64_t
frame_count_in
,
frame_count_out
;
/**
* A pointer to a FF
Video
FramePool 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.
...
...
libavfilter/framepool.c
View file @
b1f68f00
...
...
@@ -26,7 +26,7 @@
#include "libavutil/mem.h"
#include "libavutil/pixfmt.h"
struct
FF
Video
FramePool
{
struct
FFFramePool
{
int
width
;
int
height
;
...
...
@@ -37,20 +37,20 @@ struct FFVideoFramePool {
};
FF
VideoFramePool
*
ff_video_frame_pool
_init
(
AVBufferRef
*
(
*
alloc
)(
int
size
),
int
width
,
int
height
,
enum
AVPixelFormat
format
,
int
align
)
FF
FramePool
*
ff_frame_pool_video
_init
(
AVBufferRef
*
(
*
alloc
)(
int
size
),
int
width
,
int
height
,
enum
AVPixelFormat
format
,
int
align
)
{
int
i
,
ret
;
FF
Video
FramePool
*
pool
;
FFFramePool
*
pool
;
const
AVPixFmtDescriptor
*
desc
=
av_pix_fmt_desc_get
(
format
);
if
(
!
desc
)
return
NULL
;
pool
=
av_mallocz
(
sizeof
(
FF
Video
FramePool
));
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
(
FFVideo
FramePool
*
pool
,
int
ff_
frame_pool_get_video_config
(
FF
FramePool
*
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
(
FFVideo
FramePool
*
pool
)
AVFrame
*
ff_
frame_pool_get
(
FF
FramePool
*
pool
)
{
int
i
;
AVFrame
*
frame
;
...
...
@@ -174,7 +174,7 @@ fail:
return
NULL
;
}
void
ff_
video_frame_pool_uninit
(
FFVideo
FramePool
**
pool
)
void
ff_
frame_pool_uninit
(
FF
FramePool
**
pool
)
{
int
i
;
...
...
libavfilter/framepool.h
View file @
b1f68f00
...
...
@@ -25,11 +25,11 @@
#include "libavutil/frame.h"
/**
*
Video f
rame 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().
*
F
rame 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
FF
VideoFramePool
FFVideo
FramePool
;
typedef
struct
FF
FramePool
FF
FramePool
;
/**
* 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.
*/
FF
VideoFramePool
*
ff_video_frame_pool
_init
(
AVBufferRef
*
(
*
alloc
)(
int
size
),
int
width
,
int
height
,
enum
AVPixelFormat
format
,
int
align
);
FF
FramePool
*
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
(
FFVideo
FramePool
**
pool
);
void
ff_
frame_pool_uninit
(
FF
FramePool
**
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
(
FFVideo
FramePool
*
pool
,
int
ff_
frame_pool_get_video_config
(
FF
FramePool
*
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
(
FFVideo
FramePool
*
pool
);
AVFrame
*
ff_
frame_pool_get
(
FF
FramePool
*
pool
);
#endif
/* AVFILTER_FRAMEPOOL_H */
libavfilter/video.c
View file @
b1f68f00
...
...
@@ -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
,
link
->
format
,
BUFFER_ALIGN
);
if
(
!
link
->
video_
frame_pool
)
if
(
!
link
->
frame_pool
)
{
link
->
frame_pool
=
ff_frame_pool_video
_init
(
av_buffer_allocz
,
w
,
h
,
link
->
format
,
BUFFER_ALIGN
);
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
,
link
->
format
,
BUFFER_ALIGN
);
if
(
!
link
->
video_
frame_pool
)
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
->
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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment