From 1de344674afd6bb35b51b165bbad76dbe6299b7e Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期四, 28 三月 2024 18:08:33 +0800 Subject: [PATCH] 使用冒号分隔redis的key --- src/main/java/com/genersoft/iot/vmp/media/zlm/dto/MediaServerItem.java | 121 +++++++++++++++++++++++++++++++--------- 1 files changed, 94 insertions(+), 27 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 old mode 100644 new mode 100755 index b56881f..cebfec3 --- 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 @@ -2,53 +2,89 @@ import com.genersoft.iot.vmp.media.zlm.ZLMServerConfig; -import org.springframework.util.StringUtils; +import io.swagger.v3.oas.annotations.media.Schema; +import org.springframework.util.ObjectUtils; -public class MediaServerItem implements IMediaServerItem{ +@Schema(description = "娴佸獟浣撴湇鍔′俊鎭�") +public class MediaServerItem{ + @Schema(description = "ID") private String id; + @Schema(description = "IP") private String ip; + @Schema(description = "hook浣跨敤鐨処P锛坺lm璁块棶WVP浣跨敤鐨処P锛�") private String hookIp; + @Schema(description = "SDP IP") private String sdpIp; + @Schema(description = "娴両P") private String streamIp; + @Schema(description = "HTTP绔彛") private int httpPort; + @Schema(description = "HTTPS绔彛") private int httpSSlPort; + @Schema(description = "RTMP绔彛") private int rtmpPort; + @Schema(description = "RTMPS绔彛") private int rtmpSSlPort; + @Schema(description = "RTP鏀舵祦绔彛锛堝崟绔彛妯″紡鏈夌敤锛�") private int rtpProxyPort; + @Schema(description = "RTSP绔彛") private int rtspPort; + @Schema(description = "RTSPS绔彛") private int rtspSSLPort; + @Schema(description = "鏄惁寮�鍚嚜鍔ㄩ厤缃甖LM") private boolean autoConfig; + @Schema(description = "ZLM閴存潈鍙傛暟") private String secret; - private String streamNoneReaderDelayMS; + @Schema(description = "keepalive hook瑙﹀彂闂撮殧,鍗曚綅绉�") + private Float hookAliveInterval; + @Schema(description = "鏄惁浣跨敤澶氱鍙fā寮�") private boolean rtpEnable; + @Schema(description = "鐘舵��") + private boolean status; + + @Schema(description = "澶氱鍙TP鏀舵祦绔彛鑼冨洿") private String rtpPortRange; + @Schema(description = "RTP鍙戞祦绔彛鑼冨洿") + private String sendRtpPortRange; + + @Schema(description = "assist鏈嶅姟绔彛") private int recordAssistPort; + @Schema(description = "鍒涘缓鏃堕棿") private String createTime; + @Schema(description = "鏇存柊鏃堕棿") private String updateTime; - private boolean docker; + @Schema(description = "涓婃蹇冭烦鏃堕棿") + private String lastKeepaliveTime; - private int count; + @Schema(description = "鏄惁鏄粯璁LM") + private boolean defaultServer; + + @Schema(description = "褰曞儚瀛樺偍鏃堕暱") + private int recordDay; + + @Schema(description = "褰曞儚瀛樺偍璺緞") + private String recordPath; public MediaServerItem() { } @@ -56,9 +92,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(); @@ -68,8 +104,9 @@ rtspSSLPort = zlmServerConfig.getRtspSSlport(); autoConfig = true; // 榛樿鍊紅rue; secret = zlmServerConfig.getApiSecret(); - streamNoneReaderDelayMS = zlmServerConfig.getGeneralStreamNoneReaderDelayMS(); + hookAliveInterval = zlmServerConfig.getHookAliveInterval(); rtpEnable = false; // 榛樿浣跨敤鍗曠鍙�;鐩村埌鐢ㄦ埛鑷繁璁剧疆寮�鍚绔彛 + rtpPortRange = zlmServerConfig.getPortRange().replace("_",","); // 榛樿浣跨敤30000,30500浣滀负绾ц仈鏃跺彂閫佹祦鐨勭鍙e彿 recordAssistPort = 0; // 榛樿鍏抽棴 } @@ -186,14 +223,6 @@ this.secret = secret; } - public String getStreamNoneReaderDelayMS() { - return streamNoneReaderDelayMS; - } - - public void setStreamNoneReaderDelayMS(String streamNoneReaderDelayMS) { - this.streamNoneReaderDelayMS = streamNoneReaderDelayMS; - } - public boolean isRtpEnable() { return rtpEnable; } @@ -218,14 +247,12 @@ this.recordAssistPort = recordAssistPort; } - @Override - public boolean isDocker() { - return docker; + public boolean isDefaultServer() { + return defaultServer; } - @Override - public void setDocker(boolean docker) { - this.docker = docker; + public void setDefaultServer(boolean defaultServer) { + this.defaultServer = defaultServer; } public String getCreateTime() { @@ -244,11 +271,51 @@ this.updateTime = updateTime; } - public int getCount() { - return count; + public boolean isStatus() { + return status; } - public void setCount(int count) { - this.count = count; + public void setStatus(boolean status) { + this.status = status; + } + + public String getLastKeepaliveTime() { + return lastKeepaliveTime; + } + + public void setLastKeepaliveTime(String lastKeepaliveTime) { + this.lastKeepaliveTime = lastKeepaliveTime; + } + + public Float getHookAliveInterval() { + return hookAliveInterval; + } + + public void setHookAliveInterval(Float hookAliveInterval) { + this.hookAliveInterval = hookAliveInterval; + } + + public String getSendRtpPortRange() { + return sendRtpPortRange; + } + + public void setSendRtpPortRange(String sendRtpPortRange) { + this.sendRtpPortRange = sendRtpPortRange; + } + + public int getRecordDay() { + return recordDay; + } + + public void setRecordDay(int recordDay) { + this.recordDay = recordDay; + } + + public String getRecordPath() { + return recordPath; + } + + public void setRecordPath(String recordPath) { + this.recordPath = recordPath; } } -- Gitblit v1.8.0