|
|
|
|
@ -252,9 +252,10 @@ public class HikCameraControlModuleImpl implements CameraControlModule {
|
|
|
|
|
log.error("pic error:{},cameraId:{}", HikLoginModuleImpl.hcNetsdk.NET_DVR_GetLastError(),cameraId);
|
|
|
|
|
}
|
|
|
|
|
//上传到云服务器
|
|
|
|
|
|
|
|
|
|
if(savePath.getIsCloudSave()) {
|
|
|
|
|
FtpsUtils ftpsUtils = SpringContextUtil.getBean(FtpsUtils.class);
|
|
|
|
|
ftpsUtils.moveFile(true, 10, path, savePath.getMediaPath() + path.replace(savePath.getMediaPathCache(), ""));
|
|
|
|
|
}
|
|
|
|
|
return picResult;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -278,6 +279,7 @@ public class HikCameraControlModuleImpl implements CameraControlModule {
|
|
|
|
|
downloadtimer.schedule(new DownloadTask(result,downloadtimer,path,cameraId,savePath), 0, 5000);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class DownloadTask extends java.util.TimerTask {
|
|
|
|
|
@ -317,10 +319,11 @@ public class HikCameraControlModuleImpl implements CameraControlModule {
|
|
|
|
|
PathUtil.deleteFile(path);
|
|
|
|
|
File file = new File(ffmpegFile);
|
|
|
|
|
file.renameTo(new File(path));
|
|
|
|
|
|
|
|
|
|
if (savePath.getIsCloudSave()) {
|
|
|
|
|
//上传到云服务器
|
|
|
|
|
FtpsUtils ftpsUtils = SpringContextUtil.getBean(FtpsUtils.class);
|
|
|
|
|
ftpsUtils.moveFile(true, 10, path, savePath.getMp4Path() + path.replace(savePath.getMp4PathCache(), ""));
|
|
|
|
|
}
|
|
|
|
|
}else {
|
|
|
|
|
log.debug("cameraId:{},progress:{}",cameraId,nPos.getValue());
|
|
|
|
|
}
|
|
|
|
|
|