| | |
| | | //#include <sstream> |
| | | #include <algorithm> |
| | | AppPipeController::AppPipeController(int index, const Json::Value &json): |
| | | videoCaptureElement(json["rtsp"].asString(), 25,3000,appPref.getLongData("gpu.index")), |
| | | videoCaptureElement(json["rtsp"].asString(), 25,3000,appPref.getIntData("gpu.index")), |
| | | index(index), videoPublishElement(appPref.getStringData("publish.basepath")+".flv", |
| | | cv::Size(appPref.getIntData("pulish.width"),appPref.getIntData("pulish.height")), |
| | | "flv", 25, appPref.getLongData("gpu.index")) |
| | | "flv", 25, appPref.getIntData("gpu.index")) |
| | | { |
| | | if(appPref.getIntData("pulish.width") < 0 || appPref.getIntData("pulish.height") < 0) |
| | | { |
| | |
| | | // json["rtsp"] = "rtsp://admin:a1234567@192.168.1.201:554/h264/ch1/main/av_stream"; |
| | | // |
| | | // std::string publish_basepath = "rtmp://localhost:1934/live/cam" + std::to_string(554); |
| | | // appPref.setLongData("gpu.index", 0); |
| | | // appPref.setIntData("gpu.index", 0); |
| | | // appPref.setStringData("publish.basepath", publish_basepath); |
| | | // appPref.setIntData("pulish.width", 640); |
| | | // appPref.setIntData("pulish.height", 360); |
| | |
| | | // GetGateWay("enp1s0", gateway_addr); |
| | | // SetGateWay("enp1s0", (char *)gateway_addr, "192.168.1.1"); |
| | | |
| | | appPref.setLongData("gpu.index", 0);//gpu |
| | | appPref.setLongData("thread.max", 20);//sdk |
| | | appPref.setIntData("gpu.index", 0);//gpu |
| | | appPref.setIntData("thread.max", 20);//sdk |
| | | int port = appConfig.getIntProperty("webPort"); |
| | | devHttpServer_c _devHttpServer("0.0.0.0", port, 20);//webserver thread |
| | | |
| | |
| | | #include <THFaceProperty_i.h> |
| | | |
| | | FaceDetectServerI::FaceDetectServerI() { |
| | | long threadMax = appPref.getLongData("thread.max"); |
| | | long gpuIndex = appPref.getLongData("gpu.index"); |
| | | long threadMax = appPref.getIntData("thread.max"); |
| | | long gpuIndex = appPref.getIntData("gpu.index"); |
| | | for (int i = 0; i < threadMax; i++) { |
| | | detectResourcesManager.pushResource(i); |
| | | } |
| | |
| | | #include <THFeature_i.h> |
| | | |
| | | FaceExtractServerI::FaceExtractServerI() { |
| | | long threadMax = appPref.getLongData("thread.max"); |
| | | long gpuIndex = appPref.getLongData("gpu.index"); |
| | | long threadMax = appPref.getIntData("thread.max"); |
| | | long gpuIndex = appPref.getIntData("gpu.index"); |
| | | for (int i = 0; i < threadMax; i++) { |
| | | extractResourcesManager.pushResource(i); |
| | | } |
| | |
| | | int threadMax = atol(ich->getProperties()->getProperty("user.thread.max").c_str()); |
| | | #endif |
| | | ich->getProperties()->setProperty("Ice.ThreadPool.Server.SizeMax",to_string(threadMax)); |
| | | appPref.setLongData("gpu.index",atol(gpuIndex.c_str())); |
| | | appPref.setLongData("thread.max", threadMax); |
| | | appPref.setIntData("gpu.index",atol(gpuIndex.c_str())); |
| | | appPref.setIntData("thread.max", threadMax); |
| | | |
| | | auto adapter = ich->createObjectAdapter(adapterName); |
| | | adapter->add(new FaceDetectServerI(), Ice::stringToIdentity(identity)); |
| | |
| | | int threadMax = atol(ich->getProperties()->getProperty("user.thread.max").c_str()); |
| | | #endif |
| | | ich->getProperties()->setProperty("Ice.ThreadPool.Server.SizeMax", std::to_string(threadMax)); |
| | | appPref.setLongData("gpu.index", atol(gpuIndex.c_str())); |
| | | appPref.setLongData("thread.max", threadMax); |
| | | appPref.setIntData("gpu.index", atol(gpuIndex.c_str())); |
| | | appPref.setIntData("thread.max", threadMax); |
| | | |
| | | auto adapter = ich->createObjectAdapter(adapterName); |
| | | adapter->add(new FaceDetectServerI(), Ice::stringToIdentity(identity)); |
| | |
| | | ENABLEGLOG(GET_STR_CONFIG("logPath").c_str()); |
| | | auto ich = Ice::initialize(argc, argv); |
| | | |
| | | appPref.setLongData("gpu.index", 0); |
| | | appPref.setLongData("thread.max", 32); |
| | | if (argc < 4) { |
| | | assert("t_value.size()"); |
| | | } |
| | | appPref.setIntData("gpu.index", atoi(argv[1])); |
| | | appPref.setIntData("RpcFDPort", atoi(argv[2])); |
| | | appPref.setIntData("thread.max", atoi(argv[3]));//线程池大小 |
| | | |
| | | IceRpcServer<FaceDetectServerI> server("faceServer", 10002, "tcp"); |
| | | IceRpcServer<FaceDetectServerI> server("faceServer", appPref.getIntData("RpcFDPort"), "tcp"); |
| | | server.setMessageSizeMax(1024 * 1024 * 50); |
| | | server.setPoolInitSize(10); |
| | | server.setPoolMaxSize(32); |
| | | server.setPoolInitSize(appPref.getIntData("thread.max")); |
| | | server.setPoolMaxSize(appPref.getIntData("thread.max")); |
| | | server.runWaitShutDown(); |
| | | return 0; |
| | | } |
| | |
| | | int threadMax = atol(ich->getProperties()->getProperty("user.thread.max").c_str()); |
| | | #endif |
| | | ich->getProperties()->setProperty("Ice.ThreadPool.Server.SizeMax", std::to_string(threadMax)); |
| | | appPref.setLongData("gpu.index", atol(gpuIndex.c_str())); |
| | | appPref.setLongData("thread.max", threadMax); |
| | | appPref.setIntData("gpu.index", atol(gpuIndex.c_str())); |
| | | appPref.setIntData("thread.max", threadMax); |
| | | |
| | | auto adapter = ich->createObjectAdapter(adapterName); |
| | | adapter->add(new FaceExtractServerI(), Ice::stringToIdentity(identity)); |
| | |
| | | ENABLEGLOG(GET_STR_CONFIG("logPath").c_str()); |
| | | auto ich = Ice::initialize(argc, argv); |
| | | |
| | | appPref.setLongData("gpu.index", 0); |
| | | appPref.setLongData("thread.max", 32); |
| | | if (argc < 4) { |
| | | assert("t_value.size()"); |
| | | } |
| | | appPref.setIntData("gpu.index", atoi(argv[1])); |
| | | appPref.setIntData("RpcFEPort", atoi(argv[2])); |
| | | appPref.setIntData("thread.max", atoi(argv[3]));//线程池大小 |
| | | |
| | | IceRpcServer<FaceExtractServerI> server("faceExtractServer", 10008, "tcp"); |
| | | IceRpcServer<FaceExtractServerI> server("faceExtractServer", appPref.getIntData("RpcFEPort"), "tcp"); |
| | | server.setMessageSizeMax(1024 * 1024 * 50); |
| | | server.setPoolInitSize(10); |
| | | server.setPoolMaxSize(32); |
| | | server.setPoolInitSize(appPref.getIntData("thread.max")); |
| | | server.setPoolMaxSize(appPref.getIntData("thread.max")); |
| | | server.runWaitShutDown(); |
| | | return 0; |
| | | } |
| | |
| | | std::atomic_int CasiaFaceWrapperN::instanceCount(0); |
| | | |
| | | CasiaFaceWrapperN::CasiaFaceWrapperN() { |
| | | threadMax = appPref.getLongData("thread.max"); |
| | | // long gpuIndex = appPref.getLongData("gpu.index"); |
| | | threadMax = appPref.getIntData("thread.max"); |
| | | // long gpuIndex = appPref.getIntData("gpu.index"); |
| | | // for(int i = 0;i<threadMax;i++){ |
| | | // resourcesManager.pushResource(i); |
| | | // } |
| | |
| | | |
| | | |
| | | // return 0; |
| | | appPref.setLongData("thread.max", 1); |
| | | appPref.setIntData("thread.max", 1); |
| | | CasiaFaceWrapperN t_CasiaFaceWapper; |
| | | // string test1 = "http://192.168.1.65:8888/group1/M00/04/52/wKgBQVr5J-WAJ4lQAAAObkm3j38169.jpg"; |
| | | // string test2 = "http://192.168.1.65:8888/group1/M00/04/52/wKgBQVr5JGOAXmx9AAAK0Xp3QhA271.jpg"; |
| | |
| | | |
| | | DBG("\n\n\nstart\n\n"); |
| | | |
| | | appPref.setLongData("thread.max", 16); |
| | | //#todo |
| | | // appPref.setIntData("thread.max", 16); |
| | | |
| | | // appPref.setStringData("ipAdd", "192.168.1.185"); |
| | | // appPref.setIntData("ipPort", 9200); |
| | | if (argc < 3) { |
| | | assert("t_value.size()"); |
| | | } |
| | | appPref.setIntData("RpcFSPort", atoi(argv[1])); |
| | | appPref.setIntData("thread.max", atoi(argv[2]));//线程池大小 |
| | | |
| | | appPref.setStringData("ipAdd", appConfig.getStringProperty("ES_IP")); |
| | | appPref.setIntData("ipPort", appConfig.getIntProperty("ES_PORT")); |
| | | |
| | | IceRpcServer<FaceFeatureSearchServerI> server("faceCmServer", 10004, "tcp"); |
| | | IceRpcServer<FaceFeatureSearchServerI> server("faceCmServer", appPref.getIntData("RpcFSPort"), "tcp"); |
| | | server.setMessageSizeMax(1024 * 1024 * 50); |
| | | server.setPoolInitSize(10); |
| | | server.setPoolMaxSize(32); |
| | | server.setPoolInitSize(appPref.getIntData("thread.max")); |
| | | server.setPoolMaxSize(appPref.getIntData("thread.max")); |
| | | server.runWaitShutDown(); |
| | | } |
| | |
| | | |
| | | |
| | | AppPaController:: AppPaController(int index, const ControllerConfig& cfg ): |
| | | videoCaptureElement(cfg.camInfo.strRtsp, 25, 3000, appPref.getLongData("gpu.index"), true), |
| | | videoCaptureElement(cfg.camInfo.strRtsp, 25, 3000, appPref.getIntData("gpu.index"), true), |
| | | m_index(index), |
| | | fdfsClient(nullptr), |
| | | yoloRpcElement(to_string(index) + "yoloRpc"), |
| | |
| | | std::string src_path = "/home/basic/视频/test"; |
| | | |
| | | |
| | | appPref.setLongData("gpu.index", 0); |
| | | appPref.setIntData("gpu.index", 0); |
| | | appPref.setIntData("show.image", 1); |
| | | |
| | | //yolo server |
| | |
| | | #include <algorithm> |
| | | |
| | | RapidAppPipeController::RapidAppPipeController(int index, const Json::Value &json, const std::string &outPath) : |
| | | videoCaptureElement(json["rtsp"].asString(), outPath, 25, -1, 0),//appPref.getLongData("gpu.index") |
| | | videoCaptureElement(json["rtsp"].asString(), outPath, 25, -1, 0),//appPref.getIntData("gpu.index") |
| | | index(index), bUp(false), m_json(json), |
| | | /*yoloRpcElement(to_string(index)+"yoloRpc"),*/triggerElement(0, 3) { |
| | | videoCaptureElement.registerConnector([&] { |
| | |
| | | |
| | | #include <basic/pipe_element/ffmpeg/basic_struct_for_video_image.h> |
| | | //AppPipeController::AppPipeController(std::string folderPath, const Json::Value &json) : |
| | | // videoCaptureElement("filePath", 25, -1, appPref.getLongData("gpu.index")), m_index(0), |
| | | // videoCaptureElement("filePath", 25, -1, appPref.getIntData("gpu.index")), m_index(0), |
| | | // m_folderPath(folderPath), |
| | | // m_json(json), fdfsClient(nullptr), yoloRpcElement(folderPath + "yoloRpc"), faceRpcElement(folderPath + "faceRpc"), |
| | | // faceExtractElement(folderPath + "faceExtract"), triggerElement(25, 10), |
| | |
| | | |
| | | //} |
| | | AppPipeController::AppPipeController(std::string folderPath, const SdkRuleMap &ruleMap) : |
| | | m_rpcClient("RtspAnalysServer", "127.0.0.1",appPref.getIntData("RpcServerPort"),"tcp"), |
| | | videoCaptureElement("filePath", 25, -1, appPref.getLongData("gpu.index")), |
| | | m_rpcClient("RtspAnalysServer", "127.0.0.1",appPref.getIntData("RpcVTIMPort"),"tcp"), |
| | | videoCaptureElement("filePath", 25, -1, appPref.getIntData("gpu.index")), |
| | | // videoCaptureElement(40), |
| | | m_index(0), |
| | | m_folderPath(folderPath), |
| | |
| | | |
| | | } |
| | | //AppPipeController::AppPipeController(int index, const Json::Value &json, bool RecordVideoEnable) : |
| | | // videoCaptureElement(json["rtsp"].asString(), 25, 3000, appPref.getLongData("gpu.index"), RecordVideoEnable), |
| | | // videoCaptureElement(json["rtsp"].asString(), 25, 3000, appPref.getIntData("gpu.index"), RecordVideoEnable), |
| | | // m_index(index), fdfsClient(nullptr), yoloRpcElement(to_string(index) + "yoloRpc"), |
| | | // faceRpcElement(to_string(index) + "faceRpc"), m_json(json), faceExtractElement(to_string(index) + "faceExtract"), |
| | | // triggerElement(25, 4), recordVideoElement(index, json["rtsp"].asString()), bRecordVideoEnable(RecordVideoEnable) { |
| | |
| | | |
| | | |
| | | //AppPipeController::AppPipeController(std::string camId, const Json::Value &json, bool RecordVideoEnable) : |
| | | // videoCaptureElement(json["rtsp"].asString(), 25, 3000, appPref.getLongData("gpu.index")), |
| | | // videoCaptureElement(json["rtsp"].asString(), 25, 3000, appPref.getIntData("gpu.index")), |
| | | // m_index(0), |
| | | // m_camId(camId), |
| | | // fdfsClient(nullptr), |
| | |
| | | // intKeepRight(); |
| | | //} |
| | | AppPipeController::AppPipeController(std::string camId, const SdkRuleMap &ruleMap, bool RecordVideoEnable) : |
| | | m_rpcClient("RtspAnalysServer", "127.0.0.1",appPref.getIntData("RpcServerPort"),"tcp"), |
| | | videoCaptureElement(appPref.getStringData(camId + "rtsp"), 25, 3000, appPref.getLongData("gpu.index")), |
| | | m_rpcClient("RtspAnalysServer", "127.0.0.1",appPref.getIntData("RpcVTIMPort"),"tcp"), |
| | | videoCaptureElement(appPref.getStringData(camId + "rtsp"), 25, 3000, appPref.getIntData("gpu.index")), |
| | | // videoCaptureElement(40), |
| | | m_index(0), |
| | | m_camId(camId), |
| | |
| | | |
| | | // pManagerEsDB.faceResInsert("facedb","6666666","{\"test222\":\"sdfasdf\"}"); |
| | | |
| | | appPref.setLongData("gpu.index", 0); |
| | | appPref.setIntData("gpu.index", 0); |
| | | appPref.setIntData("show.image", 1); |
| | | |
| | | //yolo server |
| | |
| | | appPref.getIntData("faceSear.port"), "tcp"), |
| | | // faceSearchRpcClient("faceCmServer", "", 10004, "tcp") |
| | | m_sdkRule(rule), |
| | | m_rpcClient("RtspAnalysServer", "127.0.0.1", appPref.getIntData("RpcServerPort"), "tcp") { |
| | | m_rpcClient("RtspAnalysServer", "127.0.0.1", appPref.getIntData("RpcVTIMPort"), "tcp") { |
| | | sharedMemory = new QSharedMemory(QString(shareMemoryName.c_str())); |
| | | if (!sharedMemory->create(4608 * 2592 * 4)) { |
| | | sharedMemory->attach(); |
| | |
| | | m_bSetWH(false), |
| | | pointArray(nullptr), |
| | | npts(0), |
| | | m_rpcClient("RtspAnalysServer", "127.0.0.1",appPref.getIntData("RpcServerPort"),"tcp") |
| | | m_rpcClient("RtspAnalysServer", "127.0.0.1",appPref.getIntData("RpcVTIMPort"),"tcp") |
| | | { |
| | | pManagerEsDB = new EsDBTool(appPref.getStringData("ipAdd"), appPref.getIntData("ipPort")); |
| | | } |
| | |
| | | |
| | | class JudgmentRetrogradeTool : public basic::PipeElement{ |
| | | public: |
| | | JudgmentRetrogradeTool():m_rpcClient("RtspAnalysServer", "127.0.0.1",appPref.getIntData("RpcServerPort"),"tcp") {} |
| | | JudgmentRetrogradeTool():m_rpcClient("RtspAnalysServer", "127.0.0.1",appPref.getIntData("RpcVTIMPort"),"tcp") {} |
| | | |
| | | JudgmentRetrogradeTool(const SdkRule &rule); |
| | | //JudgmentRetrogradeTool(const SdkRule &rule,SaveVideoRpcClient_t& rpcClient); |
| | |
| | | m_bIsMask(true), |
| | | m_bSetWH(false), |
| | | pointArray(nullptr), |
| | | m_rpcClient("RtspAnalysServer", "127.0.0.1",appPref.getIntData("RpcServerPort"),"tcp") |
| | | m_rpcClient("RtspAnalysServer", "127.0.0.1",appPref.getIntData("RpcVTIMPort"),"tcp") |
| | | { |
| | | |
| | | pManagerEsDB = new EsDBTool(appPref.getStringData("ipAdd"), appPref.getIntData("ipPort")); |
| | |
| | | class PerimeterElement : public basic::PipeElement |
| | | { |
| | | public: |
| | | PerimeterElement():m_rpcClient("RtspAnalysServer", "127.0.0.1",appPref.getIntData("RpcServerPort"),"tcp"){} |
| | | PerimeterElement():m_rpcClient("RtspAnalysServer", "127.0.0.1",appPref.getIntData("RpcVTIMPort"),"tcp"){} |
| | | PerimeterElement(const SdkRule& rule); |
| | | public: |
| | | ~PerimeterElement(); |
| | |
| | | std::string src_path = "/home/basic/视频/test"; |
| | | |
| | | |
| | | appPref.setLongData("gpu.index", 0); |
| | | appPref.setIntData("gpu.index", 0); |
| | | appPref.setIntData("show.image", 0); |
| | | |
| | | //yolo server |
| | |
| | | set(CMAKE_BUILD_TYPE debug) |
| | | add_compile_options(-fPIC) |
| | | add_definitions(-DGLOG) |
| | | add_definitions(-DGB28181) |
| | | #add_definitions(-DGB28181) |
| | | add_definitions(-DDEBUG_ERR -DDEBUG_INFO -fpermissive) |
| | | SET(SOURCES |
| | | |
| | |
| | | |
| | | } else { |
| | | |
| | | auto lst = m_lDBTool->searchCamDevTableAll(); |
| | | auto lst = m_lDBTool->searchCamDevTableByType(0); |
| | | |
| | | appPref.setIntData("n_cut_max_duration", lst_dev.n_cut_max_duration); |
| | | appPref.setIntData("n_cut_min_duration", lst_dev.n_cut_min_duration); |
| | | if (lst.size() > 0) { |
| | | Json::Value json; |
| | | int startCamNO = appPref.getIntData("CamStart") * appPref.getIntData("CamStep"); |
| | | int CamCount = appPref.getIntData("CamStep"); |
| | | int startCamNO = appPref.getIntData("CamStartNO"); |
| | | int CamCount = appPref.getIntData("CamEndNO") - appPref.getIntData("CamStartNO") + 1; |
| | | auto itor = lst.begin(); |
| | | |
| | | if (startCamNO >= lst.size()) { |
| | |
| | | DBG("hava GB28181"); |
| | | #endif |
| | | |
| | | if (argc < 4) { |
| | | if (argc < 10) { |
| | | assert("t_value.size()"); |
| | | } |
| | | |
| | | int arg1 = atoi(argv[1]); |
| | | |
| | | int gindx = abs(arg1) % 2; |
| | | int GB28181_Enable = arg1 < 0 ? 1 : -1; |
| | | DBG(gindx); |
| | | appPref.setIntData("GB28181_Enable", GB28181_Enable); |
| | | |
| | | appPref.setLongData("gpu.index", gindx); |
| | | appPref.setIntData("show.image", 0); |
| | | |
| | | //todo |
| | | appPref.setIntData("CamStart", atoi(argv[1])); |
| | | appPref.setIntData("CamStep", atoi(argv[2])); |
| | | appPref.setIntData("RpcServerPort", atoi(argv[3])); |
| | | appPref.setIntData("GB28181_Enable", atoi(argv[1])); |
| | | appPref.setIntData("gpu.index", atoi(argv[2])); |
| | | appPref.setIntData("CamStartNO", atoi(argv[3])); |
| | | appPref.setIntData("CamEndNO", atoi(argv[4])); |
| | | appPref.setIntData("RpcYOLOPort", atoi(argv[5])); |
| | | appPref.setIntData("RpcFDPort", atoi(argv[6])); |
| | | appPref.setIntData("RpcFEPort", atoi(argv[7])); |
| | | appPref.setIntData("RpcFSPort", atoi(argv[8])); |
| | | appPref.setIntData("RpcVTIMPort", atoi(argv[9]));//触发录像 |
| | | |
| | | appPref.setIntData("show.image", 0); |
| | | |
| | | //#todo get from config File |
| | | // appPref.setStringData("ipAdd", "192.168.1.185"); |
| | |
| | | appPref.setStringData("yolo.proxy", "yoloServer"); |
| | | //#todo |
| | | appPref.setStringData("yolo.ip", ""); |
| | | appPref.setIntData("yolo.port", 10003); |
| | | appPref.setIntData("yolo.port", appPref.getIntData("RpcYOLOPort")); |
| | | // rpcClient(appPref.getStringData("yolo.proxy"), appPref.getStringData("yolo.ip"), appPref.getLongData("yolo.port"),"tcp"), |
| | | |
| | | |
| | |
| | | appPref.setStringData("faceDete.proxy", "faceServer"); |
| | | //#todo |
| | | appPref.setStringData("faceDete.ip", ""); |
| | | appPref.setIntData("faceDete.port", 10002); |
| | | appPref.setIntData("faceDete.port", appPref.getIntData("RpcFDPort")); |
| | | //rpcClient(appPref.getStringData("faceDete.proxy"), appPref.getStringData("faceDete.ip"), appPref.getLongData("faceDete.port"),"tcp"), |
| | | // rpcClient("faceServer","",10002,"tcp"), |
| | | |
| | |
| | | appPref.setStringData("faceExte.proxy", "faceExtractServer"); |
| | | //#todo |
| | | appPref.setStringData("faceExte.ip", ""); |
| | | appPref.setIntData("faceExte.port", 10008); |
| | | appPref.setIntData("faceExte.port", appPref.getIntData("RpcFEPort")); |
| | | //rpcClient(appPref.getStringData("faceExte.proxy"), appPref.getStringData("faceExte.ip"), appPref.getLongData("faceExte.port"),"tcp"), |
| | | // "faceExtractServer", "", 10008, "tcp"),//人脸特征提取 修改成点对点通讯 |
| | | |
| | |
| | | //face search server |
| | | appPref.setStringData("faceSear.proxy", "faceCmServer"); |
| | | appPref.setStringData("faceSear.ip", ""); |
| | | appPref.setIntData("faceSear.port", 10004); |
| | | appPref.setIntData("faceSear.port", appPref.getIntData("RpcFSPort")); |
| | | //rpcClient(appPref.getStringData("faceSear.proxy"), appPref.getStringData("faceSear.ip"), appPref.getLongData("faceSear.port"),"tcp"), |
| | | // faceSearchRpcClient("faceCmServer", "", 10004, "tcp") |
| | | |
| | |
| | | ENABLEGLOG(GET_STR_CONFIG("logPath").c_str()); |
| | | #endif |
| | | |
| | | appPref.setLongData("gpu.index", 0); |
| | | appPref.setIntData("gpu.index", 0); |
| | | appPref.setIntData("show.image", 0); |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | } else { |
| | | auto lst = m_lDBTool->searchCamDevTableAll(); |
| | | auto lst = m_lDBTool->searchCamDevTableByType(0); |
| | | Record_Config lst_dev = m_lDBTool->searchConfigTableWithinServerInfo(); |
| | | |
| | | //设置视频的最长和最短时间间隔 |
| | | appPref.setIntData("n_cut_max_duration", lst_dev.n_cut_max_duration); |
| | | appPref.setIntData("n_cut_min_duration", lst_dev.n_cut_min_duration); |
| | | if (lst.size() > 0) { |
| | | int startCamNO = appPref.getIntData("CamStart") * appPref.getIntData("CamStep"); |
| | | int CamCount = appPref.getIntData("CamStep"); |
| | | INFO("StartCamNO: " << startCamNO << " CamStep: " << CamCount); |
| | | int startCamNO = appPref.getIntData("CamStartNO"); |
| | | int CamCount = appPref.getIntData("CamEndNO") - appPref.getIntData("CamStartNO") + 1; |
| | | INFO("StartCamNO: " << startCamNO << " CamCount: " << CamCount); |
| | | auto itor = lst.begin(); |
| | | |
| | | if (startCamNO >= lst.size()) { |
| | |
| | | ENABLEGLOG(GET_STR_CONFIG("logPath").c_str()); |
| | | #endif |
| | | |
| | | if (argc < 4) { |
| | | if (argc < 6) { |
| | | assert("t_value.size()"); |
| | | } |
| | | { |
| | |
| | | appPref.setIntData("pulish.width", 640); |
| | | appPref.setIntData("pulish.height", 360); |
| | | } |
| | | int arg1 = atoi(argv[1]); |
| | | // int arg1 = atoi(argv[1]); |
| | | // |
| | | // int gindx = abs(arg1) % 2; |
| | | // int GB28181_Enable = arg1 < 0 ? 1 : 0; |
| | | // |
| | | // DBG(gindx); |
| | | // appPref.setIntData("GB28181_Enable", GB28181_Enable); |
| | | // appPref.setIntData("gpu.index", gindx); |
| | | // |
| | | // |
| | | // //todo |
| | | // appPref.setIntData("CamStart", arg1); |
| | | // appPref.setIntData("CamStep", atoi(argv[2])); |
| | | // appPref.setIntData("RpcVTIMPort", atoi(argv[3])); |
| | | |
| | | int gindx = abs(arg1) % 2; |
| | | int GB28181_Enable = arg1 < 0 ? 1 : 0; |
| | | appPref.setIntData("GB28181_Enable", atoi(argv[1])); |
| | | appPref.setIntData("gpu.index", atoi(argv[2])); |
| | | appPref.setIntData("CamStartNO", atoi(argv[3])); |
| | | appPref.setIntData("CamEndNO", atoi(argv[4])); |
| | | appPref.setIntData("RpcVTIMPort", atoi(argv[5]));//触发录像 |
| | | |
| | | DBG(gindx); |
| | | appPref.setIntData("GB28181_Enable", GB28181_Enable); |
| | | appPref.setLongData("gpu.index", gindx); |
| | | appPref.setIntData("show.image", 0); |
| | | |
| | | //todo |
| | | appPref.setIntData("CamStart", arg1); |
| | | appPref.setIntData("CamStep", atoi(argv[2])); |
| | | appPref.setIntData("RpcServerPort", atoi(argv[3])); |
| | | int GB28181_Enable = appPref.getIntData("GB28181_Enable"); |
| | | if (GB28181_Enable) { |
| | | //#todo search from db |
| | | MysqlDBServerCfg mysqlDBServerCfg; |
| | |
| | | DBG("test start"); |
| | | |
| | | appPref.setStringData("user.loop.absolute.path", appConfig.getStringProperty("cutPath")); |
| | | IceRpcServer<RtspAnalysManager> server("RtspAnalysServer", appPref.getIntData("RpcServerPort"), "tcp"); |
| | | IceRpcServer<RtspAnalysManager> server("RtspAnalysServer", appPref.getIntData("RpcVTIMPort"), "tcp"); |
| | | server.setMessageSizeMax(1024 * 1024 * 50); |
| | | server.setPoolInitSize(1); |
| | | server.setPoolMaxSize(1); |
| | |
| | | |
| | | string path = appConfig.getStringProperty("srsAddr") + "cam" + chanPubID + ".flv"; |
| | | cv::Size size_(appPref.getIntData("pulish.width"), appPref.getIntData("pulish.height")); |
| | | int gupIdx = appPref.getLongData("gpu.index"); |
| | | int gupIdx = appPref.getIntData("gpu.index"); |
| | | videoPublishElement = new ffmpeg::VideoPublishElement(path, size_, "flv", 25, gupIdx); |
| | | if (appPref.getIntData("pulish.width") < 0 || appPref.getIntData("pulish.height") < 0) { |
| | | ERR("pulish.width: " << appPref.getIntData("pulish.width") << " Height: " |
| | |
| | | // return -1; |
| | | // } |
| | | |
| | | int gpuindex = 0; |
| | | int poolNum = 1; |
| | | int portNum = 10003; |
| | | // int gpuindex = 0; |
| | | // int poolNum = 1; |
| | | // int portNum = 10003; |
| | | // |
| | | // appPref.setIntData("gpu.index", gpuindex); |
| | | // appPref.setFloatData("thresh.detect", 0.85); |
| | | // appPref.setIntData("poolNum", poolNum); |
| | | |
| | | appPref.setIntData("gpu.index", gpuindex); |
| | | appPref.setFloatData("thresh.detect", 0.85); |
| | | appPref.setIntData("poolNum", poolNum); |
| | | if (argc < 4) { |
| | | assert("t_value.size()"); |
| | | } |
| | | appPref.setIntData("gpu.index", atoi(argv[1])); |
| | | appPref.setIntData("RpcYOLOPort", atoi(argv[2])); |
| | | appPref.setFloatData("thresh.detect", atof(argv[3])); |
| | | |
| | | IceRpcServer<YoloDetectServerI> server("yoloServer", portNum, "tcp"); |
| | | // appPref.setIntData("poolNum", 1);//YOlO不能多线程,容易崩溃 |
| | | |
| | | |
| | | IceRpcServer<YoloDetectServerI> server("yoloServer", appPref.getIntData("RpcYOLOPort"), "tcp"); |
| | | server.setMessageSizeMax(1024 * 1024 * 50); |
| | | server.setPoolInitSize(1); |
| | | server.setPoolMaxSize(1); |
| | | server.setPoolInitSize(1);//YOlO不能多线程,容易崩溃 |
| | | server.setPoolMaxSize(1);//YOlO不能多线程,容易崩溃 |
| | | server.runWaitShutDown(); |
| | | return 0; |
| | | } |