AvTranscoder
0.9.4
C++APIforLibav/FFmpeg
|
Based class to read a stream. More...
#include <IReader.hpp>
Public Member Functions | |
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... | |
Protected Attributes | |
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 |
Private Attributes | |
int | _currentFrame |
The current decoded frame. More... | |
bool | _inputFileAllocated |
Does the InputFile is held by the class or not (depends on the constructor called) More... | |
bool | _continueWithGenerator |
If there is no more data to decode, complete with generated data. More... | |
Based class to read a stream.
Definition at line 18 of file IReader.hpp.
avtranscoder::IReader::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.
streamIndex | by default read the first stream |
channelIndex | by default -1 (all channels of the stream) |
Definition at line 8 of file IReader.cpp.
References _inputFile.
avtranscoder::IReader::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.
Definition at line 26 of file IReader.cpp.
|
pure virtual |
Definition at line 43 of file IReader.cpp.
References _inputFile, and _inputFileAllocated.
|
inline |
Set the reader state to generate data (ie silence or black) when there is no more data to decode.
Definition at line 64 of file IReader.hpp.
References continueWithGenerator().
Referenced by continueWithGenerator().
|
inline |
Get the properties of the source stream read.
Definition at line 58 of file IReader.hpp.
Frame * avtranscoder::IReader::readFrameAt | ( | const size_t | frame | ) |
Definition at line 59 of file IReader.cpp.
References _channelIndex, _continueWithGenerator, _currentDecoder, _currentFrame, _decoder, _dstFrame, _generator, _inputFile, _srcFrame, _transform, avtranscoder::ITransform::convert(), avtranscoder::IDecoder::decodeNextFrame(), avtranscoder::IDecoder::flushDecoder(), and avtranscoder::InputFile::seekAtFrame().
Referenced by Window::displayAtFrame(), readNextFrame(), and readPrevFrame().
Frame * avtranscoder::IReader::readNextFrame | ( | ) |
Definition at line 49 of file IReader.cpp.
References _currentFrame, and readFrameAt().
Referenced by Window::displayNextFrame().
Frame * avtranscoder::IReader::readPrevFrame | ( | ) |
Definition at line 54 of file IReader.cpp.
References _currentFrame, and readFrameAt().
Referenced by Window::displayPrevFrame().
|
protected |
Definition at line 79 of file IReader.hpp.
Referenced by avtranscoder::AudioReader::init(), and readFrameAt().
|
private |
If there is no more data to decode, complete with generated data.
Definition at line 84 of file IReader.hpp.
Referenced by readFrameAt().
|
protected |
Link to _inputDecoder or _generator.
Definition at line 71 of file IReader.hpp.
Referenced by avtranscoder::AudioReader::init(), avtranscoder::VideoReader::init(), and readFrameAt().
|
private |
The current decoded frame.
Definition at line 82 of file IReader.hpp.
Referenced by readFrameAt(), readNextFrame(), and readPrevFrame().
|
protected |
Definition at line 69 of file IReader.hpp.
Referenced by avtranscoder::AudioReader::init(), avtranscoder::VideoReader::init(), readFrameAt(), avtranscoder::AudioReader::~AudioReader(), and avtranscoder::VideoReader::~VideoReader().
|
protected |
Definition at line 74 of file IReader.hpp.
Referenced by avtranscoder::AudioReader::init(), avtranscoder::VideoReader::init(), readFrameAt(), avtranscoder::AudioReader::updateOutput(), avtranscoder::VideoReader::updateOutput(), avtranscoder::AudioReader::~AudioReader(), and avtranscoder::VideoReader::~VideoReader().
|
protected |
Definition at line 70 of file IReader.hpp.
Referenced by avtranscoder::AudioReader::init(), avtranscoder::VideoReader::init(), readFrameAt(), avtranscoder::AudioReader::~AudioReader(), and avtranscoder::VideoReader::~VideoReader().
|
protected |
Definition at line 67 of file IReader.hpp.
Referenced by avtranscoder::AudioReader::init(), avtranscoder::VideoReader::init(), IReader(), readFrameAt(), and ~IReader().
|
private |
Does the InputFile is held by the class or not (depends on the constructor called)
Definition at line 83 of file IReader.hpp.
Referenced by ~IReader().
|
protected |
Definition at line 73 of file IReader.hpp.
Referenced by avtranscoder::AudioReader::init(), avtranscoder::VideoReader::init(), readFrameAt(), avtranscoder::AudioReader::~AudioReader(), and avtranscoder::VideoReader::~VideoReader().
|
protected |
Definition at line 78 of file IReader.hpp.
Referenced by avtranscoder::AudioReader::init(), and avtranscoder::VideoReader::init().
|
protected |
Definition at line 68 of file IReader.hpp.
Referenced by avtranscoder::AudioReader::init(), and avtranscoder::VideoReader::init().
|
protected |
Definition at line 76 of file IReader.hpp.
Referenced by avtranscoder::AudioReader::init(), avtranscoder::VideoReader::init(), readFrameAt(), avtranscoder::AudioReader::~AudioReader(), and avtranscoder::VideoReader::~VideoReader().