Commit 19c996774edc4fd915eb4d61008df7e42461405f

Authored by 648540858
1 parent 69bce3b6

合并主线

src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java
@@ -183,7 +183,7 @@ public class MediaServerServiceImpl implements IMediaServerService { @@ -183,7 +183,7 @@ public class MediaServerServiceImpl implements IMediaServerService {
183 } 183 }
184 int rtpServerPort; 184 int rtpServerPort;
185 if (mediaServerItem.isRtpEnable()) { 185 if (mediaServerItem.isRtpEnable()) {
186 - rtpServerPort = zlmServerFactory.createRTPServer(mediaServerItem, streamId, ssrcCheck?Integer.parseInt(ssrc):0, port, reUsePort, tcpMode); 186 + rtpServerPort = zlmServerFactory.createRTPServer(mediaServerItem, streamId, ssrcCheck?Integer.parseInt(ssrc):0, port,onlyAuto, reUsePort, tcpMode);
187 } else { 187 } else {
188 rtpServerPort = mediaServerItem.getRtpProxyPort(); 188 rtpServerPort = mediaServerItem.getRtpProxyPort();
189 } 189 }
src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java
@@ -100,9 +100,6 @@ public class PlayServiceImpl implements IPlayService { @@ -100,9 +100,6 @@ public class PlayServiceImpl implements IPlayService {
100 private ZLMRESTfulUtils zlmresTfulUtils; 100 private ZLMRESTfulUtils zlmresTfulUtils;
101 101
102 @Autowired 102 @Autowired
103 - private ZLMServerFactory zlmServerFactory;  
104 -  
105 - @Autowired  
106 private AssistRESTfulUtils assistRESTfulUtils; 103 private AssistRESTfulUtils assistRESTfulUtils;
107 104
108 @Autowired 105 @Autowired
@@ -626,7 +623,7 @@ public class PlayServiceImpl implements IPlayService { @@ -626,7 +623,7 @@ public class PlayServiceImpl implements IPlayService {
626 zlmresTfulUtils.getSnap(mediaServerItemInuse, streamUrl, 15, 1, path, fileName); 623 zlmresTfulUtils.getSnap(mediaServerItemInuse, streamUrl, 15, 1, path, fileName);
627 } 624 }
628 625
629 - private StreamInfo onPublishHandlerForPlay(MediaServerItem mediaServerItem, HookParam hookParam, String deviceId, String channelId) { 626 + public StreamInfo onPublishHandlerForPlay(MediaServerItem mediaServerItem, HookParam hookParam, String deviceId, String channelId) {
630 StreamInfo streamInfo = null; 627 StreamInfo streamInfo = null;
631 Device device = redisCatchStorage.getDevice(deviceId); 628 Device device = redisCatchStorage.getDevice(deviceId);
632 OnStreamChangedHookParam streamChangedHookParam = (OnStreamChangedHookParam)hookParam; 629 OnStreamChangedHookParam streamChangedHookParam = (OnStreamChangedHookParam)hookParam;
src/main/java/com/genersoft/iot/vmp/vmanager/rtp/RtpController.java
@@ -100,8 +100,8 @@ public class RtpController { @@ -100,8 +100,8 @@ public class RtpController {
100 } 100 }
101 } 101 }
102 String receiveKey = VideoManagerConstants.WVP_OTHER_RECEIVE_RTP_INFO + userSetting.getServerId() + "_" + callId + "_" + stream; 102 String receiveKey = VideoManagerConstants.WVP_OTHER_RECEIVE_RTP_INFO + userSetting.getServerId() + "_" + callId + "_" + stream;
103 - int localPortForVideo = zlmServerFactory.createRTPServer(mediaServerItem, stream, ssrcInt, null, false, tcpMode);  
104 - int localPortForAudio = zlmServerFactory.createRTPServer(mediaServerItem, stream + "_a" , ssrcInt, null, false, tcpMode); 103 + int localPortForVideo = zlmServerFactory.createRTPServer(mediaServerItem, stream, ssrcInt, null, false, false, tcpMode);
  104 + int localPortForAudio = zlmServerFactory.createRTPServer(mediaServerItem, stream + "_a" , ssrcInt, null, false, false, tcpMode);
105 if (localPortForVideo == 0 || localPortForAudio == 0) { 105 if (localPortForVideo == 0 || localPortForAudio == 0) {
106 throw new ControllerException(ErrorCode.ERROR100.getCode(), "获取端口失败"); 106 throw new ControllerException(ErrorCode.ERROR100.getCode(), "获取端口失败");
107 } 107 }