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/DataManagerServer/http_configserver.cpp | 37 +++++++++++++++++++++++++------------ 1 files changed, 25 insertions(+), 12 deletions(-) diff --git a/QiaoJiaSystem/DataManagerServer/http_configserver.cpp b/QiaoJiaSystem/DataManagerServer/http_configserver.cpp index d387046..4e61e33 100644 --- a/QiaoJiaSystem/DataManagerServer/http_configserver.cpp +++ b/QiaoJiaSystem/DataManagerServer/http_configserver.cpp @@ -262,6 +262,8 @@ VssDomainUnitTblController::instance()->registerHttpServices(_HttpSrvRetRecieve); VssLocalSettingTblController::instance()->registerHttpServices(_HttpSrvRetRecieve); CamDevController::instance()->registerHttpServices(_HttpSrvRetRecieve); + //todo + CamDevController::instance()->nsqMsgProducerSet(nsqMsgProducer); VssUpperSvrTblController::instance()->registerHttpServices(_HttpSrvRetRecieve); @@ -1164,11 +1166,11 @@ std::string brand) const { if (brand == "haikang") { - bool ret = getHKDevSerialNumber(ip.c_str(), port, username.c_str(), passwd.c_str()); - if (!ret) { - ERR("getHKDevSerialNumber ERR"); - return false; - } +// bool ret = getHKDevSerialNumber(ip.c_str(), port, username.c_str(), passwd.c_str()); +// if (!ret) { +// ERR("getHKDevSerialNumber ERR"); +// return false; +// } //璋冪敤rtsp娴乺tsp://admin:a1234567@192.168.1.215:554/h264/ch1/main/av_stream port = 554;//TODO // std::string rtsp_url = "rtsp://" + username + ":" + passwd + "@" + ip + ":" + std::to_string(port) + @@ -1218,11 +1220,11 @@ return false;//TODO } else if (brand == "yushi") { // rtsp://admin:admin@192.168.8.8:554/video1 - bool ret = getUVDevSerialNumber(ip.c_str(), username.c_str(), passwd.c_str()); - if (!ret) { - ERR("getUVDevSerialNumber ERR"); - return false; - } +// bool ret = getUVDevSerialNumber(ip.c_str(), username.c_str(), passwd.c_str()); +// if (!ret) { +// ERR("getUVDevSerialNumber ERR"); +// return false; +// } port = 554; // std::string rtsp_url = "rtsp://" + username + ":" + passwd + "@" + ip + ":" + std::to_string(port) + @@ -3030,8 +3032,19 @@ } } - if (videoStVec.size() >= 1) { - std::string strVideoName = strPath + videoStVec[0].ToVideoName(); + std::vector<VideoName_s_t> videoStVec_; + auto imgTm_ = AppUtil::ParseFromHypenTimeStr(imgSt.m_timeStamp); + for (auto &item : videoStVec) { + auto resTime_ = AppUtil::ParseFromHypenTimeStr(item.m_timeStamp); + auto timeRes = difftime(mktime(&resTime_), mktime(&imgTm_)); + if ((timeRes < 0 && difftime(mktime(&imgTm_), mktime(&resTime_)) >= 30) || (timeRes / 60 >= 3)) { + continue; + } + videoStVec_.emplace_back(item); + } + + if (videoStVec_.size() >= 1) { + std::string strVideoName = strPath + videoStVec_[0].ToVideoName(); INFO("ImageName: " << imgKey << " SingleMatchVideo: " << strVideoName); return strVideoName; } else { -- Gitblit v1.8.0