AvTranscoder
0.9.4
C++APIforLibav/FFmpeg
|
#include <AudioReader.hpp>
Public Member Functions | |
~AudioReader () | |
void | updateOutput (const size_t sampleRate, const size_t nbChannels, const std::string &sampleFormat) |
Update sample rate, number of channels and sample format of the output. More... | |
const AudioProperties * | getSourceAudioProperties () const |
AudioReader (const std::string &filename, const size_t streamIndex=0, const int channelIndex=-1) | |
AudioReader (InputFile &inputFile, const size_t streamIndex=0, const int channelIndex=-1) | |
size_t | getOutputSampleRate () const |
size_t | getOutputNbChannels () const |
AVSampleFormat | getOutputSampleFormat () const |
![]() | |
IReader (const std::string &filename, const size_t streamIndex=0, const int channelIndex=-1) | |
Create a new InputFile and prepare to read the stream at the given index. More... | |
IReader (InputFile &inputFile, const size_t streamIndex=0, const int channelIndex=-1) | |
Get the existing InputFile and prepare to read the stream at the given index. More... | |
virtual | ~IReader ()=0 |
Frame * | readNextFrame () |
Frame * | readPrevFrame () |
Frame * | readFrameAt (const size_t frame) |
const StreamProperties * | getSourceProperties () const |
Get the properties of the source stream read. More... | |
void | continueWithGenerator (const bool continueWithGenerator=true) |
Set the reader state to generate data (ie silence or black) when there is no more data to decode. More... | |
Private Member Functions | |
void | init () |
Private Attributes | |
const AudioProperties * | _audioStreamProperties |
Properties of the source audio stream read (no ownership, has link) More... | |
size_t | _outputSampleRate |
size_t | _outputNbChannels |
AVSampleFormat | _outputSampleFormat |
Additional Inherited Members | |
![]() | |
InputFile * | _inputFile |
const StreamProperties * | _streamProperties |
IDecoder * | _decoder |
IDecoder * | _generator |
IDecoder * | _currentDecoder |
Link to _inputDecoder or _generator. More... | |
Frame * | _srcFrame |
Frame * | _dstFrame |
ITransform * | _transform |
size_t | _streamIndex |
int | _channelIndex |
Definition at line 12 of file AudioReader.hpp.
avtranscoder::AudioReader::AudioReader | ( | const std::string & | filename, |
const size_t | streamIndex = 0 , |
||
const int | channelIndex = -1 |
||
) |
Definition at line 13 of file AudioReader.cpp.
References init().
avtranscoder::AudioReader::AudioReader | ( | InputFile & | inputFile, |
const size_t | streamIndex = 0 , |
||
const int | channelIndex = -1 |
||
) |
Definition at line 23 of file AudioReader.cpp.
References init().
avtranscoder::AudioReader::~AudioReader | ( | ) |
Definition at line 62 of file AudioReader.cpp.
References avtranscoder::IReader::_decoder, avtranscoder::IReader::_dstFrame, avtranscoder::IReader::_generator, avtranscoder::IReader::_srcFrame, and avtranscoder::IReader::_transform.
|
inline |
Definition at line 33 of file AudioReader.hpp.
|
inline |
Definition at line 34 of file AudioReader.hpp.
|
inline |
Definition at line 32 of file AudioReader.hpp.
|
inline |
Definition at line 38 of file AudioReader.hpp.
|
private |
Definition at line 33 of file AudioReader.cpp.
References _audioStreamProperties, avtranscoder::IReader::_channelIndex, avtranscoder::IReader::_currentDecoder, avtranscoder::IReader::_decoder, avtranscoder::IReader::_dstFrame, avtranscoder::IReader::_generator, avtranscoder::IReader::_inputFile, _outputNbChannels, _outputSampleFormat, _outputSampleRate, avtranscoder::IReader::_srcFrame, avtranscoder::IReader::_streamIndex, avtranscoder::IReader::_streamProperties, avtranscoder::IReader::_transform, avtranscoder::InputFile::activateStream(), avtranscoder::InputFile::analyse(), avtranscoder::InputStream::getAudioCodec(), avtranscoder::AudioCodec::getAudioFrameDesc(), avtranscoder::InputFile::getProperties(), avtranscoder::InputFile::getStream(), avtranscoder::FileProperties::getStreamPropertiesWithIndex(), and avtranscoder::IDecoder::setupDecoder().
Referenced by AudioReader().
void avtranscoder::AudioReader::updateOutput | ( | const size_t | sampleRate, |
const size_t | nbChannels, | ||
const std::string & | sampleFormat | ||
) |
Update sample rate, number of channels and sample format of the output.
Definition at line 71 of file AudioReader.cpp.
References avtranscoder::IReader::_dstFrame, _outputNbChannels, _outputSampleFormat, _outputSampleRate, and avtranscoder::getAVSampleFormat().
|
private |
Properties of the source audio stream read (no ownership, has link)
Definition at line 44 of file AudioReader.hpp.
Referenced by init().
|
private |
Definition at line 49 of file AudioReader.hpp.
Referenced by init(), and updateOutput().
|
private |
Definition at line 50 of file AudioReader.hpp.
Referenced by init(), and updateOutput().
|
private |
Definition at line 48 of file AudioReader.hpp.
Referenced by init(), and updateOutput().