| | |
| | | Map<String, Object> param = new HashMap<>(); |
| | | param.put("stream_id", streamId); |
| | | JSONObject jsonObject = zlmresTfulUtils.closeRtpServer(serverItem, param); |
| | | logger.info("关闭RTP Server " + jsonObject); |
| | | if (jsonObject != null ) { |
| | | if (jsonObject.getInteger("code") == 0) { |
| | | result = jsonObject.getInteger("hit") == 1; |
| | | result = jsonObject.getInteger("hit") >= 1; |
| | | }else { |
| | | logger.error("关闭RTP Server 失败: " + jsonObject.getString("msg")); |
| | | } |
| | |
| | | (MediaServerItem mediaServerItem, HookParam hookParam)->{ |
| | | logger.info("[上级点播] {}->监听端口到期继续保持监听: {}", ssrc, finalLocalPort); |
| | | OnRtpServerTimeoutHookParam rtpServerTimeoutHookParam = (OnRtpServerTimeoutHookParam) hookParam; |
| | | if (ssrc.equals(rtpServerTimeoutHookParam.getSsrc())) { |
| | | if (ssrc.equals(rtpServerTimeoutHookParam.getStream_id())) { |
| | | if (keepPortCallback.keep(ssrc)) { |
| | | logger.info("[上级点播] {}->监听端口到期继续保持监听", ssrc); |
| | | keepPort(serverItem, ssrc, finalLocalPort, keepPortCallback); |
| | |
| | | * 调用zlm RESTFUL API —— startSendRtpPassive |
| | | */ |
| | | public JSONObject startSendRtpPassive(MediaServerItem mediaServerItem, Map<String, Object>param) { |
| | | System.out.println("====================="); |
| | | for (String s : param.keySet()) { |
| | | System.out.println(s + ": " + param.get(s)); |
| | | } |
| | | System.out.println("=========END============"); |
| | | return zlmresTfulUtils.startSendRtpPassive(mediaServerItem, param); |
| | | } |
| | | |