SOFA API  651e7a3a
Open source framework for multi-physics simuation
sofa::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 charm_viewportBuffer
 
size_t m_viewportBufferSize
 
unsigned charm_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

◆ m_ffmpeg

FILE* sofa::gl::VideoRecorderFFMPEG::m_ffmpeg
protected

◆ m_ffmpegBuffer

unsigned char* sofa::gl::VideoRecorderFFMPEG::m_ffmpegBuffer
protected

◆ m_ffmpegBufferSize

size_t sofa::gl::VideoRecorderFFMPEG::m_ffmpegBufferSize
protected

◆ m_ffmpegExecPath

std::string sofa::gl::VideoRecorderFFMPEG::m_ffmpegExecPath
protected

◆ m_ffmpegHeight

int sofa::gl::VideoRecorderFFMPEG::m_ffmpegHeight
protected

◆ m_ffmpegWidth

int sofa::gl::VideoRecorderFFMPEG::m_ffmpegWidth
protected

◆ m_filename

std::string sofa::gl::VideoRecorderFFMPEG::m_filename
protected

◆ m_FrameCount

int sofa::gl::VideoRecorderFFMPEG::m_FrameCount
protected

◆ m_framerate

unsigned int sofa::gl::VideoRecorderFFMPEG::m_framerate
protected

◆ m_pixelFormatSize

int sofa::gl::VideoRecorderFFMPEG::m_pixelFormatSize
protected

◆ m_prefix

std::string sofa::gl::VideoRecorderFFMPEG::m_prefix
protected

◆ m_viewportBuffer

unsigned char* sofa::gl::VideoRecorderFFMPEG::m_viewportBuffer
protected

◆ m_viewportBufferSize

size_t sofa::gl::VideoRecorderFFMPEG::m_viewportBufferSize
protected

◆ m_viewportHeight

int sofa::gl::VideoRecorderFFMPEG::m_viewportHeight
protected

◆ m_viewportWidth

int sofa::gl::VideoRecorderFFMPEG::m_viewportWidth
protected

Constructor details

◆ VideoRecorderFFMPEG()

sofa::gl::VideoRecorderFFMPEG::VideoRecorderFFMPEG ( )

◆ ~VideoRecorderFFMPEG()

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

Function details

◆ addFrame()

void sofa::gl::VideoRecorderFFMPEG::addFrame ( )

◆ findFilename()

std::string sofa::gl::VideoRecorderFFMPEG::findFilename ( const unsigned int  bitrate,
const unsigned int  framerate,
const std::string &  extension 
)

◆ finishVideo()

void sofa::gl::VideoRecorderFFMPEG::finishVideo ( )

◆ init()

bool sofa::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 = "" 
)

◆ saveVideo()

void sofa::gl::VideoRecorderFFMPEG::saveVideo ( )

◆ setPrefix()

void sofa::gl::VideoRecorderFFMPEG::setPrefix ( const std::string  v)
inline