Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
42a05bc9
Commit
42a05bc9
authored
Mar 18, 2019
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lib/ffmpeg/Frame: add more wrapper methods
parent
47221750
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
Frame.hxx
src/lib/ffmpeg/Frame.hxx
+26
-0
No files found.
src/lib/ffmpeg/Frame.hxx
View file @
42a05bc9
...
...
@@ -20,6 +20,8 @@
#ifndef MPD_FFMPEG_FRAME_HXX
#define MPD_FFMPEG_FRAME_HXX
#include "Error.hxx"
extern
"C"
{
#include <libavutil/frame.h>
}
...
...
@@ -47,6 +49,30 @@ public:
AVFrame
&
operator
*
()
noexcept
{
return
*
frame
;
}
AVFrame
*
operator
->
()
noexcept
{
return
frame
;
}
AVFrame
*
get
()
noexcept
{
return
frame
;
}
void
GetBuffer
()
{
int
err
=
av_frame_get_buffer
(
frame
,
0
);
if
(
err
<
0
)
throw
MakeFfmpegError
(
err
,
"av_frame_get_buffer() failed"
);
}
void
MakeWritable
()
{
int
err
=
av_frame_make_writable
(
frame
);
if
(
err
<
0
)
throw
MakeFfmpegError
(
err
,
"av_frame_make_writable() failed"
);
}
void
*
GetData
(
unsigned
plane
)
noexcept
{
return
frame
->
data
[
plane
];
}
};
}
// namespace Ffmpeg
...
...
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