| | |
| | | import com.sun.jna.Pointer; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import javax.imageio.ImageIO; |
| | | import java.awt.image.BufferedImage; |
| | | import java.io.ByteArrayInputStream; |
| | |
| | | * @createTime 2024年03月06日 |
| | | */ |
| | | public class DHCaptureReceiveCB implements NetSDKLib.fSnapRev { |
| | | |
| | | @Value("${dahua.callback.url}") |
| | | public String url; |
| | | |
| | | @Override |
| | | public void invoke(NetSDKLib.LLong lLoginID, Pointer pBuf, int revLen, int encodeType, int cmdSerial, Pointer dwUser) { |
| | |
| | | Map<String, String> params = new HashMap<>(); |
| | | params.put("strFileName", strFileName); |
| | | params.put("cmdSerial", Integer.valueOf(cmdSerial).toString()); |
| | | HttpRequest.doPost(url, JSON.toJSONString(params), "utf-8", ""); |
| | | HttpRequest.doPost(DHConfiguration.staticUrl, JSON.toJSONString(params), "utf-8", ""); |
| | | |
| | | } |
| | | } |