AvTranscoder
0.9.4
C++APIforLibav/FFmpeg
|
This class describes decoded audio data. More...
#include <AudioFrame.hpp>
Public Member Functions | |
AudioFrame (const AudioFrameDesc &ref) | |
AudioFrame (const Frame &otherFrame) | |
size_t | getSampleRate () const |
size_t | getNbChannels () const |
size_t | getChannelLayout () const |
AVSampleFormat | getSampleFormat () const |
size_t | getNbSamplesPerChannel () const |
AudioFrameDesc | desc () const |
size_t | getSize () const |
in bytes More... | |
void | setNbSamplesPerChannel (const size_t nbSamples) |
void | assign (const unsigned char value) |
Assign the given value to all the data of the audio frame. More... | |
void | assign (const unsigned char *ptrValue) |
Assign the given ptr of data to the data of the audio frame. 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 | allocateAVSample (const AudioFrameDesc &ref) |
Allocate the audio buffer of the frame. More... | |
Friends | |
class | AudioGenerator |
Additional Inherited Members | |
![]() | |
AVFrame * | _frame |
This class describes decoded audio data.
Definition at line 36 of file AudioFrame.hpp.
avtranscoder::AudioFrame::AudioFrame | ( | const AudioFrameDesc & | ref | ) |
Definition at line 42 of file AudioFrame.cpp.
References allocateAVSample().
avtranscoder::AudioFrame::AudioFrame | ( | const Frame & | otherFrame | ) |
Definition at line 48 of file AudioFrame.cpp.
|
private |
Allocate the audio buffer of the frame.
Definition at line 74 of file AudioFrame.cpp.
References avtranscoder::Frame::_frame, avtranscoder::AudioFrameDesc::_nbChannels, avtranscoder::AudioFrameDesc::_sampleFormat, avtranscoder::AudioFrameDesc::_sampleRate, and avtranscoder::getSampleFormatName().
Referenced by AudioFrame().
void avtranscoder::AudioFrame::assign | ( | const unsigned char | value | ) |
Assign the given value to all the data of the audio frame.
Definition at line 100 of file AudioFrame.cpp.
References getSize().
void avtranscoder::AudioFrame::assign | ( | const unsigned char * | ptrValue | ) |
Assign the given ptr of data to the data of the audio frame.
Definition at line 112 of file AudioFrame.cpp.
References avtranscoder::Frame::_frame, avtranscoder::getDescriptionFromErrorCode(), getNbChannels(), getNbSamplesPerChannel(), and getSampleFormat().
|
inline |
Definition at line 50 of file AudioFrame.hpp.
Referenced by avtranscoder::AudioGenerator::decodeNextFrame().
|
inline |
Definition at line 47 of file AudioFrame.hpp.
Referenced by avtranscoder::FilterGraph::pushInBuffer().
|
inline |
Definition at line 46 of file AudioFrame.hpp.
Referenced by assign(), avtranscoder::AudioGenerator::decodeNextFrame(), getSize(), and avtranscoder::AudioTransform::init().
|
inline |
Definition at line 49 of file AudioFrame.hpp.
Referenced by assign(), avtranscoder::AudioDecoder::decodeNextFrame(), avtranscoder::AudioGenerator::decodeNextFrame(), and getSize().
|
inline |
Definition at line 48 of file AudioFrame.hpp.
Referenced by assign(), avtranscoder::AudioGenerator::decodeNextFrame(), getSize(), avtranscoder::AudioTransform::init(), and avtranscoder::FilterGraph::pushInBuffer().
|
inline |
Definition at line 45 of file AudioFrame.hpp.
Referenced by avtranscoder::AudioGenerator::decodeNextFrame(), avtranscoder::AudioTransform::init(), and avtranscoder::FilterGraph::pushInBuffer().
size_t avtranscoder::AudioFrame::getSize | ( | ) | const |
in bytes
Definition at line 53 of file AudioFrame.cpp.
References getNbChannels(), getNbSamplesPerChannel(), getSampleFormat(), and LOG_WARN.
Referenced by assign().
|
inline |
Definition at line 54 of file AudioFrame.hpp.
Referenced by avtranscoder::AudioDecoder::decodeNextFrame(), and avtranscoder::AudioGenerator::decodeNextFrame().
|
friend |
Definition at line 78 of file AudioFrame.hpp.