派生自 development/c++

pansen
2019-04-02 a2673edc68a502f9a88ddf8e42f4aded9a8d94ef
QiaoJiaSystem/VideoToImageMulth/RtspAnalysManager.h
@@ -15,11 +15,14 @@
#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的RPC的接口类
class RtspAnalysManager : public ::RtspAnalys::RtspAnalysServer {
@@ -28,6 +31,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);
@@ -51,9 +61,13 @@
private:
    void init();
    static void OnMsgFunc(void *msgPtr, void *pThisPtr);
private:
    //nsq
    BasicMsg::Nsq::NsqMsgConsumer *nsqMsgConsumer;
    RWLock m_imgRedisCRwLock;
    LDBTool *m_lDBTool;