From dd56c126c4e2ac2b309e05b47aa9477dee8ed318 Mon Sep 17 00:00:00 2001 From: zhangmeng <775834166@qq.com> Date: 星期一, 13 一月 2020 09:44:58 +0800 Subject: [PATCH] debug --- run.go | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/run.go b/run.go index 8a03e1e..023e949 100644 --- a/run.go +++ b/run.go @@ -195,6 +195,7 @@ for _, msg := range msgs { if c, ok := f.channelExist(msg.Cid); ok { + f.fnLogger("######recv from :", msg.Cid, " Chan:", c.index) c.msgs.Push(msg) } else { @@ -229,13 +230,12 @@ select { case <-time.After(trackChnTimeout * time.Second): - f.fnLogger("######Timeout to get image, curCid:", curCid, " Chan:", dtchn) + f.fnLogger("######Timeout to get image, curCid:", curCid) if curCid != "" { f.channelRelease(curCid) } return default: - // f.fnLogger("DETECTTRACKONECHN DTCHN: ", dtchn) elems := c.msgs.Drain() var msgs []protomsg.SdkMessage @@ -264,15 +264,19 @@ // conv to bgr24 and resize imgW, imgH := int(i.Width), int(i.Height) + f.fnLogger("######run cid:", rMsg.Cid, "chan: ", dtchn) count, data, _ := f.handle.Run(i.Data, imgW, imgH, 3, dtchn) + f.fnLogger("######over run cid:", rMsg.Cid, "chan: ", dtchn) + f.fnLogger("######eject cid:", rMsg.Cid, "chan: ", dtchn) sdkhelper.EjectResult(data, rMsg, out) + f.fnLogger("######over eject cid:", rMsg.Cid, "chan: ", dtchn) var id, name string if rMsg.Tasklab != nil { id, name = rMsg.Tasklab.Taskid, rMsg.Tasklab.Taskname } - // f.fnLogger("Chan: ", dtchn, "CAMERAID: ", rMsg.Cid, " TASKID: ", id, " TASKNAME: ", name, " DETECT ", f.typ, " COUNT: ", count) + f.fnLogger("Chan: ", dtchn, "CAMERAID: ", rMsg.Cid, " TASKID: ", id, " TASKNAME: ", name, " DETECT ", f.typ, " COUNT: ", count) } } } -- Gitblit v1.8.0