From a85e04a841ed7e3290002bc2688f49088349575b Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Fri, 8 Nov 2024 22:28:52 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=A4=9A=E5=B1=82?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=E6=97=B6=E4=B8=9A=E5=8A=A1=E5=88=86=E7=BB=84?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E5=88=9B=E5=BB=BA=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web_src/src/components/dialog/chooseGroup.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/web_src/src/components/dialog/chooseGroup.vue b/web_src/src/components/dialog/chooseGroup.vue index 4a327fdc..7f4e7021 100644 --- a/web_src/src/components/dialog/chooseGroup.vue +++ b/web_src/src/components/dialog/chooseGroup.vue @@ -4,6 +4,7 @@ title="选择虚拟组织" width="30%" top="5rem" + :append-to-body="true" :close-on-click-modal="false" :visible.sync="showDialog" :destroy-on-close="true" From 183e9c0efbf7b9f7f3be24c8e0c97be59fa35c4f Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Fri, 8 Nov 2024 23:17:01 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=A4=9A=E5=B1=82?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=E6=97=B6=E4=B8=9A=E5=8A=A1=E5=88=86=E7=BB=84?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E5=88=9B=E5=BB=BA=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web_src/src/components/dialog/channelCode.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/web_src/src/components/dialog/channelCode.vue b/web_src/src/components/dialog/channelCode.vue index d6a3d2ee..1a2e8c96 100644 --- a/web_src/src/components/dialog/channelCode.vue +++ b/web_src/src/components/dialog/channelCode.vue @@ -4,6 +4,7 @@ width="65rem" top="2rem" center + :append-to-body="true" :close-on-click-modal="false" :visible.sync="showVideoDialog" :destroy-on-close="false" From 726413f7df9c852487e2772109f868784abadf07 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Sun, 10 Nov 2024 22:23:23 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=A4=9A=E5=B1=8F?= =?UTF-8?q?=E6=92=AD=E6=94=BE=E4=B8=AD=20use-source-ip-as-stream-ip?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E5=A4=B1=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/CommonChannelController.java | 32 +++++++++++++++++-- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/controller/CommonChannelController.java b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/CommonChannelController.java index 2c09df4b..6f5295da 100755 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/controller/CommonChannelController.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/CommonChannelController.java @@ -28,7 +28,10 @@ import org.springframework.util.ObjectUtils; import org.springframework.web.bind.annotation.*; import org.springframework.web.context.request.async.DeferredResult; +import javax.servlet.http.HttpServletRequest; import javax.sip.message.Response; +import java.net.MalformedURLException; +import java.net.URL; import java.util.List; @@ -200,16 +203,39 @@ public class CommonChannelController { @Operation(summary = "播放通道", security = @SecurityRequirement(name = JwtUtils.HEADER)) @GetMapping("/play") - public DeferredResult> deleteChannelToGroupByGbDevice(Integer channelId){ + public DeferredResult> deleteChannelToGroupByGbDevice(HttpServletRequest request, Integer channelId){ Assert.notNull(channelId,"参数异常"); CommonGBChannel channel = channelService.getOne(channelId); Assert.notNull(channel, "通道不存在"); DeferredResult> result = new DeferredResult<>(userSetting.getPlayTimeout().longValue()); - ErrorCallback callback = (code, msg, data) -> { + ErrorCallback callback = (code, msg, streamInfo) -> { if (code == InviteErrorCode.SUCCESS.getCode()) { - result.setResult(WVPResult.success(new StreamContent(data))); + WVPResult wvpResult = WVPResult.success(); + if (streamInfo != null) { + if (userSetting.getUseSourceIpAsStreamIp()) { + streamInfo=streamInfo.clone();//深拷贝 + String host; + try { + URL url=new URL(request.getRequestURL().toString()); + host=url.getHost(); + } catch (MalformedURLException e) { + host=request.getLocalAddr(); + } + streamInfo.channgeStreamIp(host); + } + if (!ObjectUtils.isEmpty(streamInfo.getMediaServer().getTranscodeSuffix()) + && !"null".equalsIgnoreCase(streamInfo.getMediaServer().getTranscodeSuffix())) { + streamInfo.setStream(streamInfo.getStream() + "_" + streamInfo.getMediaServer().getTranscodeSuffix()); + } + wvpResult.setData(new StreamContent(streamInfo)); + }else { + wvpResult.setCode(code); + wvpResult.setMsg(msg); + } + + result.setResult(wvpResult); }else { result.setResult(WVPResult.fail(code, msg)); }