派生自 development/c++

pansen
2019-03-07 979bc003bce710bf300bc2bd87a8278585678763
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#include <stdio.h>
#include <iostream>
#include <unistd.h>
#include <cstring>
#include "RtspAnalysManager.h"
#include <basic/debug/Debug.h>
#include <thread>
#include <Ice/Ice.h>
#include <basic/rpc/IceRpc.hpp>
//"192.168.1.4", 8000, "admin", "basic123"
 
using namespace std;
 
#include <basic/util/file/FileUtil.h>
#include <basic/util/app/AppPreference.hpp>
#include <basic/util/app/AppConfig.h>
#include <basic/util/app/AppConfig.h>
 
static void startManager(LDBTool *_dbTool) {
    RtspAnalysManager rtspAnalysManager(_dbTool);
    while (1) {
        sleep(1 * 60 * 60 * 12);
    }
}
 
 
 
int main(int argc, char **argv) {
    SAVE_APP_ARGS
    std::cout<<__DATE__<<" "<<__TIME__<<std::endl;
#ifdef GLOG
        ENABLEGLOG(GET_STR_CONFIG("logPath").c_str());
#endif
 
    appPref.setLongData("gpu.index", 0);
    appPref.setIntData("show.image", 0);
 
 
 
//    LDBTool _dbTool;
//    thread startRtspAnalys(startManager, &_dbTool);
//    startRtspAnalys.detach();
    appPref.setStringData("user.loop.absolute.path", appConfig.getStringProperty("cutPath"));
    IceRpcServer<RtspAnalysManager> server("RtspAnalysServer", 10009, "tcp");
    server.setMessageSizeMax(1024 * 1024 * 50);
    server.setPoolInitSize(1);
    server.setPoolMaxSize(1);
    server.runWaitShutDown();
    return 0;
 
}