From 2466a248609b2a9b8eeee08c1378b2a440db475d Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期四, 10 十一月 2022 16:48:17 +0800 Subject: [PATCH] 去除发送流端口范围 --- src/main/java/com/genersoft/iot/vmp/media/zlm/dto/MediaServerItem.java | 26 +++++++------------------- 1 files changed, 7 insertions(+), 19 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/dto/MediaServerItem.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/dto/MediaServerItem.java index 8f5d5af..620b167 100644 --- a/src/main/java/com/genersoft/iot/vmp/media/zlm/dto/MediaServerItem.java +++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/dto/MediaServerItem.java @@ -4,7 +4,7 @@ import com.genersoft.iot.vmp.gb28181.session.SsrcConfig; import com.genersoft.iot.vmp.media.zlm.ZLMServerConfig; import io.swagger.v3.oas.annotations.media.Schema; -import org.springframework.util.StringUtils; +import org.springframework.util.ObjectUtils; import java.util.HashMap; @@ -53,11 +53,8 @@ @Schema(description = "ZLM閴存潈鍙傛暟") private String secret; - @Schema(description = "鏌愪釜娴佹棤浜鸿鐪嬫椂锛岃Е鍙慼ook.on_stream_none_reader浜嬩欢鐨勬渶澶х瓑寰呮椂闂达紝鍗曚綅姣") - private int streamNoneReaderDelayMS; - @Schema(description = "keepalive hook瑙﹀彂闂撮殧,鍗曚綅绉�") - private int hookAliveInterval; + private Float hookAliveInterval; @Schema(description = "鏄惁浣跨敤澶氱鍙fā寮�") private boolean rtpEnable; @@ -106,9 +103,9 @@ public MediaServerItem(ZLMServerConfig zlmServerConfig, String sipIp) { id = zlmServerConfig.getGeneralMediaServerId(); ip = zlmServerConfig.getIp(); - hookIp = StringUtils.isEmpty(zlmServerConfig.getHookIp())? sipIp: zlmServerConfig.getHookIp(); - sdpIp = StringUtils.isEmpty(zlmServerConfig.getSdpIp())? zlmServerConfig.getIp(): zlmServerConfig.getSdpIp(); - streamIp = StringUtils.isEmpty(zlmServerConfig.getStreamIp())? zlmServerConfig.getIp(): zlmServerConfig.getStreamIp(); + hookIp = ObjectUtils.isEmpty(zlmServerConfig.getHookIp())? sipIp: zlmServerConfig.getHookIp(); + sdpIp = ObjectUtils.isEmpty(zlmServerConfig.getSdpIp())? zlmServerConfig.getIp(): zlmServerConfig.getSdpIp(); + streamIp = ObjectUtils.isEmpty(zlmServerConfig.getStreamIp())? zlmServerConfig.getIp(): zlmServerConfig.getStreamIp(); httpPort = zlmServerConfig.getHttpPort(); httpSSlPort = zlmServerConfig.getHttpSSLport(); rtmpPort = zlmServerConfig.getRtmpPort(); @@ -118,7 +115,6 @@ rtspSSLPort = zlmServerConfig.getRtspSSlport(); autoConfig = true; // 榛樿鍊紅rue; secret = zlmServerConfig.getApiSecret(); - streamNoneReaderDelayMS = zlmServerConfig.getGeneralStreamNoneReaderDelayMS(); hookAliveInterval = zlmServerConfig.getHookAliveInterval(); rtpEnable = false; // 榛樿浣跨敤鍗曠鍙�;鐩村埌鐢ㄦ埛鑷繁璁剧疆寮�鍚绔彛 rtpPortRange = zlmServerConfig.getPortRange().replace("_",","); // 榛樿浣跨敤30000,30500浣滀负绾ц仈鏃跺彂閫佹祦鐨勭鍙e彿 @@ -239,14 +235,6 @@ this.secret = secret; } - public int getStreamNoneReaderDelayMS() { - return streamNoneReaderDelayMS; - } - - public void setStreamNoneReaderDelayMS(int streamNoneReaderDelayMS) { - this.streamNoneReaderDelayMS = streamNoneReaderDelayMS; - } - public boolean isRtpEnable() { return rtpEnable; } @@ -343,11 +331,11 @@ this.sendRtpPortRange = sendRtpPortRange; } - public int getHookAliveInterval() { + public Float getHookAliveInterval() { return hookAliveInterval; } - public void setHookAliveInterval(int hookAliveInterval) { + public void setHookAliveInterval(Float hookAliveInterval) { this.hookAliveInterval = hookAliveInterval; } } -- Gitblit v1.8.0