//
|
// 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
|