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)
...
@@ -179,7 +179,7 @@ void avfilter_link_free(AVFilterLink **link)
av_frame_free
(
&
(
*
link
)
->
partial_buf
);
av_frame_free
(
&
(
*
link
)
->
partial_buf
);
ff_framequeue_free
(
&
(
*
link
)
->
fifo
);
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
);
av_freep
(
link
);
}
}
...
...
libavfilter/avfilter.h
View file @
b1f68f00
...
@@ -531,9 +531,9 @@ struct AVFilterLink {
...
@@ -531,9 +531,9 @@ struct AVFilterLink {
int64_t
frame_count_in
,
frame_count_out
;
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.
* True if a frame is currently wanted on the output of this filter.
...
...
libavfilter/framepool.c
View file @
b1f68f00
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
#include "libavutil/mem.h"
#include "libavutil/mem.h"
#include "libavutil/pixfmt.h"
#include "libavutil/pixfmt.h"
struct
FF
Video
FramePool
{
struct
FFFramePool
{
int
width
;
int
width
;
int
height
;
int
height
;
...
@@ -37,20 +37,20 @@ struct FFVideoFramePool {
...
@@ -37,20 +37,20 @@ struct FFVideoFramePool {
};
};
FF
VideoFramePool
*
ff_video_frame_pool
_init
(
AVBufferRef
*
(
*
alloc
)(
int
size
),
FF
FramePool
*
ff_frame_pool_video
_init
(
AVBufferRef
*
(
*
alloc
)(
int
size
),
int
width
,
int
width
,
int
height
,
int
height
,
enum
AVPixelFormat
format
,
enum
AVPixelFormat
format
,
int
align
)
int
align
)
{
{
int
i
,
ret
;
int
i
,
ret
;
FF
Video
FramePool
*
pool
;
FFFramePool
*
pool
;
const
AVPixFmtDescriptor
*
desc
=
av_pix_fmt_desc_get
(
format
);
const
AVPixFmtDescriptor
*
desc
=
av_pix_fmt_desc_get
(
format
);
if
(
!
desc
)
if
(
!
desc
)
return
NULL
;
return
NULL
;
pool
=
av_mallocz
(
sizeof
(
FF
Video
FramePool
));
pool
=
av_mallocz
(
sizeof
(
FFFramePool
));
if
(
!
pool
)
if
(
!
pool
)
return
NULL
;
return
NULL
;
...
@@ -100,11 +100,11 @@ FFVideoFramePool *ff_video_frame_pool_init(AVBufferRef* (*alloc)(int size),
...
@@ -100,11 +100,11 @@ FFVideoFramePool *ff_video_frame_pool_init(AVBufferRef* (*alloc)(int size),
return
pool
;
return
pool
;
fail:
fail:
ff_
video_
frame_pool_uninit
(
&
pool
);
ff_frame_pool_uninit
(
&
pool
);
return
NULL
;
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
*
width
,
int
*
height
,
int
*
height
,
enum
AVPixelFormat
*
format
,
enum
AVPixelFormat
*
format
,
...
@@ -122,7 +122,7 @@ int ff_video_frame_pool_get_config(FFVideoFramePool *pool,
...
@@ -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
;
int
i
;
AVFrame
*
frame
;
AVFrame
*
frame
;
...
@@ -174,7 +174,7 @@ fail:
...
@@ -174,7 +174,7 @@ fail:
return
NULL
;
return
NULL
;
}
}
void
ff_
video_frame_pool_uninit
(
FFVideo
FramePool
**
pool
)
void
ff_
frame_pool_uninit
(
FF
FramePool
**
pool
)
{
{
int
i
;
int
i
;
...
...
libavfilter/framepool.h
View file @
b1f68f00
...
@@ -25,11 +25,11 @@
...
@@ -25,11 +25,11 @@
#include "libavutil/frame.h"
#include "libavutil/frame.h"
/**
/**
*
Video f
rame pool. This structure is opaque and not meant to be accessed
*
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
* directly. It is allocated with ff_frame_pool_init() and freed with
* ff_
video_
frame_pool_uninit().
* ff_frame_pool_uninit().
*/
*/
typedef
struct
FF
VideoFramePool
FFVideo
FramePool
;
typedef
struct
FF
FramePool
FF
FramePool
;
/**
/**
* Allocate and initialize a video frame pool.
* Allocate and initialize a video frame pool.
...
@@ -41,21 +41,21 @@ typedef struct FFVideoFramePool FFVideoFramePool;
...
@@ -41,21 +41,21 @@ typedef struct FFVideoFramePool FFVideoFramePool;
* @param height height of each frame in this pool
* @param height height of each frame in this pool
* @param format format 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
* @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
),
FF
FramePool
*
ff_frame_pool_video
_init
(
AVBufferRef
*
(
*
alloc
)(
int
size
),
int
width
,
int
width
,
int
height
,
int
height
,
enum
AVPixelFormat
format
,
enum
AVPixelFormat
format
,
int
align
);
int
align
);
/**
/**
* Deallocate the
video
frame pool. It is safe to call this function while
* Deallocate the frame pool. It is safe to call this function while
* some of the allocated
video
frame are still in use.
* 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.
* Get the video frame pool configuration.
...
@@ -66,7 +66,7 @@ void ff_video_frame_pool_uninit(FFVideoFramePool **pool);
...
@@ -66,7 +66,7 @@ void ff_video_frame_pool_uninit(FFVideoFramePool **pool);
* @param align buffers alignement of each frame in this pool
* @param align buffers alignement of each frame in this pool
* @return 0 on success, a negative AVERROR otherwise.
* @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
*
width
,
int
*
height
,
int
*
height
,
enum
AVPixelFormat
*
format
,
enum
AVPixelFormat
*
format
,
...
@@ -78,7 +78,7 @@ int ff_video_frame_pool_get_config(FFVideoFramePool *pool,
...
@@ -78,7 +78,7 @@ int ff_video_frame_pool_get_config(FFVideoFramePool *pool,
*
*
* @return a new AVFrame on success, NULL on error.
* @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 */
#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)
...
@@ -47,13 +47,13 @@ AVFrame *ff_default_get_video_buffer(AVFilterLink *link, int w, int h)
int
pool_align
=
0
;
int
pool_align
=
0
;
enum
AVPixelFormat
pool_format
=
AV_PIX_FMT_NONE
;
enum
AVPixelFormat
pool_format
=
AV_PIX_FMT_NONE
;
if
(
!
link
->
video_
frame_pool
)
{
if
(
!
link
->
frame_pool
)
{
link
->
video_frame_pool
=
ff_video_frame_pool
_init
(
av_buffer_allocz
,
w
,
h
,
link
->
frame_pool
=
ff_frame_pool_video
_init
(
av_buffer_allocz
,
w
,
h
,
link
->
format
,
BUFFER_ALIGN
);
link
->
format
,
BUFFER_ALIGN
);
if
(
!
link
->
video_
frame_pool
)
if
(
!
link
->
frame_pool
)
return
NULL
;
return
NULL
;
}
else
{
}
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_width
,
&
pool_height
,
&
pool_format
,
&
pool_align
)
<
0
)
{
&
pool_format
,
&
pool_align
)
<
0
)
{
return
NULL
;
return
NULL
;
...
@@ -62,15 +62,15 @@ AVFrame *ff_default_get_video_buffer(AVFilterLink *link, int w, int h)
...
@@ -62,15 +62,15 @@ AVFrame *ff_default_get_video_buffer(AVFilterLink *link, int w, int h)
if
(
pool_width
!=
w
||
pool_height
!=
h
||
if
(
pool_width
!=
w
||
pool_height
!=
h
||
pool_format
!=
link
->
format
||
pool_align
!=
BUFFER_ALIGN
)
{
pool_format
!=
link
->
format
||
pool_align
!=
BUFFER_ALIGN
)
{
ff_
video_frame_pool_uninit
((
FFVideoFramePool
**
)
&
link
->
video_
frame_pool
);
ff_
frame_pool_uninit
((
FFFramePool
**
)
&
link
->
frame_pool
);
link
->
video_frame_pool
=
ff_video_frame_pool
_init
(
av_buffer_allocz
,
w
,
h
,
link
->
frame_pool
=
ff_frame_pool_video
_init
(
av_buffer_allocz
,
w
,
h
,
link
->
format
,
BUFFER_ALIGN
);
link
->
format
,
BUFFER_ALIGN
);
if
(
!
link
->
video_
frame_pool
)
if
(
!
link
->
frame_pool
)
return
NULL
;
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
)
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