AvTranscoder
0.9.4
C++APIforLibav/FFmpeg
|
#include <AudioGenerator.hpp>
Public Member Functions | |
AudioGenerator (const AudioFrameDesc &frameDesc) | |
~AudioGenerator () | |
bool | decodeNextFrame (Frame &frameBuffer) |
Decode next frame. More... | |
bool | decodeNextFrame (Frame &frameBuffer, const size_t subStreamIndex) |
Decode substream of next frame. More... | |
void | setNextFrame (Frame &inputFrame) |
Set the next frame of the input stream (which bypass the work of decoding) More... | |
![]() | |
virtual | ~IDecoder () |
virtual void | setupDecoder (const ProfileLoader::Profile &profile=ProfileLoader::Profile()) |
Setup the decoder. More... | |
virtual void | flushDecoder () |
Reset the internal decoder state / flush internal buffers. More... | |
Private Member Functions | |
AudioGenerator & | operator= (const AudioGenerator &audioGenerator) |
AudioGenerator (const AudioGenerator &audioGenerator) | |
Private Attributes | |
Frame * | _inputFrame |
Has link (no ownership) More... | |
AudioFrame * | _silent |
The generated silent (has ownership) More... | |
const AudioFrameDesc | _frameDesc |
The description of the silence (sampleRate, channels...) More... | |
Definition at line 10 of file AudioGenerator.hpp.
|
private |
avtranscoder::AudioGenerator::AudioGenerator | ( | const AudioFrameDesc & | frameDesc | ) |
Definition at line 10 of file AudioGenerator.cpp.
avtranscoder::AudioGenerator::~AudioGenerator | ( | ) |
Definition at line 17 of file AudioGenerator.cpp.
References _silent.
|
virtual |
Decode next frame.
frameBuffer | the frame decoded the frameBuffer reference belongs to the decoder and is valid only until the next call to this function or until closing or flushing the decoder. The caller may not write to it. |
Implements avtranscoder::IDecoder.
Definition at line 22 of file AudioGenerator.cpp.
References _frameDesc, _inputFrame, _silent, avtranscoder::Frame::clear(), avtranscoder::Frame::copyData(), avtranscoder::AudioFrame::desc(), avtranscoder::Frame::getAVFrame(), avtranscoder::AudioFrame::getNbChannels(), avtranscoder::AudioFrame::getNbSamplesPerChannel(), avtranscoder::AudioFrame::getSampleFormat(), avtranscoder::getSampleFormatName(), avtranscoder::AudioFrame::getSampleRate(), avtranscoder::Frame::isAudioFrame(), LOG_DEBUG, LOG_INFO, LOG_WARN, and avtranscoder::AudioFrame::setNbSamplesPerChannel().
Referenced by decodeNextFrame().
|
virtual |
Decode substream of next frame.
frameBuffer | the frame decoded |
channelIndex | index of channel to extract |
Implements avtranscoder::IDecoder.
Definition at line 74 of file AudioGenerator.cpp.
References decodeNextFrame().
|
private |
|
inlinevirtual |
Set the next frame of the input stream (which bypass the work of decoding)
inputFrame | the new next frame |
Reimplemented from avtranscoder::IDecoder.
Definition at line 24 of file AudioGenerator.hpp.
|
private |
The description of the silence (sampleRate, channels...)
Definition at line 29 of file AudioGenerator.hpp.
Referenced by decodeNextFrame().
|
private |
Has link (no ownership)
Definition at line 27 of file AudioGenerator.hpp.
Referenced by decodeNextFrame().
|
private |
The generated silent (has ownership)
Definition at line 28 of file AudioGenerator.hpp.
Referenced by decodeNextFrame(), and ~AudioGenerator().