libv4l-rs icon indicating copy to clipboard operation
libv4l-rs copied to clipboard

No support for `VideoCaptureMPlane`?

Open jkorinth opened this issue 1 year ago • 4 comments

Apparently the multi-plane format is not supported, is that correct? I can do, e.g.,

let mut stream = UserptrStream::new(&mut dev, Type::VideoCaptureMplane).unwrap();

But all Devices seem to use Type::VideoCapture implicitly and set_format etc. will fail?

jkorinth avatar Dec 18 '24 16:12 jkorinth

Perhaps these are relevant / duplicate:

  • https://github.com/raymanfx/libv4l-rs/issues/15#issuecomment-1109893723
  • https://github.com/raymanfx/libv4l-rs/pull/71
  • https://github.com/raymanfx/libv4l-rs/pull/105

But it looks like there is a dire need (and planning) for massive refactors to the entire buffer and allocation APIs of libv4l-rs, though I am not sure where @raymanfx is at with that.

MarijnS95 avatar Dec 19 '24 11:12 MarijnS95

Same issue on a Radxa zero 3W and it is the same thing, I cannot capture from the camera.

gbin avatar Jan 29 '25 20:01 gbin

I have to admit that my motivation to work on this crate has decreased significantly after moving to a MacOS development host.

The whole buffer abstraction definitively needs reworking to support multi-planar buffers, as you noticed.

Feel free to come up with a proposal of how it should work. I will try to spend some time again on this, but having to use a VM with a virtual camera makes it a bit painful.

raymanfx avatar Jan 30 '25 08:01 raymanfx

I completely understand... it looks like linux_video might be able to do it, I'll give it a try.

gbin avatar Jan 30 '25 12:01 gbin