katyo / linux-video-rs

Thin and safe Linux V4L2 API for Rust
MIT License
4 stars 1 forks source link

Using userspace buffers #3

Open FallingSnow opened 1 year ago

FallingSnow commented 1 year ago

Is it possible to use buffers provided by the user to avoid a copy? Right now it seems that the buffers are allocated by library itself.

https://github.com/katyo/linux-video-rs/blob/51dc1b6bc2642db2c1dbfb73b3fb01f76b4e2689/core/src/impls/buffer.rs#L187

katyo commented 1 year ago

@FallingSnow It's possible by using Linux Video API, but the transferring external buffers to kernel currently hasn't implemented yet. In other words currently you can use userspace buffers which created by this crate not youself.