getCameraBackends static method

List<VideoCaptureAPIs> getCameraBackends()

Returns list of available backends which works via cv::VideoCapture(int index)

Implementation

static List<VideoCaptureAPIs> getCameraBackends() {
  final p = calloc<ffi.Pointer<ffi.Int>>();
  final pszie = calloc<ffi.Int>();
  cvRun(() => cvg.cv_video_registry_getCameraBackends(p, pszie));
  final backends = List.generate(pszie.value, (i) => VideoCaptureAPIs.fromValue(p.value[i]));
  calloc.free(p);
  calloc.free(pszie);
  return backends;
}