TuttleOFX
1
|
#include <LibAVVideoReader.hpp>
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. |
Definition at line 19 of file LibAVVideoReader.hpp.
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().
double tuttle::plugin::av::LibAVVideoReader::aspectRatio | ( | ) | const [inline] |
Definition at line 69 of file LibAVVideoReader.hpp.
References _aspect.
Referenced by tuttle::plugin::av::LibAVVideoWriter::configureFromRead(), tuttle::plugin::av::reader::AVReaderPlugin::getClipPreferences(), and tuttle::plugin::av::reader::AVReaderPlugin::getRegionOfDefinition().
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().
void tuttle::plugin::av::LibAVVideoReader::closeVideoCodec | ( | ) | [private] |
Definition at line 336 of file LibAVVideoReader.cpp.
References getVideoStream().
Referenced by close().
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] |
Definition at line 113 of file LibAVVideoReader.hpp.
References _videoCodec.
Referenced by tuttle::plugin::av::LibAVVideoWriter::configureFromRead().
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().
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.
the | number 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().
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] |
Definition at line 84 of file LibAVVideoReader.hpp.
References _fpsDen, and _fpsNum.
Referenced by tuttle::plugin::av::LibAVVideoWriter::configureFromRead(), decodeImage(), tuttle::plugin::av::reader::AVReaderPlugin::getClipPreferences(), getTimeStamp(), and setupStreamInfo().
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().
AVStream* tuttle::plugin::av::LibAVVideoReader::getVideoStream | ( | ) | [inline, private] |
Definition at line 37 of file LibAVVideoReader.hpp.
References _avFormatOptions, _currVideoIdx, and _videoIdx.
Referenced by closeVideoCodec(), decodeImage(), open(), openVideoCodec(), seek(), and setupStreamInfo().
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] |
Definition at line 64 of file LibAVVideoReader.hpp.
References _height.
Referenced by tuttle::plugin::av::LibAVVideoWriter::configureFromRead(), decodeImage(), tuttle::plugin::av::reader::AVReaderPlugin::getRegionOfDefinition(), and open().
EIntrelacment tuttle::plugin::av::LibAVVideoReader::interlacment | ( | ) | [inline] |
Definition at line 74 of file LibAVVideoReader.hpp.
References _interlacment.
Referenced by tuttle::plugin::av::reader::AVReaderPlugin::getClipPreferences().
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 | ) |
Definition at line 59 of file LibAVVideoReader.cpp.
References _aspect, _avFormatOptions, _bitRate, _data, _format, _isOpen, _offsetTime, _stream, close(), OFX::Log::error(), getVideoStream(), height(), isOpen(), tuttle::plugin::av::LibAV::libavError_toString(), setupStreamInfo(), and width().
Referenced by tuttle::plugin::av::reader::AVReaderPlugin::ensureVideoIsOpen().
void tuttle::plugin::av::LibAVVideoReader::openVideoCodec | ( | ) | [private] |
Definition at line 317 of file LibAVVideoReader.cpp.
References _currVideoIdx, _videoCodec, and getVideoStream().
Referenced by setupStreamInfo().
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().
bool tuttle::plugin::av::LibAVVideoReader::seek | ( | size_t | pos | ) | [private] |
Seek to the nearest previous keyframe from pos. Write in _data the image result.
pos | frame number to seek |
Definition at line 353 of file LibAVVideoReader.cpp.
References _avFormatOptions, _offsetTime, getTimeStamp(), and getVideoStream().
Referenced by read(), and setupStreamInfo().
bool tuttle::plugin::av::LibAVVideoReader::setupStreamInfo | ( | ) | [private] |
Definition at line 196 of file LibAVVideoReader.cpp.
References _avFormatOptions, _currVideoIdx, _fpsDen, _fpsNum, _height, _interlacment, _nbFrames, _pkt, _videoIdx, _width, tuttle::plugin::av::LibAV::codecType_toString(), tuttle::plugin::av::eInterlacmentLower, tuttle::plugin::av::eInterlacmentNone, tuttle::plugin::av::eInterlacmentUpper, fps(), getVideoStream(), hasVideo(), openVideoCodec(), seek(), TUTTLE_INFO, and TUTTLE_TLOG.
Referenced by open().
int tuttle::plugin::av::LibAVVideoReader::width | ( | ) | const [inline] |
Definition at line 59 of file LibAVVideoReader.hpp.
References _width.
Referenced by tuttle::plugin::av::LibAVVideoWriter::configureFromRead(), decodeImage(), tuttle::plugin::av::reader::AVReaderPlugin::getRegionOfDefinition(), and open().
Definition at line 170 of file LibAVVideoReader.hpp.
Referenced by aspectRatio(), and open().
AVFormatContext* tuttle::plugin::av::LibAVVideoReader::_avFormatOptions |
Definition at line 154 of file LibAVVideoReader.hpp.
Referenced by close(), decodeImage(), getTimeStamp(), getVideoStream(), LibAVVideoReader(), open(), read(), seek(), setupStreamInfo(), and ~LibAVVideoReader().
Definition at line 158 of file LibAVVideoReader.hpp.
Referenced by decodeImage(), LibAVVideoReader(), and ~LibAVVideoReader().
Definition at line 171 of file LibAVVideoReader.hpp.
Definition at line 166 of file LibAVVideoReader.hpp.
Referenced by getVideoStream(), openVideoCodec(), read(), and setupStreamInfo().
std::vector<unsigned char> tuttle::plugin::av::LibAVVideoReader::_data |
Definition at line 172 of file LibAVVideoReader.hpp.
Referenced by data(), decodeImage(), and open().
AVInputFormat* tuttle::plugin::av::LibAVVideoReader::_format |
Definition at line 157 of file LibAVVideoReader.hpp.
Referenced by formatName(), and open().
Definition at line 165 of file LibAVVideoReader.hpp.
Referenced by fps(), and setupStreamInfo().
Definition at line 164 of file LibAVVideoReader.hpp.
Referenced by fps(), and setupStreamInfo().
Definition at line 169 of file LibAVVideoReader.hpp.
Referenced by decodeImage(), height(), and setupStreamInfo().
Definition at line 178 of file LibAVVideoReader.hpp.
Referenced by interlacment(), and setupStreamInfo().
Definition at line 177 of file LibAVVideoReader.hpp.
Definition at line 176 of file LibAVVideoReader.hpp.
Referenced by read().
Definition at line 175 of file LibAVVideoReader.hpp.
Referenced by decodeImage(), and frame().
Definition at line 174 of file LibAVVideoReader.hpp.
Referenced by decodeImage().
Definition at line 167 of file LibAVVideoReader.hpp.
Referenced by nbFrames(), read(), and setupStreamInfo().
Definition at line 173 of file LibAVVideoReader.hpp.
Referenced by decodeImage(), open(), and seek().
Definition at line 160 of file LibAVVideoReader.hpp.
Referenced by decodeImage(), read(), and setupStreamInfo().
Definition at line 155 of file LibAVVideoReader.hpp.
Referenced by open().
struct SwsContext* tuttle::plugin::av::LibAVVideoReader::_sws_context |
contexte de transformation swscale
Definition at line 162 of file LibAVVideoReader.hpp.
Referenced by decodeImage().
Definition at line 159 of file LibAVVideoReader.hpp.
Referenced by codecIDString(), codecName(), codecTypeString(), and openVideoCodec().
std::vector<int> tuttle::plugin::av::LibAVVideoReader::_videoIdx |
Definition at line 163 of file LibAVVideoReader.hpp.
Referenced by getVideoStream(), hasVideo(), read(), and setupStreamInfo().
Definition at line 168 of file LibAVVideoReader.hpp.
Referenced by decodeImage(), setupStreamInfo(), and width().