| | |
| | | package com.genersoft.iot.vmp.service.impl; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.ArrayList; |
| | | import java.util.Collections; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | | |
| | | import com.genersoft.iot.vmp.media.zlm.ZLMRunner; |
| | | import com.genersoft.iot.vmp.service.IStreamProxyService; |
| | | import com.genersoft.iot.vmp.storager.IVideoManagerStorage; |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.alibaba.fastjson2.JSONArray; |
| | | import com.alibaba.fastjson2.JSONObject; |
| | |
| | | import okhttp3.OkHttpClient; |
| | | import okhttp3.Request; |
| | | import okhttp3.Response; |
| | | import java.time.LocalDateTime; |
| | | import java.util.*; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public SSRCInfo openRTPServer(MediaServerItem mediaServerItem, String streamId, String presetSsrc, boolean ssrcCheck, boolean isPlayback, Integer port) { |
| | | public SSRCInfo openRTPServer(MediaServerItem mediaServerItem, String streamId, String presetSsrc, boolean ssrcCheck, |
| | | boolean isPlayback, Integer port, Boolean onlyAuto) { |
| | | if (mediaServerItem == null || mediaServerItem.getId() == null) { |
| | | logger.info("[openRTPServer] 失败, mediaServerItem == null || mediaServerItem.getId() == null"); |
| | | return null; |
| | |
| | | } |
| | | int rtpServerPort; |
| | | if (mediaServerItem.isRtpEnable()) { |
| | | rtpServerPort = zlmrtpServerFactory.createRTPServer(mediaServerItem, streamId, ssrcCheck?Integer.parseInt(ssrc):0, port); |
| | | rtpServerPort = zlmrtpServerFactory.createRTPServer(mediaServerItem, streamId, ssrcCheck?Integer.parseInt(ssrc):0, port, onlyAuto); |
| | | } else { |
| | | rtpServerPort = mediaServerItem.getRtpProxyPort(); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public SSRCInfo openRTPServer(MediaServerItem mediaServerItem, String streamId, String ssrc, boolean ssrcCheck, boolean isPlayback) { |
| | | return openRTPServer(mediaServerItem, streamId, ssrc, ssrcCheck, isPlayback, null); |
| | | return openRTPServer(mediaServerItem, streamId, ssrc, ssrcCheck, isPlayback, null, null); |
| | | } |
| | | |
| | | @Override |