8 using namespace suanzi;
10 class Callback : public EngineObserver
12 void onPersonsIn(const std::vector<Person>& p){
13 LOG_DEBUG(TAG, "onPersonsIn");
14 for (const auto& i : p){
15 LOG_DEBUG(TAG, "OnPersonIn " << i.toString());
19 void onPersonsOut(const std::vector<Person>& p) {
20 LOG_DEBUG(TAG, "onPersonsOut");
21 for (const auto& i : p){
22 LOG_DEBUG(TAG, "OnPersonOut " << i.toString());
27 int main(int argc, char* argv[])
29 initLogger("./config/log4cpp.properties");
30 LOG_DEBUG(TAG, "==================================");
31 EnginePtr e = Engine::create();
32 e->addObserver(new Callback());
33 //e->setVideoSrc(VideoSrcType::URL, "rtsp://192.168.1.75:554/stream1");
34 e->setVideoSrc(VideoSrcType::URL, "rtsp://192.168.56.101:5454/test.mp4");
37 log4cpp::Category::shutdown();