From 65fa75fb448fe9ab7bec84559616006730149509 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期二, 10 五月 2022 11:02:02 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/wvp-28181-2.0' into commercial
---
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/InviteRequestProcessor.java | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/InviteRequestProcessor.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/InviteRequestProcessor.java
index ae49e2c..12bfd7f 100644
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/InviteRequestProcessor.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/InviteRequestProcessor.java
@@ -671,6 +671,9 @@
sendRtpItem.setStatus(1);
sendRtpItem.setApp(app);
sendRtpItem.setStreamId(stream);
+ sendRtpItem.setPt(8);
+ sendRtpItem.setUsePs(false);
+ sendRtpItem.setOnlyAudio(true);
redisCatchStorage.updateSendRTPSever(sendRtpItem);
// hook鐩戝惉绛夊緟璁惧鎺ㄦ祦涓婃潵
@@ -683,6 +686,8 @@
subscribeKey.put("mediaServerId", mediaServerItem.getId());
String finalSsrc = ssrc;
String waiteStreamTimeoutTaskKey = "waite-stream-" + device.getDeviceId() + channelId;
+
+ // 娴佸凡缁忓瓨鍦ㄦ椂鐩存帴鎺ㄦ祦
if (zlmrtpServerFactory.isStreamReady(mediaServerItem, app, stream)) {
logger.info("鍙戠幇宸茬粡鍦ㄦ帹娴�");
dynamicTask.stop(waiteStreamTimeoutTaskKey);
@@ -714,12 +719,12 @@
throw new RuntimeException(e);
}
}else {
+ // 娴佷笉瀛樺湪鏃剁洃鍚祦涓婄嚎
// 璁剧疆绛夊緟鎺ㄦ祦鐨勮秴鏃�; 榛樿20s
- String finalChannelId = channelId;
dynamicTask.startDelay(waiteStreamTimeoutTaskKey, ()->{
logger.info("绛夊緟鎺ㄦ祦瓒呮椂: {}/{}", app, stream);
- if (audioBroadcastManager.exit(device.getDeviceId(), finalChannelId)) {
- audioBroadcastManager.del(device.getDeviceId(), finalChannelId);
+ if (audioBroadcastManager.exit(device.getDeviceId(), channelId)) {
+ audioBroadcastManager.del(device.getDeviceId(), channelId);
}else {
// 鍏煎娴峰悍浣跨敤浜嗛敊璇殑閫氶亾ID鐨勬儏鍐�
audioBroadcastManager.delByDeviceId(device.getDeviceId());
@@ -741,7 +746,7 @@
redisCatchStorage.updateSendRTPSever(sendRtpItem);
StringBuffer content = new StringBuffer(200);
content.append("v=0\r\n");
- content.append("o="+ finalChannelId +" 0 0 IN IP4 "+mediaServerItem.getSdpIp()+"\r\n");
+ content.append("o="+ channelId +" 0 0 IN IP4 "+mediaServerItem.getSdpIp()+"\r\n");
content.append("s=Play\r\n");
content.append("c=IN IP4 "+mediaServerItem.getSdpIp()+"\r\n");
content.append("t=0 0\r\n");
--
Gitblit v1.8.0