修复点播端口为空

pull/1411/head
648540858 2024-04-09 10:59:59 +08:00
parent bbf19c7909
commit 6dd870e74c
3 changed files with 52 additions and 35 deletions

View File

@ -212,41 +212,58 @@ public class MediaConfig{
} }
public MediaServer getMediaSerItem(){ public MediaServer getMediaSerItem(){
MediaServer mediaServerItem = new MediaServer(); MediaServer mediaServer = new MediaServer();
mediaServerItem.setId(id); mediaServer.setId(id);
mediaServerItem.setIp(ip); mediaServer.setIp(ip);
mediaServerItem.setDefaultServer(true); mediaServer.setDefaultServer(true);
mediaServerItem.setHookIp(getHookIp()); mediaServer.setHookIp(getHookIp());
mediaServerItem.setSdpIp(getSdpIp()); mediaServer.setSdpIp(getSdpIp());
mediaServerItem.setStreamIp(getStreamIp()); mediaServer.setStreamIp(getStreamIp());
mediaServerItem.setHttpPort(httpPort); mediaServer.setHttpPort(httpPort);
mediaServerItem.setFlvPort(flvPort); if (flvPort == 0) {
mediaServerItem.setWsFlvPort(wsFlvPort); mediaServer.setFlvPort(httpPort);
mediaServerItem.setHttpSSlPort(httpSSlPort); }else {
mediaServerItem.setFlvSSLPort(flvSSlPort); mediaServer.setFlvPort(flvPort);
mediaServerItem.setWsFlvSSLPort(wsFlvSSlPort); }
mediaServerItem.setRtmpPort(rtmpPort); if (wsFlvPort == 0) {
mediaServerItem.setRtmpSSlPort(rtmpSSlPort); mediaServer.setWsFlvPort(httpPort);
mediaServerItem.setRtpProxyPort(getRtpProxyPort()); }else {
mediaServerItem.setRtspPort(rtspPort); mediaServer.setWsFlvPort(wsFlvPort);
mediaServerItem.setRtspSSLPort(rtspSSLPort); }
mediaServerItem.setAutoConfig(autoConfig); if (flvSSlPort == 0) {
mediaServerItem.setSecret(secret); mediaServer.setFlvSSLPort(httpSSlPort);
mediaServerItem.setRtpEnable(rtpEnable); }else {
mediaServerItem.setRtpPortRange(rtpPortRange); mediaServer.setFlvSSLPort(flvSSlPort);
mediaServerItem.setSendRtpPortRange(rtpSendPortRange); }
mediaServerItem.setRecordAssistPort(recordAssistPort); if (wsFlvSSlPort == 0) {
mediaServerItem.setHookAliveInterval(10f); mediaServer.setWsFlvSSLPort(httpSSlPort);
mediaServerItem.setRecordDay(recordDay); }else {
mediaServerItem.setStatus(false); mediaServer.setWsFlvSSLPort(wsFlvSSlPort);
mediaServerItem.setType(type);
if (recordPath != null) {
mediaServerItem.setRecordPath(recordPath);
} }
mediaServerItem.setCreateTime(DateUtil.getNow());
mediaServerItem.setUpdateTime(DateUtil.getNow());
return mediaServerItem; mediaServer.setHttpSSlPort(httpSSlPort);
mediaServer.setRtmpPort(rtmpPort);
mediaServer.setRtmpSSlPort(rtmpSSlPort);
mediaServer.setRtpProxyPort(getRtpProxyPort());
mediaServer.setRtspPort(rtspPort);
mediaServer.setRtspSSLPort(rtspSSLPort);
mediaServer.setAutoConfig(autoConfig);
mediaServer.setSecret(secret);
mediaServer.setRtpEnable(rtpEnable);
mediaServer.setRtpPortRange(rtpPortRange);
mediaServer.setSendRtpPortRange(rtpSendPortRange);
mediaServer.setRecordAssistPort(recordAssistPort);
mediaServer.setHookAliveInterval(10f);
mediaServer.setRecordDay(recordDay);
mediaServer.setStatus(false);
mediaServer.setType(type);
if (recordPath != null) {
mediaServer.setRecordPath(recordPath);
}
mediaServer.setCreateTime(DateUtil.getNow());
mediaServer.setUpdateTime(DateUtil.getNow());
return mediaServer;
} }
public Integer getRecordDay() { public Integer getRecordDay() {

View File

@ -27,7 +27,7 @@ public interface MediaServerMapper {
"flv_port," + "flv_port," +
"flv_ssl_port," + "flv_ssl_port," +
"ws_flv_port," + "ws_flv_port," +
"ws_flv_ssl__port," + "ws_flv_ssl_port," +
"rtsp_ssl_port,"+ "rtsp_ssl_port,"+
"auto_config,"+ "auto_config,"+
"secret,"+ "secret,"+

View File

@ -2,4 +2,4 @@ spring:
application: application:
name: wvp name: wvp
profiles: profiles:
active: abl active: local