From c2aaae9325db012c9960b69784330ced5ec15ab9 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期一, 09 五月 2022 18:15:30 +0800 Subject: [PATCH] 初步实现语音喊话 --- src/main/java/com/genersoft/iot/vmp/gb28181/session/CatalogDataCatch.java | 23 +++++++++++++++-------- 1 files changed, 15 insertions(+), 8 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 97360d2..3d53914 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,9 +21,6 @@ public static Map<String, CatalogData> data = new ConcurrentHashMap<>(); @Autowired - private DeferredResultHolder deferredResultHolder; - - @Autowired private IVideoManagerStorage storager; public void addReady(Device device, int sn ) { @@ -65,19 +62,25 @@ public List<DeviceChannel> get(String deviceId) { CatalogData catalogData = data.get(deviceId); - if (catalogData == null) return null; + if (catalogData == null) { + return null; + } return catalogData.getChannelList(); } public int getTotal(String deviceId) { CatalogData catalogData = data.get(deviceId); - if (catalogData == null) return 0; + if (catalogData == null) { + return 0; + } return catalogData.getTotal(); } public SyncStatus getSyncStatus(String deviceId) { CatalogData catalogData = data.get(deviceId); - if (catalogData == null) return null; + if (catalogData == null) { + return null; + } SyncStatus syncStatus = new SyncStatus(); syncStatus.setCurrent(catalogData.getChannelList().size()); syncStatus.setTotal(catalogData.getTotal()); @@ -87,7 +90,9 @@ public boolean isSyncRunning(String deviceId) { CatalogData catalogData = data.get(deviceId); - if (catalogData == null) return false; + if (catalogData == null) { + return false; + } return !catalogData.getStatus().equals(CatalogData.CatalogDataStatus.end); } @@ -125,7 +130,9 @@ public void setChannelSyncEnd(String deviceId, String errorMsg) { CatalogData catalogData = data.get(deviceId); - if (catalogData == null)return; + if (catalogData == null) { + return; + } catalogData.setStatus(CatalogData.CatalogDataStatus.end); catalogData.setErrorMsg(errorMsg); } -- Gitblit v1.8.0