raymanfx / libv4l-rs

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

basic multi-plane support #71

Open illegalprime opened 1 year ago

illegalprime commented 1 year ago

I care about creating a capture stream with a multi-plane camera. I have a basic version of it working, with inspiration from your mplane branch. What works:

  1. get/set/list formats
  2. create an mmap capture stream
  3. stream frames from it
tepperson2 commented 1 year ago

I would like to see this merged into a release as I am also interested in using this on an imx8 system.

Type1J commented 11 months ago

@raymanfx, @illegalprime, and @anatawa12 I have a project that uses a single plane, and a plan to add support for a multiple plane device. This PR only introduced only 1 breaking change (this project is still in 0 major, so that shouldn't be an issue) to my project, which is that Stream::next() gives a slice of slices instead of a slice. The type system will give the user information about what needs changing, and the Cargo.lock file will prevent the change from occurring for people who just want to make a working build of something, and don't want to fix anything to work with newer libs at the moment, so this PR can be merged as soon as https://github.com/illegalprime/libv4l-rs/pull/1 lands. Thanks!

illegalprime commented 11 months ago

Thank you for cleaning up the conflicts! Even though nobody's experience would necessarily break with this addition it should still not be merged until the author decides this is the abstraction they prefer.