From f8f65d473bec182abeecd6fd17a9d4c4c4cfc7c5 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期二, 10 五月 2022 13:08:32 +0800 Subject: [PATCH] 优化语音广播流程 --- src/main/java/com/genersoft/iot/vmp/gb28181/session/CatalogDataCatch.java | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/session/CatalogDataCatch.java b/src/main/java/com/genersoft/iot/vmp/gb28181/session/CatalogDataCatch.java index 62393d5..7eeb778 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/session/CatalogDataCatch.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/session/CatalogDataCatch.java @@ -21,16 +21,13 @@ public static Map<String, CatalogData> data = new ConcurrentHashMap<>(); @Autowired - private DeferredResultHolder deferredResultHolder; - - @Autowired private IVideoManagerStorage storager; public void addReady(Device device, int sn ) { CatalogData catalogData = data.get(device.getDeviceId()); if (catalogData == null || catalogData.getStatus().equals(CatalogData.CatalogDataStatus.end)) { catalogData = new CatalogData(); - catalogData.setChannelList(new ArrayList<>()); + catalogData.setChannelList(Collections.synchronizedList(new ArrayList<>())); catalogData.setDevice(device); catalogData.setSn(sn); catalogData.setStatus(CatalogData.CatalogDataStatus.ready); @@ -46,7 +43,7 @@ catalogData.setSn(sn); catalogData.setTotal(total); catalogData.setDevice(device); - catalogData.setChannelList(new ArrayList<>()); + catalogData.setChannelList(Collections.synchronizedList(new ArrayList<>())); catalogData.setStatus(CatalogData.CatalogDataStatus.runIng); catalogData.setLastTime(new Date(System.currentTimeMillis())); data.put(deviceId, catalogData); -- Gitblit v1.8.0