passthru FB_face_tracking2
This commit is contained in:
@@ -121,6 +121,7 @@ std::shared_ptr<scenes::stream> scenes::stream::create(std::unique_ptr<wivrn_ses
|
||||
|
||||
info.hand_tracking = application::get_hand_tracking_supported();
|
||||
info.eye_gaze = application::get_eye_gaze_supported();
|
||||
info.face_tracking2_fb = application::get_fb_face_tracking2_supported();
|
||||
|
||||
audio::get_audio_description(info);
|
||||
if (not application::get_config().microphone)
|
||||
|
||||
@@ -197,12 +197,15 @@ void scenes::stream::tracking()
|
||||
for (XrDuration Δt = 0; Δt <= prediction; Δt += std::max<XrDuration>(1, prediction))
|
||||
{
|
||||
from_headset::hand_tracking hands{};
|
||||
from_headset::fb_face2 fb_face2{};
|
||||
|
||||
packet.production_timestamp = t0;
|
||||
hands.production_timestamp = t0;
|
||||
fb_face2.production_timestamp = t0;
|
||||
|
||||
packet.timestamp = t0 + Δt;
|
||||
hands.timestamp = t0 + Δt;
|
||||
fb_face2.timestamp = t0 + Δt;
|
||||
|
||||
try
|
||||
{
|
||||
@@ -243,6 +246,14 @@ void scenes::stream::tracking()
|
||||
t.resume();
|
||||
}
|
||||
|
||||
if (application::get_fb_face_tracking2_supported())
|
||||
{
|
||||
application::get_fb_face_tracker2().get_weights(t0 + Δt, &fb_face2);
|
||||
t.pause();
|
||||
network_session->send_stream(fb_face2);
|
||||
t.resume();
|
||||
}
|
||||
|
||||
XrDuration busy_time = t.count();
|
||||
// Target: polling between 1 and 5ms, with 20% busy time
|
||||
tracking_period = std::clamp<XrDuration>(std::lerp(tracking_period, busy_time * 5, 0.2), 1'000'000, 5'000'000);
|
||||
|
||||
Reference in New Issue
Block a user