From 3d68b56bb5ecbc3d34b2901c671dc7f1f0f82f74 Mon Sep 17 00:00:00 2001
From: pedoc <pedoc@qq.com>
Date: 星期一, 29 一月 2024 18:05:17 +0800
Subject: [PATCH] 修复未配置sipdomain时出现异常

---
 src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMServerConfig.java |  544 +++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 495 insertions(+), 49 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMServerConfig.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMServerConfig.java
old mode 100644
new mode 100755
index 10b368c..80910c0
--- a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMServerConfig.java
+++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMServerConfig.java
@@ -1,9 +1,9 @@
 package com.genersoft.iot.vmp.media.zlm;
 
-import com.alibaba.fastjson.annotation.JSONField;
-import org.springframework.util.StringUtils;
+import com.alibaba.fastjson2.annotation.JSONField;
+import com.genersoft.iot.vmp.media.zlm.dto.hook.HookParam;
 
-public class ZLMServerConfig {
+public class ZLMServerConfig extends HookParam {
 
     @JSONField(name = "api.apiDebug")
     private String apiDebug;
@@ -11,20 +11,86 @@
     @JSONField(name = "api.secret")
     private String apiSecret;
 
+    @JSONField(name = "api.snapRoot")
+    private String apiSnapRoot;
+
+    @JSONField(name = "api.defaultSnap")
+    private String apiDefaultSnap;
+
     @JSONField(name = "ffmpeg.bin")
     private String ffmpegBin;
 
     @JSONField(name = "ffmpeg.cmd")
     private String ffmpegCmd;
 
+    @JSONField(name = "ffmpeg.snap")
+    private String ffmpegSnap;
+
     @JSONField(name = "ffmpeg.log")
     private String ffmpegLog;
 
+    @JSONField(name = "ffmpeg.restart_sec")
+    private String ffmpegRestartSec;
+
+    @JSONField(name = "protocol.modify_stamp")
+    private String protocolModifyStamp;
+
+    @JSONField(name = "protocol.enable_audio")
+    private String protocolEnableAudio;
+
+    @JSONField(name = "protocol.add_mute_audio")
+    private String protocolAddMuteAudio;
+
+    @JSONField(name = "protocol.continue_push_ms")
+    private String protocolContinuePushMs;
+
+    @JSONField(name = "protocol.enable_hls")
+    private String protocolEnableHls;
+
+    @JSONField(name = "protocol.enable_mp4")
+    private String protocolEnableMp4;
+
+    @JSONField(name = "protocol.enable_rtsp")
+    private String protocolEnableRtsp;
+
+    @JSONField(name = "protocol.enable_rtmp")
+    private String protocolEnableRtmp;
+
+    @JSONField(name = "protocol.enable_ts")
+    private String protocolEnableTs;
+
+    @JSONField(name = "protocol.enable_fmp4")
+    private String protocolEnableFmp4;
+
+    @JSONField(name = "protocol.mp4_as_player")
+    private String protocolMp4AsPlayer;
+
+    @JSONField(name = "protocol.mp4_max_second")
+    private String protocolMp4MaxSecond;
+
+    @JSONField(name = "protocol.mp4_save_path")
+    private String protocolMp4SavePath;
+
+    @JSONField(name = "protocol.hls_save_path")
+    private String protocolHlsSavePath;
+
+    @JSONField(name = "protocol.hls_demand")
+    private String protocolHlsDemand;
+
+    @JSONField(name = "protocol.rtsp_demand")
+    private String protocolRtspDemand;
+
+    @JSONField(name = "protocol.rtmp_demand")
+    private String protocolRtmpDemand;
+
+    @JSONField(name = "protocol.ts_demand")
+    private String protocolTsDemand;
+
+    @JSONField(name = "protocol.fmp4_demand")
+    private String protocolFmp4Demand;
+
     @JSONField(name = "general.enableVhost")
     private String generalEnableVhost;
-
-    @JSONField(name = "general.mediaServerId")
-    private String generalMediaServerId;
 
     @JSONField(name = "general.flowThreshold")
     private String generalFlowThreshold;
@@ -33,13 +99,39 @@
     private String generalMaxStreamWaitMS;
 
     @JSONField(name = "general.streamNoneReaderDelayMS")
-    private String generalStreamNoneReaderDelayMS;
+    private int generalStreamNoneReaderDelayMS;
 
+    @JSONField(name = "general.resetWhenRePlay")
+    private String generalResetWhenRePlay;
+
+    @JSONField(name = "general.mergeWriteMS")
+    private String generalMergeWriteMS;
+
+    @JSONField(name = "general.mediaServerId")
+    private String generalMediaServerId;
+
+    @JSONField(name = "general.wait_track_ready_ms")
+    private String generalWaitTrackReadyMs;
+
+    @JSONField(name = "general.wait_add_track_ms")
+    private String generalWaitAddTrackMs;
+
+    @JSONField(name = "general.unready_frame_cache")
+    private String generalUnreadyFrameCache;
+
+
+    @JSONField(name = "ip")
     private String ip;
 
     private String sdpIp;
 
-    private long updateTime;
+    private String streamIp;
+
+    private String hookIp;
+
+    private String updateTime;
+
+    private String createTime;
 
     @JSONField(name = "hls.fileBufSize")
     private String hlsFileBufSize;
@@ -53,11 +145,26 @@
     @JSONField(name = "hls.segNum")
     private String hlsSegNum;
 
+    @JSONField(name = "hls.segRetain")
+    private String hlsSegRetain;
+
+    @JSONField(name = "hls.broadcastRecordTs")
+    private String hlsBroadcastRecordTs;
+
+    @JSONField(name = "hls.deleteDelaySec")
+    private String hlsDeleteDelaySec;
+
+    @JSONField(name = "hls.segKeep")
+    private String hlsSegKeep;
+
     @JSONField(name = "hook.access_file_except_hls")
     private String hookAccessFileExceptHLS;
 
     @JSONField(name = "hook.admin_params")
     private String hookAdminParams;
+
+    @JSONField(name = "hook.alive_interval")
+    private Float hookAliveInterval;
 
     @JSONField(name = "hook.enable")
     private String hookEnable;
@@ -95,6 +202,18 @@
     @JSONField(name = "hook.on_stream_not_found")
     private String hookOnStreamNotFound;
 
+    @JSONField(name = "hook.on_server_started")
+    private String hookOnServerStarted;
+
+    @JSONField(name = "hook.on_server_keepalive")
+    private String hookOnServerKeepalive;
+
+    @JSONField(name = "hook.on_send_rtp_stopped")
+    private String hookOnSendRtpStopped;
+
+    @JSONField(name = "hook.on_rtp_server_timeout")
+    private String hookOnRtpServerTimeout;
+
     @JSONField(name = "hook.timeoutSec")
     private String hookTimeoutSec;
 
@@ -114,7 +233,7 @@
     private String httpNotFound;
 
     @JSONField(name = "http.port")
-    private String httpPort;
+    private int httpPort;
 
     @JSONField(name = "http.rootPath")
     private String httpRootPath;
@@ -123,7 +242,7 @@
     private String httpSendBufSize;
 
     @JSONField(name = "http.sslport")
-    private String httpSSLport;
+    private int httpSSLport;
 
     @JSONField(name = "multicast.addrMax")
     private String multicastAddrMax;
@@ -156,10 +275,10 @@
     private String rtmpModifyStamp;
 
     @JSONField(name = "rtmp.port")
-    private String rtmpPort;
+    private int rtmpPort;
 
     @JSONField(name = "rtmp.sslport")
-    private String rtmpSslPort;
+    private int rtmpSslPort;
 
     @JSONField(name = "rtp.audioMtuSize")
     private String rtpAudioMtuSize;
@@ -183,7 +302,10 @@
     private String rtpProxyDumpDir;
 
     @JSONField(name = "rtp_proxy.port")
-    private String rtpProxyPort;
+    private int rtpProxyPort;
+
+    @JSONField(name = "rtp_proxy.port_range")
+    private String portRange;
 
     @JSONField(name = "rtp_proxy.timeoutSec")
     private String rtpProxyTimeoutSec;
@@ -198,10 +320,10 @@
     private String rtspKeepAliveSecond;
 
     @JSONField(name = "rtsp.port")
-    private String rtspPort;
+    private int rtspPort;
 
     @JSONField(name = "rtsp.sslport")
-    private String rtspSSlport;
+    private int rtspSSlport;
 
     @JSONField(name = "shell.maxReqSize")
     private String shellMaxReqSize;
@@ -209,6 +331,14 @@
     @JSONField(name = "shell.shell")
     private String shellPhell;
 
+
+    public String getHookIp() {
+        return hookIp;
+    }
+
+    public void setHookIp(String hookIp) {
+        this.hookIp = hookIp;
+    }
 
     public String getApiDebug() {
         return apiDebug;
@@ -258,6 +388,14 @@
         this.generalEnableVhost = generalEnableVhost;
     }
 
+    public String getGeneralMediaServerId() {
+        return generalMediaServerId;
+    }
+
+    public void setGeneralMediaServerId(String generalMediaServerId) {
+        this.generalMediaServerId = generalMediaServerId;
+    }
+
     public String getGeneralFlowThreshold() {
         return generalFlowThreshold;
     }
@@ -274,11 +412,11 @@
         this.generalMaxStreamWaitMS = generalMaxStreamWaitMS;
     }
 
-    public String getGeneralStreamNoneReaderDelayMS() {
+    public int getGeneralStreamNoneReaderDelayMS() {
         return generalStreamNoneReaderDelayMS;
     }
 
-    public void setGeneralStreamNoneReaderDelayMS(String generalStreamNoneReaderDelayMS) {
+    public void setGeneralStreamNoneReaderDelayMS(int generalStreamNoneReaderDelayMS) {
         this.generalStreamNoneReaderDelayMS = generalStreamNoneReaderDelayMS;
     }
 
@@ -288,6 +426,38 @@
 
     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() {
@@ -482,11 +652,11 @@
         this.httpNotFound = httpNotFound;
     }
 
-    public String getHttpPort() {
+    public int getHttpPort() {
         return httpPort;
     }
 
-    public void setHttpPort(String httpPort) {
+    public void setHttpPort(int httpPort) {
         this.httpPort = httpPort;
     }
 
@@ -506,11 +676,11 @@
         this.httpSendBufSize = httpSendBufSize;
     }
 
-    public String getHttpSSLport() {
+    public int getHttpSSLport() {
         return httpSSLport;
     }
 
-    public void setHttpSSLport(String httpSSLport) {
+    public void setHttpSSLport(int httpSSLport) {
         this.httpSSLport = httpSSLport;
     }
 
@@ -594,12 +764,20 @@
         this.rtmpModifyStamp = rtmpModifyStamp;
     }
 
-    public String getRtmpPort() {
+    public int getRtmpPort() {
         return rtmpPort;
     }
 
-    public void setRtmpPort(String 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() {
@@ -658,11 +836,11 @@
         this.rtpProxyDumpDir = rtpProxyDumpDir;
     }
 
-    public String getRtpProxyPort() {
+    public int getRtpProxyPort() {
         return rtpProxyPort;
     }
 
-    public void setRtpProxyPort(String rtpProxyPort) {
+    public void setRtpProxyPort(int rtpProxyPort) {
         this.rtpProxyPort = rtpProxyPort;
     }
 
@@ -698,19 +876,19 @@
         this.rtspKeepAliveSecond = rtspKeepAliveSecond;
     }
 
-    public String getRtspPort() {
+    public int getRtspPort() {
         return rtspPort;
     }
 
-    public void setRtspPort(String rtspPort) {
+    public void setRtspPort(int rtspPort) {
         this.rtspPort = rtspPort;
     }
 
-    public String getRtspSSlport() {
+    public int getRtspSSlport() {
         return rtspSSlport;
     }
 
-    public void setRtspSSlport(String rtspSSlport) {
+    public void setRtspSSlport(int rtspSSlport) {
         this.rtspSSlport = rtspSSlport;
     }
 
@@ -730,39 +908,307 @@
         this.shellPhell = shellPhell;
     }
 
-    public long getUpdateTime() {
-        return updateTime;
+    public Float getHookAliveInterval() {
+        return hookAliveInterval;
     }
 
-    public void setUpdateTime(long updateTime) {
-        this.updateTime = updateTime;
+    public void setHookAliveInterval(Float hookAliveInterval) {
+        this.hookAliveInterval = hookAliveInterval;
     }
 
-    public String getGeneralMediaServerId() {
-        return generalMediaServerId;
+    public String getPortRange() {
+        return portRange;
     }
 
-    public void setGeneralMediaServerId(String generalMediaServerId) {
-        this.generalMediaServerId = generalMediaServerId;
+    public void setPortRange(String portRange) {
+        this.portRange = portRange;
     }
 
-    public String getRtmpSslPort() {
-        return rtmpSslPort;
+    public String getApiSnapRoot() {
+        return apiSnapRoot;
     }
 
-    public void setRtmpSslPort(String rtmpSslPort) {
-        this.rtmpSslPort = rtmpSslPort;
+    public void setApiSnapRoot(String apiSnapRoot) {
+        this.apiSnapRoot = apiSnapRoot;
     }
 
-    public String getSdpIp() {
-        if (StringUtils.isEmpty(sdpIp)) {
-            return ip;
-        }else {
-            return sdpIp;
-        }
+    public String getApiDefaultSnap() {
+        return apiDefaultSnap;
     }
 
-    public void setSdpIp(String sdpIp) {
-        this.sdpIp = sdpIp;
+    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;
     }
 }

--
Gitblit v1.8.0