Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
5c5f75b9
Commit
5c5f75b9
authored
Jul 20, 2012
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi: add avfilter_get_buffer_ref_from_frame.
parent
a8fb7690
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-0
avcodec.c
libavfilter/avcodec.c
+14
-0
avcodec.h
libavfilter/avcodec.h
+10
-0
No files found.
libavfilter/avcodec.c
View file @
5c5f75b9
...
...
@@ -80,6 +80,20 @@ AVFilterBufferRef *avfilter_get_audio_buffer_ref_from_frame(const AVFrame *frame
return
picref
;
}
AVFilterBufferRef
*
avfilter_get_buffer_ref_from_frame
(
enum
AVMediaType
type
,
const
AVFrame
*
frame
,
int
perms
)
{
switch
(
type
)
{
case
AVMEDIA_TYPE_VIDEO
:
return
avfilter_get_video_buffer_ref_from_frame
(
frame
,
perms
);
case
AVMEDIA_TYPE_AUDIO
:
return
avfilter_get_audio_buffer_ref_from_frame
(
frame
,
perms
);
default:
return
NULL
;
}
}
int
avfilter_copy_buf_props
(
AVFrame
*
dst
,
const
AVFilterBufferRef
*
src
)
{
int
planes
,
nb_channels
;
...
...
libavfilter/avcodec.h
View file @
5c5f75b9
...
...
@@ -65,6 +65,16 @@ AVFilterBufferRef *avfilter_get_video_buffer_ref_from_frame(const AVFrame *frame
AVFilterBufferRef
*
avfilter_get_audio_buffer_ref_from_frame
(
const
AVFrame
*
frame
,
int
perms
);
/**
* Create and return a buffer reference from the data and properties
* contained in frame.
*
* @param perms permissions to assign to the new buffer reference
*/
AVFilterBufferRef
*
avfilter_get_buffer_ref_from_frame
(
enum
AVMediaType
type
,
const
AVFrame
*
frame
,
int
perms
);
#ifdef FF_API_FILL_FRAME
/**
* Fill an AVFrame with the information stored in samplesref.
...
...
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