Init commit
[trackerpp.git] / main.cpp
1 #include<iostream>
2 #include "src/Engine.h"
3 #include <string>
4 #include "src/Logger.h"
5
6 #define TAG "Main"
7
8 using namespace suanzi;
9
10 class Callback : public EngineObserver
11 {
12     void onPersonIn(Person& p){
13 //        std::cout << "onPersonIn "  << p.toString() << std::endl;
14         LOG_DEBUG(TAG, "OnPersonIn " << p.toString())
15
16     };
17
18     void onPersonOut(Person& p) {
19 //        std::cout << "onPersonOut " << std::endl;
20         LOG_DEBUG(TAG, "OnPersonIn " << p.toString())
21     };
22 };
23
24
25
26 int main(int argc, char* argv[])
27 {
28     InitLogger("log4cpp.properties");
29     LOG_DEBUG(TAG, "==================================");
30
31     Engine* e = Engine::create();
32     e->addObserver(new Callback());
33     e->setVideoSrc("xxxx");
34     e->start();
35
36     e->destroy();
37     log4cpp::Category::shutdown();
38 }