| | |
| | | pManagerEsDB = new EsDBTool(appPref.getStringData("ipAdd"), appPref.getIntData("ipPort")); |
| | | } |
| | | |
| | | JudgmentRetrogradeTool::JudgmentRetrogradeTool(const SdkRule &rule, SaveVideoRpcClient_t &rpcClient):JudgmentRetrogradeTool(rule) |
| | | { |
| | | m_rpcClient = rpcClient; |
| | | } |
| | | |
| | | JudgmentRetrogradeTool::~JudgmentRetrogradeTool() { |
| | | if (pManagerEsDB) { |
| | | delete pManagerEsDB; |
| | |
| | | t_json["videoIp"] = getProperty("local_ip");//当前服务器IP地址 |
| | | t_json["ack_alarm"] = m_triggerElement.getTriggerState() ? "0" : ""; // que ren shi fou bao jing |
| | | t_json["cluster_id"] = appPref.getStringData("clusterID");; // ji qun id |
| | | t_json["imgKey"]=obj.properties["imgKey"]; |
| | | std::string imgKey = obj.properties["imgKey"]; |
| | | t_json["imgKey"]=imgKey; |
| | | INFO("SaveImageKey ToES: "<<obj.properties["imgKey"]); |
| | | try { |
| | | auto server = m_rpcClient.getServer(); |
| | | if (!server) |
| | | { |
| | | ERR("server is null"); |
| | | return false; |
| | | } |
| | | INFO("Record Video "<<imgKey); |
| | | server->recordVideo(imgKey); |
| | | } |
| | | catch (std::exception &e) |
| | | { |
| | | ERR("Record Video Err: "<<imgKey <<" Message: "<<e.what()); |
| | | return false; |
| | | } |
| | | |
| | | bool retface = false; |
| | | if (pManagerEsDB) |
| | | retface = pManagerEsDB->insertData("personaction", "perVideoAction", t_json.toStyledString(), str_uuid); |