Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Vindicus999
2025-12-08 01:54:49 +00:00
23 changed files with 227 additions and 102 deletions
+5 -5
View File
@@ -646,16 +646,16 @@ void scenes::lobby::gui_settings()
const auto current = config.resolution_scale; const auto current = config.resolution_scale;
const auto width = stream_view.recommendedImageRectWidth; const auto width = stream_view.recommendedImageRectWidth;
const auto height = stream_view.recommendedImageRectHeight; const auto height = stream_view.recommendedImageRectHeight;
auto intScale = int(current * 100); auto intScale = int(current * 10);
const auto slider = ImGui::SliderInt( const auto slider = ImGui::SliderInt(
_("Resolution scale").append("##resolution_scale").c_str(), _("Resolution scale").append("##resolution_scale").c_str(),
&intScale, &intScale,
50, 5,
350, 35,
fmt::format(_F("%d%% - {}x{} per eye"), int(width * current), int(height * current)).c_str()); fmt::format(_F("{}%% - {}x{} per eye"), intScale * 10, int(width * current), int(height * current)).c_str());
if (slider) if (slider)
{ {
config.resolution_scale = intScale * 0.01; config.resolution_scale = intScale * 0.1;
config.save(); config.save();
} }
imgui_ctx->vibrate_on_hover(); imgui_ctx->vibrate_on_hover();
+6 -3
View File
@@ -481,7 +481,7 @@ void scenes::stream::on_focused()
} }
recenter_left = get_action("recenter_left").first; recenter_left = get_action("recenter_left").first;
recenter_right = get_action("recenter_right").first; recenter_right = get_action("recenter_right").first;
foveation_pitch = get_action("foveation_pitch").first; settings_adjust = get_action("settings_adjust").first;
foveation_distance = get_action("foveation_distance").first; foveation_distance = get_action("foveation_distance").first;
foveation_ok = get_action("foveation_ok").first; foveation_ok = get_action("foveation_ok").first;
foveation_cancel = get_action("foveation_cancel").first; foveation_cancel = get_action("foveation_cancel").first;
@@ -741,6 +741,7 @@ bool scenes::stream::is_gui_interactable() const
{ {
case gui_status::stats: case gui_status::stats:
case gui_status::settings: case gui_status::settings:
case gui_status::bitrate_settings:
case gui_status::foveation_settings: case gui_status::foveation_settings:
case gui_status::applications: case gui_status::applications:
case gui_status::application_launcher: case gui_status::application_launcher:
@@ -1010,6 +1011,7 @@ void scenes::stream::render(const XrFrameState & frame_state)
switch (gui_status) switch (gui_status)
{ {
case gui_status::hidden: case gui_status::hidden:
case gui_status::bitrate_settings:
case gui_status::foveation_settings: case gui_status::foveation_settings:
case gui_status::compact: case gui_status::compact:
case gui_status::overlay_only: case gui_status::overlay_only:
@@ -1109,6 +1111,7 @@ void scenes::stream::render(const XrFrameState & frame_state)
case gui_status::stats: case gui_status::stats:
case gui_status::settings: case gui_status::settings:
case gui_status::bitrate_settings:
case gui_status::foveation_settings: case gui_status::foveation_settings:
case gui_status::applications: case gui_status::applications:
case gui_status::application_launcher: case gui_status::application_launcher:
@@ -1207,7 +1210,7 @@ scene::meta & scenes::stream::get_meta_scene()
{"recenter_left", XR_ACTION_TYPE_BOOLEAN_INPUT}, {"recenter_left", XR_ACTION_TYPE_BOOLEAN_INPUT},
{"recenter_right", XR_ACTION_TYPE_BOOLEAN_INPUT}, {"recenter_right", XR_ACTION_TYPE_BOOLEAN_INPUT},
{"foveation_pitch", XR_ACTION_TYPE_FLOAT_INPUT}, {"settings_adjust", XR_ACTION_TYPE_FLOAT_INPUT},
{"foveation_distance", XR_ACTION_TYPE_FLOAT_INPUT}, {"foveation_distance", XR_ACTION_TYPE_FLOAT_INPUT},
{"foveation_ok", XR_ACTION_TYPE_BOOLEAN_INPUT}, {"foveation_ok", XR_ACTION_TYPE_BOOLEAN_INPUT},
{"foveation_cancel", XR_ACTION_TYPE_BOOLEAN_INPUT}, {"foveation_cancel", XR_ACTION_TYPE_BOOLEAN_INPUT},
@@ -1239,7 +1242,7 @@ scene::meta & scenes::stream::get_meta_scene()
{"recenter_left", "/user/hand/left/input/squeeze/value"}, {"recenter_left", "/user/hand/left/input/squeeze/value"},
{"recenter_right", "/user/hand/right/input/squeeze/value"}, {"recenter_right", "/user/hand/right/input/squeeze/value"},
{"foveation_pitch", "/user/hand/right/input/thumbstick/y"}, {"settings_adjust", "/user/hand/right/input/thumbstick/y"},
{"foveation_distance", "/user/hand/left/input/thumbstick/y"}, {"foveation_distance", "/user/hand/left/input/thumbstick/y"},
{"foveation_ok", "/user/hand/right/input/a/click"}, {"foveation_ok", "/user/hand/right/input/a/click"},
{"foveation_cancel", "/user/hand/right/input/b/click"}, {"foveation_cancel", "/user/hand/right/input/b/click"},
+6 -1
View File
@@ -132,6 +132,7 @@ private:
compact, compact,
stats, stats,
settings, settings,
bitrate_settings,
foveation_settings, foveation_settings,
applications, applications,
application_launcher, application_launcher,
@@ -149,7 +150,7 @@ private:
XrAction plots_toggle_2 = XR_NULL_HANDLE; XrAction plots_toggle_2 = XR_NULL_HANDLE;
XrAction recenter_left = XR_NULL_HANDLE; XrAction recenter_left = XR_NULL_HANDLE;
XrAction recenter_right = XR_NULL_HANDLE; XrAction recenter_right = XR_NULL_HANDLE;
XrAction foveation_pitch = XR_NULL_HANDLE; XrAction settings_adjust = XR_NULL_HANDLE;
XrAction foveation_distance = XR_NULL_HANDLE; XrAction foveation_distance = XR_NULL_HANDLE;
XrAction foveation_ok = XR_NULL_HANDLE; XrAction foveation_ok = XR_NULL_HANDLE;
XrAction foveation_cancel = XR_NULL_HANDLE; XrAction foveation_cancel = XR_NULL_HANDLE;
@@ -172,6 +173,8 @@ private:
XrTime running_application_req = 0; XrTime running_application_req = 0;
thread_safe<to_headset::running_applications> running_applications; thread_safe<to_headset::running_applications> running_applications;
std::atomic_uint32_t bitrate = 0;
stream(std::string server_name, scene & parent_scene); stream(std::string server_name, scene & parent_scene);
bool forward_hid_input(from_headset::hid::input_t); bool forward_hid_input(from_headset::hid::input_t);
@@ -207,6 +210,7 @@ public:
void operator()(to_headset::tracking_control &&); void operator()(to_headset::tracking_control &&);
void operator()(to_headset::audio_stream_description &&); void operator()(to_headset::audio_stream_description &&);
void operator()(to_headset::video_stream_description &&); void operator()(to_headset::video_stream_description &&);
void operator()(to_headset::settings &&);
void operator()(to_headset::refresh_rate_change &&); void operator()(to_headset::refresh_rate_change &&);
void operator()(to_headset::application_list &&); void operator()(to_headset::application_list &&);
void operator()(to_headset::application_icon &&); void operator()(to_headset::application_icon &&);
@@ -312,6 +316,7 @@ private:
void gui_performance_metrics(); void gui_performance_metrics();
void gui_compact_view(); void gui_compact_view();
void gui_settings(float predicted_display_period); void gui_settings(float predicted_display_period);
void gui_bitrate_settings(float predicted_display_period);
void gui_foveation_settings(float predicted_display_period); void gui_foveation_settings(float predicted_display_period);
void gui_applications(); void gui_applications();
void draw_gui(XrTime predicted_display_time, XrDuration predicted_display_period); void draw_gui(XrTime predicted_display_time, XrDuration predicted_display_period);
+51 -6
View File
@@ -383,10 +383,12 @@ void scenes::stream::gui_compact_view()
} }
} }
static void send_settings_changed_packet(xr::session & session, wivrn_session * network, const configuration & config, float predicted_display_period) static void send_settings_changed_packet(xr::session & session, wivrn_session * network, const configuration & config, uint32_t bitrate, float predicted_display_period)
{ {
const auto & refresh_rates = session.get_refresh_rates(); const auto & refresh_rates = session.get_refresh_rates();
from_headset::settings_changed packet{}; from_headset::settings_changed packet{
.bitrate_bps = bitrate,
};
if (config.preferred_refresh_rate and (config.preferred_refresh_rate == 0 or utils::contains(refresh_rates, *config.preferred_refresh_rate))) if (config.preferred_refresh_rate and (config.preferred_refresh_rate == 0 or utils::contains(refresh_rates, *config.preferred_refresh_rate)))
{ {
packet.preferred_refresh_rate = *config.preferred_refresh_rate; packet.preferred_refresh_rate = *config.preferred_refresh_rate;
@@ -402,6 +404,7 @@ static void send_settings_changed_packet(xr::session & session, wivrn_session *
std::string openxr_post_processing_flag_name(XrCompositionLayerSettingsFlagsFB flag); // TODO declaration in a .h file std::string openxr_post_processing_flag_name(XrCompositionLayerSettingsFlagsFB flag); // TODO declaration in a .h file
void scenes::stream::gui_settings(float predicted_display_period) void scenes::stream::gui_settings(float predicted_display_period)
{ {
const ImGuiStyle & style = ImGui::GetStyle();
auto & config = application::get_config(); auto & config = application::get_config();
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(20, 20)); ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(20, 20));
@@ -418,7 +421,7 @@ void scenes::stream::gui_settings(float predicted_display_period)
{ {
session.set_refresh_rate(0); session.set_refresh_rate(0);
config.preferred_refresh_rate = 0; config.preferred_refresh_rate = 0;
send_settings_changed_packet(session, network_session.get(), config, predicted_display_period); send_settings_changed_packet(session, network_session.get(), config, bitrate, predicted_display_period);
config.save(); config.save();
} }
if (ImGui::IsItemHovered()) if (ImGui::IsItemHovered())
@@ -429,7 +432,7 @@ void scenes::stream::gui_settings(float predicted_display_period)
{ {
session.set_refresh_rate(rate); session.set_refresh_rate(rate);
config.preferred_refresh_rate = rate; config.preferred_refresh_rate = rate;
send_settings_changed_packet(session, network_session.get(), config, predicted_display_period); send_settings_changed_packet(session, network_session.get(), config, bitrate, predicted_display_period);
config.save(); config.save();
} }
} }
@@ -447,7 +450,7 @@ void scenes::stream::gui_settings(float predicted_display_period)
if (ImGui::Selectable(fmt::format("{}", rate).c_str(), rate == config.minimum_refresh_rate, ImGuiSelectableFlags_SelectOnRelease)) if (ImGui::Selectable(fmt::format("{}", rate).c_str(), rate == config.minimum_refresh_rate, ImGuiSelectableFlags_SelectOnRelease))
{ {
config.minimum_refresh_rate = rate; config.minimum_refresh_rate = rate;
send_settings_changed_packet(session, network_session.get(), config, predicted_display_period); send_settings_changed_packet(session, network_session.get(), config, bitrate, predicted_display_period);
config.save(); config.save();
} }
} }
@@ -458,6 +461,20 @@ void scenes::stream::gui_settings(float predicted_display_period)
} }
} }
{
const auto text = _("Bitrate:");
const auto size = ImGui::CalcTextSize(text.c_str());
ImGui::Text("%s", text.c_str());
ImGui::SameLine(0.f, 10.f);
ImGui::SetCursorPosY(ImGui::GetCursorPosY() + (size.y / 4.f) - style.FramePadding.y * 3.f);
if (ImGui::Button(fmt::format("{}Mbit/s", bitrate / 1'000'000).c_str()))
gui_status = gui_status::bitrate_settings;
imgui_ctx->vibrate_on_hover();
if (ImGui::IsItemHovered())
imgui_ctx->tooltip(_("Click to adjust bitrate"));
}
if (application::get_openxr_post_processing_supported()) if (application::get_openxr_post_processing_supported())
{ {
ImGui::Text("%s", _S("OpenXR post-processing")); ImGui::Text("%s", _S("OpenXR post-processing"));
@@ -571,6 +588,27 @@ void scenes::stream::gui_settings(float predicted_display_period)
ImGui::PopStyleVar(); ImGui::PopStyleVar();
} }
void scenes::stream::gui_bitrate_settings(float predicted_display_period)
{
ImGui::PushFont(nullptr, constants::gui::font_size_large);
ImGui::Text("%s", _S("Use the right thumbstick to adjust the bitrate"));
ImGui::Text("%s", _S("Press A to go back"));
ImGui::Text("%s", fmt::format(_F("Bitrate: {}Mbit/s"), bitrate / 1'000'000).c_str());
ImGui::PopFont();
// Maximum speed of 20Mbit/s
float delta = application::read_action_float(settings_adjust).value_or(std::pair{0, 0}).second * 20'000'000.f * predicted_display_period;
bitrate = std::clamp(bitrate + static_cast<int32_t>(delta), 1'000'000u, 200'000'000u);
bool ok = application::read_action_bool(foveation_ok).value_or(std::pair{0, false}).second;
if (ok)
gui_status = gui_status::settings;
send_settings_changed_packet(session, network_session.get(), application::get_config(), bitrate, predicted_display_period);
}
void scenes::stream::gui_foveation_settings(float predicted_display_period) void scenes::stream::gui_foveation_settings(float predicted_display_period)
{ {
ImGui::PushFont(nullptr, constants::gui::font_size_large); ImGui::PushFont(nullptr, constants::gui::font_size_large);
@@ -581,7 +619,7 @@ void scenes::stream::gui_foveation_settings(float predicted_display_period)
ImGui::PopFont(); ImGui::PopFont();
// Maximum speed 1 rad/s // Maximum speed 1 rad/s
float delta_pitch = application::read_action_float(foveation_pitch).value_or(std::pair{0, 0}).second * predicted_display_period; float delta_pitch = application::read_action_float(settings_adjust).value_or(std::pair{0, 0}).second * predicted_display_period;
// Maximum speed 2m/s @ 1m // Maximum speed 2m/s @ 1m
float delta_distance = std::exp(std::log(2) * application::read_action_float(foveation_distance).value_or(std::pair{0, 0}).second * predicted_display_period); float delta_distance = std::exp(std::log(2) * application::read_action_float(foveation_distance).value_or(std::pair{0, 0}).second * predicted_display_period);
@@ -726,6 +764,7 @@ void scenes::stream::draw_gui(XrTime predicted_display_time, XrDuration predicte
switch (gui_status) switch (gui_status)
{ {
case gui_status::hidden: case gui_status::hidden:
case gui_status::bitrate_settings:
case gui_status::foveation_settings: case gui_status::foveation_settings:
case gui_status::overlay_only: case gui_status::overlay_only:
case gui_status::compact: case gui_status::compact:
@@ -788,6 +827,7 @@ void scenes::stream::draw_gui(XrTime predicted_display_time, XrDuration predicte
glm::mat3 M = glm::mat3_cast(head_position->second); glm::mat3 M = glm::mat3_cast(head_position->second);
switch (gui_status) switch (gui_status)
{ {
case gui_status::bitrate_settings:
case gui_status::foveation_settings: case gui_status::foveation_settings:
imgui_ctx->layers()[0].orientation = head_position->second; imgui_ctx->layers()[0].orientation = head_position->second;
imgui_ctx->layers()[0].position = head_position->first + M * glm::vec3{0, -override_foveation_distance * sin(override_foveation_pitch), -override_foveation_distance}; imgui_ctx->layers()[0].position = head_position->first + M * glm::vec3{0, -override_foveation_distance * sin(override_foveation_pitch), -override_foveation_distance};
@@ -831,6 +871,7 @@ void scenes::stream::draw_gui(XrTime predicted_display_time, XrDuration predicte
break; break;
case gui_status::hidden: case gui_status::hidden:
case gui_status::bitrate_settings:
case gui_status::foveation_settings: case gui_status::foveation_settings:
ImGui::SetNextWindowPos(ImGui::GetMainViewport()->Size / 2, ImGuiCond_Always, ImVec2(0.5f, 0.5f)); ImGui::SetNextWindowPos(ImGui::GetMainViewport()->Size / 2, ImGuiCond_Always, ImVec2(0.5f, 0.5f));
always_auto_resize = true; always_auto_resize = true;
@@ -905,6 +946,10 @@ void scenes::stream::draw_gui(XrTime predicted_display_time, XrDuration predicte
ImGui::EndChild(); ImGui::EndChild();
break; break;
case gui_status::bitrate_settings:
gui_bitrate_settings(predicted_display_period * 1.e-9f);
break;
case gui_status::foveation_settings: case gui_status::foveation_settings:
gui_foveation_settings(predicted_display_period * 1.e-9f); gui_foveation_settings(predicted_display_period * 1.e-9f);
break; break;
+5
View File
@@ -74,6 +74,11 @@ void scenes::stream::operator()(to_headset::video_stream_description && desc)
} }
} }
void scenes::stream::operator()(to_headset::settings && settings)
{
bitrate = settings.bitrate_bps;
}
void scenes::stream::operator()(to_headset::refresh_rate_change && rate) void scenes::stream::operator()(to_headset::refresh_rate_change && rate)
{ {
session.set_refresh_rate(rate.fps); session.set_refresh_rate(rate.fps);
+12
View File
@@ -248,11 +248,16 @@ struct headset_info_packet
std::string variant; std::string variant;
}; };
struct settings_request
{};
struct settings_changed struct settings_changed
{ {
float preferred_refresh_rate; float preferred_refresh_rate;
// for automatic // for automatic
float minimum_refresh_rate; float minimum_refresh_rate;
uint32_t bitrate_bps;
}; };
struct handshake struct handshake
@@ -542,6 +547,7 @@ using packets = std::variant<
pin_check_1, pin_check_1,
pin_check_3, pin_check_3,
headset_info_packet, headset_info_packet,
settings_request,
settings_changed, settings_changed,
feedback, feedback,
audio_data, audio_data,
@@ -749,6 +755,11 @@ struct tracking_control
std::array<bool, size_t(id::last) + 1> enabled; std::array<bool, size_t(id::last) + 1> enabled;
}; };
struct settings
{
uint32_t bitrate_bps;
};
struct refresh_rate_change struct refresh_rate_change
{ {
float fps; float fps;
@@ -797,6 +808,7 @@ using packets = std::variant<
haptics, haptics,
timesync_query, timesync_query,
tracking_control, tracking_control,
settings,
refresh_rate_change, refresh_rate_change,
application_list, application_list,
application_icon, application_icon,
+2 -2
View File
@@ -216,8 +216,8 @@ msgstr "Escala de resolución"
#: client/scenes/lobby_gui.cpp:655 #: client/scenes/lobby_gui.cpp:655
#, c-format, c++-format #, c-format, c++-format
msgid "%d%% - {}x{} per eye" msgid "{}%% - {}x{} per eye"
msgstr "%d%% - {}x{} por ojo" msgstr "{}%% - {}x{} por ojo"
#: client/scenes/lobby_gui.cpp:666 #: client/scenes/lobby_gui.cpp:666
#, c++-format #, c++-format
+2 -2
View File
@@ -217,8 +217,8 @@ msgstr "Échelle"
#: client/scenes/lobby_gui.cpp:655 #: client/scenes/lobby_gui.cpp:655
#, c-format, c++-format #, c-format, c++-format
msgid "%d%% - {}x{} per eye" msgid "{}%% - {}x{} per eye"
msgstr "%d%% - {}x{} par œil" msgstr "{}%% - {}x{} par œil"
#: client/scenes/lobby_gui.cpp:666 #: client/scenes/lobby_gui.cpp:666
#, c++-format #, c++-format
+2 -2
View File
@@ -213,8 +213,8 @@ msgstr "Scala di risoluzione"
#: client/scenes/lobby_gui.cpp:655 #: client/scenes/lobby_gui.cpp:655
#, c-format, c++-format #, c-format, c++-format
msgid "%d%% - {}x{} per eye" msgid "{}%% - {}x{} per eye"
msgstr "%d%% - {}x{} per occhio" msgstr "{}%% - {}x{} per occhio"
#: client/scenes/lobby_gui.cpp:666 #: client/scenes/lobby_gui.cpp:666
#, c++-format #, c++-format
+2 -2
View File
@@ -204,8 +204,8 @@ msgstr "解像度"
#: client/scenes/lobby_gui.cpp:655 #: client/scenes/lobby_gui.cpp:655
#, c-format, c++-format #, c-format, c++-format
msgid "%d%% - {}x{} per eye" msgid "{}%% - {}x{} per eye"
msgstr "%d%% - 目あたり{}x{}" msgstr "{}%% - 目あたり{}x{}"
#: client/scenes/lobby_gui.cpp:666 #: client/scenes/lobby_gui.cpp:666
#, c++-format #, c++-format
+2 -2
View File
@@ -212,8 +212,8 @@ msgstr "Skala rozdzielczości"
#: client/scenes/lobby_gui.cpp:655 #: client/scenes/lobby_gui.cpp:655
#, c-format, c++-format #, c-format, c++-format
msgid "%d%% - {}x{} per eye" msgid "{}%% - {}x{} per eye"
msgstr "%d%% - {}x{} na oko" msgstr "{}%% - {}x{} na oko"
#: client/scenes/lobby_gui.cpp:666 #: client/scenes/lobby_gui.cpp:666
#, c++-format #, c++-format
+79 -58
View File
@@ -11,8 +11,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WiVRn\n" "Project-Id-Version: WiVRn\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-12-02 19:57+0100\n" "POT-Creation-Date: 2025-12-07 15:32+0100\n"
"PO-Revision-Date: 2025-12-03 19:23+0100\n" "PO-Revision-Date: 2025-12-07 17:05+0100\n"
"Last-Translator: Claudio Sampaio (Patola) <patola@gmail.com>\n" "Last-Translator: Claudio Sampaio (Patola) <patola@gmail.com>\n"
"Language-Team: Portuguese <>\n" "Language-Team: Portuguese <>\n"
"Language: pt_BR\n" "Language: pt_BR\n"
@@ -73,11 +73,11 @@ msgstr "Incapaz de conectar a {} ({}): {}"
msgid "Waiting for connection" msgid "Waiting for connection"
msgstr "Aguardando conexão" msgstr "Aguardando conexão"
#: client/scenes/lobby.cpp:1310 #: client/scenes/lobby.cpp:1308
msgid "Passthrough" msgid "Passthrough"
msgstr "Passthrough" msgstr "Passthrough"
#: client/scenes/lobby.cpp:1322 #: client/scenes/lobby.cpp:1320
msgid "Default environment" msgid "Default environment"
msgstr "Ambiente default" msgstr "Ambiente default"
@@ -97,13 +97,13 @@ msgid "Disabled"
msgstr "Desabilitado" msgstr "Desabilitado"
#: client/scenes/lobby_gui.cpp:112 client/scenes/lobby_gui.cpp:256 #: client/scenes/lobby_gui.cpp:112 client/scenes/lobby_gui.cpp:256
#: client/scenes/stream_gui.cpp:967 #: client/scenes/stream_gui.cpp:1012
msgid "Disconnect" msgid "Disconnect"
msgstr "Desconectar" msgstr "Desconectar"
#: client/scenes/lobby_gui.cpp:132 client/scenes/lobby_gui_customize.cpp:749 #: client/scenes/lobby_gui.cpp:132 client/scenes/lobby_gui_customize.cpp:749
#: client/scenes/lobby_gui_customize.cpp:840 #: client/scenes/lobby_gui_customize.cpp:840
#: client/scenes/lobby_gui_customize.cpp:896 client/scenes/stream_gui.cpp:963 #: client/scenes/lobby_gui_customize.cpp:896 client/scenes/stream_gui.cpp:1008
msgid "Close" msgid "Close"
msgstr "Fechar" msgstr "Fechar"
@@ -141,7 +141,7 @@ msgid "TCP only"
msgstr "TCP somente" msgstr "TCP somente"
#: client/scenes/lobby_gui.cpp:317 client/scenes/lobby_gui_customize.cpp:651 #: client/scenes/lobby_gui.cpp:317 client/scenes/lobby_gui_customize.cpp:651
#: client/scenes/stream_gui.cpp:920 #: client/scenes/stream_gui.cpp:965
msgid "Cancel" msgid "Cancel"
msgstr "Cancelar" msgstr "Cancelar"
@@ -186,17 +186,17 @@ msgstr "Linguagem"
msgid "System language" msgid "System language"
msgstr "Linguagem do Sistema" msgstr "Linguagem do Sistema"
#: client/scenes/lobby_gui.cpp:577 client/scenes/stream_gui.cpp:415 #: client/scenes/lobby_gui.cpp:577 client/scenes/stream_gui.cpp:418
msgid "Refresh rate" msgid "Refresh rate"
msgstr "Taxa de atualização" msgstr "Taxa de atualização"
#: client/scenes/lobby_gui.cpp:577 client/scenes/lobby_gui.cpp:579 #: client/scenes/lobby_gui.cpp:577 client/scenes/lobby_gui.cpp:579
#: client/scenes/stream_gui.cpp:415 client/scenes/stream_gui.cpp:417 #: client/scenes/stream_gui.cpp:418 client/scenes/stream_gui.cpp:420
msgctxt "automatic refresh rate" msgctxt "automatic refresh rate"
msgid "Automatic" msgid "Automatic"
msgstr "Automático" msgstr "Automático"
#: client/scenes/lobby_gui.cpp:586 client/scenes/stream_gui.cpp:425 #: client/scenes/lobby_gui.cpp:586 client/scenes/stream_gui.cpp:428
msgid "" msgid ""
"Select refresh rate based on measured application performance.\n" "Select refresh rate based on measured application performance.\n"
"May cause flicker when a change happens." "May cause flicker when a change happens."
@@ -204,7 +204,7 @@ msgstr ""
"Seleciona a taxa de atualização baseada no desempenho medido do aplicativo.\n" "Seleciona a taxa de atualização baseada no desempenho medido do aplicativo.\n"
"Pode causar oscilações quando uma alteração ocorrer." "Pode causar oscilações quando uma alteração ocorrer."
#: client/scenes/lobby_gui.cpp:603 client/scenes/stream_gui.cpp:443 #: client/scenes/lobby_gui.cpp:603 client/scenes/stream_gui.cpp:446
msgid "Minimum refresh rate" msgid "Minimum refresh rate"
msgstr "Taxa de atualização mínima" msgstr "Taxa de atualização mínima"
@@ -218,8 +218,8 @@ msgstr "Escala de resolução"
#: client/scenes/lobby_gui.cpp:655 #: client/scenes/lobby_gui.cpp:655
#, c-format, c++-format #, c-format, c++-format
msgid "%d%% - {}x{} per eye" msgid "{}%% - {}x{} per eye"
msgstr "%d%% - {}x{} por olho" msgstr "{}%% - {}x{} por olho"
#: client/scenes/lobby_gui.cpp:666 #: client/scenes/lobby_gui.cpp:666
#, c++-format #, c++-format
@@ -322,15 +322,15 @@ msgstr ""
"streamado.\n" "streamado.\n"
"Se habilitado, a janela é ativada clicando os dois joysticks simultaneamente." "Se habilitado, a janela é ativada clicando os dois joysticks simultaneamente."
#: client/scenes/lobby_gui.cpp:805 client/scenes/stream_gui.cpp:463 #: client/scenes/lobby_gui.cpp:805 client/scenes/stream_gui.cpp:480
msgid "OpenXR post-processing" msgid "OpenXR post-processing"
msgstr "Pós-processamento OpenXR" msgstr "Pós-processamento OpenXR"
#: client/scenes/lobby_gui.cpp:809 client/scenes/stream_gui.cpp:467 #: client/scenes/lobby_gui.cpp:809 client/scenes/stream_gui.cpp:484
msgid "Supersampling" msgid "Supersampling"
msgstr "Supersampling" msgstr "Supersampling"
#: client/scenes/lobby_gui.cpp:829 client/scenes/stream_gui.cpp:488 #: client/scenes/lobby_gui.cpp:829 client/scenes/stream_gui.cpp:505
msgid "" msgid ""
"Reduce flicker for high contrast edges.\n" "Reduce flicker for high contrast edges.\n"
"Useful when the input resolution is high compared to the headset display" "Useful when the input resolution is high compared to the headset display"
@@ -338,11 +338,11 @@ msgstr ""
"Reduz flicker para arestas de alto contraste.\n" "Reduz flicker para arestas de alto contraste.\n"
"Útil quando a resolução de entrada é alta comparada ao display do headset" "Útil quando a resolução de entrada é alta comparada ao display do headset"
#: client/scenes/lobby_gui.cpp:834 client/scenes/stream_gui.cpp:493 #: client/scenes/lobby_gui.cpp:834 client/scenes/stream_gui.cpp:510
msgid "Sharpening" msgid "Sharpening"
msgstr "Aumento de nitidez" msgstr "Aumento de nitidez"
#: client/scenes/lobby_gui.cpp:854 client/scenes/stream_gui.cpp:514 #: client/scenes/lobby_gui.cpp:854 client/scenes/stream_gui.cpp:531
msgid "" msgid ""
"Improve clarity of high contrast edges and counteract blur.\n" "Improve clarity of high contrast edges and counteract blur.\n"
"Useful when the input resolution is low compared to the headset display" "Useful when the input resolution is low compared to the headset display"
@@ -388,91 +388,91 @@ msgstr "Habilitar o rastreamento corporal?"
msgid "Welcome to WiVRn" msgid "Welcome to WiVRn"
msgstr "Bem vindo(a) ao WiVRn" msgstr "Bem vindo(a) ao WiVRn"
#: client/scenes/lobby_gui.cpp:1169 #: client/scenes/lobby_gui.cpp:1171
msgid "Yes" msgid "Yes"
msgstr "Sim" msgstr "Sim"
#: client/scenes/lobby_gui.cpp:1176 #: client/scenes/lobby_gui.cpp:1178
msgid "No" msgid "No"
msgstr "Não" msgstr "Não"
#: client/scenes/lobby_gui.cpp:1195 client/scenes/lobby_gui.cpp:1836 #: client/scenes/lobby_gui.cpp:1197 client/scenes/lobby_gui.cpp:1843
msgid "Licenses" msgid "Licenses"
msgstr "Licenças" msgstr "Licenças"
#: client/scenes/lobby_gui.cpp:1470 #: client/scenes/lobby_gui.cpp:1473
msgid "Microphone is enabled" msgid "Microphone is enabled"
msgstr "O microfone está ativado" msgstr "O microfone está ativado"
#: client/scenes/lobby_gui.cpp:1471 #: client/scenes/lobby_gui.cpp:1474
msgid "Microphone is disabled" msgid "Microphone is disabled"
msgstr "O microfone está desativado" msgstr "O microfone está desativado"
#: client/scenes/lobby_gui.cpp:1480 #: client/scenes/lobby_gui.cpp:1483
msgid "Hand tracking is enabled" msgid "Hand tracking is enabled"
msgstr "O rastreamento de mãos está ativado" msgstr "O rastreamento de mãos está ativado"
#: client/scenes/lobby_gui.cpp:1481 #: client/scenes/lobby_gui.cpp:1484
msgid "Hand tracking is disabled" msgid "Hand tracking is disabled"
msgstr "O rastreamento de mãos está desativado" msgstr "O rastreamento de mãos está desativado"
#: client/scenes/lobby_gui.cpp:1490 #: client/scenes/lobby_gui.cpp:1493
msgid "Eye tracking is enabled" msgid "Eye tracking is enabled"
msgstr "O rastreamento ocular está ativado" msgstr "O rastreamento ocular está ativado"
#: client/scenes/lobby_gui.cpp:1491 #: client/scenes/lobby_gui.cpp:1494
msgid "Eye tracking is disabled" msgid "Eye tracking is disabled"
msgstr "O rastreamento ocular está desativado" msgstr "O rastreamento ocular está desativado"
#: client/scenes/lobby_gui.cpp:1501 #: client/scenes/lobby_gui.cpp:1504
msgid "Face tracking is enabled" msgid "Face tracking is enabled"
msgstr "O rastreamento facial está ativado" msgstr "O rastreamento facial está ativado"
#: client/scenes/lobby_gui.cpp:1502 #: client/scenes/lobby_gui.cpp:1505
msgid "Face tracking is disabled" msgid "Face tracking is disabled"
msgstr "O rastreamento facial está desativado" msgstr "O rastreamento facial está desativado"
#: client/scenes/lobby_gui.cpp:1512 #: client/scenes/lobby_gui.cpp:1519
msgid "Body tracking is enabled" msgid "Body tracking is enabled"
msgstr "O rastreamento corporal está ativado" msgstr "O rastreamento corporal está ativado"
#: client/scenes/lobby_gui.cpp:1513 #: client/scenes/lobby_gui.cpp:1520
msgid "Body tracking is disabled" msgid "Body tracking is disabled"
msgstr "O rastreamento corporal está desativado" msgstr "O rastreamento corporal está desativado"
#: client/scenes/lobby_gui.cpp:1529 #: client/scenes/lobby_gui.cpp:1536
msgid "Add server" msgid "Add server"
msgstr "Adicionar servidor" msgstr "Adicionar servidor"
#: client/scenes/lobby_gui.cpp:1815 #: client/scenes/lobby_gui.cpp:1822
msgid "Server list" msgid "Server list"
msgstr "Lista de servidores" msgstr "Lista de servidores"
#: client/scenes/lobby_gui.cpp:1818 client/scenes/stream_gui.cpp:948 #: client/scenes/lobby_gui.cpp:1825 client/scenes/stream_gui.cpp:993
msgid "Settings" msgid "Settings"
msgstr "Ajustes" msgstr "Ajustes"
#: client/scenes/lobby_gui.cpp:1821 #: client/scenes/lobby_gui.cpp:1828
msgid "Post-processing" msgid "Post-processing"
msgstr "Pós-processamento" msgstr "Pós-processamento"
#: client/scenes/lobby_gui.cpp:1824 #: client/scenes/lobby_gui.cpp:1831
msgid "Customize" msgid "Customize"
msgstr "Personalizar" msgstr "Personalizar"
#: client/scenes/lobby_gui.cpp:1828 #: client/scenes/lobby_gui.cpp:1835
msgid "Debug" msgid "Debug"
msgstr "Depurar" msgstr "Depurar"
#: client/scenes/lobby_gui.cpp:1833 #: client/scenes/lobby_gui.cpp:1840
msgid "About" msgid "About"
msgstr "Sobre" msgstr "Sobre"
#: client/scenes/lobby_gui.cpp:1839 #: client/scenes/lobby_gui.cpp:1846
msgid "Exit" msgid "Exit"
msgstr "Sair" msgstr "Sair"
#: client/scenes/lobby_gui.cpp:1856 #: client/scenes/lobby_gui.cpp:1863
msgid "" msgid ""
"Press the grip button or put your palm up\n" "Press the grip button or put your palm up\n"
"to move the main window" "to move the main window"
@@ -480,7 +480,7 @@ msgstr ""
"Pressione o botão de aderência ou coloque a palma da mão para cima\n" "Pressione o botão de aderência ou coloque a palma da mão para cima\n"
"para mover a janela principal" "para mover a janela principal"
#: client/scenes/lobby_gui.cpp:1858 #: client/scenes/lobby_gui.cpp:1865
msgid "Press the grip button to move the main window" msgid "Press the grip button to move the main window"
msgstr "Pressione o botão de aderência para mover a janela principal" msgstr "Pressione o botão de aderência para mover a janela principal"
@@ -625,7 +625,7 @@ msgstr "Movimento estimado para a latência de fótons: {}ms"
msgid "Press the grip button to move the window" msgid "Press the grip button to move the window"
msgstr "Pressione o botão de aderência para mover a janela" msgstr "Pressione o botão de aderência para mover a janela"
#: client/scenes/stream_gui.cpp:354 client/scenes/stream_gui.cpp:880 #: client/scenes/stream_gui.cpp:354 client/scenes/stream_gui.cpp:921
msgid "Press both thumbsticks to display the WiVRn window" msgid "Press both thumbsticks to display the WiVRn window"
msgstr "Pressione ambos os thumbsticks para mostrar a janela do WiVRn" msgstr "Pressione ambos os thumbsticks para mostrar a janela do WiVRn"
@@ -633,69 +633,90 @@ msgstr "Pressione ambos os thumbsticks para mostrar a janela do WiVRn"
msgid "Motion to photon latency" msgid "Motion to photon latency"
msgstr "Latência (de movimento para fótons)" msgstr "Latência (de movimento para fótons)"
#: client/scenes/stream_gui.cpp:521 #: client/scenes/stream_gui.cpp:465
msgid "Bitrate:"
msgstr "Bitrate:"
#: client/scenes/stream_gui.cpp:475
msgid "Click to adjust bitrate"
msgstr "Clique para ajustar a bitrate"
#: client/scenes/stream_gui.cpp:538
msgid "Foveation center override" msgid "Foveation center override"
msgstr "Ajuste do centro de foveação" msgstr "Ajuste do centro de foveação"
#: client/scenes/stream_gui.cpp:524 #: client/scenes/stream_gui.cpp:541
msgid "Enable" msgid "Enable"
msgstr "Habilitar" msgstr "Habilitar"
#: client/scenes/stream_gui.cpp:532 client/scenes/stream_gui.cpp:579 #: client/scenes/stream_gui.cpp:549 client/scenes/stream_gui.cpp:617
#, c++-format #, c++-format
msgid "Height {:.1f} deg" msgid "Height {:.1f} deg"
msgstr "Altura {:.1f} graus" msgstr "Altura {:.1f} graus"
#: client/scenes/stream_gui.cpp:533 client/scenes/stream_gui.cpp:580 #: client/scenes/stream_gui.cpp:550 client/scenes/stream_gui.cpp:618
#, c++-format #, c++-format
msgid "Distance {:.2f} m" msgid "Distance {:.2f} m"
msgstr "Distância {:.2f} m" msgstr "Distância {:.2f} m"
#: client/scenes/stream_gui.cpp:534 #: client/scenes/stream_gui.cpp:551
msgid "Default" msgid "Default"
msgstr "Padrão" msgstr "Padrão"
#: client/scenes/stream_gui.cpp:545 #: client/scenes/stream_gui.cpp:562
msgid "Change" msgid "Change"
msgstr "Modificar" msgstr "Modificar"
#: client/scenes/stream_gui.cpp:577 #: client/scenes/stream_gui.cpp:594
msgid "Use the right thumbstick to adjust the bitrate"
msgstr "Use o analógico direito para ajustar a bitrate"
#: client/scenes/stream_gui.cpp:595
msgid "Press A to go back"
msgstr "Pressione A para voltar"
#: client/scenes/stream_gui.cpp:596
#, c++-format
msgid "Bitrate: {}Mbit/s"
msgstr "Bitrate: {}Mbit/s"
#: client/scenes/stream_gui.cpp:615
msgid "Use the thumbsticks to move the foveation center" msgid "Use the thumbsticks to move the foveation center"
msgstr "Use os thumbsticks para mover o centro da foveação" msgstr "Use os thumbsticks para mover o centro da foveação"
#: client/scenes/stream_gui.cpp:578 #: client/scenes/stream_gui.cpp:616
msgid "Press A to save or B to cancel" msgid "Press A to save or B to cancel"
msgstr "Pressione A para salvar ou B para cancelar" msgstr "Pressione A para salvar ou B para cancelar"
#: client/scenes/stream_gui.cpp:636 #: client/scenes/stream_gui.cpp:674
msgid "Running XR applications:" msgid "Running XR applications:"
msgstr "Aplicativos XR rodando:" msgstr "Aplicativos XR rodando:"
#: client/scenes/stream_gui.cpp:653 #: client/scenes/stream_gui.cpp:691
msgid "Overlays" msgid "Overlays"
msgstr "Overlays" msgstr "Overlays"
#: client/scenes/stream_gui.cpp:692 #: client/scenes/stream_gui.cpp:730
msgid "Request to quit, may be ignored by the application" msgid "Request to quit, may be ignored by the application"
msgstr "Requisição para sair, pode ser ignorada pelo aplicativo" msgstr "Requisição para sair, pode ser ignorada pelo aplicativo"
#: client/scenes/stream_gui.cpp:935 #: client/scenes/stream_gui.cpp:980
msgid "Applications" msgid "Applications"
msgstr "Aplicativos" msgstr "Aplicativos"
#: client/scenes/stream_gui.cpp:938 #: client/scenes/stream_gui.cpp:983
msgid "Start" msgid "Start"
msgstr "Iniciar" msgstr "Iniciar"
#: client/scenes/stream_gui.cpp:951 #: client/scenes/stream_gui.cpp:996
msgid "Stats" msgid "Stats"
msgstr "Estatísticas" msgstr "Estatísticas"
#: client/scenes/stream_gui.cpp:957 #: client/scenes/stream_gui.cpp:1002
msgid "Statistics overlay" msgid "Statistics overlay"
msgstr "Overlay de estatísticas" msgstr "Overlay de estatísticas"
#: client/scenes/stream_gui.cpp:960 #: client/scenes/stream_gui.cpp:1005
msgid "Compact view" msgid "Compact view"
msgstr "Visualização compacta" msgstr "Visualização compacta"
+2 -2
View File
@@ -213,8 +213,8 @@ msgstr "Масштаб разрешения"
#: client/scenes/lobby_gui.cpp:655 #: client/scenes/lobby_gui.cpp:655
#, c-format, c++-format #, c-format, c++-format
msgid "%d%% - {}x{} per eye" msgid "{}%% - {}x{} per eye"
msgstr "%d%% - {}x{} на каждый глаз" msgstr "{}%% - {}x{} на каждый глаз"
#: client/scenes/lobby_gui.cpp:666 #: client/scenes/lobby_gui.cpp:666
#, c++-format #, c++-format
+2 -2
View File
@@ -199,8 +199,8 @@ msgstr "Rozlíšenie"
#: client/scenes/lobby_gui.cpp:894 #: client/scenes/lobby_gui.cpp:894
#, c-format, c++-format #, c-format, c++-format
msgid "%d%% - {}x{} per eye" msgid "{}%% - {}x{} per eye"
msgstr "%d%% - {}x{} na oko" msgstr "{}%% - {}x{} na oko"
#: client/scenes/lobby_gui.cpp:905 #: client/scenes/lobby_gui.cpp:905
#, c++-format #, c++-format
+2 -2
View File
@@ -214,8 +214,8 @@ msgstr "Çözünürlük ölçeği"
#: client/scenes/lobby_gui.cpp:655 #: client/scenes/lobby_gui.cpp:655
#, c-format, c++-format #, c-format, c++-format
msgid "%d%% - {}x{} per eye" msgid "{}%% - {}x{} per eye"
msgstr "göz başına %d%% - {}x{}" msgstr "göz başına {}%% - {}x{}"
#: client/scenes/lobby_gui.cpp:666 #: client/scenes/lobby_gui.cpp:666
#, c++-format #, c++-format
+2 -2
View File
@@ -213,8 +213,8 @@ msgstr "分辨率缩放比例"
#: client/scenes/lobby_gui.cpp:655 #: client/scenes/lobby_gui.cpp:655
#, c-format, c++-format #, c-format, c++-format
msgid "%d%% - {}x{} per eye" msgid "{}%% - {}x{} per eye"
msgstr "%d%% - 单眼 {}x{}" msgstr "{}%% - 单眼 {}x{}"
#: client/scenes/lobby_gui.cpp:666 #: client/scenes/lobby_gui.cpp:666
#, c++-format #, c++-format
+2 -2
View File
@@ -195,8 +195,8 @@ msgstr "解析度縮放比例"
#: client/scenes/lobby_gui.cpp:638 #: client/scenes/lobby_gui.cpp:638
#, c-format, c++-format #, c-format, c++-format
msgid "%d%% - {}x{} per eye" msgid "{}%% - {}x{} per eye"
msgstr "%d%% - 單眼 {}x{}" msgstr "{}%% - 單眼 {}x{}"
#: client/scenes/lobby_gui.cpp:649 #: client/scenes/lobby_gui.cpp:649
#, c++-format #, c++-format
+4 -2
View File
@@ -838,14 +838,16 @@ void wivrn_comp_target::reset_encoders()
cnx.send_control(to_headset::video_stream_description{desc}); cnx.send_control(to_headset::video_stream_description{desc});
} }
void wivrn_comp_target::set_bitrate(int bitrate_bps) void wivrn_comp_target::set_bitrate(uint32_t bitrate_bps)
{ {
bitrate = 0;
for (auto & encoder: encoders) for (auto & encoder: encoders)
{ {
// Alpha will have multiplier of 0 and will be left unchanged. // Alpha will have multiplier of 0 and will be left unchanged.
auto encoder_bps = (int)(bitrate_bps * encoder->bitrate_multiplier); auto encoder_bps = (uint32_t)(bitrate_bps * encoder->bitrate_multiplier);
U_LOG_D("Encoder %d bitrate: %d", encoder->stream_idx, encoder_bps); U_LOG_D("Encoder %d bitrate: %d", encoder->stream_idx, encoder_bps);
encoder->set_bitrate(encoder_bps); encoder->set_bitrate(encoder_bps);
bitrate += encoder_bps;
} }
} }
+2 -1
View File
@@ -93,6 +93,7 @@ struct wivrn_comp_target : public comp_target
static std::vector<const char *> wanted_instance_extensions; static std::vector<const char *> wanted_instance_extensions;
static std::vector<const char *> wanted_device_extensions; static std::vector<const char *> wanted_device_extensions;
uint32_t bitrate = 0;
std::vector<encoder_settings> settings; std::vector<encoder_settings> settings;
std::list<std::jthread> encoder_threads; std::list<std::jthread> encoder_threads;
std::vector<std::shared_ptr<video_encoder>> encoders; std::vector<std::shared_ptr<video_encoder>> encoders;
@@ -107,7 +108,7 @@ struct wivrn_comp_target : public comp_target
void on_feedback(const from_headset::feedback &, const clock_offset &); void on_feedback(const from_headset::feedback &, const clock_offset &);
void reset_encoders(); void reset_encoders();
void set_bitrate(int bitrate_bps); void set_bitrate(uint32_t bitrate_bps);
void set_refresh_rate(float); void set_refresh_rate(float);
}; };
+32 -3
View File
@@ -429,10 +429,29 @@ void wivrn_session::operator()(from_headset::headset_info_packet &&)
U_LOG_W("unexpected headset info packet, ignoring"); U_LOG_W("unexpected headset info packet, ignoring");
} }
void wivrn_session::operator()(from_headset::settings_request &&)
{
to_headset::settings settings{};
{
std::lock_guard lock(comp_target_mutex);
if (comp_target)
settings.bitrate_bps = comp_target->bitrate;
}
send_control(std::move(settings));
}
void wivrn_session::operator()(from_headset::settings_changed && settings) void wivrn_session::operator()(from_headset::settings_changed && settings)
{ {
connection->info().preferred_refresh_rate = settings.preferred_refresh_rate; connection->info().preferred_refresh_rate = settings.preferred_refresh_rate;
connection->info().minimum_refresh_rate = settings.minimum_refresh_rate; connection->info().minimum_refresh_rate = settings.minimum_refresh_rate;
if (settings.bitrate_bps != 0)
{
std::lock_guard lock(comp_target_mutex);
if (comp_target)
comp_target->set_bitrate(settings.bitrate_bps);
}
} }
static xrt_device_name get_name(interaction_profile profile) static xrt_device_name get_name(interaction_profile profile)
@@ -937,9 +956,18 @@ void wivrn_session::operator()(to_monado::disconnect &&)
void wivrn_session::operator()(to_monado::set_bitrate && data) void wivrn_session::operator()(to_monado::set_bitrate && data)
{ {
std::shared_lock lock(comp_target_mutex); bool send_settings = false;
if (comp_target) {
comp_target->set_bitrate(data.bitrate_bps); std::shared_lock lock(comp_target_mutex);
if (comp_target)
{
comp_target->set_bitrate(data.bitrate_bps);
send_settings = true;
}
}
if (send_settings)
(*this)(from_headset::settings_request{});
} }
struct refresh_rate_adjuster struct refresh_rate_adjuster
@@ -1087,6 +1115,7 @@ void wivrn_session::reconnect()
if (audio_handle) if (audio_handle)
send_control(audio_handle->description()); send_control(audio_handle->description());
(*this)(from_headset::settings_request{});
event.state.visible = true; event.state.visible = true;
event.state.focused = true; event.state.focused = true;
result = push_event(event); result = push_event(event);
+1
View File
@@ -186,6 +186,7 @@ public:
void operator()(from_headset::pin_check_1 &&) {} void operator()(from_headset::pin_check_1 &&) {}
void operator()(from_headset::pin_check_3 &&) {} void operator()(from_headset::pin_check_3 &&) {}
void operator()(from_headset::headset_info_packet &&); void operator()(from_headset::headset_info_packet &&);
void operator()(from_headset::settings_request &&);
void operator()(from_headset::settings_changed &&); void operator()(from_headset::settings_changed &&);
void operator()(from_headset::handshake &&) {} void operator()(from_headset::handshake &&) {}
void operator()(from_headset::trackings &&); void operator()(from_headset::trackings &&);
+1 -1
View File
@@ -217,7 +217,7 @@ void video_encoder::reset()
idr->reset(); idr->reset();
} }
void video_encoder::set_bitrate(int bitrate_bps) void video_encoder::set_bitrate(uint32_t bitrate_bps)
{ {
pending_bitrate = bitrate_bps; pending_bitrate = bitrate_bps;
} }
+3 -2
View File
@@ -25,6 +25,7 @@
#include <atomic> #include <atomic>
#include <condition_variable> #include <condition_variable>
#include <cstdint>
#include <deque> #include <deque>
#include <fstream> #include <fstream>
#include <memory> #include <memory>
@@ -104,7 +105,7 @@ private:
std::shared_ptr<sender> shared_sender; std::shared_ptr<sender> shared_sender;
protected: protected:
std::atomic_int pending_bitrate; std::atomic_uint32_t pending_bitrate;
std::atomic<float> pending_framerate; std::atomic<float> pending_framerate;
std::unique_ptr<idr_handler> idr; std::unique_ptr<idr_handler> idr;
@@ -128,7 +129,7 @@ public:
void on_feedback(const from_headset::feedback &); void on_feedback(const from_headset::feedback &);
void reset(); void reset();
void set_bitrate(int bitrate_bps); void set_bitrate(uint32_t bitrate_bps);
void set_framerate(float framerate); void set_framerate(float framerate);
void encode(wivrn_session & cnx, void encode(wivrn_session & cnx,