优化录像合并下载,支持不过滤zlm节点ID
parent
07729fbe49
commit
0e94aeaf5f
|
@ -32,7 +32,8 @@ public interface ICloudRecordService {
|
||||||
/**
|
/**
|
||||||
* 添加合并任务
|
* 添加合并任务
|
||||||
*/
|
*/
|
||||||
String addTask(String app, String stream, MediaServerItem mediaServerItem, String startTime, String endTime, String callId, String remoteHost);
|
String addTask(String app, String stream, MediaServerItem mediaServerItem, String startTime,
|
||||||
|
String endTime, String callId, String remoteHost, boolean filterMediaServer);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -109,7 +109,8 @@ public class CloudRecordServiceImpl implements ICloudRecordService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String addTask(String app, String stream, MediaServerItem mediaServerItem, String startTime, String endTime, String callId, String remoteHost) {
|
public String addTask(String app, String stream, MediaServerItem mediaServerItem, String startTime, String endTime,
|
||||||
|
String callId, String remoteHost, boolean filterMediaServer) {
|
||||||
// 参数校验
|
// 参数校验
|
||||||
assert app != null;
|
assert app != null;
|
||||||
assert stream != null;
|
assert stream != null;
|
||||||
|
@ -125,8 +126,11 @@ public class CloudRecordServiceImpl implements ICloudRecordService {
|
||||||
endTimeStamp = DateUtil.yyyy_MM_dd_HH_mm_ssToTimestamp(endTime);
|
endTimeStamp = DateUtil.yyyy_MM_dd_HH_mm_ssToTimestamp(endTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<MediaServerItem> mediaServers = new ArrayList<>();
|
||||||
|
mediaServers.add(mediaServerItem);
|
||||||
// 检索相关的录像文件
|
// 检索相关的录像文件
|
||||||
List<String> filePathList = cloudRecordServiceMapper.queryRecordFilePathList(app, stream, startTimeStamp, endTimeStamp, callId, null);
|
List<String> filePathList = cloudRecordServiceMapper.queryRecordFilePathList(app, stream, startTimeStamp,
|
||||||
|
endTimeStamp, callId, filterMediaServer ? mediaServers : null);
|
||||||
if (filePathList == null || filePathList.isEmpty()) {
|
if (filePathList == null || filePathList.isEmpty()) {
|
||||||
throw new ControllerException(ErrorCode.ERROR100.getCode(), "未检索到视频文件");
|
throw new ControllerException(ErrorCode.ERROR100.getCode(), "未检索到视频文件");
|
||||||
}
|
}
|
||||||
|
|
|
@ -177,7 +177,7 @@ public class CloudRecordController {
|
||||||
remoteHost = request.getScheme() + "://" + request.getLocalAddr() + ":" + mediaServerItem.getRecordAssistPort();
|
remoteHost = request.getScheme() + "://" + request.getLocalAddr() + ":" + mediaServerItem.getRecordAssistPort();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return cloudRecordService.addTask(app, stream, mediaServerItem, startTime, endTime, callId, remoteHost);
|
return cloudRecordService.addTask(app, stream, mediaServerItem, startTime, endTime, callId, remoteHost, mediaServerId != null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
|
Loading…
Reference in New Issue