camera.py: collections.deque instead of Queue

Asked by Josef Stoll

hi,
I'm using pydc1394 with a point grey Grasshopper for a psycho-physics experiment (pupilometry).
As there occure a lot of switches between interactive=True/False modes, which is "sort of buggy",
my idea was to give collections.deque a try. It would not hang up, because it drops the older frames if they got not popped in time.
Thus, I could change between display and recording mode, without stopping the camera in between.

Unfortunately, the deque-queue runs empty in recording mode and I'm not able to handle its exception.
Does anyone know reasons, why? Any alternatives?

Best,
Josef

Question information

Language:
English Edit question
Status:
Answered
For:
pyDC1394 Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
SirVer (sirver) said :
#1

Josef,

I am not sure if dequeue is interprocess/thread safe. This might be the reason for your problem. If you can push a branch with your changes to launchpad, it would be easier to help you debug this.

Regards,
Holger

Can you help with this problem?

Provide an answer of your own, or ask Josef Stoll for more information if necessary.

To post a message you must log in.