TuttleOFX  1
tuttle::plugin::av::LibAVVideoReader Class Reference

#include <LibAVVideoReader.hpp>

Inheritance diagram for tuttle::plugin::av::LibAVVideoReader:
Collaboration diagram for tuttle::plugin::av::LibAVVideoReader:

Public Member Functions

 LibAVVideoReader ()
 ~LibAVVideoReader ()
bool open (const std::string &filename)
void close ()
bool read (const int frame)
int width () const
int height () const
double aspectRatio () const
EIntrelacment interlacment ()
int bitRate () const
double fps () const
uint64_t nbFrames () const
int frame () const
bool isOpen () const
unsigned char * data ()
std::string codecName () const
std::string formatName () const
std::string codecIDString () const
std::string codecTypeString () const

Data Fields

AVFormatContext * _avFormatOptions
AVStream * _stream
AVInputFormat * _format
AVFrame * _avFrame
AVCodec * _videoCodec
AVPacket _pkt
struct SwsContext * _sws_context
 contexte de transformation swscale
std::vector< int > _videoIdx
int _fpsNum
int _fpsDen
int _currVideoIdx
uint64_t _nbFrames
int _width
int _height
double _aspect
int _bitRate
std::vector< unsigned char > _data
bool _offsetTime
int _lastSearchPos
int _lastDecodedPos
int _lastDecodedFrame
bool _isOpen
EIntrelacment _interlacment

Private Member Functions

bool setupStreamInfo ()
bool hasVideo () const
AVStream * getVideoStream ()
void openVideoCodec ()
void closeVideoCodec ()
boost::int64_t getTimeStamp (const int pos) const
bool seek (size_t pos)
 Seek to the nearest previous keyframe from pos. Write in _data the image result.
bool decodeImage (const int frame)
 Decode the current frame.

Detailed Description

Definition at line 19 of file LibAVVideoReader.hpp.


Constructor & Destructor Documentation

tuttle::plugin::av::LibAVVideoReader::LibAVVideoReader ( ) [explicit]

Definition at line 17 of file LibAVVideoReader.cpp.

References _avFormatOptions, and _avFrame.

tuttle::plugin::av::LibAVVideoReader::~LibAVVideoReader ( )

Definition at line 46 of file LibAVVideoReader.cpp.

References _avFormatOptions, _avFrame, and close().

Here is the call graph for this function:


Member Function Documentation

int tuttle::plugin::av::LibAVVideoReader::bitRate ( ) const [inline]

Definition at line 79 of file LibAVVideoReader.hpp.

References _bitRate.

void tuttle::plugin::av::LibAVVideoReader::close ( )

Definition at line 140 of file LibAVVideoReader.cpp.

References _avFormatOptions, _isOpen, and closeVideoCodec().

Referenced by tuttle::plugin::av::reader::AVReaderPlugin::endSequenceRender(), open(), and ~LibAVVideoReader().

Here is the call graph for this function:

void tuttle::plugin::av::LibAVVideoReader::closeVideoCodec ( ) [private]

Definition at line 336 of file LibAVVideoReader.cpp.

References getVideoStream().

Referenced by close().

Here is the call graph for this function:

std::string tuttle::plugin::av::LibAVVideoReader::codecIDString ( ) const [inline]

Definition at line 127 of file LibAVVideoReader.hpp.

References _videoCodec.

std::string tuttle::plugin::av::LibAVVideoReader::codecName ( ) const [inline]
std::string tuttle::plugin::av::LibAVVideoReader::codecTypeString ( ) const [inline]

Definition at line 134 of file LibAVVideoReader.hpp.

References _videoCodec, and tuttle::plugin::av::LibAV::codecType_toString().

Here is the call graph for this function:

unsigned char* tuttle::plugin::av::LibAVVideoReader::data ( ) [inline]

Definition at line 108 of file LibAVVideoReader.hpp.

References _data.

bool tuttle::plugin::av::LibAVVideoReader::decodeImage ( const int  frame) [private]

Decode the current frame.

Parameters:
thenumber of the current frame

Definition at line 377 of file LibAVVideoReader.cpp.

References _avFormatOptions, _avFrame, _data, _height, _lastDecodedPos, _lastSearchPos, _offsetTime, _pkt, _sws_context, _width, OFX::Log::error(), fps(), getVideoStream(), height(), tuttle::plugin::av::pts, and width().

Referenced by read().

Here is the call graph for this function:

std::string tuttle::plugin::av::LibAVVideoReader::formatName ( ) const [inline]

Definition at line 120 of file LibAVVideoReader.hpp.

References _format.

Referenced by tuttle::plugin::av::LibAVVideoWriter::configureFromRead().

double tuttle::plugin::av::LibAVVideoReader::fps ( ) const [inline]
int tuttle::plugin::av::LibAVVideoReader::frame ( ) const [inline]

Definition at line 98 of file LibAVVideoReader.hpp.

References _lastDecodedPos.

boost::int64_t tuttle::plugin::av::LibAVVideoReader::getTimeStamp ( const int  pos) const [private]

Definition at line 344 of file LibAVVideoReader.cpp.

References _avFormatOptions, and fps().

Referenced by seek().

Here is the call graph for this function:

AVStream* tuttle::plugin::av::LibAVVideoReader::getVideoStream ( ) [inline, private]
bool tuttle::plugin::av::LibAVVideoReader::hasVideo ( ) const [inline, private]

Definition at line 32 of file LibAVVideoReader.hpp.

References _videoIdx.

Referenced by setupStreamInfo().

int tuttle::plugin::av::LibAVVideoReader::height ( ) const [inline]
EIntrelacment tuttle::plugin::av::LibAVVideoReader::interlacment ( ) [inline]
bool tuttle::plugin::av::LibAVVideoReader::isOpen ( ) const [inline]

Definition at line 103 of file LibAVVideoReader.hpp.

References _isOpen.

Referenced by tuttle::plugin::av::reader::AVReaderPlugin::ensureVideoIsOpen(), and open().

uint64_t tuttle::plugin::av::LibAVVideoReader::nbFrames ( ) const [inline]

Definition at line 93 of file LibAVVideoReader.hpp.

References _nbFrames.

Referenced by tuttle::plugin::av::reader::AVReaderPlugin::getTimeDomain().

bool tuttle::plugin::av::LibAVVideoReader::open ( const std::string &  filename)
void tuttle::plugin::av::LibAVVideoReader::openVideoCodec ( ) [private]

Definition at line 317 of file LibAVVideoReader.cpp.

References _currVideoIdx, _videoCodec, and getVideoStream().

Referenced by setupStreamInfo().

Here is the call graph for this function:

bool tuttle::plugin::av::LibAVVideoReader::read ( const int  frame)

Definition at line 155 of file LibAVVideoReader.cpp.

References _avFormatOptions, _currVideoIdx, _lastDecodedFrame, _nbFrames, _pkt, _videoIdx, decodeImage(), OFX::Log::error(), and seek().

Here is the call graph for this function:

bool tuttle::plugin::av::LibAVVideoReader::seek ( size_t  pos) [private]

Seek to the nearest previous keyframe from pos. Write in _data the image result.

Parameters:
posframe number to seek

Definition at line 353 of file LibAVVideoReader.cpp.

References _avFormatOptions, _offsetTime, getTimeStamp(), and getVideoStream().

Referenced by read(), and setupStreamInfo().

Here is the call graph for this function:

int tuttle::plugin::av::LibAVVideoReader::width ( ) const [inline]

Field Documentation

Definition at line 170 of file LibAVVideoReader.hpp.

Referenced by aspectRatio(), and open().

Definition at line 171 of file LibAVVideoReader.hpp.

Referenced by bitRate(), and open().

std::vector<unsigned char> tuttle::plugin::av::LibAVVideoReader::_data

Definition at line 172 of file LibAVVideoReader.hpp.

Referenced by data(), decodeImage(), and open().

Definition at line 157 of file LibAVVideoReader.hpp.

Referenced by formatName(), and open().

Definition at line 177 of file LibAVVideoReader.hpp.

Referenced by close(), isOpen(), and open().

Definition at line 155 of file LibAVVideoReader.hpp.

Referenced by open().

contexte de transformation swscale

Definition at line 162 of file LibAVVideoReader.hpp.

Referenced by decodeImage().


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