From 08b6a55a3a111aaee9842999b85afa60b6d61dc3 Mon Sep 17 00:00:00 2001
From: houzhongjian <houzhongyi@126.com>
Date: 星期四, 14 十一月 2024 15:29:38 +0800
Subject: [PATCH] 大华及海康摄像头截图功能开发

---
 iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/video/dahua/DHCaptureReceiveCB.java |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/video/dahua/DHCaptureReceiveCB.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/video/dahua/DHCaptureReceiveCB.java
index 764c241..109c905 100644
--- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/video/dahua/DHCaptureReceiveCB.java
+++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/video/dahua/DHCaptureReceiveCB.java
@@ -1,12 +1,11 @@
 package com.iailab.module.data.video.dahua;
 
-import com.alibaba.fastjson.JSON;
-import com.iailab.module.data.common.utils.HttpRequest;
+import com.iailab.module.data.video.config.VideoConfiguration;
+import com.iailab.module.data.video.service.CameraService;
 import com.iailab.netsdk.lib.NetSDKLib;
 import com.sun.jna.Pointer;
-import org.springframework.beans.factory.annotation.Value;
 
-import javax.annotation.PostConstruct;
+import javax.annotation.Resource;
 import javax.imageio.ImageIO;
 import java.awt.image.BufferedImage;
 import java.io.ByteArrayInputStream;
@@ -25,12 +24,13 @@
  */
 public class DHCaptureReceiveCB implements NetSDKLib.fSnapRev {
 
+    @Resource
+    private CameraService cameraService;
+
     @Override
     public void invoke(NetSDKLib.LLong lLoginID, Pointer pBuf, int revLen, int encodeType, int cmdSerial, Pointer dwUser) {
         System.out.println("DHCaptureReceiveCB:");
         Calendar calendar = Calendar.getInstance();
-//        calendar.set(Calendar.MONTH, 0);
-//        calendar.set(Calendar.SECOND, 0);
         if (pBuf != null && revLen > 0) {
             String strFileName = DHSavePath.getSavePath().getSaveCapturePath(String.valueOf(cmdSerial), calendar.getTime());
             System.out.println("cmdSerial=" + cmdSerial);
@@ -48,12 +48,12 @@
                 e.printStackTrace();
             }
 
-            // 回调处理图片
+            // 处理图片
             Map<String, String> params = new HashMap<>();
             params.put("strFileName", strFileName);
             params.put("cmdSerial", Integer.valueOf(cmdSerial).toString());
-            HttpRequest.doPost(DHConfiguration.staticUrl, JSON.toJSONString(params), "utf-8", "");
-
+            params.put("brand", "DH");
+            cameraService.dealCapture(params);
         }
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3