diff --git a/src/main/java/com/genersoft/iot/vmp/media/bean/MediaServer.java b/src/main/java/com/genersoft/iot/vmp/media/bean/MediaServer.java index 2660cb6a9..431eb29d8 100755 --- a/src/main/java/com/genersoft/iot/vmp/media/bean/MediaServer.java +++ b/src/main/java/com/genersoft/iot/vmp/media/bean/MediaServer.java @@ -3,9 +3,11 @@ package com.genersoft.iot.vmp.media.bean; import com.genersoft.iot.vmp.media.zlm.dto.ZLMServerConfig; import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; import org.springframework.util.ObjectUtils; @Schema(description = "流媒体服务信息") +@Data public class MediaServer { @Schema(description = "ID") @@ -135,268 +137,4 @@ public class MediaServer { transcodeSuffix = zlmServerConfig.getTranscodeSuffix(); } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getIp() { - return ip; - } - - public void setIp(String ip) { - this.ip = ip; - } - - public String getHookIp() { - return hookIp; - } - - public void setHookIp(String hookIp) { - this.hookIp = hookIp; - } - - 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 int getHttpPort() { - return httpPort; - } - - public void setHttpPort(int httpPort) { - this.httpPort = httpPort; - } - - public int getHttpSSlPort() { - return httpSSlPort; - } - - public void setHttpSSlPort(int httpSSlPort) { - this.httpSSlPort = httpSSlPort; - } - - public int getRtmpPort() { - return rtmpPort; - } - - public void setRtmpPort(int rtmpPort) { - this.rtmpPort = rtmpPort; - } - - public int getRtmpSSlPort() { - return rtmpSSlPort; - } - - public void setRtmpSSlPort(int rtmpSSlPort) { - this.rtmpSSlPort = rtmpSSlPort; - } - - public int getRtpProxyPort() { - return rtpProxyPort; - } - - public void setRtpProxyPort(int rtpProxyPort) { - this.rtpProxyPort = rtpProxyPort; - } - - public int getRtspPort() { - return rtspPort; - } - - public void setRtspPort(int rtspPort) { - this.rtspPort = rtspPort; - } - - public int getRtspSSLPort() { - return rtspSSLPort; - } - - public void setRtspSSLPort(int rtspSSLPort) { - this.rtspSSLPort = rtspSSLPort; - } - - public boolean isAutoConfig() { - return autoConfig; - } - - public void setAutoConfig(boolean autoConfig) { - this.autoConfig = autoConfig; - } - - public String getSecret() { - return secret; - } - - public void setSecret(String secret) { - this.secret = secret; - } - - public boolean isRtpEnable() { - return rtpEnable; - } - - public void setRtpEnable(boolean rtpEnable) { - this.rtpEnable = rtpEnable; - } - - public String getRtpPortRange() { - return rtpPortRange; - } - - public void setRtpPortRange(String rtpPortRange) { - this.rtpPortRange = rtpPortRange; - } - - public int getRecordAssistPort() { - return recordAssistPort; - } - - public void setRecordAssistPort(int recordAssistPort) { - this.recordAssistPort = recordAssistPort; - } - - public boolean isDefaultServer() { - return defaultServer; - } - - public void setDefaultServer(boolean defaultServer) { - this.defaultServer = defaultServer; - } - - public String getCreateTime() { - return createTime; - } - - public void setCreateTime(String createTime) { - this.createTime = createTime; - } - - public String getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(String updateTime) { - this.updateTime = updateTime; - } - - public boolean isStatus() { - return status; - } - - 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; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public int getFlvPort() { - return flvPort; - } - - public void setFlvPort(int flvPort) { - this.flvPort = flvPort; - } - - public int getFlvSSLPort() { - return flvSSLPort; - } - - public void setFlvSSLPort(int flvSSLPort) { - this.flvSSLPort = flvSSLPort; - } - - public int getWsFlvPort() { - return wsFlvPort; - } - - public void setWsFlvPort(int wsFlvPort) { - this.wsFlvPort = wsFlvPort; - } - - public int getWsFlvSSLPort() { - return wsFlvSSLPort; - } - - public void setWsFlvSSLPort(int wsFlvSSLPort) { - this.wsFlvSSLPort = wsFlvSSLPort; - } - - public String getTranscodeSuffix() { - return transcodeSuffix; - } - - public void setTranscodeSuffix(String transcodeSuffix) { - this.transcodeSuffix = transcodeSuffix; - } - - public String getServerId() { - return serverId; - } - - public void setServerId(String serverId) { - this.serverId = serverId; - } } diff --git a/src/main/java/com/genersoft/iot/vmp/media/service/impl/MediaServerServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/media/service/impl/MediaServerServiceImpl.java index 0a089cf2f..98f9c7518 100755 --- a/src/main/java/com/genersoft/iot/vmp/media/service/impl/MediaServerServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/media/service/impl/MediaServerServiceImpl.java @@ -794,7 +794,11 @@ public class MediaServerServiceImpl implements IMediaServerService { if (streamInfoList == null || streamInfoList.isEmpty()) { return null; }else { - return streamInfoList.get(0); + StreamInfo streamInfo = streamInfoList.get(0); + if (addr != null && !addr.isEmpty()) { + streamInfo.changeStreamIp(addr); + } + return streamInfo; } } diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java index 87aa801ea..9c2cd6b96 100755 --- a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java +++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java @@ -177,6 +177,9 @@ public class ZLMHttpHookListener { ret.put("code", 0); return ret; } + if (param.getStream().endsWith(mediaInfo.getTranscodeSuffix())) { + param.setStream(param.getStream().substring(0, param.getStream().lastIndexOf(mediaInfo.getTranscodeSuffix()) - 1)); + } if (!ObjectUtils.isEmpty(mediaInfo.getTranscodeSuffix()) && !"null".equalsIgnoreCase(mediaInfo.getTranscodeSuffix()) && param.getStream().endsWith(mediaInfo.getTranscodeSuffix()) ) { diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMMediaServerStatusManager.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMMediaServerStatusManager.java index 029e46ca8..df105e369 100644 --- a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMMediaServerStatusManager.java +++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMMediaServerStatusManager.java @@ -186,7 +186,6 @@ public class ZLMMediaServerStatusManager { log.info("[ZLM-连接成功] ID:{}, 地址: {}:{}", mediaServerItem.getId(), mediaServerItem.getIp(), mediaServerItem.getHttpPort()); mediaServerItem.setStatus(true); mediaServerItem.setHookAliveInterval(10F); - mediaServerService.update(mediaServerItem); // 发送上线通知 eventPublisher.mediaServerOnlineEventPublish(mediaServerItem); if(mediaServerItem.isAutoConfig()) { @@ -243,6 +242,9 @@ public class ZLMMediaServerStatusManager { if (mediaServerItem.getWsFlvSSLPort() == 0) { mediaServerItem.setWsFlvSSLPort(zlmServerConfig.getHttpSSLport()); } + if (Objects.isNull(mediaServerItem.getTranscodeSuffix())) { + mediaServerItem.setTranscodeSuffix(zlmServerConfig.getTranscodeSuffix()); + } mediaServerItem.setHookAliveInterval(10F); } diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/dto/ZLMServerConfig.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/dto/ZLMServerConfig.java index 05fc57d0a..84ebc3e32 100755 --- a/src/main/java/com/genersoft/iot/vmp/media/zlm/dto/ZLMServerConfig.java +++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/dto/ZLMServerConfig.java @@ -2,7 +2,11 @@ package com.genersoft.iot.vmp.media.zlm.dto; import com.alibaba.fastjson2.annotation.JSONField; import com.genersoft.iot.vmp.media.zlm.dto.hook.HookParam; +import lombok.Data; +import lombok.EqualsAndHashCode; +@EqualsAndHashCode(callSuper = true) +@Data public class ZLMServerConfig extends HookParam { @JSONField(name = "api.apiDebug") @@ -334,892 +338,4 @@ public class ZLMServerConfig extends HookParam { @JSONField(name = "transcode.suffix") private String transcodeSuffix; - - public String getHookIp() { - return hookIp; - } - - public void setHookIp(String hookIp) { - this.hookIp = hookIp; - } - - public String getApiDebug() { - return apiDebug; - } - - public void setApiDebug(String apiDebug) { - this.apiDebug = apiDebug; - } - - public String getApiSecret() { - return apiSecret; - } - - public void setApiSecret(String apiSecret) { - this.apiSecret = apiSecret; - } - - public String getFfmpegBin() { - return ffmpegBin; - } - - public void setFfmpegBin(String ffmpegBin) { - this.ffmpegBin = ffmpegBin; - } - - public String getFfmpegCmd() { - return ffmpegCmd; - } - - public void setFfmpegCmd(String ffmpegCmd) { - this.ffmpegCmd = ffmpegCmd; - } - - public String getFfmpegLog() { - return ffmpegLog; - } - - public void setFfmpegLog(String ffmpegLog) { - this.ffmpegLog = ffmpegLog; - } - - public String getGeneralEnableVhost() { - return generalEnableVhost; - } - - public void setGeneralEnableVhost(String generalEnableVhost) { - this.generalEnableVhost = generalEnableVhost; - } - - public String getGeneralMediaServerId() { - return generalMediaServerId; - } - - public void setGeneralMediaServerId(String generalMediaServerId) { - this.generalMediaServerId = generalMediaServerId; - } - - public String getGeneralFlowThreshold() { - return generalFlowThreshold; - } - - public void setGeneralFlowThreshold(String generalFlowThreshold) { - this.generalFlowThreshold = generalFlowThreshold; - } - - public String getGeneralMaxStreamWaitMS() { - return generalMaxStreamWaitMS; - } - - public void setGeneralMaxStreamWaitMS(String generalMaxStreamWaitMS) { - this.generalMaxStreamWaitMS = generalMaxStreamWaitMS; - } - - public int getGeneralStreamNoneReaderDelayMS() { - return generalStreamNoneReaderDelayMS; - } - - public void setGeneralStreamNoneReaderDelayMS(int generalStreamNoneReaderDelayMS) { - this.generalStreamNoneReaderDelayMS = generalStreamNoneReaderDelayMS; - } - - public String getIp() { - return ip; - } - - public void setIp(String ip) { - this.ip = ip; - } - - 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 String getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(String updateTime) { - this.updateTime = updateTime; - } - - public String getCreateTime() { - return createTime; - } - - public void setCreateTime(String createTime) { - this.createTime = createTime; - } - - public String getHlsFileBufSize() { - return hlsFileBufSize; - } - - public void setHlsFileBufSize(String hlsFileBufSize) { - this.hlsFileBufSize = hlsFileBufSize; - } - - public String getHlsFilePath() { - return hlsFilePath; - } - - public void setHlsFilePath(String hlsFilePath) { - this.hlsFilePath = hlsFilePath; - } - - public String getHlsSegDur() { - return hlsSegDur; - } - - public void setHlsSegDur(String hlsSegDur) { - this.hlsSegDur = hlsSegDur; - } - - public String getHlsSegNum() { - return hlsSegNum; - } - - public void setHlsSegNum(String hlsSegNum) { - this.hlsSegNum = hlsSegNum; - } - - public String getHookAccessFileExceptHLS() { - return hookAccessFileExceptHLS; - } - - public void setHookAccessFileExceptHLS(String hookAccessFileExceptHLS) { - this.hookAccessFileExceptHLS = hookAccessFileExceptHLS; - } - - public String getHookAdminParams() { - return hookAdminParams; - } - - public void setHookAdminParams(String hookAdminParams) { - this.hookAdminParams = hookAdminParams; - } - - public String getHookEnable() { - return hookEnable; - } - - public void setHookEnable(String hookEnable) { - this.hookEnable = hookEnable; - } - - public String getHookOnFlowReport() { - return hookOnFlowReport; - } - - public void setHookOnFlowReport(String hookOnFlowReport) { - this.hookOnFlowReport = hookOnFlowReport; - } - - public String getHookOnHttpAccess() { - return hookOnHttpAccess; - } - - public void setHookOnHttpAccess(String hookOnHttpAccess) { - this.hookOnHttpAccess = hookOnHttpAccess; - } - - public String getHookOnPlay() { - return hookOnPlay; - } - - public void setHookOnPlay(String hookOnPlay) { - this.hookOnPlay = hookOnPlay; - } - - public String getHookOnPublish() { - return hookOnPublish; - } - - public void setHookOnPublish(String hookOnPublish) { - this.hookOnPublish = hookOnPublish; - } - - public String getHookOnRecordMp4() { - return hookOnRecordMp4; - } - - public void setHookOnRecordMp4(String hookOnRecordMp4) { - this.hookOnRecordMp4 = hookOnRecordMp4; - } - - public String getHookOnRtspAuth() { - return hookOnRtspAuth; - } - - public void setHookOnRtspAuth(String hookOnRtspAuth) { - this.hookOnRtspAuth = hookOnRtspAuth; - } - - public String getHookOnRtspRealm() { - return hookOnRtspRealm; - } - - public void setHookOnRtspRealm(String hookOnRtspRealm) { - this.hookOnRtspRealm = hookOnRtspRealm; - } - - public String getHookOnShellLogin() { - return hookOnShellLogin; - } - - public void setHookOnShellLogin(String hookOnShellLogin) { - this.hookOnShellLogin = hookOnShellLogin; - } - - public String getHookOnStreamChanged() { - return hookOnStreamChanged; - } - - public void setHookOnStreamChanged(String hookOnStreamChanged) { - this.hookOnStreamChanged = hookOnStreamChanged; - } - - public String getHookOnStreamNoneReader() { - return hookOnStreamNoneReader; - } - - public void setHookOnStreamNoneReader(String hookOnStreamNoneReader) { - this.hookOnStreamNoneReader = hookOnStreamNoneReader; - } - - public String getHookOnStreamNotFound() { - return hookOnStreamNotFound; - } - - public void setHookOnStreamNotFound(String hookOnStreamNotFound) { - this.hookOnStreamNotFound = hookOnStreamNotFound; - } - - public String getHookTimeoutSec() { - return hookTimeoutSec; - } - - public void setHookTimeoutSec(String hookTimeoutSec) { - this.hookTimeoutSec = hookTimeoutSec; - } - - public String getHttpCharSet() { - return httpCharSet; - } - - public void setHttpCharSet(String httpCharSet) { - this.httpCharSet = httpCharSet; - } - - public String getHttpKeepAliveSecond() { - return httpKeepAliveSecond; - } - - public void setHttpKeepAliveSecond(String httpKeepAliveSecond) { - this.httpKeepAliveSecond = httpKeepAliveSecond; - } - - public String getHttpMaxReqCount() { - return httpMaxReqCount; - } - - public void setHttpMaxReqCount(String httpMaxReqCount) { - this.httpMaxReqCount = httpMaxReqCount; - } - - public String getHttpMaxReqSize() { - return httpMaxReqSize; - } - - public void setHttpMaxReqSize(String httpMaxReqSize) { - this.httpMaxReqSize = httpMaxReqSize; - } - - public String getHttpNotFound() { - return httpNotFound; - } - - public void setHttpNotFound(String httpNotFound) { - this.httpNotFound = httpNotFound; - } - - public int getHttpPort() { - return httpPort; - } - - public void setHttpPort(int httpPort) { - this.httpPort = httpPort; - } - - public String getHttpRootPath() { - return httpRootPath; - } - - public void setHttpRootPath(String httpRootPath) { - this.httpRootPath = httpRootPath; - } - - public String getHttpSendBufSize() { - return httpSendBufSize; - } - - public void setHttpSendBufSize(String httpSendBufSize) { - this.httpSendBufSize = httpSendBufSize; - } - - public int getHttpSSLport() { - return httpSSLport; - } - - public void setHttpSSLport(int httpSSLport) { - this.httpSSLport = httpSSLport; - } - - public String getMulticastAddrMax() { - return multicastAddrMax; - } - - public void setMulticastAddrMax(String multicastAddrMax) { - this.multicastAddrMax = multicastAddrMax; - } - - public String getMulticastAddrMin() { - return multicastAddrMin; - } - - public void setMulticastAddrMin(String multicastAddrMin) { - this.multicastAddrMin = multicastAddrMin; - } - - public String getMulticastUdpTTL() { - return multicastUdpTTL; - } - - public void setMulticastUdpTTL(String multicastUdpTTL) { - this.multicastUdpTTL = multicastUdpTTL; - } - - public String getRecordAppName() { - return recordAppName; - } - - public void setRecordAppName(String recordAppName) { - this.recordAppName = recordAppName; - } - - public String getRecordFilePath() { - return recordFilePath; - } - - public void setRecordFilePath(String recordFilePath) { - this.recordFilePath = recordFilePath; - } - - public String getRecordFileSecond() { - return recordFileSecond; - } - - public void setRecordFileSecond(String recordFileSecond) { - this.recordFileSecond = recordFileSecond; - } - - public String getRecordFileSampleMS() { - return recordFileSampleMS; - } - - public void setRecordFileSampleMS(String recordFileSampleMS) { - this.recordFileSampleMS = recordFileSampleMS; - } - - public String getRtmpHandshakeSecond() { - return rtmpHandshakeSecond; - } - - public void setRtmpHandshakeSecond(String rtmpHandshakeSecond) { - this.rtmpHandshakeSecond = rtmpHandshakeSecond; - } - - public String getRtmpKeepAliveSecond() { - return rtmpKeepAliveSecond; - } - - public void setRtmpKeepAliveSecond(String rtmpKeepAliveSecond) { - this.rtmpKeepAliveSecond = rtmpKeepAliveSecond; - } - - public String getRtmpModifyStamp() { - return rtmpModifyStamp; - } - - public void setRtmpModifyStamp(String rtmpModifyStamp) { - this.rtmpModifyStamp = rtmpModifyStamp; - } - - public int getRtmpPort() { - return rtmpPort; - } - - public void setRtmpPort(int rtmpPort) { - this.rtmpPort = rtmpPort; - } - - public int getRtmpSslPort() { - return rtmpSslPort; - } - - public void setRtmpSslPort(int rtmpSslPort) { - this.rtmpSslPort = rtmpSslPort; - } - - public String getRtpAudioMtuSize() { - return rtpAudioMtuSize; - } - - public void setRtpAudioMtuSize(String rtpAudioMtuSize) { - this.rtpAudioMtuSize = rtpAudioMtuSize; - } - - public String getRtpClearCount() { - return rtpClearCount; - } - - public void setRtpClearCount(String rtpClearCount) { - this.rtpClearCount = rtpClearCount; - } - - public String getRtpCycleMS() { - return rtpCycleMS; - } - - public void setRtpCycleMS(String rtpCycleMS) { - this.rtpCycleMS = rtpCycleMS; - } - - public String getRtpMaxRtpCount() { - return rtpMaxRtpCount; - } - - public void setRtpMaxRtpCount(String rtpMaxRtpCount) { - this.rtpMaxRtpCount = rtpMaxRtpCount; - } - - public String getRtpVideoMtuSize() { - return rtpVideoMtuSize; - } - - public void setRtpVideoMtuSize(String rtpVideoMtuSize) { - this.rtpVideoMtuSize = rtpVideoMtuSize; - } - - public String getRtpProxyCheckSource() { - return rtpProxyCheckSource; - } - - public void setRtpProxyCheckSource(String rtpProxyCheckSource) { - this.rtpProxyCheckSource = rtpProxyCheckSource; - } - - public String getRtpProxyDumpDir() { - return rtpProxyDumpDir; - } - - public void setRtpProxyDumpDir(String rtpProxyDumpDir) { - this.rtpProxyDumpDir = rtpProxyDumpDir; - } - - public int getRtpProxyPort() { - return rtpProxyPort; - } - - public void setRtpProxyPort(int rtpProxyPort) { - this.rtpProxyPort = rtpProxyPort; - } - - public String getRtpProxyTimeoutSec() { - return rtpProxyTimeoutSec; - } - - public void setRtpProxyTimeoutSec(String rtpProxyTimeoutSec) { - this.rtpProxyTimeoutSec = rtpProxyTimeoutSec; - } - - public String getRtspAuthBasic() { - return rtspAuthBasic; - } - - public void setRtspAuthBasic(String rtspAuthBasic) { - this.rtspAuthBasic = rtspAuthBasic; - } - - public String getRtspHandshakeSecond() { - return rtspHandshakeSecond; - } - - public void setRtspHandshakeSecond(String rtspHandshakeSecond) { - this.rtspHandshakeSecond = rtspHandshakeSecond; - } - - public String getRtspKeepAliveSecond() { - return rtspKeepAliveSecond; - } - - public void setRtspKeepAliveSecond(String rtspKeepAliveSecond) { - this.rtspKeepAliveSecond = rtspKeepAliveSecond; - } - - public int getRtspPort() { - return rtspPort; - } - - public void setRtspPort(int rtspPort) { - this.rtspPort = rtspPort; - } - - public int getRtspSSlport() { - return rtspSSlport; - } - - public void setRtspSSlport(int rtspSSlport) { - this.rtspSSlport = rtspSSlport; - } - - public String getShellMaxReqSize() { - return shellMaxReqSize; - } - - public void setShellMaxReqSize(String shellMaxReqSize) { - this.shellMaxReqSize = shellMaxReqSize; - } - - public String getShellPhell() { - return shellPhell; - } - - public void setShellPhell(String shellPhell) { - this.shellPhell = shellPhell; - } - - public Float getHookAliveInterval() { - return hookAliveInterval; - } - - public void setHookAliveInterval(Float hookAliveInterval) { - this.hookAliveInterval = hookAliveInterval; - } - - public String getPortRange() { - return portRange; - } - - public void setPortRange(String portRange) { - this.portRange = portRange; - } - - public String getApiSnapRoot() { - return apiSnapRoot; - } - - public void setApiSnapRoot(String apiSnapRoot) { - this.apiSnapRoot = apiSnapRoot; - } - - public String getApiDefaultSnap() { - return apiDefaultSnap; - } - - public void setApiDefaultSnap(String apiDefaultSnap) { - this.apiDefaultSnap = apiDefaultSnap; - } - - public String getFfmpegSnap() { - return ffmpegSnap; - } - - public void setFfmpegSnap(String ffmpegSnap) { - this.ffmpegSnap = ffmpegSnap; - } - - public String getFfmpegRestartSec() { - return ffmpegRestartSec; - } - - public void setFfmpegRestartSec(String ffmpegRestartSec) { - this.ffmpegRestartSec = ffmpegRestartSec; - } - - public String getProtocolModifyStamp() { - return protocolModifyStamp; - } - - public void setProtocolModifyStamp(String protocolModifyStamp) { - this.protocolModifyStamp = protocolModifyStamp; - } - - public String getProtocolEnableAudio() { - return protocolEnableAudio; - } - - public void setProtocolEnableAudio(String protocolEnableAudio) { - this.protocolEnableAudio = protocolEnableAudio; - } - - public String getProtocolAddMuteAudio() { - return protocolAddMuteAudio; - } - - public void setProtocolAddMuteAudio(String protocolAddMuteAudio) { - this.protocolAddMuteAudio = protocolAddMuteAudio; - } - - public String getProtocolContinuePushMs() { - return protocolContinuePushMs; - } - - public void setProtocolContinuePushMs(String protocolContinuePushMs) { - this.protocolContinuePushMs = protocolContinuePushMs; - } - - public String getProtocolEnableHls() { - return protocolEnableHls; - } - - public void setProtocolEnableHls(String protocolEnableHls) { - this.protocolEnableHls = protocolEnableHls; - } - - public String getProtocolEnableMp4() { - return protocolEnableMp4; - } - - public void setProtocolEnableMp4(String protocolEnableMp4) { - this.protocolEnableMp4 = protocolEnableMp4; - } - - public String getProtocolEnableRtsp() { - return protocolEnableRtsp; - } - - public void setProtocolEnableRtsp(String protocolEnableRtsp) { - this.protocolEnableRtsp = protocolEnableRtsp; - } - - public String getProtocolEnableRtmp() { - return protocolEnableRtmp; - } - - public void setProtocolEnableRtmp(String protocolEnableRtmp) { - this.protocolEnableRtmp = protocolEnableRtmp; - } - - public String getProtocolEnableTs() { - return protocolEnableTs; - } - - public void setProtocolEnableTs(String protocolEnableTs) { - this.protocolEnableTs = protocolEnableTs; - } - - public String getProtocolEnableFmp4() { - return protocolEnableFmp4; - } - - public void setProtocolEnableFmp4(String protocolEnableFmp4) { - this.protocolEnableFmp4 = protocolEnableFmp4; - } - - public String getProtocolMp4AsPlayer() { - return protocolMp4AsPlayer; - } - - public void setProtocolMp4AsPlayer(String protocolMp4AsPlayer) { - this.protocolMp4AsPlayer = protocolMp4AsPlayer; - } - - public String getProtocolMp4MaxSecond() { - return protocolMp4MaxSecond; - } - - public void setProtocolMp4MaxSecond(String protocolMp4MaxSecond) { - this.protocolMp4MaxSecond = protocolMp4MaxSecond; - } - - public String getProtocolMp4SavePath() { - return protocolMp4SavePath; - } - - public void setProtocolMp4SavePath(String protocolMp4SavePath) { - this.protocolMp4SavePath = protocolMp4SavePath; - } - - public String getProtocolHlsSavePath() { - return protocolHlsSavePath; - } - - public void setProtocolHlsSavePath(String protocolHlsSavePath) { - this.protocolHlsSavePath = protocolHlsSavePath; - } - - public String getProtocolHlsDemand() { - return protocolHlsDemand; - } - - public void setProtocolHlsDemand(String protocolHlsDemand) { - this.protocolHlsDemand = protocolHlsDemand; - } - - public String getProtocolRtspDemand() { - return protocolRtspDemand; - } - - public void setProtocolRtspDemand(String protocolRtspDemand) { - this.protocolRtspDemand = protocolRtspDemand; - } - - public String getProtocolRtmpDemand() { - return protocolRtmpDemand; - } - - public void setProtocolRtmpDemand(String protocolRtmpDemand) { - this.protocolRtmpDemand = protocolRtmpDemand; - } - - public String getProtocolTsDemand() { - return protocolTsDemand; - } - - public void setProtocolTsDemand(String protocolTsDemand) { - this.protocolTsDemand = protocolTsDemand; - } - - public String getProtocolFmp4Demand() { - return protocolFmp4Demand; - } - - public void setProtocolFmp4Demand(String protocolFmp4Demand) { - this.protocolFmp4Demand = protocolFmp4Demand; - } - - public String getGeneralResetWhenRePlay() { - return generalResetWhenRePlay; - } - - public void setGeneralResetWhenRePlay(String generalResetWhenRePlay) { - this.generalResetWhenRePlay = generalResetWhenRePlay; - } - - public String getGeneralMergeWriteMS() { - return generalMergeWriteMS; - } - - public void setGeneralMergeWriteMS(String generalMergeWriteMS) { - this.generalMergeWriteMS = generalMergeWriteMS; - } - - public String getGeneralWaitTrackReadyMs() { - return generalWaitTrackReadyMs; - } - - public void setGeneralWaitTrackReadyMs(String generalWaitTrackReadyMs) { - this.generalWaitTrackReadyMs = generalWaitTrackReadyMs; - } - - public String getGeneralWaitAddTrackMs() { - return generalWaitAddTrackMs; - } - - public void setGeneralWaitAddTrackMs(String generalWaitAddTrackMs) { - this.generalWaitAddTrackMs = generalWaitAddTrackMs; - } - - public String getGeneralUnreadyFrameCache() { - return generalUnreadyFrameCache; - } - - public void setGeneralUnreadyFrameCache(String generalUnreadyFrameCache) { - this.generalUnreadyFrameCache = generalUnreadyFrameCache; - } - - public String getHlsSegRetain() { - return hlsSegRetain; - } - - public void setHlsSegRetain(String hlsSegRetain) { - this.hlsSegRetain = hlsSegRetain; - } - - public String getHlsBroadcastRecordTs() { - return hlsBroadcastRecordTs; - } - - public void setHlsBroadcastRecordTs(String hlsBroadcastRecordTs) { - this.hlsBroadcastRecordTs = hlsBroadcastRecordTs; - } - - public String getHlsDeleteDelaySec() { - return hlsDeleteDelaySec; - } - - public void setHlsDeleteDelaySec(String hlsDeleteDelaySec) { - this.hlsDeleteDelaySec = hlsDeleteDelaySec; - } - - public String getHlsSegKeep() { - return hlsSegKeep; - } - - public void setHlsSegKeep(String hlsSegKeep) { - this.hlsSegKeep = hlsSegKeep; - } - - public String getHookOnServerStarted() { - return hookOnServerStarted; - } - - public void setHookOnServerStarted(String hookOnServerStarted) { - this.hookOnServerStarted = hookOnServerStarted; - } - - public String getHookOnServerKeepalive() { - return hookOnServerKeepalive; - } - - public void setHookOnServerKeepalive(String hookOnServerKeepalive) { - this.hookOnServerKeepalive = hookOnServerKeepalive; - } - - public String getHookOnSendRtpStopped() { - return hookOnSendRtpStopped; - } - - public void setHookOnSendRtpStopped(String hookOnSendRtpStopped) { - this.hookOnSendRtpStopped = hookOnSendRtpStopped; - } - - public String getHookOnRtpServerTimeout() { - return hookOnRtpServerTimeout; - } - - public void setHookOnRtpServerTimeout(String hookOnRtpServerTimeout) { - this.hookOnRtpServerTimeout = hookOnRtpServerTimeout; - } - - public String getTranscodeSuffix() { - return transcodeSuffix; - } - - public void setTranscodeSuffix(String transcodeSuffix) { - this.transcodeSuffix = transcodeSuffix; - } } diff --git a/src/main/java/com/genersoft/iot/vmp/storager/impl/RedisCatchStorageImpl.java b/src/main/java/com/genersoft/iot/vmp/storager/impl/RedisCatchStorageImpl.java index 4521b0b79..634f6cc22 100755 --- a/src/main/java/com/genersoft/iot/vmp/storager/impl/RedisCatchStorageImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/storager/impl/RedisCatchStorageImpl.java @@ -500,7 +500,7 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage { public void removePushListItem(String app, String stream, String mediaServerId) { String key = VideoManagerConstants.PUSH_STREAM_LIST + app + "_" + stream; MediaInfo param = (MediaInfo)redisTemplate.opsForValue().get(key); - if (param != null && param.getMediaServer().getId().equalsIgnoreCase(mediaServerId)) { + if (param != null) { redisTemplate.delete(key); } }