视频分析2.0 多进程拆分仓库
zhangmeng
2019-05-07 ae15376db2c1b2497b01589c5ec810ab0511560b
push code
1个文件已修改
11 ■■■■■ 已修改文件
analysis/main.go 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
analysis/main.go
@@ -10,6 +10,8 @@
var (
    streamURL string
    picFolder string
    asServer bool
)
func init() {
@@ -18,6 +20,8 @@
    flag.StringVar(&ipcURL, "ipc", "ipc:///tmp/pic.ipc", "ipc label")
    flag.StringVar(&proc, "proc", "", "proc name")
    flag.BoolVar(&asServer, "server", false, "run ipc as server")
}
const (
@@ -32,7 +36,12 @@
    imageChan := make(chan srv.ImageInfo)
    d := srv.NewReciever(ipcURL, imageChan)
    go d.RunAsServer()
    if asServer {
        go d.RunAsServer()
    } else {
        go d.RunAsClient()
    }
    demo.ShowYolo(imageChan)