From 866e0bf538d3cf97ff34bd405167538d10503a99 Mon Sep 17 00:00:00 2001 From: xuxiuxi <554325746@qq.com> Date: 星期三, 06 三月 2019 11:50:09 +0800 Subject: [PATCH] Merge branch 'yw.1.2.fixbug' of http://192.168.1.226:10010/r/development/c++ into yw.1.2.fixbug --- QiaoJiaSystem/VideoToImageMulth/RtspAnalysManager.h | 32 ++++++++++++++++++++++++-------- 1 files changed, 24 insertions(+), 8 deletions(-) diff --git a/QiaoJiaSystem/VideoToImageMulth/RtspAnalysManager.h b/QiaoJiaSystem/VideoToImageMulth/RtspAnalysManager.h index bfa08be..d608547 100644 --- a/QiaoJiaSystem/VideoToImageMulth/RtspAnalysManager.h +++ b/QiaoJiaSystem/VideoToImageMulth/RtspAnalysManager.h @@ -9,24 +9,33 @@ #include <map> #include "RtspCaptureElement.h" #include "RtspImageRedis.h" -#include <VideoServer/QiaoJia/DB/LDBTool.h> +#include "../GB28181DecoderModel/VideoCaptureElementWithRtp.h" +//#include <VideoCaptureElementWithRtp.h> +#include <QiaoJia/DB/LDBTool.h> #include <basic/util/app/AppPreference.hpp> #include "RtspAnalysServer.h" +//#include <GB28181DecoderModel/VideoCaptureElementWithRtp.h> +//#include <VideoToImageMulth/rpc/RtspAnalysServer.h> + +//using BASICGB28181::VideoCaptureElementWithRtp; //鐢ㄦ潵瀹炵幇recordVideo鐨凴PC鐨勬帴鍙g被 -class RtspAnalysManager :public ::RtspAnalys::RtspAnalysServer{ +class RtspAnalysManager : public ::RtspAnalys::RtspAnalysServer { public: - RtspAnalysManager():m_maxCount(50), m_currentCount(0){ - m_lDBTool=new LDBTool; + RtspAnalysManager() : m_maxCount(50), m_currentCount(0) { + m_lDBTool = new LDBTool; init(); } + RtspAnalysManager(LDBTool *_dbTool); - virtual ::std::string recordVideo(const ::std::string&, const ::Ice::Current& = ::Ice::emptyCurrent); + + virtual ::std::string recordVideo(const ::std::string &, const ::Ice::Current & = ::Ice::emptyCurrent); + virtual ~RtspAnalysManager(); - int addCamera(const std::string &, const std::string& rtsp); + int addCamera(const std::string &, const std::string &rtsp); int removeCamera(const std::string &); @@ -37,20 +46,27 @@ int getCurrentCamCount(); // 鏍规嵁camId淇濆瓨img鍒癛edis,img鐨凨ey涓篿mageName - bool SaveImageToRedis(const std::string& camId,const std::string& imageName,const cv::Mat& img); + bool SaveImageToRedis(const std::string &camId, const std::string &imageName, const cv::Mat &img); private: void init(); private: + RWLock m_imgRedisCRwLock; + LDBTool *m_lDBTool; + + int m_GB28181_Enable; //淇濆瓨CamID鍜孯tspCaptureElement鐨勬槧灏勫叧绯� std::map<std::string, RtspCaptureElement *> m_controllers; + //淇濆瓨CamID鍜孷ideoCaptureElementWithRtp鐨勬槧灏勫叧绯� + std::map<std::string, BASICGB28181::VideoCaptureElementWithRtp *> m_controllers_videoCapElem; + //淇濆瓨CamID鍜孯tspImageRedisElement鐨勬槧灏勫叧绯� - std::map<std::string, RtspImageRedisElement*> m_imgRedisControllers; + std::map<std::string, RtspImageRedisElement *> m_imgRedisControllers; //褰撳墠鎽勫儚澶寸殑鏁伴噺 int m_currentCount; // 鎽勫儚澶寸殑鏈�澶ф暟閲� -- Gitblit v1.8.0