createService method Null safety
Initializes the facerec library (can be called only once).
Use with custom path to facerec library (dllPath
).
By default it is recommended to use FaceSdkPlugin.createFacerecService.
Implementation
static FacerecService createService(final String facerecConfDir, final String licenseDir, final String dllPath) {
final DynamicLibrary dylib = DynamicLibrary.open(dllPath);
final createService =
dylib.lookupFunction<_facerecConstructor, _facerecConstructor>(_c_namespace + 'FacerecService_constructor2');
final exception = _getException();
final pointer =
createService(facerecConfDir.toNativeUtf8(), licenseDir.toNativeUtf8(), dllPath.toNativeUtf8(), exception);
checkException(exception, dylib);
return FacerecService(dylib, pointer, facerecConfDir, dllPath);
}