| | |
| | | }else { |
| | | param.put("port", port); |
| | | } |
| | | param.put("ssrc", ssrc); |
| | | if (onlyAuto != null) { |
| | | param.put("only_audio", onlyAuto?"1":"0"); |
| | | } |
| | | if (ssrc != 0) { |
| | | param.put("ssrc", ssrc); |
| | | } |
| | | |
| | | JSONObject openRtpServerResultJson = zlmresTfulUtils.openRtpServer(mediaServerItem, param); |
| | | logger.info(JSONObject.toJSONString(openRtpServerResultJson)); |
| | | if (openRtpServerResultJson != null) { |
| | |
| | | public SendRtpItem createSendRtpItem(MediaServerItem serverItem, String ip, int port, String ssrc, String platformId, |
| | | String deviceId, String channelId, boolean tcp, boolean rtcp){ |
| | | |
| | | // 默认为随机端口 |
| | | int localPort = 0; |
| | | if (userSetting.getGbSendStreamStrict()) { |
| | | localPort = sendRtpPortManager.getNextPort(serverItem.getId()); |
| | | if (localPort == 0) { |
| | | return null; |
| | | } |
| | | int localPort = sendRtpPortManager.getNextPort(serverItem); |
| | | if (localPort == 0) { |
| | | return null; |
| | | } |
| | | SendRtpItem sendRtpItem = new SendRtpItem(); |
| | | sendRtpItem.setIp(ip); |
| | |
| | | */ |
| | | public SendRtpItem createSendRtpItem(MediaServerItem serverItem, String ip, int port, String ssrc, String platformId, |
| | | String app, String stream, String channelId, boolean tcp, boolean rtcp){ |
| | | // 默认为随机端口 |
| | | int localPort = 0; |
| | | if (userSetting.getGbSendStreamStrict()) { |
| | | localPort = sendRtpPortManager.getNextPort(serverItem.getId()); |
| | | if (localPort == 0) { |
| | | return null; |
| | | } |
| | | |
| | | int localPort = sendRtpPortManager.getNextPort(serverItem); |
| | | if (localPort == 0) { |
| | | return null; |
| | | } |
| | | SendRtpItem sendRtpItem = new SendRtpItem(); |
| | | sendRtpItem.setIp(ip); |