648540858
2024-06-17 1909c7f71fc1b0e290678a3efe95b62d0b9df75e
src/main/java/com/genersoft/iot/vmp/vmanager/streamPush/StreamPushController.java
@@ -13,7 +13,7 @@
import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder;
import com.genersoft.iot.vmp.gb28181.transmit.callback.RequestMessage;
import com.genersoft.iot.vmp.media.zlm.dto.StreamPushItem;
import com.genersoft.iot.vmp.media.IMediaServerService;
import com.genersoft.iot.vmp.media.service.IMediaServerService;
import com.genersoft.iot.vmp.service.IMediaService;
import com.genersoft.iot.vmp.service.IStreamPushService;
import com.genersoft.iot.vmp.service.impl.StreamPushUploadFileHandler;
@@ -113,8 +113,8 @@
    @Operation(summary = "中止一个推流", security = @SecurityRequirement(name = JwtUtils.HEADER))
    @Parameter(name = "app", description = "应用名", required = true)
    @Parameter(name = "stream", description = "流id", required = true)
    public void stop(String app, String streamId){
        if (!streamPushService.stop(app, streamId)){
    public void stop(String app, String stream){
        if (!streamPushService.stop(app, stream)){
            throw new ControllerException(ErrorCode.ERROR100);
        }
    }
@@ -249,7 +249,7 @@
        if (push != null && !push.isSelf()) {
            throw new ControllerException(ErrorCode.ERROR100.getCode(), "来自其他平台的推流信息");
        }
        StreamInfo streamInfo = mediaService.getStreamInfoByAppAndStreamWithCheck(app, stream, mediaServerId, authority);
        StreamInfo streamInfo = mediaServerService.getStreamInfoByAppAndStreamWithCheck(app, stream, mediaServerId, authority);
        if (streamInfo == null){
            throw new ControllerException(ErrorCode.ERROR100.getCode(), "获取播放地址失败");
        }
@@ -274,7 +274,7 @@
        stream.setStatus(false);
        stream.setPushIng(false);
        stream.setAliveSecond(0L);
        stream.setTotalReaderCount("0");
        stream.setTotalReaderCount(0);
        if (!streamPushService.add(stream)) {
            throw new ControllerException(ErrorCode.ERROR100);
        }