#pragma once #include #include #include #include #include #include #include #include #include // opencv #include #include #include #include #include #include "Util/logger.h" #include "DataSource.h" using namespace toolkit; using namespace std; //using namespace cv; namespace MIVA { class recorder { public: recorder() {} ~recorder() {} static std::shared_ptr CreateNew(); void Start(); void Finish(); void ConsumerData(std::string Pid,cv::Mat& frame); std::string GetFileName(std::string Pid); private: struct Writer{ std::string fileName = ""; std::shared_ptr videoWriter = nullptr; }; map videoWriters; public: bool enable = true; bool RecordEnable = true; int outType = 0; // 0 图片 1视频 std::string outDir = ""; std::string Dir = "./video/"; using Ptr = std::shared_ptr; }; } // namespace name