xrt: use int64_t to represent timestamps

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2298>
This commit is contained in:
Simon Zeni 2024-08-01 15:23:28 -04:00 committed by Rylie Pavlik
parent bc131e651a
commit af5cf402bf
6 changed files with 10 additions and 10 deletions

View file

@ -179,7 +179,7 @@ wait_for_scheduled_free(struct multi_compositor *mc)
// Block here if the scheduled slot is not clear. // Block here if the scheduled slot is not clear.
while (v_mc->scheduled.active) { while (v_mc->scheduled.active) {
uint64_t now_ns = os_monotonic_get_ns(); int64_t now_ns = os_monotonic_get_ns();
// This frame is for the next frame, drop the old one no matter what. // This frame is for the next frame, drop the old one no matter what.
if (time_is_within_half_ms(mc->progress.data.display_time_ns, mc->slot_next_frame_display)) { if (time_is_within_half_ms(mc->progress.data.display_time_ns, mc->slot_next_frame_display)) {

View file

@ -408,7 +408,7 @@ struct xrt_layer_data
* The layer may be displayed after this point, but must never be * The layer may be displayed after this point, but must never be
* displayed before. * displayed before.
*/ */
uint64_t timestamp; int64_t timestamp;
/*! /*!
* Composition flags * Composition flags
@ -477,7 +477,7 @@ struct xrt_layer_data
struct xrt_layer_frame_data struct xrt_layer_frame_data
{ {
int64_t frame_id; int64_t frame_id;
uint64_t display_time_ns; int64_t display_time_ns;
enum xrt_blend_mode env_blend_mode; enum xrt_blend_mode env_blend_mode;
}; };

View file

@ -1614,7 +1614,7 @@ enum xrt_facial_tracking_type_htc
struct xrt_facial_base_expression_set_htc struct xrt_facial_base_expression_set_htc
{ {
uint64_t sample_time_ns; int64_t sample_time_ns;
bool is_active; bool is_active;
}; };
@ -1769,7 +1769,7 @@ struct xrt_body_joint_location_fb
struct xrt_base_body_joint_set_meta struct xrt_base_body_joint_set_meta
{ {
uint64_t sample_time_ns; int64_t sample_time_ns;
float confidence; float confidence;
uint32_t skeleton_changed_count; uint32_t skeleton_changed_count;
bool is_active; bool is_active;

View file

@ -36,8 +36,8 @@ struct xrt_frame
enum xrt_format format; enum xrt_format format;
enum xrt_stereo_format stereo_format; enum xrt_stereo_format stereo_format;
uint64_t timestamp; int64_t timestamp;
uint64_t source_timestamp; int64_t source_timestamp;
uint64_t source_sequence; //!< sequence id uint64_t source_sequence; //!< sequence id
uint64_t source_id; //!< Which @ref xrt_fs this frame originated from. uint64_t source_id; //!< Which @ref xrt_fs this frame originated from.
}; };

View file

@ -185,7 +185,7 @@ struct xrt_instance
/*! /*!
* CLOCK_MONOTONIC timestamp of the instance startup. * CLOCK_MONOTONIC timestamp of the instance startup.
*/ */
uint64_t startup_timestamp; int64_t startup_timestamp;
/*! /*!
* An "aspect" of the xrt_instance interface, used only on Android. * An "aspect" of the xrt_instance interface, used only on Android.

View file

@ -101,7 +101,7 @@ struct xrt_session_event_overlay
struct xrt_session_event_loss_pending struct xrt_session_event_loss_pending
{ {
enum xrt_session_event_type type; enum xrt_session_event_type type;
uint64_t loss_time_ns; int64_t loss_time_ns;
}; };
/*! /*!
@ -141,7 +141,7 @@ struct xrt_session_event_reference_space_change_pending
{ {
enum xrt_session_event_type event_type; enum xrt_session_event_type event_type;
enum xrt_reference_space_type ref_type; enum xrt_reference_space_type ref_type;
uint64_t timestamp_ns; int64_t timestamp_ns;
struct xrt_pose pose_in_previous_space; struct xrt_pose pose_in_previous_space;
bool pose_valid; bool pose_valid;
}; };