#ifndef __MAS_DET_STREAMPIPE_H #define __MAS_DET_STREAMPIPE_H #include "DetectorLib.h" #include "MAS_Definition.h" #include "StreamDef.h" #include "Locks.h" NAMESPACE_MAS_BEGIN class DetStreamPipe : public IStreamPipe, public tzc::OSThread { public: DetStreamPipe(TZ_INT rscID, TZ_INT detId, TZ_INT intype, const ExcepInfo & einfo); virtual ~DetStreamPipe(); virtual TZ_INT Initialize(SPtr detLib, const std::string & initParam); virtual TZ_INT Dispose(); virtual void SuperIsInactive(){}; TZ_INT TurnOnGPU(); TZ_INT TurnOffGPU(); TZ_INT SetDetectCfg(const std::string& param); TZ_INT GetInputType() const; protected: virtual std::tuple streamArrived(SPtr & streamInfo) override; private: virtual void Entry(); static TZ_INT detCallback(SPtr & streamInfo, void * ctx); private: std::string m_detKey; TZ_INT m_iType; SPtr m_detLib; Detector * m_detector; std::list> m_cacheInfo; tzc::Mutex m_lock; tzc::Semaphore m_detSema; }; inline TZ_INT DetStreamPipe::GetInputType() const { return m_iType; } NAMESPACE_MAS_END #endif // __MAS_DET_STREAMPIPE_H