panlei
2019-07-01 ad56761d87d0313ec5f1abcde83482f6f9fde29e
main.go
@@ -1,40 +1,33 @@
package main
import (
   "basic.com/pubsub/protomsg.git"
   "basic.com/valib/deliver.git"
   "bufio"
   "bytes"
   "encoding/json"
   "errors"
   "fmt"
   "github.com/golang/protobuf/proto"
   "gocv.io/x/gocv"
   "image"
   "image/color"
   "io"
   "log"
   "mime/multipart"
   "net/http"
   "os"
   "ruleprocess/insertdata"
   "ruleprocess/ruleserver"
   "ruleprocess/util"
   "time"
   "basic.com/pubsub/protomsg.git"
   "basic.com/valib/deliver.git"
   "github.com/golang/protobuf/proto"
   "sync"
)
func main() {
   //wg := sync.WaitGroup{}
   //wg.Add(1)
   //go ruleserver.TimeTicker()
   //nReciever("ipc:///tmp/sdk-2-rules-process.ipc", deliver.PushPull, 1)
   //wg.Wait()
   resp,err := DrawPolygonOnImage()
   if err != nil {
      log.Println("画框或者上传有问题")
   }
   log.Println(resp["fileUrl"].(string))
   wg := sync.WaitGroup{}
   wg.Add(1)
   go ruleserver.TimeTicker()
   nReciever("ipc:///tmp/sdk-2-rules-process.ipc", deliver.PushPull, 1)
   wg.Wait()
   //resp,err := DrawPolygonOnImage()
   //if err != nil {
   //   log.Println("画框或者上传有问题")
   //}
   //log.Println(resp["fileUrl"].(string))
}
func nReciever(url string, m deliver.Mode, count int) {
   c := deliver.NewServer(m, url)
@@ -298,7 +291,7 @@
   //      return nil, err
   //   }
      return nil, nil
   }
   //}
}
// 把图片转成二进制流