using namespace suanzi;
-const static std::string TAG = "Engine";
+static const std::string TAG = "Engine";
static std::mutex g_mutex;
static EngineWPtr g_instance;
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()