Modifies modules/video_capture.py to exclusively attempt using
cv2.CAP_AVFOUNDATION for camera initialization on macOS.
The fallback to the default backend for macOS within this specific
initialization block has been removed.
If AVFoundation fails to open the camera, an error is logged, and
the subsequent standard check in the function will raise a
RuntimeError, making it clearer that AVFoundation was the point of
failure.
This change aims to provide better diagnostics for macOS camera
issues and ensure the intended AVFoundation backend is prioritized
without immediate fallback to potentially problematic default backends
like OBSENSOR.
I modified `modules/video_capture.py` so that it will explicitly try using `cv2.CAP_AVFOUNDATION` when initializing `cv2.VideoCapture` on macOS. If AVFoundation fails to open the camera, it will then fall back to the default OpenCV backend.
This adjustment should improve camera compatibility and stability on macOS, especially in situations where the default backend might not be working as expected.