使用v3获取当前帧

This commit is contained in:
lijun 2025-01-20 18:49:45 +08:00
parent e969fc53a2
commit 07cb9515be
1 changed files with 3 additions and 1 deletions

View File

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