From 72b437cc52e2907c9a66d6bda60acbffc736cdb8 Mon Sep 17 00:00:00 2001 From: BradyXu <brady_xu@outlook.com> Date: 星期日, 12 五月 2024 02:15:41 +0800 Subject: [PATCH] 修复当上级平台点播时,上级平台和下级平台局域网不通时,导致推流失败。推流目标IP地址改为配置的SDP发流IP,如果SDP发流IP存在的话。否则还是从连接中获取推流目标IP --- src/main/java/com/genersoft/iot/vmp/media/zlm/AssistRESTfulUtils.java | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/AssistRESTfulUtils.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/AssistRESTfulUtils.java index d7c91df..6f6d5ea 100644 --- a/src/main/java/com/genersoft/iot/vmp/media/zlm/AssistRESTfulUtils.java +++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/AssistRESTfulUtils.java @@ -2,7 +2,7 @@ import com.alibaba.fastjson2.JSON; import com.alibaba.fastjson2.JSONObject; -import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem; +import com.genersoft.iot.vmp.media.bean.MediaServer; import com.genersoft.iot.vmp.utils.SSLSocketClientUtil; import okhttp3.*; import okhttp3.logging.HttpLoggingInterceptor; @@ -38,7 +38,7 @@ private OkHttpClient getClient(){ return getClient(null); } - + private OkHttpClient getClient(Integer readTimeOut){ if (client == null) { if (readTimeOut == null) { @@ -70,7 +70,7 @@ } - public JSONObject sendGet(MediaServerItem mediaServerItem, String api, Map<String, Object> param, RequestCallback callback) { + public JSONObject sendGet(MediaServer mediaServerItem, String api, Map<String, Object> param, RequestCallback callback) { OkHttpClient client = getClient(); if (mediaServerItem == null) { @@ -155,7 +155,7 @@ return responseJSON; } - public JSONObject sendPost(MediaServerItem mediaServerItem, String url, + public JSONObject sendPost(MediaServer mediaServerItem, String url, JSONObject param, ZLMRESTfulUtils.RequestCallback callback, Integer readTimeOut) { OkHttpClient client = getClient(readTimeOut); @@ -244,14 +244,14 @@ return responseJSON; } - public JSONObject getInfo(MediaServerItem mediaServerItem, RequestCallback callback){ + public JSONObject getInfo(MediaServer mediaServerItem, RequestCallback callback){ Map<String, Object> param = new HashMap<>(); return sendGet(mediaServerItem, "api/record/info",param, callback); } - public JSONObject addTask(MediaServerItem mediaServerItem, String app, String stream, String startTime, + public JSONObject addTask(MediaServer mediaServerItem, String app, String stream, String startTime, String endTime, String callId, List<String> filePathList, String remoteHost) { - + JSONObject videoTaskInfoJSON = new JSONObject(); videoTaskInfoJSON.put("app", app); videoTaskInfoJSON.put("stream", stream); @@ -266,7 +266,7 @@ return sendPost(mediaServerItem, urlStr, videoTaskInfoJSON, null, 30); } - public JSONObject queryTaskList(MediaServerItem mediaServerItem, String app, String stream, String callId, + public JSONObject queryTaskList(MediaServer mediaServerItem, String app, String stream, String callId, String taskId, Boolean isEnd, String scheme) { Map<String, Object> param = new HashMap<>(); if (!ObjectUtils.isEmpty(app)) { -- Gitblit v1.8.0