mirror of
https://github.com/deepinsight/insightface.git
synced 2026-01-25 23:10:20 +00:00
Update
This commit is contained in:
19
cpp-package/inspireface/cpp/sample/api/sample_load_reload.c
Normal file
19
cpp-package/inspireface/cpp/sample/api/sample_load_reload.c
Normal file
@@ -0,0 +1,19 @@
|
||||
#include <inspireface.h>
|
||||
|
||||
int main() {
|
||||
const char* resourcePath = "test_res/pack/Pikachu";
|
||||
HResult ret = HFReloadInspireFace(resourcePath);
|
||||
if (ret != HSUCCEED) {
|
||||
HFLogPrint(HF_LOG_ERROR, "Failed to launch InspireFace: %d", ret);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Switch to another resource
|
||||
ret = HFReloadInspireFace("test_res/pack/Megatron");
|
||||
if (ret != HSUCCEED) {
|
||||
HFLogPrint(HF_LOG_ERROR, "Failed to reload InspireFace: %d", ret);
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user