临时提交
parent
e9fce889ba
commit
b4358a6dbe
|
@ -23,6 +23,9 @@ public class StreamURL implements Serializable,Cloneable {
|
|||
@Schema(description = "拼接后的地址")
|
||||
private String url;
|
||||
|
||||
@Schema(description = "鉴权的信息")
|
||||
private String sign;
|
||||
|
||||
public StreamURL() {
|
||||
}
|
||||
|
||||
|
@ -65,6 +68,14 @@ public class StreamURL implements Serializable,Cloneable {
|
|||
this.file = file;
|
||||
}
|
||||
|
||||
public String getSign() {
|
||||
return sign;
|
||||
}
|
||||
|
||||
public void setSign(String sign) {
|
||||
this.sign = sign;
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
return this.toString();
|
||||
}
|
||||
|
|
|
@ -746,7 +746,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
|
|||
.append("<Response>\r\n")
|
||||
.append("<CmdType>RecordInfo</CmdType>\r\n")
|
||||
.append("<SN>" +recordInfo.getSn() + "</SN>\r\n")
|
||||
.append("<DeviceID>" + deviceChannel.getChannelId() + "</DeviceID>\r\n")
|
||||
.append("<DeviceID>" + commonGbChannel.getCommonGbDeviceID() + "</DeviceID>\r\n")
|
||||
.append("<SumNum>" + recordInfo.getSumNum() + "</SumNum>\r\n");
|
||||
if (recordInfo.getRecordList() == null ) {
|
||||
recordXml.append("<RecordList Num=\"0\">\r\n");
|
||||
|
|
|
@ -10,6 +10,7 @@ import com.genersoft.iot.vmp.conf.security.SecurityUtils;
|
|||
import com.genersoft.iot.vmp.conf.security.dto.LoginUser;
|
||||
import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder;
|
||||
import com.genersoft.iot.vmp.gb28181.transmit.callback.RequestMessage;
|
||||
import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem;
|
||||
import com.genersoft.iot.vmp.media.zlm.dto.StreamPush;
|
||||
import com.genersoft.iot.vmp.service.IMediaServerService;
|
||||
import com.genersoft.iot.vmp.service.IMediaService;
|
||||
|
@ -285,4 +286,26 @@ public class StreamPushController {
|
|||
throw new ControllerException(ErrorCode.ERROR100);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据推流信息获取一个可能的流地址,方便与设备对接
|
||||
*/
|
||||
@PostMapping(value = "/predict")
|
||||
@ResponseBody
|
||||
@Operation(summary = "根据推流信息获取一个可能的流地址,方便与设备对接", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
||||
public StreamContent predictStream(@RequestBody StreamPush param){
|
||||
if (ObjectUtils.isEmpty(param.getApp()) && ObjectUtils.isEmpty(param.getStream())) {
|
||||
throw new ControllerException(ErrorCode.ERROR400.getCode(), "app或stream不可为空");
|
||||
}
|
||||
MediaServerItem mediaServerItem = null;
|
||||
if (ObjectUtils.isEmpty(param.getMediaServerId())) {
|
||||
mediaServerItem = mediaServerService.getMediaServerForMinimumLoad(null);
|
||||
}else {
|
||||
mediaServerItem = mediaServerService.getOne(param.getMediaServerId());
|
||||
}
|
||||
StreamInfo streamInfo = mediaService.getStreamInfoByAppAndStream(mediaServerItem, param.getApp(), param.getStream(), null, null);
|
||||
// 获取登录的用户,添加推流SIGN
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue