raymanfx / libv4l-rs

Video4Linux2 bindings for Rust
MIT License
155 stars 65 forks source link

control: Add `Type::Unknown` #99

Closed MarijnS95 closed 6 months ago

MarijnS95 commented 7 months ago

Fixes #98

Draft change to make conversion from v4l2_query_ext_ctrl to Description - and within it u32 to a Type - fallible rather than panicking on unknown type values.

This approach includes a few breaking changes, to store the unknown type in the struct. Alternatively we could make the entire conversion for v4l2_query_ext_ctrl fallible via TryFrom?