From dc3a8a671e4dfabb05b2406288dd313dd670ae6d Mon Sep 17 00:00:00 2001 From: Moritz Kassner Date: Mon, 31 Mar 2014 15:55:57 +0200 Subject: [PATCH] revert change --- pupil_src/capture/world.py | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/pupil_src/capture/world.py b/pupil_src/capture/world.py index ce5bbb18fa..a9139e6996 100644 --- a/pupil_src/capture/world.py +++ b/pupil_src/capture/world.py @@ -299,6 +299,17 @@ def reset_timebase(): # Event loop while not g_pool.quit.value: + # Get an image from the grabber + try: + frame = cap.get_frame() + except CameraCaptureError: + logger.error("Capture from Camera Failed. Stopping.") + break + except EndofVideoFileError: + logger.warning("Video File is done. Stopping") + break + + update_fps() #a container that allows plugins to post and read events events = [] @@ -313,19 +324,6 @@ def reset_timebase(): p['norm_gaze'] = g_pool.map_pupil(p['norm_pupil']) recent_pupil_positions.append(p) - # Get an image from the grabber - try: - frame = cap.get_frame() - except CameraCaptureError: - logger.error("Capture from Camera Failed. Stopping.") - break - except EndofVideoFileError: - logger.warning("Video File is done. Stopping") - break - - update_fps() - - # allow each Plugin to do its work. for p in g_pool.plugins: