|
@@ -3,6 +3,7 @@ package com.ozs.web.core.util;
|
|
|
|
|
|
import com.alibaba.fastjson2.JSON;
|
|
|
import com.ozs.common.config.BaseConfig;
|
|
|
+import com.ozs.common.constant.Constants;
|
|
|
import com.ozs.common.core.domain.AjaxResult;
|
|
|
import com.ozs.common.exception.base.BaseException;
|
|
|
import com.ozs.common.utils.DateUtils;
|
|
@@ -36,6 +37,7 @@ public class CameraUtil {
|
|
|
private static String mappingUrl;
|
|
|
private static String flvPath;
|
|
|
private static String filePath;
|
|
|
+
|
|
|
@Autowired
|
|
|
private CaneraConfig caneraConfig;
|
|
|
|
|
@@ -50,9 +52,13 @@ public class CameraUtil {
|
|
|
*/
|
|
|
public static String historyPlay(List<String> fromVideoFileList, String ph) {
|
|
|
// 视频服务映射路径
|
|
|
- String NewfilePath = flvPath + ph;
|
|
|
+// String NewfilePath = flvPath + ph;
|
|
|
+ String NewfilePath = BaseConfig.getProfile() + ph;
|
|
|
log.info("NewfilePath:{}", NewfilePath);
|
|
|
log.info("fromVideoFileList:{}", fromVideoFileList);
|
|
|
+ if (ObjectUtils.isEmpty(fromVideoFileList) || fromVideoFileList.size() <= 0) {
|
|
|
+ throw new BaseException("当前相机无视频录像");
|
|
|
+ }
|
|
|
new Thread(() -> {
|
|
|
try {
|
|
|
myConvetor(fromVideoFileList, NewfilePath);
|
|
@@ -63,7 +69,8 @@ public class CameraUtil {
|
|
|
}).start();
|
|
|
// windows可以 linux不行
|
|
|
// convetor(fromVideoFileList, NewfilePath);
|
|
|
- return mappingUrl + "record/flv/hazard/" + ph;
|
|
|
+ return Constants.RESOURCE_PREFIX + ph;
|
|
|
+// return mappingUrl + "record/flv/hazard/" + ph;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -126,6 +133,8 @@ public class CameraUtil {
|
|
|
log.error(e.getMessage());
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
+ } else {
|
|
|
+ throw new BaseException("当前相机无视频录像");
|
|
|
}
|
|
|
return null;
|
|
|
}
|