X-Git-Url: http://47.100.26.94:8080/?a=blobdiff_plain;ds=sidebyside;f=main.cpp;h=577c3fc47b90784a8efda4f7f9fe2e823eb14be8;hb=70532232dd98f31467eff7baaaff6e68f803bb45;hp=c38b655388cf5e665b43deb8c9466847a72183f6;hpb=b3feccd1ee1186c37b39844dc566d39aedaa54ed;p=trackerpp.git diff --git a/main.cpp b/main.cpp index c38b655..577c3fc 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" @@ -9,28 +9,30 @@ using namespace suanzi; class Callback : public EngineObserver { - void onPersonIn(Person& p){ - LOG_DEBUG(TAG, "OnPersonIn " << p.toString()) - + void onPersonsIn(const std::vector& p){ + LOG_DEBUG(TAG, "onPersonsIn"); + for (const auto& i : p){ + LOG_DEBUG(TAG, "OnPersonIn " << i.toString()); + } }; - void onPersonOut(Person& p) { - LOG_DEBUG(TAG, "OnPersonIn " << p.toString()) + void onPersonsOut(const std::vector& p) { + LOG_DEBUG(TAG, "onPersonsOut"); + for (const auto& i : p){ + LOG_DEBUG(TAG, "OnPersonOut " << i.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(VideoSrcType::URL, "rtsp://192.168.1.75:554/stream1"); + //e->setVideoSrc(VideoSrcType::URL, "rtsp://192.168.1.75:554/stream1"); + e->setVideoSrc(VideoSrcType::URL, "rtsp://192.168.56.101:5454/test.mp4"); e->start(); - e->destroy(); log4cpp::Category::shutdown(); }