| | |
| | | #include <face_daemon_proto.h> |
| | | |
| | | #include <stdlib.h> |
| | | #include <endian.h> |
| | | |
| | | #include "DebugNetwork.h" |
| | | #include "TeleWrapper.h" |
| | |
| | | assert(cameraIdx > 0 && cameraIdx <= CAMERA_COUNT); |
| | | cameraIdx -= 1; |
| | | CameraWrapper &cameraWrapper(g_CameraWrappers[cameraIdx]); |
| | | const jchar* jchars = env->GetStringChars(label, nullptr); |
| | | std::wstring wstr; |
| | | int lenth = env->GetStringLength(label); |
| | | |
| | | const char *utfChars = env->GetStringUTFChars(label, NULL); |
| | | std::string labelstr(utfChars); |
| | | std::wstring wlabelstr; |
| | | wlabelstr.assign(labelstr.begin(), labelstr.end()); |
| | | env->ReleaseStringUTFChars(label, utfChars); |
| | | cameraWrapper.setFaceLabel(stTrackId, wlabelstr); |
| | | for (int i = 0; i < lenth; ++i) { |
| | | jchar jc = *(jchars + i); |
| | | wchar_t wt = (wchar_t)jc; |
| | | wstr.push_back(wt); |
| | | } |
| | | |
| | | env->ReleaseStringChars(label,jchars); |
| | | cameraWrapper.setFaceLabel(stTrackId, wstr); |
| | | } |
| | | } // extern C |