| | |
| | | |
| | | //} |
| | | 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")), |
| | | // videoCaptureElement(40), |
| | | m_index(0), |
| | |
| | | faceRpcElement(folderPath + "faceRpc", ruleMap[FaceSdk]), |
| | | faceExtractElement(folderPath + "faceExtract", ruleMap[FaceSdk]), |
| | | triggerElement(25, 10), |
| | | recordVideoElement(-1, ""), |
| | | // recordVideoElement(-1, ""), |
| | | bRecordVideoEnable(false), |
| | | rpcClient("RtspAnalysServer", "127.0.0.1",10009,"tcp"), |
| | | |
| | | m_bSetWH(false) |
| | | { |
| | | |
| | |
| | | // 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")), |
| | | // videoCaptureElement(40), |
| | | m_index(0), |
| | |
| | | faceRpcElement(camId + "faceRpc", ruleMap[FaceSdk]), |
| | | faceExtractElement(camId + "faceExtract", ruleMap[FaceSdk]), |
| | | triggerElement(25, 4), |
| | | recordVideoElement(camId, appPref.getStringData(camId + "rtsp")), |
| | | newRecordVideoElement(camId), |
| | | // recordVideoElement(camId, appPref.getStringData(camId + "rtsp")), |
| | | // newRecordVideoElement(camId), |
| | | perimeterElement(ruleMap[PerimeterSdk]), |
| | | crowdElement(ruleMap[CrowdSdk]), |
| | | perStaticElement(ruleMap[PerStaticSdk]), |
| | |
| | | rightJudgment(ruleMap[KeepRightSdk]), |
| | | bRecordVideoEnable(RecordVideoEnable), |
| | | m_sdkRuleMap(ruleMap), |
| | | rpcClient("RtspAnalysServer", "127.0.0.1",10009,"tcp"), |
| | | m_bSetWH(false) |
| | | |
| | | { |
| | |
| | | |
| | | |
| | | void AppPipeController::RecordVideo() { |
| | | std::string imgKeyYolo = yoloRpcElement.getProperty("imgKey"); |
| | | /*std::string imgKeyYolo = yoloRpcElement.getProperty("imgKey"); |
| | | |
| | | std::string imgKeyFace = faceRpcElement.getProperty("imgKey"); |
| | | if(faceRpcElement.getTriggerState() || |
| | |
| | | "crowdElement: "<<crowdElement.getTriggerState()<<" "<< |
| | | "perHubElement: "<<perHubElement.getTriggerState()<<" "<< |
| | | "perStaticElement: "<<perStaticElement.getTriggerState()); |
| | | } |
| | | }*/ |
| | | } |
| | | void AppPipeController::init() { |
| | | |
| | |
| | | imageDrawElement.submit(); |
| | | } |
| | | //this->RecordVideo(); |
| | | if(faceRpcElement.getTriggerState() || |
| | | /*if(faceRpcElement.getTriggerState() || |
| | | personElement.getTriggerState() || |
| | | leftJudgment.getTriggerState() || |
| | | rightJudgment.getTriggerState() || |
| | |
| | | "crowdElement: "<<crowdElement.getTriggerState()<<" "<< |
| | | "perHubElement: "<<perHubElement.getTriggerState()<<" "<< |
| | | "perStaticElement: "<<perStaticElement.getTriggerState()); |
| | | } |
| | | }*/ |
| | | } |
| | | }); |
| | | |
| | |
| | | } |
| | | |
| | | // registerElement(newRecordVideoElement); |
| | | videoCaptureElement.setOutPutInterval(3); |
| | | //videoCaptureElement.setOutPutInterval(3); |
| | | faceExtractElement.setProperty("index", to_string(m_index)); |
| | | registerElement(yoloRpcElement); |
| | | //#todo setProperty |