| | |
| | | import java.io.Serializable; |
| | | |
| | | @Schema(description = "流信息") |
| | | public class StreamInfo implements Serializable { |
| | | public class StreamInfo implements Serializable, Cloneable{ |
| | | |
| | | @Schema(description = "应用名") |
| | | private String app; |
| | |
| | | } |
| | | } |
| | | |
| | | public void setRtc(String host, int port, int sslPort, String app, String stream, String callIdParam) { |
| | | String file = String.format("index/api/webrtc?app=%s&stream=%s&type=play%s", app, stream, callIdParam); |
| | | public void setRtc(String host, int port, int sslPort, String app, String stream, String callIdParam, boolean isPlay) { |
| | | String file = String.format("index/api/webrtc?app=%s&stream=%s&type=%s%s", app, stream, callIdParam, isPlay?"play":"push"); |
| | | this.rtc = new StreamURL("http", host, port, file); |
| | | if (sslPort != 0) { |
| | | this.rtcs = new StreamURL("https", host, sslPort, file); |
| | |
| | | public void setTransactionInfo(TransactionInfo transactionInfo) { |
| | | this.transactionInfo = transactionInfo; |
| | | } |
| | | |
| | | @Override |
| | | public StreamInfo clone() { |
| | | StreamInfo instance = null; |
| | | try{ |
| | | instance = (StreamInfo)super.clone(); |
| | | }catch(CloneNotSupportedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return instance; |
| | | } |
| | | } |