44 #ifndef vpVideoWriter_H
45 #define vpVideoWriter_H
49 #include <visp3/io/vpImageIo.h>
51 #if VISP_HAVE_OPENCV_VERSION >= 0x020200
52 #include <opencv2/highgui/highgui.hpp>
53 #elif VISP_HAVE_OPENCV_VERSION >= 0x020000
54 #include <opencv/highgui.h>
162 #if VISP_HAVE_OPENCV_VERSION >= 0x020100
163 cv::VideoWriter writer;
181 vpVideoFormatType formatType;
184 char fileName[FILENAME_MAX];
193 unsigned int frameCount;
196 unsigned int firstFrame;
213 inline unsigned int getCurrentFrameIndex()
const {
return frameCount; }
222 inline void resetFrameCounter() { frameCount = firstFrame; }
227 #if VISP_HAVE_OPENCV_VERSION >= 0x020100
228 inline void setCodec(
const int fourcc_codec) { this->fourcc = fourcc_codec; }
231 void setFileName(
const char *filename);
232 void setFileName(
const std::string &filename);
238 inline void setFirstFrameIndex(
unsigned int first_frame) { this->firstFrame = first_frame; }
239 #if VISP_HAVE_OPENCV_VERSION >= 0x020100
247 inline void setFramerate(
const double frame_rate) { this->framerate = frame_rate; }
251 vpVideoFormatType getFormat(
const char *filename);
252 static std::string getExtension(
const std::string &filename);