#ifndef _CV_FFMPEG_DATA_BRIDGE_H_ #define _CV_FFMPEG_DATA_BRIDGE_H_ #include #include struct AVFrame; namespace ffwrapper{ class swscale_wrapper; class PicData; class cvbridge { public: cvbridge(int srcW, int srcH, int srcFmt, int dstW, int dstH, int dstFmt, int flags=4, void *srcFilter=NULL, void *dstFilter=NULL, double *param=NULL); ~cvbridge(); public: bool copyPicture(uint8_t *out, AVFrame *in); bool getAVFrame(uint8_t *in, const int w, const int h, AVFrame * &output); AVFrame *getAVFrame(uint8_t *in, const int w, const int h); AVFrame *getAVFrame(AVFrame *in); bool getAVFrame(AVFrame *in, AVFrame * &output); private: ffwrapper::swscale_wrapper *scale_; ffwrapper::PicData *pic_; uint8_t *buff_fill_; }; } #endif