AvTranscoder  0.9.4
C++APIforLibav/FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
avtranscoder::IDecoder Class Referenceabstract

#include <IDecoder.hpp>

Public Member Functions

virtual ~IDecoder ()
 
virtual void setupDecoder (const ProfileLoader::Profile &profile=ProfileLoader::Profile())
 Setup the decoder. More...
 
virtual bool decodeNextFrame (Frame &frameBuffer)=0
 Decode next frame. More...
 
virtual bool decodeNextFrame (Frame &frameBuffer, const size_t channelIndex)=0
 Decode substream of next frame. More...
 
virtual void setNextFrame (Frame &inputFrame)
 Set the next frame of the input stream (which bypass the work of decoding) More...
 
virtual void flushDecoder ()
 Reset the internal decoder state / flush internal buffers. More...
 

Detailed Description

Definition at line 11 of file IDecoder.hpp.

Constructor & Destructor Documentation

virtual avtranscoder::IDecoder::~IDecoder ( )
inlinevirtual

Definition at line 14 of file IDecoder.hpp.

Member Function Documentation

virtual bool avtranscoder::IDecoder::decodeNextFrame ( Frame frameBuffer)
pure virtual

Decode next frame.

Parameters
frameBufferthe 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.
Returns
status of decoding

Implemented in avtranscoder::AudioGenerator, avtranscoder::VideoGenerator, avtranscoder::AudioDecoder, and avtranscoder::VideoDecoder.

Referenced by avtranscoder::StreamTranscoder::processTranscode(), and avtranscoder::IReader::readFrameAt().

virtual bool avtranscoder::IDecoder::decodeNextFrame ( Frame frameBuffer,
const size_t  channelIndex 
)
pure virtual

Decode substream of next frame.

Parameters
frameBufferthe frame decoded
channelIndexindex of channel to extract
Returns
status of decoding

Implemented in avtranscoder::AudioGenerator, avtranscoder::VideoGenerator, avtranscoder::AudioDecoder, and avtranscoder::VideoDecoder.

virtual void avtranscoder::IDecoder::flushDecoder ( )
inlinevirtual

Reset the internal decoder state / flush internal buffers.

Note
Should be called when seeking or when switching to a different stream.
Not sense for generators.

Reimplemented in avtranscoder::AudioDecoder, and avtranscoder::VideoDecoder.

Definition at line 53 of file IDecoder.hpp.

Referenced by avtranscoder::IReader::readFrameAt().

virtual void avtranscoder::IDecoder::setNextFrame ( Frame inputFrame)
inlinevirtual

Set the next frame of the input stream (which bypass the work of decoding)

Note
Not yet implemented for VideoDecoder and AudioDecoder
Parameters
inputFramethe new next frame

Reimplemented in avtranscoder::AudioGenerator, and avtranscoder::VideoGenerator.

Definition at line 46 of file IDecoder.hpp.

virtual void avtranscoder::IDecoder::setupDecoder ( const ProfileLoader::Profile profile = ProfileLoader::Profile())
inlinevirtual

Setup the decoder.

Parameters
profileset decoder parameters from the given profile
Note
Open the decoder.

Reimplemented in avtranscoder::AudioDecoder, and avtranscoder::VideoDecoder.

Definition at line 21 of file IDecoder.hpp.

Referenced by avtranscoder::AudioReader::init(), and avtranscoder::VideoReader::init().


The documentation for this class was generated from the following file: