| | |
| | | |
| | | import com.alibaba.fastjson2.JSONArray; |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.genersoft.iot.vmp.conf.exception.ControllerException; |
| | | import com.genersoft.iot.vmp.gb28181.session.VideoStreamSessionManager; |
| | | import com.genersoft.iot.vmp.media.zlm.AssistRESTfulUtils; |
| | |
| | | import java.util.*; |
| | | |
| | | @Service |
| | | @DS("share") |
| | | public class CloudRecordServiceImpl implements ICloudRecordService { |
| | | |
| | | private final static Logger logger = LoggerFactory.getLogger(CloudRecordServiceImpl.class); |
| | |
| | | } |
| | | |
| | | @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(), "未检索到视频文件"); |
| | | } |