SOFA API  c76874b7
Open source framework for multi-physics simuation
sofa::helper::gl::VideoRecorderFFMPEG Class Reference

#include <VideoRecorderFFMPEG.h>

Protected Attributes

std::string m_ffmpegExecPath
 
int m_viewportWidth
 
int m_viewportHeight
 
int m_ffmpegWidth
 
int m_ffmpegHeight
 
int m_FrameCount
 
std::string m_filename
 
unsigned int m_framerate
 
std::string m_prefix
 
FILE * m_ffmpeg
 
unsigned char * m_viewportBuffer
 
size_t m_viewportBufferSize
 
unsigned char * m_ffmpegBuffer
 
size_t m_ffmpegBufferSize
 
int m_pixelFormatSize
 

Public Member Functions

 VideoRecorderFFMPEG ()
 
 ~VideoRecorderFFMPEG ()
 
bool init (const std::string &ffmpeg_exec_filepath, const std::string &filename, int width, int height, unsigned int framerate, unsigned int bitrate, const std::string &codec="")
 
void addFrame ()
 
void saveVideo ()
 
void finishVideo ()
 
void setPrefix (const std::string v)
 
std::string findFilename (const unsigned int bitrate, const unsigned int framerate, const std::string &extension)
 

Attribute details

FILE* sofa::helper::gl::VideoRecorderFFMPEG::m_ffmpeg
protected
unsigned char* sofa::helper::gl::VideoRecorderFFMPEG::m_ffmpegBuffer
protected
size_t sofa::helper::gl::VideoRecorderFFMPEG::m_ffmpegBufferSize
protected
std::string sofa::helper::gl::VideoRecorderFFMPEG::m_ffmpegExecPath
protected
int sofa::helper::gl::VideoRecorderFFMPEG::m_ffmpegHeight
protected
int sofa::helper::gl::VideoRecorderFFMPEG::m_ffmpegWidth
protected
std::string sofa::helper::gl::VideoRecorderFFMPEG::m_filename
protected
int sofa::helper::gl::VideoRecorderFFMPEG::m_FrameCount
protected
unsigned int sofa::helper::gl::VideoRecorderFFMPEG::m_framerate
protected
int sofa::helper::gl::VideoRecorderFFMPEG::m_pixelFormatSize
protected
std::string sofa::helper::gl::VideoRecorderFFMPEG::m_prefix
protected
unsigned char* sofa::helper::gl::VideoRecorderFFMPEG::m_viewportBuffer
protected
size_t sofa::helper::gl::VideoRecorderFFMPEG::m_viewportBufferSize
protected
int sofa::helper::gl::VideoRecorderFFMPEG::m_viewportHeight
protected
int sofa::helper::gl::VideoRecorderFFMPEG::m_viewportWidth
protected

Constructor details

sofa::helper::gl::VideoRecorderFFMPEG::VideoRecorderFFMPEG ( )
sofa::helper::gl::VideoRecorderFFMPEG::~VideoRecorderFFMPEG ( )

Function details

void sofa::helper::gl::VideoRecorderFFMPEG::addFrame ( )
std::string sofa::helper::gl::VideoRecorderFFMPEG::findFilename ( const unsigned int  bitrate,
const unsigned int  framerate,
const std::string &  extension 
)
void sofa::helper::gl::VideoRecorderFFMPEG::finishVideo ( )
bool sofa::helper::gl::VideoRecorderFFMPEG::init ( const std::string &  ffmpeg_exec_filepath,
const std::string &  filename,
int  width,
int  height,
unsigned int  framerate,
unsigned int  bitrate,
const std::string &  codec = "" 
)
void sofa::helper::gl::VideoRecorderFFMPEG::saveVideo ( )
void sofa::helper::gl::VideoRecorderFFMPEG::setPrefix ( const std::string  v)
inline