aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThéo de la Hogue2022-09-06 11:10:06 +0200
committerThéo de la Hogue2022-09-06 11:10:06 +0200
commitd3918f8f2b378af3872edb142ab1e5d33635d13a (patch)
tree69f8ae9d45c01c0d5dfd2ffc602043ac5e2647b6 /src
parentaa02c1d073b5ae6d727ca7d475579a14f3178852 (diff)
downloadargaze-d3918f8f2b378af3872edb142ab1e5d33635d13a.zip
argaze-d3918f8f2b378af3872edb142ab1e5d33635d13a.tar.gz
argaze-d3918f8f2b378af3872edb142ab1e5d33635d13a.tar.bz2
argaze-d3918f8f2b378af3872edb142ab1e5d33635d13a.tar.xz
Adding and parsing VideoTimeStamp data.
Diffstat (limited to 'src')
-rw-r--r--src/argaze/TobiiGlassesPro2/TobiiData.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/argaze/TobiiGlassesPro2/TobiiData.py b/src/argaze/TobiiGlassesPro2/TobiiData.py
index 86bdf4c..293f460 100644
--- a/src/argaze/TobiiGlassesPro2/TobiiData.py
+++ b/src/argaze/TobiiGlassesPro2/TobiiData.py
@@ -25,6 +25,12 @@ class PresentationTimeStamp():
value: int
@dataclass
+class VideoTimeStamp():
+ """Define video time stamp data (vts)."""
+
+ value: int
+
+@dataclass
class EventSynch():
"""Define event synch data (evts)."""
@@ -111,6 +117,10 @@ class TobiiJsonDataParser():
return PresentationTimeStamp(json_data['pts'])
+ def parse_vts(self, status, json_data):
+
+ return VideoTimeStamp(json_data['vts'])
+
def parse_event_synch(self, status, json_data):
return EventSynch(json_data['evts'])
@@ -176,6 +186,7 @@ class TobiiJsonDataParser():
parse_map = {
'dir': self.parse_dir_sig,
'pts': self.parse_pts,
+ 'vts': self.parse_vts,
'evts': self.parse_event_synch,
'ets': self.parse_event,
'ac': self.parse_accelerometer,
@@ -350,6 +361,7 @@ class TobiiDataStream(threading.Thread):
ts_data_buffer_dict = {
'DirSig': DataStructures.TimeStampedBuffer(),
'PresentationTimeStamp': DataStructures.TimeStampedBuffer(),
+ 'VideoTimeStamp': DataStructures.TimeStampedBuffer(),
'EventSynch': DataStructures.TimeStampedBuffer(),
'Event': DataStructures.TimeStampedBuffer(),
'Accelerometer': DataStructures.TimeStampedBuffer(),