#ifndef APPPIPECONTROLLER_H
|
#define APPPIPECONTROLLER_H
|
|
#include <basic/pipe/PipeController.h>
|
#include <basic/pipe_element/ffmpeg/FfmpegElement.h>
|
#include <basic/pipe_element/ImageShowElement.h>
|
#include <basic/util/curl/HttpRequestWithCrul.hpp>
|
#include "ImageDrawElement.h"
|
#include "FaceRpcElement.h"
|
#include "FaceExtractElement.h"
|
#include "YoloRpcElement.h"
|
#include "RecordVideoElement.h"
|
#include <TriggerElement.h>
|
#include <QtCore/QDateTime>
|
#include "PerimeterElement.h"
|
#include "JudgmentRetrogradeTool.h"
|
#include "NewRecordVideoElement.h"
|
#include <jsoncpp/json/json.h>
|
|
|
class AppPipeController : public PipeController {
|
public:
|
/***
|
* 用于快速视频结构化
|
* @param folderPath 任务根目录,用于做共享内存id
|
* @param json 参数为rtsp流地址 sdk是否启用的标识
|
*/
|
AppPipeController(std::string folderPath, const Json::Value &json);
|
|
AppPipeController(int index, const Json::Value &json, bool RecordVideoEnable = false);
|
|
AppPipeController(std::string camId, const Json::Value &json, bool RecordVideoEnable);
|
|
virtual ~AppPipeController();
|
|
bool resetVideoCapturePath(std::string path);
|
|
bool getRunning();
|
|
std::string getRtmp();
|
|
void setfdfsClient(FastFdsWithLock *p_fdfsClient);
|
|
private:
|
void init();
|
|
private://Perimete
|
PerimeterElement perimeterElement;
|
// TriggerElement peTriggerElement;
|
|
void initPerimeter();
|
|
private://Crowd
|
PerimeterElement crowdElement;
|
//TriggerElement crowdTriggerElement;
|
|
void initCrowd();
|
|
private://KeepRight
|
JudgmentRetrogradeTool leftJudgment;
|
JudgmentRetrogradeTool rightJudgment;
|
|
// TriggerElement leftTriggerElement;
|
// TriggerElement rightTriggerElement;
|
|
void intKeepRight();
|
|
private:
|
ffmpeg::VideoCaptureElement videoCaptureElement;
|
YoloRpcElement yoloRpcElement;
|
FaceRpcElement faceRpcElement;
|
FaceExtractElement faceExtractElement;
|
ImageDrawElement imageDrawElement;
|
RecordVideoElement recordVideoElement;
|
NewRecordVideoElement newRecordVideoElement;
|
|
int m_index;
|
std::string m_camId;
|
std::string m_folderPath;
|
Json::Value m_json;
|
Json::Value m_json_Record;
|
|
Json::FastWriter m_fastWriter;
|
FastFdsWithLock *fdfsClient;
|
|
bool bRecordVideoEnable;
|
std::map<std::string, bool> recordRetMap;
|
|
TriggerElement triggerElement;
|
std::atomic<bool> bUp;
|
|
QDateTime m_dt;
|
|
std::string getFullFileName();
|
|
|
void recordInit(int videoMin, int videoMax);
|
void setSdkTrigger();
|
void doRecord();
|
int fileMin;
|
int fileMax;
|
bool sdkTrigger;
|
int triggerDelay;
|
|
#define RECORD_STOP (0)
|
#define RECORD_DOING (1)
|
#define RECORD_ENDING (2)
|
|
int recordStatus;
|
int videoLength;
|
int recordDelay;
|
|
|
};
|
|
#endif // APPPIPECONTROLLER_H
|