[集群] 重构message消息接受返回值的方式

This commit is contained in:
lin
2025-02-12 17:20:12 +08:00
parent b6c3f42a1f
commit 5808c7aff5
19 changed files with 359 additions and 167 deletions

View File

@@ -8,4 +8,5 @@ public interface IStreamPushPlayService {
void stop(String app, String stream);
void stop(Integer id);
}

View File

@@ -127,4 +127,16 @@ public class StreamPushPlayServiceImpl implements IStreamPushPlayService {
Assert.notNull(mediaServer, "未找到使用的节点");
mediaServerService.closeStreams(mediaServer, app, stream);
}
@Override
public void stop(Integer id) {
StreamPush streamPush = streamPushMapper.queryOne(id);
if (streamPush == null || !streamPush.isPushing()) {
return;
}
String mediaServerId = streamPush.getMediaServerId();
MediaServer mediaServer = mediaServerService.getOne(mediaServerId);
Assert.notNull(mediaServer, "未找到使用的节点");
mediaServerService.closeStreams(mediaServer, streamPush.getApp(), streamPush.getStream());
}
}