2 #include "src/Engine.h"
4 #include "src/Logger.h"
8 using namespace suanzi;
10 class Callback : public EngineObserver
12 void onPersonIn(Person& p){
13 // std::cout << "onPersonIn " << p.toString() << std::endl;
14 LOG_DEBUG(TAG, "OnPersonIn " << p.toString())
18 void onPersonOut(Person& p) {
19 // std::cout << "onPersonOut " << std::endl;
20 LOG_DEBUG(TAG, "OnPersonIn " << p.toString())
26 int main(int argc, char* argv[])
28 InitLogger("log4cpp.properties");
29 LOG_DEBUG(TAG, "==================================");
31 Engine* e = Engine::create();
32 e->addObserver(new Callback());
33 e->setVideoSrc("xxxx");
37 log4cpp::Category::shutdown();