From 424c0b63338321fb29795b40de926839021a2714 Mon Sep 17 00:00:00 2001
From: WuPeng <wp@zafu.edu.cn>
Date: 星期日, 28 四月 2024 14:31:38 +0800
Subject: [PATCH] 修改on_stream_none_reader返回值

---
 src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java |   12 ++++++------
 1 files changed, 6 insertions(+), 6 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 e0793a5..3d3f03f 100755
--- a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java
+++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java
@@ -15,7 +15,7 @@
 import com.genersoft.iot.vmp.media.event.media.*;
 import com.genersoft.iot.vmp.media.event.mediaServer.MediaSendRtpStoppedEvent;
 import com.genersoft.iot.vmp.media.service.IMediaServerService;
-import com.genersoft.iot.vmp.media.zlm.dto.MediaServer;
+import com.genersoft.iot.vmp.media.bean.MediaServer;
 import com.genersoft.iot.vmp.media.zlm.dto.ZLMServerConfig;
 import com.genersoft.iot.vmp.media.zlm.dto.hook.*;
 import com.genersoft.iot.vmp.media.zlm.event.HookZlmServerKeepaliveEvent;
@@ -143,16 +143,15 @@
     @ResponseBody
     @PostMapping(value = "/on_play", produces = "application/json;charset=UTF-8")
     public HookResult onPlay(@RequestBody OnPlayHookParam param) {
-        if (logger.isDebugEnabled()) {
-            logger.debug("[ZLM HOOK] 鎾斁閴存潈锛歿}->{}", param.getMediaServerId(), param);
-        }
+
         Map<String, String> paramMap = urlParamToMap(param.getParams());
         // 瀵逛簬鎾斁娴佽繘琛岄壌鏉�
         boolean authenticateResult = mediaService.authenticatePlay(param.getApp(), param.getStream(), paramMap.get("callId"));
         if (!authenticateResult) {
+            logger.info("[ZLM HOOK] 鎾斁閴存潈 澶辫触锛歿}->{}", param.getMediaServerId(), param);
             return new HookResult(401, "Unauthorized");
         }
-
+        logger.info("[ZLM HOOK] 鎾斁閴存潈鎴愬姛锛歿}->{}", param.getMediaServerId(), param);
         return HookResult.SUCCESS();
     }
 
@@ -223,7 +222,8 @@
         JSONObject ret = new JSONObject();
 
         boolean close = mediaService.closeStreamOnNoneReader(param.getMediaServerId(), param.getApp(), param.getStream(), param.getSchema());
-        ret.put("code", close);
+        ret.put("code", 0);
+        ret.put("close", close);
         return ret;
     }
 

--
Gitblit v1.8.0