From ecb47d89dcb2b1d8e4be9b6cb0a84d8b49e2e3cc Mon Sep 17 00:00:00 2001 From: pansen <pansen626@sina.com> Date: 星期三, 10 四月 2019 12:20:00 +0800 Subject: [PATCH] 添加iceServer --- QiaoJiaSystem/VideoToImageMulth/RtspAnalysManager.h | 29 +++++++++++++++++++++++++++-- 1 files changed, 27 insertions(+), 2 deletions(-) diff --git a/QiaoJiaSystem/VideoToImageMulth/RtspAnalysManager.h b/QiaoJiaSystem/VideoToImageMulth/RtspAnalysManager.h index 2612548..dabe3ed 100644 --- a/QiaoJiaSystem/VideoToImageMulth/RtspAnalysManager.h +++ b/QiaoJiaSystem/VideoToImageMulth/RtspAnalysManager.h @@ -9,14 +9,20 @@ #include <map> #include "RtspCaptureElement.h" #include "RtspImageRedis.h" -#include <VideoCaptureElementWithRtp.h> +//#include "../GB28181DecoderModel/VideoCaptureElementWithRtp.h" +#include "pushStream/PushStreamAppPipeController.h" +//#include <VideoCaptureElementWithRtp.h> #include <QiaoJia/DB/LDBTool.h> #include <basic/util/app/AppPreference.hpp> #include "RtspAnalysServer.h" + +#include "NsqMsgTool.hpp" //#include <GB28181DecoderModel/VideoCaptureElementWithRtp.h> //#include <VideoToImageMulth/rpc/RtspAnalysServer.h> //using BASICGB28181::VideoCaptureElementWithRtp; +//澶栭儴浣跨敤鐨勫叏灞�鎸囬拡 +extern void *gRtspAnalysManagerCamera; //鐢ㄦ潵瀹炵幇recordVideo鐨凴PC鐨勬帴鍙g被 class RtspAnalysManager : public ::RtspAnalys::RtspAnalysServer { @@ -26,6 +32,15 @@ RtspAnalysManager() : m_maxCount(50), m_currentCount(0) { m_lDBTool = new LDBTool; init(); + IMPORT_APP_ARGS; + //nsq set callback func + DBG("NsqMsgConsumer Init"); + string pName(argv[0]); + nsqMsgConsumer = new BasicMsg::Nsq::NsqMsgConsumer("127.0.0.1", "4150", pName, + to_string(appPref.getIntData("RpcVTIMPort"))); + nsqMsgConsumer->setMessageCallback(std::bind(&OnMsgFunc, std::placeholders::_1, this)); + nsqMsgConsumer->init(); + DBG("NsqMsgConsumer Init END!!"); } RtspAnalysManager(LDBTool *_dbTool); @@ -50,15 +65,25 @@ private: void init(); + static void OnMsgFunc(void *msgPtr, void *pThisPtr); + private: + //nsq + BasicMsg::Nsq::NsqMsgConsumer *nsqMsgConsumer; + + 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; +// std::map<std::string, BASICGB28181::VideoCaptureElementWithRtp *> m_controllers_videoCapElem; + std::map<std::string, PushStreamAppPipeController *> m_controllers_videoCapElem; //淇濆瓨CamID鍜孯tspImageRedisElement鐨勬槧灏勫叧绯� std::map<std::string, RtspImageRedisElement *> m_imgRedisControllers; -- Gitblit v1.8.0