#ifndef __MONITORPLUGIN_HPP_ #define __MONITORPLUGIN_HPP_ #include #include "UtilBase.hpp" #include "requests.hpp" #include "Monitor.hpp" #include "HttpClient.hpp" #include "TcpPlugin.hpp" #include "InfineFilter.hpp" #include "HttpPlugin.hpp" #include "PluginSubscriber.hpp" #include "HepuPlugin.hpp" using namespace std; namespace gsd { class MonitorPlugin: public PluginSubscriber, public PluginBase { private: MonitorPlugin(): PluginBase(){ } public: using Ptr = std::shared_ptr; ~MonitorPlugin(){} /** * @description: getPtr * @return {*} */ static std::shared_ptr getPtr(); /** * @description: 初始化 * @return {*} */ virtual bool Init(); /** * @description: StartTask * @return {*} */ virtual bool StartTask(); /** * @description: 释放 * @return {*} */ virtual void Destroy(); /** * @description: * @return {*} */ virtual bool Alive(); /** * @description: 处理数据的进程 * @return {*} */ void MonitorProThrd(); /** * @description: 消费数据 * @param {Ptr&} result * @return {*} */ bool ConsumeData(FrameInferData::Ptr& result, HepuTarget::Ptr& target); /** * @description: 保存视频记录 * @param {HistoryVideo&} historyVideo * @return {*} */ bool SaveVideoRecord(HistoryVideo& historyVideo); /** * @description: RestPlugin * @return {*} */ virtual bool RestPlugin(); private: std::shared_ptr monitor = nullptr; std::shared_ptr pool = nullptr; bool stop_ = false; }; } // namespace gsd #endif