Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -646,16 +646,16 @@ void scenes::lobby::gui_settings()
|
||||
const auto current = config.resolution_scale;
|
||||
const auto width = stream_view.recommendedImageRectWidth;
|
||||
const auto height = stream_view.recommendedImageRectHeight;
|
||||
auto intScale = int(current * 100);
|
||||
auto intScale = int(current * 10);
|
||||
const auto slider = ImGui::SliderInt(
|
||||
_("Resolution scale").append("##resolution_scale").c_str(),
|
||||
&intScale,
|
||||
50,
|
||||
350,
|
||||
fmt::format(_F("%d%% - {}x{} per eye"), int(width * current), int(height * current)).c_str());
|
||||
5,
|
||||
35,
|
||||
fmt::format(_F("{}%% - {}x{} per eye"), intScale * 10, int(width * current), int(height * current)).c_str());
|
||||
if (slider)
|
||||
{
|
||||
config.resolution_scale = intScale * 0.01;
|
||||
config.resolution_scale = intScale * 0.1;
|
||||
config.save();
|
||||
}
|
||||
imgui_ctx->vibrate_on_hover();
|
||||
|
||||
@@ -481,7 +481,7 @@ void scenes::stream::on_focused()
|
||||
}
|
||||
recenter_left = get_action("recenter_left").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_ok = get_action("foveation_ok").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::settings:
|
||||
case gui_status::bitrate_settings:
|
||||
case gui_status::foveation_settings:
|
||||
case gui_status::applications:
|
||||
case gui_status::application_launcher:
|
||||
@@ -1010,6 +1011,7 @@ void scenes::stream::render(const XrFrameState & frame_state)
|
||||
switch (gui_status)
|
||||
{
|
||||
case gui_status::hidden:
|
||||
case gui_status::bitrate_settings:
|
||||
case gui_status::foveation_settings:
|
||||
case gui_status::compact:
|
||||
case gui_status::overlay_only:
|
||||
@@ -1109,6 +1111,7 @@ void scenes::stream::render(const XrFrameState & frame_state)
|
||||
|
||||
case gui_status::stats:
|
||||
case gui_status::settings:
|
||||
case gui_status::bitrate_settings:
|
||||
case gui_status::foveation_settings:
|
||||
case gui_status::applications:
|
||||
case gui_status::application_launcher:
|
||||
@@ -1207,7 +1210,7 @@ scene::meta & scenes::stream::get_meta_scene()
|
||||
{"recenter_left", 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_ok", 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_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_ok", "/user/hand/right/input/a/click"},
|
||||
{"foveation_cancel", "/user/hand/right/input/b/click"},
|
||||
|
||||
@@ -132,6 +132,7 @@ private:
|
||||
compact,
|
||||
stats,
|
||||
settings,
|
||||
bitrate_settings,
|
||||
foveation_settings,
|
||||
applications,
|
||||
application_launcher,
|
||||
@@ -149,7 +150,7 @@ private:
|
||||
XrAction plots_toggle_2 = XR_NULL_HANDLE;
|
||||
XrAction recenter_left = 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_ok = XR_NULL_HANDLE;
|
||||
XrAction foveation_cancel = XR_NULL_HANDLE;
|
||||
@@ -172,6 +173,8 @@ private:
|
||||
XrTime running_application_req = 0;
|
||||
thread_safe<to_headset::running_applications> running_applications;
|
||||
|
||||
std::atomic_uint32_t bitrate = 0;
|
||||
|
||||
stream(std::string server_name, scene & parent_scene);
|
||||
|
||||
bool forward_hid_input(from_headset::hid::input_t);
|
||||
@@ -207,6 +210,7 @@ public:
|
||||
void operator()(to_headset::tracking_control &&);
|
||||
void operator()(to_headset::audio_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::application_list &&);
|
||||
void operator()(to_headset::application_icon &&);
|
||||
@@ -312,6 +316,7 @@ private:
|
||||
void gui_performance_metrics();
|
||||
void gui_compact_view();
|
||||
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_applications();
|
||||
void draw_gui(XrTime predicted_display_time, XrDuration predicted_display_period);
|
||||
|
||||
@@ -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();
|
||||
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)))
|
||||
{
|
||||
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
|
||||
void scenes::stream::gui_settings(float predicted_display_period)
|
||||
{
|
||||
const ImGuiStyle & style = ImGui::GetStyle();
|
||||
auto & config = application::get_config();
|
||||
|
||||
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);
|
||||
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();
|
||||
}
|
||||
if (ImGui::IsItemHovered())
|
||||
@@ -429,7 +432,7 @@ void scenes::stream::gui_settings(float predicted_display_period)
|
||||
{
|
||||
session.set_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();
|
||||
}
|
||||
}
|
||||
@@ -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))
|
||||
{
|
||||
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();
|
||||
}
|
||||
}
|
||||
@@ -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())
|
||||
{
|
||||
ImGui::Text("%s", _S("OpenXR post-processing"));
|
||||
@@ -571,6 +588,27 @@ void scenes::stream::gui_settings(float predicted_display_period)
|
||||
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)
|
||||
{
|
||||
ImGui::PushFont(nullptr, constants::gui::font_size_large);
|
||||
@@ -581,7 +619,7 @@ void scenes::stream::gui_foveation_settings(float predicted_display_period)
|
||||
ImGui::PopFont();
|
||||
|
||||
// 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
|
||||
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)
|
||||
{
|
||||
case gui_status::hidden:
|
||||
case gui_status::bitrate_settings:
|
||||
case gui_status::foveation_settings:
|
||||
case gui_status::overlay_only:
|
||||
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);
|
||||
switch (gui_status)
|
||||
{
|
||||
case gui_status::bitrate_settings:
|
||||
case gui_status::foveation_settings:
|
||||
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};
|
||||
@@ -831,6 +871,7 @@ void scenes::stream::draw_gui(XrTime predicted_display_time, XrDuration predicte
|
||||
break;
|
||||
|
||||
case gui_status::hidden:
|
||||
case gui_status::bitrate_settings:
|
||||
case gui_status::foveation_settings:
|
||||
ImGui::SetNextWindowPos(ImGui::GetMainViewport()->Size / 2, ImGuiCond_Always, ImVec2(0.5f, 0.5f));
|
||||
always_auto_resize = true;
|
||||
@@ -905,6 +946,10 @@ void scenes::stream::draw_gui(XrTime predicted_display_time, XrDuration predicte
|
||||
ImGui::EndChild();
|
||||
break;
|
||||
|
||||
case gui_status::bitrate_settings:
|
||||
gui_bitrate_settings(predicted_display_period * 1.e-9f);
|
||||
break;
|
||||
|
||||
case gui_status::foveation_settings:
|
||||
gui_foveation_settings(predicted_display_period * 1.e-9f);
|
||||
break;
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
session.set_refresh_rate(rate.fps);
|
||||
|
||||
@@ -248,11 +248,16 @@ struct headset_info_packet
|
||||
std::string variant;
|
||||
};
|
||||
|
||||
struct settings_request
|
||||
{};
|
||||
|
||||
struct settings_changed
|
||||
{
|
||||
float preferred_refresh_rate;
|
||||
// for automatic
|
||||
float minimum_refresh_rate;
|
||||
|
||||
uint32_t bitrate_bps;
|
||||
};
|
||||
|
||||
struct handshake
|
||||
@@ -542,6 +547,7 @@ using packets = std::variant<
|
||||
pin_check_1,
|
||||
pin_check_3,
|
||||
headset_info_packet,
|
||||
settings_request,
|
||||
settings_changed,
|
||||
feedback,
|
||||
audio_data,
|
||||
@@ -749,6 +755,11 @@ struct tracking_control
|
||||
std::array<bool, size_t(id::last) + 1> enabled;
|
||||
};
|
||||
|
||||
struct settings
|
||||
{
|
||||
uint32_t bitrate_bps;
|
||||
};
|
||||
|
||||
struct refresh_rate_change
|
||||
{
|
||||
float fps;
|
||||
@@ -797,6 +808,7 @@ using packets = std::variant<
|
||||
haptics,
|
||||
timesync_query,
|
||||
tracking_control,
|
||||
settings,
|
||||
refresh_rate_change,
|
||||
application_list,
|
||||
application_icon,
|
||||
|
||||
+2
-2
@@ -216,8 +216,8 @@ msgstr "Escala de resolución"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:655
|
||||
#, c-format, c++-format
|
||||
msgid "%d%% - {}x{} per eye"
|
||||
msgstr "%d%% - {}x{} por ojo"
|
||||
msgid "{}%% - {}x{} per eye"
|
||||
msgstr "{}%% - {}x{} por ojo"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:666
|
||||
#, c++-format
|
||||
|
||||
+2
-2
@@ -217,8 +217,8 @@ msgstr "Échelle"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:655
|
||||
#, c-format, c++-format
|
||||
msgid "%d%% - {}x{} per eye"
|
||||
msgstr "%d%% - {}x{} par œil"
|
||||
msgid "{}%% - {}x{} per eye"
|
||||
msgstr "{}%% - {}x{} par œil"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:666
|
||||
#, c++-format
|
||||
|
||||
+2
-2
@@ -213,8 +213,8 @@ msgstr "Scala di risoluzione"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:655
|
||||
#, c-format, c++-format
|
||||
msgid "%d%% - {}x{} per eye"
|
||||
msgstr "%d%% - {}x{} per occhio"
|
||||
msgid "{}%% - {}x{} per eye"
|
||||
msgstr "{}%% - {}x{} per occhio"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:666
|
||||
#, c++-format
|
||||
|
||||
+2
-2
@@ -204,8 +204,8 @@ msgstr "解像度"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:655
|
||||
#, c-format, c++-format
|
||||
msgid "%d%% - {}x{} per eye"
|
||||
msgstr "%d%% - 目あたり{}x{}"
|
||||
msgid "{}%% - {}x{} per eye"
|
||||
msgstr "{}%% - 目あたり{}x{}"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:666
|
||||
#, c++-format
|
||||
|
||||
+2
-2
@@ -212,8 +212,8 @@ msgstr "Skala rozdzielczości"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:655
|
||||
#, c-format, c++-format
|
||||
msgid "%d%% - {}x{} per eye"
|
||||
msgstr "%d%% - {}x{} na oko"
|
||||
msgid "{}%% - {}x{} per eye"
|
||||
msgstr "{}%% - {}x{} na oko"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:666
|
||||
#, c++-format
|
||||
|
||||
+79
-58
@@ -11,8 +11,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WiVRn\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2025-12-02 19:57+0100\n"
|
||||
"PO-Revision-Date: 2025-12-03 19:23+0100\n"
|
||||
"POT-Creation-Date: 2025-12-07 15:32+0100\n"
|
||||
"PO-Revision-Date: 2025-12-07 17:05+0100\n"
|
||||
"Last-Translator: Claudio Sampaio (Patola) <patola@gmail.com>\n"
|
||||
"Language-Team: Portuguese <>\n"
|
||||
"Language: pt_BR\n"
|
||||
@@ -73,11 +73,11 @@ msgstr "Incapaz de conectar a {} ({}): {}"
|
||||
msgid "Waiting for connection"
|
||||
msgstr "Aguardando conexão"
|
||||
|
||||
#: client/scenes/lobby.cpp:1310
|
||||
#: client/scenes/lobby.cpp:1308
|
||||
msgid "Passthrough"
|
||||
msgstr "Passthrough"
|
||||
|
||||
#: client/scenes/lobby.cpp:1322
|
||||
#: client/scenes/lobby.cpp:1320
|
||||
msgid "Default environment"
|
||||
msgstr "Ambiente default"
|
||||
|
||||
@@ -97,13 +97,13 @@ msgid "Disabled"
|
||||
msgstr "Desabilitado"
|
||||
|
||||
#: 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"
|
||||
msgstr "Desconectar"
|
||||
|
||||
#: 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:896 client/scenes/stream_gui.cpp:963
|
||||
#: client/scenes/lobby_gui_customize.cpp:896 client/scenes/stream_gui.cpp:1008
|
||||
msgid "Close"
|
||||
msgstr "Fechar"
|
||||
|
||||
@@ -141,7 +141,7 @@ msgid "TCP only"
|
||||
msgstr "TCP somente"
|
||||
|
||||
#: 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"
|
||||
msgstr "Cancelar"
|
||||
|
||||
@@ -186,17 +186,17 @@ msgstr "Linguagem"
|
||||
msgid "System language"
|
||||
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"
|
||||
msgstr "Taxa de atualização"
|
||||
|
||||
#: 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"
|
||||
msgid "Automatic"
|
||||
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 ""
|
||||
"Select refresh rate based on measured application performance.\n"
|
||||
"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"
|
||||
"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"
|
||||
msgstr "Taxa de atualização mínima"
|
||||
|
||||
@@ -218,8 +218,8 @@ msgstr "Escala de resolução"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:655
|
||||
#, c-format, c++-format
|
||||
msgid "%d%% - {}x{} per eye"
|
||||
msgstr "%d%% - {}x{} por olho"
|
||||
msgid "{}%% - {}x{} per eye"
|
||||
msgstr "{}%% - {}x{} por olho"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:666
|
||||
#, c++-format
|
||||
@@ -322,15 +322,15 @@ msgstr ""
|
||||
"streamado.\n"
|
||||
"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"
|
||||
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"
|
||||
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 ""
|
||||
"Reduce flicker for high contrast edges.\n"
|
||||
"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"
|
||||
"Ú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"
|
||||
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 ""
|
||||
"Improve clarity of high contrast edges and counteract blur.\n"
|
||||
"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"
|
||||
msgstr "Bem vindo(a) ao WiVRn"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1169
|
||||
#: client/scenes/lobby_gui.cpp:1171
|
||||
msgid "Yes"
|
||||
msgstr "Sim"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1176
|
||||
#: client/scenes/lobby_gui.cpp:1178
|
||||
msgid "No"
|
||||
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"
|
||||
msgstr "Licenças"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1470
|
||||
#: client/scenes/lobby_gui.cpp:1473
|
||||
msgid "Microphone is enabled"
|
||||
msgstr "O microfone está ativado"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1471
|
||||
#: client/scenes/lobby_gui.cpp:1474
|
||||
msgid "Microphone is disabled"
|
||||
msgstr "O microfone está desativado"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1480
|
||||
#: client/scenes/lobby_gui.cpp:1483
|
||||
msgid "Hand tracking is enabled"
|
||||
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"
|
||||
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"
|
||||
msgstr "O rastreamento ocular está ativado"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1491
|
||||
#: client/scenes/lobby_gui.cpp:1494
|
||||
msgid "Eye tracking is disabled"
|
||||
msgstr "O rastreamento ocular está desativado"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1501
|
||||
#: client/scenes/lobby_gui.cpp:1504
|
||||
msgid "Face tracking is enabled"
|
||||
msgstr "O rastreamento facial está ativado"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1502
|
||||
#: client/scenes/lobby_gui.cpp:1505
|
||||
msgid "Face tracking is disabled"
|
||||
msgstr "O rastreamento facial está desativado"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1512
|
||||
#: client/scenes/lobby_gui.cpp:1519
|
||||
msgid "Body tracking is enabled"
|
||||
msgstr "O rastreamento corporal está ativado"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1513
|
||||
#: client/scenes/lobby_gui.cpp:1520
|
||||
msgid "Body tracking is disabled"
|
||||
msgstr "O rastreamento corporal está desativado"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1529
|
||||
#: client/scenes/lobby_gui.cpp:1536
|
||||
msgid "Add server"
|
||||
msgstr "Adicionar servidor"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1815
|
||||
#: client/scenes/lobby_gui.cpp:1822
|
||||
msgid "Server list"
|
||||
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"
|
||||
msgstr "Ajustes"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1821
|
||||
#: client/scenes/lobby_gui.cpp:1828
|
||||
msgid "Post-processing"
|
||||
msgstr "Pós-processamento"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1824
|
||||
#: client/scenes/lobby_gui.cpp:1831
|
||||
msgid "Customize"
|
||||
msgstr "Personalizar"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1828
|
||||
#: client/scenes/lobby_gui.cpp:1835
|
||||
msgid "Debug"
|
||||
msgstr "Depurar"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1833
|
||||
#: client/scenes/lobby_gui.cpp:1840
|
||||
msgid "About"
|
||||
msgstr "Sobre"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1839
|
||||
#: client/scenes/lobby_gui.cpp:1846
|
||||
msgid "Exit"
|
||||
msgstr "Sair"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:1856
|
||||
#: client/scenes/lobby_gui.cpp:1863
|
||||
msgid ""
|
||||
"Press the grip button or put your palm up\n"
|
||||
"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"
|
||||
"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"
|
||||
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"
|
||||
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"
|
||||
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"
|
||||
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"
|
||||
msgstr "Ajuste do centro de foveação"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:524
|
||||
#: client/scenes/stream_gui.cpp:541
|
||||
msgid "Enable"
|
||||
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
|
||||
msgid "Height {:.1f} deg"
|
||||
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
|
||||
msgid "Distance {:.2f} m"
|
||||
msgstr "Distância {:.2f} m"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:534
|
||||
#: client/scenes/stream_gui.cpp:551
|
||||
msgid "Default"
|
||||
msgstr "Padrão"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:545
|
||||
#: client/scenes/stream_gui.cpp:562
|
||||
msgid "Change"
|
||||
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"
|
||||
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"
|
||||
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:"
|
||||
msgstr "Aplicativos XR rodando:"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:653
|
||||
#: client/scenes/stream_gui.cpp:691
|
||||
msgid "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"
|
||||
msgstr "Requisição para sair, pode ser ignorada pelo aplicativo"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:935
|
||||
#: client/scenes/stream_gui.cpp:980
|
||||
msgid "Applications"
|
||||
msgstr "Aplicativos"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:938
|
||||
#: client/scenes/stream_gui.cpp:983
|
||||
msgid "Start"
|
||||
msgstr "Iniciar"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:951
|
||||
#: client/scenes/stream_gui.cpp:996
|
||||
msgid "Stats"
|
||||
msgstr "Estatísticas"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:957
|
||||
#: client/scenes/stream_gui.cpp:1002
|
||||
msgid "Statistics overlay"
|
||||
msgstr "Overlay de estatísticas"
|
||||
|
||||
#: client/scenes/stream_gui.cpp:960
|
||||
#: client/scenes/stream_gui.cpp:1005
|
||||
msgid "Compact view"
|
||||
msgstr "Visualização compacta"
|
||||
|
||||
|
||||
+2
-2
@@ -213,8 +213,8 @@ msgstr "Масштаб разрешения"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:655
|
||||
#, c-format, c++-format
|
||||
msgid "%d%% - {}x{} per eye"
|
||||
msgstr "%d%% - {}x{} на каждый глаз"
|
||||
msgid "{}%% - {}x{} per eye"
|
||||
msgstr "{}%% - {}x{} на каждый глаз"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:666
|
||||
#, c++-format
|
||||
|
||||
+2
-2
@@ -199,8 +199,8 @@ msgstr "Rozlíšenie"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:894
|
||||
#, c-format, c++-format
|
||||
msgid "%d%% - {}x{} per eye"
|
||||
msgstr "%d%% - {}x{} na oko"
|
||||
msgid "{}%% - {}x{} per eye"
|
||||
msgstr "{}%% - {}x{} na oko"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:905
|
||||
#, c++-format
|
||||
|
||||
+2
-2
@@ -214,8 +214,8 @@ msgstr "Çözünürlük ölçeği"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:655
|
||||
#, c-format, c++-format
|
||||
msgid "%d%% - {}x{} per eye"
|
||||
msgstr "göz başına %d%% - {}x{}"
|
||||
msgid "{}%% - {}x{} per eye"
|
||||
msgstr "göz başına {}%% - {}x{}"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:666
|
||||
#, c++-format
|
||||
|
||||
@@ -213,8 +213,8 @@ msgstr "分辨率缩放比例"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:655
|
||||
#, c-format, c++-format
|
||||
msgid "%d%% - {}x{} per eye"
|
||||
msgstr "%d%% - 单眼 {}x{}"
|
||||
msgid "{}%% - {}x{} per eye"
|
||||
msgstr "{}%% - 单眼 {}x{}"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:666
|
||||
#, c++-format
|
||||
|
||||
@@ -195,8 +195,8 @@ msgstr "解析度縮放比例"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:638
|
||||
#, c-format, c++-format
|
||||
msgid "%d%% - {}x{} per eye"
|
||||
msgstr "%d%% - 單眼 {}x{}"
|
||||
msgid "{}%% - {}x{} per eye"
|
||||
msgstr "{}%% - 單眼 {}x{}"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:649
|
||||
#, c++-format
|
||||
|
||||
@@ -838,14 +838,16 @@ void wivrn_comp_target::reset_encoders()
|
||||
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)
|
||||
{
|
||||
// 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);
|
||||
encoder->set_bitrate(encoder_bps);
|
||||
bitrate += encoder_bps;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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_device_extensions;
|
||||
|
||||
uint32_t bitrate = 0;
|
||||
std::vector<encoder_settings> settings;
|
||||
std::list<std::jthread> encoder_threads;
|
||||
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 reset_encoders();
|
||||
void set_bitrate(int bitrate_bps);
|
||||
void set_bitrate(uint32_t bitrate_bps);
|
||||
|
||||
void set_refresh_rate(float);
|
||||
};
|
||||
|
||||
@@ -429,10 +429,29 @@ void wivrn_session::operator()(from_headset::headset_info_packet &&)
|
||||
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)
|
||||
{
|
||||
connection->info().preferred_refresh_rate = settings.preferred_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)
|
||||
@@ -937,9 +956,18 @@ void wivrn_session::operator()(to_monado::disconnect &&)
|
||||
|
||||
void wivrn_session::operator()(to_monado::set_bitrate && data)
|
||||
{
|
||||
std::shared_lock lock(comp_target_mutex);
|
||||
if (comp_target)
|
||||
comp_target->set_bitrate(data.bitrate_bps);
|
||||
bool send_settings = false;
|
||||
{
|
||||
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
|
||||
@@ -1087,6 +1115,7 @@ void wivrn_session::reconnect()
|
||||
if (audio_handle)
|
||||
send_control(audio_handle->description());
|
||||
|
||||
(*this)(from_headset::settings_request{});
|
||||
event.state.visible = true;
|
||||
event.state.focused = true;
|
||||
result = push_event(event);
|
||||
|
||||
@@ -186,6 +186,7 @@ public:
|
||||
void operator()(from_headset::pin_check_1 &&) {}
|
||||
void operator()(from_headset::pin_check_3 &&) {}
|
||||
void operator()(from_headset::headset_info_packet &&);
|
||||
void operator()(from_headset::settings_request &&);
|
||||
void operator()(from_headset::settings_changed &&);
|
||||
void operator()(from_headset::handshake &&) {}
|
||||
void operator()(from_headset::trackings &&);
|
||||
|
||||
@@ -217,7 +217,7 @@ void video_encoder::reset()
|
||||
idr->reset();
|
||||
}
|
||||
|
||||
void video_encoder::set_bitrate(int bitrate_bps)
|
||||
void video_encoder::set_bitrate(uint32_t bitrate_bps)
|
||||
{
|
||||
pending_bitrate = bitrate_bps;
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
#include <atomic>
|
||||
#include <condition_variable>
|
||||
#include <cstdint>
|
||||
#include <deque>
|
||||
#include <fstream>
|
||||
#include <memory>
|
||||
@@ -104,7 +105,7 @@ private:
|
||||
std::shared_ptr<sender> shared_sender;
|
||||
|
||||
protected:
|
||||
std::atomic_int pending_bitrate;
|
||||
std::atomic_uint32_t pending_bitrate;
|
||||
std::atomic<float> pending_framerate;
|
||||
std::unique_ptr<idr_handler> idr;
|
||||
|
||||
@@ -128,7 +129,7 @@ public:
|
||||
void on_feedback(const from_headset::feedback &);
|
||||
void reset();
|
||||
|
||||
void set_bitrate(int bitrate_bps);
|
||||
void set_bitrate(uint32_t bitrate_bps);
|
||||
void set_framerate(float framerate);
|
||||
|
||||
void encode(wivrn_session & cnx,
|
||||
|
||||
Reference in New Issue
Block a user