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
a67d9cfa
Commit
a67d9cfa
authored
Feb 14, 2012
by
Clément Bœsch
Committed by
Clément Bœsch
Mar 26, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi: add avfilter_fill_frame_from_{audio_,}buffer_ref().
parent
a84851be
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
2 deletions
+50
-2
APIchanges
doc/APIchanges
+3
-0
avcodec.c
libavfilter/avcodec.c
+23
-0
avcodec.h
libavfilter/avcodec.h
+22
-0
version.h
libavfilter/version.h
+2
-2
No files found.
doc/APIchanges
View file @
a67d9cfa
...
...
@@ -13,6 +13,9 @@ libavutil: 2011-04-18
API changes, most recent first:
2012-03-26 - xxxxxxx - lavfi 2.66.100
Add avfilter_fill_frame_from_{audio_,}buffer_ref() functions.
2012-03-21 - xxxxxxx - lavu 51.43.100
Add bprint.h for bprint API.
...
...
libavfilter/avcodec.c
View file @
a67d9cfa
...
...
@@ -56,6 +56,20 @@ AVFilterBufferRef *avfilter_get_video_buffer_ref_from_frame(const AVFrame *frame
return
picref
;
}
int
avfilter_fill_frame_from_audio_buffer_ref
(
AVFrame
*
frame
,
const
AVFilterBufferRef
*
samplesref
)
{
if
(
!
samplesref
||
!
samplesref
->
audio
||
!
frame
)
return
AVERROR
(
EINVAL
);
memcpy
(
frame
->
data
,
samplesref
->
data
,
sizeof
(
frame
->
data
));
frame
->
pkt_pos
=
samplesref
->
pos
;
frame
->
format
=
samplesref
->
format
;
frame
->
nb_samples
=
samplesref
->
audio
->
nb_samples
;
return
0
;
}
int
avfilter_fill_frame_from_video_buffer_ref
(
AVFrame
*
frame
,
const
AVFilterBufferRef
*
picref
)
{
...
...
@@ -73,3 +87,12 @@ int avfilter_fill_frame_from_video_buffer_ref(AVFrame *frame,
return
0
;
}
int
avfilter_fill_frame_from_buffer_ref
(
AVFrame
*
frame
,
const
AVFilterBufferRef
*
ref
)
{
if
(
!
ref
)
return
AVERROR
(
EINVAL
);
return
ref
->
video
?
avfilter_fill_frame_from_video_buffer_ref
(
frame
,
ref
)
:
avfilter_fill_frame_from_audio_buffer_ref
(
frame
,
ref
);
}
libavfilter/avcodec.h
View file @
a67d9cfa
...
...
@@ -46,6 +46,17 @@ int avfilter_copy_frame_props(AVFilterBufferRef *dst, const AVFrame *src);
*/
AVFilterBufferRef
*
avfilter_get_video_buffer_ref_from_frame
(
const
AVFrame
*
frame
,
int
perms
);
/**
* Fill an AVFrame with the information stored in samplesref.
*
* @param frame an already allocated AVFrame
* @param samplesref an audio buffer reference
* @return 0 in case of success, a negative AVERROR code in case of
* failure
*/
int
avfilter_fill_frame_from_audio_buffer_ref
(
AVFrame
*
frame
,
const
AVFilterBufferRef
*
samplesref
);
/**
* Fill an AVFrame with the information stored in picref.
*
...
...
@@ -57,6 +68,17 @@ AVFilterBufferRef *avfilter_get_video_buffer_ref_from_frame(const AVFrame *frame
int
avfilter_fill_frame_from_video_buffer_ref
(
AVFrame
*
frame
,
const
AVFilterBufferRef
*
picref
);
/**
* Fill an AVFrame with information stored in ref.
*
* @param frame an already allocated AVFrame
* @param ref a video or audio buffer reference
* @return 0 in case of success, a negative AVERROR code in case of
* failure
*/
int
avfilter_fill_frame_from_buffer_ref
(
AVFrame
*
frame
,
const
AVFilterBufferRef
*
ref
);
/**
* Add frame data to buffer_src.
*
...
...
libavfilter/version.h
View file @
a67d9cfa
...
...
@@ -29,8 +29,8 @@
#include "libavutil/avutil.h"
#define LIBAVFILTER_VERSION_MAJOR 2
#define LIBAVFILTER_VERSION_MINOR 6
5
#define LIBAVFILTER_VERSION_MICRO 10
2
#define LIBAVFILTER_VERSION_MINOR 6
6
#define LIBAVFILTER_VERSION_MICRO 10
0
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \
...
...
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