From 681351d74040d64024c924a6d7da4e17b96d6a38 Mon Sep 17 00:00:00 2001
From: Dectinc Chen <github@dectinc.cc>
Date: 星期五, 16 四月 2021 17:22:44 +0800
Subject: [PATCH] fix typo and broken url
---
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/request/impl/AckRequestProcessor.java | 19 ++++++++++++++-----
1 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/request/impl/AckRequestProcessor.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/request/impl/AckRequestProcessor.java
index 20e1c80..c1e43e8 100644
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/request/impl/AckRequestProcessor.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/request/impl/AckRequestProcessor.java
@@ -43,14 +43,23 @@
SendRtpItem sendRtpItem = redisCatchStorage.querySendRTPServer(platformGbId, channelId);
String is_Udp = sendRtpItem.isTcp() ? "0" : "1";
String deviceId = sendRtpItem.getDeviceId();
- StreamInfo streamInfo = redisCatchStorage.queryPlayByDevice(deviceId, channelId);
- sendRtpItem.setStreamId(streamInfo.getStreamId());
+ StreamInfo streamInfo = null;
+ if (deviceId == null) {
+ streamInfo = new StreamInfo();
+ streamInfo.setApp(sendRtpItem.getApp());
+ streamInfo.setStreamId(sendRtpItem.getStreamId());
+ }else {
+ streamInfo = redisCatchStorage.queryPlayByDevice(deviceId, channelId);
+ sendRtpItem.setStreamId(streamInfo.getStreamId());
+ streamInfo.setApp("rtp");
+ }
+
redisCatchStorage.updateSendRTPSever(sendRtpItem);
System.out.println(platformGbId);
System.out.println(channelId);
Map<String, Object> param = new HashMap<>();
param.put("vhost","__defaultVhost__");
- param.put("app","rtp");
+ param.put("app",streamInfo.getApp());
param.put("stream",streamInfo.getStreamId());
param.put("ssrc", sendRtpItem.getSsrc());
param.put("dst_url",sendRtpItem.getIp());
@@ -63,13 +72,13 @@
while (!rtpPushed) {
try {
if (System.currentTimeMillis() - startTime < 30 * 1000) {
- if (zlmrtpServerFactory.isRtpReady(streamInfo.getStreamId())) {
+ if (zlmrtpServerFactory.isStreamReady(streamInfo.getApp(), streamInfo.getStreamId())) {
rtpPushed = true;
System.out.println("宸茶幏鍙栬澶囨帹娴侊紝寮�濮嬪悜涓婄骇鎺ㄦ祦");
zlmrtpServerFactory.startSendRtpStream(param);
} else {
System.out.println("绛夊緟璁惧鎺ㄦ祦.......");
- Thread.sleep(2000);
+ Thread.sleep(1000);
continue;
}
} else {
--
Gitblit v1.8.0