新增设备主子码流选择,默认为不开启
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.genersoft.iot.vmp.common;
|
||||
|
||||
import com.genersoft.iot.vmp.service.bean.SSRCInfo;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
* 记录每次发送invite消息的状态
|
||||
@@ -123,4 +124,40 @@ public class InviteInfo {
|
||||
public void setStreamMode(String streamMode) {
|
||||
this.streamMode = streamMode;
|
||||
}
|
||||
|
||||
|
||||
/*=========================设备主子码流逻辑START====================*/
|
||||
@Schema(description = "是否为子码流(true-是,false-主码流)")
|
||||
private boolean subStream;
|
||||
|
||||
public boolean isSubStream() {
|
||||
return subStream;
|
||||
}
|
||||
|
||||
public void setSubStream(boolean subStream) {
|
||||
this.subStream = subStream;
|
||||
}
|
||||
|
||||
public static InviteInfo getInviteInfo(String deviceId, String channelId,Boolean isSubStream, String stream, SSRCInfo ssrcInfo,
|
||||
String receiveIp, Integer receivePort, String streamMode,
|
||||
InviteSessionType type, InviteSessionStatus status) {
|
||||
InviteInfo inviteInfo = new InviteInfo();
|
||||
inviteInfo.setDeviceId(deviceId);
|
||||
inviteInfo.setChannelId(channelId);
|
||||
inviteInfo.setStream(stream);
|
||||
inviteInfo.setSsrcInfo(ssrcInfo);
|
||||
inviteInfo.setReceiveIp(receiveIp);
|
||||
inviteInfo.setReceivePort(receivePort);
|
||||
inviteInfo.setStreamMode(streamMode);
|
||||
inviteInfo.setType(type);
|
||||
inviteInfo.setStatus(status);
|
||||
if(isSubStream != null){
|
||||
inviteInfo.setSubStream(isSubStream);
|
||||
}
|
||||
return inviteInfo;
|
||||
}
|
||||
/*=========================设备主子码流逻辑END====================*/
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -528,4 +528,31 @@ public class StreamInfo implements Serializable, Cloneable{
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
/*=========================设备主子码流逻辑START====================*/
|
||||
@Schema(description = "是否为子码流(true-是,false-主码流)")
|
||||
private boolean subStream;
|
||||
|
||||
public boolean isSubStream() {
|
||||
return subStream;
|
||||
}
|
||||
|
||||
public void setSubStream(boolean subStream) {
|
||||
this.subStream = subStream;
|
||||
}
|
||||
|
||||
public static String getPlayStream(String deviceId,String channelId,boolean isSubStream){
|
||||
String streamId;
|
||||
if(isSubStream){
|
||||
streamId = String.format("%s_%s_%s","sub",deviceId, channelId);
|
||||
}else {
|
||||
streamId = String.format("%s_%s_%s","main", deviceId, channelId);
|
||||
}
|
||||
return streamId;
|
||||
}
|
||||
|
||||
/*=========================设备主子码流逻辑END====================*/
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user