使用v3获取当前帧
This commit is contained in:
parent
07cb9515be
commit
6486b8328b
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue