diff --git a/gb28181-service/src/main/java/cn/skcks/docking/gb28181/service/play/PlayService.java b/gb28181-service/src/main/java/cn/skcks/docking/gb28181/service/play/PlayService.java index 89a5523..0381074 100644 --- a/gb28181-service/src/main/java/cn/skcks/docking/gb28181/service/play/PlayService.java +++ b/gb28181-service/src/main/java/cn/skcks/docking/gb28181/service/play/PlayService.java @@ -3,6 +3,7 @@ package cn.skcks.docking.gb28181.service.play; import cn.skcks.docking.gb28181.common.json.JsonResponse; import cn.skcks.docking.gb28181.common.redis.RedisUtil; import cn.skcks.docking.gb28181.core.sip.gb28181.cache.CacheUtil; +import cn.skcks.docking.gb28181.media.config.ZlmMediaConfig; import cn.skcks.docking.gb28181.media.dto.rtp.GetRtpInfoResp; import cn.skcks.docking.gb28181.media.dto.rtp.OpenRtpServer; import cn.skcks.docking.gb28181.media.dto.rtp.OpenRtpServerResp; @@ -25,6 +26,7 @@ import java.util.concurrent.TimeUnit; @RequiredArgsConstructor public class PlayService { private static final String PREFIX = "RealTimePlay"; + private final ZlmMediaConfig mediaConfig; private final DockingDeviceService deviceService; private final ZlmMediaService zlmMediaService; private final SsrcService ssrcService; @@ -68,6 +70,11 @@ public class PlayService { return result; } + String ip = mediaConfig.getIp(); + StringBuilder sb = new StringBuilder(); + sb.append("v=0\r\n"); + sb.append("o=").append(channelId).append(" 0 0 IN IP4 ").append(ip).append("\r\n"); + return result; // zlmMediaService.getRtpInfo(); // GetMediaList getMediaList = new GetMediaList(); diff --git a/zlmediakit-service/src/main/java/cn/skcks/docking/gb28181/media/config/ZlmMediaConfig.java b/zlmediakit-service/src/main/java/cn/skcks/docking/gb28181/media/config/ZlmMediaConfig.java index 50e453b..f6c2dde 100644 --- a/zlmediakit-service/src/main/java/cn/skcks/docking/gb28181/media/config/ZlmMediaConfig.java +++ b/zlmediakit-service/src/main/java/cn/skcks/docking/gb28181/media/config/ZlmMediaConfig.java @@ -9,6 +9,7 @@ import org.springframework.context.annotation.Configuration; @ConfigurationProperties(prefix = "media") public class ZlmMediaConfig { private String url; + private String ip; private String id; private String secret; } diff --git a/zlmediakit-service/src/main/resources/application.yml b/zlmediakit-service/src/main/resources/application.yml index 77429eb..3000647 100644 --- a/zlmediakit-service/src/main/resources/application.yml +++ b/zlmediakit-service/src/main/resources/application.yml @@ -2,6 +2,7 @@ project: version: @project.version@ media: + ip: 10.10.10.200 url: 'http://10.10.10.200:5080' # url: 'http://10.10.10.200:12580/anything/' id: amrWMKmbKqoBjRQ9