Apply suggestions from code review of branch opencv-camera-switcher
Co-authored-by: Julian Stirling <julian@julianstirling.co.uk>
This commit is contained in:
parent
2fee313d42
commit
61e4c8d8d7
1 changed files with 1 additions and 1 deletions
|
|
@ -59,7 +59,7 @@ def identify_cameras(camera_ids: list[int]) -> dict[str, int]:
|
||||||
if camera_info.index in name_dict:
|
if camera_info.index in name_dict:
|
||||||
name_dict[camera_info.index] = camera_info.name
|
name_dict[camera_info.index] = camera_info.name
|
||||||
elif BACKEND == cv2.CAP_V4L2:
|
elif BACKEND == cv2.CAP_V4L2:
|
||||||
# If linux try to read video4linux name
|
# If Linux, try to read video4linux name as a fallback option.
|
||||||
for camera_id in camera_ids:
|
for camera_id in camera_ids:
|
||||||
try:
|
try:
|
||||||
if not isinstance(camera_id, int):
|
if not isinstance(camera_id, int):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue