Skip to content
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

Use poll() to wait for capture with timeout #58

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

leokoppel
Copy link

Before calling dc1394_capture_dequeue(), poll() for the frame to become
available with a 500ms (arbitrary) timeout.

Fixes #48 (100% CPU use from constant polling), and is a different solution to #22.

It is the method "to cleanly stop a blocking capture" suggested in the libdc1394 FAQ which makes up for dc1394_capture_dequeue() having no timeout option.

Before calling dc1394_capture_dequeue(), poll() for the frame to become
available with a 500ms (arbitrary) timeout.

Otherwise, constant polling has the undesirable effect of 100% CPU use.

This makes up for dc1394_capture_dequeue() having no timeout option. It is the
method suggested in libdc1394 faq
(https://damien.douxchamps.net/ieee1394/libdc1394/faq/)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant