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

#include <VideoReader.hpp>

Public Member Functions

 ~VideoReader ()
 
void updateOutput (const size_t width, const size_t height, const std::string &pixelFormat)
 Update width, height and pixelFormat of the output. More...
 
const VideoPropertiesgetSourceVideoProperties () const
 
 VideoReader (const std::string &filename, const size_t videoStreamIndex=0)
 
 VideoReader (InputFile &inputFile, const size_t videoStreamIndex=0)
 
size_t getOutputWidth () const
 
size_t getOutputHeight () const
 
size_t getOutputNbComponents () const
 
size_t getOutputBitDepth () const
 
AVPixelFormat getOutputPixelFormat () const
 
- Public Member Functions inherited from 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. 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
 
FramereadNextFrame ()
 
FramereadPrevFrame ()
 
FramereadFrameAt (const size_t frame)
 
const StreamPropertiesgetSourceProperties () 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 VideoProperties_videoStreamProperties
 Properties of the source video stream read (no ownership, has link) More...
 
size_t _outputWidth
 
size_t _outputHeight
 
PixelProperties _outputPixelProperties
 

Additional Inherited Members

- Protected Attributes inherited from avtranscoder::IReader
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
 

Detailed Description

Definition at line 13 of file VideoReader.hpp.

Constructor & Destructor Documentation

avtranscoder::VideoReader::VideoReader ( const std::string &  filename,
const size_t  videoStreamIndex = 0 
)

Definition at line 12 of file VideoReader.cpp.

References init().

avtranscoder::VideoReader::VideoReader ( InputFile inputFile,
const size_t  videoStreamIndex = 0 
)

Definition at line 22 of file VideoReader.cpp.

References init().

Member Function Documentation

size_t avtranscoder::VideoReader::getOutputBitDepth ( ) const
inline

Definition at line 36 of file VideoReader.hpp.

size_t avtranscoder::VideoReader::getOutputHeight ( ) const
inline
size_t avtranscoder::VideoReader::getOutputNbComponents ( ) const
inline
AVPixelFormat avtranscoder::VideoReader::getOutputPixelFormat ( ) const
inline

Definition at line 37 of file VideoReader.hpp.

Referenced by init(), and updateOutput().

size_t avtranscoder::VideoReader::getOutputWidth ( ) const
inline
const VideoProperties* avtranscoder::VideoReader::getSourceVideoProperties ( ) const
inline

Definition at line 41 of file VideoReader.hpp.

Referenced by Window::displayInformations().

void avtranscoder::VideoReader::updateOutput ( const size_t  width,
const size_t  height,
const std::string &  pixelFormat 
)

Update width, height and pixelFormat of the output.

Note
Will transform the decoded data when read the stream.

Definition at line 70 of file VideoReader.cpp.

References avtranscoder::IReader::_dstFrame, _outputHeight, _outputPixelProperties, _outputWidth, and getOutputPixelFormat().

Referenced by main().

Field Documentation

size_t avtranscoder::VideoReader::_outputHeight
private

Definition at line 52 of file VideoReader.hpp.

Referenced by init(), and updateOutput().

PixelProperties avtranscoder::VideoReader::_outputPixelProperties
private

Definition at line 53 of file VideoReader.hpp.

Referenced by updateOutput().

size_t avtranscoder::VideoReader::_outputWidth
private

Definition at line 51 of file VideoReader.hpp.

Referenced by init(), and updateOutput().

const VideoProperties* avtranscoder::VideoReader::_videoStreamProperties
private

Properties of the source video stream read (no ownership, has link)

Definition at line 47 of file VideoReader.hpp.

Referenced by init().


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