| | |
| | | |
| | | "reid/rpc" |
| | | |
| | | "basic.com/libgowrapper/sdkhelper.git" |
| | | "reid/common" |
| | | |
| | | "basic.com/valib/gogpu.git" |
| | | |
| | |
| | | // Create Reid |
| | | func Create(config string, typ, id string, gpu int, shm bool, ipc2Rule string, ruleMaxSize int, fn func(...interface{}), reserved map[string]interface{}) interface{} { |
| | | |
| | | cfg, err := sdkhelper.ReadConfig(config) |
| | | cfg, err := common.ReadConfig(config) |
| | | if err != nil { |
| | | fn("Reid SDK Create Error When Read Config: ", err) |
| | | return nil |
| | |
| | | } |
| | | } |
| | | |
| | | gpuM := sdkhelper.Atoi(cfg.Param[sGPU]) |
| | | gpuM := common.Atoi(cfg.Param[sGPU]) |
| | | |
| | | rGPU := gpu |
| | | |
| | |
| | | ipcSnd := s.ipc + postPush |
| | | ipcRcv := s.ipc + postPull |
| | | |
| | | sndURL := sdkhelper.GetIpcAddress(true, ipcSnd) |
| | | rcvURL := sdkhelper.GetIpcAddress(true, ipcRcv) |
| | | sndURL := common.GetIpcAddress(true, ipcSnd) |
| | | rcvURL := common.GetIpcAddress(true, ipcRcv) |
| | | |
| | | chSnd := make(chan []byte, 3) |
| | | chRcv := make(chan []byte, 3) |
| | |
| | | go recv.Run(ctx) |
| | | |
| | | chMsg := make(chan protomsg.SdkMessage, 3) |
| | | go sdkhelper.UnserilizeProto(ctx, chRcv, chMsg, s.fnLogger) |
| | | go common.UnserilizeProto(ctx, chRcv, chMsg, s.fnLogger) |
| | | |
| | | send := rpc.NewSender(sndURL, chSnd, true, s.fnLogger) |
| | | go send.Run(ctx) |
| | |
| | | s.fnLogger("reid !!!!!! Recv Msg From Humantrack Error") |
| | | continue |
| | | } |
| | | i := sdkhelper.UnpackImage(msg, "reid", s.fnLogger) |
| | | i := common.UnpackImage(msg, "reid", s.fnLogger) |
| | | if i == nil || i.Data == nil || i.Width <= 0 || i.Height <= 0 { |
| | | s.fnLogger("reid !!!!!! Unpack Image From Humantrack Msg Failed") |
| | | continue |