#ifndef HCANALYSVIDEO_H_XZL_201808131611 #define HCANALYSVIDEO_H_XZL_201808131611 #include "myThread.h" #include "AppController.h" #include #include #include "dispathdatatype.hpp" //struct AnalysSrcInfo { // std::string strPath; //}; class HcAnalysVideo : public mythread { using TASK_FUNCTION = std::function &)>; public: HcAnalysVideo(TASK_FUNCTION task_f = nullptr) : m_task_function(task_f) {} ~HcAnalysVideo() { } private: virtual void doFunc(std::shared_ptr spPacket) { AppController _AppController(spPacket->src_path, 5000); auto str_Path = _AppController.startController(); if (m_task_function != nullptr) { auto fp_task( std::make_shared( finishCutFileManage{spPacket->src_path, str_Path, IOOperate::GetFileNum(str_Path.c_str(), ".mp4")})); m_task_function(fp_task); } else { ERR("m_task_function == nullptr"); return; } } private: TASK_FUNCTION m_task_function; }; #endif