Commit 19c996774edc4fd915eb4d61008df7e42461405f
1 parent
69bce3b6
合并主线
Showing
3 changed files
with
4 additions
and
7 deletions
src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java
| ... | ... | @@ -183,7 +183,7 @@ public class MediaServerServiceImpl implements IMediaServerService { |
| 183 | 183 | } |
| 184 | 184 | int rtpServerPort; |
| 185 | 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 | 187 | } else { |
| 188 | 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 | 100 | private ZLMRESTfulUtils zlmresTfulUtils; |
| 101 | 101 | |
| 102 | 102 | @Autowired |
| 103 | - private ZLMServerFactory zlmServerFactory; | |
| 104 | - | |
| 105 | - @Autowired | |
| 106 | 103 | private AssistRESTfulUtils assistRESTfulUtils; |
| 107 | 104 | |
| 108 | 105 | @Autowired |
| ... | ... | @@ -626,7 +623,7 @@ public class PlayServiceImpl implements IPlayService { |
| 626 | 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 | 627 | StreamInfo streamInfo = null; |
| 631 | 628 | Device device = redisCatchStorage.getDevice(deviceId); |
| 632 | 629 | OnStreamChangedHookParam streamChangedHookParam = (OnStreamChangedHookParam)hookParam; | ... | ... |
src/main/java/com/genersoft/iot/vmp/vmanager/rtp/RtpController.java
| ... | ... | @@ -100,8 +100,8 @@ public class RtpController { |
| 100 | 100 | } |
| 101 | 101 | } |
| 102 | 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 | 105 | if (localPortForVideo == 0 || localPortForAudio == 0) { |
| 106 | 106 | throw new ControllerException(ErrorCode.ERROR100.getCode(), "获取端口失败"); |
| 107 | 107 | } | ... | ... |