Skip to content

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

Open
leokoppel wants to merge 1 commit intoros-drivers:masterfrom
leokoppel:poll_with_timeout
Open

Use poll() to wait for capture with timeout#58
leokoppel wants to merge 1 commit intoros-drivers:masterfrom
leokoppel:poll_with_timeout

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