From 28f4f688dd37cbce7f7e2ff4a939d0701f2a8bbe Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期一, 19 十二月 2022 15:39:37 +0800
Subject: [PATCH] 优化语音遇到错误时主动终止对讲流程
---
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java | 23 ++++++++++++++++-------
1 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java
index feaaf90..6f40ef8 100644
--- a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java
+++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java
@@ -319,7 +319,7 @@
});
if ("rtsp".equals(param.getSchema())){
- logger.info("on_stream_changed锛氭敞鍐�->{}, app->{}, stream->{}", param.isRegist(), param.getApp(), param.getStream());
+ logger.info("娴佸彉鍖栵細娉ㄥ唽->{}, app->{}, stream->{}", param.isRegist(), param.getApp(), param.getStream());
if (param.isRegist()) {
mediaServerService.addCount(param.getMediaServerId());
}else {
@@ -399,7 +399,11 @@
}
}
+ }else {
+ logger.info("[璇煶瀵硅] 鏈壘鍒伴�氶亾锛歿}", channelId);
}
+ }else{
+ logger.info("[璇煶瀵硅] 鏈壘鍒拌澶囷細{}", deviceId);
}
}
}
@@ -525,17 +529,22 @@
if (platform != null) {
commanderFroPlatform.streamByeCmd(platform, sendRtpItem);
}else {
- if ("talk".equals(param.getApp()) && sendRtpItem.isOnlyAudio()) {
+ if (sendRtpItem.isOnlyAudio()) {
AudioBroadcastCatch audioBroadcastCatch = audioBroadcastManager.get(sendRtpItem.getDeviceId(), sendRtpItem.getChannelId());
- if (device != null && audioBroadcastCatch != null) {
-// cmder.streamByeCmd(device, sendRtpItem.getChannelId(), audioBroadcastCatch.getSipTransactionInfo(), null);
+ if (audioBroadcastCatch != null) {
+// playService.stopAudioBroadcast(device.getDeviceId(), sendRtpItem.getChannelId());
+ if ("talk".equals(param.getApp())) {
+// cmder.streamByeCmd(device, sendRtpItem.getChannelId(), audioBroadcastCatch.getSipTransactionInfo(), null);
+ }else {
+// cmder.streamByeCmd(device, sendRtpItem.getChannelId(), audioBroadcastCatch.getSipTransactionInfo(), null);
+ }
}
- }else {
- cmder.streamByeCmd(device, null, null, sendRtpItem.getCallId());
}
+
+
}
- } catch (SipException | InvalidArgumentException | ParseException | SsrcTransactionNotFoundException e) {
+ } catch (SipException | InvalidArgumentException | ParseException e) {
logger.error("[鍛戒护鍙戦�佸け璐 鍥芥爣绾ц仈 鍙戦�丅YE: {}", e.getMessage());
}
}
--
Gitblit v1.8.0