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

#include <LibAVVideoWriter.hpp>

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

Public Member Functions

 LibAVVideoWriter ()
bool movie () const
int start ()
bool finishInit ()
int execute (boost::uint8_t *const in_buffer, const int in_width, const int height, const PixelFormat in_fmt=PIX_FMT_RGB24)
void finish ()
void setFilename (const std::string &filename)
std::string getFilename () const
void setWidth (const int width)
int getWidth () const
void setHeight (const int height)
int getHeight () const
void setAspectRatio (const double aspectRatio)
double getAspectRatio () const
void setFps (const double fps)
double getFps () const
void setPixelFormat (const PixelFormat pxlFmt)
PixelFormat getPixelFormat () const
const std::string & getFormat () const
const std::vector< std::string > & getFormatsShort () const
const std::vector< std::string > & getFormatsLong () const
void setFormat (const unsigned int id)
void setFormat (const std::string &format)
const std::string & getVideoCodec () const
const std::vector< std::string > & getVideoCodecsShort () const
const std::vector< std::string > & getVideoCodecsLong () const
const std::string & getAudioCodec () const
const std::vector< std::string > & getAudioCodecsShort () const
const std::vector< std::string > & getAudioCodecsLong () const
const std::vector< AVPrivOption > & getFormatPrivOpts () const
const std::vector< AVPrivOption > & getVideoCodecPrivOpts () const
const std::vector< AVPrivOption > & getAudioCodecPrivOpts () const
void setVideoCodec (const unsigned int id)
void setVideoCodec (const std::string &codec)
void setAudioCodec (const unsigned int id)
void setAudioCodec (const std::string &codec)
void configureFromRead (const LibAVVideoReader &reader)

Data Fields

AVFormatContext * _avFormatOptions
AVStream * _stream

Private Types

enum  EWriterStatus { eWriterStatusSuccess = 0, eWriterStatusIgnoreFinish, eWriterStatusCleanup }

Private Member Functions

void freeFormat ()
std::string getErrorStr (const int errnum) const

Private Attributes

AVCodecContext * _avVideoOptions
AVCodecContext * _avAudioOptions
struct SwsContext * _sws_context
 swscale: transformation context
AVCodec * _videoCodec
AVCodec * _audioCodec
AVOutputFormat * _ofmt
std::vector< AVPrivOption_formatPrivOpts
std::vector< AVPrivOption_videoCodecPrivOpts
std::vector< AVPrivOption_audioCodecPrivOpts
std::vector< std::string > _formatsLongNames
std::vector< std::string > _formatsShortNames
std::vector< std::string > _videoCodecsLongNames
std::vector< std::string > _videoCodecsShortNames
std::vector< std::string > _audioCodecsLongNames
std::vector< std::string > _audioCodecsShortNames
EWriterStatus _statusCode
int _hasFrame
std::string _filename
int _width
int _height
double _aspectRatio
PixelFormat _out_pixelFormat
double _fps
std::string _formatName
std::string _videoCodecName
std::string _audioCodecName

Detailed Description

Definition at line 19 of file LibAVVideoWriter.hpp.


Member Enumeration Documentation

Enumerator:
eWriterStatusSuccess 
eWriterStatusIgnoreFinish 
eWriterStatusCleanup 

Definition at line 22 of file LibAVVideoWriter.hpp.


Constructor & Destructor Documentation


Member Function Documentation

int tuttle::plugin::av::LibAVVideoWriter::execute ( boost::uint8_t *const  in_buffer,
const int  in_width,
const int  height,
const PixelFormat  in_fmt = PIX_FMT_RGB24 
)
void tuttle::plugin::av::LibAVVideoWriter::finish ( )
bool tuttle::plugin::av::LibAVVideoWriter::finishInit ( )
void tuttle::plugin::av::LibAVVideoWriter::freeFormat ( ) [private]

Definition at line 472 of file LibAVVideoWriter.cpp.

References _avFormatOptions, and _stream.

Referenced by finish(), and finishInit().

double tuttle::plugin::av::LibAVVideoWriter::getAspectRatio ( ) const [inline]

Definition at line 82 of file LibAVVideoWriter.hpp.

References _aspectRatio.

const std::string& tuttle::plugin::av::LibAVVideoWriter::getAudioCodec ( ) const [inline]

Definition at line 147 of file LibAVVideoWriter.hpp.

References _audioCodecName.

const std::vector<AVPrivOption>& tuttle::plugin::av::LibAVVideoWriter::getAudioCodecPrivOpts ( ) const [inline]
const std::vector<std::string>& tuttle::plugin::av::LibAVVideoWriter::getAudioCodecsLong ( ) const [inline]

Definition at line 157 of file LibAVVideoWriter.hpp.

References _audioCodecsLongNames.

const std::vector<std::string>& tuttle::plugin::av::LibAVVideoWriter::getAudioCodecsShort ( ) const [inline]
std::string tuttle::plugin::av::LibAVVideoWriter::getErrorStr ( const int  errnum) const [private]

Definition at line 303 of file LibAVVideoWriter.cpp.

Referenced by execute(), and finish().

std::string tuttle::plugin::av::LibAVVideoWriter::getFilename ( ) const [inline]

Definition at line 52 of file LibAVVideoWriter.hpp.

References _filename.

Referenced by finishInit(), and start().

const std::string& tuttle::plugin::av::LibAVVideoWriter::getFormat ( ) const [inline]

Definition at line 107 of file LibAVVideoWriter.hpp.

References _formatName.

const std::vector<AVPrivOption>& tuttle::plugin::av::LibAVVideoWriter::getFormatPrivOpts ( ) const [inline]
const std::vector<std::string>& tuttle::plugin::av::LibAVVideoWriter::getFormatsLong ( ) const [inline]

Definition at line 117 of file LibAVVideoWriter.hpp.

References _formatsLongNames.

const std::vector<std::string>& tuttle::plugin::av::LibAVVideoWriter::getFormatsShort ( ) const [inline]
double tuttle::plugin::av::LibAVVideoWriter::getFps ( ) const [inline]

Definition at line 92 of file LibAVVideoWriter.hpp.

References _fps.

int tuttle::plugin::av::LibAVVideoWriter::getHeight ( ) const [inline]

Definition at line 72 of file LibAVVideoWriter.hpp.

References _height.

Referenced by execute(), and start().

PixelFormat tuttle::plugin::av::LibAVVideoWriter::getPixelFormat ( ) const [inline]

Definition at line 102 of file LibAVVideoWriter.hpp.

References _out_pixelFormat.

const std::string& tuttle::plugin::av::LibAVVideoWriter::getVideoCodec ( ) const [inline]

Definition at line 132 of file LibAVVideoWriter.hpp.

References _videoCodecName.

const std::vector<AVPrivOption>& tuttle::plugin::av::LibAVVideoWriter::getVideoCodecPrivOpts ( ) const [inline]
const std::vector<std::string>& tuttle::plugin::av::LibAVVideoWriter::getVideoCodecsLong ( ) const [inline]

Definition at line 142 of file LibAVVideoWriter.hpp.

References _videoCodecsLongNames.

const std::vector<std::string>& tuttle::plugin::av::LibAVVideoWriter::getVideoCodecsShort ( ) const [inline]
int tuttle::plugin::av::LibAVVideoWriter::getWidth ( ) const [inline]

Definition at line 62 of file LibAVVideoWriter.hpp.

References _width.

Referenced by execute(), and start().

bool tuttle::plugin::av::LibAVVideoWriter::movie ( ) const [inline]

Definition at line 32 of file LibAVVideoWriter.hpp.

void tuttle::plugin::av::LibAVVideoWriter::setAspectRatio ( const double  aspectRatio) [inline]
void tuttle::plugin::av::LibAVVideoWriter::setAudioCodec ( const unsigned int  id) [inline]

Definition at line 187 of file LibAVVideoWriter.hpp.

References _audioCodecName, and _audioCodecsShortNames.

void tuttle::plugin::av::LibAVVideoWriter::setAudioCodec ( const std::string &  codec) [inline]

Definition at line 192 of file LibAVVideoWriter.hpp.

References _audioCodecName.

void tuttle::plugin::av::LibAVVideoWriter::setFilename ( const std::string &  filename) [inline]
void tuttle::plugin::av::LibAVVideoWriter::setFormat ( const unsigned int  id) [inline]
void tuttle::plugin::av::LibAVVideoWriter::setFormat ( const std::string &  format) [inline]

Definition at line 127 of file LibAVVideoWriter.hpp.

References _formatName.

void tuttle::plugin::av::LibAVVideoWriter::setFps ( const double  fps) [inline]
void tuttle::plugin::av::LibAVVideoWriter::setHeight ( const int  height) [inline]

Definition at line 67 of file LibAVVideoWriter.hpp.

References _height, and height.

Referenced by configureFromRead(), and tuttle::plugin::av::writer::AVWriterPlugin::render().

void tuttle::plugin::av::LibAVVideoWriter::setPixelFormat ( const PixelFormat  pxlFmt) [inline]
void tuttle::plugin::av::LibAVVideoWriter::setVideoCodec ( const unsigned int  id) [inline]
void tuttle::plugin::av::LibAVVideoWriter::setVideoCodec ( const std::string &  codec) [inline]

Definition at line 182 of file LibAVVideoWriter.hpp.

References _videoCodecName.

void tuttle::plugin::av::LibAVVideoWriter::setWidth ( const int  width) [inline]

Definition at line 57 of file LibAVVideoWriter.hpp.

References _width, and width.

Referenced by configureFromRead(), and tuttle::plugin::av::writer::AVWriterPlugin::render().

int tuttle::plugin::av::LibAVVideoWriter::start ( )

< samples per second

< number of audio channels

Definition at line 147 of file LibAVVideoWriter.cpp.

References _avFormatOptions, _avVideoOptions, _formatName, _fps, _ofmt, _stream, _videoCodec, _videoCodecName, getFilename(), getHeight(), getWidth(), TUTTLE_LOG_ERROR, and TUTTLE_LOG_TRACE.

Referenced by tuttle::plugin::av::writer::AVWriterPlugin::render().

Here is the call graph for this function:


Field Documentation

Definition at line 241 of file LibAVVideoWriter.hpp.

Referenced by getAspectRatio(), and setAspectRatio().

Definition at line 219 of file LibAVVideoWriter.hpp.

Definition at line 247 of file LibAVVideoWriter.hpp.

Referenced by getAudioCodec(), and setAudioCodec().

Definition at line 232 of file LibAVVideoWriter.hpp.

Referenced by getAudioCodecsLong(), and LibAVVideoWriter().

Definition at line 215 of file LibAVVideoWriter.hpp.

Definition at line 214 of file LibAVVideoWriter.hpp.

Referenced by start().

Definition at line 238 of file LibAVVideoWriter.hpp.

Referenced by getFilename(), and setFilename().

Definition at line 245 of file LibAVVideoWriter.hpp.

Referenced by getFormat(), setFormat(), and start().

std::vector<std::string> tuttle::plugin::av::LibAVVideoWriter::_formatsLongNames [private]

Definition at line 226 of file LibAVVideoWriter.hpp.

Referenced by getFormatsLong(), and LibAVVideoWriter().

Definition at line 227 of file LibAVVideoWriter.hpp.

Referenced by getFormatsShort(), LibAVVideoWriter(), and setFormat().

Definition at line 244 of file LibAVVideoWriter.hpp.

Referenced by getFps(), setFps(), and start().

Definition at line 236 of file LibAVVideoWriter.hpp.

Referenced by execute(), and finish().

Definition at line 240 of file LibAVVideoWriter.hpp.

Referenced by getHeight(), and setHeight().

Definition at line 220 of file LibAVVideoWriter.hpp.

Referenced by finishInit(), and start().

swscale: transformation context

Definition at line 216 of file LibAVVideoWriter.hpp.

Referenced by execute().

Definition at line 218 of file LibAVVideoWriter.hpp.

Referenced by finishInit(), and start().

Definition at line 246 of file LibAVVideoWriter.hpp.

Referenced by getVideoCodec(), setVideoCodec(), and start().

Definition at line 229 of file LibAVVideoWriter.hpp.

Referenced by getVideoCodecsLong(), and LibAVVideoWriter().

Definition at line 239 of file LibAVVideoWriter.hpp.

Referenced by getWidth(), and setWidth().


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