Skip to content

Rust API suggestions, finding device id from its name #9

@Boscop

Description

@Boscop

In the Rust API it would be useful to be able to enumerate the capture devices so that one can get a device's name and id (and possibly max resolution) before initializing the capture on it with init().
Because the installed devices on a system change over time and don't always have the same ID, so I store the camera that I want to use by its name in my application's config file and then I want to iterate over the available cameras and find its ID by its name before calling init() with that id.
This could be done by having an Iterator that yields DeviceInfo which has .id() -> usize, .name() -> String, .max_resolution() -> (u32, u32).

What do you think?

(Btw, I love ESCAPI, it makes dealing with a webcam so much easier.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions