From bbb9fa31d0dd08af5f3ec9ce2d4f5c731338f5c2 Mon Sep 17 00:00:00 2001 From: Théo de la Hogue Date: Tue, 9 Jul 2024 13:44:33 +0200 Subject: Updating PupilLabs context. --- src/argaze/utils/contexts/PupilLabs.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/argaze/utils/contexts/PupilLabs.py b/src/argaze/utils/contexts/PupilLabs.py index d5a4319..1bfb658 100644 --- a/src/argaze/utils/contexts/PupilLabs.py +++ b/src/argaze/utils/contexts/PupilLabs.py @@ -33,12 +33,12 @@ import cv2 from pupil_labs.realtime_api.simple import discover_one_device -class LiveStream(ArFeatures.ArContext): +class LiveStream(ArFeatures.DataCaptureContext): @DataFeatures.PipelineStepInit def __init__(self, **kwargs): - # Init ArContext class + # Init DataCaptureContext class super().__init__() def __enter__(self): @@ -78,7 +78,7 @@ class LiveStream(ArFeatures.ArContext): logging.debug('Stream gaze from Pupil Device') - while not self._stop_event.is_set(): + while self.is_running(): try: while True: @@ -109,7 +109,7 @@ class LiveStream(ArFeatures.ArContext): logging.debug('Stream video from Pupil Device') - while not self._stop_event.is_set(): + while self.is_running(): try: while True: @@ -132,7 +132,7 @@ class LiveStream(ArFeatures.ArContext): logging.debug('Pupil-Labs context stops...') # Close data stream - self._stop_event.set() + self.stop() # Stop streaming threading.Thread.join(self.__gaze_thread) -- cgit v1.1