派生自 development/c++

pansen
2019-03-15 d883ec2891210b7e9361557b11e435c892528901
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//
// Created by ps on 18-9-26.
//
 
#ifndef RTSPANALYSMANAGER
#define RTSPANALYSMANAGER
 
#include <iostream>
#include <map>
#include "RtspCaptureElement.h"
#include <VideoServer/QiaoJia/DB/LDBTool.h>
#include <basic/util/app/AppPreference.hpp>
#include "RtspAnalysServer.h"
 
class RtspAnalysManager :public ::RtspAnalys::RtspAnalysServer{
 
public:
 
    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 ~RtspAnalysManager();
 
    int addCamera(const std::string &, const std::string& rtsp);
 
    int removeCamera(const std::string &);
 
    int removeAll();
 
    int getMaxCamCount();
 
    int getCurrentCamCount();
 
private:
    void init();
 
private:
    LDBTool *m_lDBTool;
 
    std::map<std::string, RtspCaptureElement *> m_controllers;
    //当前摄像头的数量
    int m_currentCount;
    // 摄像头的最大数量
    int m_maxCount;
 
};
 
 
#endif //VIDEOANALYSFROMHC_RTSPANALYSELEMENT_H