startPreview abstract method
Future<UvcPreviewStartResult>
startPreview(
- UvcCameraMode mode, {
- UvcPreviewPolicy policy = UvcPreviewPolicy.stableFrames,
- int consecutiveValidFrames = 3,
- Duration timeout = const Duration(seconds: 2),
Starts the preview stream for mode and verifies frame delivery.
Waits until at least consecutiveValidFrames valid frames have been
observed without an intervening stream error, or until timeout elapses.
On success, the preview stream remains running. On failure, the preview is stopped before the result is returned. When no device is open the result carries UvcErrorCode.noDevice. A stopPreview, closeUsbDevice, or dispose issued while this call verifies frames ends the verification early, and the result carries UvcErrorCode.interrupted.
Implementation
Future<UvcPreviewStartResult> startPreview(
UvcCameraMode mode, {
UvcPreviewPolicy policy = UvcPreviewPolicy.stableFrames,
int consecutiveValidFrames = 3,
Duration timeout = const Duration(seconds: 2),
});