From cba2e6b90b50c208e3354d4561b40576a251c370 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期六, 04 六月 2022 23:18:01 +0800
Subject: [PATCH] 优化wasm播放器内存占用问题
---
src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java b/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java
index 1f35911..338bb77 100644
--- a/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java
+++ b/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java
@@ -25,12 +25,13 @@
import org.springframework.transaction.TransactionDefinition;
import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
-/**
+/**
* 瑙嗛璁惧鏁版嵁瀛樺偍-jdbc瀹炵幇
* swwheihei
* 2020骞�5鏈�6鏃� 涓嬪崍2:31:42
@@ -195,7 +196,7 @@
@Override
public boolean resetChannels(String deviceId, List<DeviceChannel> deviceChannelList) {
- if (deviceChannelList == null) {
+ if (CollectionUtils.isEmpty(deviceChannelList)) {
return false;
}
List<DeviceChannel> allChannelInPlay = deviceChannelMapper.getAllChannelInPlay();
@@ -245,6 +246,10 @@
}
if (stringBuilder.length() > 0) {
logger.info("[鐩綍鏌ヨ]鏀跺埌鐨勬暟鎹瓨鍦ㄩ噸澶嶏細 {}" , stringBuilder);
+ }
+ if(CollectionUtils.isEmpty(channels)){
+ logger.info("閫氶亾閲嶈锛屾暟鎹负绌�={}" , deviceChannelList);
+ return false;
}
try {
int cleanChannelsResult = deviceChannelMapper.cleanChannelsNotInList(deviceId, channels);
@@ -315,6 +320,9 @@
List<DeviceChannel> all;
if (catalogUnderDevice != null && catalogUnderDevice) {
all = deviceChannelMapper.queryChannels(deviceId, deviceId, query, hasSubChannel, online);
+ // 娴峰悍璁惧鐨刾arentId鏄疭IP id
+ List<DeviceChannel> deviceChannels = deviceChannelMapper.queryChannels(deviceId, sipConfig.getId(), query, hasSubChannel, online);
+ all.addAll(deviceChannels);
}else {
all = deviceChannelMapper.queryChannels(deviceId, null, query, hasSubChannel, online);
}
--
Gitblit v1.8.0