From 291dbcd9331cd0df41addef74defa4654ee034fb Mon Sep 17 00:00:00 2001 From: chenshijun <csj_sky@126.com> Date: 星期一, 22 四月 2019 15:59:20 +0800 Subject: [PATCH] 增加人员异常的参数处理 --- QiaoJiaSystem/StructureApp/AppPipeController.h | 66 +++++++++++++++++++++++++-------- 1 files changed, 50 insertions(+), 16 deletions(-) diff --git a/QiaoJiaSystem/StructureApp/AppPipeController.h b/QiaoJiaSystem/StructureApp/AppPipeController.h index ab0e738..77862e0 100644 --- a/QiaoJiaSystem/StructureApp/AppPipeController.h +++ b/QiaoJiaSystem/StructureApp/AppPipeController.h @@ -9,17 +9,35 @@ #include "FaceRpcElement.h" #include "FaceExtractElement.h" #include "YoloRpcElement.h" -#include "RecordVideoElement.h" +//#include "RecordVideoElement.h" #include <TriggerElement.h> #include <QtCore/QDateTime> #include "PerimeterElement.h" #include "JudgmentRetrogradeTool.h" -#include "NewRecordVideoElement.h" +//#include "NewRecordVideoElement.h" #include "PersonElement.h" #include "PerStaticElement.h" #include <jsoncpp/json/json.h> #include "DBStruct.h" #include "SaveVideoRpc.h" +#include "VptRpcElement.h" +#include "HiredisTool.h" + +class VideoCaptureElementNotDecoder : public ffmpeg::VideoCaptureElement { + using ffmpeg::VideoCaptureElement::VideoCaptureElement; +private: + virtual void timerFunc() override { + fireConnectors(); + } + + virtual void threadInitial() override {} + + virtual void threadClosing() override {} + +private: + bool m_decoderRet = {false}; +}; + class AppPipeController : public PipeController { public: /*** @@ -27,14 +45,14 @@ * @param folderPath 浠诲姟鏍圭洰褰曪紝鐢ㄤ簬鍋氬叡浜唴瀛榠d * @param json 鍙傛暟涓簉tsp娴佸湴鍧� sdk鏄惁鍚敤鐨勬爣璇� */ - // AppPipeController(std::string folderPath, const Json::Value &json); - AppPipeController(std::string folderPath, const SdkRuleMap& ruleMap); + // AppPipeController(std::string folderPath, const Json::Value &json); + AppPipeController(std::string folderPath, const SdkRuleMap &ruleMap); - // AppPipeController(int index, const Json::Value &json, bool RecordVideoEnable = false); + // AppPipeController(int index, const Json::Value &json, bool RecordVideoEnable = false); - // AppPipeController(std::string camId, const Json::Value &json, bool RecordVideoEnable); + // AppPipeController(std::string camId, const Json::Value &json, bool RecordVideoEnable); - AppPipeController(std::string camId, const SdkRuleMap& ruleMap, bool RecordVideoEnable); + AppPipeController(std::string camId, const SdkRuleMap &ruleMap, bool RecordVideoEnable); virtual ~AppPipeController(); @@ -46,12 +64,14 @@ void setfdfsClient(FastFdsWithLock *p_fdfsClient); - void setWeekRule(const std::map<int, std::vector<LActRuleWeekRecord>>& weekRuleMap); + void setWeekRule(const std::map<int, std::vector<LActRuleWeekRecord>> &weekRuleMap); + private: void init(); + private://Perimete PerimeterElement perimeterElement; - // TriggerElement peTriggerElement; + // TriggerElement peTriggerElement; void initPerimeter(); @@ -60,7 +80,9 @@ //TriggerElement crowdTriggerElement; void initCrowd(); + void RecordVideo(); + private://KeepRight JudgmentRetrogradeTool leftJudgment; JudgmentRetrogradeTool rightJudgment; @@ -72,30 +94,40 @@ private: PerStaticElement perStaticElement; + void initPerStatic(); + private://Perimete PerimeterElement perHubElement; - // TriggerElement peTriggerElement; + // TriggerElement peTriggerElement; void initPerHub(); + private: SaveVideoRpcClient_t m_rpcClient; - ffmpeg::VideoCaptureElement videoCaptureElement; + VideoCaptureElementNotDecoder videoCaptureElement; +// ffmpeg::VideoCaptureElement videoCaptureElement; + +#ifdef YOLOSERVER YoloRpcElement yoloRpcElement; +#else + VptRpcElement vptRpcElement; +#endif + FaceRpcElement faceRpcElement; FaceExtractElement faceExtractElement; ImageDrawElement imageDrawElement; - RecordVideoElement recordVideoElement; - NewRecordVideoElement newRecordVideoElement; +// RecordVideoElement recordVideoElement; +// NewRecordVideoElement newRecordVideoElement; PersonElement personElement; int m_index; std::string m_camId; std::string m_folderPath; - Json::Value m_json; - Json::Value m_json_Record; +// Json::Value m_json; +// Json::Value m_json_Record; +// Json::FastWriter m_fastWriter; - Json::FastWriter m_fastWriter; FastFdsWithLock *fdfsClient; bool bRecordVideoEnable; @@ -109,7 +141,9 @@ std::map<int, std::vector<LActRuleWeekRecord>> m_weekRuleMap; SdkRuleMap m_sdkRuleMap; std::string m_localIp; + std::string getFullFileName(); + std::mutex mutex; bool m_bSetWH; HiredisTool m_hiredisTool; -- Gitblit v1.8.0