zhangmeng
2019-12-11 2f5f0c75f3257b4ea9c37df6d02e5598b975740f
work/ipcsender.go
@@ -1,7 +1,6 @@
package work
import (
   "analysis/goconv"
   "analysis/logo"
   "context"
@@ -80,26 +79,7 @@
         if int(i.Msg.Tasklab.Index+1) == len(i.Msg.Tasklab.Sdkinfos) {
            if s.fn != nil {
               imgInfo := unpackImage(i, "sender")
               if imgInfo.Data == nil {
                  continue
               }
               imgProto := protomsg.Image{
                  Data:      goconv.YUV2BGR(imgInfo.Data, int(imgInfo.Width), int(imgInfo.Height)),
                  Width:     int32(imgInfo.Width),
                  Height:    int32(imgInfo.Height),
                  Timestamp: imgInfo.Timestamp,
                  Id:        imgInfo.Id,
                  Cid:       imgInfo.Cid,
               }
               var sendData []byte
               if b, err := proto.Marshal(&imgProto); err == nil {
                  i.Msg.Data = b
                  sendData, err = proto.Marshal(&i.Msg)
                  if err != nil {
                     continue
                  }
               }
               sFlag := true
               for _, v := range i.Msg.Tasklab.Sdkinfos {
                  if len(v.Sdkdata) < 2 {
@@ -107,7 +87,7 @@
                     break
                  }
               }
               s.fn(sendData, sFlag)
               s.fn(d, sFlag)
            }
         }