-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems I encountered using this crate. #58
Comments
Hi, We should probably clarify some terms so the things we speak about become less ambiguous.
what really happens is that captured frames are constantly written to the buffers which sit in the incoming queue of the driver. Just using Right now, we queue up all the buffers on stream start in the I agree that a non-blocking API is required if you cannot afford to have the Does this help you? I had a look at the changes you linked and they seem to do similar things to what the PR is doing, but using |
Hi, first off, you are right, I remembered that part incorrectly. So at least we need the Have a nice day! |
Could you please check out the |
First off: I still don't understand, why For the usability of the Another problem that we are currently facing is trying to implement a profiling tool. This tool will signal I hope that this will help you understand our usecases better. |
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 itimages 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
anddequeue
are still public as you cannot do anything with them.You can
dequeue
a new image, you get abuffer_index
but you cannot get the image from this index, as the arena is privateand you don't have any
get
andget_meta
functions anymore. We are currently using it in this way: We run an analysis on animage, 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 youknow 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!
The text was updated successfully, but these errors were encountered: