1、修正验证视频时长判断参数错误的问题;2、视频关键帧图片每次创建临时文件夹存储,生成特征文件后,临时文件夹与文件删除。
Signed-off-by: zhangwei <zhangwei2@iie.ac.cn>
This commit is contained in:
@@ -168,6 +168,7 @@ public class AvController extends BaseController {
|
||||
file.delete();
|
||||
}
|
||||
}
|
||||
FileUtils.deleteDirectory(picPath);
|
||||
if(zouts!=null){
|
||||
zouts.close();
|
||||
}
|
||||
@@ -526,7 +527,7 @@ public class AvController extends BaseController {
|
||||
int second = (int) (ls-hour*3600-minute*60);
|
||||
length = hour+"'"+minute+"''"+second+"'''";
|
||||
logger.info(file.getName()+"时长:"+length);
|
||||
if(ls>0 && second>Constants.AV_DURATION_LIMIT){
|
||||
if(ls>0 && ls>Constants.AV_DURATION_LIMIT){
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
@@ -546,7 +547,7 @@ public class AvController extends BaseController {
|
||||
String sep = System.getProperty("file.separator");
|
||||
String random = UUID.randomUUID()+"";
|
||||
String srcFilePath = Constants.AV_FILE_PATH+"video"+sep+"srcFile";//视频源文件保存路径
|
||||
String picFilePath = StringUtils.getUserfilesBaseDir()+"video"+sep+"picFile";//视频生成的关键帧图片文件保存路径
|
||||
String picFilePath = StringUtils.getUserfilesBaseDir()+"video"+sep+"picFile"+sep+random+sep;//视频生成的关键帧图片文件保存路径
|
||||
|
||||
FileUtils.createDirectory(srcFilePath);
|
||||
FileUtils.createDirectory(picFilePath);
|
||||
|
||||
Reference in New Issue
Block a user