123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- #ifndef __MONITORPLUGIN_HPP_
- #define __MONITORPLUGIN_HPP_
- #include <iostream>
- #include "UtilBase.hpp"
- #include "requests.hpp"
- #include "Monitor.hpp"
- #include "HttpClient.hpp"
- #include "TcpPlugin.hpp"
- #include "InfineFilter.hpp"
- #include "HttpPlugin.hpp"
- #include "PluginSubscriber.hpp"
- using namespace std;
- namespace gsd
- {
- class MonitorPlugin: public PluginSubscriber<MonitorPlugin>, public PluginBase
- {
- private:
- MonitorPlugin(): PluginBase(){
- }
- public:
- using Ptr = std::shared_ptr<MonitorPlugin>;
-
- ~MonitorPlugin(){}
-
-
- static std::shared_ptr<MonitorPlugin> getPtr();
-
-
- virtual bool Init();
-
-
- virtual bool StartTask();
-
-
- virtual void Destroy();
-
-
- virtual bool Alive();
-
-
- void MonitorProThrd();
-
-
- bool ConsumeData(FrameInferData::Ptr& result);
-
- bool SaveVideoRecord(HistoryVideo& historyVideo);
-
-
- virtual bool RestPlugin();
- private:
- std::shared_ptr<Monitor> monitor = nullptr;
- std::shared_ptr<ThreadPool> pool = nullptr;
- bool stop_ = false;
- };
- }
- #endif
|