AvTranscoder
0.9.4
C++APIforLibav/FFmpeg
|
#include <InputStream.hpp>
Public Member Functions | |
InputStream (InputFile &inputFile, const size_t streamIndex) | |
~InputStream () | |
bool | readNextPacket (CodedData &data) |
Read the next packet of the stream. More... | |
const StreamProperties & | getProperties () const |
size_t | getStreamIndex () const |
VideoCodec & | getVideoCodec () |
AudioCodec & | getAudioCodec () |
DataCodec & | getDataCodec () |
void | activate (const bool activate=true) |
Functions about buffering Activate the stream will buffered its data when read packets. More... | |
bool | isActivated () const |
void | addPacket (const AVPacket &packet) |
void | clearBuffering () |
![]() | |
virtual | ~IInputStream () |
Private Member Functions | |
InputStream (const InputStream &inputStream) | |
InputStream & | operator= (const InputStream &inputStream) |
Private Attributes | |
InputFile * | _inputFile |
Has link (no ownership) More... | |
ICodec * | _codec |
Has ownership. More... | |
std::queue< CodedData > | _streamCache |
Cache of packet data already read and corresponding to this stream. More... | |
size_t | _streamIndex |
Index of the stream in the input file. More... | |
bool | _isActivated |
If the stream is activated, data read from it will be buffered. More... | |
Definition at line 15 of file InputStream.hpp.
|
private |
avtranscoder::InputStream::InputStream | ( | InputFile & | inputFile, |
const size_t | streamIndex | ||
) |
Definition at line 16 of file InputStream.cpp.
References _codec, _inputFile, _streamIndex, avtranscoder::eCodecTypeDecoder, avtranscoder::FormatContext::getAVStream(), and avtranscoder::InputFile::getFormatContext().
avtranscoder::InputStream::~InputStream | ( | ) |
Definition at line 48 of file InputStream.cpp.
References _codec.
|
inlinevirtual |
Functions about buffering Activate the stream will buffered its data when read packets.
Implements avtranscoder::IInputStream.
Definition at line 34 of file InputStream.hpp.
References activate().
Referenced by activate(), and avtranscoder::InputFile::activateStream().
void avtranscoder::InputStream::addPacket | ( | const AVPacket & | packet | ) |
Definition at line 116 of file InputStream.cpp.
References _isActivated, _streamCache, _streamIndex, and LOG_DEBUG.
|
virtual |
Implements avtranscoder::IInputStream.
Definition at line 130 of file InputStream.cpp.
References _streamCache.
|
virtual |
Implements avtranscoder::IInputStream.
Definition at line 87 of file InputStream.cpp.
References _codec, and getProperties().
Referenced by avtranscoder::AudioDecoder::decodeNextFrame(), avtranscoder::AudioDecoder::flushDecoder(), avtranscoder::AudioReader::init(), and avtranscoder::AudioDecoder::setupDecoder().
|
virtual |
Implements avtranscoder::IInputStream.
Definition at line 99 of file InputStream.cpp.
References _codec, and getProperties().
|
virtual |
Implements avtranscoder::IInputStream.
Definition at line 111 of file InputStream.cpp.
References _inputFile, _streamIndex, avtranscoder::InputFile::getProperties(), and avtranscoder::FileProperties::getStreamPropertiesWithIndex().
Referenced by getAudioCodec(), getDataCodec(), avtranscoder::Transcoder::getProfileFromFile(), and getVideoCodec().
|
inlinevirtual |
Implements avtranscoder::IInputStream.
Definition at line 28 of file InputStream.hpp.
|
virtual |
Return the codec informations of the stream
Raise | a runtime error if the stream is not of the corresponding type |
Implements avtranscoder::IInputStream.
Definition at line 75 of file InputStream.cpp.
References _codec, and getProperties().
Referenced by avtranscoder::VideoDecoder::decodeNextFrame(), avtranscoder::VideoDecoder::flushDecoder(), avtranscoder::VideoReader::init(), and avtranscoder::VideoDecoder::setupDecoder().
|
inlinevirtual |
Implements avtranscoder::IInputStream.
Definition at line 35 of file InputStream.hpp.
|
private |
|
virtual |
Read the next packet of the stream.
data | data of next packet read |
Implements avtranscoder::IInputStream.
Definition at line 53 of file InputStream.cpp.
References _inputFile, _isActivated, _streamCache, _streamIndex, avtranscoder::CodedData::copyData(), avtranscoder::InputFile::getFilename(), LOG_DEBUG, and avtranscoder::InputFile::readNextPacket().
Referenced by avtranscoder::AudioDecoder::decodeNextFrame(), and avtranscoder::VideoDecoder::decodeNextFrame().
|
private |
Has ownership.
Definition at line 41 of file InputStream.hpp.
Referenced by getAudioCodec(), getDataCodec(), getVideoCodec(), InputStream(), and ~InputStream().
|
private |
Has link (no ownership)
Definition at line 40 of file InputStream.hpp.
Referenced by getProperties(), InputStream(), and readNextPacket().
|
private |
If the stream is activated, data read from it will be buffered.
Definition at line 46 of file InputStream.hpp.
Referenced by addPacket(), and readNextPacket().
|
private |
Cache of packet data already read and corresponding to this stream.
Definition at line 43 of file InputStream.hpp.
Referenced by addPacket(), clearBuffering(), and readNextPacket().
|
private |
Index of the stream in the input file.
Definition at line 45 of file InputStream.hpp.
Referenced by addPacket(), getProperties(), InputStream(), and readNextPacket().