#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;
|
|
}
|