From b96d580168ed877fc4cf24f3208066d6fea6e114 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期四, 01 十二月 2022 10:40:49 +0800
Subject: [PATCH] Merge pull request #689 from AlphaWu/Zafu-Dev-1129
---
src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/play/PlayController.java | 36 ++++++++++++++++++------------------
1 files changed, 18 insertions(+), 18 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 68a8133..9fed0c5 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
@@ -106,22 +106,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);
@@ -131,7 +133,6 @@
}
return result;
}
-
@Operation(summary = "鍋滄鐐规挱")
@Parameter(name = "deviceId", description = "璁惧鍥芥爣缂栧彿", required = true)
@@ -169,7 +170,6 @@
json.put("deviceId", deviceId);
json.put("channelId", channelId);
return json;
-
}
/**
--
Gitblit v1.8.0