| | |
| | | //#todo 使用策略模式?发送端多个指令累积后发送? |
| | | if (itor_json->isString() && reader.parse(itor_json->asString(), cfg_val)) { |
| | | if (itor_json.name() == "cam_edit" || itor_json.name() == "editSdkRule") { |
| | | string cam_idx = cfg_val["str_cam_dev_id"].asString(); |
| | | string cam_idx = ""; |
| | | if(itor_json.name() == "cam_edit"){ |
| | | if (pthis->m_GB28181_Enable){ |
| | | cam_idx = cfg_val["equipCode"].asString(); |
| | | }else{ |
| | | cam_idx = cfg_val["str_cam_dev_id"].asString(); |
| | | } |
| | | } else { |
| | | cam_idx = cfg_val["strCamId"].asString(); |
| | | } |
| | | |
| | | if (pthis->controllers.find(cam_idx) != pthis->controllers.end()) { |
| | | if (pthis->m_GB28181_Enable) { |
| | | auto lst = pthis->m_lDBTool->searchCamDevTableByType(1); |
| | |
| | | } |
| | | } |
| | | } else if (itor_json.name() == "cam_del") { |
| | | string cam_idx = cfg_val["str_cam_dev_id"].asString(); |
| | | // string cam_idx = cfg_val["str_cam_dev_id"].asString(); |
| | | string cam_idx = ""; |
| | | if(cfg_val["equipCode"].asString().size()){ |
| | | cam_idx = cfg_val["equipCode"].asString(); |
| | | }else if(cfg_val["str_cam_dev_id"].asString().size()){ |
| | | cam_idx = cfg_val["str_cam_dev_id"].asString(); |
| | | } |
| | | pthis->removeCamera(cam_idx); |
| | | } |
| | | } else { |