VideoCapture.create constructor
Opens a video file or a capturing device or an IP video stream for video capturing with API Preference.
https://docs.opencv.org/4.x/d8/dfe/classcv_1_1VideoCapture.html#a57c0e81e83e60f36c83027dc2a188e80
Implementation
factory VideoCapture.create(String filename, {int apiPreference = CAP_ANY}) {
return using<VideoCapture>((arena) {
final p = calloc<cvg.VideoCapture>();
final cname = filename.toNativeUtf8(allocator: arena);
cvRun(() => cffi.VideoCapture_NewFromFile(cname.cast(), apiPreference, p));
return VideoCapture._(p);
});
}