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>
159 #if VISP_HAVE_OPENCV_VERSION >= 0x020100
160 cv::VideoWriter writer;
178 vpVideoFormatType formatType;
181 char fileName[FILENAME_MAX];
190 unsigned int frameCount;
193 unsigned int firstFrame;
210 inline unsigned int getCurrentFrameIndex()
const {
return frameCount; }
219 inline void resetFrameCounter() { frameCount = firstFrame; }
224 #if VISP_HAVE_OPENCV_VERSION >= 0x020100
225 inline void setCodec(
const int fourcc_codec) { this->fourcc = fourcc_codec; }
228 void setFileName(
const char *filename);
229 void setFileName(
const std::string &filename);
235 inline void setFirstFrameIndex(
const unsigned int first_frame) { this->firstFrame = first_frame; }
236 #if VISP_HAVE_OPENCV_VERSION >= 0x020100
244 inline void setFramerate(
const double frame_rate) { this->framerate = frame_rate; }
248 vpVideoFormatType getFormat(
const char *filename);
249 static std::string getExtension(
const std::string &filename);