| | |
| | | } |
| | | |
| | | @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 stream != null; |
| | |
| | | List<MediaServerItem> mediaServers = new ArrayList<>(); |
| | | mediaServers.add(mediaServerItem); |
| | | // 检索相关的录像文件 |
| | | List<String> filePathList = cloudRecordServiceMapper.queryRecordFilePathList(app, stream, startTimeStamp, endTimeStamp, callId, mediaServers); |
| | | List<String> filePathList = cloudRecordServiceMapper.queryRecordFilePathList(app, stream, startTimeStamp, |
| | | endTimeStamp, callId, filterMediaServer ? mediaServers : null); |
| | | if (filePathList == null || filePathList.isEmpty()) { |
| | | throw new ControllerException(ErrorCode.ERROR100.getCode(), "未检索到视频文件"); |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public JSONArray queryTask(String app, String stream, String callId, String taskId, String mediaServerId, Boolean isEnd) { |
| | | public JSONArray queryTask(String app, String stream, String callId, String taskId, String mediaServerId, |
| | | Boolean isEnd, String scheme) { |
| | | MediaServerItem mediaServerItem = null; |
| | | if (mediaServerId == null) { |
| | | mediaServerItem = mediaServerService.getDefaultMediaServer(); |
| | |
| | | if (mediaServerItem == null) { |
| | | throw new ControllerException(ErrorCode.ERROR100.getCode(), "未找到可用的流媒体"); |
| | | } |
| | | JSONObject result = assistRESTfulUtils.queryTaskList(mediaServerItem, app, stream, callId, taskId, isEnd); |
| | | |
| | | JSONObject result = assistRESTfulUtils.queryTaskList(mediaServerItem, app, stream, callId, taskId, isEnd, scheme); |
| | | if (result == null || result.getInteger("code") != 0) { |
| | | throw new ControllerException(ErrorCode.ERROR100.getCode(), result == null ? "查询任务列表失败" : result.getString("msg")); |
| | | } |