Control the tracking loop from server side

On server side, collect each tracking request, create an explicit pattern
describing how the client shall execute them.
This commit is contained in:
Patrick Nicolas
2026-01-29 09:51:52 +01:00
parent 0a71756024
commit fc01002317
28 changed files with 523 additions and 556 deletions
+3 -6
View File
@@ -29,9 +29,7 @@
#include "xrt/xrt_device.h"
#include "xrt/xrt_results.h"
#include <cmath>
#include <cstdint>
#include <cstring>
#include <openxr/openxr.h>
namespace wivrn
@@ -81,16 +79,15 @@ void wivrn_fb_face2_tracker::update_tracking(const from_headset::tracking & trac
.time = offset.from_headset(face->time),
};
if (not face_list.update_tracking(tracking.production_timestamp, tracking.timestamp, data, offset))
cnx.set_enabled(to_headset::tracking_control::id::face, false);
face_list.update_tracking(face->timestamp, tracking.timestamp, data, offset);
}
xrt_result_t wivrn_fb_face2_tracker::get_face_tracking(enum xrt_input_name facial_expression_type, int64_t at_timestamp_ns, struct xrt_facial_expression_set * inout_value)
{
if (facial_expression_type == XRT_INPUT_FB_FACE_TRACKING2_VISUAL)
{
cnx.set_enabled(to_headset::tracking_control::id::face, true);
auto [_, data] = face_list.get_at(at_timestamp_ns);
auto [production_timestamp, data] = face_list.get_at(at_timestamp_ns);
cnx.add_tracking_request(device_id::FACE, at_timestamp_ns, production_timestamp);
inout_value->face_expression_set2_fb.is_valid = data.is_valid;
inout_value->face_expression_set2_fb.sample_time_ns = data.time;