fromDeviceAsync static method

Future<VideoCapture> fromDeviceAsync(
  1. int device, {
  2. int apiPreference = CAP_ANY,
})

Implementation

static Future<VideoCapture> fromDeviceAsync(int device, {int apiPreference = CAP_ANY}) async => cvRunAsync(
      (callback) => cvideo.VideoCapture_NewFromIndex_Async(device, apiPreference, callback),
      (completer, p) => completer.complete(VideoCapture.fromPointer(p.cast<cvideo.VideoCapture>())),
    );