|
|
@@ -1,16 +1,5 @@
|
|
|
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;
|
|
|
@@ -39,8 +28,6 @@ import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
|
|
|
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;
|
|
|
@@ -134,7 +121,8 @@ public class MediaServerServiceImpl implements IMediaServerService {
|
|
|
}
|
|
|
|
|
|
@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;
|
|
|
@@ -163,7 +151,7 @@ public class MediaServerServiceImpl implements IMediaServerService {
|
|
|
}
|
|
|
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();
|
|
|
}
|
|
|
@@ -174,7 +162,7 @@ public class MediaServerServiceImpl implements IMediaServerService {
|
|
|
|
|
|
@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
|