重新设置获取逻辑

This commit is contained in:
lijun 2025-01-14 23:29:52 +08:00
parent fa4e4fa3b1
commit 9d48046ca5
1 changed files with 8 additions and 0 deletions

View File

@ -129,6 +129,12 @@ func GetVideoStream(id int) {
log.Println("device:", id, " not found")
break
}
if DeviceIsGettingFrame[id] == true {
log.Println("for device:", id, " is running!")
break
}
if device.NextStop {
DeviceIsGettingFrame[id] = false
break
@ -139,6 +145,8 @@ func GetVideoStream(id int) {
log.Println("device:", device.ID, " set control info status:", status)
getVideoFrame(device)
DeviceIsGettingFrame[id] = false //停止之后,设置已停止信息
//等待1s
time.Sleep(1 * time.Second)
}
}