添加日志
parent
97dc926b28
commit
912c83dfd3
|
@ -115,7 +115,7 @@ public class ByeRequestProcessor extends SIPRequestProcessorParent implements In
|
||||||
|
|
||||||
// 收流端发送的停止
|
// 收流端发送的停止
|
||||||
if (sendRtpItem != null){
|
if (sendRtpItem != null){
|
||||||
logger.info("[收到bye] 来自{},停止通道:{}, 类型: {}", sendRtpItem.getPlatformId(), sendRtpItem.getChannelId(), sendRtpItem.getPlayType());
|
logger.info("[收到bye] 来自{},停止通道:{}, 类型: {}, callId: {}", sendRtpItem.getPlatformId(), sendRtpItem.getChannelId(), sendRtpItem.getPlayType(), callIdHeader.getCallId());
|
||||||
|
|
||||||
String streamId = sendRtpItem.getStream();
|
String streamId = sendRtpItem.getStream();
|
||||||
Map<String, Object> param = new HashMap<>();
|
Map<String, Object> param = new HashMap<>();
|
||||||
|
@ -123,7 +123,7 @@ public class ByeRequestProcessor extends SIPRequestProcessorParent implements In
|
||||||
param.put("app",sendRtpItem.getApp());
|
param.put("app",sendRtpItem.getApp());
|
||||||
param.put("stream",streamId);
|
param.put("stream",streamId);
|
||||||
param.put("ssrc",sendRtpItem.getSsrc());
|
param.put("ssrc",sendRtpItem.getSsrc());
|
||||||
logger.info("[收到bye] 停止推流:{}", streamId);
|
logger.info("[收到bye] 停止推流:{}, 媒体节点: {}", streamId, sendRtpItem.getMediaServerId());
|
||||||
MediaServerItem mediaInfo = mediaServerService.getOne(sendRtpItem.getMediaServerId());
|
MediaServerItem mediaInfo = mediaServerService.getOne(sendRtpItem.getMediaServerId());
|
||||||
redisCatchStorage.deleteSendRTPServer(sendRtpItem.getPlatformId(), sendRtpItem.getChannelId(),
|
redisCatchStorage.deleteSendRTPServer(sendRtpItem.getPlatformId(), sendRtpItem.getChannelId(),
|
||||||
callIdHeader.getCallId(), null);
|
callIdHeader.getCallId(), null);
|
||||||
|
|
|
@ -581,7 +581,7 @@ public class ZLMHttpHookListener {
|
||||||
if (redisCatchStorage.isChannelSendingRTP(inviteInfo.getChannelId())) {
|
if (redisCatchStorage.isChannelSendingRTP(inviteInfo.getChannelId())) {
|
||||||
List<SendRtpItem> sendRtpItems = redisCatchStorage.querySendRTPServerByChnnelId(
|
List<SendRtpItem> sendRtpItems = redisCatchStorage.querySendRTPServerByChnnelId(
|
||||||
inviteInfo.getChannelId());
|
inviteInfo.getChannelId());
|
||||||
if (sendRtpItems.size() > 0) {
|
if (!sendRtpItems.isEmpty()) {
|
||||||
for (SendRtpItem sendRtpItem : sendRtpItems) {
|
for (SendRtpItem sendRtpItem : sendRtpItems) {
|
||||||
ParentPlatform parentPlatform = storager.queryParentPlatByServerGBId(sendRtpItem.getPlatformId());
|
ParentPlatform parentPlatform = storager.queryParentPlatByServerGBId(sendRtpItem.getPlatformId());
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -289,6 +289,10 @@ public class ZLMServerFactory {
|
||||||
* 调用zlm RESTful API —— stopSendRtp
|
* 调用zlm RESTful API —— stopSendRtp
|
||||||
*/
|
*/
|
||||||
public Boolean stopSendRtpStream(MediaServerItem mediaServerItem, Map<String, Object>param) {
|
public Boolean stopSendRtpStream(MediaServerItem mediaServerItem, Map<String, Object>param) {
|
||||||
|
if (mediaServerItem == null) {
|
||||||
|
logger.error("[停止RTP推流] 失败: 媒体节点为NULL");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
Boolean result = false;
|
Boolean result = false;
|
||||||
JSONObject jsonObject = zlmresTfulUtils.stopSendRtp(mediaServerItem, param);
|
JSONObject jsonObject = zlmresTfulUtils.stopSendRtp(mediaServerItem, param);
|
||||||
if (jsonObject == null) {
|
if (jsonObject == null) {
|
||||||
|
|
|
@ -269,6 +269,8 @@ public class DeviceServiceImpl implements IDeviceService {
|
||||||
int subscribeCycleForCatalog = Math.max(device.getSubscribeCycleForCatalog(),30);
|
int subscribeCycleForCatalog = Math.max(device.getSubscribeCycleForCatalog(),30);
|
||||||
// 设置最小值为30
|
// 设置最小值为30
|
||||||
dynamicTask.startCron(device.getDeviceId() + "catalog", catalogSubscribeTask, (subscribeCycleForCatalog -1) * 1000);
|
dynamicTask.startCron(device.getDeviceId() + "catalog", catalogSubscribeTask, (subscribeCycleForCatalog -1) * 1000);
|
||||||
|
|
||||||
|
catalogSubscribeTask.run();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -302,6 +304,7 @@ public class DeviceServiceImpl implements IDeviceService {
|
||||||
int subscribeCycleForCatalog = Math.max(device.getSubscribeCycleForMobilePosition(),30);
|
int subscribeCycleForCatalog = Math.max(device.getSubscribeCycleForMobilePosition(),30);
|
||||||
// 刷新订阅
|
// 刷新订阅
|
||||||
dynamicTask.startCron(device.getDeviceId() + "mobile_position" , mobilePositionSubscribeTask, subscribeCycleForCatalog * 1000);
|
dynamicTask.startCron(device.getDeviceId() + "mobile_position" , mobilePositionSubscribeTask, subscribeCycleForCatalog * 1000);
|
||||||
|
mobilePositionSubscribeTask.run();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue