| | |
| | | faceSearchRpcClient(appPref.getStringData("faceSear.proxy"), appPref.getStringData("faceSear.ip"), |
| | | appPref.getIntData("faceSear.port"), "tcp"), |
| | | // faceSearchRpcClient("faceCmServer", "", 10004, "tcp") |
| | | m_sdkRule(rule) |
| | | m_sdkRule(rule), |
| | | m_rpcClient("RtspAnalysServer", "127.0.0.1",appPref.getIntData("RpcServerPort"),"tcp") |
| | | { |
| | | sharedMemory = new QSharedMemory(QString(shareMemoryName.c_str())); |
| | | if (!sharedMemory->create(4608 * 2592 * 4)) { |
| | |
| | | } |
| | | |
| | | void FaceExtractElement::timerFunc() { |
| | | INFO("MYH Run Here"); |
| | | std::vector<FaceToExtract> faceExtractQueueTmp; |
| | | { |
| | | std::lock_guard<std::mutex> lg(imageQueueMutex); |
| | | if (faceExtractQueue.empty())return; |
| | | if (faceExtractQueue.empty()) |
| | | { |
| | | ERR("faceExtractQueue.empty "); |
| | | return; |
| | | } |
| | | faceExtractQueueTmp.swap(faceExtractQueue); |
| | | faceExtractQueue.clear(); |
| | | } |
| | |
| | | // cv::imwrite(string1, image); |
| | | // } |
| | | if (feature.empty()) { |
| | | ERR("feature is empty"); |
| | | INFO("No Face Find: "<<getProperty("imgKey")); |
| | | continue; |
| | | } |
| | | features.clear(); |
| | |
| | | INFO("SaveImageKey To ES: "<<strImageKey); |
| | | t_json["imgKey"] = strImageKey; |
| | | |
| | | try { |
| | | auto server = m_rpcClient.getServer(); |
| | | if (!server) |
| | | { |
| | | ERR("server is null"); |
| | | //return; |
| | | } |
| | | INFO("Record Video "<<strImageKey); |
| | | server->recordVideo(strImageKey); |
| | | } |
| | | catch (std::exception &e) |
| | | { |
| | | ERR("Record Video Err: "<<strImageKey <<" Message: "<<e.what()); |
| | | //return; |
| | | } |
| | | auto faceSearchServer = faceSearchRpcClient.getServer(); |
| | | if (!faceSearchServer) { |
| | | ERR("faceSearchServer is null"); |