Merge remote-tracking branch 'upstream/master'
This commit is contained in:
+127
-100
@@ -8,8 +8,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-12 12:59+0800\n"
|
"POT-Creation-Date: 2025-12-29 22:56+0800\n"
|
||||||
"PO-Revision-Date: 2025-12-14 20:11+0800\n"
|
"PO-Revision-Date: 2025-12-31 18:23+0800\n"
|
||||||
"Last-Translator: BERADQ <adqber123@outlook.com>\n"
|
"Last-Translator: BERADQ <adqber123@outlook.com>\n"
|
||||||
"Language-Team: Chinese (China)\n"
|
"Language-Team: Chinese (China)\n"
|
||||||
"Language: zh_CN\n"
|
"Language: zh_CN\n"
|
||||||
@@ -68,11 +68,11 @@ msgstr "无法连接至 {} ({}): {}"
|
|||||||
msgid "Waiting for connection"
|
msgid "Waiting for connection"
|
||||||
msgstr "等待连接"
|
msgstr "等待连接"
|
||||||
|
|
||||||
#: client/scenes/lobby.cpp:1310
|
#: client/scenes/lobby.cpp:1319
|
||||||
msgid "Passthrough"
|
msgid "Passthrough"
|
||||||
msgstr "透视"
|
msgstr "透视"
|
||||||
|
|
||||||
#: client/scenes/lobby.cpp:1322
|
#: client/scenes/lobby.cpp:1331
|
||||||
msgid "Default environment"
|
msgid "Default environment"
|
||||||
msgstr "默认环境"
|
msgstr "默认环境"
|
||||||
|
|
||||||
@@ -96,9 +96,9 @@ msgstr "停用"
|
|||||||
msgid "Disconnect"
|
msgid "Disconnect"
|
||||||
msgstr "终止连接"
|
msgstr "终止连接"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:134 client/scenes/lobby_gui_customize.cpp:749
|
#: client/scenes/lobby_gui.cpp:134 client/scenes/lobby_gui_customize.cpp:753
|
||||||
#: client/scenes/lobby_gui_customize.cpp:840
|
#: client/scenes/lobby_gui_customize.cpp:844
|
||||||
#: client/scenes/lobby_gui_customize.cpp:896 client/scenes/stream_gui.cpp:1011
|
#: client/scenes/lobby_gui_customize.cpp:900 client/scenes/stream_gui.cpp:1011
|
||||||
msgid "Close"
|
msgid "Close"
|
||||||
msgstr "关闭"
|
msgstr "关闭"
|
||||||
|
|
||||||
@@ -135,7 +135,7 @@ msgstr "端口"
|
|||||||
msgid "TCP only"
|
msgid "TCP only"
|
||||||
msgstr "仅限 TCP"
|
msgstr "仅限 TCP"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:319 client/scenes/lobby_gui_customize.cpp:651
|
#: client/scenes/lobby_gui.cpp:319 client/scenes/lobby_gui_customize.cpp:655
|
||||||
#: client/scenes/stream_gui.cpp:968
|
#: client/scenes/stream_gui.cpp:968
|
||||||
msgid "Cancel"
|
msgid "Cancel"
|
||||||
msgstr "取消"
|
msgstr "取消"
|
||||||
@@ -181,17 +181,17 @@ msgstr "语言"
|
|||||||
msgid "System language"
|
msgid "System language"
|
||||||
msgstr "系统语言"
|
msgstr "系统语言"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:579 client/scenes/stream_gui.cpp:417
|
#: client/scenes/lobby_gui.cpp:580 client/scenes/stream_gui.cpp:417
|
||||||
msgid "Refresh rate"
|
msgid "Refresh rate"
|
||||||
msgstr "刷新率"
|
msgstr "刷新率"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:579 client/scenes/lobby_gui.cpp:581
|
#: client/scenes/lobby_gui.cpp:580 client/scenes/lobby_gui.cpp:582
|
||||||
#: client/scenes/stream_gui.cpp:417 client/scenes/stream_gui.cpp:419
|
#: client/scenes/stream_gui.cpp:417 client/scenes/stream_gui.cpp:419
|
||||||
msgctxt "automatic refresh rate"
|
msgctxt "automatic refresh rate"
|
||||||
msgid "Automatic"
|
msgid "Automatic"
|
||||||
msgstr "自动"
|
msgstr "自动"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:588 client/scenes/stream_gui.cpp:427
|
#: client/scenes/lobby_gui.cpp:589 client/scenes/stream_gui.cpp:427
|
||||||
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."
|
||||||
@@ -199,117 +199,133 @@ msgstr ""
|
|||||||
"根据测量的应用程序性能选择刷新率。\n"
|
"根据测量的应用程序性能选择刷新率。\n"
|
||||||
"更改时可能会造成闪烁。"
|
"更改时可能会造成闪烁。"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:605 client/scenes/stream_gui.cpp:445
|
#: client/scenes/lobby_gui.cpp:606 client/scenes/stream_gui.cpp:445
|
||||||
msgid "Minimum refresh rate"
|
msgid "Minimum refresh rate"
|
||||||
msgstr "最低刷新率"
|
msgstr "最低刷新率"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:631
|
#: client/scenes/lobby_gui.cpp:632
|
||||||
msgid "Foveation level"
|
msgid "Foveation level"
|
||||||
msgstr "注视点渲染等级"
|
msgstr "注视点渲染等级"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:654
|
#: client/scenes/lobby_gui.cpp:655
|
||||||
msgid "Render resolution"
|
msgid "Render resolution"
|
||||||
msgstr "渲染分辨率"
|
msgstr "渲染分辨率"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:658
|
#: client/scenes/lobby_gui.cpp:659
|
||||||
#, c-format, c++-format
|
#, c-format, c++-format
|
||||||
msgid "{}%% - {}x{} per eye"
|
msgid "{}%% - {}x{} per eye"
|
||||||
msgstr "{}%% - 单眼 {}x{}"
|
msgstr "{}%% - 单眼 {}x{}"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:669
|
#: client/scenes/lobby_gui.cpp:670
|
||||||
#, c++-format
|
#, c++-format
|
||||||
msgid "Resolution larger than {}x{} may not be supported by the headset"
|
msgid "Resolution larger than {}x{} may not be supported by the headset"
|
||||||
msgstr "分辨率高于 {}x{} 可能不被头显支持"
|
msgstr "分辨率高于 {}x{} 可能不被头显支持"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:679
|
#: client/scenes/lobby_gui.cpp:680
|
||||||
msgid "Stream resolution"
|
msgid "Foveated encoding"
|
||||||
msgstr "串流分辨率"
|
msgstr "注视点编码"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:683
|
#: client/scenes/lobby_gui.cpp:684
|
||||||
#, c-format, c++-format
|
#, c-format, c++-format
|
||||||
msgid "{}%%"
|
msgid "{}%%"
|
||||||
msgstr "{}%%"
|
msgstr "{}%%"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:697
|
#: client/scenes/lobby_gui.cpp:697
|
||||||
|
msgid ""
|
||||||
|
"Higher values focus image quality where you look at,\n"
|
||||||
|
"improving latency, power efficiency and quality."
|
||||||
|
msgstr ""
|
||||||
|
"更高的数值会降低注视点之外的画面质量,\n"
|
||||||
|
"从而改善延迟、提升能效并优化整体画质。"
|
||||||
|
|
||||||
|
#: client/scenes/lobby_gui.cpp:700
|
||||||
|
msgid ""
|
||||||
|
"Higher values focus image quality at the center,\n"
|
||||||
|
"improving latency, power efficiency and quality."
|
||||||
|
msgstr ""
|
||||||
|
"更高的数值会降低画面中心点之外的画面质量,\n"
|
||||||
|
"从而改善延迟、提高能效并优化整体画质。"
|
||||||
|
|
||||||
|
#: client/scenes/lobby_gui.cpp:709
|
||||||
msgctxt "Codec"
|
msgctxt "Codec"
|
||||||
msgid "Automatic"
|
msgid "Automatic"
|
||||||
msgstr "自动"
|
msgstr "自动"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:701
|
#: client/scenes/lobby_gui.cpp:713
|
||||||
msgctxt "Codec"
|
msgctxt "Codec"
|
||||||
msgid "H.264"
|
msgid "H.264"
|
||||||
msgstr "H.264"
|
msgstr "H.264"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:703
|
#: client/scenes/lobby_gui.cpp:715
|
||||||
msgctxt "Codec"
|
msgctxt "Codec"
|
||||||
msgid "H.265"
|
msgid "H.265"
|
||||||
msgstr "H.265"
|
msgstr "H.265"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:705
|
#: client/scenes/lobby_gui.cpp:717
|
||||||
msgctxt "Codec"
|
msgctxt "Codec"
|
||||||
msgid "AV1"
|
msgid "AV1"
|
||||||
msgstr "AV1"
|
msgstr "AV1"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:713
|
#: client/scenes/lobby_gui.cpp:725
|
||||||
msgid "Codec"
|
msgid "Codec"
|
||||||
msgstr "编解码器"
|
msgstr "编解码器"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:741
|
#: client/scenes/lobby_gui.cpp:753
|
||||||
msgid "10-bit"
|
msgid "10-bit"
|
||||||
msgstr "10-bit"
|
msgstr "10-bit"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:756
|
#: client/scenes/lobby_gui.cpp:768
|
||||||
msgid "Bitrate"
|
msgid "Bitrate"
|
||||||
msgstr "码率"
|
msgstr "码率"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:760
|
#: client/scenes/lobby_gui.cpp:772
|
||||||
#, c++-format
|
#, c++-format
|
||||||
msgid "{}Mbit/s"
|
msgid "{}Mbit/s"
|
||||||
msgstr "{}Mbit/s"
|
msgstr "{}Mbit/s"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:771
|
#: client/scenes/lobby_gui.cpp:783
|
||||||
msgid "High power mode"
|
msgid "High power mode"
|
||||||
msgstr "高耗电模式"
|
msgstr "高耗电模式"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:774
|
#: client/scenes/lobby_gui.cpp:786
|
||||||
msgid "Increase power usage to allow higher resolution and refresh rate"
|
msgid "Increase power usage to allow higher resolution and refresh rate"
|
||||||
msgstr "增加功耗以支持更高的分辨率和刷新率"
|
msgstr "增加功耗以支持更高的分辨率和刷新率"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:780
|
#: client/scenes/lobby_gui.cpp:792
|
||||||
msgid "Enable microphone"
|
msgid "Enable microphone"
|
||||||
msgstr "启用麦克风"
|
msgstr "启用麦克风"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:789
|
#: client/scenes/lobby_gui.cpp:801
|
||||||
msgid "Unprocessed Microphone Audio"
|
msgid "Unprocessed Microphone Audio"
|
||||||
msgstr "未处理的麦克风音频"
|
msgstr "未处理的麦克风音频"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:795
|
#: client/scenes/lobby_gui.cpp:807
|
||||||
msgid "Force disable audio filters, such as noise cancellation"
|
msgid "Force disable audio filters, such as noise cancellation"
|
||||||
msgstr "强制停用音频滤波器,如降噪"
|
msgstr "强制停用音频滤波器,如降噪"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:802
|
#: client/scenes/lobby_gui.cpp:814
|
||||||
msgid "Enable hand tracking"
|
msgid "Enable hand tracking"
|
||||||
msgstr "启用手部追踪"
|
msgstr "启用手部追踪"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:808 client/scenes/lobby_gui.cpp:820
|
#: client/scenes/lobby_gui.cpp:820 client/scenes/lobby_gui.cpp:831
|
||||||
#: client/scenes/lobby_gui.cpp:832 client/scenes/lobby_gui.cpp:849
|
#: client/scenes/lobby_gui.cpp:841 client/scenes/lobby_gui.cpp:856
|
||||||
#: client/scenes/lobby_gui_customize.cpp:636
|
#: client/scenes/lobby_gui_customize.cpp:640
|
||||||
msgid "This feature is not supported by your headset"
|
msgid "This feature is not supported by your headset"
|
||||||
msgstr "您的头显不支持此功能"
|
msgstr "您的头显不支持此功能"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:814
|
#: client/scenes/lobby_gui.cpp:825
|
||||||
msgid "Enable eye tracking"
|
msgid "Enable eye tracking"
|
||||||
msgstr "启用眼动追踪"
|
msgstr "启用眼动追踪"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:826
|
#: client/scenes/lobby_gui.cpp:836
|
||||||
msgid "Enable face tracking"
|
msgid "Enable face tracking"
|
||||||
msgstr "启用面部追踪"
|
msgstr "启用面部追踪"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:840
|
#: client/scenes/lobby_gui.cpp:848
|
||||||
msgid "Enable body tracking"
|
msgid "Enable body tracking"
|
||||||
msgstr "启用身体追踪"
|
msgstr "启用身体追踪"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:854
|
#: client/scenes/lobby_gui.cpp:861
|
||||||
msgid ""
|
msgid ""
|
||||||
"Requires 'Hand and body tracking' to be enabled in the Quest movement "
|
"Requires 'Hand and body tracking' to be enabled in the Quest movement "
|
||||||
"tracking settings,\n"
|
"tracking settings,\n"
|
||||||
@@ -318,11 +334,11 @@ msgstr ""
|
|||||||
"需要在 Quest 运动追踪设置中启用「手部和身体追踪」,\n"
|
"需要在 Quest 运动追踪设置中启用「手部和身体追踪」,\n"
|
||||||
"否则身体数据将根据手柄和头显的位置进行猜测"
|
"否则身体数据将根据手柄和头显的位置进行猜测"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:864
|
#: client/scenes/lobby_gui.cpp:871
|
||||||
msgid "Enable lower body tracking"
|
msgid "Enable lower body tracking"
|
||||||
msgstr "启用下半身追踪"
|
msgstr "启用下半身追踪"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:870
|
#: client/scenes/lobby_gui.cpp:877
|
||||||
msgid ""
|
msgid ""
|
||||||
"Estimate lower body joint positions using Generative Legs\n"
|
"Estimate lower body joint positions using Generative Legs\n"
|
||||||
"Requires 'Hand and body tracking' to be enabled in the Quest movement "
|
"Requires 'Hand and body tracking' to be enabled in the Quest movement "
|
||||||
@@ -331,11 +347,11 @@ msgstr ""
|
|||||||
"使用 Generative Legs 猜测下半身关节位置\n"
|
"使用 Generative Legs 猜测下半身关节位置\n"
|
||||||
"需要在 Quest 运动追踪设置中启用「手部和身体追踪」"
|
"需要在 Quest 运动追踪设置中启用「手部和身体追踪」"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:873
|
#: client/scenes/lobby_gui.cpp:880
|
||||||
msgid "Enable hip tracking"
|
msgid "Enable hip tracking"
|
||||||
msgstr "启用臀部(腰部)追踪"
|
msgstr "启用臀部(腰部)追踪"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:879
|
#: client/scenes/lobby_gui.cpp:886
|
||||||
msgid ""
|
msgid ""
|
||||||
"Only takes affect with lower body tracking enabled\n"
|
"Only takes affect with lower body tracking enabled\n"
|
||||||
"May be desired when using another source of hip tracking"
|
"May be desired when using another source of hip tracking"
|
||||||
@@ -343,11 +359,11 @@ msgstr ""
|
|||||||
"仅在启用下半身追踪时生效\n"
|
"仅在启用下半身追踪时生效\n"
|
||||||
"在使用其他臀部追踪时可能需要此功能"
|
"在使用其他臀部追踪时可能需要此功能"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:887
|
#: client/scenes/lobby_gui.cpp:895
|
||||||
msgid "Enable in-stream window"
|
msgid "Enable in-stream window"
|
||||||
msgstr "启用串流中窗口"
|
msgstr "启用串流中窗口"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:890
|
#: client/scenes/lobby_gui.cpp:898
|
||||||
msgid ""
|
msgid ""
|
||||||
"Enables the configuration window to be shown while the game is streaming.\n"
|
"Enables the configuration window to be shown while the game is streaming.\n"
|
||||||
"If enabled, the window is activated by pressing both thumbsticks."
|
"If enabled, the window is activated by pressing both thumbsticks."
|
||||||
@@ -355,15 +371,23 @@ msgstr ""
|
|||||||
"在游戏串流期间启用配置窗口显示\n"
|
"在游戏串流期间启用配置窗口显示\n"
|
||||||
"若启用此功能,同时按下两只摇杆,将会显示该窗口。"
|
"若启用此功能,同时按下两只摇杆,将会显示该窗口。"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:904 client/scenes/stream_gui.cpp:479
|
#: client/scenes/lobby_gui.cpp:902
|
||||||
|
msgid "Extended configuration values"
|
||||||
|
msgstr "扩大配置值范围"
|
||||||
|
|
||||||
|
#: client/scenes/lobby_gui.cpp:905
|
||||||
|
msgid "Allows unsafe configuration values, use at your own risk."
|
||||||
|
msgstr "允许使用不安全的配置值,风险自负。"
|
||||||
|
|
||||||
|
#: client/scenes/lobby_gui.cpp:919 client/scenes/stream_gui.cpp:479
|
||||||
msgid "OpenXR post-processing"
|
msgid "OpenXR post-processing"
|
||||||
msgstr "OpenXR 后处理"
|
msgstr "OpenXR 后处理"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:908 client/scenes/stream_gui.cpp:483
|
#: client/scenes/lobby_gui.cpp:923 client/scenes/stream_gui.cpp:483
|
||||||
msgid "Supersampling"
|
msgid "Supersampling"
|
||||||
msgstr "超采样"
|
msgstr "超采样"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:928 client/scenes/stream_gui.cpp:504
|
#: client/scenes/lobby_gui.cpp:943 client/scenes/stream_gui.cpp:504
|
||||||
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"
|
||||||
@@ -371,11 +395,11 @@ msgstr ""
|
|||||||
"减少高对比度边缘的闪烁。\n"
|
"减少高对比度边缘的闪烁。\n"
|
||||||
"当串流分辨率高于头显原生分辨率时很有用"
|
"当串流分辨率高于头显原生分辨率时很有用"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:933 client/scenes/stream_gui.cpp:509
|
#: client/scenes/lobby_gui.cpp:948 client/scenes/stream_gui.cpp:509
|
||||||
msgid "Sharpening"
|
msgid "Sharpening"
|
||||||
msgstr "锐化"
|
msgstr "锐化"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:953 client/scenes/stream_gui.cpp:530
|
#: client/scenes/lobby_gui.cpp:968 client/scenes/stream_gui.cpp:530
|
||||||
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"
|
||||||
@@ -383,129 +407,129 @@ msgstr ""
|
|||||||
"改善高对比边缘的清晰度并抵消模糊。\n"
|
"改善高对比边缘的清晰度并抵消模糊。\n"
|
||||||
"当串流分辨率低于头显原生分辨率时很有用"
|
"当串流分辨率低于头显原生分辨率时很有用"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1137 client/scenes/lobby_gui.cpp:1145
|
#: client/scenes/lobby_gui.cpp:1152 client/scenes/lobby_gui.cpp:1160
|
||||||
#: client/scenes/stream_gui.cpp:172 client/scenes/stream_gui.cpp:373
|
#: client/scenes/stream_gui.cpp:172 client/scenes/stream_gui.cpp:373
|
||||||
msgid "CPU time"
|
msgid "CPU time"
|
||||||
msgstr "CPU 时间"
|
msgstr "CPU 时间"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1141
|
#: client/scenes/lobby_gui.cpp:1156
|
||||||
msgid "CPU time [ms]"
|
msgid "CPU time [ms]"
|
||||||
msgstr "CPU 时间 [ms]"
|
msgstr "CPU 时间 [ms]"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1151 client/scenes/lobby_gui.cpp:1159
|
#: client/scenes/lobby_gui.cpp:1166 client/scenes/lobby_gui.cpp:1174
|
||||||
#: client/scenes/stream_gui.cpp:174 client/scenes/stream_gui.cpp:374
|
#: client/scenes/stream_gui.cpp:174 client/scenes/stream_gui.cpp:374
|
||||||
msgid "GPU time"
|
msgid "GPU time"
|
||||||
msgstr "GPU 时间"
|
msgstr "GPU 时间"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1155
|
#: client/scenes/lobby_gui.cpp:1170
|
||||||
msgid "GPU time [ms]"
|
msgid "GPU time [ms]"
|
||||||
msgstr "GPU 时间 [ms]"
|
msgstr "GPU 时间 [ms]"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1219
|
#: client/scenes/lobby_gui.cpp:1234
|
||||||
msgid "Enable the microphone?"
|
msgid "Enable the microphone?"
|
||||||
msgstr "是否启用麦克风?"
|
msgstr "是否启用麦克风?"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1224
|
#: client/scenes/lobby_gui.cpp:1239
|
||||||
msgid "Enable eye tracking?"
|
msgid "Enable eye tracking?"
|
||||||
msgstr "是否启用眼动追踪?"
|
msgstr "是否启用眼动追踪?"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1229
|
#: client/scenes/lobby_gui.cpp:1244
|
||||||
msgid "Enable face tracking?"
|
msgid "Enable face tracking?"
|
||||||
msgstr "是否启用面部追踪?"
|
msgstr "是否启用面部追踪?"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1234
|
#: client/scenes/lobby_gui.cpp:1249
|
||||||
msgid "Enable body tracking?"
|
msgid "Enable body tracking?"
|
||||||
msgstr "是否启用身体追踪?"
|
msgstr "是否启用身体追踪?"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1242
|
#: client/scenes/lobby_gui.cpp:1257
|
||||||
msgid "Welcome to WiVRn"
|
msgid "Welcome to WiVRn"
|
||||||
msgstr "欢迎使用 WiVRn"
|
msgstr "欢迎使用 WiVRn"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1270
|
#: client/scenes/lobby_gui.cpp:1285
|
||||||
msgid "Yes"
|
msgid "Yes"
|
||||||
msgstr "是"
|
msgstr "是"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1277
|
#: client/scenes/lobby_gui.cpp:1292
|
||||||
msgid "No"
|
msgid "No"
|
||||||
msgstr "否"
|
msgstr "否"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1296 client/scenes/lobby_gui.cpp:1942
|
#: client/scenes/lobby_gui.cpp:1311 client/scenes/lobby_gui.cpp:1957
|
||||||
msgid "Licenses"
|
msgid "Licenses"
|
||||||
msgstr "许可证"
|
msgstr "许可证"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1572
|
#: client/scenes/lobby_gui.cpp:1587
|
||||||
msgid "Microphone is enabled"
|
msgid "Microphone is enabled"
|
||||||
msgstr "麦克风已启用"
|
msgstr "麦克风已启用"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1573
|
#: client/scenes/lobby_gui.cpp:1588
|
||||||
msgid "Microphone is disabled"
|
msgid "Microphone is disabled"
|
||||||
msgstr "麦克风已停用"
|
msgstr "麦克风已停用"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1582
|
#: client/scenes/lobby_gui.cpp:1597
|
||||||
msgid "Hand tracking is enabled"
|
msgid "Hand tracking is enabled"
|
||||||
msgstr "手部追踪已启用"
|
msgstr "手部追踪已启用"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1583
|
#: client/scenes/lobby_gui.cpp:1598
|
||||||
msgid "Hand tracking is disabled"
|
msgid "Hand tracking is disabled"
|
||||||
msgstr "手部追踪已停用"
|
msgstr "手部追踪已停用"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1592
|
#: client/scenes/lobby_gui.cpp:1607
|
||||||
msgid "Eye tracking is enabled"
|
msgid "Eye tracking is enabled"
|
||||||
msgstr "眼动追踪已启用"
|
msgstr "眼动追踪已启用"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1593
|
#: client/scenes/lobby_gui.cpp:1608
|
||||||
msgid "Eye tracking is disabled"
|
msgid "Eye tracking is disabled"
|
||||||
msgstr "眼动追踪已停用"
|
msgstr "眼动追踪已停用"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1603
|
#: client/scenes/lobby_gui.cpp:1618
|
||||||
msgid "Face tracking is enabled"
|
msgid "Face tracking is enabled"
|
||||||
msgstr "面部追踪已启用"
|
msgstr "面部追踪已启用"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1604
|
#: client/scenes/lobby_gui.cpp:1619
|
||||||
msgid "Face tracking is disabled"
|
msgid "Face tracking is disabled"
|
||||||
msgstr "面部追踪已停用"
|
msgstr "面部追踪已停用"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1618
|
#: client/scenes/lobby_gui.cpp:1633
|
||||||
msgid "Body tracking is enabled"
|
msgid "Body tracking is enabled"
|
||||||
msgstr "身体追踪已启用"
|
msgstr "身体追踪已启用"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1619
|
#: client/scenes/lobby_gui.cpp:1634
|
||||||
msgid "Body tracking is disabled"
|
msgid "Body tracking is disabled"
|
||||||
msgstr "身体追踪已停用"
|
msgstr "身体追踪已停用"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1635
|
#: client/scenes/lobby_gui.cpp:1650
|
||||||
msgid "Add server"
|
msgid "Add server"
|
||||||
msgstr "新增服务器"
|
msgstr "新增服务器"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1921
|
#: client/scenes/lobby_gui.cpp:1936
|
||||||
msgid "Server list"
|
msgid "Server list"
|
||||||
msgstr "服务器列表"
|
msgstr "服务器列表"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1924 client/scenes/stream_gui.cpp:996
|
#: client/scenes/lobby_gui.cpp:1939 client/scenes/stream_gui.cpp:996
|
||||||
msgid "Settings"
|
msgid "Settings"
|
||||||
msgstr "设置"
|
msgstr "设置"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1927
|
#: client/scenes/lobby_gui.cpp:1942
|
||||||
msgid "Post-processing"
|
msgid "Post-processing"
|
||||||
msgstr "后处理"
|
msgstr "后处理"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1930
|
#: client/scenes/lobby_gui.cpp:1945
|
||||||
msgid "Customize"
|
msgid "Customize"
|
||||||
msgstr "自定义"
|
msgstr "自定义"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1934
|
#: client/scenes/lobby_gui.cpp:1949
|
||||||
msgid "Debug"
|
msgid "Debug"
|
||||||
msgstr "Debug"
|
msgstr "Debug"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1939
|
#: client/scenes/lobby_gui.cpp:1954
|
||||||
msgid "About"
|
msgid "About"
|
||||||
msgstr "关于"
|
msgstr "关于"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1945
|
#: client/scenes/lobby_gui.cpp:1960
|
||||||
msgid "Exit"
|
msgid "Exit"
|
||||||
msgstr "退出"
|
msgstr "退出"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1962
|
#: client/scenes/lobby_gui.cpp:1977
|
||||||
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"
|
||||||
@@ -513,51 +537,51 @@ msgstr ""
|
|||||||
"按下抓握键,或手掌向上\n"
|
"按下抓握键,或手掌向上\n"
|
||||||
"以移动主窗口"
|
"以移动主窗口"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui.cpp:1964
|
#: client/scenes/lobby_gui.cpp:1979
|
||||||
msgid "Press the grip button to move the main window"
|
msgid "Press the grip button to move the main window"
|
||||||
msgstr "按下抓握键以移动主窗口"
|
msgstr "按下抓握键以移动主窗口"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui_customize.cpp:208
|
#: client/scenes/lobby_gui_customize.cpp:213
|
||||||
msgid "Locally loaded environment"
|
msgid "Locally loaded environment"
|
||||||
msgstr "从本地加载了环境"
|
msgstr "从本地加载了环境"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui_customize.cpp:221
|
#: client/scenes/lobby_gui_customize.cpp:226
|
||||||
#, c++-format
|
#, c++-format
|
||||||
msgid "Locally loaded environment ({})"
|
msgid "Locally loaded environment ({})"
|
||||||
msgstr "从本地加载了环境 ({})"
|
msgstr "从本地加载了环境 ({})"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui_customize.cpp:296
|
#: client/scenes/lobby_gui_customize.cpp:300
|
||||||
#, c++-format
|
#, c++-format
|
||||||
msgid "Cannot load local environment: {}"
|
msgid "Cannot load local environment: {}"
|
||||||
msgstr "无法加载本地环境:{}"
|
msgstr "无法加载本地环境:{}"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui_customize.cpp:329
|
#: client/scenes/lobby_gui_customize.cpp:333
|
||||||
#, c++-format
|
#, c++-format
|
||||||
msgid "Cannot load environment list: {}"
|
msgid "Cannot load environment list: {}"
|
||||||
msgstr "无法加载环境列表:{}"
|
msgstr "无法加载环境列表:{}"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui_customize.cpp:459
|
#: client/scenes/lobby_gui_customize.cpp:463
|
||||||
#, c++-format
|
#, c++-format
|
||||||
msgid "Author: {}"
|
msgid "Author: {}"
|
||||||
msgstr "作者: {}"
|
msgstr "作者: {}"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui_customize.cpp:463
|
#: client/scenes/lobby_gui_customize.cpp:467
|
||||||
#, c++-format
|
#, c++-format
|
||||||
msgid "Size: {:.1f} MB"
|
msgid "Size: {:.1f} MB"
|
||||||
msgstr "大小: {:.1f} MB"
|
msgstr "大小: {:.1f} MB"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui_customize.cpp:543
|
#: client/scenes/lobby_gui_customize.cpp:547
|
||||||
msgid "Delete this model"
|
msgid "Delete this model"
|
||||||
msgstr "删除此模型"
|
msgstr "删除此模型"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui_customize.cpp:579
|
#: client/scenes/lobby_gui_customize.cpp:583
|
||||||
#: client/scenes/lobby_gui_customize.cpp:785
|
#: client/scenes/lobby_gui_customize.cpp:789
|
||||||
#, c++-format
|
#, c++-format
|
||||||
msgid "HTTP error {} when downloading {}"
|
msgid "HTTP error {} when downloading {}"
|
||||||
msgstr "发生了 HTTP 错误 {} 于下载 {} 时"
|
msgstr "发生了 HTTP 错误 {} 于下载 {} 时"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui_customize.cpp:587
|
#: client/scenes/lobby_gui_customize.cpp:591
|
||||||
#: client/scenes/lobby_gui_customize.cpp:793
|
#: client/scenes/lobby_gui_customize.cpp:797
|
||||||
#, c++-format
|
#, c++-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Curl error when downloading {}\n"
|
"Curl error when downloading {}\n"
|
||||||
@@ -566,29 +590,29 @@ msgstr ""
|
|||||||
"通过 Curl 下载时发生了错误 {}\n"
|
"通过 Curl 下载时发生了错误 {}\n"
|
||||||
"{}:{}"
|
"{}:{}"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui_customize.cpp:648
|
#: client/scenes/lobby_gui_customize.cpp:652
|
||||||
#, c++-format
|
#, c++-format
|
||||||
msgid "Really delete {}?"
|
msgid "Really delete {}?"
|
||||||
msgstr "真的要删除 {} 吗?"
|
msgstr "真的要删除 {} 吗?"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui_customize.cpp:652
|
#: client/scenes/lobby_gui_customize.cpp:656
|
||||||
msgid "Delete"
|
msgid "Delete"
|
||||||
msgstr "删除"
|
msgstr "删除"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui_customize.cpp:733
|
#: client/scenes/lobby_gui_customize.cpp:737
|
||||||
#, c++-format
|
#, c++-format
|
||||||
msgid "Cannot load environment: {}"
|
msgid "Cannot load environment: {}"
|
||||||
msgstr "无法加载环境: {}"
|
msgstr "无法加载环境: {}"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui_customize.cpp:741
|
#: client/scenes/lobby_gui_customize.cpp:745
|
||||||
msgid "Loading environment"
|
msgid "Loading environment"
|
||||||
msgstr "环境加载中"
|
msgstr "环境加载中"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui_customize.cpp:820
|
#: client/scenes/lobby_gui_customize.cpp:824
|
||||||
msgid "Download more environments"
|
msgid "Download more environments"
|
||||||
msgstr "下载更多环境"
|
msgstr "下载更多环境"
|
||||||
|
|
||||||
#: client/scenes/lobby_gui_customize.cpp:828
|
#: client/scenes/lobby_gui_customize.cpp:832
|
||||||
msgid "Open local glTF model"
|
msgid "Open local glTF model"
|
||||||
msgstr "打开本地 glTF 模型"
|
msgstr "打开本地 glTF 模型"
|
||||||
|
|
||||||
@@ -765,6 +789,9 @@ msgstr "无法验证身份识别码"
|
|||||||
msgid "Pairing is disabled on server"
|
msgid "Pairing is disabled on server"
|
||||||
msgstr "服务器上已停用配对"
|
msgstr "服务器上已停用配对"
|
||||||
|
|
||||||
|
#~ msgid "Stream resolution"
|
||||||
|
#~ msgstr "串流分辨率"
|
||||||
|
|
||||||
#~ msgid "Resolution scale"
|
#~ msgid "Resolution scale"
|
||||||
#~ msgstr "分辨率缩放比例"
|
#~ msgstr "分辨率缩放比例"
|
||||||
|
|
||||||
|
|||||||
@@ -19,29 +19,28 @@
|
|||||||
|
|
||||||
#include "accept_connection.h"
|
#include "accept_connection.h"
|
||||||
|
|
||||||
#include "server/ipc_server_interface.h"
|
#include "util/u_logging.h"
|
||||||
|
|
||||||
#include "utils/overloaded.h"
|
#include "utils/overloaded.h"
|
||||||
|
|
||||||
|
#include "driver/wivrn_session.h"
|
||||||
#include "wivrn_config.h"
|
#include "wivrn_config.h"
|
||||||
#include "wivrn_ipc.h"
|
#include "wivrn_ipc.h"
|
||||||
#include "wivrn_sockets.h"
|
#include "wivrn_sockets.h"
|
||||||
|
|
||||||
#include <sys/poll.h>
|
#include <sys/poll.h>
|
||||||
|
|
||||||
std::unique_ptr<wivrn::TCP> wivrn::accept_connection(ipc_server * server, int watch_fd, std::function<bool()> quit)
|
std::unique_ptr<wivrn::TCP> wivrn::accept_connection(wivrn_session & cnx, std::stop_token stop, std::function<void(wivrn_session &)> tick)
|
||||||
{
|
{
|
||||||
wivrn_ipc_socket_monado->send(from_monado::headset_disconnected{});
|
wivrn_ipc_socket_monado->send(from_monado::headset_disconnected{});
|
||||||
|
|
||||||
wivrn::TCPListener listener(wivrn::default_port);
|
wivrn::TCPListener listener(wivrn::default_port);
|
||||||
|
|
||||||
pollfd fds[3]{
|
pollfd fds[2]{
|
||||||
{.fd = watch_fd, .events = POLLIN},
|
|
||||||
{.fd = listener.get_fd(), .events = POLLIN},
|
{.fd = listener.get_fd(), .events = POLLIN},
|
||||||
{.fd = wivrn_ipc_socket_monado->get_fd(), .events = POLLIN},
|
{.fd = wivrn_ipc_socket_monado->get_fd(), .events = POLLIN},
|
||||||
};
|
};
|
||||||
|
|
||||||
while (not(quit and quit()))
|
while (not stop.stop_requested())
|
||||||
{
|
{
|
||||||
if (poll(fds, std::size(fds), 100) < 0)
|
if (poll(fds, std::size(fds), 100) < 0)
|
||||||
{
|
{
|
||||||
@@ -50,21 +49,20 @@ std::unique_ptr<wivrn::TCP> wivrn::accept_connection(ipc_server * server, int wa
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (fds[0].revents & POLLIN)
|
if (fds[0].revents & POLLIN)
|
||||||
return {};
|
|
||||||
|
|
||||||
if (fds[1].revents & POLLIN)
|
|
||||||
{
|
{
|
||||||
wivrn_ipc_socket_monado->send(from_monado::headset_connected{});
|
wivrn_ipc_socket_monado->send(from_monado::headset_connected{});
|
||||||
return std::make_unique<wivrn::TCP>(listener.accept().first);
|
return std::make_unique<wivrn::TCP>(listener.accept().first);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fds[2].revents & POLLIN)
|
if (fds[1].revents & POLLIN)
|
||||||
{
|
{
|
||||||
auto packet = receive_from_main();
|
auto packet = receive_from_main();
|
||||||
if (packet)
|
if (packet)
|
||||||
std::visit(utils::overloaded{
|
std::visit(utils::overloaded{
|
||||||
[server](to_monado::stop) {
|
[&cnx](to_monado::stop) {
|
||||||
ipc_server_stop(server);
|
// gets handled in wivrn_session::reconnect since we return nullptr
|
||||||
|
U_LOG_I("Received stop packet during reconnect, stopping");
|
||||||
|
cnx.request_stop();
|
||||||
},
|
},
|
||||||
[](auto &&) {
|
[](auto &&) {
|
||||||
// Ignore request when no headset is connected
|
// Ignore request when no headset is connected
|
||||||
@@ -72,6 +70,9 @@ std::unique_ptr<wivrn::TCP> wivrn::accept_connection(ipc_server * server, int wa
|
|||||||
},
|
},
|
||||||
*packet);
|
*packet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (tick)
|
||||||
|
tick(cnx);
|
||||||
}
|
}
|
||||||
|
|
||||||
return {};
|
return {};
|
||||||
|
|||||||
@@ -19,13 +19,13 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "server/ipc_server.h"
|
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <stop_token>
|
||||||
|
|
||||||
namespace wivrn
|
namespace wivrn
|
||||||
{
|
{
|
||||||
class TCP;
|
class TCP;
|
||||||
std::unique_ptr<wivrn::TCP> accept_connection(ipc_server * server, int watch_fd, std::function<bool()> quit = std::function<bool()>());
|
class wivrn_session;
|
||||||
|
std::unique_ptr<wivrn::TCP> accept_connection(wivrn_session & cnx, std::stop_token stop, std::function<void(wivrn_session &)> tick = {});
|
||||||
} // namespace wivrn
|
} // namespace wivrn
|
||||||
|
|||||||
@@ -293,13 +293,13 @@ void wivrn::wivrn_connection::init(std::stop_token stop_token, std::function<voi
|
|||||||
wivrn::update_last_connection_timestamp(clean_key(headset_key.public_key()));
|
wivrn::update_last_connection_timestamp(clean_key(headset_key.public_key()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void wivrn::wivrn_connection::reset(TCP && tcp, std::function<void()> tick)
|
void wivrn::wivrn_connection::reset(std::stop_token stop, TCP && tcp, std::function<void()> tick)
|
||||||
{
|
{
|
||||||
if (stream)
|
if (stream)
|
||||||
stream = decltype(stream)();
|
stream = decltype(stream)();
|
||||||
|
|
||||||
control = std::move(tcp);
|
control = std::move(tcp);
|
||||||
init({}, tick);
|
init(stop, tick);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wivrn::wivrn_connection::shutdown()
|
void wivrn::wivrn_connection::shutdown()
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ public:
|
|||||||
{
|
{
|
||||||
return active;
|
return active;
|
||||||
}
|
}
|
||||||
void reset(TCP && tcp, std::function<void()> tick = []() {});
|
void reset(std::stop_token stop, TCP && tcp, std::function<void()> tick = {});
|
||||||
void shutdown();
|
void shutdown();
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
* WiVRn VR streaming
|
* WiVRn VR streaming
|
||||||
* Copyright (C) 2022 Guillaume Meunier <guillaume.meunier@centraliens.net>
|
* Copyright (C) 2022 Guillaume Meunier <guillaume.meunier@centraliens.net>
|
||||||
* Copyright (C) 2022 Patrick Nicolas <patricknicolas@laposte.net>
|
* Copyright (C) 2022 Patrick Nicolas <patricknicolas@laposte.net>
|
||||||
|
* Copyright (C) 2025 Sapphire <imsapphire0@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -419,6 +420,14 @@ void wivrn_session::stop()
|
|||||||
thread = std::jthread();
|
thread = std::jthread();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool wivrn_session::request_stop()
|
||||||
|
{
|
||||||
|
assert(mnd_ipc_server);
|
||||||
|
bool b = thread.request_stop();
|
||||||
|
ipc_server_stop(mnd_ipc_server);
|
||||||
|
return b;
|
||||||
|
}
|
||||||
|
|
||||||
clock_offset wivrn_session::get_offset()
|
clock_offset wivrn_session::get_offset()
|
||||||
{
|
{
|
||||||
return offset_est.get_offset();
|
return offset_est.get_offset();
|
||||||
@@ -440,7 +449,7 @@ 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_changed && settings)
|
void wivrn_session::operator()(const from_headset::settings_changed & settings)
|
||||||
{
|
{
|
||||||
*this->settings.lock() = settings;
|
*this->settings.lock() = settings;
|
||||||
|
|
||||||
@@ -959,8 +968,7 @@ void wivrn_session::operator()(audio_data && data)
|
|||||||
|
|
||||||
void wivrn_session::operator()(to_monado::stop &&)
|
void wivrn_session::operator()(to_monado::stop &&)
|
||||||
{
|
{
|
||||||
assert(mnd_ipc_server);
|
request_stop();
|
||||||
ipc_server_stop(mnd_ipc_server);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wivrn_session::operator()(to_monado::disconnect &&)
|
void wivrn_session::operator()(to_monado::disconnect &&)
|
||||||
@@ -1045,7 +1053,7 @@ void wivrn_session::run(std::stop_token stop)
|
|||||||
catch (const std::exception & e)
|
catch (const std::exception & e)
|
||||||
{
|
{
|
||||||
U_LOG_E("Exception in network thread: %s", e.what());
|
U_LOG_E("Exception in network thread: %s", e.what());
|
||||||
reconnect();
|
reconnect(stop);
|
||||||
refresh.reset();
|
refresh.reset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1070,18 +1078,17 @@ void wivrn_session::dump_time(const std::string & event, uint64_t frame, int64_t
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool quit_if_no_client(u_system & xrt_system)
|
void wivrn_session::quit_if_no_client()
|
||||||
{
|
{
|
||||||
|
scoped_lock lock(xrt_system.sessions.mutex);
|
||||||
|
if (xrt_system.sessions.count == 0)
|
||||||
{
|
{
|
||||||
scoped_lock lock(xrt_system.sessions.mutex);
|
U_LOG_I("No OpenXR client connected, exiting");
|
||||||
if (xrt_system.sessions.count)
|
request_stop();
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
U_LOG_I("No OpenXR client connected, exiting");
|
|
||||||
exit(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wivrn_session::reconnect()
|
void wivrn_session::reconnect(std::stop_token stop)
|
||||||
{
|
{
|
||||||
assert(mnd_ipc_server);
|
assert(mnd_ipc_server);
|
||||||
// Notify clients about disconnected status
|
// Notify clients about disconnected status
|
||||||
@@ -1099,23 +1106,21 @@ void wivrn_session::reconnect()
|
|||||||
}
|
}
|
||||||
|
|
||||||
U_LOG_I("Waiting for new connection");
|
U_LOG_I("Waiting for new connection");
|
||||||
auto tcp = accept_connection(mnd_ipc_server, 0 /*stdin*/, [this]() { return quit_if_no_client(xrt_system); });
|
auto tcp = accept_connection(*this, stop, &wivrn_session::quit_if_no_client);
|
||||||
|
if (stop.stop_requested())
|
||||||
|
return;
|
||||||
if (not tcp)
|
if (not tcp)
|
||||||
exit(0);
|
{
|
||||||
|
request_stop();
|
||||||
struct no_client_connected
|
return;
|
||||||
{};
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
offset_est.reset();
|
offset_est.reset();
|
||||||
connection->reset(std::move(*tcp), [this]() {
|
connection->reset(stop, std::move(*tcp), [this]() { quit_if_no_client(); });
|
||||||
if (quit_if_no_client(xrt_system))
|
|
||||||
throw no_client_connected{};
|
|
||||||
});
|
|
||||||
|
|
||||||
// const auto & info = connection->info();
|
const auto & info = connection->info();
|
||||||
// FIXME: ensure new client is compatible
|
(*this)(info.settings);
|
||||||
|
|
||||||
{
|
{
|
||||||
std::shared_lock lock(comp_target_mutex);
|
std::shared_lock lock(comp_target_mutex);
|
||||||
@@ -1133,11 +1138,6 @@ void wivrn_session::reconnect()
|
|||||||
U_LOG_W("Failed to notify session state change");
|
U_LOG_W("Failed to notify session state change");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (no_client_connected)
|
|
||||||
{
|
|
||||||
U_LOG_I("No OpenXR application connected");
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
catch (const std::exception & e)
|
catch (const std::exception & e)
|
||||||
{
|
{
|
||||||
U_LOG_E("Reconnection failed: %s", e.what());
|
U_LOG_E("Reconnection failed: %s", e.what());
|
||||||
|
|||||||
@@ -161,6 +161,9 @@ public:
|
|||||||
void start(ipc_server *);
|
void start(ipc_server *);
|
||||||
void stop();
|
void stop();
|
||||||
|
|
||||||
|
bool request_stop();
|
||||||
|
void quit_if_no_client();
|
||||||
|
|
||||||
clock_offset get_offset();
|
clock_offset get_offset();
|
||||||
bool connected();
|
bool connected();
|
||||||
const from_headset::headset_info_packet & get_info() const
|
const from_headset::headset_info_packet & get_info() const
|
||||||
@@ -193,7 +196,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_changed &&);
|
void operator()(const from_headset::settings_changed &);
|
||||||
void operator()(from_headset::handshake &&) {}
|
void operator()(from_headset::handshake &&) {}
|
||||||
void operator()(from_headset::trackings &&);
|
void operator()(from_headset::trackings &&);
|
||||||
void operator()(const from_headset::tracking &);
|
void operator()(const from_headset::tracking &);
|
||||||
@@ -245,7 +248,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
void run(std::stop_token stop);
|
void run(std::stop_token stop);
|
||||||
void reconnect();
|
void reconnect(std::stop_token stop);
|
||||||
|
|
||||||
void poll_session_loss();
|
void poll_session_loss();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user