AvTranscoder
0.9.4
C++APIforLibav/FFmpeg
|
This class describes decoded (raw) audio or video data. More...
#include <Frame.hpp>
Public Member Functions | |
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 |
Protected Attributes | |
AVFrame * | _frame |
Private Member Functions | |
void | allocateAVFrame () |
avtranscoder::Frame::Frame | ( | ) |
Allocate an empty frame. This only allocates the AVFrame itself, not the data buffers.
Definition at line 8 of file Frame.cpp.
References allocateAVFrame().
avtranscoder::Frame::Frame | ( | const Frame & | otherFrame | ) |
Copy properties and reference data of the other frame.
Definition at line 14 of file Frame.cpp.
References allocateAVFrame(), getAVFrame(), and refFrame().
|
private |
void avtranscoder::Frame::clear | ( | ) |
Unreference all the buffers referenced by frame and reset the frame fields.
Definition at line 71 of file Frame.cpp.
References _frame.
Referenced by avtranscoder::AudioGenerator::decodeNextFrame(), and avtranscoder::VideoGenerator::decodeNextFrame().
void avtranscoder::Frame::copyData | ( | const Frame & | frameToRef | ) |
Copy the data of the given Frame.
Definition at line 48 of file Frame.cpp.
References _frame, getAVFrame(), and avtranscoder::getDescriptionFromErrorCode().
Referenced by avtranscoder::AudioGenerator::decodeNextFrame(), and avtranscoder::VideoGenerator::decodeNextFrame().
void avtranscoder::Frame::copyProperties | ( | const Frame & | otherFrame | ) |
Copy all the fields that do not affect the data layout in the buffers.
Definition at line 57 of file Frame.cpp.
References _frame, and getAVFrame().
Referenced by avtranscoder::AudioDecoder::decodeNextFrame().
|
inline |
Definition at line 88 of file Frame.hpp.
Referenced by avtranscoder::VideoProperties::analyseGopStructure(), avtranscoder::AudioTransform::convert(), copyData(), copyProperties(), avtranscoder::AudioDecoder::decodeNextFrame(), avtranscoder::VideoDecoder::decodeNextFrame(), avtranscoder::AudioGenerator::decodeNextFrame(), avtranscoder::AudioEncoder::encodeFrame(), avtranscoder::VideoEncoder::encodeFrame(), Frame(), avtranscoder::VideoProperties::getBitRate(), avtranscoder::FilterGraph::process(), and refFrame().
|
inline |
|
inline |
Get all the data of the frame.
Definition at line 35 of file Frame.hpp.
Referenced by avtranscoder::VideoTransform::convert(), avtranscoder::AudioTransform::convert(), avtranscoder::AudioDecoder::decodeNextFrame(), Window::displayAtFrame(), Window::displayNextFrame(), and Window::displayPrevFrame().
|
inline |
int avtranscoder::Frame::getEncodedSize | ( | ) | const |
Definition at line 43 of file Frame.cpp.
References _frame.
Referenced by avtranscoder::VideoProperties::analyseGopStructure(), and avtranscoder::VideoProperties::getBitRate().
|
inline |
Returns the size in byte. For video, size in bytes of each picture line. For audio, size in bytes of each plane.
Definition at line 44 of file Frame.hpp.
Referenced by avtranscoder::VideoTransform::convert().
bool avtranscoder::Frame::isAudioFrame | ( | ) | const |
Definition at line 89 of file Frame.cpp.
References _frame.
Referenced by avtranscoder::AudioGenerator::decodeNextFrame(), avtranscoder::FilterGraph::pushInBuffer(), and avtranscoder::FilterGraph::pushOutBuffer().
bool avtranscoder::Frame::isVideoFrame | ( | ) | const |
Definition at line 96 of file Frame.cpp.
References _frame.
Referenced by avtranscoder::VideoGenerator::decodeNextFrame(), avtranscoder::FilterGraph::pushInBuffer(), and avtranscoder::FilterGraph::pushOutBuffer().
void avtranscoder::Frame::refFrame | ( | const Frame & | otherFrame | ) |
Copy frame properties and create a new reference to data of the given frame.
Definition at line 62 of file Frame.cpp.
References _frame, getAVFrame(), and avtranscoder::getDescriptionFromErrorCode().
Referenced by Frame().
|
protected |
Definition at line 97 of file Frame.hpp.
Referenced by allocateAVFrame(), avtranscoder::VideoFrame::allocateAVPicture(), avtranscoder::AudioFrame::allocateAVSample(), avtranscoder::AudioFrame::assign(), avtranscoder::VideoFrame::assign(), clear(), copyData(), copyProperties(), getEncodedSize(), isAudioFrame(), isVideoFrame(), refFrame(), and ~Frame().