From 0a404e23896b566a4dc017431951f8b73578ed73 Mon Sep 17 00:00:00 2001
From: 百鸣 <94030128+ixingqiao@users.noreply.github.com>
Date: 星期五, 26 八月 2022 11:49:43 +0800
Subject: [PATCH] Merge branch '648540858:wvp-28181-2.0' into wvp-28181-2.0
---
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java
index 18654dd..21879ab 100644
--- a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java
+++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java
@@ -22,6 +22,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
+import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@@ -98,9 +99,7 @@
@PostMapping(value = "/on_server_keepalive", produces = "application/json;charset=UTF-8")
public ResponseEntity<String> onServerKeepalive(@RequestBody JSONObject json){
- if (logger.isDebugEnabled()) {
- logger.debug("[ ZLM HOOK ] on_server_keepalive API璋冪敤锛屽弬鏁帮細" + json.toString());
- }
+ logger.info("[ ZLM HOOK ] on_server_keepalive API璋冪敤锛屽弬鏁帮細" + json.toString());
String mediaServerId = json.getString("mediaServerId");
List<ZLMHttpHookSubscribe.Event> subscribes = this.subscribe.getSubscribes(HookType.on_server_keepalive);
if (subscribes != null && subscribes.size() > 0) {
@@ -445,13 +444,15 @@
if (streamInfo!=null){
redisCatchStorage.stopPlay(streamInfo);
storager.stopPlay(streamInfo.getDeviceID(), streamInfo.getChannelId());
+ // 濡傛灉姝e湪缁欎笂绾ф帹閫侊紝鍒欏彂閫乥ye
+
}else{
streamInfo = redisCatchStorage.queryPlayback(null, null, stream, null);
if (streamInfo != null) {
redisCatchStorage.stopPlayback(streamInfo.getDeviceID(), streamInfo.getChannelId(),
streamInfo.getStream(), null);
}
-
+ // 濡傛灉姝e湪缁欎笂绾ф帹閫侊紝鍒欏彂閫乥ye
}
}else {
if (!"rtp".equals(app)){
@@ -633,7 +634,7 @@
private Map<String, String> urlParamToMap(String params) {
HashMap<String, String> map = new HashMap<>();
- if (StringUtils.isEmpty(params)) {
+ if (ObjectUtils.isEmpty(params)) {
return map;
}
String[] paramsArray = params.split("&");
--
Gitblit v1.8.0