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

Frames lost in live mode #35

Open
johandinox opened this issue Sep 14, 2023 · 4 comments
Open

Frames lost in live mode #35

johandinox opened this issue Sep 14, 2023 · 4 comments

Comments

@johandinox
Copy link

johandinox commented Sep 14, 2023

Hello!

We are loosing frames in live mode when polling frames with poll_frame(timeout_ms=2e3, oldestFrame=True, copyData=False), even when polling fewer frames than the circular buffer size.

The reason may be the following:

pvc_start_live

sets

camInstance.setAcquisitiontMode(false)

which sets seqMode_ False.

This line

if (!camInstance.seqMode_) {
    camInstance.resetQueue();
}

basically shrinks the queue to a 1-item queue.

If pvc_get_frame is fast enough, these lines

if (oldestFrame) {
    frame = camInstance.frameQueue_.front();
    camInstance.frameQueue_.pop();
} 

get you all the frames, but if it is too slow the 1-item buffer is unforgiving.

Is this intended behavior?

As solution one could 1. not reset the queue 2. get_frames as long as the queue is not empty.

@johandinox
Copy link
Author

See fix in fork: master...danionella:PyVCAM:master

@bjudkewitz
Copy link

Can someone take a look at this issue and the PR, please? Maybe @tomhanak @vondrejPM ?

@tomhanak
Copy link
Contributor

We are aware of the PR and thank you for it. We have to first carefully test it with all supported cameras in common scenarios. Unfortunately, I can't promise any date now.
In the meantime anybody can use the modified sources from the PR.
Thank you for the patience.

@bjudkewitz
Copy link

Great, thank you! Fully understood, no time line needed on our end, as we use our fork. I just wanted to make sure the problem description makes sense and the developers are aware of it.

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

No branches or pull requests

3 participants