From 4ca97d3174f28829910526f7cd5696afc69f66c9 Mon Sep 17 00:00:00 2001
From: chenghong <24211317@qq.com>
Date: 星期三, 09 八月 2023 16:18:19 +0800
Subject: [PATCH] 平台保活消息增加回复200OK
---
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMServerFactory.java | 33 ++++++++++++++++++---------------
1 files changed, 18 insertions(+), 15 deletions(-)
diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMServerFactory.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMServerFactory.java
index d9c1fc8..bec072c 100644
--- a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMServerFactory.java
+++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMServerFactory.java
@@ -86,7 +86,10 @@
}else {
param.put("port", port);
}
- param.put("ssrc", ssrc);
+ if (ssrc != 0) {
+ param.put("ssrc", ssrc);
+ }
+
JSONObject openRtpServerResultJson = zlmresTfulUtils.openRtpServer(mediaServerItem, param);
logger.info(JSONObject.toJSONString(openRtpServerResultJson));
if (openRtpServerResultJson != null) {
@@ -161,13 +164,9 @@
public SendRtpItem createSendRtpItem(MediaServerItem serverItem, String ip, int port, String ssrc, String platformId,
String deviceId, String channelId, boolean tcp, boolean rtcp){
- // 榛樿涓洪殢鏈虹鍙�
- int localPort = 0;
- if (userSetting.getGbSendStreamStrict()) {
- localPort = sendRtpPortManager.getNextPort(serverItem.getId());
- if (localPort == 0) {
- return null;
- }
+ int localPort = sendRtpPortManager.getNextPort(serverItem);
+ if (localPort == 0) {
+ return null;
}
SendRtpItem sendRtpItem = new SendRtpItem();
sendRtpItem.setIp(ip);
@@ -197,13 +196,10 @@
*/
public SendRtpItem createSendRtpItem(MediaServerItem serverItem, String ip, int port, String ssrc, String platformId,
String app, String stream, String channelId, boolean tcp, boolean rtcp){
- // 榛樿涓洪殢鏈虹鍙�
- int localPort = 0;
- if (userSetting.getGbSendStreamStrict()) {
- localPort = sendRtpPortManager.getNextPort(serverItem.getId());
- if (localPort == 0) {
- return null;
- }
+
+ int localPort = sendRtpPortManager.getNextPort(serverItem);
+ if (localPort == 0) {
+ return null;
}
SendRtpItem sendRtpItem = new SendRtpItem();
sendRtpItem.setIp(ip);
@@ -229,6 +225,13 @@
}
/**
+ * 璋冪敤zlm RESTFUL API 鈥斺�� startSendRtpPassive
+ */
+ public JSONObject startSendRtpStreamForPassive(MediaServerItem mediaServerItem, Map<String, Object>param) {
+ return zlmresTfulUtils.startSendRtpPassive(mediaServerItem, param);
+ }
+
+ /**
* 鏌ヨ寰呰浆鎺ㄧ殑娴佹槸鍚﹀氨缁�
*/
public Boolean isRtpReady(MediaServerItem mediaServerItem, String streamId) {
--
Gitblit v1.8.0