视频分析2.0 多进程拆分仓库
zhangmeng
2019-05-06 e67660d0bf785eb2feaceee1ae96d3a66b23ba49
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package main
 
import (
    "analysis/demo"
    srv "analysis/work/service"
    "flag"
    "fmt"
)
 
var (
    streamURL string
    picFolder string
)
 
func init() {
    flag.StringVar(&streamURL, "i", "rtsp://192.168.1.203:8554/16.mkv", "input url")
    flag.StringVar(&picFolder, "f", ".", "test pic folder")
 
    flag.StringVar(&ipcURL, "ipc", "ipc:///tmp/pic.ipc", "ipc label")
    flag.StringVar(&proc, "proc", "", "proc name")
}
 
const (
    sender   = "snd"
    reciever = "rcv"
)
 
func main() {
    flag.Parse()
 
    fmt.Println("start test, pic folder: ", picFolder)
 
    imageChan := make(chan srv.ImageInfo)
    d := srv.NewReciever(ipcURL, imageChan)
    go d.RunAsServer()
 
    demo.ShowYolo(imageChan)
 
    fakeStartProc()
}