From fec69c714c632eaed01f77cb419d1d6a02e273ea Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期日, 25 六月 2023 22:40:26 +0800
Subject: [PATCH] 优化国标信令
---
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/ByeRequestProcessor.java | 21 ++++-----------------
1 files changed, 4 insertions(+), 17 deletions(-)
diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/ByeRequestProcessor.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/ByeRequestProcessor.java
index 43e1ef8..eea0cb4 100644
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/ByeRequestProcessor.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/ByeRequestProcessor.java
@@ -142,13 +142,8 @@
// 鍙兘鏄澶囦富鍔ㄥ仠姝�
Device device = storager.queryVideoDeviceByChannelId(platformGbId);
if (device != null) {
- SsrcTransaction ssrcTransactionForPlay = null;
- if (device.isSwitchPrimarySubStream() ) {
- ssrcTransactionForPlay = streamSession.getSsrcTransaction(device.getDeviceId(), channelId, "switch-play", null);
- } else {
- storager.stopPlay(device.getDeviceId(), channelId);
- ssrcTransactionForPlay = streamSession.getSsrcTransaction(device.getDeviceId(), channelId, "play", null);
- }
+ storager.stopPlay(device.getDeviceId(), channelId);
+ SsrcTransaction ssrcTransactionForPlay = streamSession.getSsrcTransaction(device.getDeviceId(), channelId, "play", null);
if (ssrcTransactionForPlay != null){
if (ssrcTransactionForPlay.getCallId().equals(callIdHeader.getCallId())){
// 閲婃斁ssrc
@@ -158,16 +153,8 @@
}
streamSession.remove(device.getDeviceId(), channelId, ssrcTransactionForPlay.getStream());
}
- InviteInfo inviteInfo = null;
- if (device.isSwitchPrimarySubStream() ) {
- String streamType = ssrcTransactionForPlay.getStream().split("_")[0];
- boolean isSubStream = "sub".equals(streamType);
- inviteInfo = inviteStreamService.getInviteInfoByDeviceAndChannel(InviteSessionType.PLAY, device.getDeviceId(), channelId,isSubStream);
- inviteStreamService.removeInviteInfo(inviteInfo.getType(),inviteInfo.getDeviceId(),inviteInfo.getChannelId(),isSubStream,inviteInfo.getStream());
- }else {
- inviteInfo = inviteStreamService.getInviteInfoByDeviceAndChannel(InviteSessionType.PLAY, device.getDeviceId(), channelId);
- inviteStreamService.removeInviteInfo(inviteInfo);
- }
+ InviteInfo inviteInfo = inviteStreamService.getInviteInfoByDeviceAndChannel(InviteSessionType.PLAY, device.getDeviceId(), channelId);
+ inviteStreamService.removeInviteInfo(inviteInfo);
if (inviteInfo != null) {
if (inviteInfo.getStreamInfo() != null) {
mediaServerService.closeRTPServer(inviteInfo.getStreamInfo().getMediaServerId(), inviteInfo.getStream());
--
Gitblit v1.8.0