From b8b6cb838c14d8966772c7a9fa789aa3bbe2a9b5 Mon Sep 17 00:00:00 2001 From: lijun Date: Sat, 18 Jan 2025 15:26:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=85=E5=AD=98=E6=B3=84=E6=BC=8F=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handler/tool.go | 2 +- service/tool.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/handler/tool.go b/handler/tool.go index 22b66c6..a0e553f 100644 --- a/handler/tool.go +++ b/handler/tool.go @@ -168,7 +168,7 @@ func subscribeAndHandleMessagesV3(ws *websocket.Conn, device_id int) { if c != count { //将img转[]byte if img.Empty() { - log.Printf("device:%d img is empty!", device_id) + log.Printf("device:%d img is empty! count = %d \n", device_id, c) } else { //gocv.Matrix转为jpeg buf, err := gocv.IMEncode(".jpg", img) diff --git a/service/tool.go b/service/tool.go index ad97f71..5cc6e77 100644 --- a/service/tool.go +++ b/service/tool.go @@ -165,6 +165,8 @@ func GetDeviceCurrentFrameV3(deviceId int) (gocv.Mat, int) { if !ok { log.Printf("DeviceFrameCount 存储的不是 int 类型,device_id: %d", deviceId) } + //查看地址 + log.Printf("frame:%p,Device1CurrentFrame:%p,Device50CurrentFrame:%p\n", &frame, &Device1CurrentFrame, &Device50CurrentFrame) return frame, frame_count } func GetDeviceCurrentFrame(deviceId int) (gocv.Mat, int) {