派生自 development/c++

chenshijun
2019-03-27 e15c4888f720b8781260b901ac82d058f8f7c3b5
QiaoJiaSystem/VideoToImageMulth/RtspAnalysManager.h
@@ -9,11 +9,14 @@
#include <map>
#include "RtspCaptureElement.h"
#include "RtspImageRedis.h"
#include "../GB28181DecoderModel/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>
@@ -27,6 +30,13 @@
    RtspAnalysManager() : m_maxCount(50), m_currentCount(0) {
        m_lDBTool = new LDBTool;
        init();
        //nsq   set callback func
        DBG("NsqMsgConsumer Init");
        nsqMsgConsumer = new BasicMsg::Nsq::NsqMsgConsumer("127.0.0.1", "4150", "cut_dura_edit", to_string(appPref.getIntData("RpcVTIMPort")));
        nsqMsgConsumer->setMessageCallback(std::bind(&OnMsgFunc, std::placeholders::_1, this));
        nsqMsgConsumer->init();
        DBG("NsqMsgConsumer Init END!!");
    }
    RtspAnalysManager(LDBTool *_dbTool);
@@ -50,8 +60,12 @@
private:
    void init();
    static void OnMsgFunc(void *msgPtr, void *pThisPtr);
private:
    //nsq
    BasicMsg::Nsq::NsqMsgConsumer *nsqMsgConsumer;
    RWLock m_imgRedisCRwLock;
@@ -63,7 +77,8 @@
    std::map<std::string, RtspCaptureElement *> m_controllers;
    //保存CamID和VideoCaptureElementWithRtp的映射关系
    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和RtspImageRedisElement的映射关系
    std::map<std::string, RtspImageRedisElement *> m_imgRedisControllers;