From 72b437cc52e2907c9a66d6bda60acbffc736cdb8 Mon Sep 17 00:00:00 2001
From: BradyXu <brady_xu@outlook.com>
Date: 星期日, 12 五月 2024 02:15:41 +0800
Subject: [PATCH] 修复当上级平台点播时,上级平台和下级平台局域网不通时,导致推流失败。推流目标IP地址改为配置的SDP发流IP,如果SDP发流IP存在的话。否则还是从连接中获取推流目标IP

---
 src/main/java/com/genersoft/iot/vmp/common/enums/DeviceControlType.java |   20 +++++++++++++-------
 1 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/common/enums/DeviceControlType.java b/src/main/java/com/genersoft/iot/vmp/common/enums/DeviceControlType.java
index 5a046fa..02202d8 100644
--- a/src/main/java/com/genersoft/iot/vmp/common/enums/DeviceControlType.java
+++ b/src/main/java/com/genersoft/iot/vmp/common/enums/DeviceControlType.java
@@ -1,21 +1,14 @@
 package com.genersoft.iot.vmp.common.enums;
 
-import com.alibaba.fastjson2.JSONObject;
-import com.genersoft.iot.vmp.gb28181.utils.XmlUtil;
-import lombok.AllArgsConstructor;
-import lombok.Getter;
 import org.dom4j.Element;
 import org.springframework.util.ObjectUtils;
 
-import static com.genersoft.iot.vmp.gb28181.utils.XmlUtil.getText;
 
 /**
  * @author gaofuwang
  * @date 2023/01/18/ 10:09:00
  * @since 1.0
  */
-@Getter
-@AllArgsConstructor
 public enum DeviceControlType {
 
     /**
@@ -60,6 +53,19 @@
 
     private final String desc;
 
+    DeviceControlType(String val, String desc) {
+        this.val = val;
+        this.desc = desc;
+    }
+
+    public String getVal() {
+        return val;
+    }
+
+    public String getDesc() {
+        return desc;
+    }
+
     public static DeviceControlType typeOf(Element rootElement) {
         for (DeviceControlType item : DeviceControlType.values()) {
             if (!ObjectUtils.isEmpty(rootElement.element(item.val)) || !ObjectUtils.isEmpty(rootElement.elements(item.val))) {

--
Gitblit v1.8.0