| | |
| | | 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.dahua.frame.DHCapturePictureFrame; |
| | | import com.iailab.netsdk.common.Res; |
| | | import com.iailab.netsdk.demo.module.LoginModule; |
| | |
| | | import com.sun.jna.ptr.IntByReference; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | |
| | | import java.awt.*; |
| | | import java.io.File; |
| | |
| | | */ |
| | | public class DHCapturePictureClient { |
| | | private Logger logger = LoggerFactory.getLogger(getClass()); |
| | | |
| | | // private String url = "http://localhost:48080/admin-api/data/video/camera/DHCaptureCallback"; |
| | | // @Value("${video.dahua.callback.url}") |
| | | // public String url; |
| | | |
| | | // 登陆句柄 |
| | | public static NetSDKLib netsdk = NetSDKLib.NETSDK_INSTANCE; |
| | |
| | | return false; |
| | | } else { |
| | | System.out.println("CLIENT_CapturePicture success"); |
| | | // 回调处理图片 |
| | | // 处理图片 |
| | | Map<String, String> params = new HashMap<>(); |
| | | params.put("strFileName", strFileName); |
| | | params.put("cmdSerial", cmdSerial); |
| | | HttpRequest.doPost(DHConfiguration.staticUrl, JSON.toJSONString(params), "utf-8", ""); |
| | | params.put("brand", "DH"); |
| | | VideoConfiguration.staticCameraService.dealCapture(params); |
| | | } |
| | | return true; |
| | | } catch (Exception ex) { |