mirror of
https://gitee.com/pan648540858/wvp-GB28181-pro.git
synced 2026-05-24 05:57:49 +08:00
修复级联推流时本地端口设置错误
This commit is contained in:
parent
ce8e743811
commit
574bad047c
@ -665,19 +665,21 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
|
|||||||
* 安排推流
|
* 安排推流
|
||||||
*/
|
*/
|
||||||
private void sendProxyStream(SendRtpItem sendRtpItem, MediaServerItem mediaServerItem, ParentPlatform platform, SIPRequest request) {
|
private void sendProxyStream(SendRtpItem sendRtpItem, MediaServerItem mediaServerItem, ParentPlatform platform, SIPRequest request) {
|
||||||
Boolean streamReady = zlmServerFactory.isStreamReady(mediaServerItem, sendRtpItem.getApp(), sendRtpItem.getStream());
|
Boolean streamReady = zlmServerFactory.isStreamReady(mediaServerItem, sendRtpItem.getApp(), sendRtpItem.getStream());
|
||||||
if (streamReady != null && streamReady) {
|
if (streamReady != null && streamReady) {
|
||||||
// 自平台内容
|
// 自平台内容
|
||||||
int localPort = sendRtpPortManager.getNextPort(mediaServerItem);
|
int localPort = sendRtpPortManager.getNextPort(mediaServerItem);
|
||||||
if (localPort == 0) {
|
if (localPort == 0) {
|
||||||
logger.warn("服务器端口资源不足");
|
logger.warn("服务器端口资源不足");
|
||||||
try {
|
try {
|
||||||
responseAck(request, Response.BUSY_HERE);
|
responseAck(request, Response.BUSY_HERE);
|
||||||
} catch (SipException | InvalidArgumentException | ParseException e) {
|
} catch (SipException | InvalidArgumentException | ParseException e) {
|
||||||
logger.error("[命令发送失败] invite 服务器端口资源不足: {}", e.getMessage());
|
logger.error("[命令发送失败] invite 服务器端口资源不足: {}", e.getMessage());
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
return;
|
||||||
|
|
||||||
|
}
|
||||||
|
sendRtpItem.setLocalPort(localPort);
|
||||||
sendRtpItem.setPlayType(InviteStreamType.PROXY);
|
sendRtpItem.setPlayType(InviteStreamType.PROXY);
|
||||||
// 写入redis, 超时时回复
|
// 写入redis, 超时时回复
|
||||||
sendRtpItem.setStatus(1);
|
sendRtpItem.setStatus(1);
|
||||||
@ -707,6 +709,7 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
sendRtpItem.setLocalPort(localPort);
|
||||||
// 写入redis, 超时时回复
|
// 写入redis, 超时时回复
|
||||||
sendRtpItem.setStatus(1);
|
sendRtpItem.setStatus(1);
|
||||||
SIPResponse response = sendStreamAck(request, sendRtpItem, platform);
|
SIPResponse response = sendStreamAck(request, sendRtpItem, platform);
|
||||||
|
|||||||
@ -92,6 +92,7 @@ public class RedisRpcController {
|
|||||||
if (mediaServerItem == null) {
|
if (mediaServerItem == null) {
|
||||||
RedisRpcResponse response = request.getResponse();
|
RedisRpcResponse response = request.getResponse();
|
||||||
response.setStatusCode(200);
|
response.setStatusCode(200);
|
||||||
|
return response;
|
||||||
}
|
}
|
||||||
// 自平台内容
|
// 自平台内容
|
||||||
int localPort = sendRtpPortManager.getNextPort(mediaServerItem);
|
int localPort = sendRtpPortManager.getNextPort(mediaServerItem);
|
||||||
@ -99,9 +100,11 @@ public class RedisRpcController {
|
|||||||
logger.info("[redis-rpc] getSendRtpItem->服务器端口资源不足" );
|
logger.info("[redis-rpc] getSendRtpItem->服务器端口资源不足" );
|
||||||
RedisRpcResponse response = request.getResponse();
|
RedisRpcResponse response = request.getResponse();
|
||||||
response.setStatusCode(200);
|
response.setStatusCode(200);
|
||||||
|
return response;
|
||||||
}
|
}
|
||||||
// 写入redis, 超时时回复
|
// 写入redis, 超时时回复
|
||||||
sendRtpItem.setStatus(1);
|
sendRtpItem.setStatus(1);
|
||||||
|
sendRtpItem.setLocalPort(localPort);
|
||||||
sendRtpItem.setServerId(userSetting.getServerId());
|
sendRtpItem.setServerId(userSetting.getServerId());
|
||||||
sendRtpItem.setLocalIp(mediaServerItem.getSdpIp());
|
sendRtpItem.setLocalIp(mediaServerItem.getSdpIp());
|
||||||
if (sendRtpItem.getSsrc() == null) {
|
if (sendRtpItem.getSsrc() == null) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user