processWebRtcFrame method
Future<Code>
processWebRtcFrame(
- Uint8List encodedBytes,
- DecodeParams params, {
- double cropPercent = 0.5,
- double horizontalCropOffset = 0.0,
- double verticalCropOffset = 0.0,
override
Reads barcode from a WebRTC video frame (encoded JPEG bytes from captureFrame())
Implementation
@override
Future<Code> processWebRtcFrame(
Uint8List encodedBytes,
DecodeParams params, {
double cropPercent = 0.5,
double horizontalCropOffset = 0.0,
double verticalCropOffset = 0.0,
}) async {
final Uint8List bytes = await _prepareBytes(
encodedBytes,
params,
cropPercent,
horizontalCropOffset,
verticalCropOffset,
);
final List<Code> results = await _callWasm(bytes, params);
return results.isNotEmpty ? results.first : Code();
}