From 684b55231257011c11caacc5ae72b0f0977c6114 Mon Sep 17 00:00:00 2001
From: chenshijun <chenshijun@aiotlink.com>
Date: 星期五, 15 三月 2019 15:14:22 +0800
Subject: [PATCH] 整合代码
---
QiaoJiaSystem/StructureApp/AppPipeController.cpp | 31 ++++++++++++++++---------------
1 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/QiaoJiaSystem/StructureApp/AppPipeController.cpp b/QiaoJiaSystem/StructureApp/AppPipeController.cpp
index 7fd95c9..c2d8a16 100644
--- a/QiaoJiaSystem/StructureApp/AppPipeController.cpp
+++ b/QiaoJiaSystem/StructureApp/AppPipeController.cpp
@@ -9,7 +9,7 @@
#include <basic/pipe_element/ffmpeg/basic_struct_for_video_image.h>
//AppPipeController::AppPipeController(std::string folderPath, const Json::Value &json) :
-// videoCaptureElement("filePath", 25, -1, appPref.getLongData("gpu.index")), m_index(0),
+// videoCaptureElement("filePath", 25, -1, appPref.getIntData("gpu.index")), m_index(0),
// m_folderPath(folderPath),
// m_json(json), fdfsClient(nullptr), yoloRpcElement(folderPath + "yoloRpc"), faceRpcElement(folderPath + "faceRpc"),
// faceExtractElement(folderPath + "faceExtract"), triggerElement(25, 10),
@@ -19,7 +19,8 @@
//}
AppPipeController::AppPipeController(std::string folderPath, const SdkRuleMap &ruleMap) :
- videoCaptureElement("filePath", 25, -1, appPref.getLongData("gpu.index")),
+ m_rpcClient("RtspAnalysServer", "127.0.0.1",appPref.getIntData("RpcVTIMPort"),"tcp"),
+ videoCaptureElement("filePath", 25, -1, appPref.getIntData("gpu.index")),
// videoCaptureElement(40),
m_index(0),
m_folderPath(folderPath),
@@ -29,9 +30,9 @@
faceRpcElement(folderPath + "faceRpc", ruleMap[FaceSdk]),
faceExtractElement(folderPath + "faceExtract", ruleMap[FaceSdk]),
triggerElement(25, 10),
- recordVideoElement(-1, ""),
+// recordVideoElement(-1, ""),
bRecordVideoEnable(false),
- rpcClient("RtspAnalysServer", "127.0.0.1",10009,"tcp"),
+
m_bSetWH(false)
{
@@ -39,7 +40,7 @@
}
//AppPipeController::AppPipeController(int index, const Json::Value &json, bool RecordVideoEnable) :
-// videoCaptureElement(json["rtsp"].asString(), 25, 3000, appPref.getLongData("gpu.index"), RecordVideoEnable),
+// videoCaptureElement(json["rtsp"].asString(), 25, 3000, appPref.getIntData("gpu.index"), RecordVideoEnable),
// m_index(index), fdfsClient(nullptr), yoloRpcElement(to_string(index) + "yoloRpc"),
// faceRpcElement(to_string(index) + "faceRpc"), m_json(json), faceExtractElement(to_string(index) + "faceExtract"),
// triggerElement(25, 4), recordVideoElement(index, json["rtsp"].asString()), bRecordVideoEnable(RecordVideoEnable) {
@@ -48,7 +49,7 @@
//AppPipeController::AppPipeController(std::string camId, const Json::Value &json, bool RecordVideoEnable) :
-// videoCaptureElement(json["rtsp"].asString(), 25, 3000, appPref.getLongData("gpu.index")),
+// videoCaptureElement(json["rtsp"].asString(), 25, 3000, appPref.getIntData("gpu.index")),
// m_index(0),
// m_camId(camId),
// fdfsClient(nullptr),
@@ -69,7 +70,8 @@
// intKeepRight();
//}
AppPipeController::AppPipeController(std::string camId, const SdkRuleMap &ruleMap, bool RecordVideoEnable) :
- videoCaptureElement(appPref.getStringData(camId + "rtsp"), 25, 3000, appPref.getLongData("gpu.index")),
+ m_rpcClient("RtspAnalysServer", "127.0.0.1",appPref.getIntData("RpcVTIMPort"),"tcp"),
+ videoCaptureElement(appPref.getStringData(camId + "rtsp"), 25, 3000, appPref.getIntData("gpu.index")),
// videoCaptureElement(40),
m_index(0),
m_camId(camId),
@@ -78,8 +80,8 @@
faceRpcElement(camId + "faceRpc", ruleMap[FaceSdk]),
faceExtractElement(camId + "faceExtract", ruleMap[FaceSdk]),
triggerElement(25, 4),
- recordVideoElement(camId, appPref.getStringData(camId + "rtsp")),
- newRecordVideoElement(camId),
+// recordVideoElement(camId, appPref.getStringData(camId + "rtsp")),
+// newRecordVideoElement(camId),
perimeterElement(ruleMap[PerimeterSdk]),
crowdElement(ruleMap[CrowdSdk]),
perStaticElement(ruleMap[PerStaticSdk]),
@@ -88,7 +90,6 @@
rightJudgment(ruleMap[KeepRightSdk]),
bRecordVideoEnable(RecordVideoEnable),
m_sdkRuleMap(ruleMap),
- rpcClient("RtspAnalysServer", "127.0.0.1",10009,"tcp"),
m_bSetWH(false)
{
@@ -179,7 +180,7 @@
void AppPipeController::RecordVideo() {
- std::string imgKeyYolo = yoloRpcElement.getProperty("imgKey");
+ /*std::string imgKeyYolo = yoloRpcElement.getProperty("imgKey");
std::string imgKeyFace = faceRpcElement.getProperty("imgKey");
if(faceRpcElement.getTriggerState() ||
@@ -226,7 +227,7 @@
"crowdElement: "<<crowdElement.getTriggerState()<<" "<<
"perHubElement: "<<perHubElement.getTriggerState()<<" "<<
"perStaticElement: "<<perStaticElement.getTriggerState());
- }
+ }*/
}
void AppPipeController::init() {
@@ -309,7 +310,7 @@
imageDrawElement.submit();
}
//this->RecordVideo();
- if(faceRpcElement.getTriggerState() ||
+ /*if(faceRpcElement.getTriggerState() ||
personElement.getTriggerState() ||
leftJudgment.getTriggerState() ||
rightJudgment.getTriggerState() ||
@@ -343,7 +344,7 @@
"crowdElement: "<<crowdElement.getTriggerState()<<" "<<
"perHubElement: "<<perHubElement.getTriggerState()<<" "<<
"perStaticElement: "<<perStaticElement.getTriggerState());
- }
+ }*/
}
});
@@ -409,7 +410,7 @@
}
// registerElement(newRecordVideoElement);
- videoCaptureElement.setOutPutInterval(3);
+ //videoCaptureElement.setOutPutInterval(3);
faceExtractElement.setProperty("index", to_string(m_index));
registerElement(yoloRpcElement);
//#todo setProperty
--
Gitblit v1.8.0