Implementation
Future<List<RawSample>> capture(Uint8List encodedImage) async {
ReceivePort receivePort = ReceivePort();
List<RawSample> result = [];
DynamicLibrary dylib = DynamicLibrary.open(_dllPath);
_sendPort.send({"event": _CapturerEvents.CAPTURE, "sendPort": receivePort.sendPort, "encodedImage": encodedImage});
dynamic isolateResult = await receivePort.first;
_checkException(isolateResult);
List<int> pointers = isolateResult;
pointers.forEach((address) => result.add(RawSample(dylib, Pointer<Void>.fromAddress(address))));
return result;
}