forked from Itaybre/CameraController
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disambiguate cameras with same product/vendor ids (issue Itaybre#59)
Fix issue where `AVCaptureDevice.usbDevice()` would return a USBDevice pointing to the wrong camera if multiple cameras with the same product id and vendor id are attached to the computer. The new approach is to use an iterator to lookup the cameras with the given vendor and product ids, and then loop through the results and match against their property dictionaries against the avDevice.localizedName since that seems to be the only reliable way to disambiguate between different cameras with otherwise similar properties.
- Loading branch information
Showing
1 changed file
with
46 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters