#pragma once #include #include #include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" #include "opencv2/dnn.hpp" #include "opencv2/opencv.hpp" #include "opencv2/highgui.hpp" #include "opencv2/imgcodecs/imgcodecs.hpp" #include "cnstream_frame_va.hpp" #include "device/mlu_context.h" // #include "cnstream_core.hpp" #include "cnstream_frame.hpp" #include "cnstream_module.hpp" #include "easyinfer/model_loader.h" #include "easytrack/easy_track.h" #include #include #include #include #include using namespace std; using namespace cv; using namespace cnstream; class video { private: std::string m_fileName; string m_enc_type; string m_outputDir; int m_fps; int m_cacheTime; list m_frameBuffer; int m_count; int m_videoMaxTime; Size m_frameSize; std::shared_ptr m_videoWriter; bool m_videoStart; public: video(const string &outputDir,const string &enc_type, const int fps, const int videoMaxTime,const int cacheTime,const Size& frameSize); ~video(); void Destroy(); bool capture(std::shared_ptr &data); string getFileName(); int getVideoFps(); int getVideoTime(); };