优化推流结束后发送BYE

This commit is contained in:
648540858
2024-04-07 20:25:44 +08:00
parent 7d53009987
commit aeb75c0df1
4 changed files with 14 additions and 24 deletions

View File

@@ -214,4 +214,7 @@ public interface IRedisCatchStorage {
OnStreamChangedHookParam getPushListItem(String app, String stream);
void removePushListItem(String app, String stream, String mediaServerId);
void sendPushStreamClose(MessageForPushChannel messageForPushChannel);
}

View File

@@ -671,4 +671,11 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage {
}
}
@Override
public void sendPushStreamClose(MessageForPushChannel msg) {
String key = VideoManagerConstants.VM_MSG_STREAM_PUSH_CLOSE_REQUESTED;
logger.info("[redis发送通知] 发送 停止向上级推流 {}: {}/{}->{}", key, msg.getApp(), msg.getStream(), msg.getPlatFormId());
redisTemplate.convertAndSend(key, JSON.toJSON(msg));
}
}