X-Git-Url: http://47.100.26.94:8080/?a=blobdiff_plain;f=src%2FEngine.cpp;fp=src%2FEngine.cpp;h=1b7cca2d3baeae39b20ca7b6167e611fdfbad80c;hb=70532232dd98f31467eff7baaaff6e68f803bb45;hp=16a704dd19eb10a5767272c535e8ac6d5533af70;hpb=be96459d3e098508417f07ed0e1952b6e05215c4;p=trackerpp.git diff --git a/src/Engine.cpp b/src/Engine.cpp index 16a704d..1b7cca2 100644 --- a/src/Engine.cpp +++ b/src/Engine.cpp @@ -14,14 +14,13 @@ static EngineWPtr g_instance; typedef std::shared_ptr> PersonsInfoPtr; -// class Engine EnginePtr Engine::create() { LOG_DEBUG(TAG, "create"); std::lock_guard lock(g_mutex); if (g_instance.lock()){ LOG_ERROR(TAG, "already exists"); - return EnginePtr(); // nullptr + return EnginePtr(); } EnginePtr instance (new Engine()); g_instance = instance; @@ -47,7 +46,6 @@ void Engine::destroy() observer_list.clear(); } - void Engine::setVideoSrc(VideoSrcType type, const std::string& url) { reader = VideoReaderFactory::createVideoReader(type, url); @@ -79,6 +77,7 @@ void Engine::start() void Engine::addObserver(EngineObserver *observer) { + LOG_DEBUG(TAG, "addObserver"); observer_list.insert(observer); } @@ -118,12 +117,14 @@ private: void Engine::onPersonsOut(const std::vector& p) { + LOG_DEBUG(TAG, "onPersonOut"); PersonsInfoPtr pp = std::make_shared>(p); eventThread.enqueue(new PersonOutEventWorkItem(this->observer_list, pp)); } void Engine::onPersonsIn(const std::vector& p) { + LOG_DEBUG(TAG, "onPersonIn"); PersonsInfoPtr pp = std::make_shared>(p); eventThread.enqueue(new PersonInEventWorkItem(this->observer_list, pp)); }