| | |
| | | item.second->SetVideoMinMaxSeconds(cut_min_duration, cut_max_duration); |
| | | } |
| | | } |
| | | } else if (itor_json.name() == "cam_edit" ) { |
| | | } else if (itor_json.name() == "cam_edit") { |
| | | string cam_idx = cfg_val["str_cam_dev_id"].asString(); |
| | | if (pthis->m_GB28181_Enable) { |
| | | if (pthis->m_controllers_videoCapElem.find(cam_idx) != |
| | |
| | | } |
| | | } else if (itor_json.name() == "cam_del") { |
| | | string cam_idx = cfg_val["str_cam_dev_id"].asString(); |
| | | pthis->removeCamera(cam_idx); |
| | | } else if (itor_json.name() == "cam_startPublish") { |
| | | string cam_idx = cfg_val["str_cam_dev_id"].asString(); |
| | | if (pthis->m_GB28181_Enable) { |
| | | pthis->removeCamera(cam_idx); |
| | | if (pthis->m_controllers_videoCapElem.find(cam_idx) != |
| | | pthis->m_controllers_videoCapElem.end()) { |
| | | INFO("cam add is " << cfg_val["str_addr"].asString()); |
| | | pthis->m_controllers_videoCapElem[cam_idx]->startPublishVideo(); |
| | | } |
| | | } else { |
| | | pthis->removeCamera(cam_idx); |
| | | if (pthis->m_controllers.find(cam_idx) != pthis->m_controllers.end()) { |
| | | INFO("cam add is " << cfg_val["str_addr"].asString()); |
| | | pthis->m_controllers[cam_idx]->startPublishVideo(); |
| | | } |
| | | } |
| | | } else if (itor_json.name() == "cam_stopPublish") { |
| | | string cam_idx = cfg_val["str_cam_dev_id"].asString(); |
| | | if (pthis->m_GB28181_Enable) { |
| | | if (pthis->m_controllers_videoCapElem.find(cam_idx) != |
| | | pthis->m_controllers_videoCapElem.end()) { |
| | | INFO("cam add is " << cfg_val["str_addr"].asString()); |
| | | pthis->m_controllers_videoCapElem[cam_idx]->stopPublishVideo(); |
| | | } |
| | | } else { |
| | | if (pthis->m_controllers.find(cam_idx) != pthis->m_controllers.end()) { |
| | | INFO("cam add is " << cfg_val["str_addr"].asString()); |
| | | pthis->m_controllers[cam_idx]->stopPublishVideo(); |
| | | } |
| | | } |
| | | } |
| | | } else { |