From b6e604f2449bb65dfaafb0f0741ba54ff0d2f9c2 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期二, 30 四月 2024 15:20:03 +0800
Subject: [PATCH] 修改云端录像详情页使用直接访问zlm的方式播放录像
---
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMMediaNodeServerService.java | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMMediaNodeServerService.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMMediaNodeServerService.java
index 8a9cafc..74a6fce 100644
--- a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMMediaNodeServerService.java
+++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMMediaNodeServerService.java
@@ -131,7 +131,11 @@
param.put("ssrc", ssrc);
}
JSONObject jsonObject = zlmresTfulUtils.stopSendRtp(mediaInfo, param);
- return (jsonObject != null && jsonObject.getInteger("code") == 0);
+ if (jsonObject == null || jsonObject.getInteger("code") != 0 ) {
+ logger.error("鍋滄鍙戞祦澶辫触: {}, 鍙傛暟锛歿}", jsonObject.getString("msg"), JSON.toJSONString(param));
+ throw new ControllerException(jsonObject.getInteger("code"), jsonObject.getString("msg"));
+ }
+ return true;
}
@@ -353,7 +357,7 @@
}
param.put("dst_url", sendRtpItem.getIp());
param.put("dst_port", sendRtpItem.getPort());
- JSONObject jsonObject = zlmServerFactory.startSendRtpStream(mediaServer, param);
+ JSONObject jsonObject = zlmresTfulUtils.startSendRtp(mediaServer, param);
if (jsonObject == null || jsonObject.getInteger("code") != 0 ) {
throw new ControllerException(jsonObject.getInteger("code"), jsonObject.getString("msg"));
}
--
Gitblit v1.8.0