支持多WVP的推流播放

This commit is contained in:
648540858
2024-08-09 16:27:08 +08:00
parent 7f8a15f017
commit 16708e385b
22 changed files with 203 additions and 129 deletions

View File

@@ -166,7 +166,7 @@ public class RedisRpcController {
/**
* 监听流上线
*/
public RedisRpcResponse onPushStreamOnlineEvent(RedisRpcRequest request) {
public RedisRpcResponse onStreamOnlineEvent(RedisRpcRequest request) {
StreamInfo streamInfo = JSONObject.parseObject(request.getParam().toString(), StreamInfo.class);
log.info("[redis-rpc] 监听流上线: {}/{}", streamInfo.getApp(), streamInfo.getStream());
// 查询本级是否有这个流

View File

@@ -158,11 +158,11 @@ public class RedisRpcServiceImpl implements IRedisRpcService {
log.info("[请求所有WVP监听流上线] {}/{}", app, stream);
// 监听流上线。 流上线直接发送sendRtpItem消息给实际的信令处理者
Hook hook = Hook.getInstance(HookType.on_media_arrival, app, stream, null);
Hook hook = Hook.getInstance(HookType.on_media_arrival, app, stream);
StreamInfo streamInfoParam = new StreamInfo();
streamInfoParam.setApp(app);
streamInfoParam.setStream(stream);
RedisRpcRequest request = buildRequest("onPushStreamOnlineEvent", streamInfoParam);
RedisRpcRequest request = buildRequest("onStreamOnlineEvent", streamInfoParam);
hookSubscribe.addSubscribe(hook, (hookData) -> {
if (callback != null) {
callback.run(mediaServerService.getStreamInfoByAppAndStream(hookData.getMediaServer(),