From 6b03568c5dd128a3d71c02fb1a3a76a4344a4920 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期一, 21 十一月 2022 17:07:54 +0800 Subject: [PATCH] 优化rtcp判断 --- src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRESTfulUtils.java | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 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 7d3510f..80f2940 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 @@ -78,6 +78,7 @@ if (callback == null) { try { Response response = client.newCall(request).execute(); + if (response.isSuccessful()) { ResponseBody responseBody = response.body(); if (responseBody != null) { @@ -85,6 +86,8 @@ responseJSON = JSON.parseObject(responseStr); } }else { + System.out.println( 2222); + System.out.println( response.code()); response.close(); Objects.requireNonNull(response.body()).close(); } @@ -93,11 +96,11 @@ if(e instanceof SocketTimeoutException){ //璇诲彇瓒呮椂瓒呮椂寮傚父 - logger.error(String.format("璇诲彇ZLM鏁版嵁澶辫触: %s, %s", url, e.getMessage())); + logger.error(String.format("璇诲彇ZLM鏁版嵁瓒呮椂澶辫触: %s, %s", url, e.getMessage())); } if(e instanceof ConnectException){ //鍒ゆ柇杩炴帴寮傚父锛屾垜杩欓噷鏄姤Failed to connect to 10.7.5.144 - logger.error(String.format("杩炴帴ZLM澶辫触: %s, %s", url, e.getMessage())); + logger.error(String.format("杩炴帴ZLM杩炴帴澶辫触: %s, %s", url, e.getMessage())); } }catch (Exception e){ @@ -279,6 +282,10 @@ return sendPost(mediaServerItem, "startSendRtp",param, null); } + public JSONObject startSendRtpPassive(MediaServerItem mediaServerItem, Map<String, Object> param) { + return sendPost(mediaServerItem, "startSendRtpPassive",param, null); + } + public JSONObject stopSendRtp(MediaServerItem mediaServerItem, Map<String, Object> param) { return sendPost(mediaServerItem, "stopSendRtp",param, null); } -- Gitblit v1.8.0