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 reUsePort, Integer tcpMode) { | 
|---|
|  |  |  | public int createRTPServer(MediaServerItem mediaServerItem, String streamId, long ssrc, Integer port, Boolean reUsePort, Integer tcpMode) { | 
|---|
|  |  |  | int result = -1; | 
|---|
|  |  |  | // 查询此rtp server 是否已经存在 | 
|---|
|  |  |  | JSONObject rtpInfo = zlmresTfulUtils.getRtpInfo(mediaServerItem, streamId); | 
|---|
|  |  |  | 
|---|
|  |  |  | 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); | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 调用zlm RESTFUL API —— startSendRtpPassive | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public JSONObject startSendRtpStreamForPassive(MediaServerItem mediaServerItem, Map<String, Object>param) { | 
|---|
|  |  |  | return zlmresTfulUtils.startSendRtpPassive(mediaServerItem, param); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 查询待转推的流是否就绪 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public Boolean isRtpReady(MediaServerItem mediaServerItem, String streamId) { | 
|---|