From ca103731c721aae3f5f622e58c679ed5c09fd9e9 Mon Sep 17 00:00:00 2001
From: Kairlec <sunfokairlec@gmail.com>
Date: 星期一, 15 五月 2023 16:26:37 +0800
Subject: [PATCH] fix response `content-type` is not set if access without access token

---
 src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRESTfulUtils.java |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRESTfulUtils.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRESTfulUtils.java
index a289197..a2fd1e3 100644
--- a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRESTfulUtils.java
+++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRESTfulUtils.java
@@ -25,6 +25,8 @@
 
     private OkHttpClient client;
 
+
+
     public interface RequestCallback{
         void run(JSONObject response);
     }
@@ -276,6 +278,10 @@
         return sendPost(mediaServerItem, "closeRtpServer",param, null);
     }
 
+    public void closeRtpServer(MediaServerItem mediaServerItem, Map<String, Object> param, RequestCallback callback) {
+        sendPost(mediaServerItem, "closeRtpServer",param, callback);
+    }
+
     public JSONObject listRtpServer(MediaServerItem mediaServerItem) {
         return sendPost(mediaServerItem, "listRtpServer",null, null);
     }
@@ -342,4 +348,19 @@
         param.put("stream_id", streamId);
         return sendPost(mediaServerItem, "resumeRtpCheck",param, null);
     }
+
+    public JSONObject connectRtpServer(MediaServerItem mediaServerItem, String dst_url, int dst_port, String stream_id) {
+        Map<String, Object> param = new HashMap<>(1);
+        param.put("dst_url", dst_url);
+        param.put("dst_port", dst_port);
+        param.put("stream_id", stream_id);
+        return sendPost(mediaServerItem, "connectRtpServer",param, null);
+    }
+
+    public JSONObject updateRtpServerSSRC(MediaServerItem mediaServerItem, String streamId, String ssrc) {
+        Map<String, Object> param = new HashMap<>(1);
+        param.put("ssrc", ssrc);
+        param.put("stream_id", streamId);
+        return sendPost(mediaServerItem, "updateRtpServerSSRC",param, null);
+    }
 }

--
Gitblit v1.8.0