From 59408e43480b48b6acd6e76641ff1a97811e7ab5 Mon Sep 17 00:00:00 2001 From: pansen <pansen626@sina.com> Date: 星期四, 10 一月 2019 18:19:49 +0800 Subject: [PATCH] 修改yoloServer 优化多线程? --- QiaoJiaSystem/VideoAnalysFromHC/main.cpp | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/QiaoJiaSystem/VideoAnalysFromHC/main.cpp b/QiaoJiaSystem/VideoAnalysFromHC/main.cpp index 98df593..2b01d43 100644 --- a/QiaoJiaSystem/VideoAnalysFromHC/main.cpp +++ b/QiaoJiaSystem/VideoAnalysFromHC/main.cpp @@ -9,6 +9,7 @@ #include "DBManageClass.h" #include "RtspAnalysElement.h" #include <basic/debug/Debug.h> +#include "StructureApp/NewEncodeVideoManager.h" //#include "PerimeterAlarmManager.h" //#include "KeepRightManager.h" //"192.168.1.4", 8000, "admin", "basic123" @@ -41,6 +42,8 @@ static void startRtspAnalysElement(LDBTool *_dbTool) { RtspAnalysElement rtspAnalysElement(_dbTool); + NewEncodeVideoManager newEncodeVideoManager; + newEncodeVideoManager.start(); while (1) { sleep(1 * 60 * 60 * 12); } @@ -63,7 +66,10 @@ int main(int argc, char **argv) { SAVE_APP_ARGS - ENABLEGLOG(GET_STR_CONFIG("logPath").c_str()); + +#ifdef GLOG + ENABLEGLOG(GET_STR_CONFIG("logPath").c_str()); +#endif appPref.setLongData("gpu.index", 0); appPref.setIntData("show.image", 0); @@ -127,7 +133,8 @@ bool loopRet = true; while (loopRet) { - switch (_dbTool.searchDevTypeFromConfigTable()) { + switch (_dbTool.searchDevTypeFromConfigTable()) { + case 0: { DBG("case 0"); sleep(5); -- Gitblit v1.8.0