From a915897c530460f3c4463c34e242e6407fcdcb4c Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Wed, 7 Aug 2024 09:38:48 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=85=BC=E5=AE=B9arm=20zlm=20=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E8=8E=B7=E5=8F=96=E5=88=B0Params=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vmp/media/zlm/ZLMHttpHookListener.java | 26 ++++++++++++++++--- 1 file changed, 23 insertions(+), 3 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 a676fb92..a1d302ad 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 @@ -47,7 +47,10 @@ import org.springframework.web.context.request.async.DeferredResult; import javax.servlet.http.HttpServletRequest; import javax.sip.InvalidArgumentException; import javax.sip.SipException; +import java.net.MalformedURLException; +import java.net.URL; import java.text.ParseException; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.UUID; @@ -377,10 +380,27 @@ public class ZLMHttpHookListener { redisCatchStorage.updateStreamAuthorityInfo(param.getApp(), param.getStream(), streamAuthorityInfo); if (!"broadcast".equals(param.getApp()) && !"talk".equals(param.getApp())) { - Map params = MediaServerUtils.urlParamToMap(param.getParams()); - param.setParamMap(params); + String paramsStr = param.getParams(); + if (paramsStr == null) { + // 兼容arm zlm 无法获取到Params的问题 + URL url = null; + try { + url = new URL("http" + param.getOriginUrl().substring(4)); + } catch (MalformedURLException ignored) {} + if (url != null) { + paramsStr = url.getQuery(); + } + } + if (paramsStr != null) { + Map params = MediaServerUtils.urlParamToMap(paramsStr); + param.setParamMap(params); + }else { + param.setParamMap(new HashMap<>()); + logger.warn("获取推流的params信息失败"); + } + StreamInfo streamInfoByAppAndStream = mediaService.getStreamInfoByAppAndStream(mediaInfo, - param.getApp(), param.getStream(), tracks, params.get("callId")); + param.getApp(), param.getStream(), tracks, param.getParamMap().get("callId")); param.setStreamInfo(new StreamContent(streamInfoByAppAndStream)); param.setSeverId(userSetting.getServerId()); From 074cd145355620db4a45d6c97713da5db87ac075 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Wed, 7 Aug 2024 09:44:37 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index df841d52..ff078c6f 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ com.genersoft wvp-pro - 2.7.1 + 2.7.2 web video platform 国标28181视频平台 ${project.packaging}