Skip to content

Problems I encountered using this crate. #58

Description

@nagua

Hello @raymanfx ,

first of, I want to thank you for creating this crate. Unfortunately I'm wondering about some decisions that you did in this crate.

You implemented an mmap interface where you can queue multiple buffers, but in the way you are using it
images are always only generated once you call io::mmap::stream::dequeue so you will never have images queued up ready to use.
For that to work you need to open the filedescriptor as NONBLOCK.

Also with your current iteration I'm not sure why queue and dequeue are still public as you cannot do anything with them.
You can dequeue a new image, you get a buffer_index but you cannot get the image from this index, as the arena is private
and you don't have any get and get_meta functions anymore. We are currently using it in this way: We run an analysis on an
image, get the next image and skip all images that were asynchronously taken in the meantime (see NONBLOCK above) until we reach the newest image that is available at this time, without waiting for a new one. This isn't possible with the use of the next method. As you will always wait for a new image, regardless of how long it waits. For this to work you also need a method to poll the filedescriptor to you
know if there are images waiting currently.

For the changes we made to do that, you can look at our fork here: https://github.com/HULKs/libv4l-rs/tree/hulksChanges

If you want to, we can come to an understanding on how to integrate these changes properly into your crate. It would be nicer
to have one good v4l wrapper instead of forking and maintaining a second one.

Have a nice day!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions