| | |
| | | |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.genersoft.iot.vmp.media.zlm.dto.MediaServer; |
| | | import com.genersoft.iot.vmp.media.bean.MediaServer; |
| | | import okhttp3.*; |
| | | import okhttp3.logging.HttpLoggingInterceptor; |
| | | import org.jetbrains.annotations.NotNull; |
| | |
| | | if (callback == null) { |
| | | try { |
| | | Response response = client.newCall(request).execute(); |
| | | |
| | | if (response.isSuccessful()) { |
| | | ResponseBody responseBody = response.body(); |
| | | if (responseBody != null) { |
| | |
| | | responseJSON = JSON.parseObject(responseStr); |
| | | } |
| | | }else { |
| | | System.out.println( 2222); |
| | | System.out.println( response.code()); |
| | | response.close(); |
| | | Objects.requireNonNull(response.body()).close(); |
| | | } |
| | |
| | | return sendPost(mediaServerItem, "getRtpInfo",param, null); |
| | | } |
| | | |
| | | public JSONObject addFFmpegSource(MediaServer mediaServerItem, String src_url, String dst_url, String timeout_ms, |
| | | public JSONObject addFFmpegSource(MediaServer mediaServerItem, String src_url, String dst_url, Integer timeout_ms, |
| | | boolean enable_audio, boolean enable_mp4, String ffmpeg_cmd_key){ |
| | | logger.info(src_url); |
| | | logger.info(dst_url); |