Commit d8011e9ee7b624bb2641c629e42d81f9665974fc
1 parent
cb1f1417
去除只有udp收流支持ssrc校验的判断
Showing
3 changed files
with
7 additions
and
2 deletions
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java
| @@ -615,15 +615,16 @@ public class SIPCommander implements ISIPCommander { | @@ -615,15 +615,16 @@ public class SIPCommander implements ISIPCommander { | ||
| 615 | public void streamByeCmd(Device device, String channelId, String stream, String callId, SipSubscribe.Event okEvent) throws InvalidArgumentException, SipException, ParseException, SsrcTransactionNotFoundException { | 615 | public void streamByeCmd(Device device, String channelId, String stream, String callId, SipSubscribe.Event okEvent) throws InvalidArgumentException, SipException, ParseException, SsrcTransactionNotFoundException { |
| 616 | List<SsrcTransaction> ssrcTransactionList = streamSession.getSsrcTransactionForAll(device.getDeviceId(), channelId, callId, stream); | 616 | List<SsrcTransaction> ssrcTransactionList = streamSession.getSsrcTransactionForAll(device.getDeviceId(), channelId, callId, stream); |
| 617 | if (ssrcTransactionList == null || ssrcTransactionList.isEmpty()) { | 617 | if (ssrcTransactionList == null || ssrcTransactionList.isEmpty()) { |
| 618 | + logger.info("[发送BYE] 未找到事务信息,设备: device: {}, channel: {}", device.getDeviceId(), channelId); | ||
| 618 | throw new SsrcTransactionNotFoundException(device.getDeviceId(), channelId, callId, stream); | 619 | throw new SsrcTransactionNotFoundException(device.getDeviceId(), channelId, callId, stream); |
| 619 | } | 620 | } |
| 620 | 621 | ||
| 621 | for (SsrcTransaction ssrcTransaction : ssrcTransactionList) { | 622 | for (SsrcTransaction ssrcTransaction : ssrcTransactionList) { |
| 623 | + logger.info("[发送BYE] 设备: device: {}, channel: {}, callId: {}", device.getDeviceId(), channelId, ssrcTransaction.getCallId()); | ||
| 622 | mediaServerService.releaseSsrc(ssrcTransaction.getMediaServerId(), ssrcTransaction.getSsrc()); | 624 | mediaServerService.releaseSsrc(ssrcTransaction.getMediaServerId(), ssrcTransaction.getSsrc()); |
| 623 | 625 | ||
| 624 | mediaServerService.closeRTPServer(ssrcTransaction.getMediaServerId(), ssrcTransaction.getStream()); | 626 | mediaServerService.closeRTPServer(ssrcTransaction.getMediaServerId(), ssrcTransaction.getStream()); |
| 625 | streamSession.removeByCallId(ssrcTransaction.getDeviceId(), ssrcTransaction.getChannelId(), ssrcTransaction.getCallId()); | 627 | streamSession.removeByCallId(ssrcTransaction.getDeviceId(), ssrcTransaction.getChannelId(), ssrcTransaction.getCallId()); |
| 626 | - | ||
| 627 | Request byteRequest = headerProvider.createByteRequest(device, channelId, ssrcTransaction.getSipTransactionInfo()); | 628 | Request byteRequest = headerProvider.createByteRequest(device, channelId, ssrcTransaction.getSipTransactionInfo()); |
| 628 | sipSender.transmitRequest(sipLayer.getLocalIp(device.getLocalIp()), byteRequest, null, okEvent); | 629 | sipSender.transmitRequest(sipLayer.getLocalIp(device.getLocalIp()), byteRequest, null, okEvent); |
| 629 | } | 630 | } |
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java
| @@ -534,11 +534,15 @@ public class ZLMHttpHookListener { | @@ -534,11 +534,15 @@ public class ZLMHttpHookListener { | ||
| 534 | if (info != null) { | 534 | if (info != null) { |
| 535 | cmder.streamByeCmd(device, inviteInfo.getChannelId(), | 535 | cmder.streamByeCmd(device, inviteInfo.getChannelId(), |
| 536 | inviteInfo.getStream(), null); | 536 | inviteInfo.getStream(), null); |
| 537 | + }else { | ||
| 538 | + logger.info("[无人观看] 未找到设备的点播信息: {}, 流:{}", inviteInfo.getDeviceId(), param.getStream()); | ||
| 537 | } | 539 | } |
| 538 | } catch (InvalidArgumentException | ParseException | SipException | | 540 | } catch (InvalidArgumentException | ParseException | SipException | |
| 539 | SsrcTransactionNotFoundException e) { | 541 | SsrcTransactionNotFoundException e) { |
| 540 | logger.error("[无人观看]点播, 发送BYE失败 {}", e.getMessage()); | 542 | logger.error("[无人观看]点播, 发送BYE失败 {}", e.getMessage()); |
| 541 | } | 543 | } |
| 544 | + }else { | ||
| 545 | + logger.info("[无人观看] 未找到设备: {},流:{}", inviteInfo.getDeviceId(), param.getStream()); | ||
| 542 | } | 546 | } |
| 543 | 547 | ||
| 544 | inviteStreamService.removeInviteInfo(inviteInfo.getType(), inviteInfo.getDeviceId(), | 548 | inviteStreamService.removeInviteInfo(inviteInfo.getType(), inviteInfo.getDeviceId(), |
src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java
| @@ -170,7 +170,7 @@ public class MediaServerServiceImpl implements IMediaServerService { | @@ -170,7 +170,7 @@ public class MediaServerServiceImpl implements IMediaServerService { | ||
| 170 | } | 170 | } |
| 171 | int rtpServerPort; | 171 | int rtpServerPort; |
| 172 | if (mediaServerItem.isRtpEnable()) { | 172 | if (mediaServerItem.isRtpEnable()) { |
| 173 | - rtpServerPort = zlmServerFactory.createRTPServer(mediaServerItem, streamId, (ssrcCheck && tcpMode == 0) ? Long.parseLong(ssrc) : 0, port, reUsePort, tcpMode); | 173 | + rtpServerPort = zlmServerFactory.createRTPServer(mediaServerItem, streamId, ssrcCheck ? Long.parseLong(ssrc) : 0, port, reUsePort, tcpMode); |
| 174 | } else { | 174 | } else { |
| 175 | rtpServerPort = mediaServerItem.getRtpProxyPort(); | 175 | rtpServerPort = mediaServerItem.getRtpProxyPort(); |
| 176 | } | 176 | } |