更新
This commit is contained in:
parent
279ae44a25
commit
daccfb48ca
@ -231,13 +231,10 @@ public class Gb28181DownloadService {
|
|||||||
writeErrorToResponse(asyncResponse, JsonResponse.error("下载失败"));
|
writeErrorToResponse(asyncResponse, JsonResponse.error("下载失败"));
|
||||||
} else if (wvpProxyConfig.getUseFfmpeg()) {
|
} else if (wvpProxyConfig.getUseFfmpeg()) {
|
||||||
log.info("开始 ffmpeg 录制, deviceCode {}, startTime {}, endTime {}", deviceCode, DateUtil.formatDateTime(startTime), DateUtil.formatDateTime(endTime));
|
log.info("开始 ffmpeg 录制, deviceCode {}, startTime {}, endTime {}", deviceCode, DateUtil.formatDateTime(startTime), DateUtil.formatDateTime(endTime));
|
||||||
executor.execute(()-> {
|
videoService.ffmpegRecord(asyncResponse, videoInfo.getUrl(), DateUtil.between(startTime, endTime, DateUnit.SECOND), videoInfo.getDevice(), videoInfo.getCallId());
|
||||||
videoService.ffmpegRecord(asyncResponse, videoInfo.getUrl(), DateUtil.between(startTime, endTime, DateUnit.SECOND), videoInfo.getDevice(), videoInfo.getCallId());
|
DateTime end = DateUtil.date();
|
||||||
|
asyncContext.complete();
|
||||||
DateTime end = DateUtil.date();
|
log.info("下载总耗时: {}, deviceCode {}, startTime {}, endTime {}", DateUtil.between(start, end, DateUnit.SECOND), deviceCode, DateUtil.formatDateTime(startTime), DateUtil.formatDateTime(endTime));
|
||||||
asyncContext.complete();
|
|
||||||
log.info("下载总耗时: {}, deviceCode {}, startTime {}, endTime {}", DateUtil.between(start,end, DateUnit.SECOND), deviceCode, DateUtil.formatDateTime(startTime), DateUtil.formatDateTime(endTime));
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
videoService.javaCVrecord(asyncResponse, videoInfo.getUrl(), DateUtil.between(startTime, endTime, DateUnit.SECOND) + 15);
|
videoService.javaCVrecord(asyncResponse, videoInfo.getUrl(), DateUtil.between(startTime, endTime, DateUnit.SECOND) + 15);
|
||||||
}
|
}
|
||||||
@ -379,13 +376,11 @@ public class Gb28181DownloadService {
|
|||||||
writeErrorToResponse(asyncResponse, JsonResponse.error("下载失败"));
|
writeErrorToResponse(asyncResponse, JsonResponse.error("下载失败"));
|
||||||
} else if(wvpProxyConfig.getUseFfmpeg()){
|
} else if(wvpProxyConfig.getUseFfmpeg()){
|
||||||
log.info("开始 ffmpeg 录制, deviceCode {}, startTime {}, endTime {}", deviceCode, DateUtil.formatDateTime(startTime), DateUtil.formatDateTime(endTime));
|
log.info("开始 ffmpeg 录制, deviceCode {}, startTime {}, endTime {}", deviceCode, DateUtil.formatDateTime(startTime), DateUtil.formatDateTime(endTime));
|
||||||
executor.execute(()->{
|
videoService.ffmpegRecord(asyncResponse, videoInfo.getUrl(), DateUtil.between(startTime, endTime, DateUnit.SECOND), videoInfo.getDevice(), videoInfo.getCallId());
|
||||||
videoService.ffmpegRecord(asyncResponse, videoInfo.getUrl(), DateUtil.between(startTime,endTime,DateUnit.SECOND),videoInfo.getDevice(),videoInfo.getCallId());
|
DateTime end = DateUtil.date();
|
||||||
|
asyncContext.complete();
|
||||||
|
log.info("下载总耗时: {}, deviceCode {}, startTime {}, endTime {}", DateUtil.between(start, end, DateUnit.SECOND), deviceCode, DateUtil.formatDateTime(startTime), DateUtil.formatDateTime(endTime));
|
||||||
|
|
||||||
DateTime end = DateUtil.date();
|
|
||||||
asyncContext.complete();
|
|
||||||
log.info("下载总耗时: {}, deviceCode {}, startTime {}, endTime {}", DateUtil.between(start,end, DateUnit.SECOND), deviceCode, DateUtil.formatDateTime(startTime), DateUtil.formatDateTime(endTime));
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
videoService.javaCVrecord(asyncResponse, videoInfo.getUrl(), DateUtil.between(startTime,endTime,DateUnit.SECOND) + 15);
|
videoService.javaCVrecord(asyncResponse, videoInfo.getUrl(), DateUtil.between(startTime,endTime,DateUnit.SECOND) + 15);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user