From a53dce38c2f58c0bfd37203e46dc57aa56025f45 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期四, 17 十一月 2022 18:22:24 +0800
Subject: [PATCH] Merge pull request #673 from 648540858/wvp-28181-2.0-multi-network

---
 src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRESTfulUtils.java |   22 ++++++++++++++++++----
 1 files changed, 18 insertions(+), 4 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 5e0d317..7d3510f 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
@@ -1,7 +1,7 @@
 package com.genersoft.iot.vmp.media.zlm;
 
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
 import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem;
 import okhttp3.*;
 import okhttp3.logging.HttpLoggingInterceptor;
@@ -22,6 +22,9 @@
 public class ZLMRESTfulUtils {
 
     private final static Logger logger = LoggerFactory.getLogger(ZLMRESTfulUtils.class);
+
+
+
 
     public interface RequestCallback{
         void run(JSONObject response);
@@ -166,7 +169,6 @@
                     .build();
             Response response = client.newCall(request).execute();
             if (response.isSuccessful()) {
-                logger.info("response body contentType: " + Objects.requireNonNull(response.body()).contentType());
                 if (targetPath != null) {
                     File snapFolder = new File(targetPath);
                     if (!snapFolder.exists()) {
@@ -322,10 +324,22 @@
     }
 
     public void getSnap(MediaServerItem mediaServerItem, String flvUrl, int timeout_sec, int expire_sec, String targetPath, String fileName) {
-        Map<String, Object> param = new HashMap<>();
+        Map<String, Object> param = new HashMap<>(3);
         param.put("url", flvUrl);
         param.put("timeout_sec", timeout_sec);
         param.put("expire_sec", expire_sec);
         sendGetForImg(mediaServerItem, "getSnap", param, targetPath, fileName);
     }
+
+    public JSONObject pauseRtpCheck(MediaServerItem mediaServerItem, String streamId) {
+        Map<String, Object> param = new HashMap<>(1);
+        param.put("stream_id", streamId);
+        return sendPost(mediaServerItem, "pauseRtpCheck",param, null);
+    }
+
+    public JSONObject resumeRtpCheck(MediaServerItem mediaServerItem, String streamId) {
+        Map<String, Object> param = new HashMap<>(1);
+        param.put("stream_id", streamId);
+        return sendPost(mediaServerItem, "resumeRtpCheck",param, null);
+    }
 }

--
Gitblit v1.8.0