| | |
| | | "time" |
| | | ) |
| | | |
| | | func Entrance (args *structure.SdkDatas,groupRule protomsg.GroupRule) { |
| | | func Entrance (args *structure.SdkDatas,groupRule protomsg.GroupRule) ([]*structure.LittleRuleResult,string,string){ |
| | | resultSplice := []*structure.LittleRuleResult{} |
| | | sdkNames := "" |
| | | polygonId := "" |
| | |
| | | } |
| | | } |
| | | } |
| | | return resultSplice,sdkNames,polygonId |
| | | } |
| | | |
| | | func timeRuleResult(rule *protomsg.Rule, am *structure.AreaMap) structure.LittleRuleResult { |
| | |
| | | |
| | | func CallSo(sdkId string,rule *protomsg.Rule, am *structure.AreaMap) structure.LittleRuleResult{ |
| | | // 根据sdkId查出其对应的sdk的soName,调用相应so的Entrance方法 |
| | | var soName = "" |
| | | if sdkId == "812b674b-2375-4589-919a-5c1c3278a97e" { |
| | | soName = "face.so" |
| | | } else if sdkId == "812b674b-2375-4589-919a-5c1c3278a975"{ |
| | | soName = "intrusion.so" |
| | | } else if sdkId == "812b674b-2375-4589-919a-5c1c3278a976" { |
| | | soName = "personUnsual.so" |
| | | } else if sdkId == "812b674b-2375-4589-919a-5c1c3278a972" { |
| | | soName = "faceCompare.so" |
| | | //var soName = "" |
| | | //if sdkId == "812b674b-2375-4589-919a-5c1c3278a97e" { |
| | | // soName = "face.so" |
| | | //} else if sdkId == "812b674b-2375-4589-919a-5c1c3278a975"{ |
| | | // soName = "intrusion.so" |
| | | //} else if sdkId == "812b674b-2375-4589-919a-5c1c3278a976" { |
| | | // soName = "personUnsual.so" |
| | | //} else if sdkId == "812b674b-2375-4589-919a-5c1c3278a972" { |
| | | // soName = "faceCompare.so" |
| | | //} |
| | | soInfo,errr := cache.GetSoInfoById(sdkId) |
| | | if errr != nil { |
| | | panic("没读到注册表") |
| | | } |
| | | soName := soInfo.SoName |
| | | p,err := plugin.Open("./algorithm/"+soName) |
| | | if err != nil { |
| | | panic(err) |