capture method Null safety
- Uint8List encodedImage
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});
List<int> pointers = await receivePort.first;
pointers.forEach((address) => result.add(RawSample(dylib, Pointer<Void>.fromAddress(address))));
return result;
}