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 {
  final p = calloc<cvg.VideoCapture>();
  return cvRunAsync0((callback) => cvideoio.cv_VideoCapture_create_2(device, apiPreference, p, callback), (
    c,
  ) {
    return c.complete(VideoCapture.fromPointer(p));
  });
}