Commit 4356373cb0bb30bf4736a2123a47d787c534d534
1 parent
f25bd046
添加授权控制
Showing
1 changed file
with
3 additions
and
2 deletions
src/ai_platform/MultiSourceProcess.cpp
@@ -28,6 +28,7 @@ | @@ -28,6 +28,7 @@ | ||
28 | 28 | ||
29 | #define WITH_FACE_DET_SS | 29 | #define WITH_FACE_DET_SS |
30 | 30 | ||
31 | +#define AUTHORIZATION | ||
31 | #define productSN "51C4B28135604F649671727185949A91" //linux 通途抓拍引擎产品序列号 | 32 | #define productSN "51C4B28135604F649671727185949A91" //linux 通途抓拍引擎产品序列号 |
32 | 33 | ||
33 | using namespace std; | 34 | using namespace std; |
@@ -90,7 +91,7 @@ int CMultiSourceProcess::InitAlgorthim(tsl_aiplatform_param vptParam){ | @@ -90,7 +91,7 @@ int CMultiSourceProcess::InitAlgorthim(tsl_aiplatform_param vptParam){ | ||
90 | set_default_logger(LogLevel(vptParam.log_level), "multi_source_process", vptParam.log_path, vptParam.log_mem, vptParam.log_mem); | 91 | set_default_logger(LogLevel(vptParam.log_level), "multi_source_process", vptParam.log_path, vptParam.log_mem, vptParam.log_mem); |
91 | LOG_INFO("编译时间:{} {}", __DATE__, __TIME__); | 92 | LOG_INFO("编译时间:{} {}", __DATE__, __TIME__); |
92 | 93 | ||
93 | -#ifdef USE_VILLAGE | 94 | +#ifndef AUTHORIZATION |
94 | if (!CheckTime()) { //时间限制 | 95 | if (!CheckTime()) { //时间限制 |
95 | LOG_ERROR("sy_licence_check failed."); | 96 | LOG_ERROR("sy_licence_check failed."); |
96 | return AUTHOR_ERROR; | 97 | return AUTHOR_ERROR; |
@@ -700,7 +701,7 @@ int CMultiSourceProcess::algorthim_process_thread(){ | @@ -700,7 +701,7 @@ int CMultiSourceProcess::algorthim_process_thread(){ | ||
700 | ACL_CALL(aclrtCreateContext(&ctx, m_devId), ACL_SUCCESS, 1); | 701 | ACL_CALL(aclrtCreateContext(&ctx, m_devId), ACL_SUCCESS, 1); |
701 | 702 | ||
702 | while (true){ | 703 | while (true){ |
703 | -#ifdef USE_VILLAGE | 704 | +#ifndef AUTHORIZATION |
704 | if (!CheckTime()) { //时间限制 | 705 | if (!CheckTime()) { //时间限制 |
705 | LOG_FATAL("authority failed!"); | 706 | LOG_FATAL("authority failed!"); |
706 | break; | 707 | break; |