From ed7186f89434ff9a19a5abdce8252d69460677ee Mon Sep 17 00:00:00 2001
From: chenshijun <chenshijun@aiotlink.com>
Date: 星期五, 15 三月 2019 13:50:04 +0800
Subject: [PATCH] 将算法的进程以多进程方式启动

---
 QiaoJiaSystem/VideoToImageMulth/RtspAnalysManager.cpp |   19 +++++++++++--------
 1 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/QiaoJiaSystem/VideoToImageMulth/RtspAnalysManager.cpp b/QiaoJiaSystem/VideoToImageMulth/RtspAnalysManager.cpp
index 8eafe6d..9eee39c 100644
--- a/QiaoJiaSystem/VideoToImageMulth/RtspAnalysManager.cpp
+++ b/QiaoJiaSystem/VideoToImageMulth/RtspAnalysManager.cpp
@@ -64,16 +64,16 @@
         }
 
     } else {
-        auto lst = m_lDBTool->searchCamDevTableAll();
+        auto lst = m_lDBTool->searchCamDevTableByType(0);
         Record_Config lst_dev = m_lDBTool->searchConfigTableWithinServerInfo();
 
         //璁剧疆瑙嗛鐨勬渶闀垮拰鏈�鐭椂闂撮棿闅�
         appPref.setIntData("n_cut_max_duration", lst_dev.n_cut_max_duration);
         appPref.setIntData("n_cut_min_duration", lst_dev.n_cut_min_duration);
         if (lst.size() > 0) {
-            int startCamNO = appPref.getIntData("CamStart") * appPref.getIntData("CamStep");
-            int CamCount = appPref.getIntData("CamStep");
-            INFO("StartCamNO: " << startCamNO << " CamStep: " << CamCount);
+            int startCamNO = appPref.getIntData("CamStartNO");
+            int CamCount = appPref.getIntData("CamEndNO") - appPref.getIntData("CamStartNO") + 1;
+            INFO("StartCamNO: " << startCamNO << " CamCount: " << CamCount);
             auto itor = lst.begin();
 
             if (startCamNO >= lst.size()) {
@@ -165,9 +165,12 @@
             m_imgRedisCRwLock.unlock();
 
             //VideoCaptureElementWithRtp(std::string &chanPubID, int fps, int streamTransType, int gpuIdx = -1)
-            m_controllers_videoCapElem[index] = new BASICGB28181::VideoCaptureElementWithRtp(
-                const_cast<string &>(index),
-                25, 0, 0, this);
+//            m_controllers_videoCapElem[index] = new BASICGB28181::VideoCaptureElementWithRtp(
+//                const_cast<string &>(index),
+//                25, 0, 0, this);
+
+            m_controllers_videoCapElem[index] = new PushStreamAppPipeController(const_cast<string &>(index),
+                                                                                25, 0, 0, this);
             m_controllers_videoCapElem[index]->SetVideoMinMaxSeconds(lst_dev.n_cut_min_duration,
                                                                      lst_dev.n_cut_max_duration);
             m_controllers_videoCapElem[index]->start();
@@ -310,7 +313,7 @@
             auto pCaptureElem = m_controllers_videoCapElem.find(nameSt.m_camId);
             if (pCaptureElem != m_controllers_videoCapElem.end()) {
 //#todo ~~~~~~!!!!!!! 杩欓噷鏈塨ug 闇�瑕佹斁寮�璋冭瘯
-//                pCaptureElem->second->SaveVideo(name);
+                pCaptureElem->second->SaveVideo(name);
             } else {
                 ERR("Can not Find CamId " << nameSt.m_camId);
             }

--
Gitblit v1.8.0