...
|
...
|
@@ -87,12 +87,13 @@ public class UfoLiveService { |
|
|
|
|
|
String fileName = String.valueOf(req.getOrderCode()) + "_" + String.valueOf(req.getStartTime()) + "_" + req.getEndTime() % 1000;
|
|
|
|
|
|
String persistId;
|
|
|
String filePath;
|
|
|
String persistId = null;
|
|
|
String filePath = null;
|
|
|
|
|
|
Integer cameraCode = queryInitCameraCode(req);
|
|
|
|
|
|
if (configReader.getBoolean("appress.video.back.enable" + cameraCode, false)) { //启用备份视频流
|
|
|
if (!configReader.getBoolean("appress.video.close" + cameraCode, true)) { // 判断是否不需要直播切流的方式生成鉴定视频,而有NVR生成
|
|
|
LOGGER.info("no need generate video stream");
|
|
|
} else if (configReader.getBoolean("appress.video.back.enable" + cameraCode, false)) { //启用备份视频流
|
|
|
LOGGER.info("begin back video stream");
|
|
|
String save = qNLiveUtilBackService.fetch(queryM3u8Url(cameraCode, 1), req.getStartTime().longValue(), req.getEndTime().longValue());
|
|
|
persistId = qNLiveUtilBackService.transfer(save, fileName);
|
...
|
...
|
@@ -109,10 +110,10 @@ public class UfoLiveService { |
|
|
filePath = QNliveConstants.LIVE_VIDEO_DOMAIN + QNliveConstants.MP4_FILEKEY_PRE + fileName + ".mp4";
|
|
|
}
|
|
|
|
|
|
if (StringUtils.isEmpty(persistId)) {
|
|
|
/*if (StringUtils.isEmpty(persistId)) {
|
|
|
LOGGER.error("qNliveUtilService.transfer find wrong persistId is {}", persistId);
|
|
|
throw new PlatformException(400);
|
|
|
}
|
|
|
}*/
|
|
|
|
|
|
saveRecord(req, filePath, persistId, userId);
|
|
|
|
...
|
...
|
@@ -129,12 +130,12 @@ public class UfoLiveService { |
|
|
record.setEndTime(req.getEndTime());
|
|
|
record.setOrderCode(req.getOrderCode());
|
|
|
record.setSellerOrderCode(0L);
|
|
|
record.setPersistId(persistId);
|
|
|
record.setPersistId(null == persistId ? "" : persistId);
|
|
|
record.setPid(userId);
|
|
|
record.setSkup(req.getSkup());
|
|
|
record.setStartTime(req.getStartTime());
|
|
|
record.setStatus(0);
|
|
|
record.setVedioFileUrl(filePath);
|
|
|
record.setVedioFileUrl(null == filePath ? "" : filePath);
|
|
|
record.setCameraCode(req.getCameraCode());
|
|
|
qiniuLiveRecordMapper.insert(record);
|
|
|
|
...
|
...
|
|