648540858
2024-08-07 a915897c530460f3c4463c34e242e6407fcdcb4c
src/main/java/com/genersoft/iot/vmp/common/StreamInfo.java
@@ -1,5 +1,6 @@
package com.genersoft.iot.vmp.common;
import com.genersoft.iot.vmp.service.bean.DownloadFileInfo;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
@@ -76,9 +77,14 @@
    private String endTime;
    @Schema(description = "进度(录像下载使用)")
    private double progress;
    @Schema(description = "文件下载地址(录像下载使用)")
    private DownloadFileInfo downLoadFilePath;
    @Schema(description = "是否暂停(录像回放使用)")
    private boolean pause;
    @Schema(description = "转码后的视频流")
    private StreamInfo transcodeStream;
    public void setFlv(StreamURL flv) {
        this.flv = flv;
@@ -237,11 +243,11 @@
        }
    }
    public void setRtc(String host, int port, int sslPort, String app, String stream, String callIdParam) {
    public void setRtc(String host, int port, int sslPort, String app, String stream, String callIdParam, boolean isPlay) {
        if (callIdParam != null) {
            callIdParam = Objects.equals(callIdParam, "") ? callIdParam : callIdParam.replace("?", "&");
        }
        String file = String.format("index/api/webrtc?app=%s&stream=%s&type=play%s", app, stream, callIdParam);
        String file = String.format("index/api/webrtc?app=%s&stream=%s&type=%s%s", app, stream, isPlay?"play":"push", callIdParam);
        if (port > 0) {
            this.rtc = new StreamURL("http", host, port, file);
        }
@@ -518,6 +524,14 @@
        this.transactionInfo = transactionInfo;
    }
    public StreamInfo getTranscodeStream() {
        return transcodeStream;
    }
    public void setTranscodeStream(StreamInfo transcodeStream) {
        this.transcodeStream = transcodeStream;
    }
    @Override
    public StreamInfo clone() {
        StreamInfo instance = null;
@@ -605,5 +619,11 @@
        this.subStream = subStream;
    }
    public DownloadFileInfo getDownLoadFilePath() {
        return downLoadFilePath;
    }
    public void setDownLoadFilePath(DownloadFileInfo downLoadFilePath) {
        this.downLoadFilePath = downLoadFilePath;
    }
}