修改视频关键帧图片生成时缺省不打开图片列表界面
This commit is contained in:
@@ -560,8 +560,8 @@ public class AvController extends BaseController {
|
|||||||
if(validateAvDuration(uploadSrcFile)){
|
if(validateAvDuration(uploadSrcFile)){
|
||||||
String shellName = Constants.VEDIO_TO_PICTURE_PROC;
|
String shellName = Constants.VEDIO_TO_PICTURE_PROC;
|
||||||
// String params = srcFileAllPath+" "+picFilePath+" 0.95 90.0 0.5";
|
// String params = srcFileAllPath+" "+picFilePath+" 0.95 90.0 0.5";
|
||||||
String params = srcFileAllPath+" "+picFilePath;
|
String[] params = new String[]{srcFileAllPath,picFilePath};
|
||||||
logger.info("调用视频转关键帧图片程序:"+shellName+" " +params);
|
logger.info("调用视频转关键帧图片程序:"+shellName+" " +StringUtils.join(params," "));
|
||||||
Map resultMap = avCfgService.execShell(shellName, params);
|
Map resultMap = avCfgService.execShell(shellName, params);
|
||||||
if(resultMap.get("exitStatus").equals(0)){//调用外部程序成功
|
if(resultMap.get("exitStatus").equals(0)){//调用外部程序成功
|
||||||
String out = resultMap.get("out").toString();//输出参数
|
String out = resultMap.get("out").toString();//输出参数
|
||||||
@@ -572,6 +572,18 @@ public class AvController extends BaseController {
|
|||||||
if(state==1){
|
if(state==1){
|
||||||
//关键帧图片生成成功,删除原视频文件
|
//关键帧图片生成成功,删除原视频文件
|
||||||
FileUtils.deleteFile(srcFileAllPath);
|
FileUtils.deleteFile(srcFileAllPath);
|
||||||
|
//获取图片列表
|
||||||
|
Collection<File> files = FileUtils.listFiles(new File(picFilePath), null, true);
|
||||||
|
String srcPath = null;
|
||||||
|
for(File f:files){
|
||||||
|
if(srcPath==null){
|
||||||
|
srcPath = f.getName();
|
||||||
|
}else{
|
||||||
|
srcPath += "|"+f.getName();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//将图片文件列表赋值给生成样例的源文件路径参数
|
||||||
|
map.put("srcPath", srcPath);
|
||||||
map.put("status", 1);
|
map.put("status", 1);
|
||||||
map.put("msg", "success");
|
map.put("msg", "success");
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -535,7 +535,7 @@ public class AvCfgService extends BaseService{
|
|||||||
}
|
}
|
||||||
result.put("error", out.toString());//错误信息
|
result.put("error", out.toString());//错误信息
|
||||||
int waitFor = exec.waitFor();
|
int waitFor = exec.waitFor();
|
||||||
logger.info("调用脚本:"+shellName+",执行返回状态值:"+waitFor);
|
logger.info("调用脚本:"+sb.toString()+",执行返回状态值:"+waitFor);
|
||||||
result.put("exitStatus", waitFor);//执行状态
|
result.put("exitStatus", waitFor);//执行状态
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|||||||
@@ -69,9 +69,10 @@ $(function(){
|
|||||||
top.$.jBox.closeTip();
|
top.$.jBox.closeTip();
|
||||||
if(data.status==1){
|
if(data.status==1){
|
||||||
$("#picPath").val(data.picFilePath);
|
$("#picPath").val(data.picFilePath);
|
||||||
|
$("#srcPath").val(data.srcPath);
|
||||||
$("#showPicture").removeClass("hidden");
|
$("#showPicture").removeClass("hidden");
|
||||||
var url = "${ctx}/ntc/av/sample/selectVedioPicture?picFilePath="+encodeURIComponent(data.picFilePath);
|
var url = "${ctx}/ntc/av/sample/selectVedioPicture?picFilePath="+encodeURIComponent(data.picFilePath);
|
||||||
openPicWindow(url);
|
//openPicWindow(url);
|
||||||
}else{
|
}else{
|
||||||
alert(data.msg);
|
alert(data.msg);
|
||||||
}
|
}
|
||||||
@@ -85,7 +86,7 @@ $(function(){
|
|||||||
height:$(document).height()*0.8,
|
height:$(document).height()*0.8,
|
||||||
top: '10%',
|
top: '10%',
|
||||||
draggable:false,
|
draggable:false,
|
||||||
title: "error info", buttons:{ "close":true}
|
title: "Error Info", buttons:{ "close":true}
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user