1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- #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"
- using namespace std;
- namespace gsd
- {
- class MonitorPlugin: public enable_shared_from_this<MonitorPlugin>, public PluginBase
- {
- private:
- MonitorPlugin(): PluginBase(){
- }
- public:
- using Ptr = std::shared_ptr<MonitorPlugin>;
-
- ~MonitorPlugin(){}
-
-
- static std::shared_ptr<MonitorPlugin> CreateNew();
-
-
- virtual bool Init();
-
-
- virtual bool StartTask();
-
-
- virtual void Destroy();
-
-
- virtual bool Alive();
-
-
- void MonitorProThrd();
-
-
- bool ConsumeData(FrameInferData::Ptr& result);
-
- bool SaveVideoRecord(HistoryVideo& historyVideo);
- private:
- std::shared_ptr<Monitor> monitor = nullptr;
- std::shared_ptr<ThreadPool> pool = nullptr;
- bool stop_ = false;
- };
- }
- #endif
|