Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Vindicus999
2025-10-06 17:17:44 +00:00
4 changed files with 26 additions and 34 deletions
+5 -7
View File
@@ -6,7 +6,7 @@
WiVRn wirelessly connects a standalone VR headset to a Linux computer. You can then play PCVR games on the headset while processing is done on the computer. WiVRn wirelessly connects a standalone VR headset to a Linux computer. You can then play PCVR games on the headset while processing is done on the computer.
It supports a wide range of headsets such as Quest 1 / 2 / Pro / 3 / 3S, Pico Neo 4, HTC Vive Focus 3, HTC Vive XR elite and most other Android based headsets. It supports a wide range of headsets such as Quest 1 / 2 / Pro / 3 / 3S, Pico Neo 3, Pico 4, HTC Vive Focus 3, HTC Vive XR elite and most other Android based headsets.
# Getting started # Getting started
@@ -105,11 +105,11 @@ See [configuration](docs/configuration.md) for editing the configuration manuall
If the server list is empty in the headset app: If the server list is empty in the headset app:
- Make sure your computer is connected on the same network as your headset - Make sure your computer is connected on the same network as your headset
- Check that avahi is running with `systemctl status avahi-daemon`, if it is not, enable it with `systemctl enable --now avahi-daemon` - Check that avahi is running with `systemctl status avahi-daemon`, if it is not, enable it with `systemctl enable --now avahi-daemon`
- If you have a firewall, check that port 5353 (UDP) is open - If you have a firewall, check that port 5353 (UDP) is open (for ufw, use `ufw allow 5353/udp`)
## My headset does not connect to my computer ## My headset does not connect to my computer
- If you have a firewall, check that port 9757 (UDP and TCP) is open - If you have a firewall, check that port 9757 (UDP and TCP) is open (for ufw, use `ufw allow 9757`)
- The server and client must be compatible: - The server and client must be compatible.
## How do I use a wired connection? ## How do I use a wired connection?
@@ -129,9 +129,7 @@ If the server list is empty in the headset app:
## How do I see server logs when using the dashboard? ## How do I see server logs when using the dashboard?
``` Click Troubleshoot > Open server logs, or navigate to `${XDG_STATE_HOME}/wivrn/wivrn-dashboard` (with fallback to `${HOME}/.local/state` for `${XDG_STATE_HOME}`, or for flatpak `${HOME}/.var/app/io.github.wivrn.wivrn/.local/state/wivrn/wivrn-dashboard`.
journalctl -f --no-hostname -u io.github.wivrn.wivrn.desktop
```
# Contributing # Contributing
+6 -14
View File
@@ -77,7 +77,7 @@ Kirigami.ApplicationWindow {
if (root.first_run && started) { if (root.first_run && started) {
console.log("First run"); console.log("First run");
root.pageStack.push(Qt.resolvedUrl("WizardPage.qml")); root.pageStack.push(Qt.createComponent("WizardPage.qml").createObject());
root.first_run = false; root.first_run = false;
} }
} }
@@ -352,14 +352,14 @@ Kirigami.ApplicationWindow {
Kirigami.Action { Kirigami.Action {
text: i18n("Wizard") text: i18n("Wizard")
icon.name: "tools-wizard-symbolic" icon.name: "tools-wizard-symbolic"
onTriggered: root.pageStack.push(Qt.resolvedUrl("WizardPage.qml")) onTriggered: root.pageStack.push(Qt.createComponent("WizardPage.qml").createObject())
visible: root.pageStack.depth == 1 visible: root.pageStack.depth == 1
enabled: root.server_started enabled: root.server_started
}, },
Kirigami.Action { Kirigami.Action {
text: i18n("Install the app") text: i18n("Install the app")
icon.name: "install-symbolic" icon.name: "install-symbolic"
onTriggered: root.pageStack.push(Qt.resolvedUrl("ApkInstallPage.qml")) onTriggered: root.pageStack.push(Qt.createComponent("ApkInstallPage.qml").createObject())
visible: root.pageStack.depth == 1 visible: root.pageStack.depth == 1
enabled: root.server_started && Adb.adbInstalled enabled: root.server_started && Adb.adbInstalled
tooltip: { tooltip: {
@@ -370,32 +370,24 @@ Kirigami.ApplicationWindow {
return ""; return "";
} }
}, },
// Kirigami.Action {
// text: i18n("Statistics")
// icon.name: "office-chart-line-symbolic"
// onTriggered: root.pageStack.push(Qt.resolvedUrl("HeadsetStatsPage.qml"))
// visible: root.pageStack.depth == 1
// enabled: root.server_started && Adb.adbInstalled && WivrnServer.headsetConnected
// },
Kirigami.Action { Kirigami.Action {
text: i18n("Headsets") text: i18n("Headsets")
icon.name: "item-symbolic" icon.name: "item-symbolic"
onTriggered: root.pageStack.push(Qt.resolvedUrl("HeadsetsPage.qml")) onTriggered: root.pageStack.push(Qt.createComponent("HeadsetsPage.qml").createObject())
visible: root.pageStack.depth == 1 visible: root.pageStack.depth == 1
enabled: root.server_started enabled: root.server_started
}, },
Kirigami.Action { Kirigami.Action {
text: i18n("Settings") text: i18n("Settings")
icon.name: "settings-configure-symbolic" icon.name: "settings-configure-symbolic"
onTriggered: root.pageStack.push(Qt.resolvedUrl("SettingsPage.qml")) onTriggered: root.pageStack.push(Qt.createComponent("SettingsPage.qml").createObject())
visible: root.pageStack.depth == 1 visible: root.pageStack.depth == 1
enabled: root.server_started enabled: root.server_started
}, },
Kirigami.Action { Kirigami.Action {
text: i18n("Troubleshoot") text: i18n("Troubleshoot")
icon.name: "help-contents-symbolic" icon.name: "help-contents-symbolic"
onTriggered: root.pageStack.push(Qt.resolvedUrl("TroubleshootPage.qml")) onTriggered: root.pageStack.push(Qt.createComponent("TroubleshootPage.qml").createObject())
enabled: root.pageStack.depth == 1 enabled: root.pageStack.depth == 1
} }
] ]
+4 -1
View File
@@ -8,6 +8,8 @@ Files are read from
Files later in the list replace top-level values from previous ones. Files later in the list replace top-level values from previous ones.
If you installed WiVRn from a flatpack, the config is in `$HOME/.var/app/io.github.wivrn.wivrn/config/wivrn/config.json`.
All elements are optional and have default values. All elements are optional and have default values.
## `scale` ## `scale`
@@ -158,7 +160,8 @@ Json object of additional options to pass directly to ffmpeg `avcodec_open2`'s `
## `encoder-passthrough` ## `encoder-passthrough`
The single encoder used for passthrough (transparency), contains the same elements as the other encoders, except for width/height and offsets. The single encoder used for passthrough (transparency), contains the same elements as the other encoders, except for width/height and offsets which are ignored.
Default values are those computed for the first encoder.
## `application` ## `application`
Default value: unset Default value: unset
+11 -12
View File
@@ -87,24 +87,23 @@ static void split_bitrate(std::vector<wivrn::encoder_settings> & encoders, uint6
void print_encoders(const std::vector<wivrn::encoder_settings> & encoders) void print_encoders(const std::vector<wivrn::encoder_settings> & encoders)
{ {
int group = -1; int group = -1;
std::stringstream str;
str << "Encoder configuration:";
for (auto & encoder: encoders) for (auto & encoder: encoders)
{ {
if (encoder.group != group) if (encoder.group != group)
{ {
group = encoder.group; group = encoder.group;
U_LOG_I("Group %d", group); str << "\n\t* Group " << group << ":";
} }
else
std::string codec(magic_enum::enum_name(encoder.codec)); str << "\n";
U_LOG_I("\t%s (%s %d-bit)", encoder.encoder_name.c_str(), codec.c_str(), encoder.bit_depth); str << "\n\t\t" << encoder.encoder_name << " (" << magic_enum::enum_name(encoder.codec) << " " << encoder.bit_depth << "-bit)"
U_LOG_I("\tchannels: %s", std::string(magic_enum::enum_name(encoder.channels)).c_str()); << "\n\t\tchannels: " << magic_enum::enum_name(encoder.channels)
U_LOG_I("\tsize:%" PRIu16 "x%" PRIu16 " offset:%" PRIu16 "x%" PRIu16, << "\n\t\tsize: " << encoder.width << "x" << encoder.height << " offset: " << encoder.offset_x << "x" << encoder.offset_y
encoder.width, << "\n\t\tbitrate: " << encoder.bitrate / 1'000'000 << "Mbit/s";
encoder.height,
encoder.offset_x,
encoder.offset_y);
U_LOG_I("\tbitrate: %" PRIu64 "Mbit/s", encoder.bitrate / 1'000'000);
} }
U_LOG_I("%s", str.str().c_str());
} }
static void check_scale(std::string_view encoder_name, video_codec codec, uint16_t width, uint16_t height, std::array<double, 2> & scale) static void check_scale(std::string_view encoder_name, video_codec codec, uint16_t width, uint16_t height, std::array<double, 2> & scale)
@@ -359,7 +358,7 @@ std::vector<encoder_settings> get_encoder_settings(wivrn_vk_bundle & bundle, uin
if (config.encoders.empty()) if (config.encoders.empty())
config.encoders = get_encoder_default_settings(bundle, info.supported_codecs, config.bit_depth); config.encoders = get_encoder_default_settings(bundle, info.supported_codecs, config.bit_depth);
if (not config.encoder_passthrough) if (not config.encoder_passthrough)
config.encoder_passthrough.emplace(); config.encoder_passthrough = config.encoders.front();
config.encoder_passthrough->width = 1; config.encoder_passthrough->width = 1;
config.encoder_passthrough->height = 1; config.encoder_passthrough->height = 1;