pub fn query(api: ApiBackend) -> Result<Vec<CameraInfo>, NokhwaError>
Expand description
Query the system for a list of available devices. Please refer to the API Backends that support Query
)
Usually the order goes Native -> UVC -> Gstreamer.
Quirks
Media Foundation
: The symbolic link for the device is listed in themisc
attribute of theCameraInfo
.Media Foundation
: The names may contain invalid characters since they were converted from UTF16.AVFoundation
: The ID of the device is stored in themisc
attribute of theCameraInfo
.AVFoundation
: There is lots of miscellaneous info in thedesc
attribute.WASM
: Themisc
field contains the device ID and group ID are seperated by a space (’ ’)
Errors
If you use an unsupported API (check the README or crate root for more info), incompatible backend for current platform, incompatible platform, or insufficient permissions, etc this will error.