Reconnection support

This commit is contained in:
Patrick Nicolas
2024-06-03 20:59:03 +02:00
parent f63854a2ab
commit 3a5404d191
11 changed files with 97 additions and 14 deletions
+10 -1
View File
@@ -124,7 +124,7 @@ static void create_encoders(wivrn_comp_target * cn, std::vector<encoder_settings
assert(cn->encoder_threads.empty());
assert(cn->wivrn_bundle);
to_headset::video_stream_description desc{};
auto & desc = cn->desc;
desc.width = cn->width;
desc.height = cn->height;
desc.fps = cn->fps;
@@ -649,6 +649,15 @@ void wivrn_comp_target::on_feedback(const from_headset::feedback & feedback, con
}
}
void wivrn_comp_target::reset_encoders()
{
for (auto & encoder: encoders)
{
encoder->SyncNeeded();
}
cnx->send_control(desc);
}
wivrn_comp_target::wivrn_comp_target(std::shared_ptr<xrt::drivers::wivrn::wivrn_session> cnx, struct comp_compositor * c, float fps) :
comp_target{},
pacer(U_TIME_1S_IN_NS / fps),