fixed bug missing index for OpenCV option

This commit is contained in:
CeeBeeEh 2022-03-17 11:26:41 -04:00
parent 839f08a602
commit e58ff1e8d5

View file

@ -115,6 +115,7 @@ class CameraSourceWorker(BackendWorker):
cv_api = {_DriverType.DSHOW: cv2.CAP_DSHOW,
_DriverType.MSMF: cv2.CAP_MSMF,
_DriverType.GSTREAMER: cv2.CAP_GSTREAMER,
_DriverType.OPENCV: 0,
}[state.driver]
vcap = cv2.VideoCapture(state.device_idx, cv_api)