648540858
2023-05-04 381c3bdc2079ece5147cf4cee004e9071edadf7a
src/main/java/com/genersoft/iot/vmp/common/StreamInfo.java
@@ -3,6 +3,7 @@
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Objects;
@Schema(description = "流信息")
public class StreamInfo implements Serializable, Cloneable{
@@ -168,7 +169,7 @@
    }
    public void setRtmp(String host, int port, int sslPort, String app, String stream, String callIdParam) {
        String file = String.format("%s/%s/%s", app, stream, callIdParam);
        String file = String.format("%s/%s%s", app, stream, callIdParam);
        if (port > 0) {
            this.rtmp = new StreamURL("rtmp", host, port, file);
        }
@@ -178,7 +179,7 @@
    }
    public void setRtsp(String host, int port, int sslPort, String app, String stream, String callIdParam) {
        String file = String.format("%s/%s/%s", app, stream, callIdParam);
        String file = String.format("%s/%s%s", app, stream, callIdParam);
        if (port > 0) {
            this.rtsp = new StreamURL("rtsp", host, port, file);
        }
@@ -237,6 +238,9 @@
    }
    public void setRtc(String host, int port, int sslPort, String app, String stream, String callIdParam) {
        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);
        if (port > 0) {
            this.rtc = new StreamURL("http", host, port, file);
@@ -520,7 +524,7 @@
        try{
            instance = (StreamInfo)super.clone();
        }catch(CloneNotSupportedException e) {
            logger.error("未处理的异常 ", e);
            e.printStackTrace();
        }
        return instance;
    }