Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enumerate all devices, not just the first one #24

Open
jveitchmichaelis opened this issue Aug 23, 2020 · 0 comments
Open

Enumerate all devices, not just the first one #24

jveitchmichaelis opened this issue Aug 23, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@jveitchmichaelis
Copy link
Contributor

jveitchmichaelis commented Aug 23, 2020

See discussion in: #19

Currently the device finding code locates the first camera (e.g. if the user doesn't specify a device). It's also a good idea to return all the cameras for those folks who have multiple cameras connected. The proposal is to extend find_devices to instead return a list.

The default action if calling setup_video(None) will be to take the first value in that list, if it exists. Or if you have several cameras, you would be able to do:

devices = boson.find_devices()
cameras = ...
for dev in devices:
    camera = Boson()
    camera.setup_video(dev)
    cameras.append(camera)

The only trouble with this approach is that it's difficult to associate the port numbers with the cameras (except maybe on Linux). I don't know if it will be trivial on Windows without digging into the COM.

We will probably need to do something like:

  • Query all serial devices with the correct pid/vid and make a lookup table with serial number + port
  • Query all video devices and also check the serial numbers, associate with the lookup table
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant