aboutsummaryrefslogtreecommitdiff
path: root/src/argaze/utils/contexts/PupilLabs.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/argaze/utils/contexts/PupilLabs.py')
-rw-r--r--src/argaze/utils/contexts/PupilLabs.py10
1 files 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)