From 2faad2a7aa2a5f41badd5fa86904dd9dbab7d286 Mon Sep 17 00:00:00 2001
From: xuxiuxi <554325746@qq.com>
Date: 星期五, 08 三月 2019 15:44:02 +0800
Subject: [PATCH] delete dev delete cam_dev also
---
QiaoJiaSystem/StructureApp/FaceExtractElement.cpp | 33 ++++++++++++++++-----------------
1 files changed, 16 insertions(+), 17 deletions(-)
diff --git a/QiaoJiaSystem/StructureApp/FaceExtractElement.cpp b/QiaoJiaSystem/StructureApp/FaceExtractElement.cpp
index b0eab37..a8aa27e 100644
--- a/QiaoJiaSystem/StructureApp/FaceExtractElement.cpp
+++ b/QiaoJiaSystem/StructureApp/FaceExtractElement.cpp
@@ -38,8 +38,7 @@
appPref.getIntData("faceSear.port"), "tcp"),
// faceSearchRpcClient("faceCmServer", "", 10004, "tcp")
m_sdkRule(rule),
- m_rpcClient("RtspAnalysServer", "127.0.0.1",appPref.getIntData("RpcServerPort"),"tcp")
-{
+ m_rpcClient("RtspAnalysServer", "127.0.0.1", appPref.getIntData("RpcServerPort"), "tcp") {
sharedMemory = new QSharedMemory(QString(shareMemoryName.c_str()));
if (!sharedMemory->create(4608 * 2592 * 4)) {
sharedMemory->attach();
@@ -66,8 +65,7 @@
std::vector<FaceToExtract> faceExtractQueueTmp;
{
std::lock_guard<std::mutex> lg(imageQueueMutex);
- if (faceExtractQueue.empty())
- {
+ if (faceExtractQueue.empty()) {
ERR("faceExtractQueue.empty ");
return;
}
@@ -106,7 +104,7 @@
// cv::imwrite(string1, image);
// }
if (feature.empty()) {
- INFO("No Face Find: "<<getProperty("imgKey"));
+ INFO("No Face Find: " << getProperty("imgKey"));
continue;
}
features.clear();
@@ -119,12 +117,15 @@
CvUtil::cvMat2Buffer(faceExtractQueueTmp[i].faceImages[j], buffer);
std::string strImgUrlTmp = "";
fdfsClient->fastFds->uploadFile(buffer, strImgUrlTmp, "jpg");
- // strImgUrl.append(fdfsClient->fastFds->getIp() + "/" + strImgUrlTmp);
- DBG("strImgUrlTmp="<<strImgUrlTmp);
+ // strImgUrl.append(fdfsClient->fastFds->getIp() + "/" + strImgUrlTmp);
+ DBG("strImgUrlTmp=" << strImgUrlTmp);
strImgUrl.clear();
strImgUrl = strImgUrlTmp;
// strImgUrl.append("/").append(strImgUrlTmp);
fdfsClient->rwLock.unlock();
+ } else {
+ strImgUrl = "";
+ ERR("fdfsClient is nullptr ???");
}
//鎷兼帴json
@@ -151,7 +152,7 @@
t_json["personPicUrl"] = "";//浜哄憳鍥剧墖 store
t_json["picAddress"] = getProperty("str_addr");//鎶撴媿鍦板潃
- DBG("picAddress="<< t_json["picAddress"] );
+ DBG("picAddress=" << t_json["picAddress"]);
t_json["picMaxUrl"] = "";//澶у浘璺緞
t_json["picLocalUrl"] = "";//鏈湴璺緞
t_json["picSmUrl"] = strImgUrl;//浜哄憳鎶撳皬鍥�
@@ -163,7 +164,8 @@
t_json["content"] = "";
//t_json["viType"] = "2";//鍙湁4绉嶇被鍨� 1:personface 2:personbody 3:car 4:bicycle 5:none 鏈煡绫诲瀷
- t_json["sdkType"] = std::to_string(m_sdkRule.nSdkType);//鍙湁4绉嶇被鍨� 1:personface 2:personbody 3:car 4:bicycle 5:none 鏈煡绫诲瀷
+ t_json["sdkType"] = std::to_string(
+ m_sdkRule.nSdkType);//鍙湁4绉嶇被鍨� 1:personface 2:personbody 3:car 4:bicycle 5:none 鏈煡绫诲瀷
t_json["personIsHub"] = "4";//1: 鎶ヨ 2: 鍙枒 3: 瀹夊叏 4: 鏈煡
@@ -219,22 +221,19 @@
t_json["indevicename"] = appPref.getStringData("fxDevNAME");
std::string strImageKey = faceExtractQueueTmp[i].scoredRects[j].properties["imgKey"];
- INFO("SaveImageKey To ES: "<<strImageKey);
+ INFO("SaveImageKey To ES: " << strImageKey);
t_json["imgKey"] = strImageKey;
try {
auto server = m_rpcClient.getServer();
- if (!server)
- {
+ if (!server) {
ERR("server is null");
//return;
}
- INFO("Record Video "<<strImageKey);
+ INFO("Record Video " << strImageKey);
server->recordVideo(strImageKey);
- }
- catch (std::exception &e)
- {
- ERR("Record Video Err: "<<strImageKey <<" Message: "<<e.what());
+ } catch (std::exception &e) {
+ ERR("Record Video Err: " << strImageKey << " Message: " << e.what());
//return;
}
auto faceSearchServer = faceSearchRpcClient.getServer();
--
Gitblit v1.8.0