From 8976e677b21aa4aa482e88c3575a0b2d52c65722 Mon Sep 17 00:00:00 2001 From: Simon Zeni Date: Thu, 1 Aug 2024 15:46:51 -0400 Subject: [PATCH] xrt/tracking: use int64_t to represent timestamps Part-of: --- src/xrt/include/tracking/t_hand_tracking.h | 8 ++++---- src/xrt/tracking/hand/mercury/hg_sync.cpp | 2 +- src/xrt/tracking/hand/mercury/hg_sync.hpp | 2 +- src/xrt/tracking/hand/t_hand_tracking_async.c | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/xrt/include/tracking/t_hand_tracking.h b/src/xrt/include/tracking/t_hand_tracking.h index ac75bcfbf..413179fd3 100644 --- a/src/xrt/include/tracking/t_hand_tracking.h +++ b/src/xrt/include/tracking/t_hand_tracking.h @@ -126,7 +126,7 @@ struct t_hand_tracking_sync struct xrt_frame *right_frame, struct xrt_hand_joint_set *out_left_hand, struct xrt_hand_joint_set *out_right_hand, - uint64_t *out_timestamp_ns); + int64_t *out_timestamp_ns); /*! * Destroy this hand tracker sync object. @@ -145,7 +145,7 @@ t_ht_sync_process(struct t_hand_tracking_sync *ht_sync, struct xrt_frame *right_frame, struct xrt_hand_joint_set *out_left_hand, struct xrt_hand_joint_set *out_right_hand, - uint64_t *out_timestamp_ns) + int64_t *out_timestamp_ns) { ht_sync->process(ht_sync, left_frame, right_frame, out_left_hand, out_right_hand, out_timestamp_ns); } @@ -179,9 +179,9 @@ struct t_hand_tracking_async void (*get_hand)(struct t_hand_tracking_async *ht_async, enum xrt_input_name name, - uint64_t desired_timestamp_ns, + int64_t desired_timestamp_ns, struct xrt_hand_joint_set *out_value, - uint64_t *out_timestamp_ns); + int64_t *out_timestamp_ns); }; struct t_hand_tracking_async * diff --git a/src/xrt/tracking/hand/mercury/hg_sync.cpp b/src/xrt/tracking/hand/mercury/hg_sync.cpp index c21e2317b..7923fc7ef 100644 --- a/src/xrt/tracking/hand/mercury/hg_sync.cpp +++ b/src/xrt/tracking/hand/mercury/hg_sync.cpp @@ -703,7 +703,7 @@ HandTracking::cCallbackProcess(struct t_hand_tracking_sync *ht_sync, struct xrt_frame *right_frame, struct xrt_hand_joint_set *out_left_hand, struct xrt_hand_joint_set *out_right_hand, - uint64_t *out_timestamp_ns) + int64_t *out_timestamp_ns) { XRT_TRACE_MARKER(); diff --git a/src/xrt/tracking/hand/mercury/hg_sync.hpp b/src/xrt/tracking/hand/mercury/hg_sync.hpp index e9ce8b2ff..e8827ec84 100644 --- a/src/xrt/tracking/hand/mercury/hg_sync.hpp +++ b/src/xrt/tracking/hand/mercury/hg_sync.hpp @@ -355,7 +355,7 @@ public: struct xrt_frame *right_frame, struct xrt_hand_joint_set *out_left_hand, struct xrt_hand_joint_set *out_right_hand, - uint64_t *out_timestamp_ns); + int64_t *out_timestamp_ns); static void cCallbackDestroy(t_hand_tracking_sync *ht_sync); diff --git a/src/xrt/tracking/hand/t_hand_tracking_async.c b/src/xrt/tracking/hand/t_hand_tracking_async.c index 08321b91e..ea87eab6f 100644 --- a/src/xrt/tracking/hand/t_hand_tracking_async.c +++ b/src/xrt/tracking/hand/t_hand_tracking_async.c @@ -44,7 +44,7 @@ struct ht_async_impl struct { struct xrt_hand_joint_set hands[2]; - uint64_t timestamp; + int64_t timestamp; } working; struct @@ -52,7 +52,7 @@ struct ht_async_impl struct os_mutex mutex; struct xrt_hand_joint_set hands[2]; struct m_relation_history *relation_hist[2]; - uint64_t timestamp; + int64_t timestamp; } present; // in here: @@ -259,9 +259,9 @@ ht_async_destroy(struct xrt_frame_node *node) static void ht_async_get_hand(struct t_hand_tracking_async *ht_async, enum xrt_input_name name, - uint64_t desired_timestamp_ns, + int64_t desired_timestamp_ns, struct xrt_hand_joint_set *out_value, - uint64_t *out_timestamp_ns) + int64_t *out_timestamp_ns) { struct ht_async_impl *hta = ht_async_impl(ht_async); assert(name == XRT_INPUT_GENERIC_HAND_TRACKING_LEFT || name == XRT_INPUT_GENERIC_HAND_TRACKING_RIGHT);