Closed EtomicBomb closed 4 years ago
This is an issue indeed, thanks for spotting! I wonder what would be the better course of action:
v4l2_buf.bytesused
)Should be fixed by https://github.com/raymanfx/libv4l-rs/commit/102d4697515804c48e1b500d8c57243341cf8875, which will land tonight on master on crates.io.
Hey, I've been checking out different rust libraries for v4l, and I noticed this one doesn't use the bytesused field for v4l2_buffer. I'm trying to send webcam frames over a network, so I'm trying to get the smallest possible frame sizes. In the standard example:
The len value is reported as 1843789 on my machine, even though I know that only about 33K of those bytes are used to describe an actual frame. Is there a way in this library to find how many bytes are framedata? I know that rscam is able to give me the real sizes through the v4l2_buffer.bytesused. It seems like that is more intuitive for the user.