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

camera1394: Check if frames were dropped (diagnostics feature) #23

Open
bgromov opened this issue Aug 29, 2013 · 1 comment
Open

camera1394: Check if frames were dropped (diagnostics feature) #23

bgromov opened this issue Aug 29, 2013 · 1 comment

Comments

@bgromov
Copy link
Contributor

bgromov commented Aug 29, 2013

Just spotted a question on libdc1394 FAQ:

How can I find out if a frame was dropped from not calling dc1394_capture_dequeue() frequently enough?

After each DMA capture function call, you can check the value returned in the frames_behind member of the dc1394frame_t structure. If frames_behind is equal to the ring buffer size minus one then you may have dropped frames.

If you have reason to believe that frames are transmitted regularly (for example on an external trigger signal) then you could also check the filltime member returned in dc1394frame_t for any irregularities in the time series.

Frames can be dropped when dealing with a high frame rate camera on a slow system. So, implementing this in Camera1394::readData() can be a good diagnostics feature.

To test it on our current hardware we may need to throttle down the read loop.

@jack-oquin, what do you think?

Also, Am I right in thinking that NUM_DMA_BUFFERS is the size of the ring buffer mentioned above?

@jack-oquin
Copy link
Member

Seems like a good idea.

The driver could publish dropped frame information to the /diagnostics topic.

Testing could be tricky. Maybe we could add a specific hz_rate parameter for unit test purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants