openIndexAsync method
Opens a camera for video capturing with API Preference and parameters.
https://docs.opencv.org/4.x/d8/dfe/classcv_1_1VideoCapture.html#a10867868137c2d142aac30a0648d00fe
Implementation
Future<bool> openIndexAsync(int index, {int apiPreference = CAP_ANY}) async {
final success = calloc<ffi.Bool>();
return cvRunAsync0(
(callback) => cvideoio.cv_VideoCapture_open_3(ref, index, apiPreference, success, callback),
(c) {
final rval = success.value;
calloc.free(success);
return c.complete(rval);
},
);
}