From ba8fffd907b5c3a7acfd3348c80e557b816cec98 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期一, 03 七月 2023 16:53:03 +0800 Subject: [PATCH] 增加与第三方对接的接口 --- src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRESTfulUtils.java | 18 +++++++++++++++--- 1 files changed, 15 insertions(+), 3 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 56af604..13f3240 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 @@ -36,7 +36,7 @@ // 璁剧疆杩炴帴瓒呮椂鏃堕棿 httpClientBuilder.connectTimeout(5,TimeUnit.SECONDS); // 璁剧疆璇诲彇瓒呮椂鏃堕棿 - httpClientBuilder.readTimeout(5,TimeUnit.SECONDS); + httpClientBuilder.readTimeout(10,TimeUnit.SECONDS); // 璁剧疆杩炴帴姹� httpClientBuilder.connectionPool(new ConnectionPool(16, 5, TimeUnit.MINUTES)); if (logger.isDebugEnabled()) { @@ -276,6 +276,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); } @@ -323,9 +327,9 @@ sendPost(mediaServerItem, "kick_sessions",param, null); } - public void getSnap(MediaServerItem mediaServerItem, String flvUrl, int timeout_sec, int expire_sec, String targetPath, String fileName) { + public void getSnap(MediaServerItem mediaServerItem, String streamUrl, int timeout_sec, int expire_sec, String targetPath, String fileName) { Map<String, Object> param = new HashMap<>(3); - param.put("url", flvUrl); + param.put("url", streamUrl); param.put("timeout_sec", timeout_sec); param.put("expire_sec", expire_sec); sendGetForImg(mediaServerItem, "getSnap", param, targetPath, fileName); @@ -342,4 +346,12 @@ 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); + } } -- Gitblit v1.8.0