// // Created by ps on 18-9-26. // #ifndef VIDEOANALYSFROMHC_RTSPANALYSELEMENT_H #define VIDEOANALYSFROMHC_RTSPANALYSELEMENT_H #include #include #include #include #include class RtspAnalysElement { public: // RtspAnalysElement(); RtspAnalysElement(LDBTool *_dbTool); virtual ~RtspAnalysElement(); int addCamera(const std::string &, const std::map &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 chnString2Vec(std::string str_list); // void setDataByType(Json::Value& json,const SdkRule& rule); private: LDBTool *m_lDBTool; std::map controllers; std::atomic currentCount; int maxCount; FastFdsWithLock fdfsClient; std::map sdkRuleMap; }; #endif //VIDEOANALYSFROMHC_RTSPANALYSELEMENT_H