From cc6f8a873c7efd28fbbeb7c1c70b28a053586f17 Mon Sep 17 00:00:00 2001 From: suntianyu <xuepengqiang@aiotlink.com> Date: 星期五, 30 七月 2021 10:53:09 +0800 Subject: [PATCH] m --- lib/h_interface.cpp | 35 ++++++++++++++++++++++++++++------- 1 files changed, 28 insertions(+), 7 deletions(-) diff --git a/lib/h_interface.cpp b/lib/h_interface.cpp index 64f496a..d612f60 100644 --- a/lib/h_interface.cpp +++ b/lib/h_interface.cpp @@ -11,26 +11,27 @@ int m_staticStruct::times = 10; // 鍒涘缓 -YOLOTRACK_API void* create(const char *conf, int *max_chan) +API void* create(const char *conf, int *max_chan) { - CLog::Initialize("/opt/vasystemn/models/humanCount/log.properties"); + CLog::Initialize("/opt/vasystem/bin/models/humanCount/log.properties"); AriManager *handle = new AriManager(); ReadJsonFromFile(conf); return handle; } // 鍘熸煡鎵剧粨鏋滄帴鍙� -YOLOTRACK_API void* get_result(void *handle, const void *img, const int chan) +API void* get_result(void *handle, const void *img, const int chan) { AriManager *h = (AriManager*)handle; TResult *t_result = (TResult*)malloc(sizeof(TResult)); init_TResult(t_result); + DEBUG( "------error "); // h->doInfer(*t_result); return t_result; } // 浼犻�掍汉鑴哥粨鏋滃苟鏌ユ壘淇℃伅 -YOLOTRACK_API void* get_result_face(void *handle, const void *img, const char* arg_json, const int arg_len, void *face_info, const int face_info_size) +API void* get_result_face(void *handle, const void *img, const char* arg_json, const int arg_len, void *face_info, const int face_info_size) { Json::Reader reader; Json::Value root; @@ -38,13 +39,14 @@ // TResult *t_result = new TResult(); TResult *t_result = (TResult*)malloc(sizeof(TResult)); init_TResult(t_result); - + DEBUG( "------yolo before "); h->doInfer("", img, t_result, face_info, face_info_size); + DEBUG( "------yolo back " ); return t_result; } -YOLOTRACK_API void release_result(void *res) +API void release_result(void *res) { if (!res) return; TResult *cres = (TResult*)res; @@ -59,7 +61,7 @@ free(cres); } -YOLOTRACK_API void release(void* handle) +API void release(void* handle) { AriManager *h = (AriManager*)handle; delete h; @@ -96,3 +98,22 @@ t->count = 0; t->targets = nullptr; } + + +API int set_data(void* handle, const char *data, const int len, const int type) +{ + return 1; +} + +API int op_channel(void *handle, const char *chan_json, const int json_len, const int op) +{ + return 1; +} + + +//璁剧疆鍥炶皟鍑芥暟淇℃伅 +API int set_cb(void* handle, fn FUNC, void *args) +{ + return 1; +} + -- Gitblit v1.8.0