| | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Objects; |
| | | |
| | | @Schema(description = "流信息") |
| | | public class StreamInfo implements Serializable, Cloneable{ |
| | |
| | | } |
| | | |
| | | 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); |
| | | } |
| | |
| | | } |
| | | |
| | | 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); |
| | | } |
| | |
| | | } |
| | | |
| | | 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); |
| | |
| | | } |
| | | return instance; |
| | | } |
| | | |
| | | |
| | | /*=========================设备主子码流逻辑START====================*/ |
| | | @Schema(description = "是否为子码流(true-是,false-主码流)") |
| | | private boolean subStream; |
| | | |
| | | public boolean isSubStream() { |
| | | return subStream; |
| | | } |
| | | |
| | | public void setSubStream(boolean subStream) { |
| | | this.subStream = subStream; |
| | | } |
| | | |
| | | |
| | | } |