How can I use python to determine if a USB camera, mic, and speaker are selectable on Linux, Mac, and Windows? #488
-
Goal: I am looking for a cross-platform solution to determine if the camera, mic, and speaker are enumerated and selectable. If the camera fails to enumerate while the mic and speaker do enumerate, I would like to throw an error that the camera failed to Enumerate. I am also looking for all the other permutations of a failed enumeration while keeping in mind the knowledge from one could be extracted into the other tests. Hardware: Think of it as a phone that is plugged in via USB. The phone as mic, speaker, and camera support. Tried: I have looked into single-platform solutions such as the following for Mac:
Issue: This is exactly what I am looking for but does not scale directly to Linux and Windows Tried: I have also looked into the Python USB library in an attempt to find a multi-platform solution: devices = usb.core.find(idVendor=) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
pyusb is able to list down to device, configuration and endpoint descriptors. Please look at the turtorial. |
Beta Was this translation helpful? Give feedback.
pyusb is able to list down to device, configuration and endpoint descriptors. Please look at the turtorial.
https://github.com/pyusb/pyusb/blob/master/docs/tutorial.rst