| | |
| | | "basic.com/dbapi.git" |
| | | "basic.com/fileServer/WeedFSClient.git" |
| | | "basic.com/valib/capture.git" |
| | | "basic.com/valib/logger.git" |
| | | "errors" |
| | | "strconv" |
| | | "webserver/extend/config" |
| | | "webserver/cache" |
| | | ) |
| | | /*以下属于旧版本地摄像机获取截图(国标摄像机底图无法刷新) |
| | | func PostFormBufferData(uri string, filepath string, fileName string) (maps map[string]interface{}, err0 error) { |
| | |
| | | } |
| | | b,err := capture.Capture("libcffmpeg.so",m,camera.Rtsp,capture.JPEGFileExt,1280,720,10) |
| | | if err == nil{ |
| | | var weedfsUri = "http://"+config.WeedFs.Ip+":"+strconv.Itoa(config.WeedFs.UploadPort)+"/submit" |
| | | localConf, err2 := cache.GetServerInfo() |
| | | if err2 !=nil || localConf.WebPicIp == "" { |
| | | logger.Debug("localConfig is wrong!!!") |
| | | return "",err2 |
| | | } |
| | | var weedfsUri = "http://"+localConf.WebPicIp+":"+strconv.Itoa(int(localConf.WebPicPort))+"/submit" |
| | | weedFilePath, err := WeedFSClient.UploadFile(weedfsUri, camera.Name+".jpg", b) |
| | | if err != nil { |
| | | return "",err |