From d7a1b94f905c5f28c9c8f2d48c3f9e28ebcf9cc4 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期六, 24 九月 2022 21:04:58 +0800 Subject: [PATCH] Merge branch 'wvp-28181-2.0' --- src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRTPServerFactory.java | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRTPServerFactory.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRTPServerFactory.java index f1f4072..80ae95e 100644 --- a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRTPServerFactory.java +++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRTPServerFactory.java @@ -284,6 +284,13 @@ } /** + * 璋冪敤zlm RESTFUL API 鈥斺�� startSendRtpPassive + */ + public JSONObject startSendRtpPassive(MediaServerItem mediaServerItem, Map<String, Object>param) { + return zlmresTfulUtils.startSendRtpPassive(mediaServerItem, param); + } + + /** * 鏌ヨ寰呰浆鎺ㄧ殑娴佹槸鍚﹀氨缁� */ public Boolean isRtpReady(MediaServerItem mediaServerItem, String streamId) { @@ -312,11 +319,11 @@ return 0; } Integer code = mediaInfo.getInteger("code"); - if ( code < 0) { + if (code < 0) { logger.warn("鏌ヨ娴�({}/{})鏄惁鏈夊叾瀹冭鐪嬭�呮椂寰楀埌锛� {}", app, streamId, mediaInfo.getString("msg")); return -1; } - if ( code == 0 && mediaInfo.getBoolean("online") != null && !mediaInfo.getBoolean("online")) { + if ( code == 0 && mediaInfo.getBoolean("online") != null && ! mediaInfo.getBoolean("online")) { logger.warn("鏌ヨ娴�({}/{})鏄惁鏈夊叾瀹冭鐪嬭�呮椂寰楀埌锛� {}", app, streamId, mediaInfo.getString("msg")); return -1; } @@ -330,12 +337,12 @@ Boolean result = false; JSONObject jsonObject = zlmresTfulUtils.stopSendRtp(mediaServerItem, param); if (jsonObject == null) { - logger.error("鍋滄RTP鎺ㄦ祦澶辫触: 璇锋鏌LM鏈嶅姟"); + logger.error("[鍋滄RTP鎺ㄦ祦] 澶辫触: 璇锋鏌LM鏈嶅姟"); } else if (jsonObject.getInteger("code") == 0) { result= true; - logger.info("鍋滄RTP鎺ㄦ祦鎴愬姛"); + logger.info("[鍋滄RTP鎺ㄦ祦] 鎴愬姛"); } else { - logger.error("鍋滄RTP鎺ㄦ祦澶辫触: {}, 鍙傛暟锛歿}",jsonObject.getString("msg"),JSONObject.toJSON(param)); + logger.error("[鍋滄RTP鎺ㄦ祦] 澶辫触: {}, 鍙傛暟锛歿}->\r\n{}",jsonObject.getString("msg"),JSONObject.toJSON(param), jsonObject); } return result; } -- Gitblit v1.8.0