648540858
2022-10-13 92022f8a8b7bccc865c47bd8cfafaffb91c2799c
Merge pull request #640 from duzeng/wvp-28181-2.0

feat: 点播开始后的截图任务,判断启用https后使用https_fmp4流地址
2个文件已修改
9 ■■■■■ 已修改文件
.gitignore 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.gitignore
@@ -27,3 +27,4 @@
/target/
/src/main/resources/static/
certificates
src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java
@@ -21,6 +21,7 @@
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.async.DeferredResult;
@@ -112,7 +113,8 @@
    @Autowired
    private ThreadPoolTaskExecutor taskExecutor;
    @Value("${server.ssl.enabled}")
    private boolean sslEnabled;
    @Override
    public PlayResult play(MediaServerItem mediaServerItem, String deviceId, String channelId,
@@ -147,7 +149,8 @@
                if (Objects.requireNonNull(wvpResult).getCode() == 0) {
                    StreamInfo streamInfoForSuccess = (StreamInfo)wvpResult.getData();
                    MediaServerItem mediaInfo = mediaServerService.getOne(streamInfoForSuccess.getMediaServerId());
                    String streamUrl = streamInfoForSuccess.getFmp4();
                    String streamUrl = sslEnabled ? streamInfoForSuccess.getHttps_fmp4() : streamInfoForSuccess.getFmp4();
                    // 请求截图
                    logger.info("[请求截图]: " + fileName);
                    zlmresTfulUtils.getSnap(mediaInfo, streamUrl, 15, 1, path, fileName);
@@ -245,7 +248,6 @@
        }
        return playResult;
    }
    @Override