X-Git-Url: http://47.100.26.94:8080/?a=blobdiff_plain;f=src%2FEngine.cpp;h=78af76113be723e8e33d08d960f466de7f2e4655;hb=3ff9a5ad691b8dca9d91f8e9786a8d08d31b70fa;hp=6d44f3c355c413517d00d8065fdd2d1eb705cfba;hpb=48adce31a0ffdb3757ee1be8a63ce7e769e87deb;p=trackerpp.git diff --git a/src/Engine.cpp b/src/Engine.cpp index 6d44f3c..78af761 100644 --- a/src/Engine.cpp +++ b/src/Engine.cpp @@ -6,7 +6,7 @@ using namespace suanzi; -const static std::string TAG = "Engine"; +static const std::string TAG = "Engine"; static std::mutex g_mutex; static EngineWPtr g_instance; @@ -34,22 +34,22 @@ Engine::Engine() Engine::~Engine() { + destroy(); } void Engine::destroy() { + LOG_DEBUG(TAG, "destroy"); + detector.reset(); + multiTracker.reset(); + reader.reset(); + observer_list.clear(); } void Engine::setVideoSrc(VideoSrcType type, const std::string& url) { - PredictorWrapperPtr pp = PredictorWrapper::create("./python/model.pkl"); - - pp->dump(); - -// videoSrc = url; - //reader = VideoReaderFactory::createVideoReader(type, url); - + reader = VideoReaderFactory::createVideoReader(type, url); } void Engine::run()