Open molysgaard opened 5 months ago
Hi, sorry for the delayed response. I agree something along these lines is needed for the cases you mention. Though I think I would prefer a less invasive approach - let the user provide the memory. The library should provide the memory constraints (e.g. size, caching etc) and take in memory provided by the application.
This mandates a minor re-architecture that I'm working on at the moment. There have been attempts in the past, but I never got around to finish the work and release it. Let's see whether it can be done this time without being drowned in other real-life events (or vacation ..)
Hi. Yeah, letting the client application supply the memory is a better overall architecture. The reason my MR is as it is is that I was afraid to create a large architectural change. I would be very happy if you are able to pull off such a change!
Hi there.
When using the userptr io-mode for V4L, the v4l driver can have special alignment requirements for the buffers that are given to it. I hit this limitation by experimenting with the V4L2 drivers for CSI cameras on Nvidia Tegra devices.
This PR tries to allow for specifying custom allocators for the crate in a backward compatible way, and I thought it would be nice to contribute it back to upstream. If there are any things you would like different, or require changes, please don't hesitate to mention it.
I was unsure where to base this change on, so I based it on the last released version of the crate. I see that
main
has moved since then.Regards Morten