#ifndef __ABANDOBJDETECTOR_H #define __ABANDOBJDETECTOR_H #include "Detector.h" #include "AbandObjApp.h" #include "AbandObjCfg.h" #include "Locks.h" #include "ExHeaders.h" #include #include NAMESPACE_MAS_BEGIN NAMESPACE_ABANDOBJ_BEGIN class AbandObjDetector : public Detector, public tzc::OSThread { public: AbandObjDetector(const std::string& key, const std::string& name); ~AbandObjDetector(); virtual TZ_INT Initialize(const std::string& initParam); virtual TZ_INT Dispose(); virtual TZ_INT TurnOnGPU(); virtual TZ_INT TurnOffGPU(); virtual TZ_INT DoDetect(SPtr& media, fDetCallback callback, void* ctx); virtual TZ_INT SetDetectCfg(const std::string& param); private: virtual void Entry(); void skipFrame(SPtr & media, fDetCallback callback, void * ctx); void draw(AbandObjDetectResult& AbandObjRst, DrawInfo& draw, TZ_INT height, TZ_INT width); AbandObjCfg m_cfgParam; AbandObjApp* m_abandObj; std::list, fDetCallback, void*>> m_waitList; tzc::Mutex m_cntLock; tzc::Mutex m_listLock; tzc::Mutex m_rstLock; tzc::Semaphore m_sema; const TZ_Uint32 MAX_WAIT_LIST_LEN = 5; const TZ_Uint32 ABANDOBJ_WAIT_MSECOND = 100; }; NAMESPACE_ABANDOBJ_END NAMESPACE_MAS_END #endif