优化级联sdp消息
This commit is contained in:
parent
01c20a9946
commit
9090f0834e
@ -361,7 +361,7 @@ public class SIPCommander implements ISIPCommander {
|
||||
//
|
||||
StringBuffer content = new StringBuffer(200);
|
||||
content.append("v=0\r\n");
|
||||
content.append("o="+"00000"+" 0 0 IN IP4 "+ mediaServerItem.getSdpIp() +"\r\n");
|
||||
content.append("o="+ sipConfig.getId()+" 0 0 IN IP4 "+ mediaServerItem.getSdpIp() +"\r\n");
|
||||
content.append("s=Play\r\n");
|
||||
content.append("c=IN IP4 "+ mediaServerItem.getSdpIp() +"\r\n");
|
||||
content.append("t=0 0\r\n");
|
||||
|
@ -212,7 +212,7 @@ public class InviteRequestProcessor extends SIPRequestAbstractProcessor {
|
||||
|
||||
StringBuffer content = new StringBuffer(200);
|
||||
content.append("v=0\r\n");
|
||||
content.append("o="+"00000"+" 0 0 IN IP4 "+mediaServerItemInUSe.getSdpIp()+"\r\n");
|
||||
content.append("o="+ channelId +" 0 0 IN IP4 "+mediaServerItemInUSe.getSdpIp()+"\r\n");
|
||||
content.append("s=Play\r\n");
|
||||
content.append("c=IN IP4 "+mediaServerItemInUSe.getSdpIp()+"\r\n");
|
||||
content.append("t=0 0\r\n");
|
||||
@ -269,7 +269,7 @@ public class InviteRequestProcessor extends SIPRequestAbstractProcessor {
|
||||
// TODO 添加对tcp的支持
|
||||
StringBuffer content = new StringBuffer(200);
|
||||
content.append("v=0\r\n");
|
||||
content.append("o="+"00000"+" 0 0 IN IP4 "+mediaServerItem.getSdpIp()+"\r\n");
|
||||
content.append("o="+ channelId +" 0 0 IN IP4 "+mediaServerItem.getSdpIp()+"\r\n");
|
||||
content.append("s=Play\r\n");
|
||||
content.append("c=IN IP4 "+mediaServerItem.getSdpIp()+"\r\n");
|
||||
content.append("t=0 0\r\n");
|
||||
|
@ -107,9 +107,14 @@ public class ZLMRTPServerFactory {
|
||||
int currentPort = mediaServerItem.getCurrentPort();
|
||||
if (currentPort == 0) {
|
||||
String[] portRangeStrArray = mediaServerItem.getSendRtpPortRange().split(",");
|
||||
if (portRangeStrArray.length != 2) {
|
||||
portRangeArray[0] = 30000;
|
||||
portRangeArray[1] = 30500;
|
||||
}else {
|
||||
portRangeArray[0] = Integer.parseInt(portRangeStrArray[0]);
|
||||
portRangeArray[1] = Integer.parseInt(portRangeStrArray[1]);
|
||||
}
|
||||
}
|
||||
|
||||
if (currentPort == 0 || currentPort++ > portRangeArray[1]) {
|
||||
currentPort = portRangeArray[0];
|
||||
|
@ -89,6 +89,7 @@ public class MediaServerItem{
|
||||
streamNoneReaderDelayMS = zlmServerConfig.getGeneralStreamNoneReaderDelayMS();
|
||||
rtpEnable = false; // 默认使用单端口;直到用户自己设置开启多端口
|
||||
rtpPortRange = "30000,30500"; // 默认使用30000,30500作为级联时发送流的端口号
|
||||
sendRtpPortRange = "30000,30500"; // 默认使用30000,30500作为级联时发送流的端口号
|
||||
recordAssistPort = 0; // 默认关闭
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user