#ifndef VIDEOMOVECAPTUREELEMENT_H #define VIDEOMOVECAPTUREELEMENT_H #include #include #include "VideoChangeScore.h" //#include struct CvCapture_FFMPEG; struct CvVideoWriter_FFMPEG; class VideoMoveCaptureElement : public basic::PipeElement { public: VideoMoveCaptureElement(const std::string &path, const std::string &outPath, int fps = 30, int reOpenTime = -1, int gpuIndex = -1 ); cv::Mat getImage() const; int getOutPutInterval() const; void setOutPutInterval(int value); int getChangeLevel() const; bool getBYoloDetect() const; int getOutPutIndex() const; void startRecord(int startFrame);//too large?no int? void endRecord(int endFrame); private: void threadFunc(); void threadInitial(); void threadClosing(); void openVideo(); private: CvCapture_FFMPEG *capture; std::string path; std::string m_pathOut; cv::Mat image; int gpuIndex; int outPutIndex; int outPutInterval; int reopenTime; VideoChangeScore videoChangeScore; int nChangeLevel; bool bYoloDetect; int m_nFrame; public: int getM_nFrame() const; // my_module_space::Timer _timer; // my_module_space::Timer _timerTotal; }; #endif // VIDEOMOVECAPTUREELEMENT_H