From f275daa3f86f0cbcbe3176e7942994c3a9869480 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期四, 05 一月 2023 15:01:10 +0800 Subject: [PATCH] 合并主线 --- src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/play/PlayController.java | 38 +++++++++++++++++++------------------- 1 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/play/PlayController.java b/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/play/PlayController.java index 99cb27f..0747b9a 100644 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/play/PlayController.java +++ b/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/play/PlayController.java @@ -111,22 +111,24 @@ resultHolder.invokeResult(msg); }); - // TODO 鍦ㄧ偣鎾湭鎴愬姛鐨勬儏鍐典笅鍦ㄦ璋冪敤鎺ュ彛鐐规挱浼氬鑷磋繑鍥炵殑娴佸湴鍧�ip閿欒 - deferredResultEx.setFilter(result1 -> { - WVPResult<StreamInfo> wvpResult1 = (WVPResult<StreamInfo>)result1; - WVPResult<StreamInfo> clone = null; - try { - clone = (WVPResult<StreamInfo>)wvpResult1.clone(); - } catch (CloneNotSupportedException e) { - throw new RuntimeException(e); - } - if (clone.getCode() == ErrorCode.SUCCESS.getCode()) { - StreamInfo data = clone.getData().clone(); - data.channgeStreamIp(request.getLocalName()); - clone.setData(data); - } - return clone; - }); + if (userSetting.getUseSourceIpAsStreamIp()) { + // TODO 鍦ㄧ偣鎾湭鎴愬姛鐨勬儏鍐典笅鍦ㄦ璋冪敤鎺ュ彛鐐规挱浼氬鑷磋繑鍥炵殑娴佸湴鍧�ip閿欒 + deferredResultEx.setFilter(result1 -> { + WVPResult<StreamInfo> wvpResult1 = (WVPResult<StreamInfo>)result1; + WVPResult<StreamInfo> clone = null; + try { + clone = (WVPResult<StreamInfo>)wvpResult1.clone(); + } catch (CloneNotSupportedException e) { + throw new RuntimeException(e); + } + if (clone.getCode() == ErrorCode.SUCCESS.getCode()) { + StreamInfo data = clone.getData().clone(); + data.channgeStreamIp(request.getLocalName()); + clone.setData(data); + } + return clone; + }); + } // 褰曞儚鏌ヨ浠hannelId浣滀负deviceId鏌ヨ resultHolder.put(key, uuid, deferredResultEx); @@ -136,7 +138,6 @@ } return result; } - @Operation(summary = "鍋滄鐐规挱") @Parameter(name = "deviceId", description = "璁惧鍥芥爣缂栧彿", required = true) @@ -174,7 +175,6 @@ json.put("deviceId", deviceId); json.put("channelId", channelId); return json; - } /** @@ -267,7 +267,7 @@ throw new ControllerException(ErrorCode.ERROR400.getCode(), "鏈壘鍒伴�氶亾锛� " + channelId); } - return playService.audioBroadcast(device, channelId); + return playService.audioBroadcastInfo(device, channelId); } -- Gitblit v1.8.0