51 #include <visp/vpImageIo.h>
56 #ifdef VISP_HAVE_FFMPEG
63 # define __STDC_CONSTANT_MACROS
74 # define INT64_C(c) (c ## LL)
77 # define UINT64_C(c) (c ## ULL)
90 struct AVFormatContext;
91 struct AVCodecContext;
167 unsigned long frameNumber;
169 AVFormatContext *pFormatCtx;
170 AVCodecContext *pCodecCtx;
176 SwsContext *img_convert_ctx ;
177 unsigned int videoStream;
180 std::vector<int64_t> index;
184 bool streamWasInitialized;
186 vpFFMPEGColorType color_type;
191 uint8_t *outbuf, *picture_buf;
197 unsigned int bit_rate;
199 bool encoderWasOpened;
231 inline void setBitRate(
const unsigned int bit_rate) {this->bit_rate = bit_rate;}
233 bool openStream(
const char *filename,vpFFMPEGColorType color_type);
243 bool openEncoder(
const char *filename,
unsigned int width,
unsigned int height, CodecID codec = CODEC_ID_MPEG1VIDEO);
void setBitRate(const unsigned int bit_rate)
unsigned long getFrameNumber() const
This class interfaces the FFmpeg library to enable the reading of video files.