getIdList method
Gets the list of IDs in the list.
return The list of IDs in the list. throws FaceException An error has occurred during Face Library execution.
Implementation
List<int> getIdList() {
Pointer<Int> pIds = nullptr;
Pointer<Int> pIdsSize = calloc();
pIdsSize[0] = -1;
try {
var err = faceSDK.id3TrackedFaceList_GetIdList(_pHandle.value, pIds, pIdsSize);
if (err == FaceError.insufficientBuffer.value) {
pIds = calloc.allocate(pIdsSize.value);
err = faceSDK.id3TrackedFaceList_GetIdList(_pHandle.value, pIds, pIdsSize);
}
if (err != FaceError.success.value) {
throw FaceException(err);
}
final vIds = Int32List.fromList(pIds.cast<Int32>().asTypedList(pIdsSize.value));
return vIds;
} finally {
calloc.free(pIds);
calloc.free(pIdsSize);
}
}