//清空相机表数据. vector<cEquip_camera*>::iterator iter = vec_equip_camera.begin(); for (; iter != vec_equip_camera.end();) { delete *iter; iter = vec_equip_camera.erase(iter); } for (auto it = vec_files.begin(); it != vec_files.end();it++) { Mat im = imread(*it); if (im.data != NULL) { vec_files_new.push_back(*it); } } for (auto iter : vec_equip_camera) { if ((iter->ID == devId) || (iter->IP == pRegisterMsg->m_DeviceIp && iter->PORT == pRegisterMsg->m_Port)) { std::string logStr = "[CameraAdd] Failed!!! the camera ID exist!!! ID:" + std::to_string(devId) + " "; TRACE_LOG(LOG_INFO, logStr.data()); std::string log = "增加设备失败.设备已存摄像机名" + devName; logToPlatform(Module_Type_RealTime_CapServer, log); delete pData; delete pHeader; return; } }