| | |
| | | List<ArdChannel> cameraChannelList = getIPChannelInfo(camera); |
| | | if (cameraChannelList.size() > 0) { |
| | | camera.setChannelList(cameraChannelList); |
| | | camera.setChanNum(cameraChannelList.size()); |
| | | for (ArdChannel channel : cameraChannelList) { |
| | | channel.setId(IdUtils.simpleUUID()); |
| | | ardChannelService.insertArdChannel(channel); |
| | | } |
| | | ardCamerasService.updateArdCameras(camera); |
| | | //添加到流媒体 |
| | | addVtdu(camera); |
| | | } |
| | | //创建引导队列 |
| | | if (!GuidePriorityQueue.cameraQueueMap.containsKey(camera.getId())) { |
| | | Comparator<GuideTask> comparator = GuidePriorityQueue.getComparator(); |
| | | PriorityBlockingQueue<GuideTask> priorityQueue = new PriorityBlockingQueue<>(1000, comparator); |
| | | GuidePriorityQueue.cameraQueueMap.put(camera.getId(), priorityQueue); |
| | | } |
| | | ardCamerasService.updateArdCameras(camera); |
| | | createGuideQueue(camera); |
| | | return AjaxResult.success("设备登录成功"); |
| | | } catch (Exception ex) { |
| | | log.error("设备登录异常", ex); |
| | |
| | | channel.setId(IdUtils.simpleUUID()); |
| | | ardChannelService.insertArdChannel(channel); |
| | | } |
| | | ardCamerasService.updateArdCameras(camera); |
| | | //添加到流媒体 |
| | | addVtdu(camera); |
| | | } |
| | | ardCamerasService.updateArdCameras(camera); |
| | | //添加到流媒体 |
| | | addVtdu(camera); |
| | | |
| | | //创建引导队列 |
| | | createGuideQueue(camera); |
| | | return AjaxResult.success("设备登录成功"); |