From 4a0f5cf76dac6d82a7c6c576012c37db203308ff Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期二, 10 五月 2022 10:11:46 +0800
Subject: [PATCH] 去除调试内容
---
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/InviteRequestProcessor.java | 13 +++++++++----
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/AckRequestProcessor.java | 6 +++---
2 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/AckRequestProcessor.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/AckRequestProcessor.java
index 873a0a3..ae0c1b9 100644
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/AckRequestProcessor.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/AckRequestProcessor.java
@@ -96,9 +96,9 @@
param.put("src_port", sendRtpItem.getLocalPort());
param.put("pt", sendRtpItem.getPt());
param.put("use_ps", sendRtpItem.isUsePs() ? "1" : "0");
- param.put("only_audio", sendRtpItem.isOnlyAudio());
- zlmrtpServerFactory.startSendRtpStream(mediaInfo, param);
-
+ param.put("only_audio", sendRtpItem.isOnlyAudio() ? "1" : "0");
+ JSONObject jsonObject = zlmrtpServerFactory.startSendRtpStream(mediaInfo, param);
+ System.out.println(jsonObject);
// if (streamInfo == null) { // 娴佽繕娌′笂鏉ワ紝瀵规柟灏卞洖澶峚ck
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