支持临时目录配置
录像查询超时 处理
This commit is contained in:
parent
79fc31dd6e
commit
e1d0e355a0
@ -31,5 +31,6 @@ public class FfmpegConfig {
|
||||
private Boolean output = false;
|
||||
}
|
||||
|
||||
public Boolean useTmpFile = true;
|
||||
private Boolean useTmpFile = true;
|
||||
private String tmpDir = System.getProperty("java.io.tmpdir");
|
||||
}
|
||||
|
@ -205,6 +205,7 @@ public class Gb28181DownloadService {
|
||||
|
||||
retryer.call(()->{
|
||||
CompletableFuture<JsonResponse<List<RecordInfoItemVO>>> future = new CompletableFuture<>();
|
||||
future.completeOnTimeout(JsonResponse.error("录像查询超时"),1,TimeUnit.MINUTES);
|
||||
// 发起设备录像查询
|
||||
DeferredResult<JsonResponse<List<RecordInfoItemVO>>> requestedRecordInfo =
|
||||
recordInfoService.requestRecordInfo(new RecordInfoDTO(deviceCode, startTime, endTime, "", 0, "all"));
|
||||
|
@ -233,7 +233,7 @@ public class VideoService {
|
||||
@SneakyThrows
|
||||
public void ffmpegRecord(ServletResponse response, String url, long time, WvpProxyDevice device,String callId){
|
||||
OutputStream outputStream;
|
||||
String tmpDir = System.getProperty("java.io.tmpdir");
|
||||
String tmpDir = ffmpegConfig.getTmpDir();
|
||||
String fileName = callId + ".mp4";
|
||||
File file = new File(tmpDir, fileName);
|
||||
Executor executor;
|
||||
|
Loading…
Reference in New Issue
Block a user