使用v3获取当前帧

This commit is contained in:
lijun 2025-01-20 18:52:50 +08:00
parent 07cb9515be
commit 6486b8328b
1 changed files with 2 additions and 1 deletions

View File

@ -214,6 +214,7 @@ func subscribeAndHandleMessagesV3(ws *websocket.Conn, device_id int) {
//定时器,发送计数器
t_count := 0
t := 0
//计算帧率
for {
//从service获取当前帧
img, c := service.GetDeviceCurrentFrameV3(device_id)
@ -243,11 +244,11 @@ func subscribeAndHandleMessagesV3(ws *websocket.Conn, device_id int) {
break
}
c = count
t++
err5 := img.Close()
if err5 != nil {
log.Printf("img close err:%v", err)
} else {
t++
if t%10 == 0 {
log.Printf("device:%d send frame count:%d,img is closed", device_id, c)
}