#ifndef __MAS_DETECTOR_H #define __MAS_DETECTOR_H #include "StreamDef.h" NAMESPACE_MAS_BEGIN typedef TZ_INT(CALLBACK * fDetCallback)(SPtr & streamInfo, void * ctx); class Detector { public: Detector(const std::string & key, const std::string & name) : m_inited(FALSE), m_useGPU(FALSE), m_detSample(1), m_detCount(0), m_roiThreshold(0.1), m_key(key), m_name(name) {} virtual ~Detector() {} public: virtual TZ_INT Initialize(const std::string & initParam) = 0; virtual TZ_INT Dispose() = 0; virtual TZ_INT TurnOnGPU() = 0; virtual TZ_INT TurnOffGPU() = 0; virtual TZ_INT DoDetect(SPtr & media, fDetCallback callback, void * ctx) = 0; virtual TZ_INT SetDetectCfg(const std::string & param) = 0; protected: TZ_BOOL m_inited; TZ_BOOL m_useGPU; TZ_INT m_detSample; TZ_INT m_detCount; TZ_DOUBLE m_roiThreshold; std::string m_key; std::string m_name; std::string m_cacheJson; std::vector m_focusArea; std::vector m_ignoreArea; DrawInfo m_cacheDraw; }; NAMESPACE_MAS_END #endif // __MAS_DETECTOR_H