X-Git-Url: http://47.100.26.94:8080/?a=blobdiff_plain;f=main.cpp;h=f1b466bbc5cb7cdfb26e9f74e2dd7924b53801f2;hb=3ff9a5ad691b8dca9d91f8e9786a8d08d31b70fa;hp=e8999d7a04053978b1f87d7695ba743be2e401d4;hpb=b5342c4a4bbfb17346e7bffc5dae129290d184be;p=trackerpp.git diff --git a/main.cpp b/main.cpp index e8999d7..f1b466b 100644 --- a/main.cpp +++ b/main.cpp @@ -1,7 +1,7 @@ #include -#include "src/Engine.h" +#include "Engine.h" #include -#include "src/Logger.h" +#include "Logger.h" #define TAG "Main" @@ -10,29 +10,23 @@ using namespace suanzi; class Callback : public EngineObserver { void onPersonIn(Person& p){ -// std::cout << "onPersonIn " << p.toString() << std::endl; LOG_DEBUG(TAG, "OnPersonIn " << p.toString()) }; void onPersonOut(Person& p) { -// std::cout << "onPersonOut " << std::endl; LOG_DEBUG(TAG, "OnPersonIn " << p.toString()) }; }; - - int main(int argc, char* argv[]) { - InitLogger("log4cpp.properties"); + initLogger("./config/log4cpp.properties"); LOG_DEBUG(TAG, "=================================="); - - Engine* e = Engine::create(); + EnginePtr e = Engine::create(); e->addObserver(new Callback()); - e->setVideoSrc("xxxx"); + e->setVideoSrc(VideoSrcType::URL, "rtsp://192.168.1.75:554/stream1"); e->start(); - e->destroy(); log4cpp::Category::shutdown(); }