From db043cb402515837303880cb0948d060e9d76490 Mon Sep 17 00:00:00 2001
From: chenshijun <csj_sky@126.com>
Date: 星期一, 15 四月 2019 17:13:16 +0800
Subject: [PATCH] 整合代码
---
QiaoJiaSystem/VideoAnalysFromHC/RtspAnalysElement.cpp | 2
QiaoJiaSystem/StructureApp/PerimeterElement.cpp | 12 +-
QiaoJiaSystem/VideoToImageMulth/RtspCaptureElement.h | 2
QiaoJiaSystem/GB28181DecoderModel/VideoCaptureElementWithRtp.cpp | 80 +++++++++----------
syncDBTool/ErlangDbTool.cpp | 2
QiaoJiaSystem/StructureApp/FaceRpcElement.cpp | 6
QiaoJiaSystem/VideoToImageMulth/RtspAnalysManager.cpp | 10 +-
QiaoJiaSystem/StructureApp/AppPipeController.cpp | 4
QiaoJiaSystem/VptServer/VptDetectWrapper.cpp | 1
QiaoJiaSystem/DataManagerServer/http_configserver.cpp | 20 ++--
QiaoJiaSystem/FaceDetectServer/main_detect.cpp | 3
QiaoJiaSystem/FaceDetectServer/FaceExtractServerI.cpp | 1
QiaoJiaSystem/GB28181DecoderModel/VideoCaptureElementWithRtp.h | 2
QiaoJiaSystem/StructureApp/CMakeLists.txt | 1
QiaoJiaSystem/VideoToImageMulth/RtspImageRedis.cpp | 6
QiaoJiaSystem/FaceDetectServer/main_extract.cpp | 3
QiaoJiaSystem/LocalDBTool/SqliteToolkit.hpp | 6 +
QiaoJiaSystem/GB28181DecoderModel/FFmpegDecoderJPG.cpp | 22 +----
18 files changed, 88 insertions(+), 95 deletions(-)
diff --git a/QiaoJiaSystem/DataManagerServer/http_configserver.cpp b/QiaoJiaSystem/DataManagerServer/http_configserver.cpp
index 5840b92..4c462e4 100644
--- a/QiaoJiaSystem/DataManagerServer/http_configserver.cpp
+++ b/QiaoJiaSystem/DataManagerServer/http_configserver.cpp
@@ -1164,11 +1164,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 +1218,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) +
diff --git a/QiaoJiaSystem/FaceDetectServer/FaceExtractServerI.cpp b/QiaoJiaSystem/FaceDetectServer/FaceExtractServerI.cpp
index 0485c6a..c8918da 100644
--- a/QiaoJiaSystem/FaceDetectServer/FaceExtractServerI.cpp
+++ b/QiaoJiaSystem/FaceDetectServer/FaceExtractServerI.cpp
@@ -50,5 +50,6 @@
ERR("shareMemory attach faild");
// throw std::runtime_error("shareMemory attach faild");
}
+ return feature;
}
diff --git a/QiaoJiaSystem/FaceDetectServer/main_detect.cpp b/QiaoJiaSystem/FaceDetectServer/main_detect.cpp
index bf9f733..7fdaea5 100644
--- a/QiaoJiaSystem/FaceDetectServer/main_detect.cpp
+++ b/QiaoJiaSystem/FaceDetectServer/main_detect.cpp
@@ -57,7 +57,8 @@
IceRpcServer<FaceDetectServerI> server("faceServer", appPref.getIntData("RpcFDPort"), "tcp");
server.setMessageSizeMax(1024 * 1024 * 50);
server.setPoolInitSize(appPref.getIntData("thread.max"));
- server.setPoolMaxSize(appPref.getIntData("thread.max"));
+ DBG("MaxPoolSize: " << std::max(appPref.getIntData("thread.max")*2, 32));
+ server.setPoolMaxSize(std::max(appPref.getIntData("thread.max")*2, 32));
server.runWaitShutDown();
return 0;
}
diff --git a/QiaoJiaSystem/FaceDetectServer/main_extract.cpp b/QiaoJiaSystem/FaceDetectServer/main_extract.cpp
index 712f421..10046ca 100644
--- a/QiaoJiaSystem/FaceDetectServer/main_extract.cpp
+++ b/QiaoJiaSystem/FaceDetectServer/main_extract.cpp
@@ -58,7 +58,8 @@
IceRpcServer<FaceExtractServerI> server("faceExtractServer", appPref.getIntData("RpcFEPort"), "tcp");
server.setMessageSizeMax(1024 * 1024 * 50);
server.setPoolInitSize(appPref.getIntData("thread.max"));
- server.setPoolMaxSize(appPref.getIntData("thread.max"));
+ DBG("MaxPoolSize: " << std::max(appPref.getIntData("thread.max")*2, 32));
+ server.setPoolMaxSize(std::max(appPref.getIntData("thread.max")*2, 32));
server.runWaitShutDown();
return 0;
}
diff --git a/QiaoJiaSystem/GB28181DecoderModel/FFmpegDecoderJPG.cpp b/QiaoJiaSystem/GB28181DecoderModel/FFmpegDecoderJPG.cpp
index f1386f5..299ec03 100644
--- a/QiaoJiaSystem/GB28181DecoderModel/FFmpegDecoderJPG.cpp
+++ b/QiaoJiaSystem/GB28181DecoderModel/FFmpegDecoderJPG.cpp
@@ -5,7 +5,6 @@
#include <zconf.h>
#include <opencv2/opencv.hpp>
#include "FFmpegDecoderJPG.h"
-#include <cstring>
void BASICGB28181::initFFmpeg() {
av_register_all();
@@ -280,19 +279,9 @@
// BASICGB28181::avframe_to_cvmat(frame).copyTo(p_this->m_image);
p_this->m_image = std::move(BASICGB28181::avframe_to_cvmat(p_this->frame));
if(p_this->m_image.empty()) {
- ERR("camID:" << p_this->m_camIdx << " frameW:" << p_this->frame->width << "frame.data.len" << strlen(p_this->frame->data[0]));
+ ERR("camID:" << p_this->m_camIdx << " frameW:" << p_this->frame->width);
continue;
}
-// else {
-// static int count =0;
-// count ++;
-// if(count > 100){
-// ERR("camID:" << p_this->m_camIdx << " cols:" << p_this->m_image.cols <<\
-// " rows:" << p_this->m_image.rows << " channels:" << p_this->m_image.channels());
-// count = 0;
-// }
-//
-// }
// 灏唅甯т繚瀛樹负蹇収
if (p_this->m_SnapshotNotSaveRet && (p_this->pkt.flags & AV_PKT_FLAG_KEY)) {
try {
@@ -332,7 +321,6 @@
#endif
//瑙﹀彂涓婂眰淇″彿
gSignalLock.emitSigal(p_this->m_camIdx + "DecoderImageOK");
-// DBG("emitSigal: " << p_this->m_camIdx);
//#ifdef TestCode
// DBG("emitSigal(\"DecoderImageOK\") after");
//#endif
@@ -450,7 +438,7 @@
if (!m_packetsVec.empty()) {
auto iter = m_packetsVec.begin();
while (iter->m_frameId < lastFrameId) {
- INFO("DropFrame: " << iter->m_frameId);
+// INFO("DropFrame: " << iter->m_frameId);
delete iter->m_packet.data;
iter = m_packetsVec.erase(iter);
}
@@ -480,7 +468,7 @@
bool BASICGB28181::FFmpegDecoderJPG::SaveVideo(std::string path, int64_t lastFrameId) {
std::lock_guard<std::mutex> lock(g_mutex);
- INFO("SaveVideo: " << path << "m_packetsVec.size : " << m_packetsVec.size());
+// INFO("SaveVideo: " << path << "m_packetsVec.size : " << m_packetsVec.size());
if (!m_packetsVec.empty()) {
startWrite(path.c_str());
int64_t firstKeyFramePts = m_packetsVec[0].m_packet.pts;
@@ -488,7 +476,7 @@
unsigned long int frame_index = 0;
for (const auto &item:m_packetsVec) {
if (item.m_frameId < lastFrameId) {
- DBG("item.m_frameId < lastFrameId " << item.m_frameId << " " << lastFrameId);
+// DBG("item.m_frameId < lastFrameId " << item.m_frameId << " " << lastFrameId);
conversion(const_cast<AVPacket *> (&item.m_packet), firstKeyFramePts, firstKeyFrameDts, video_st,
frame_index);
frame_index++;
@@ -634,7 +622,7 @@
AVPacket *pkg = static_cast<AVPacket *>(packet);
- DBG("frame_index==%d\n" << frame_index);
+// DBG("frame_index==\n" << frame_index);
//Write PTS
AVRational time_base1 = inStream->time_base;
//Duration between 2 frames (us)
diff --git a/QiaoJiaSystem/GB28181DecoderModel/VideoCaptureElementWithRtp.cpp b/QiaoJiaSystem/GB28181DecoderModel/VideoCaptureElementWithRtp.cpp
index 974c3ce..9712880 100644
--- a/QiaoJiaSystem/GB28181DecoderModel/VideoCaptureElementWithRtp.cpp
+++ b/QiaoJiaSystem/GB28181DecoderModel/VideoCaptureElementWithRtp.cpp
@@ -49,40 +49,52 @@
DBG("waitSignal(\"DecoderImageOK\") begin");
#endif
//绛夊緟淇″彿瑙﹀彂
-// DBG("waitSignal before: " << p_this->m_chanPubID);
gSignalLock.waitSignal(p_this->m_chanPubID + "DecoderImageOK");
-// DBG("waitSignal: " << p_this->m_chanPubID);
#ifdef TestCode
DBG("waitSignal(\"DecoderImageOK\") after");
#endif
+ {
+ if (p_this->m_publishVideoRet) {
+ if (p_this->videoPublishElement == nullptr) {
+ string path = appConfig.getStringProperty("srsAddr") + "cam" + p_this->m_chanPubID + ".flv";
+ cv::Size size_(appConfig.getIntProperty("pulish.width"), appConfig.getIntProperty("pulish.height"));
+ int gupIdx = appPref.getIntData("gpu.index");
+ DBG("videoPublishpath: " << p_this->m_chanPubID << path << " h:" << size_.height);
+ p_this->videoPublishElement = new ffmpeg::VideoPublishElement(path, size_, "flv", 25, gupIdx);
+ p_this->videoPublishElement->start();
+ } else {
+// DBG("videoPublishElement->setImage() : " << p_this->m_chanPubID);
+ if (!p_this->m_image.empty()) {
+ p_this->videoPublishElement->setImage(p_this->m_image);
+ } else {
+ ERR("m_image.empty()");
+ }
+ }
+ } else {
+ if (p_this->videoPublishElement != nullptr) {
+ DBG("videoPublishElement->stop() :" << p_this->m_chanPubID);
+ p_this->videoPublishElement->stop();
+ p_this->videoPublishElement->wait();
+ delete p_this->videoPublishElement;
+ p_this->videoPublishElement = nullptr;
+ }else{
+// DBG("videoPublishElement null :" << p_this->m_chanPubID);
+ }
+ }
+ }
+ /****褰曞儚妯″潡浠g爜*****/
+ p_this->m_picCount++;
+ //鍑犲紶閫変竴寮犳斁鍏edis
+ if (p_this->m_picCount % m_nPicsPickOne != 0) {
+ continue;
+ } else {
+ p_this->m_picCount.store(0);
+ }
// 浠巉fmpeg瑙g爜绫讳腑鑾峰彇鍥剧墖
p_this->m_fFmpegDecoderJPG.getImage().copyTo(p_this->m_image);
- /****debug*****///todo
- if (p_this->m_image.empty()) {
- ERR("camID:" << p_this->m_chanPubID);
- continue;
- }
-// else {
-// static int count =0;
-// count ++;
-// if(count > 100){
-// ERR("camID:" << p_this->m_chanPubID << " cols:" << p_this->m_image.cols <<\
-// " rows:" << p_this->m_image.rows << " channels:" << p_this->m_image.channels());
-// count = 0;
-// }
-// }
-
{
- /****褰曞儚妯″潡浠g爜*****/
- p_this->m_picCount++;
- //鍑犲紶閫変竴寮犳斁鍏edis
- if (p_this->m_picCount % m_nPicsPickOne != 0) {
- continue;
- } else {
- p_this->m_picCount.store(0);
- }
cv::Mat copyMat;
std::string imageName = p_this->m_fFmpegDecoderJPG.GetImageName();
p_this->m_image.copyTo(copyMat);
@@ -146,15 +158,15 @@
p_this->m_running = false;
stop();
INFO("grabFrame faild, element stopping");
- break;
} else {
//todo 涓氬姟姝婚攣
usleep((6 - reopenTime--) * 1000000);
- INFO("grabFrame faild, try reopen video: ");
+ INFO("grabFrame faild, try reopen video, reopenTime:" << reopenTime);
//鍏抽棴ffmpeg瑙g爜妯″潡
p_this->m_fFmpegDecoderJPG.stopThd();
//鍚姩ffmpeg瑙g爜妯″潡
+ DBG("m_chanPubID:"<<p_this->m_chanPubID << " m_fps:" << p_this->m_fps);
p_this->m_fFmpegDecoderJPG.startThd(p_this->m_chanPubID, p_this->m_fps, p_this->m_gpuIdx);
continue;
}
@@ -222,20 +234,6 @@
}
void BASICGB28181::VideoCaptureElementWithRtp::threadFunc() {
-
- if (m_publishVideoRet) {
- if (videoPublishElement == nullptr) {
- string path = appConfig.getStringProperty("srsAddr") + "cam" + m_chanPubID + ".flv";
- cv::Size size_(appConfig.getIntProperty("pulish.width"), appConfig.getIntProperty("pulish.height"));
- int gupIdx = appPref.getIntData("gpu.index");
- videoPublishElement = new ffmpeg::VideoPublishElement(path, size_, "flv", 25, gupIdx);
- } else {
- videoPublishElement->stop();
- videoPublishElement->wait();
- delete videoPublishElement;
- videoPublishElement = nullptr;
- }
- }
fireConnectors();
}
diff --git a/QiaoJiaSystem/GB28181DecoderModel/VideoCaptureElementWithRtp.h b/QiaoJiaSystem/GB28181DecoderModel/VideoCaptureElementWithRtp.h
index 1eaf254..8e0a92c 100644
--- a/QiaoJiaSystem/GB28181DecoderModel/VideoCaptureElementWithRtp.h
+++ b/QiaoJiaSystem/GB28181DecoderModel/VideoCaptureElementWithRtp.h
@@ -78,7 +78,7 @@
//鐢ㄦ潵淇濆瓨褰曞儚瑙嗛鐨勮矾寰�
std::string m_cutPath;
std::atomic<bool> m_publishVideoRet{false};
- ffmpeg::VideoPublishElement * videoPublishElement;
+ ffmpeg::VideoPublishElement * videoPublishElement{nullptr};
private:
/***
* 鍚姩瀹炴椂娴佹帴鏀舵暟鎹嚎绋�
diff --git a/QiaoJiaSystem/LocalDBTool/SqliteToolkit.hpp b/QiaoJiaSystem/LocalDBTool/SqliteToolkit.hpp
index 9c893a7..5710c71 100644
--- a/QiaoJiaSystem/LocalDBTool/SqliteToolkit.hpp
+++ b/QiaoJiaSystem/LocalDBTool/SqliteToolkit.hpp
@@ -273,6 +273,10 @@
return "tableName is NULL";
}
// 浜哄憳淇℃伅琛�
+ //ALTER TABLE '0cd82a8b-5285-5737-ab19-8c07247c797e' ADD COLUMN uploadFlag varchar(255) DEFAULT 0;
+ //ALTER TABLE '0cd82a8b-5285-5737-ab19-8c07247c797e' ADD COLUMN cmpThreshold varchar(255) DEFAULT 60;
+ //ALTER TABLE '0cd82a8b-5285-5737-ab19-8c07247c797e' ADD COLUMN enabled varchar(255) DEFAULT 1;
+ //ALTER TABLE '0cd82a8b-5285-5737-ab19-8c07247c797e' ADD COLUMN monitorLevel varchar(255) DEFAULT 0;
std::string sql = "CREATE TABLE " + g_dbName + ".'";
sql.append(tableName);
sql.append("' ( uuid varchar(255) PRIMARY KEY,");
@@ -286,6 +290,8 @@
sql.append("create_by varchar(255) DEFAULT NULL,");
sql.append("del_flag INTEGER DEFAULT 0,");
sql.append("monitorLevel varchar(255) DEFAULT 0,");
+ sql.append("uploadFlag varchar(255) DEFAULT 0,");
+ sql.append("cmpThreshold varchar(255) DEFAULT 60,");
sql.append("enabled varchar(255) DEFAULT 1");
sql.append(");");
// 浜鸿劯鐗瑰緛琛�
diff --git a/QiaoJiaSystem/StructureApp/AppPipeController.cpp b/QiaoJiaSystem/StructureApp/AppPipeController.cpp
index 4e59bc8..14bfad1 100644
--- a/QiaoJiaSystem/StructureApp/AppPipeController.cpp
+++ b/QiaoJiaSystem/StructureApp/AppPipeController.cpp
@@ -292,7 +292,7 @@
//#todo
faceRpcElement.setProperty("time", strNewTime);
faceRpcElement.setProperty("imgKey", imgKey);
- INFO("Write To FaceRPC ES time:" << strNewTime << " ImgKey: " << imgKey);
+// INFO("Write To FaceRPC ES time:" << strNewTime << " ImgKey: " << imgKey);
faceRpcElement.setImage(imageTemp);
faceRpcElement.submit();
}
@@ -302,7 +302,7 @@
//#todo
yoloRpcElement.setProperty("time", strNewTime);
yoloRpcElement.setProperty("imgKey", imgKey);
- INFO("Write To YoloES time:" << strNewTime << " ImgKey: " << imgKey);
+// INFO("Write To YoloES time:" << strNewTime << " ImgKey: " << imgKey);
yoloRpcElement.setImage(imageTemp);
yoloRpcElement.submit();
}
diff --git a/QiaoJiaSystem/StructureApp/CMakeLists.txt b/QiaoJiaSystem/StructureApp/CMakeLists.txt
index 8eaf3c2..b15b23e 100644
--- a/QiaoJiaSystem/StructureApp/CMakeLists.txt
+++ b/QiaoJiaSystem/StructureApp/CMakeLists.txt
@@ -44,7 +44,6 @@
../../../BasicPlatForm/basic/util/curl/HttpRequestWithCrul.hpp
../../../BasicPlatForm/basic/util/net_config/net_config.cpp
../../../BasicPlatForm/basic/timer_counter/Clocktimer.cpp
-
)
SET(LIBS
diff --git a/QiaoJiaSystem/StructureApp/FaceRpcElement.cpp b/QiaoJiaSystem/StructureApp/FaceRpcElement.cpp
index 8ff149f..67fa6d1 100644
--- a/QiaoJiaSystem/StructureApp/FaceRpcElement.cpp
+++ b/QiaoJiaSystem/StructureApp/FaceRpcElement.cpp
@@ -82,7 +82,7 @@
}
void FaceRpcElement::threadFunc() {
- INFO("MYH Run Here");
+// INFO("MYH Run Here");
// ClockTimer ct("FaceRpcElement::threadFunc");
// {
//
@@ -135,12 +135,12 @@
CvUtil::zoomRectEqual(scoredRect.rect, 1.5, 1.5) & cv::Rect(0, 0, image.cols, image.rows)).clone());
triggerScoredRects.push_back(trackingTrigger->getLastRect());
} else {
- INFO("No Face Find: " << getProperty("imgKey"));
+// INFO("No Face Find: " << getProperty("imgKey"));
// DBG("trackingTrigger->triggerOnce(scoredRect) is false ");
}
}
if (faces.empty()) {
- INFO("No Face Find: " << getProperty("imgKey"));
+// INFO("No Face Find: " << getProperty("imgKey"));
}
trackingTrigger->triggerLine();
// DBG("faces.size " << faces.size());
diff --git a/QiaoJiaSystem/StructureApp/PerimeterElement.cpp b/QiaoJiaSystem/StructureApp/PerimeterElement.cpp
index 5345549..5358abe 100644
--- a/QiaoJiaSystem/StructureApp/PerimeterElement.cpp
+++ b/QiaoJiaSystem/StructureApp/PerimeterElement.cpp
@@ -127,17 +127,17 @@
//state = num > 0 ;
state = (num != mRealNum);
// DBG("num="<<num<< "time="<< picDate);
- INFO("SDK Type: PerimeterSdk");
+// INFO("SDK Type: PerimeterSdk");
break;
case CrowdSdk:
state = num > m_sdkRule.nAlarmNumLowerLimit && num != mRealNum;
- INFO("SDK Type: CrowdSdk");
+// INFO("SDK Type: CrowdSdk");
break;
case PerHubSdk:
state = num > m_sdkRule.nAlarmNumLowerLimit && num < m_sdkRule.nAlarmNumUpperLimit && num != mRealNum;
- INFO("SDK Type: PerHubSdk");
+// INFO("SDK Type: PerHubSdk");
// if(m_sdkRule.nAlarmNumLowerLimit>=0)
// {
@@ -293,8 +293,8 @@
} else {
mPolygon << (QPoint(x, y));
}
- DBG("width=" << sizeW);
- DBG("height=" << sizeH);
+// DBG("width="<<sizeW);
+// DBG("height="<<sizeH);
}
@@ -303,7 +303,7 @@
QJsonArray PerimeterElement::getJsonArrayFromQString(const QString &strJson) {
QJsonDocument jsonDocument = QJsonDocument::fromJson(strJson.toLocal8Bit());
if (jsonDocument.isNull()) {
- DBG("please check the string" << strJson.toStdString());
+ ERR("please check the string" << strJson.toStdString());
return QJsonArray();
}
QJsonArray jsonArray = jsonDocument.array();
diff --git a/QiaoJiaSystem/VideoAnalysFromHC/RtspAnalysElement.cpp b/QiaoJiaSystem/VideoAnalysFromHC/RtspAnalysElement.cpp
index dd07173..c54cf32 100644
--- a/QiaoJiaSystem/VideoAnalysFromHC/RtspAnalysElement.cpp
+++ b/QiaoJiaSystem/VideoAnalysFromHC/RtspAnalysElement.cpp
@@ -257,7 +257,7 @@
// if (rule.second.nSdkType == PerStaticSdk || rule.second.nSdkType == PerimeterSdk
// || rule.second.nSdkType == KeepRightSdk || rule.second.nSdkType == KeepRightSdk) {
float temp = (float)1 - (float) (rule.second.nThreshold) / 100;
- rule.second.fSensitivity = (temp * 75 + 25) / 100;
+ rule.second.fSensitivity = (temp * 50 + 50) / 100;
// rule.second.fSensitivity = (temp * 25 + 75) / 100;
// } else if (rule.second.nSdkType != FaceSdk) {
diff --git a/QiaoJiaSystem/VideoToImageMulth/RtspAnalysManager.cpp b/QiaoJiaSystem/VideoToImageMulth/RtspAnalysManager.cpp
index 3214411..fa3087a 100644
--- a/QiaoJiaSystem/VideoToImageMulth/RtspAnalysManager.cpp
+++ b/QiaoJiaSystem/VideoToImageMulth/RtspAnalysManager.cpp
@@ -115,12 +115,12 @@
if (pthis->m_GB28181_Enable) {
if (pthis->m_controllers_videoCapElem.find(cam_idx) !=
pthis->m_controllers_videoCapElem.end()) {
- INFO("cam add is " << cfg_val["str_addr"].asString());
+ INFO("cam add is " << cam_idx);
pthis->m_controllers_videoCapElem[cam_idx]->startPublishVideo();
}
} else {
if (pthis->m_controllers.find(cam_idx) != pthis->m_controllers.end()) {
- INFO("cam add is " << cfg_val["str_addr"].asString());
+ INFO("cam add is " << cam_idx);
pthis->m_controllers[cam_idx]->startPublishVideo();
}
}
@@ -325,7 +325,7 @@
// auto lst = m_lDBTool->searchCamDevTableAll();
Record_Config lst_dev = m_lDBTool->searchConfigTableWithinServerInfo();
if (m_controllers.find(index) == m_controllers.end()) {
- INFO("MYH DEBUG HERE");
+// INFO("MYH DEBUG HERE");
if (m_currentCount >= m_maxCount) {
ERR("addCamera faild, camera's num is full!")
return -1;
@@ -356,7 +356,7 @@
* @return 鎬绘槸0
*/
int RtspAnalysManager::removeCamera(const std::string &index) {
- INFO("MYH DEBUG HERE");
+// INFO("MYH DEBUG HERE");
if (m_GB28181_Enable) {
if (m_controllers_videoCapElem.find(index) == m_controllers_videoCapElem.end())return -1;
auto controller = m_controllers_videoCapElem[index];
@@ -382,7 +382,7 @@
delete imgRedis;
m_imgRedisControllers.erase(index);
m_imgRedisCRwLock.unlock();
- INFO("MYH DEBUG HERE");
+// INFO("MYH DEBUG HERE");
return 0;
}
diff --git a/QiaoJiaSystem/VideoToImageMulth/RtspCaptureElement.h b/QiaoJiaSystem/VideoToImageMulth/RtspCaptureElement.h
index 36fa3ea..af806a5 100644
--- a/QiaoJiaSystem/VideoToImageMulth/RtspCaptureElement.h
+++ b/QiaoJiaSystem/VideoToImageMulth/RtspCaptureElement.h
@@ -56,7 +56,7 @@
std::atomic<bool> m_publishVideoRet{false};
- ffmpeg::VideoPublishElement *videoPublishElement;
+ ffmpeg::VideoPublishElement *videoPublishElement{nullptr};
// Redis鐨勫伐鍏风被
// HiredisTool m_redisTool;
diff --git a/QiaoJiaSystem/VideoToImageMulth/RtspImageRedis.cpp b/QiaoJiaSystem/VideoToImageMulth/RtspImageRedis.cpp
index 871bda6..7e7e804 100644
--- a/QiaoJiaSystem/VideoToImageMulth/RtspImageRedis.cpp
+++ b/QiaoJiaSystem/VideoToImageMulth/RtspImageRedis.cpp
@@ -30,13 +30,13 @@
//缁ф壙鑷埗绫�,绾跨▼鍒濆鍖栫殑涓�浜涘伐浣�
void RtspImageRedisElement::threadInitial()
{
- INFO("MYH DEBUG HERE");
+// INFO("MYH DEBUG HERE");
}
//缁ф壙鑷埗绫�,绾跨▼缁撴潫鐨勬椂鍊欒皟鐢�
void RtspImageRedisElement::threadClosing()
{
- INFO("MYH DEBUG HERE");
+// INFO("MYH DEBUG HERE");
}
//淇濆瓨鍥剧墖鍒伴槦鍒椾腑,
@@ -50,7 +50,7 @@
m_imageQueue.push(NameImagePair_s_t(imageName,img));
}
else{
- ERR("SaveImage Failed ImgName:"<<imageName);
+// ERR("SaveImage Failed ImgName:"<<imageName);
}
return true;
}
diff --git a/QiaoJiaSystem/VptServer/VptDetectWrapper.cpp b/QiaoJiaSystem/VptServer/VptDetectWrapper.cpp
index 95ccdc3..04e886c 100644
--- a/QiaoJiaSystem/VptServer/VptDetectWrapper.cpp
+++ b/QiaoJiaSystem/VptServer/VptDetectWrapper.cpp
@@ -210,6 +210,7 @@
carRes.carPlateRectScore = cur_res->vp_res.numScore;
carRes.carPlatetype = cur_res->vp_res.type;
// printf(" numScore = %.2f, detectScore = %.2f\n", cur_res->vp_res.numScore, cur_res->vp_res.detectScore);
+ }
}
};
break;
diff --git a/syncDBTool/ErlangDbTool.cpp b/syncDBTool/ErlangDbTool.cpp
index 173fd83..fcd3a0b 100755
--- a/syncDBTool/ErlangDbTool.cpp
+++ b/syncDBTool/ErlangDbTool.cpp
@@ -190,7 +190,6 @@
// c erlang init
erl_init(NULL, 0);
-
struct in_addr addr;
addr.s_addr = inet_addr("127.0.0.1");
@@ -231,7 +230,6 @@
std::cout << m_ret << std::endl;
// 鍒ゆ柇鑺傜偣鏄惁鍚姩鎴愬姛
m_ret = waitNode();
-// erl_close_connection(m_fd);
resetConn();
return m_ret;
} else {
--
Gitblit v1.8.0