派生自 development/c++

pansen
2019-03-07 d3b7bbe7102cd089680a828f5d8f6402c8cf6342
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
53
54
55
56
57
//
// Created by ps on 18-9-26.
//
 
#ifndef VIDEOANALYSFROMHC_RTSPANALYSELEMENT_H
#define VIDEOANALYSFROMHC_RTSPANALYSELEMENT_H
 
#include <iostream>
#include <map>
#include <StructureApp/AppPipeController.h>
#include <VideoServer/QiaoJia/DB/LDBTool.h>
#include <basic/util/app/AppPreference.hpp>
 
 
class RtspAnalysElement {
 
public:
//    RtspAnalysElement();
 
    RtspAnalysElement(LDBTool *_dbTool);
 
    virtual ~RtspAnalysElement();
 
    int addCamera(const std::string &, const std::map<int, SdkRule> &sdkRuleMap);
 
    int removeCamera(const std::string &);
 
    int removeAll();
 
    int getMaxCamCount();
 
    int getCurrentCamCount();
 
    std::string getRtmp(std::string &);
 
private:
    void init();
 
    std::string resetFdfs(std::string ip = "", unsigned int port = 0, std::string content = "");
 
    static std::vector<int> chnString2Vec(std::string str_list);
 
//    void setDataByType(Json::Value& json,const SdkRule& rule);
 
private:
    LDBTool *m_lDBTool;
    int m_GB28181_Enable;
    std::map<std::string, AppPipeController *> controllers;
    std::atomic<int> currentCount;
    int maxCount;
 
    FastFdsWithLock fdfsClient;
    std::map<int, SdkRule> sdkRuleMap;
};
 
 
#endif //VIDEOANALYSFROMHC_RTSPANALYSELEMENT_H