old mode 100644
new mode 100755
| | |
| | | * @param tcpMode 0/null udp 模式,1 tcp 被动模式, 2 tcp 主动模式。 |
| | | * @return |
| | | */ |
| | | public int createRTPServer(MediaServerItem mediaServerItem, String streamId, int ssrc, Integer port, Boolean onlyAuto, Boolean reUsePort, Integer tcpMode) { |
| | | public int createRTPServer(MediaServerItem mediaServerItem, String streamId, long ssrc, Integer port, Boolean onlyAuto, Boolean reUsePort, Integer tcpMode) { |
| | | int result = -1; |
| | | // 查询此rtp server 是否已经存在 |
| | | JSONObject rtpInfo = zlmresTfulUtils.getRtpInfo(mediaServerItem, streamId); |
| | |
| | | * 调用zlm RESTful API —— stopSendRtp |
| | | */ |
| | | public Boolean stopSendRtpStream(MediaServerItem mediaServerItem, Map<String, Object>param) { |
| | | if (mediaServerItem == null) { |
| | | logger.error("[停止RTP推流] 失败: 媒体节点为NULL"); |
| | | return false; |
| | | } |
| | | Boolean result = false; |
| | | JSONObject jsonObject = zlmresTfulUtils.stopSendRtp(mediaServerItem, param); |
| | | if (jsonObject == null) { |
| | |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | public JSONObject stopSendRtpStream(MediaServerItem mediaServerItem, SendRtpItem sendRtpItem) { |
| | | Map<String, Object> param = new HashMap<>(); |
| | | param.put("vhost", "__defaultVhost__"); |
| | | param.put("app", sendRtpItem.getApp()); |
| | | param.put("stream", sendRtpItem.getStream()); |
| | | param.put("ssrc", sendRtpItem.getSsrc()); |
| | | return zlmresTfulUtils.stopSendRtp(mediaServerItem, param); |
| | | } |
| | | } |