Browse Source

添加视频回放接口

hexiao 2 years atrás
parent
commit
c0d5ff22d1

+ 4 - 0
hazard-admin/src/main/java/com/ozs/web/core/config/CaneraConfig.java

@@ -39,4 +39,8 @@ public class CaneraConfig {
     private String bakUrl;
 
 
+    @Value("${base.recordUrl:http://124.70.58.209:18832}")
+    private String recordUrl;
+
+
 }

+ 13 - 12
hazard-admin/src/main/java/com/ozs/web/core/util/CameraUtil.java

@@ -47,6 +47,7 @@ public class CameraUtil {
 
     private static final ExecutorService executor = Executors.newFixedThreadPool(20);
     private static String historyUrl;
+    private static String recordUrl;
     private static String ffmpegPath;
     private static String filePath;
     private static String transcribeFilePath;
@@ -418,15 +419,8 @@ ffmpeg -i "concat:1.ts|2.ts" -c copy output.flv
         }
     }
 
-    @PostConstruct
-    public void init() {
-        historyUrl = caneraConfig.getHistoryUrl();
-        ffmpegPath = caneraConfig.getFfmpegPath();
-        filePath = caneraConfig.getFilePath();
-        transcribeFilePath = caneraConfig.getTranscribeFilePath();
-        webUrl = caneraConfig.getWebUrl();
-        bakUrl = caneraConfig.getBakUrl();
-        cUtil = cmdCameraUtil;
+    public static List<Map<String, Object>> getRecordList(String channel, Date startTm, Date endTm) {
+        return filterRecordList(channel, startTm, endTm, filePath, recordUrl + "/");
     }
 
     /**
@@ -676,9 +670,16 @@ ffmpeg -i "concat:1.ts|2.ts" -c copy output.flv
         }
     }
 
-
-    public static List<Map<String, Object>> getRecordList(String channel, Date startTm, Date endTm) {
-        return filterRecordList(channel, startTm, endTm, filePath, webUrl + "/webRecord/");
+    @PostConstruct
+    public void init() {
+        historyUrl = caneraConfig.getHistoryUrl();
+        ffmpegPath = caneraConfig.getFfmpegPath();
+        filePath = caneraConfig.getFilePath();
+        transcribeFilePath = caneraConfig.getTranscribeFilePath();
+        webUrl = caneraConfig.getWebUrl();
+        bakUrl = caneraConfig.getBakUrl();
+        recordUrl = caneraConfig.getBakUrl();
+        cUtil = cmdCameraUtil;
     }
 
 

+ 1 - 0
hazard-admin/src/main/resources/application.yml

@@ -22,6 +22,7 @@ base:
   #  webUrl: http://124.70.58.209:18819
   webUrl: http://124.70.58.209:18812
   bakUrl: http://124.70.58.209:18891
+  recordUrl: http://124.70.58.209:18832
   defaultPassword: yn5aq5Mt.106.tky
   imgUrl: http://124.71.171.71:18801/picbucket