使用分离方式,修改视频流返回方式
This commit is contained in:
parent
5150e1134e
commit
8de01c90c2
|
|
@ -182,6 +182,7 @@ func getVideoFrame(device proto.DeviceInfo) {
|
|||
lineType := 2
|
||||
z := 0
|
||||
var frame gocv.Mat
|
||||
frame = gocv.NewMat()
|
||||
for {
|
||||
if device.LogFrame > 0 && z%device.LogFrame == 0 {
|
||||
log.Printf("设备:%d 当前帧: %d\n", device.ID, z)
|
||||
|
|
@ -189,10 +190,6 @@ func getVideoFrame(device proto.DeviceInfo) {
|
|||
if device.NextStop {
|
||||
break
|
||||
}
|
||||
if frame.Empty() {
|
||||
frame = gocv.NewMat()
|
||||
}
|
||||
frame = gocv.NewMat()
|
||||
ok := webcam.Read(&frame)
|
||||
if !ok {
|
||||
log.Printf("设备:%v 错误: 无法从视频流中读取帧\n", device)
|
||||
|
|
|
|||
Loading…
Reference in New Issue