From 377f0f2c8231df27c0d385f3e2a8bcc4bec547de Mon Sep 17 00:00:00 2001 From: 64850858 <648540858@qq.com> Date: 星期二, 08 六月 2021 18:44:15 +0800 Subject: [PATCH] 提高注册兼容性, 修复sql兼容mysql --- src/main/java/com/genersoft/iot/vmp/conf/MediaConfig.java | 175 ++++++++++++++++++++++++++++++--------------------------- 1 files changed, 92 insertions(+), 83 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/conf/MediaConfig.java b/src/main/java/com/genersoft/iot/vmp/conf/MediaConfig.java index 2d0647a..8ab34bf 100644 --- a/src/main/java/com/genersoft/iot/vmp/conf/MediaConfig.java +++ b/src/main/java/com/genersoft/iot/vmp/conf/MediaConfig.java @@ -1,7 +1,9 @@ package com.genersoft.iot.vmp.conf; +import io.netty.util.internal.StringUtil; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Configuration; +import org.springframework.util.StringUtils; @Configuration("mediaConfig") public class MediaConfig { @@ -9,40 +11,43 @@ @Value("${media.ip}") private String ip; - @Value("${media.wanIp}") - private String wanIp; - - @Value("${media.hookIp}") + @Value("${media.hookIp:${sip.ip}}") private String hookIp; + @Value("${media.sdpIp:${media.ip}}") + private String sdpIp; + + @Value("${media.streamIp:${media.ip}}") + private String streamIp; + @Value("${media.httpPort}") - private String httpPort; + private Integer httpPort; - @Value("${media.httpSSlPort}") - private String httpSSlPort; + @Value("${media.httpSSlPort:}") + private Integer httpSSlPort; - @Value("${media.rtmpPort}") - private String rtmpPort; + @Value("${media.rtmpPort:}") + private Integer rtmpPort; - @Value("${media.rtmpSSlPort}") - private String rtmpSSlPort; + @Value("${media.rtmpSSlPort:}") + private Integer rtmpSSlPort; - @Value("${media.rtpProxyPort}") - private String rtpProxyPort; + @Value("${media.rtpProxyPort:}") + private Integer rtpProxyPort; - @Value("${media.rtspPort}") - private String rtspPort; + @Value("${media.rtspPort:}") + private Integer rtspPort; - @Value("${media.rtspSSLPort}") - private String rtspSSLPort; + @Value("${media.rtspSSLPort:}") + private Integer rtspSSLPort; - @Value("${media.autoConfig}") + @Value("${media.autoConfig:true}") private boolean autoConfig; @Value("${media.secret}") private String secret; - @Value("${media.streamNoneReaderDelayMS}") + @Value("${media.streamNoneReaderDelayMS:18000}") private String streamNoneReaderDelayMS; @Value("${media.rtp.enable}") @@ -52,7 +57,7 @@ private String rtpPortRange; @Value("${media.recordAssistPort}") - private int recordAssistPort; + private Integer recordAssistPort; public String getIp() { return ip; @@ -60,14 +65,6 @@ public void setIp(String ip) { this.ip = ip; - } - - public String getWanIp() { - return wanIp; - } - - public void setWanIp(String wanIp) { - this.wanIp = wanIp; } public String getHookIp() { @@ -78,19 +75,79 @@ this.hookIp = hookIp; } - public String getHttpPort() { + public String getSdpIp() { + return sdpIp; + } + + public void setSdpIp(String sdpIp) { + this.sdpIp = sdpIp; + } + + public String getStreamIp() { + return streamIp; + } + + public void setStreamIp(String streamIp) { + this.streamIp = streamIp; + } + + public Integer getHttpPort() { return httpPort; } - public void setHttpPort(String httpPort) { + public void setHttpPort(Integer httpPort) { this.httpPort = httpPort; } - public boolean isAutoConfig() { - return autoConfig; + public Integer getHttpSSlPort() { + return httpSSlPort; } - public boolean getAutoConfig() { + public void setHttpSSlPort(Integer httpSSlPort) { + this.httpSSlPort = httpSSlPort; + } + + public Integer getRtmpPort() { + return rtmpPort; + } + + public void setRtmpPort(Integer rtmpPort) { + this.rtmpPort = rtmpPort; + } + + public Integer getRtmpSSlPort() { + return rtmpSSlPort; + } + + public void setRtmpSSlPort(Integer rtmpSSlPort) { + this.rtmpSSlPort = rtmpSSlPort; + } + + public Integer getRtpProxyPort() { + return rtpProxyPort; + } + + public void setRtpProxyPort(Integer rtpProxyPort) { + this.rtpProxyPort = rtpProxyPort; + } + + public Integer getRtspPort() { + return rtspPort; + } + + public void setRtspPort(Integer rtspPort) { + this.rtspPort = rtspPort; + } + + public Integer getRtspSSLPort() { + return rtspSSLPort; + } + + public void setRtspSSLPort(Integer rtspSSLPort) { + this.rtspSSLPort = rtspSSLPort; + } + + public boolean isAutoConfig() { return autoConfig; } @@ -130,59 +187,11 @@ this.rtpPortRange = rtpPortRange; } - public String getHttpSSlPort() { - return httpSSlPort; - } - - public void setHttpSSlPort(String httpSSlPort) { - this.httpSSlPort = httpSSlPort; - } - - public String getRtmpPort() { - return rtmpPort; - } - - public void setRtmpPort(String rtmpPort) { - this.rtmpPort = rtmpPort; - } - - public String getRtmpSSlPort() { - return rtmpSSlPort; - } - - public void setRtmpSSlPort(String rtmpSSlPort) { - this.rtmpSSlPort = rtmpSSlPort; - } - - public String getRtpProxyPort() { - return rtpProxyPort; - } - - public void setRtpProxyPort(String rtpProxyPort) { - this.rtpProxyPort = rtpProxyPort; - } - - public String getRtspPort() { - return rtspPort; - } - - public void setRtspPort(String rtspPort) { - this.rtspPort = rtspPort; - } - - public String getRtspSSLPort() { - return rtspSSLPort; - } - - public void setRtspSSLPort(String rtspSSLPort) { - this.rtspSSLPort = rtspSSLPort; - } - - public int getRecordAssistPort() { + public Integer getRecordAssistPort() { return recordAssistPort; } - public void setRecordAssistPort(int recordAssistPort) { + public void setRecordAssistPort(Integer recordAssistPort) { this.recordAssistPort = recordAssistPort; } } -- Gitblit v1.8.0