#ifndef HCANALYSVIDEO_H_XZL_201808131611
|
#define HCANALYSVIDEO_H_XZL_201808131611
|
|
#include "myThread.h"
|
#include "AppController.h"
|
#include <vector>
|
#include <basic/io/io.h>
|
#include "dispathdatatype.hpp"
|
|
//struct AnalysSrcInfo {
|
// std::string strPath;
|
//};
|
|
class HcAnalysVideo : public mythread<getCutFileManage> {
|
using TASK_FUNCTION = std::function<void(std::shared_ptr<finishCutFileManage> &)>;
|
public:
|
HcAnalysVideo(TASK_FUNCTION task_f = nullptr) : m_task_function(task_f) {}
|
|
~HcAnalysVideo() {
|
|
}
|
|
private:
|
virtual void doFunc(std::shared_ptr<getCutFileManage> spPacket) {
|
AppController _AppController(spPacket->src_path, 5000);
|
auto str_Path = _AppController.startController();
|
if (m_task_function != nullptr) {
|
auto fp_task(
|
std::make_shared<finishCutFileManage>(
|
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
|