diff --git a/src/main/java/com/genersoft/iot/vmp/service/IStreamPushService.java b/src/main/java/com/genersoft/iot/vmp/service/IStreamPushService.java index c7186817..e315d927 100755 --- a/src/main/java/com/genersoft/iot/vmp/service/IStreamPushService.java +++ b/src/main/java/com/genersoft/iot/vmp/service/IStreamPushService.java @@ -43,9 +43,9 @@ public interface IStreamPushService { /** * 停止一路推流 * @param app 应用名 - * @param streamId 流ID + * @param stream 流ID */ - boolean stop(String app, String streamId); + boolean stop(String app, String stream); /** * 新的节点加入 diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/StreamPushServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/StreamPushServiceImpl.java index a64b71a8..3213eb98 100755 --- a/src/main/java/com/genersoft/iot/vmp/service/impl/StreamPushServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/service/impl/StreamPushServiceImpl.java @@ -274,19 +274,19 @@ public class StreamPushServiceImpl implements IStreamPushService { } @Override - public boolean stop(String app, String streamId) { - logger.info("[推流 ] 停止流: {}/{}", app, streamId); - StreamPushItem streamPushItem = streamPushMapper.selectOne(app, streamId); + public boolean stop(String app, String stream) { + logger.info("[推流 ] 停止流: {}/{}", app, stream); + StreamPushItem streamPushItem = streamPushMapper.selectOne(app, stream); if (streamPushItem != null) { gbStreamService.sendCatalogMsg(streamPushItem, CatalogEvent.DEL); } - platformGbStreamMapper.delByAppAndStream(app, streamId); - gbStreamMapper.del(app, streamId); - int delStream = streamPushMapper.del(app, streamId); + platformGbStreamMapper.delByAppAndStream(app, stream); + gbStreamMapper.del(app, stream); + int delStream = streamPushMapper.del(app, stream); if (delStream > 0) { MediaServer mediaServerItem = mediaServerService.getOne(streamPushItem.getMediaServerId()); - mediaServerService.closeStreams(mediaServerItem,app, streamId); + mediaServerService.closeStreams(mediaServerItem,app, stream); } return true; } diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/streamPush/StreamPushController.java b/src/main/java/com/genersoft/iot/vmp/vmanager/streamPush/StreamPushController.java index 010b2f20..3717e69f 100755 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/streamPush/StreamPushController.java +++ b/src/main/java/com/genersoft/iot/vmp/vmanager/streamPush/StreamPushController.java @@ -112,9 +112,9 @@ public class StreamPushController { @ResponseBody @Operation(summary = "中止一个推流", security = @SecurityRequirement(name = JwtUtils.HEADER)) @Parameter(name = "app", description = "应用名", required = true) - @Parameter(name = "streamId", description = "流id", required = true) - public void stop(String app, String streamId){ - if (!streamPushService.stop(app, streamId)){ + @Parameter(name = "stream", description = "流id", required = true) + public void stop(String app, String stream){ + if (!streamPushService.stop(app, stream)){ throw new ControllerException(ErrorCode.ERROR100); } }