Browse Source

docker镜像使用自动生成的配置文件,修复#166

pull/174/head
648540858 3 years ago
parent
commit
715c7d2724
  1. 1
      DOCKERFILE
  2. 10
      src/main/java/com/genersoft/iot/vmp/conf/MediaConfig.java

1
DOCKERFILE

@ -68,6 +68,7 @@ RUN mkdir -p /opt/media && \
cd build && \ cd build && \
cmake -DCMAKE_BUILD_TYPE=Release .. && \ cmake -DCMAKE_BUILD_TYPE=Release .. && \
make -j4 && \ make -j4 && \
rm -rf ../release/linux/Release/config.ini && \
cp -r ../release/linux/Release/* /opt/media && \ cp -r ../release/linux/Release/* /opt/media && \
mkdir -p /opt/media/www/record mkdir -p /opt/media/www/record

10
src/main/java/com/genersoft/iot/vmp/conf/MediaConfig.java

@ -93,8 +93,12 @@ public class MediaConfig{
} }
public String getSipIp() { public String getSipIp() {
if (sipIp == null) {
return this.ip;
}else {
return sipIp; return sipIp;
} }
}
public int getHttpPort() { public int getHttpPort() {
return httpPort; return httpPort;
@ -183,13 +187,13 @@ public class MediaConfig{
mediaServerItem.setIp(ip); mediaServerItem.setIp(ip);
mediaServerItem.setDefaultServer(true); mediaServerItem.setDefaultServer(true);
mediaServerItem.setHookIp(getHookIp()); mediaServerItem.setHookIp(getHookIp());
mediaServerItem.setSdpIp(sdpIp); mediaServerItem.setSdpIp(getSdpIp());
mediaServerItem.setStreamIp(streamIp); mediaServerItem.setStreamIp(getStreamIp());
mediaServerItem.setHttpPort(httpPort); mediaServerItem.setHttpPort(httpPort);
mediaServerItem.setHttpSSlPort(httpSSlPort); mediaServerItem.setHttpSSlPort(httpSSlPort);
mediaServerItem.setRtmpPort(rtmpPort); mediaServerItem.setRtmpPort(rtmpPort);
mediaServerItem.setRtmpSSlPort(rtmpSSlPort); mediaServerItem.setRtmpSSlPort(rtmpSSlPort);
mediaServerItem.setRtpProxyPort(rtpProxyPort); mediaServerItem.setRtpProxyPort(getRtpProxyPort());
mediaServerItem.setRtspPort(rtspPort); mediaServerItem.setRtspPort(rtspPort);
mediaServerItem.setRtspSSLPort(rtspSSLPort); mediaServerItem.setRtspSSLPort(rtspSSLPort);
mediaServerItem.setAutoConfig(autoConfig); mediaServerItem.setAutoConfig(autoConfig);

Loading…
Cancel
Save