AvTranscoder
0.9.4
C++APIforLibav/FFmpeg
|
This class describes decoded video data. More...
#include <VideoFrame.hpp>
Public Member Functions | |
VideoFrame (const VideoFrameDesc &ref) | |
VideoFrame (const Frame &otherFrame) | |
size_t | getWidth () const |
size_t | getHeight () const |
AVPixelFormat | getPixelFormat () const |
VideoFrameDesc | desc () const |
size_t | getSize () const |
in bytes/** More... | |
void | assign (const unsigned char value) |
Assign the given value to all the data of the picture. More... | |
void | assign (const unsigned char *ptrValue) |
Assign the given ptr of data to the data of the picture. More... | |
![]() | |
Frame () | |
Allocate an empty frame. This only allocates the AVFrame itself, not the data buffers. More... | |
Frame (const Frame &otherFrame) | |
Copy properties and reference data of the other frame. More... | |
virtual | ~Frame () |
unsigned char ** | getData () |
Get all the data of the frame. More... | |
int * | getLineSize () const |
Returns the size in byte. For video, size in bytes of each picture line. For audio, size in bytes of each plane. More... | |
int | getEncodedSize () const |
void | copyData (const Frame &frameToRef) |
Copy the data of the given Frame. More... | |
void | copyProperties (const Frame &otherFrame) |
Copy all the fields that do not affect the data layout in the buffers. More... | |
void | refFrame (const Frame &otherFrame) |
Copy frame properties and create a new reference to data of the given frame. More... | |
void | clear () |
Unreference all the buffers referenced by frame and reset the frame fields. More... | |
bool | isAudioFrame () const |
bool | isVideoFrame () const |
AVFrame & | getAVFrame () |
const AVFrame & | getAVFrame () const |
const unsigned char ** | getData () const |
Private Member Functions | |
void | allocateAVPicture (const VideoFrameDesc &desc) |
Allocate the image buffer of the frame. More... | |
Friends | |
class | VideoGenerator |
Additional Inherited Members | |
![]() | |
AVFrame * | _frame |
This class describes decoded video data.
Definition at line 43 of file VideoFrame.hpp.
avtranscoder::VideoFrame::VideoFrame | ( | const VideoFrameDesc & | ref | ) |
Definition at line 48 of file VideoFrame.cpp.
References allocateAVPicture().
avtranscoder::VideoFrame::VideoFrame | ( | const Frame & | otherFrame | ) |
Definition at line 54 of file VideoFrame.cpp.
|
private |
Allocate the image buffer of the frame.
Definition at line 73 of file VideoFrame.cpp.
References avtranscoder::Frame::_frame, avtranscoder::VideoFrameDesc::_height, avtranscoder::VideoFrameDesc::_pixelFormat, and avtranscoder::VideoFrameDesc::_width.
Referenced by VideoFrame().
void avtranscoder::VideoFrame::assign | ( | const unsigned char | value | ) |
Assign the given value to all the data of the picture.
Definition at line 90 of file VideoFrame.cpp.
References getSize().
Referenced by avtranscoder::VideoGenerator::decodeNextFrame().
void avtranscoder::VideoFrame::assign | ( | const unsigned char * | ptrValue | ) |
Assign the given ptr of data to the data of the picture.
Definition at line 102 of file VideoFrame.cpp.
References avtranscoder::Frame::_frame, avtranscoder::getDescriptionFromErrorCode(), getHeight(), getPixelFormat(), getSize(), and getWidth().
|
inline |
Definition at line 52 of file VideoFrame.hpp.
|
inline |
Definition at line 50 of file VideoFrame.hpp.
Referenced by assign(), avtranscoder::VideoTransform::convert(), getSize(), avtranscoder::VideoTransform::init(), and avtranscoder::FilterGraph::pushInBuffer().
|
inline |
Definition at line 51 of file VideoFrame.hpp.
References AVPixelFormat.
Referenced by assign(), avtranscoder::VideoTransform::convert(), getSize(), avtranscoder::VideoTransform::init(), and avtranscoder::FilterGraph::pushInBuffer().
size_t avtranscoder::VideoFrame::getSize | ( | ) | const |
in bytes/**
Definition at line 59 of file VideoFrame.cpp.
References AV_PIX_FMT_NONE, getHeight(), getPixelFormat(), getWidth(), and LOG_WARN.
Referenced by assign().
|
inline |
Definition at line 49 of file VideoFrame.hpp.
Referenced by assign(), avtranscoder::VideoTransform::convert(), getSize(), avtranscoder::VideoTransform::init(), and avtranscoder::FilterGraph::pushInBuffer().
|
friend |
Definition at line 78 of file VideoFrame.hpp.