From 782e8b98004945c49a37421cf9ea3da11d683c37 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期五, 19 一月 2024 15:43:08 +0800 Subject: [PATCH] 修复sendRtpItem写入不及时导致的发流失败 --- src/main/java/com/genersoft/iot/vmp/service/impl/GbStreamServiceImpl.java | 21 +++++++++------------ 1 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/GbStreamServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/GbStreamServiceImpl.java index 26b4f3e..49e4a3c 100755 --- a/src/main/java/com/genersoft/iot/vmp/service/impl/GbStreamServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/service/impl/GbStreamServiceImpl.java @@ -77,8 +77,6 @@ } try { List<DeviceChannel> deviceChannelList = new ArrayList<>(); - - for (int i = 0; i < gbStreams.size(); i++) { GbStream gbStream = gbStreams.get(i); gbStream.setCatalogId(catalogId); @@ -251,18 +249,17 @@ return ; } if (ObjectUtils.isEmpty(catalogId)) { - catalogId = platform.getDeviceGBId(); + catalogId = null; } - if (platformGbStreamMapper.delByPlatformAndCatalogId(platformId, catalogId) > 0) { - List<GbStream> gbStreams = platformGbStreamMapper.queryChannelInParentPlatformAndCatalog(platformId, catalogId); - List<DeviceChannel> deviceChannelList = new ArrayList<>(); - for (GbStream gbStream : gbStreams) { - DeviceChannel deviceChannel = new DeviceChannel(); - deviceChannel.setChannelId(gbStream.getGbId()); - deviceChannelList.add(deviceChannel); - } - eventPublisher.catalogEventPublish(platformId, deviceChannelList, CatalogEvent.DEL); + List<GbStream> gbStreams = platformGbStreamMapper.queryChannelInParentPlatformAndCatalog(platformId, catalogId); + List<DeviceChannel> deviceChannelList = new ArrayList<>(); + for (GbStream gbStream : gbStreams) { + DeviceChannel deviceChannel = new DeviceChannel(); + deviceChannel.setChannelId(gbStream.getGbId()); + deviceChannelList.add(deviceChannel); } + eventPublisher.catalogEventPublish(platformId, deviceChannelList, CatalogEvent.DEL); + platformGbStreamMapper.delByPlatformAndCatalogId(platformId, catalogId); } @Override -- Gitblit v1.8.0