Compare commits

..
Author SHA1 Message Date
Vindicus999 e46228d75a Update build workflows so that they're the same as in master 2025-09-25 11:18:48 -04:00
Vindicus999 cf3c364b42 Rebase almost everything to Master 2025-09-25 09:16:54 -04:00
Vindicus999 492ed88ae2 Merge branch 'sneed' 2025-09-25 00:38:56 -04:00
Vindicus999 7e0dba71a5 feat(flatpak): enable WIVRN_FEATURE_SOLARXR 2025-09-25 00:34:45 -04:00
Vindicus999 d89714070e feat: add solarxr patches 2025-09-25 00:34:45 -04:00
Vindicus999 7867063c37 Update flake.nix 2025-09-25 00:34:45 -04:00
Vindicus999 ca05a3cf29 Update CMakeList.txt so that it's the same as Master 2025-09-25 00:34:45 -04:00
Vindicus999 a110a54256 feat: add solarxr patches 2025-09-25 00:34:45 -04:00
Vindicus999 870c3c0796 Revert "Merge branch 'master' of https://github.com/Vindicus999/WiVRn"
This reverts commit 6212dccc2b, reversing
changes made to 80e31b642a.
2025-09-25 00:34:45 -04:00
Vindicus999 28b6771511 Remove poo water from default icon 2025-09-25 00:34:43 -04:00
Vindicus999 963caf1794 Updated patches 2025-09-25 00:34:43 -04:00
Vindicus999 393cefda8f Update APK-Release.yml 2025-09-25 00:33:43 -04:00
Vindicus999 faa1a0c02f Update Sync.yml 2025-09-25 00:33:43 -04:00
Vindicus999 bee076416c Update APK-Release.yml 2025-09-25 00:33:26 -04:00
Vindicus999 9439c75f75 Update Sync.yml 2025-09-25 00:33:26 -04:00
Vindicus999 d45fae44e7 Update APK-Release.yml 2025-09-25 00:33:12 -04:00
Vindicus999 c3065d4950 Update APK-Release.yml 2025-09-25 00:32:07 -04:00
Vindicus999 ec83166955 Update APK-Release.yml 2025-09-25 00:32:07 -04:00
Vindicus999 9dee429515 Update APK-Release.yml 2025-09-25 00:32:07 -04:00
Vindicus999 4cc00b6a67 Update APK-Release.yml 2025-09-25 00:32:07 -04:00
Vindicus999 85493b6599 Update APK-Release.yml 2025-09-25 00:32:07 -04:00
Vindicus999 0c8f319a86 Update APK-Release.yml 2025-09-25 00:32:07 -04:00
Vindicus999 5e590273f7 Update APK-Release.yml 2025-09-25 00:32:07 -04:00
Vindicus999 33cf4be5fd Update APK-Release.yml 2025-09-25 00:32:07 -04:00
Vindicus999 66c7b3e04d Update APK-Release.yml 2025-09-25 00:32:07 -04:00
Vindicus999 8441add99b Create pull.yml 2025-09-25 00:32:07 -04:00
Tool Man 184254cb62 Create pull.yml 2025-09-25 00:32:07 -04:00
Vindicus999 0640bcf943 Update patches 2025-09-25 00:26:29 -04:00
Vindicus999 4430721eb4 Delete xr.h 2025-09-25 00:25:47 -04:00
Vindicus999 1e794eee1d feat(flatpak): enable WIVRN_FEATURE_SOLARXR 2025-09-25 00:25:45 -04:00
Vindicus999 7c9ce8283b feat: add solarxr patches 2025-09-25 00:25:41 -04:00
Vindicus999 fea424e894 refactor: initialize xdevs with xrt_device_init 2025-09-25 00:25:41 -04:00
Vindicus999 c9e774ee65 feat: add solarxr patches 2025-09-25 00:25:41 -04:00
Vindicus999 f4fa43784f Revert "Default to xrizer"
This reverts commit 46ffc44.
2025-09-25 00:25:41 -04:00
Vindicus999 f0c31a7994 Revert "Merge branch 'master' of https://github.com/Vindicus999/WiVRn"
This reverts commit 6212dccc2b, reversing
changes made to 80e31b642a.
2025-09-25 00:25:41 -04:00
Vindicus999 ef50208923 Use spaces instead of tabs 2025-09-25 00:24:06 -04:00
Vindicus999 81d256b623 Updated patches 2025-09-25 00:24:06 -04:00
Vindicus999 3a0e1fa2a6 Flipped the ray 2025-09-25 00:24:06 -04:00
Vindicus999 9f82675237 Fixed a line 2025-09-25 00:24:06 -04:00
Vindicus999 eb86dbf209 feat: enable XR_FB_body_tracking
copied from commit 2b654c0
2025-09-25 00:24:06 -04:00
Tool Man f4e55b41d7 Adding solarxr patches
Remove potential statistics
2025-09-25 00:24:06 -04:00
Vindicus999 3c1909a2d9 Update Sync.yml 2025-09-25 00:23:40 -04:00
Vindicus999 07c0ecd31b Update APK-Release.yml 2025-09-25 00:23:40 -04:00
Vindicus999 675464a868 Update Sync.yml 2025-09-25 00:23:40 -04:00
Vindicus999 517c809817 Update APK-Release.yml 2025-09-25 00:23:40 -04:00
Vindicus999 155abc0bc2 Update Sync.yml 2025-09-25 00:23:40 -04:00
Vindicus999 6d9d6f5a80 Update APK-Release.yml 2025-09-25 00:23:40 -04:00
Vindicus999 5925b2197e Update APK-Release.yml 2025-09-25 00:23:40 -04:00
Vindicus999 143a05ba2f Update APK-Release.yml 2025-09-25 00:23:40 -04:00
Vindicus999 642ed2ce23 Update APK-Release.yml 2025-09-25 00:23:40 -04:00
Vindicus999 06df375a2a Update APK-Release.yml 2025-09-25 00:23:40 -04:00
Vindicus999 b3604697ab Update APK-Release.yml 2025-09-25 00:23:40 -04:00
Vindicus999 5895c53e2f Update APK-Release.yml 2025-09-25 00:23:40 -04:00
Vindicus999 928ce04443 Update APK-Release.yml 2025-09-25 00:23:40 -04:00
Vindicus999 e271c6c2d6 Update APK-Release.yml 2025-09-25 00:23:40 -04:00
Vindicus999 011b347b87 Update APK-Release.yml 2025-09-25 00:23:40 -04:00
Vindicus999 f92a55d5fd Update APK-Release.yml 2025-09-25 00:23:40 -04:00
Vindicus999 eb2e0c12ca Update APK-Release.yml 2025-09-25 00:23:40 -04:00
Vindicus999 bb511c855e Create pull.yml 2025-09-25 00:23:40 -04:00
Tool Man 298de3f9c2 Create pull.yml 2025-09-25 00:23:40 -04:00
Vindicus999 bec073ef91 Update ray.png 2025-09-25 00:23:10 -04:00
Vindicus999 5255887a85 Add a last improvement 2025-09-25 00:23:10 -04:00
Vindicus999 34c49cdae6 Update patches 2025-09-25 00:23:10 -04:00
Vindicus999 7e1a04afba Update CMakeLists.txt 2025-09-25 00:22:53 -04:00
Tool Man 29ea3f918b Adding solarxr patches
Remove potential statistics
2025-09-25 00:22:53 -04:00
Vindicus999 d8173cdc1c Update CMakeLists.txt 2025-09-25 00:13:26 -04:00
Vindicus999 a680811058 Merge branch 'master' of https://github.com/Vindicus999/WiVRn 2025-09-25 00:11:05 -04:00
Vindicus999 d60060a125 Update application.h 2025-09-25 00:10:33 -04:00
Just some guy 5c6a874542 2025-09-25 04:02:29 +00:00
Vindicus999 10dad7dac4 Merge branch 'master' into sneed 2025-09-25 00:01:37 -04:00
Vindicus999 450cbbe71a feat(flatpak): enable WIVRN_FEATURE_SOLARXR 2025-09-25 00:00:00 -04:00
Vindicus999 72e8989889 feat: add solarxr patches 2025-09-24 23:59:56 -04:00
Vindicus999 e7eff33bab refactor: initialize xdevs with xrt_device_init 2025-09-24 23:59:56 -04:00
Vindicus999 e03d750ba5 Update flake.nix 2025-09-24 23:59:56 -04:00
Vindicus999 5109a19824 Update CMakeList.txt so that it's the same as Master 2025-09-24 23:59:56 -04:00
Vindicus999 0534c3d0bb feat: add solarxr patches 2025-09-24 23:59:56 -04:00
Vindicus999 07611d7db6 Revert "Default to xrizer"
This reverts commit 46ffc44.
2025-09-24 23:59:56 -04:00
Vindicus999 45900a5fde Revert "Merge branch 'master' of https://github.com/Vindicus999/WiVRn"
This reverts commit 6212dccc2b, reversing
changes made to 80e31b642a.
2025-09-24 23:59:56 -04:00
Vindicus999 5d2b125cbf Remove poo water from default icon 2025-09-24 23:54:37 -04:00
Vindicus999 48088d6ef3 Use spaces instead of tabs 2025-09-24 23:53:45 -04:00
Vindicus999 4eb74814f2 Updated patches 2025-09-24 23:53:45 -04:00
Vindicus999 265280d3a4 Flipped the ray 2025-09-24 23:53:45 -04:00
Vindicus999 fca81fd326 Fixed a line 2025-09-24 23:53:45 -04:00
Vindicus999 99dbc34b16 feat: enable XR_FB_body_tracking
copied from commit 2b654c0
2025-09-24 23:53:45 -04:00
Tool Man fcaa2ed7cb Adding solarxr patches
Remove potential statistics
2025-09-24 23:53:45 -04:00
Vindicus999 2e40a8523b Update Sync.yml 2025-09-24 23:51:08 -04:00
Vindicus999 4b2d681278 Update APK-Release.yml 2025-09-24 23:51:08 -04:00
Vindicus999 cad5133bca Update Sync.yml 2025-09-24 23:51:08 -04:00
Vindicus999 b88b9eaac7 Update APK-Release.yml 2025-09-24 23:51:08 -04:00
Vindicus999 7114a32d56 Update Sync.yml 2025-09-24 23:51:08 -04:00
Vindicus999 a9bf0e6a66 Update APK-Release.yml 2025-09-24 23:51:08 -04:00
Vindicus999 fe022becbb Update APK-Release.yml 2025-09-24 23:51:08 -04:00
Vindicus999 1a22f38b7f Update APK-Release.yml 2025-09-24 23:51:08 -04:00
Vindicus999 f55fd1683b Update APK-Release.yml 2025-09-24 23:51:08 -04:00
Vindicus999 4414f3b0cd Update APK-Release.yml 2025-09-24 23:51:08 -04:00
Vindicus999 2772c0d2f9 Update APK-Release.yml 2025-09-24 23:51:08 -04:00
Vindicus999 dbc52ac72b Update APK-Release.yml 2025-09-24 23:51:08 -04:00
Vindicus999 1bc732002f Update APK-Release.yml 2025-09-24 23:51:08 -04:00
Vindicus999 1e9d0f691d Update APK-Release.yml 2025-09-24 23:51:08 -04:00
Vindicus999 e32cfc8786 Update APK-Release.yml 2025-09-24 23:51:08 -04:00
Vindicus999 9ab2cfc1a1 Update APK-Release.yml 2025-09-24 23:51:08 -04:00
Vindicus999 f6f41680be Update APK-Release.yml 2025-09-24 23:51:08 -04:00
Vindicus999 644eac6b1b Create pull.yml 2025-09-24 23:51:08 -04:00
Tool Man 6b94344eb1 Create pull.yml 2025-09-24 23:51:08 -04:00
Vindicus999 57844afef0 Update ray.png 2025-09-24 23:50:05 -04:00
Vindicus999 e012a74cb4 Add a last improvement 2025-09-24 23:50:05 -04:00
Vindicus999 68366776de Update patches 2025-09-24 23:50:05 -04:00
Vindicus999 90b5a7f774 Update CMakeLists.txt 2025-09-24 23:49:48 -04:00
Tool Man 92f677b518 Adding solarxr patches
Remove potential statistics
2025-09-24 23:49:48 -04:00
Vindicus999 f4d232d8ad Delete xr.h 2025-09-24 23:34:06 -04:00
Vindicus999 755b4f1300 feat(flatpak): enable WIVRN_FEATURE_SOLARXR 2025-09-24 22:20:41 -04:00
Vindicus999 c3ed62811b feat: add solarxr patches 2025-09-24 22:19:38 -04:00
Vindicus999 a4791a028a refactor: initialize xdevs with xrt_device_init 2025-09-24 22:18:52 -04:00
Vindicus999 ab6c2f0aae Merge remote-tracking branch 'upstream/master' 2025-09-24 21:25:03 -04:00
Just some guy e0df6484dc 2025-08-25 05:24:14 +00:00
Vindicus999 b1efa984fa feat: add solarxr patches 2025-08-24 19:20:52 -04:00
Vindicus999 3fe032fa3b Revert "Default to xrizer"
This reverts commit 46ffc44.
2025-08-24 19:20:28 -04:00
Vindicus999 1c81b7b264 Merge remote-tracking branch 'upstream/master' 2025-08-24 23:20:27 +00:00
Just some guy 7ce68a0673 2025-08-24 13:59:31 +00:00
Vindicus999 e7e42054d5 Merge branch 'master' into sneed 2025-08-24 09:58:50 -04:00
Vindicus999 ea45e9f91b Revert "Merge branch 'master' of https://github.com/Vindicus999/WiVRn"
This reverts commit 6212dccc2b, reversing
changes made to 80e31b642a.
2025-08-24 09:56:21 -04:00
Vindicus999 6212dccc2b Merge branch 'master' of https://github.com/Vindicus999/WiVRn 2025-08-24 09:54:57 -04:00
Vindicus999 449a5b5201 Remove poo water from default icon 2025-08-23 15:40:01 -04:00
Vindicus999 80e31b642a Merge remote-tracking branch 'upstream/master' 2025-08-07 17:17:47 +00:00
Vindicus999 8a9d218e4f Merge remote-tracking branch 'upstream/master' 2025-08-06 23:16:38 +00:00
Vindicus999 6eaaf8b770 Merge remote-tracking branch 'upstream/master' 2025-08-06 17:19:05 +00:00
Vindicus999 617934e91f Merge remote-tracking branch 'upstream/master' 2025-08-06 11:14:52 +00:00
Just some guy 06d5e00fe2 2025-08-05 23:15:59 +00:00
Vindicus999 377e218782 Use spaces instead of tabs 2025-08-05 18:45:44 -04:00
Vindicus999 5e81b4a14d Merge remote-tracking branch 'upstream/master' 2025-08-04 23:16:08 +00:00
Vindicus999 20b67a5a3c Merge remote-tracking branch 'upstream/master' 2025-08-04 11:15:24 +00:00
Vindicus999 c55fec84fe Merge remote-tracking branch 'upstream/master' 2025-08-03 17:14:21 +00:00
Vindicus999 acf6cc03d0 Merge remote-tracking branch 'upstream/master' 2025-08-03 11:13:42 +00:00
Vindicus999 0e2d46c152 Merge remote-tracking branch 'upstream/master' 2025-08-02 11:13:31 +00:00
Vindicus999 ea5d3b4185 Merge remote-tracking branch 'upstream/master' 2025-07-31 11:14:26 +00:00
Just some guy c0a8df2a60 2025-07-30 23:16:17 +00:00
Vindicus999 4bb40296fc Updated patches 2025-07-30 18:47:12 -04:00
Just some guy c34e8c6961 2025-07-30 22:24:12 +00:00
Vindicus999 1999e953dd Flipped the ray 2025-07-30 18:23:36 -04:00
Vindicus999 40f83a2b60 Fixed a line 2025-07-30 18:20:33 -04:00
Vindicus999 8af5b3eb29 feat: enable XR_FB_body_tracking
copied from commit 2b654c0
2025-07-30 18:14:51 -04:00
Vindicus999 3485593e56 Merge branch 'master' into sneed 2025-07-30 18:00:20 -04:00
Vindicus999 6c3563904c Update ray.png 2025-07-30 17:56:47 -04:00
Vindicus999 66435957bb Add a last improvement 2025-07-30 17:56:47 -04:00
Vindicus999 1550a346c3 Update patches 2025-07-30 17:56:47 -04:00
Vindicus999 4fd6d6d816 Update CMakeLists.txt 2025-07-30 17:56:47 -04:00
Tool Man be2027ce9a Adding solarxr patches
Remove potential statistics
2025-07-30 17:56:47 -04:00
Vindicus999 fa3313e293 Update Sync.yml 2025-07-30 17:56:47 -04:00
Vindicus999 7e0ea37b3c Update APK-Release.yml 2025-07-30 17:56:47 -04:00
Vindicus999 b0d9bd2ab7 Update Sync.yml 2025-07-30 17:56:47 -04:00
Vindicus999 42755dbb7c Update APK-Release.yml 2025-07-30 17:56:47 -04:00
Vindicus999 b9ff08d893 Update Sync.yml 2025-07-30 17:56:47 -04:00
Vindicus999 b997ff3a17 Update APK-Release.yml 2025-07-30 17:56:47 -04:00
Vindicus999 63aa862a67 Update APK-Release.yml 2025-07-30 17:56:47 -04:00
Vindicus999 52646de23e Update APK-Release.yml 2025-07-30 17:56:47 -04:00
Vindicus999 6e8e78b912 Update APK-Release.yml 2025-07-30 17:56:47 -04:00
Vindicus999 a7a56d0873 Update APK-Release.yml 2025-07-30 17:56:47 -04:00
Vindicus999 59a241de63 Update APK-Release.yml 2025-07-30 17:56:47 -04:00
Vindicus999 4740848ca5 Update APK-Release.yml 2025-07-30 17:56:47 -04:00
Vindicus999 651c9d5a0f Update APK-Release.yml 2025-07-30 17:56:47 -04:00
Vindicus999 bc5d80a13a Update APK-Release.yml 2025-07-30 17:56:47 -04:00
Vindicus999 b1db340227 Update APK-Release.yml 2025-07-30 17:56:47 -04:00
Vindicus999 8377d617cf Update APK-Release.yml 2025-07-30 17:56:47 -04:00
Vindicus999 f94e46ed24 Update APK-Release.yml 2025-07-30 17:56:47 -04:00
Vindicus999 aa1f3b39bd Create pull.yml 2025-07-30 17:56:47 -04:00
Tool Man 680dd34529 Create pull.yml 2025-07-30 17:56:47 -04:00
Just some guy f301ba393a Merge branch 'WiVRn:master' into sneed 2025-06-20 22:13:36 +00:00
Just some guy 0ccc8b6239 Merge branch 'WiVRn:master' into sneed 2025-06-15 19:41:44 +00:00
Vindicus999 adcf159916 Update ray.png 2025-05-26 18:36:33 -04:00
Vindicus999 4125cad44e Add a last improvement 2025-05-16 18:39:23 -04:00
Vindicus999 6969e5f972 Update patches 2025-05-16 18:29:29 -04:00
Vindicus999 d0250abbc9 Update CMakeLists.txt 2025-05-15 23:00:09 -04:00
Tool Man 7485cd0880 Adding solarxr patches
Remove potential statistics
2025-05-15 22:20:37 -04:00
71 changed files with 4761 additions and 3304 deletions
+3 -1
View File
@@ -2,7 +2,7 @@ name: Release APK Only
on:
push:
branches: [ "apk-build" ]
branches: [ "master" ]
env:
BUILD_TYPE: RelWithDebInfo
@@ -112,10 +112,12 @@ jobs:
# - name: Rename APK artifacts
# run: |
# cd apk
# ls
# for f in *.apk; do
# BASENAME=`echo ${f}|awk -F '-APK-' '{print $2}'`
# mv "${f}" "org.meumeu.wivrn-${BASENAME}"
# done
# ls
- name: Download APK debug artifacts
uses: actions/download-artifact@v4
+1
View File
@@ -34,6 +34,7 @@ jobs:
- name: Install dependencies
run: >
sudo apt-get update && sudo apt-get install libvulkan-dev libcjson-dev libx264-dev libavcodec-dev libavutil-dev libswscale-dev libavfilter-dev libbsd-dev libavahi-client-dev libavahi-glib-dev libeigen3-dev glslang-tools libudev-dev libwayland-dev libx11-xcb-dev libxrandr-dev libxcb-randr0-dev libgl-dev libglx-dev mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev libsystemd-dev libva-dev nlohmann-json3-dev libpulse-dev xz-utils libpipewire-0.3-dev libcli11-dev libboost-all-dev librsvg2-bin libssl-dev libnotify-dev librsvg2-dev libarchive-dev
- name: Prepare Vulkan SDK
uses: humbletim/setup-vulkan-sdk@286ed76c72de45dbf50c515779cf4ca2f6aa3944
with:
+2 -10
View File
@@ -24,19 +24,11 @@ jobs:
- name: Checkout stuff
uses: actions/checkout@master
- name: Merge master -> apk-build
uses: devmasx/merge-branch@master
with:
type: now
from_branch: master
target_branch: apk-build
github_token: ${{ env.WORKFLOW_TOKEN }}
- name: Merge sneed -> apk-build
- name: Merge sneed -> master
uses: devmasx/merge-branch@master
with:
type: now
from_branch: sneed
target_branch: apk-build
target_branch: master
github_token: ${{ env.WORKFLOW_TOKEN }}
+2 -2
View File
@@ -43,12 +43,12 @@ option(WIVRN_USE_X264 "Enable x264 software encoder" ON)
option(WIVRN_USE_PIPEWIRE "Enable pipewire backend" ON)
option(WIVRN_USE_PULSEAUDIO "Enable pulseaudio backend" OFF)
set(OVR_COMPAT_SEARCH_PATH "/opt/xrizer:/usr/local/lib/OpenComposite:/usr/lib/OpenComposite:/opt/OpenComposite:/opt/opencomposite"
set(OVR_COMPAT_SEARCH_PATH "/usr/local/lib/OpenComposite:/usr/lib/OpenComposite:/opt/OpenComposite:/opt/opencomposite:/opt/xrizer"
CACHE STRING "List of places to search for the OpenVR compatibility layer, separated by :")
option(WIVRN_FEATURE_DEBUG_GUI "Enable Monado debug GUI" OFF)
option(WIVRN_FEATURE_RENDERDOC "Support renderdoc" OFF)
set(WIVRN_FEATURE_SOLARXR OFF) # Will be added back when merged in upstream Monado
option(WIVRN_FEATURE_SOLARXR "Enable SolarXR driver" OFF)
option(WIVRN_FEATURE_STEAMVR_LIGHTHOUSE "Enable SteamVR Lighthouse driver" OFF)
option(WIVRN_CHECK_CAPSYSNICE "Check if CAP_SYS_NICE is available at startup" ON)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 930 B

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 581 B

After

Width:  |  Height:  |  Size: 292 B

+1 -15
View File
@@ -236,14 +236,8 @@ add_custom_command(OUTPUT ${ASSETS_DIR}/wivrn.png
COMMAND ${RSVG_CONVERT} ${IMG_SRC_DIR}/wivrn.svg -w 540 -h 540 -o ${ASSETS_DIR}/wivrn.png ${RSVG_OPTS}
DEPENDS ${IMG_SRC_DIR}/wivrn.svg ${WIVRN_CSS_ABS})
add_custom_command(OUTPUT ${ASSETS_DIR}/wivrn-pride.png
COMMAND ${RSVG_CONVERT} ${IMG_SRC_DIR}/wivrn-pride.svg -w 540 -h 540 -o ${ASSETS_DIR}/wivrn-pride.png ${RSVG_OPTS}
DEPENDS ${IMG_SRC_DIR}/wivrn-pride.svg ${WIVRN_CSS_ABS})
add_custom_target(assets ALL DEPENDS
${ASSETS_DIR}/wivrn.png
${ASSETS_DIR}/wivrn-pride.png
)
${ASSETS_DIR}/wivrn.png)
add_dependencies(wivrn assets)
@@ -252,13 +246,6 @@ if(ANDROID)
add_custom_command(OUTPUT ${ASSETS_DIR}/wivrn.ktx2
COMMAND ${TOKTX} --encode astc --astc_blk_d 4x4 --astc_quality 100 --genmipmap ${ASSETS_DIR}/wivrn.ktx2 ${ASSETS_DIR}/wivrn.png
DEPENDS ${ASSETS_DIR}/wivrn.png)
add_custom_command(OUTPUT ${ASSETS_DIR}/wivrn-pride.ktx2
COMMAND ${TOKTX} --encode astc --astc_blk_d 4x4 --astc_quality 100 --genmipmap ${ASSETS_DIR}/wivrn-pride.ktx2 ${ASSETS_DIR}/wivrn-pride.png
DEPENDS ${ASSETS_DIR}/wivrn-pride.png)
add_custom_command(OUTPUT ${ASSETS_DIR}/default_icon.ktx2
COMMAND ${TOKTX} --encode astc --astc_blk_d 4x4 --astc_quality 100 --genmipmap ${ASSETS_DIR}/wivrn-pride.ktx2 ${ASSETS_DIR}/default_icon.png
DEPENDS ${ASSETS_DIR}/default_icon.png)
add_custom_command(OUTPUT ${ASSETS_DIR}/WoodFloor051_1K-JPG_Color.ktx2
COMMAND ${TOKTX} --encode astc --astc_blk_d 12x12 --astc_quality 100 --genmipmap ${ASSETS_DIR}/WoodFloor051_1K-JPG_Color.ktx2 ${AST_SRC_DIR}/WoodFloor051_1K-JPG_Color.jpg
@@ -270,7 +257,6 @@ if(ANDROID)
add_custom_target(assets-android ALL DEPENDS
${ASSETS_DIR}/wivrn.ktx2
${ASSETS_DIR}/wivrn-pride.ktx2
${ASSETS_DIR}/WoodFloor051_1K-JPG_Color.ktx2
${ASSETS_DIR}/vr_splash.png
)
+17 -11
View File
@@ -759,12 +759,13 @@ void application::initialize_vulkan()
spdlog::info(" {} (version {})", extension_name, spec_version);
vk_device_extensions.push_back(VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME);
vk_device_extensions.push_back(VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME);
optional_device_extensions.emplace(VK_IMG_FILTER_CUBIC_EXTENSION_NAME);
optional_device_extensions.emplace(VK_KHR_TIMELINE_SEMAPHORE_EXTENSION_NAME);
optional_device_extensions.emplace(VK_KHR_CREATE_RENDERPASS_2_EXTENSION_NAME);
optional_device_extensions.emplace(VK_KHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME);
#ifdef __ANDROID__
vk_device_extensions.push_back(VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME);
vk_device_extensions.push_back(VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME);
vk_device_extensions.push_back(VK_KHR_EXTERNAL_MEMORY_EXTENSION_NAME);
vk_device_extensions.push_back(VK_EXT_QUEUE_FAMILY_FOREIGN_EXTENSION_NAME);
vk_device_extensions.push_back(VK_KHR_DEDICATED_ALLOCATION_EXTENSION_NAME);
@@ -879,23 +880,28 @@ void application::initialize_vulkan()
.ppEnabledExtensionNames = vk_device_extensions.data(),
.pEnabledFeatures = &device_features,
},
vk::PhysicalDeviceFragmentShadingRateFeaturesKHR{},
#ifdef __ANDROID__
vk::PhysicalDeviceSamplerYcbcrConversionFeaturesKHR{
.samplerYcbcrConversion = true,
},
vk::PhysicalDeviceTimelineSemaphoreFeaturesKHR{
.timelineSemaphore = true,
.samplerYcbcrConversion = VK_TRUE,
},
#endif
};
if (utils::contains(vk_device_extensions, VK_KHR_TIMELINE_SEMAPHORE_EXTENSION_NAME))
if (utils::contains(vk_device_extensions, VK_KHR_CREATE_RENDERPASS_2_EXTENSION_NAME) and
utils::contains(vk_device_extensions, VK_KHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME))
{
auto [_, feat] = vk_physical_device.getFeatures2<vk::PhysicalDeviceFeatures2, vk::PhysicalDeviceTimelineSemaphoreFeaturesKHR>();
auto & create_feat = device_create_info.get<vk::PhysicalDeviceTimelineSemaphoreFeaturesKHR>();
create_feat.timelineSemaphore = feat.timelineSemaphore;
auto [feat, fragment_feat] = vk_physical_device.getFeatures2<vk::PhysicalDeviceFeatures2, vk::PhysicalDeviceFragmentShadingRateFeaturesKHR>();
auto & create_feat = device_create_info.get<vk::PhysicalDeviceFragmentShadingRateFeaturesKHR>();
create_feat.primitiveFragmentShadingRate = fragment_feat.primitiveFragmentShadingRate;
create_feat.attachmentFragmentShadingRate = fragment_feat.attachmentFragmentShadingRate;
spdlog::info("Fragment shading rate features: primitive={} attachment={}",
create_feat.primitiveFragmentShadingRate,
create_feat.attachmentFragmentShadingRate);
}
else
{
device_create_info.unlink<vk::PhysicalDeviceTimelineSemaphoreFeaturesKHR>();
device_create_info.unlink<vk::PhysicalDeviceFragmentShadingRateFeaturesKHR>();
}
vk_device = xr_system_id.create_device(vk_physical_device, device_create_info.get());
+1 -3
View File
@@ -59,8 +59,6 @@ const char * mime(wivrn::video_codec codec)
return "video/hevc";
case c::av1:
return "video/av01";
case c::raw:
break;
}
assert(false);
__builtin_unreachable();
@@ -564,7 +562,7 @@ static bool hardware_accelerated(AMediaCodec * media_codec)
void decoder::supported_codecs(std::vector<wivrn::video_codec> & result)
{
// Make sure we update this code when codecs are changed
static_assert(magic_enum::enum_count<wivrn::video_codec>() == 4);
static_assert(magic_enum::enum_count<wivrn::video_codec>() == 3);
// In order or preference, from preferred to least preferred
for (auto codec: {
+15 -34
View File
@@ -23,54 +23,36 @@
#else
#include "decoder/ffmpeg/ffmpeg_decoder.h"
#endif
#include "decoder/raw_decoder.h"
wivrn::decoder::~decoder() = default;
std::shared_ptr<wivrn::decoder> wivrn::decoder::make(
vk::raii::Device & device,
vk::raii::PhysicalDevice & phys_dev,
uint32_t vk_queue_family_index,
const wivrn::to_headset::video_stream_description::item & description,
float fps,
uint8_t stream_index,
std::weak_ptr<scenes::stream> scene,
shard_accumulator * acc)
{
switch (description.codec)
{
case h264:
case h265:
case av1:
#ifdef __ANDROID__
return std::make_shared<wivrn::android::decoder>(
device,
phys_dev,
description,
fps,
stream_index,
scene,
acc);
return std::make_shared<wivrn::android::decoder>(
device,
phys_dev,
description,
fps,
stream_index,
scene,
acc);
#else
return std::make_shared<wivrn::ffmpeg::decoder>(
device,
phys_dev,
description,
stream_index,
scene,
acc);
return std::make_shared<wivrn::ffmpeg::decoder>(
device,
phys_dev,
description,
stream_index,
scene,
acc);
#endif
case raw:
return std::make_shared<wivrn::raw_decoder>(
device,
phys_dev,
vk_queue_family_index,
description,
stream_index,
scene,
acc);
}
__builtin_unreachable();
}
std::vector<wivrn::video_codec> wivrn::decoder::supported_codecs()
@@ -81,6 +63,5 @@ std::vector<wivrn::video_codec> wivrn::decoder::supported_codecs()
#else
ffmpeg::decoder::supported_codecs(res);
#endif
res.push_back(video_codec::raw);
return res;
}
-3
View File
@@ -43,8 +43,6 @@ public:
vk::ImageView image_view = nullptr;
vk::Image image = nullptr;
vk::ImageLayout & current_layout;
vk::Semaphore semaphore = nullptr;
uint64_t * semaphore_val = nullptr;
};
const wivrn::to_headset::video_stream_description::item description;
@@ -58,7 +56,6 @@ public:
static std::shared_ptr<decoder> make(
vk::raii::Device &,
vk::raii::PhysicalDevice &,
uint32_t vk_queue_family_index,
const wivrn::to_headset::video_stream_description::item & description,
float fps,
uint8_t stream_index,
-2
View File
@@ -56,8 +56,6 @@ static AVCodecID codec_id(wivrn::video_codec codec)
return AV_CODEC_ID_HEVC;
case c::av1:
return AV_CODEC_ID_AV1;
case c::raw:
break;
}
assert(false);
__builtin_unreachable();
-353
View File
@@ -1,353 +0,0 @@
/*
* WiVRn VR streaming
* Copyright (C) 2025 Patrick Nicolas <patricknicolas@laposte.net>
*
* 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
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "raw_decoder.h"
#include "application.h"
#include "scenes/stream.h"
namespace
{
struct raw_blit_handle : public wivrn::decoder::blit_handle
{
std::atomic_bool & free;
raw_blit_handle(
const wivrn::from_headset::feedback & feedback,
const wivrn::to_headset::video_stream_data_shard::view_info_t & view_info,
vk::ImageView image_view,
vk::Image image,
vk::ImageLayout & current_layout,
vk::Semaphore semaphore,
uint64_t & semaphore_val,
std::atomic_bool & free) :
wivrn::decoder::blit_handle{feedback, view_info, image_view, image, current_layout, semaphore, &semaphore_val},
free(free) {}
~raw_blit_handle()
{
free = true;
};
};
vk::raii::Sampler make_sampler(
vk::raii::Device & device,
vk::raii::SamplerYcbcrConversion & ycbcr_conversion,
to_headset::video_stream_description::channels_t channels)
{
vk::StructureChain info{
vk::SamplerCreateInfo{
.magFilter = vk::Filter::eNearest,
.minFilter = vk::Filter::eNearest,
.mipmapMode = vk::SamplerMipmapMode::eNearest,
.addressModeU = vk::SamplerAddressMode::eClampToEdge,
.addressModeV = vk::SamplerAddressMode::eClampToEdge,
.addressModeW = vk::SamplerAddressMode::eClampToEdge,
.maxAnisotropy = 1,
},
vk::SamplerYcbcrConversionInfo{
.conversion = *ycbcr_conversion,
},
};
switch (channels)
{
case wivrn::to_headset::video_stream_description::channels_t::colour:
break;
case wivrn::to_headset::video_stream_description::channels_t::alpha:
info.unlink<vk::SamplerYcbcrConversionInfo>();
break;
}
return vk::raii::Sampler(device, info.get());
}
} // namespace
namespace wivrn
{
raw_decoder::raw_decoder(
vk::raii::Device & device,
vk::raii::PhysicalDevice & physical_device,
uint32_t vk_queue_family_index,
const wivrn::to_headset::video_stream_description::item & description,
uint8_t stream_index,
std::weak_ptr<scenes::stream> scene,
shard_accumulator * accumulator) :
decoder(description),
device(device),
ycbcr_conversion(device,
{
.format = vk::Format::eG8B8R82Plane420Unorm,
.ycbcrModel = vk::SamplerYcbcrModelConversion(description.color_model.value_or(VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709)),
.ycbcrRange = vk::SamplerYcbcrRange(description.range.value_or(VK_SAMPLER_YCBCR_RANGE_ITU_FULL)),
.chromaFilter = vk::Filter::eNearest,
}),
sampler_(make_sampler(device, ycbcr_conversion, description.channels)),
command_pool(device, vk::CommandPoolCreateInfo{
.flags = vk::CommandPoolCreateFlagBits::eResetCommandBuffer,
.queueFamilyIndex = vk_queue_family_index,
}),
cmd(device.allocateCommandBuffers(vk::CommandBufferAllocateInfo{
.commandPool = *command_pool,
.commandBufferCount = 1,
})[0]
.release()),
fence(device, vk::FenceCreateInfo{.flags = vk::FenceCreateFlagBits::eSignaled}),
weak_scene(scene),
accumulator(accumulator)
{
extent_ = vk::Extent2D{
.width = description.width,
.height = description.height,
};
vk::DeviceSize buffer_size = description.width * description.height;
vk::Format format{};
switch (description.channels)
{
case to_headset::video_stream_description::channels_t::colour:
buffer_size += (description.width * description.height) / 2;
format = vk::Format::eG8B8R82Plane420Unorm;
break;
case to_headset::video_stream_description::channels_t::alpha:
format = vk::Format::eR8Unorm;
break;
}
for (auto & i: input)
{
i = buffer_allocation(
device,
{
.size = buffer_size,
.usage = vk::BufferUsageFlagBits::eTransferSrc,
},
{
.flags = VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT,
.usage = VMA_MEMORY_USAGE_AUTO,
},
"raw stream buffer");
}
input_pos = (uint8_t *)input[0].map();
for (auto & item: image_pool)
{
item.image = image_allocation(
device,
vk::ImageCreateInfo{
.imageType = vk::ImageType::e2D,
.format = format,
.extent = {
.width = description.width,
.height = description.height,
.depth = 1,
},
.mipLevels = 1,
.arrayLayers = 1,
.tiling = vk::ImageTiling::eOptimal,
.usage = vk::ImageUsageFlagBits::eSampled | vk::ImageUsageFlagBits::eTransferDst,
},
{
.usage = VMA_MEMORY_USAGE_AUTO,
},
"raw image");
vk::SamplerYcbcrConversionInfo conv{
.conversion = *ycbcr_conversion,
};
vk::ImageViewCreateInfo view_info{
.pNext = format == vk::Format::eG8B8R82Plane420Unorm ? &conv : nullptr,
.image = item.image,
.viewType = vk::ImageViewType::e2D,
.format = format,
.subresourceRange = {
.aspectMask = vk::ImageAspectFlagBits::eColor,
.levelCount = 1,
.layerCount = 1,
},
};
item.view_full = vk::raii::ImageView(device, view_info);
item.semaphore = vk::raii::Semaphore(
device,
vk::StructureChain{
vk::SemaphoreCreateInfo{},
vk::SemaphoreTypeCreateInfo{
.semaphoreType = vk::SemaphoreType::eTimeline,
},
}
.get());
}
}
void raw_decoder::push_data(std::span<std::span<const uint8_t>> data, uint64_t frame_index, bool partial)
{
if (frame_index != current_frame)
{
input_pos = (uint8_t *)input[0].map();
current_frame = frame_index;
}
for (const auto & item: data)
{
memcpy(input_pos, item.data(), item.size_bytes());
input_pos += item.size();
}
}
void raw_decoder::frame_completed(
const from_headset::feedback & feedback,
const to_headset::video_stream_data_shard::view_info_t & view_info)
{
auto item = get_free();
if (not item)
{
spdlog::warn("No image available in pool, discard frame");
return;
}
auto handle = std::make_shared<raw_blit_handle>(
feedback,
view_info,
*item->view_full,
item->image,
item->current_layout,
*item->semaphore,
item->semaphore_val,
item->free);
auto res = device.waitForFences(*fence, true, UINT64_MAX);
if (res != vk::Result::eSuccess)
spdlog::warn("waitForFences failed");
cmd.reset();
cmd.begin({.flags = vk::CommandBufferUsageFlagBits::eOneTimeSubmit});
if (item->current_layout != vk::ImageLayout::eTransferDstOptimal)
{
item->current_layout = vk::ImageLayout::eTransferDstOptimal;
vk::ImageMemoryBarrier barrier{
.srcAccessMask = vk::AccessFlagBits::eNone,
.dstAccessMask = vk::AccessFlagBits::eMemoryWrite,
.oldLayout = vk::ImageLayout::eUndefined,
.newLayout = item->current_layout,
.image = item->image,
.subresourceRange = {
.aspectMask = vk::ImageAspectFlagBits::eColor,
.levelCount = 1,
.layerCount = 1,
},
};
cmd.pipelineBarrier(
vk::PipelineStageFlagBits::eAllCommands,
vk::PipelineStageFlagBits::eTransfer,
{},
{},
{},
barrier);
}
std::array regions{
vk::BufferImageCopy{
.imageSubresource = {
.aspectMask = vk::ImageAspectFlagBits::ePlane0,
.layerCount = 1,
},
.imageExtent = {
.width = description.width,
.height = description.height,
.depth = 1,
},
},
vk::BufferImageCopy{
.bufferOffset = vk::DeviceSize(description.width * description.height),
.imageSubresource = {
.aspectMask = vk::ImageAspectFlagBits::ePlane1,
.layerCount = 1,
},
.imageExtent = {
.width = description.width / 2u,
.height = description.height / 2u,
.depth = 1,
},
},
};
cmd.copyBufferToImage(
input[0],
item->image,
item->current_layout,
description.channels == to_headset::video_stream_description::channels_t::colour ? 2 : 1,
regions.data());
vk::ImageMemoryBarrier barrier{
.srcAccessMask = vk::AccessFlagBits::eMemoryWrite,
.dstAccessMask = vk::AccessFlagBits::eMemoryRead,
.oldLayout = item->current_layout,
.newLayout = vk::ImageLayout::eShaderReadOnlyOptimal,
.image = item->image,
.subresourceRange = {
.aspectMask = vk::ImageAspectFlagBits::eColor,
.levelCount = 1,
.layerCount = 1,
},
};
item->current_layout = barrier.newLayout;
cmd.pipelineBarrier(
vk::PipelineStageFlagBits::eTransfer,
vk::PipelineStageFlagBits::eFragmentShader,
{},
{},
{},
barrier);
cmd.end();
device.resetFences(*fence);
application::get_queue().lock()->submit(
vk::StructureChain{
vk::SubmitInfo{
.commandBufferCount = 1,
.pCommandBuffers = &cmd,
.signalSemaphoreCount = 1,
.pSignalSemaphores = &*item->semaphore,
},
vk::TimelineSemaphoreSubmitInfo{
.signalSemaphoreValueCount = 1,
.pSignalSemaphoreValues = &++item->semaphore_val,
},
}
.get(),
*fence);
if (auto scene = weak_scene.lock())
scene->push_blit_handle(accumulator, std::move(handle));
std::swap(input[0], input[1]);
input_pos = (uint8_t *)input[0].map();
}
raw_decoder::image * raw_decoder::get_free()
{
for (auto & item: image_pool)
{
if (item.free.exchange(false))
return &item;
}
return nullptr;
}
std::vector<wivrn::video_codec> raw_decoder::supported_codecs()
{
return {video_codec::raw};
}
} // namespace wivrn
-96
View File
@@ -1,96 +0,0 @@
/*
* WiVRn VR streaming
* Copyright (C) 2025 Patrick Nicolas <patricknicolas@laposte.net>
*
* 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
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#pragma once
#include "decoder.h"
#include "vk/allocation.h"
#include <atomic>
namespace wivrn
{
class raw_decoder : public decoder
{
private:
static const int image_count = 5;
struct image
{
image_allocation image;
vk::raii::ImageView view_full = nullptr;
vk::ImageLayout current_layout = vk::ImageLayout::eUndefined;
std::atomic_bool free = true;
vk::raii::Semaphore semaphore = nullptr;
uint64_t semaphore_val = 0;
};
vk::raii::Device & device;
vk::raii::SamplerYcbcrConversion ycbcr_conversion;
vk::raii::Sampler sampler_;
vk::raii::CommandPool command_pool;
vk::CommandBuffer cmd;
vk::raii::Fence fence;
std::array<image, image_count> image_pool;
std::weak_ptr<scenes::stream> weak_scene;
shard_accumulator * accumulator;
uint64_t current_frame = 0;
std::array<buffer_allocation, 2> input;
uint8_t * input_pos;
from_headset::feedback feedback;
to_headset::video_stream_data_shard::view_info_t view_info;
public:
raw_decoder(vk::raii::Device & device,
vk::raii::PhysicalDevice & physical_device,
uint32_t vk_queue_family_index,
const wivrn::to_headset::video_stream_description::item & description,
uint8_t stream_index,
std::weak_ptr<scenes::stream> scene,
shard_accumulator * accumulator);
void push_data(std::span<std::span<const uint8_t>> data, uint64_t frame_index, bool partial) override;
void frame_completed(
const wivrn::from_headset::feedback & feedback,
const wivrn::to_headset::video_stream_data_shard::view_info_t & view_info) override;
vk::Sampler sampler() override
{
return *sampler_;
}
vk::Extent2D image_size()
{
return {
description.width,
description.height,
};
}
static std::vector<wivrn::video_codec> supported_codecs();
private:
image * get_free();
};
} // namespace wivrn
+1 -2
View File
@@ -80,12 +80,11 @@ public:
vk::raii::Device & device,
vk::raii::PhysicalDevice & physical_device,
xr::instance & instance,
uint32_t vk_queue_family_index,
const wivrn::to_headset::video_stream_description::item & description,
float fps,
std::weak_ptr<scenes::stream> scene,
uint8_t stream_index) :
decoder_(decoder::make(device, physical_device, vk_queue_family_index, description, fps, stream_index, scene, this)),
decoder_(decoder::make(device, physical_device, description, fps, stream_index, scene, this)),
current(stream_index),
next(stream_index),
weak_scene(scene),
+32 -112
View File
@@ -16,7 +16,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#define IMGUI_DEFINE_MATH_OPERATORS
#include "imgui_impl.h"
#include "implot.h"
@@ -26,7 +25,6 @@
#include "image_loader.h"
#include "openxr/openxr.h"
#include "utils/ranges.h"
#include "utils/strings.h"
#include "vulkan/vulkan_enums.hpp"
#include "vulkan/vulkan_handles.hpp"
#include "vulkan/vulkan_to_string.hpp"
@@ -45,6 +43,8 @@
#include <spdlog/spdlog.h>
#include <string_view>
#include "IconsFontAwesome6.h"
#ifdef __ANDROID__
#include <android/font.h>
#include <android/font_matcher.h>
@@ -178,31 +178,6 @@ static float distance_to_window(ImGuiWindow * window, ImVec2 position)
return std::hypot(dx, dy);
}
static const std::array layout_bindings = {
vk::DescriptorSetLayoutBinding{
.binding = 0,
.descriptorType = vk::DescriptorType::eCombinedImageSampler,
.descriptorCount = 1,
.stageFlags = vk::ShaderStageFlagBits::eFragment,
}};
imgui_textures::imgui_textures(
vk::raii::PhysicalDevice physical_device,
vk::raii::Device & device,
uint32_t queue_family_index,
thread_safe<vk::raii::Queue> & queue) :
physical_device(physical_device),
device(device),
queue(queue),
ds_layout(device, vk::DescriptorSetLayoutCreateInfo{.bindingCount = layout_bindings.size(), .pBindings = layout_bindings.data()}),
command_pool(device,
vk::CommandPoolCreateInfo{
.flags = vk::CommandPoolCreateFlagBits::eResetCommandBuffer | vk::CommandPoolCreateFlagBits::eTransient,
.queueFamilyIndex = queue_family_index,
}),
descriptor_pool(device, ds_layout, layout_bindings)
{}
std::vector<std::pair<ImVec2, float>> imgui_context::ray_plane_intersection(const imgui_context::controller_state & in) const
{
if (!in.active)
@@ -314,6 +289,14 @@ imgui_context::imgui_frame & imgui_context::get_frame(vk::Image destination)
return frame;
}
static const std::array layout_bindings = {
vk::DescriptorSetLayoutBinding{
.binding = 0,
.descriptorType = vk::DescriptorType::eCombinedImageSampler,
.descriptorCount = 1,
.stageFlags = vk::ShaderStageFlagBits::eFragment,
}};
imgui_context::imgui_context(
vk::raii::PhysicalDevice physical_device,
vk::raii::Device & device,
@@ -322,13 +305,18 @@ imgui_context::imgui_context(
std::span<controller> controllers_,
xr::swapchain & swapchain,
std::vector<viewport> layers) :
imgui_textures(
physical_device,
device,
queue_family_index,
queue),
physical_device(physical_device),
device(device),
queue_family_index(queue_family_index),
queue(queue),
ds_layout(device, vk::DescriptorSetLayoutCreateInfo{.bindingCount = layout_bindings.size(), .pBindings = layout_bindings.data()}),
descriptor_pool(device, ds_layout, layout_bindings),
renderpass(create_renderpass(device, swapchain.format(), true)),
command_pool(device,
vk::CommandPoolCreateInfo{
.flags = vk::CommandPoolCreateFlagBits::eResetCommandBuffer | vk::CommandPoolCreateFlagBits::eTransient,
.queueFamilyIndex = queue_family_index,
}),
command_buffers(swapchain.images().size()),
size(swapchain.extent().width, swapchain.extent().height),
format(swapchain.format()),
@@ -1032,12 +1020,12 @@ imgui_context::~imgui_context()
ImGui::DestroyContext(context);
}
ImTextureID imgui_textures::load_texture(const std::string & filename, vk::raii::Sampler && sampler)
ImTextureID imgui_context::load_texture(const std::string & filename, vk::raii::Sampler && sampler)
{
return load_texture(std::span<const std::byte>{asset{filename}}, std::move(sampler));
}
ImTextureID imgui_textures::load_texture(const std::span<const std::byte> & bytes, vk::raii::Sampler && sampler)
ImTextureID imgui_context::load_texture(const std::span<const std::byte> & bytes, vk::raii::Sampler && sampler)
{
bool srgb = true;
image_loader loader(physical_device, device, queue, command_pool);
@@ -1073,7 +1061,7 @@ ImTextureID imgui_textures::load_texture(const std::span<const std::byte> & byte
return id;
}
ImTextureID imgui_textures::load_texture(const std::span<const std::byte> & bytes)
ImTextureID imgui_context::load_texture(const std::span<const std::byte> & bytes)
{
return load_texture(
bytes,
@@ -1091,7 +1079,7 @@ ImTextureID imgui_textures::load_texture(const std::span<const std::byte> & byte
});
}
ImTextureID imgui_textures::load_texture(const std::string & filename)
ImTextureID imgui_context::load_texture(const std::string & filename)
{
return load_texture(
filename,
@@ -1109,8 +1097,15 @@ ImTextureID imgui_textures::load_texture(const std::string & filename)
});
}
void imgui_textures::free_texture(ImTextureID texture)
void imgui_context::free_texture(ImTextureID texture)
{
// Make sure we are done using the texture
std::vector<vk::Fence> fences;
for (auto & f: command_buffers)
fences.push_back(*f.fence);
if (auto result = device.waitForFences(fences, true, 1'000'000'000); result != vk::Result::eSuccess)
spdlog::error("vkWaitForfences: {}", vk::to_string(result));
textures.erase(texture);
}
@@ -1187,78 +1182,3 @@ void imgui_context::tooltip(std::string_view text)
viewport->Pos = pos_backup;
viewport->Size = size_backup;
}
// https://github.com/ocornut/imgui/issues/3379#issuecomment-2943903877
void ScrollWhenDragging()
{
ImVec2 delta{0.0f, -ImGui::GetIO().MouseDelta.y};
const ImGuiMouseButton mouse_button = ImGuiMouseButton_Left;
ImGuiContext & g = *ImGui::GetCurrentContext();
ImGuiWindow * window = g.CurrentWindow;
ImGuiID id = window->GetID("##scrolldraggingoverlay");
ImGui::KeepAliveID(id);
static int active_id;
static ImVec2 cumulated_delta;
bool HoveredIdAllowOverlap_backup = std::exchange(g.HoveredIdAllowOverlap, true);
bool ActiveIdAllowOverlap_backup = std::exchange(g.ActiveIdAllowOverlap, true);
if (active_id == 0 and ImGui::ItemHoverable(window->Rect(), 0, g.CurrentItemFlags) and ImGui::IsMouseClicked(mouse_button, ImGuiInputFlags_None, /*id*/ ImGuiKeyOwner_Any))
{
active_id = id;
// Don't scroll on the first step, in case the active controller just changed
delta = {};
cumulated_delta = {};
}
if (not g.IO.MouseDown[mouse_button])
active_id = 0;
if (active_id == id)
{
if (delta.x != 0.0f)
ImGui::SetScrollX(window, window->Scroll.x + delta.x);
if (delta.y != 0.0f)
ImGui::SetScrollY(window, window->Scroll.y + delta.y);
cumulated_delta += delta;
if (std::max(std::abs(cumulated_delta.x), std::abs(cumulated_delta.y)) > 50)
ImGui::ClearActiveID();
}
g.HoveredIdAllowOverlap = HoveredIdAllowOverlap_backup;
g.ActiveIdAllowOverlap = ActiveIdAllowOverlap_backup;
}
void CenterTextH(const std::string & text)
{
float win_width = ImGui::GetWindowSize().x;
float text_width = ImGui::CalcTextSize(text.c_str()).x;
ImGui::SetCursorPosX((win_width - text_width) / 2);
ImGui::Text("%s", text.c_str());
}
void CenterTextHV(const std::string & text)
{
ImVec2 size = ImGui::GetWindowSize();
std::vector<std::string> lines = utils::split(text);
float text_height = 0;
for (const auto & i: lines)
text_height += ImGui::CalcTextSize(i.c_str()).y;
ImGui::SetCursorPosY((size.y - text_height) / 2);
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, {0, 0});
for (const auto & i: lines)
{
float text_width = ImGui::CalcTextSize(i.c_str()).x;
ImGui::SetCursorPosX((size.x - text_width) / 2);
ImGui::Text("%s", i.c_str());
}
ImGui::PopStyleVar();
}
+21 -38
View File
@@ -36,40 +36,7 @@
#include <vulkan/vulkan_raii.hpp>
#include <openxr/openxr.h>
class imgui_textures
{
struct texture_data
{
vk::raii::Sampler sampler;
std::shared_ptr<vk::raii::ImageView> image_view;
std::shared_ptr<vk::raii::DescriptorSet> descriptor_set;
};
protected:
vk::raii::PhysicalDevice physical_device;
vk::raii::Device & device;
thread_safe<vk::raii::Queue> & queue;
vk::raii::DescriptorSetLayout ds_layout;
vk::raii::CommandPool command_pool;
private:
growable_descriptor_pool descriptor_pool;
std::unordered_map<ImTextureID, texture_data> textures;
public:
imgui_textures(
vk::raii::PhysicalDevice physical_device,
vk::raii::Device & device,
uint32_t queue_family_index,
thread_safe<vk::raii::Queue> & queue);
ImTextureID load_texture(const std::string & filename, vk::raii::Sampler && sampler);
ImTextureID load_texture(const std::string & filename);
ImTextureID load_texture(const std::span<const std::byte> & bytes, vk::raii::Sampler && sampler);
ImTextureID load_texture(const std::span<const std::byte> & bytes);
void free_texture(ImTextureID);
};
class imgui_context : public imgui_textures
class imgui_context
{
struct command_buffer
{
@@ -77,6 +44,13 @@ class imgui_context : public imgui_textures
vk::raii::Fence fence = nullptr;
};
struct texture_data
{
vk::raii::Sampler sampler;
std::shared_ptr<vk::raii::ImageView> image_view;
std::shared_ptr<vk::raii::DescriptorSet> descriptor_set;
};
public:
struct imgui_frame
{
@@ -143,10 +117,18 @@ public:
};
private:
vk::raii::PhysicalDevice physical_device;
vk::raii::Device & device;
uint32_t queue_family_index;
thread_safe<vk::raii::Queue> & queue;
vk::raii::Pipeline pipeline = nullptr;
vk::raii::DescriptorSetLayout ds_layout;
growable_descriptor_pool descriptor_pool;
vk::raii::RenderPass renderpass;
vk::raii::CommandPool command_pool;
std::unordered_map<ImTextureID, texture_data> textures;
std::vector<imgui_frame> frames;
imgui_frame & get_frame(vk::Image destination);
@@ -225,6 +207,11 @@ public:
// Convert position from viewport coordinates to real-world
glm::vec3 rw_from_vp(const ImVec2 & position);
ImTextureID load_texture(const std::string & filename, vk::raii::Sampler && sampler);
ImTextureID load_texture(const std::string & filename);
ImTextureID load_texture(const std::span<const std::byte> & bytes, vk::raii::Sampler && sampler);
ImTextureID load_texture(const std::span<const std::byte> & bytes);
void free_texture(ImTextureID);
void set_current();
bool is_modal_popup_shown() const;
@@ -234,7 +221,3 @@ public:
void set_controllers_enabled(bool value);
void tooltip(std::string_view text);
};
void ScrollWhenDragging();
void CenterTextH(const std::string & text);
void CenterTextHV(const std::string & text);
+1 -1
View File
@@ -47,8 +47,8 @@ scene::scene(key, const meta & current_meta, std::span<const vk::Format> support
device(application::instance().vk_device),
physical_device(application::instance().vk_physical_device),
queue(application::instance().vk_queue),
queue_family_index(application::instance().vk_queue_family_index),
commandpool(application::instance().vk_cmdpool),
queue_family_index(application::instance().vk_queue_family_index),
current_meta(current_meta)
{
swapchain_format = vk::Format::eUndefined;
+1 -4
View File
@@ -86,15 +86,12 @@ protected:
XrViewConfigurationType viewconfig;
bool focused = false;
public:
vk::raii::Instance & vk_instance;
vk::raii::Device & device;
vk::raii::PhysicalDevice & physical_device;
thread_safe<vk::raii::Queue> & queue;
uint32_t queue_family_index;
protected:
vk::raii::CommandPool & commandpool;
uint32_t queue_family_index;
const meta & current_meta;
-284
View File
@@ -1,284 +0,0 @@
/*
* WiVRn VR streaming
* Copyright (C) 2025 Guillaume Meunier <guillaume.meunier@centraliens.net>
* Copyright (C) 2025 Patrick Nicolas <patricknicolas@laposte.net>
*
* 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
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#define IMGUI_DEFINE_MATH_OPERATORS
#include "app_launcher.h"
#include "constants.h"
#include "imgui.h"
#include "imgui_internal.h"
#include "scenes/stream.h"
#include "utils/i18n.h"
#include "utils/ranges.h"
#include <imspinner.h>
#include <spdlog/fmt/fmt.h>
#include <uni_algo/case.h>
using namespace std::chrono_literals;
// Display a button with an image and a text centred horizontally
static bool icon(
const std::string & text,
ImTextureRef tex_ref,
const ImVec2 & image_size,
ImGuiButtonFlags flags = 0,
const ImVec2 & size_arg = ImVec2(0, 0),
const ImVec2 & uv0 = ImVec2(0, 0),
const ImVec2 & uv1 = ImVec2(1, 1),
const ImVec4 & tint_col = ImVec4(1, 1, 1, 1))
{
// Based on ImGui::ButtonEx and ImGui::ImageButtonEx
ImGuiWindow * window = ImGui::GetCurrentWindow();
const ImGuiStyle & style = ImGui::GetStyle();
if (window->SkipItems)
return false;
const ImVec2 label_size = ImGui::CalcTextSize(text.c_str(), nullptr, true);
ImVec2 size = ImGui::CalcItemSize(
size_arg,
std::max(image_size.x, label_size.x) + style.FramePadding.x * 2.0f,
image_size.y + style.ItemInnerSpacing.y + label_size.y + style.FramePadding.y * 2.0f);
const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + size);
ImRect image_pos(
{(bb.Min.x + bb.Max.x - image_size.x) / 2, bb.Min.y + style.FramePadding.y},
{(bb.Min.x + bb.Max.x + image_size.x) / 2, bb.Min.y + style.FramePadding.y + image_size.y});
ImRect label_pos(
{bb.Min.x + style.FramePadding.x, image_pos.Max.y + style.ItemInnerSpacing.y},
{bb.Max.x - style.FramePadding.x, bb.Max.y - style.FramePadding.y});
ImGui::ItemSize(bb);
ImGuiID id = window->GetID(text.c_str());
if (!ImGui::ItemAdd(bb, id))
return false;
bool hovered, held;
bool pressed = ImGui::ButtonBehavior(bb, id, &hovered, &held, flags);
// Render
const ImU32 col = ImGui::GetColorU32((held && hovered) ? ImGuiCol_ButtonActive : hovered ? ImGuiCol_ButtonHovered
: ImGuiCol_Button);
ImGui::RenderNavCursor(bb, id);
ImGui::RenderFrame(bb.Min, bb.Max, col, true, style.FrameRounding);
window->DrawList->AddImage(tex_ref, image_pos.Min, image_pos.Max, uv0, uv1, ImGui::GetColorU32(tint_col));
ImGui::RenderTextClipped(label_pos.Min, label_pos.Max, text.c_str(), NULL, &label_size, style.ButtonTextAlign, &bb);
return pressed;
}
app_launcher::app_launcher(
scenes::stream & stream,
std::string server_name) :
server_name(std::move(server_name)),
stream(stream),
textures(
stream.physical_device,
stream.device,
stream.queue_family_index,
stream.queue)
{
try
{
default_icon = textures.load_texture("default_icon.ktx2");
}
catch (...)
{
default_icon = textures.load_texture("default_icon.png");
}
}
app_launcher::~app_launcher()
{
stream.device.waitIdle();
for (const auto & [app_id, app_icon]: app_icons)
textures.free_texture(app_icon);
textures.free_texture(default_icon);
}
app_launcher::clicked app_launcher::draw_gui(imgui_context & imgui_ctx, const std::string & cancel)
{
auto res = clicked::None;
auto t0 = std::chrono::steady_clock::now();
bool app_starting = start_time != std::chrono::steady_clock::time_point{} and
t0 - start_time < 10s and
stream.current_state() != scenes::stream::state::streaming;
auto cancel_size = ImGui::CalcTextSize(cancel.c_str());
auto apps = applications.lock();
ImGui::PushFont(nullptr, constants::gui::font_size_large);
if (server_name.empty())
CenterTextH(_("Connected to WiVRn server"));
else
CenterTextH(fmt::format(_F("Connected to {}"), server_name));
ImGui::PopFont();
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, {20, 20});
if (apps->empty())
{
CenterTextHV(_("Start an application on the server to start streaming."));
}
else
{
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, {20, 0});
ImGui::BeginDisabled(app_starting);
ImGui::BeginChild("Main", ImGui::GetWindowSize() - ImGui::GetCursorPos() - ImVec2(0, cancel_size.y + 80), 0, app_starting ? ImGuiWindowFlags_NoScrollWithMouse : 0);
ImGui::Indent(20);
if (server_name.empty())
ImGui::Text("%s", _S("Start an application on your computer or select one to start streaming."));
else
ImGui::Text("%s", fmt::format(_F("Start an application on {} or select one to start streaming."), server_name).c_str());
ImGui::Unindent();
float icon_width = 400;
float icon_spacing = ImGui::GetStyle().ItemSpacing.x;
float usable_window_width = ImGui::GetWindowSize().x - ImGui::GetCurrentWindow()->ScrollbarSizes.x;
int icons_per_line = (usable_window_width + icon_spacing) / (icon_width + icon_spacing);
float icon_line_width = icons_per_line * icon_width + (icons_per_line - 1) * icon_spacing;
ImGui::Indent((usable_window_width - icon_line_width) / 2);
for (const auto [index, app]: utils::enumerate(*apps))
{
ImTextureID texture = [&]() -> ImTextureID {
if (app.image.empty())
return default_icon;
else
{
auto it = app_icons.find(app.id);
if (it == app_icons.end())
{
// Don't load too many textures at the same time to keep the GUI responsive
if (std::chrono::steady_clock::now() - t0 > 10ms)
return default_icon;
try
{
it = app_icons.emplace(app.id, textures.load_texture(app.image)).first;
}
catch (std::exception & e)
{
spdlog::warn("Unable to load icon for \"{}\": {}", app.id, e.what());
app.image.clear();
return default_icon;
}
}
return it->second;
}
}();
ImGui::PushStyleColor(ImGuiCol_Button, 0);
if (icon(app.name + "##" + app.id, texture, {256, 256}, ImGuiButtonFlags_PressedOnClickRelease, {icon_width, 0}))
{
res = clicked::Start;
start_time = t0;
stream.start_application(app.id);
}
imgui_ctx.vibrate_on_hover();
ImGui::PopStyleColor(); // ImGuiCol_Button
if ((index + 1) % icons_per_line)
ImGui::SameLine();
}
ImGui::Unindent();
std::vector<std::pair<std::string, ImTextureID>> to_be_removed;
for (const auto & [app_id, app_icon]: app_icons)
{
if (not std::ranges::contains(*apps, app_id, &app::id))
to_be_removed.emplace_back(app_id, app_icon);
}
for (const auto & [app_id, app_icon]: to_be_removed)
{
imgui_ctx.free_texture(app_icon);
app_icons.erase(app_id);
}
ScrollWhenDragging();
ImGui::EndChild();
ImGui::EndDisabled();
if (app_starting)
{
ImGui::SetCursorPos(ImGui::GetWindowSize() / 2 - ImVec2{200, 200} - ImGui::GetStyle().FramePadding);
ImSpinner::SpinnerAng("App starting spinner",
200, // Radius
40, // Thickness
ImColor{1.f, 1.f, 1.f, 1.f}, // Colour
ImColor{1.f, 1.f, 1.f, 0.f}, // Background
6, // Velocity
0.75f * 2 * M_PI // Angle
);
}
ImGui::PopStyleVar(); // ImGuiStyleVar_WindowPadding
}
ImGui::PopStyleVar();
ImGui::SetCursorPos(ImGui::GetWindowSize() - cancel_size - ImVec2{50, 50});
ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding, 10);
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, {10, 10});
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0.8f, 0.2f, 0.2f, 0.40f));
ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(0.8f, 0.2f, 0.2f, 1.00f));
ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4(1.0f, 0.1f, 0.1f, 1.00f));
if (ImGui::Button(cancel.c_str()))
res = clicked::Cancel;
imgui_ctx.vibrate_on_hover();
ImGui::PopStyleColor(3); // ImGuiCol_Button, ImGuiCol_ButtonHovered, ImGuiCol_ButtonActive
ImGui::PopStyleVar(2);
return res;
}
void app_launcher::operator()(to_headset::application_list && apps)
{
std::ranges::sort(apps.applications, [](auto & l, auto & r) {
return una::casesens::collate_utf8(l.name, r.name) < 0;
});
auto locked = applications.lock();
locked->clear();
locked->reserve(apps.applications.size());
for (const auto & i: apps.applications)
{
locked->push_back(app{
.id = std::move(i.id),
.name = std::move(i.name),
});
}
}
void app_launcher::operator()(to_headset::application_icon && icon)
{
auto locked = applications.lock();
if (auto it = std::ranges::find(*locked, icon.id, &app::id); it != locked->end())
it->image = std::move(icon.image);
}
-65
View File
@@ -1,65 +0,0 @@
/*
* WiVRn VR streaming
* Copyright (C) 2025 Guillaume Meunier <guillaume.meunier@centraliens.net>
* Copyright (C) 2025 Patrick Nicolas <patricknicolas@laposte.net>
*
* 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
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#pragma once
#include "imgui.h"
#include "render/imgui_impl.h"
#include "wivrn_packets.h"
#include <chrono>
#include <unordered_map>
namespace scenes
{
class stream;
}
class app_launcher
{
struct app
{
std::string id;
std::string name;
std::vector<std::byte> image;
};
std::chrono::steady_clock::time_point start_time{};
std::string server_name;
scenes::stream & stream;
imgui_textures textures;
ImTextureID default_icon;
std::unordered_map<std::string, ImTextureID> app_icons;
// Last application list received from server
thread_safe<std::vector<app>> applications;
public:
app_launcher(scenes::stream &, std::string server_name);
~app_launcher();
enum clicked
{
None,
Cancel,
Start,
};
// cancel: text to display on the quit/disconnect/cancel button
clicked draw_gui(imgui_context &, const std::string & cancel);
void operator()(wivrn::to_headset::application_list && apps);
void operator()(wivrn::to_headset::application_icon && icon);
};
+14 -6
View File
@@ -572,7 +572,7 @@ void scenes::lobby::render(const XrFrameState & frame_state)
{
auto session = async_session.get();
if (session)
next_scene = stream::create(std::move(session), 1'000'000'000.f / frame_state.predictedDisplayPeriod, server_name);
next_scene = stream::create(std::move(session), 1'000'000'000.f / frame_state.predictedDisplayPeriod);
async_session.reset();
}
@@ -909,11 +909,8 @@ void scenes::lobby::on_focused()
swapchain_imgui = xr::swapchain(session, device, swapchain_format, 3000, 1300);
imgui_ctx.emplace(physical_device, device, queue_family_index, queue, imgui_inputs, swapchain_imgui, vps);
auto t = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now());
auto tm = std::localtime(&t);
std::string image = tm->tm_mon == 5 ? "wivrn-pride" : "wivrn";
std::string image;
image = "wivrn";
try
{
about_picture = imgui_ctx->load_texture(image + ".ktx2");
@@ -923,6 +920,15 @@ void scenes::lobby::on_focused()
about_picture = imgui_ctx->load_texture(image + ".png");
}
try
{
default_icon = imgui_ctx->load_texture("default_icon.ktx2");
}
catch (...)
{
default_icon = imgui_ctx->load_texture("default_icon.png");
}
setup_passthrough();
session.set_refresh_rate(application::get_config().preferred_refresh_rate.value_or(0));
multicast = application::get_wifi_lock().get_multicast_lock();
@@ -943,6 +949,8 @@ void scenes::lobby::on_unfocused()
renderer->wait_idle(); // Must be before the scene data because the renderer uses its descriptor sets
about_picture = 0;
default_icon = 0;
app_icons.clear();
imgui_ctx.reset();
world.clear(); // Must be cleared before the renderer so that the descriptor sets are freed before their pools
+3
View File
@@ -127,6 +127,9 @@ class lobby : public scene_impl<lobby>
tab last_current_tab = tab::server_list;
int optional_feature_index = 0; // Which step of the first run screen are we in
ImTextureID about_picture;
ImTextureID default_icon;
std::unordered_map<std::string, ImTextureID> app_icons;
std::optional<XrTime> timestamp_start_application;
virtual_keyboard keyboard;
+261 -2
View File
@@ -30,13 +30,15 @@
#include "imgui.h"
#include "imgui_internal.h"
#include "lobby.h"
#include "scenes/stream.h"
#include "stream.h"
#include "utils/i18n.h"
#include "utils/overloaded.h"
#include "utils/ranges.h"
#include "version.h"
#include "xr/body_tracker.h"
#include <algorithm>
#include <cassert>
#include <chrono>
#include <filesystem>
#include <glm/gtc/quaternion.hpp>
#include <imspinner.h>
@@ -50,6 +52,81 @@
using namespace std::chrono_literals;
// https://github.com/ocornut/imgui/issues/3379#issuecomment-2943903877
static void ScrollWhenDragging()
{
ImVec2 delta{0.0f, -ImGui::GetIO().MouseDelta.y};
const ImGuiMouseButton mouse_button = ImGuiMouseButton_Left;
ImGuiContext & g = *ImGui::GetCurrentContext();
ImGuiWindow * window = g.CurrentWindow;
ImGuiID id = window->GetID("##scrolldraggingoverlay");
ImGui::KeepAliveID(id);
static int active_id;
static ImVec2 cumulated_delta;
bool HoveredIdAllowOverlap_backup = std::exchange(g.HoveredIdAllowOverlap, true);
bool ActiveIdAllowOverlap_backup = std::exchange(g.ActiveIdAllowOverlap, true);
if (active_id == 0 and ImGui::ItemHoverable(window->Rect(), 0, g.CurrentItemFlags) and ImGui::IsMouseClicked(mouse_button, ImGuiInputFlags_None, /*id*/ ImGuiKeyOwner_Any))
{
active_id = id;
// Don't scroll on the first step, in case the active controller just changed
delta = {};
cumulated_delta = {};
}
if (not g.IO.MouseDown[mouse_button])
active_id = 0;
if (active_id == id)
{
if (delta.x != 0.0f)
ImGui::SetScrollX(window, window->Scroll.x + delta.x);
if (delta.y != 0.0f)
ImGui::SetScrollY(window, window->Scroll.y + delta.y);
cumulated_delta += delta;
if (std::max(std::abs(cumulated_delta.x), std::abs(cumulated_delta.y)) > 50)
ImGui::ClearActiveID();
}
g.HoveredIdAllowOverlap = HoveredIdAllowOverlap_backup;
g.ActiveIdAllowOverlap = ActiveIdAllowOverlap_backup;
}
static void CenterTextH(const std::string & text)
{
float win_width = ImGui::GetWindowSize().x;
float text_width = ImGui::CalcTextSize(text.c_str()).x;
ImGui::SetCursorPosX((win_width - text_width) / 2);
ImGui::Text("%s", text.c_str());
}
static void CenterTextHV(const std::string & text)
{
ImVec2 size = ImGui::GetWindowSize();
std::vector<std::string> lines = utils::split(text);
float text_height = 0;
for (const auto & i: lines)
text_height += ImGui::CalcTextSize(i.c_str()).y;
ImGui::SetCursorPosY((size.y - text_height) / 2);
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, {0, 0});
for (const auto & i: lines)
{
float text_width = ImGui::CalcTextSize(i.c_str()).x;
ImGui::SetCursorPosX((size.x - text_width) / 2);
ImGui::Text("%s", i.c_str());
}
ImGui::PopStyleVar();
}
static void InputText(const char * label, std::string & text, const ImVec2 & size, ImGuiInputTextFlags flags)
{
auto callback = [](ImGuiInputTextCallbackData * data) -> int {
@@ -98,6 +175,54 @@ static void display_recentering_tip(imgui_context & ctx, const std::string & tip
ImGui::PopFont();
}
// Display a button with an image and a text centred horizontally
static bool icon(const std::string & text, ImTextureRef tex_ref, const ImVec2 & image_size, ImGuiButtonFlags flags = 0, const ImVec2 & size_arg = ImVec2(0, 0), const ImVec2 & uv0 = ImVec2(0, 0), const ImVec2 & uv1 = ImVec2(1, 1), const ImVec4 & tint_col = ImVec4(1, 1, 1, 1))
{
// Based on ImGui::ButtonEx and ImGui::ImageButtonEx
ImGuiWindow * window = ImGui::GetCurrentWindow();
const ImGuiStyle & style = ImGui::GetStyle();
if (window->SkipItems)
return false;
const ImVec2 label_size = ImGui::CalcTextSize(text.c_str(), nullptr, true);
ImVec2 size = ImGui::CalcItemSize(
size_arg,
std::max(image_size.x, label_size.x) + style.FramePadding.x * 2.0f,
image_size.y + style.ItemInnerSpacing.y + label_size.y + style.FramePadding.y * 2.0f);
const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + size);
ImRect image_pos(
{(bb.Min.x + bb.Max.x - image_size.x) / 2, bb.Min.y + style.FramePadding.y},
{(bb.Min.x + bb.Max.x + image_size.x) / 2, bb.Min.y + style.FramePadding.y + image_size.y});
ImRect label_pos(
{bb.Min.x + style.FramePadding.x, image_pos.Max.y + style.ItemInnerSpacing.y},
{bb.Max.x - style.FramePadding.x, bb.Max.y - style.FramePadding.y});
ImGui::ItemSize(bb);
ImGuiID id = window->GetID(text.c_str());
if (!ImGui::ItemAdd(bb, id))
return false;
bool hovered, held;
bool pressed = ImGui::ButtonBehavior(bb, id, &hovered, &held, flags);
// Render
const ImU32 col = ImGui::GetColorU32((held && hovered) ? ImGuiCol_ButtonActive : hovered ? ImGuiCol_ButtonHovered
: ImGuiCol_Button);
ImGui::RenderNavCursor(bb, id);
ImGui::RenderFrame(bb.Min, bb.Max, col, true, style.FrameRounding);
window->DrawList->AddImage(tex_ref, image_pos.Min, image_pos.Max, uv0, uv1, ImGui::GetColorU32(tint_col));
ImGui::RenderTextClipped(label_pos.Min, label_pos.Max, text.c_str(), NULL, &label_size, style.ButtonTextAlign, &bb);
return pressed;
}
std::string openxr_post_processing_flag_name(XrCompositionLayerSettingsFlagsFB flag)
{
switch (flag)
@@ -123,6 +248,7 @@ void scenes::lobby::gui_connecting(locked_notifiable<pin_request_data> & pin_req
if (next_scene)
{
current_tab = tab::connected;
timestamp_start_application.reset();
ImGui::CloseCurrentPopup();
return;
}
@@ -258,14 +384,144 @@ void scenes::lobby::gui_connected(XrTime predicted_display_time)
if (not next_scene)
{
current_tab = tab::server_list;
for (const auto & [app_id, app_icon]: app_icons)
imgui_ctx->free_texture(app_icon);
app_icons.clear();
return;
}
if (next_scene->apps.draw_gui(*imgui_ctx, _("Disconnect")) == app_launcher::Cancel)
ImGui::PushFont(nullptr, constants::gui::font_size_large);
if (server_name.empty())
CenterTextH(_("Connected to WiVRn server"));
else
CenterTextH(fmt::format(_F("Connected to {}"), server_name));
ImGui::PopFont();
auto disconnect = _("Disconnect");
auto disconnect_size = ImGui::CalcTextSize(disconnect.c_str());
auto apps = next_scene->get_applications();
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, {20, 20});
if (apps->empty())
{
CenterTextHV(_("Start an application on the server to start streaming."));
}
else
{
bool app_starting = timestamp_start_application and (predicted_display_time - *timestamp_start_application < 10'000'000'000);
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, {20, 0});
ImGui::BeginDisabled(app_starting);
ImGui::BeginChild("Main", ImGui::GetWindowSize() - ImGui::GetCursorPos() - ImVec2(0, disconnect_size.y + 80), 0, app_starting ? ImGuiWindowFlags_NoScrollWithMouse : 0);
ImGui::Indent(20);
if (server_name.empty())
ImGui::Text("%s", _S("Start an application on your computer or select one to start streaming."));
else
ImGui::Text("%s", fmt::format(_F("Start an application on {} or select one to start streaming."), server_name).c_str());
ImGui::Unindent();
float icon_width = 400;
float icon_spacing = ImGui::GetStyle().ItemSpacing.x;
float usable_window_width = ImGui::GetWindowSize().x - ImGui::GetCurrentWindow()->ScrollbarSizes.x;
int icons_per_line = (usable_window_width + icon_spacing) / (icon_width + icon_spacing);
float icon_line_width = icons_per_line * icon_width + (icons_per_line - 1) * icon_spacing;
ImGui::Indent((usable_window_width - icon_line_width) / 2);
auto t0 = std::chrono::steady_clock::now();
for (const auto [index, app]: utils::enumerate(*apps))
{
ImTextureID texture = [&]() -> ImTextureID {
if (app.image.empty())
return default_icon;
else
{
auto it = app_icons.find(app.id);
if (it == app_icons.end())
{
// Don't load too many textures at the same time to keep the GUI responsive
if (std::chrono::steady_clock::now() - t0 > 10ms)
return default_icon;
try
{
it = app_icons.emplace(app.id, imgui_ctx->load_texture(app.image)).first;
}
catch (std::exception & e)
{
spdlog::warn("Unable to load icon for \"{}\": {}", app.id, e.what());
app.image.clear();
return default_icon;
}
}
return it->second;
}
}();
ImGui::PushStyleColor(ImGuiCol_Button, 0);
if (icon(app.name + "##" + app.id, texture, {256, 256}, ImGuiButtonFlags_PressedOnClickRelease, {icon_width, 0}))
{
timestamp_start_application = predicted_display_time;
next_scene->start_application(app.id);
}
imgui_ctx->vibrate_on_hover();
ImGui::PopStyleColor(); // ImGuiCol_Button
if (index % 3 != 2)
ImGui::SameLine();
}
ImGui::Unindent();
std::vector<std::pair<std::string, ImTextureID>> to_be_removed;
for (const auto & [app_id, app_icon]: app_icons)
{
if (not std::ranges::contains(*apps, app_id, &scenes::stream::app::id))
to_be_removed.emplace_back(app_id, app_icon);
}
for (const auto & [app_id, app_icon]: to_be_removed)
{
imgui_ctx->free_texture(app_icon);
app_icons.erase(app_id);
}
ScrollWhenDragging();
ImGui::EndChild();
ImGui::EndDisabled();
if (app_starting)
{
ImGui::SetCursorPos(ImGui::GetWindowSize() / 2 - ImVec2{200, 200} - ImGui::GetStyle().FramePadding);
ImSpinner::SpinnerAng("App starting spinner",
200, // Radius
40, // Thickness
ImColor{1.f, 1.f, 1.f, 1.f}, // Colour
ImColor{1.f, 1.f, 1.f, 0.f}, // Background
6, // Velocity
0.75f * 2 * M_PI // Angle
);
}
ImGui::PopStyleVar(); // ImGuiStyleVar_WindowPadding
}
ImGui::PopStyleVar();
ImGui::SetCursorPos(ImGui::GetWindowSize() - disconnect_size - ImVec2{50, 50});
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0.8f, 0.2f, 0.2f, 0.40f));
ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(0.8f, 0.2f, 0.2f, 1.00f));
ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4(1.0f, 0.1f, 0.1f, 1.00f));
if (ImGui::Button(disconnect.c_str()))
{
next_scene.reset();
current_tab = tab::server_list;
}
imgui_ctx->vibrate_on_hover();
ImGui::PopStyleColor(3); // ImGuiCol_Button, ImGuiCol_ButtonHovered, ImGuiCol_ButtonActive
}
void scenes::lobby::gui_new_server()
@@ -975,6 +1231,9 @@ void scenes::lobby::gui_about()
ImGui::SetCursorPosX(win_width / 4);
ImGui::Image(about_picture, {win_width / 2, win_width / 2});
ImGui::PushFont(nullptr, constants::gui::font_size_large);
CenterTextH(std::string("Sneed'n'Chuck Edition"));
ImGui::PopFont();
}
void scenes::lobby::gui_first_run()
+5 -35
View File
@@ -151,9 +151,8 @@ static const std::array supported_depth_formats{
vk::Format::eX8D24UnormPack32,
};
scenes::stream::stream(std::string server_name) :
scenes::stream::stream() :
scene_impl<stream>(supported_color_formats, supported_depth_formats),
apps{*this, std::move(server_name)},
blitters{blitter(device, 0), blitter(device, 1)}
{
}
@@ -186,9 +185,9 @@ static from_headset::visibility_mask_changed::masks get_visibility_mask(xr::inst
return res;
}
std::shared_ptr<scenes::stream> scenes::stream::create(std::unique_ptr<wivrn_session> network_session, float guessed_fps, std::string server_name)
std::shared_ptr<scenes::stream> scenes::stream::create(std::unique_ptr<wivrn_session> network_session, float guessed_fps)
{
std::shared_ptr<stream> self{new stream{std::move(server_name)}};
std::shared_ptr<stream> self{new stream};
self->network_session = std::move(network_session);
self->network_session->send_control([&]() {
@@ -731,8 +730,6 @@ bool scenes::stream::is_gui_interactable() const
case gui_status::stats:
case gui_status::settings:
case gui_status::foveation_settings:
case gui_status::applications:
case gui_status::application_launcher:
return true;
case gui_status::hidden:
@@ -780,7 +777,6 @@ void scenes::stream::render(const XrFrameState & frame_state)
.variant = application::get_messages_info().variant,
});
gui_status = stream::gui_status::hidden;
application::pop_scene();
}
@@ -931,28 +927,6 @@ void scenes::stream::render(const XrFrameState & frame_state)
command_buffer.end();
vk::SubmitInfo submit_info;
submit_info.setCommandBuffers(*command_buffer);
std::vector<vk::Semaphore> semaphores;
std::vector<uint64_t> semaphore_vals;
std::vector<vk::PipelineStageFlags> wait_stages;
for (auto b: current_blit_handles)
{
if (b and b->semaphore)
{
assert(b->semaphore_val);
semaphores.push_back(b->semaphore);
semaphore_vals.push_back(*b->semaphore_val);
wait_stages.push_back(vk::PipelineStageFlagBits::eFragmentShader);
}
}
submit_info.setWaitDstStageMask(wait_stages);
submit_info.setWaitSemaphores(semaphores);
vk::TimelineSemaphoreSubmitInfo sem_info{
.waitSemaphoreValueCount = uint32_t(semaphore_vals.size()),
.pWaitSemaphoreValues = semaphore_vals.data(),
};
submit_info.pNext = &sem_info;
queue.lock()->submit(submit_info, *fence);
#if WIVRN_FEATURE_RENDERDOC
renderdoc_end(*vk_instance);
@@ -1004,8 +978,6 @@ void scenes::stream::render(const XrFrameState & frame_state)
break;
case gui_status::stats:
case gui_status::settings:
case gui_status::applications:
case gui_status::application_launcher:
dimming = dimming + frame_state.predictedDisplayPeriod / (1e9 * constants::stream::fade_duration);
break;
}
@@ -1091,14 +1063,12 @@ void scenes::stream::render(const XrFrameState & frame_state)
case gui_status::hidden:
case gui_status::compact:
case gui_status::overlay_only:
gui_status = next_gui_status;
gui_status = gui_status::stats;
break;
case gui_status::stats:
case gui_status::settings:
case gui_status::foveation_settings:
case gui_status::applications:
case gui_status::application_launcher:
gui_status = gui_status::hidden;
break;
}
@@ -1135,7 +1105,7 @@ void scenes::stream::setup(const to_headset::video_stream_description & descript
spdlog::info("Creating decoder size {}x{} offset {},{}", item.width, item.height, item.offset_x, item.offset_y);
decoders.push_back(accumulator_images{
.decoder = std::make_unique<shard_accumulator>(device, physical_device, instance, queue_family_index, item, description.fps, shared_from_this(), stream_index),
.decoder = std::make_unique<shard_accumulator>(device, physical_device, instance, item, description.fps, shared_from_this(), stream_index),
});
}
}
+16 -15
View File
@@ -19,7 +19,6 @@
#pragma once
#include "app_launcher.h"
#include "audio/audio.h"
#include "decoder/shard_accumulator.h"
#include "render/imgui_impl.h"
@@ -50,7 +49,12 @@ public:
};
static const size_t image_buffer_size = 3;
app_launcher apps;
struct app
{
std::string id;
std::string name;
std::vector<std::byte> image;
};
private:
static const size_t view_count = 2;
@@ -132,16 +136,13 @@ private:
compact,
stats,
settings,
foveation_settings,
applications,
application_launcher,
foveation_settings
};
bool is_gui_interactable() const;
std::atomic<gui_status> gui_status = gui_status::hidden;
enum gui_status last_gui_status = gui_status::hidden;
enum gui_status next_gui_status = gui_status::stats;
XrTime gui_status_last_change;
float dimming = 0;
@@ -169,18 +170,15 @@ private:
// Keep a reference to the resources needed to blit the images until vkWaitForFences
std::vector<std::shared_ptr<wivrn::shard_accumulator::blit_handle>> current_blit_handles;
XrTime running_application_req = 0;
thread_safe<to_headset::running_applications> running_applications;
// Last application list received from server
thread_safe<std::vector<app>> applications;
stream(std::string server_name);
stream();
public:
~stream();
static std::shared_ptr<stream> create(
std::unique_ptr<wivrn_session> session,
float guessed_fps,
std::string server_name);
static std::shared_ptr<stream> create(std::unique_ptr<wivrn_session> session, float guessed_fps);
void render(const XrFrameState &) override;
void on_focused() override;
@@ -200,7 +198,6 @@ public:
void operator()(to_headset::refresh_rate_change &&);
void operator()(to_headset::application_list &&);
void operator()(to_headset::application_icon &&);
void operator()(to_headset::running_applications &&);
void operator()(audio_data &&);
void push_blit_handle(wivrn::shard_accumulator * decoder, std::shared_ptr<wivrn::shard_accumulator::blit_handle> handle);
@@ -217,6 +214,11 @@ public:
return !exiting;
}
auto get_applications()
{
return applications.lock();
}
void start_application(std::string appid);
static meta & get_meta_scene();
@@ -303,7 +305,6 @@ private:
void gui_compact_view();
void gui_settings();
void gui_foveation_settings(float predicted_display_period);
void gui_applications();
void draw_gui(XrTime predicted_display_time, XrDuration predicted_display_period);
};
} // namespace scenes
+74 -5
View File
@@ -19,6 +19,7 @@
#include "stream_defoveator.h"
#include "application.h"
#include "utils/contains.h"
#include "utils/ranges.h"
#include "vk/allocation.h"
#include "vk/pipeline.h"
@@ -35,7 +36,7 @@ struct stream_defoveator::vertex
{
// output image position
alignas(8) glm::vec2 position;
// input texture coordinates
// input texture coordinates + shading rate in the first 4 bits of x
alignas(8) glm::uvec2 uv;
};
@@ -118,9 +119,19 @@ stream_defoveator::pipeline_t & stream_defoveator::ensure_pipeline(size_t view,
target.layout = vk::raii::PipelineLayout(device, pipeline_layout_info);
const auto & vk_device_extensions = application::get_vk_device_extensions();
bool fragment_shading_rate = false;
if (utils::contains(vk_device_extensions, VK_KHR_CREATE_RENDERPASS_2_EXTENSION_NAME) and
utils::contains(vk_device_extensions, VK_KHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME))
{
const auto & [prop, rate_prop] = physical_device.getProperties2<vk::PhysicalDeviceProperties2, vk::PhysicalDeviceFragmentShadingRatePropertiesKHR>();
const auto & [feat, fragment_feat] = physical_device.getFeatures2<vk::PhysicalDeviceFeatures2, vk::PhysicalDeviceFragmentShadingRateFeaturesKHR>();
fragment_shading_rate = rate_prop.fragmentShadingRateNonTrivialCombinerOps and
fragment_feat.primitiveFragmentShadingRate and
fragment_feat.attachmentFragmentShadingRate;
}
// Vertex shader
vk::raii::ShaderModule vertex_shader = load_shader(device, "reprojection.vert");
vk::raii::ShaderModule vertex_shader = load_shader(device, fragment_shading_rate ? "reprojection_vsr.vert" : "reprojection.vert");
// Fragment shader
auto specialization = make_specialization_constants(
@@ -128,7 +139,7 @@ stream_defoveator::pipeline_t & stream_defoveator::ensure_pipeline(size_t view,
VkBool32(need_srgb_conversion(guess_model())));
vk::raii::ShaderModule fragment_shader = load_shader(device, "reprojection.frag");
vk::pipeline_builder pipeline_info{
vk::pipeline_builder pipeline_info_builder{
.flags = {},
.Stages = {
{
@@ -186,6 +197,48 @@ stream_defoveator::pipeline_t & stream_defoveator::ensure_pipeline(size_t view,
.subpass = 0,
};
vk::GraphicsPipelineCreateInfo pipeline_info(pipeline_info_builder);
// Variable fragment shading
std::array combiner{
vk::FragmentShadingRateCombinerOpKHR::eMax,
vk::FragmentShadingRateCombinerOpKHR::eMax,
};
vk::PipelineFragmentShadingRateStateCreateInfoKHR shading{
.fragmentSize = vk::Extent2D{1, 1},
.combinerOps = combiner,
};
if (fragment_shading_rate)
{
pipeline_info.pNext = &shading;
spdlog::info("Available fragment shading rates:");
for (const auto rate: physical_device.getFragmentShadingRatesKHR())
{
if (rate.sampleCounts & vk::SampleCountFlagBits::e1)
{
spdlog::info("\tfragment size: {}x{}", rate.fragmentSize.width, rate.fragmentSize.height);
int flags = 0;
if (rate.fragmentSize.width == 4)
flags |= 8;
else if (rate.fragmentSize.width == 2)
flags |= 4;
if (rate.fragmentSize.height == 4)
flags |= 2;
else if (rate.fragmentSize.height == 2)
flags |= 1;
for (int y = std::bit_width(rate.fragmentSize.height) - 1; y < 3; ++y)
{
for (int x = std::bit_width(rate.fragmentSize.width) - 1; x < 3; ++x)
{
if (fragment_sizes[x][y] == 0)
fragment_sizes[x][y] = flags << 28;
}
}
}
}
}
target.pipeline = device.createGraphicsPipeline(application::get_pipeline_cache(), pipeline_info);
return target;
}
@@ -293,6 +346,21 @@ static size_t required_vertices(const wivrn::to_headset::foveation_parameter & p
return (2 * (p.x.size() + 1) + 1) * p.y.size();
}
uint32_t stream_defoveator::shading_rate(int pixels_x, int pixels_y)
{
int x = 0;
if (pixels_x >= 2)
x = 1;
if (pixels_x >= 4)
x = 2;
int y = 0;
if (pixels_y >= 2)
y = 1;
if (pixels_y >= 4)
y = 2;
return fragment_sizes[x][y];
}
void stream_defoveator::defoveate(vk::raii::CommandBuffer & command_buffer,
const std::array<wivrn::to_headset::foveation_parameter, 2> & foveation,
std::span<wivrn::blitter::output> inputs,
@@ -342,13 +410,14 @@ void stream_defoveator::defoveate(vk::raii::CommandBuffer & command_buffer,
for (auto [ix, n_out_x]: utils::enumerate_range(px))
{
const int ratio_x = std::abs(n_ratio_x - int(ix)) + 1;
glm::uvec2 rate = glm::uvec2(shading_rate(ratio_x, ratio_y), 0);
*vertices++ = {
.position = out * out_pixel_size,
.uv = in,
.uv = in | rate,
};
*vertices++ = {
.position = (out + glm::vec2(0, n_out_y * ratio_y)) * out_pixel_size,
.uv = (in + glm::uvec2(0, n_out_y)),
.uv = (in + glm::uvec2(0, n_out_y)) | rate,
};
in.x += n_out_x;
out.x += n_out_x * ratio_x;
+8
View File
@@ -49,6 +49,13 @@ class stream_defoveator
pipeline_t pipeline_rgb[view_count];
pipeline_t pipeline_a[view_count];
// Allowed sizes for variable shading rate
// indices are for x, y
// 0 is 1 pixel
// 1 is 2 or 3 pixels
// 2 is 4 pixels or more
uint32_t fragment_sizes[3][3] = {};
// Destination images
std::vector<vk::Image> output_images;
std::vector<vk::raii::ImageView> output_image_views;
@@ -58,6 +65,7 @@ class stream_defoveator
void ensure_vertices(size_t num_vertices);
vertex * get_vertices(size_t view);
uint32_t shading_rate(int pixels_x, int pixels_y);
pipeline_t & ensure_pipeline(size_t view, vk::Sampler rgb, vk::Sampler a);
public:
-106
View File
@@ -603,85 +603,6 @@ void scenes::stream::gui_foveation_settings(float predicted_display_period)
});
}
void scenes::stream::gui_applications()
{
auto now = instance.now();
if (now - running_application_req > 1'000'000'000)
{
running_application_req = now;
network_session->send_control(from_headset::get_running_applications{});
}
ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding, 10);
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, {10, 10});
ImGui::PushFont(nullptr, constants::gui::font_size_large);
CenterTextH(_("Running XR applications:"));
ImGui::PopFont();
auto apps = running_applications.lock();
ImVec2 button_size(ImGui::GetWindowSize().x - ImGui::GetCursorPosX() - 20, 0);
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(ImGui::GetStyle().ItemSpacing.x, 20));
ImGui::Spacing();
std::ranges::sort(apps->applications, [](auto & l, auto & r) {
if (l.overlay == r.overlay)
return false;
return r.overlay;
});
bool overlay = false;
for (const auto & app: apps->applications)
{
if (app.overlay and not overlay)
{
ImGui::Separator();
CenterTextH(_S("Overlays"));
overlay = true;
}
int colors = 1;
ImGui::PushStyleColor(ImGuiCol_Button, IM_COL32_BLACK_TRANS);
ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding, 0);
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(10, 20));
if (app.active or app.overlay)
{
ImGui::PushStyleColor(ImGuiCol_ButtonActive, IM_COL32_BLACK_TRANS);
ImGui::PushStyleColor(ImGuiCol_ButtonHovered, IM_COL32_BLACK_TRANS);
colors += 2;
}
ImGui::SetNextItemAllowOverlap();
const bool clicked = RadioButtonWithoutCheckBox(
std::format("{}{}##{}", app.active ? ICON_FA_CHEVRON_RIGHT " " : " ", app.name, app.id).c_str(),
app.active,
button_size);
if (clicked and not(app.active or app.overlay))
{
network_session->send_control(from_headset::set_active_application{.id = app.id});
imgui_ctx->vibrate_on_hover();
}
ImGui::PopStyleColor(colors);
ImGui::PopStyleVar(2);
ImGui::SameLine();
auto right = ImGui::GetWindowSize().x;
ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 10);
ImGui::SetCursorPosX(right - ImGui::CalcTextSize(ICON_FA_XMARK).x - ImGui::GetStyle().FramePadding.x - 40);
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0.8f, 0.2f, 0.2f, 0.40f));
ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(0.8f, 0.2f, 0.2f, 1.00f));
ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4(1.0f, 0.1f, 0.1f, 1.00f));
if (ImGui::Button(std::format(ICON_FA_XMARK "##{}", app.id).c_str()))
network_session->send_control(from_headset::stop_application{.id = app.id});
imgui_ctx->vibrate_on_hover();
ImGui::PopStyleColor(3);
if (ImGui::IsItemHovered())
imgui_ctx->tooltip(_S("Request to quit, may be ignored by the application"));
}
auto btn = _("Start");
ImGui::SetCursorPos(ImGui::GetWindowSize() - ImGui::CalcTextSize(btn.c_str()) - ImVec2(50, 50));
if (ImGui::Button(btn.c_str()))
gui_status = gui_status::application_launcher;
imgui_ctx->vibrate_on_hover();
ImGui::PopStyleVar(3);
}
// Return the vector v such that dot(v, x) > 0 iff x is on the side where the composition layer is visible
static glm::vec4 compute_ray_limits(const XrPosef & pose, float margin = 0)
{
@@ -721,8 +642,6 @@ void scenes::stream::draw_gui(XrTime predicted_display_time, XrDuration predicte
break;
case gui_status::stats:
case gui_status::settings:
case gui_status::applications:
case gui_status::application_launcher:
break;
}
imgui_ctx->set_controllers_enabled(interactable);
@@ -743,8 +662,6 @@ void scenes::stream::draw_gui(XrTime predicted_display_time, XrDuration predicte
if (gui_status != last_gui_status)
{
last_gui_status = gui_status;
if (is_gui_interactable())
next_gui_status = gui_status;
gui_status_last_change = predicted_display_time;
// Override session state if the GUI is interactable
@@ -791,8 +708,6 @@ void scenes::stream::draw_gui(XrTime predicted_display_time, XrDuration predicte
case gui_status::compact:
case gui_status::stats:
case gui_status::settings:
case gui_status::applications:
case gui_status::application_launcher:
imgui_ctx->layers()[0].orientation = head_position->second * head_gui_orientation;
imgui_ctx->layers()[0].position = head_position->first + M * head_gui_position;
break;
@@ -833,18 +748,11 @@ void scenes::stream::draw_gui(XrTime predicted_display_time, XrDuration predicte
case gui_status::stats:
case gui_status::settings:
case gui_status::applications:
ImGui::SetNextWindowPos(margin_around_window);
ImGui::SetNextWindowSize(ImGui::GetMainViewport()->Size - margin_around_window * 2);
always_auto_resize = false;
display_tabs = true;
break;
case gui_status::application_launcher:
ImGui::SetNextWindowPos(margin_around_window);
ImGui::SetNextWindowSize(ImGui::GetMainViewport()->Size - margin_around_window * 2);
always_auto_resize = false;
display_tabs = false;
break;
}
ImGui::PushStyleVar(ImGuiStyleVar_ChildBorderSize, 0);
@@ -896,17 +804,6 @@ void scenes::stream::draw_gui(XrTime predicted_display_time, XrDuration predicte
case gui_status::foveation_settings:
gui_foveation_settings(predicted_display_period * 1.e-9f);
break;
case gui_status::applications:
ImGui::SetCursorPos({tab_width + 20, 20});
ImGui::BeginChild("Main", ImVec2(ImGui::GetWindowSize().x - ImGui::GetCursorPosX(), 0));
gui_applications();
ImGui::EndChild();
break;
case gui_status::application_launcher:
if (apps.draw_gui(*imgui_ctx, _("Cancel")) != app_launcher::None)
gui_status = gui_status::applications;
}
ImGui::PopStyleVar(2); // ImGuiStyleVar_WindowPadding, ImGuiStyleVar_FrameRounding
@@ -925,9 +822,6 @@ void scenes::stream::draw_gui(XrTime predicted_display_time, XrDuration predicte
RadioButtonWithoutCheckBox(ICON_FA_GEARS " " + _("Settings"), gui_status, gui_status::settings, {tab_width, 0});
imgui_ctx->vibrate_on_hover();
RadioButtonWithoutCheckBox(ICON_FA_LIST " " + _("Applications"), gui_status, gui_status::applications, {tab_width, 0});
imgui_ctx->vibrate_on_hover();
int n_items_at_end = 4;
ImGui::SetCursorPosY(ImGui::GetContentRegionMax().y - n_items_at_end * ImGui::GetCurrentContext()->FontSize - (n_items_at_end * 2) * style.FramePadding.y - (n_items_at_end - 1) * style.ItemSpacing.y - style.WindowPadding.y);
+19 -7
View File
@@ -106,19 +106,31 @@ void scenes::stream::send_feedback(const wivrn::from_headset::feedback & feedbac
}
}
void scenes::stream::operator()(to_headset::application_list && l)
void scenes::stream::operator()(to_headset::application_list && apps)
{
apps(std::move(l));
std::ranges::sort(apps.applications, [](auto & l, auto & r) {
return una::casesens::collate_utf8(l.name, r.name) < 0;
});
auto locked = applications.lock();
locked->clear();
locked->reserve(apps.applications.size());
for (const auto & i: apps.applications)
{
locked->push_back(app{
.id = std::move(i.id),
.name = std::move(i.name),
});
}
}
void scenes::stream::operator()(to_headset::application_icon && icon)
{
apps(std::move(icon));
}
auto locked = applications.lock();
void scenes::stream::operator()(to_headset::running_applications && apps)
{
*running_applications.lock() = std::move(apps);
if (auto it = std::ranges::find(*locked, icon.id, &app::id); it != locked->end())
it->image = std::move(icon.image);
}
void scenes::stream::start_application(std::string appid)
+3 -82
View File
@@ -1,83 +1,4 @@
/*
* WiVRn VR streaming
* Copyright (C) 2022 Guillaume Meunier <guillaume.meunier@centraliens.net>
* Copyright (C) 2022 Patrick Nicolas <patricknicolas@laposte.net>
*
* 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
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#version 450
#ifdef VERT_SHADER
layout (location = 0) in vec2 vPosition;
layout (location = 1) in uvec2 vUV;
layout(location = 0) out vec4 outUV;
layout(push_constant) uniform pc
{
ivec4 rgb_rect;
ivec4 a_rect;
};
void main()
{
gl_Position = vec4(vPosition, 0.0, 1.0);
vec2 uv = vUV;
outUV.xy = (uv + rgb_rect.xy) / rgb_rect.zw;
outUV.zw = (uv + a_rect.xy) / a_rect.zw;
}
#endif
#ifdef FRAG_SHADER
layout(constant_id = 0) const int alpha = 1;
layout(constant_id = 1) const bool do_srgb = false;
layout(set = 0, binding = 0) uniform sampler2D rgb[alpha + 1];
layout(location = 0) in vec4 inUV;
layout(location = 0) out vec4 outColor;
float sRGB_to_linear(float x)
{
if (x <= 0.04045)
return x / 12.92;
return pow((x + 0.055) / 1.055, 2.4);
}
vec4 sRGB_to_linear_rgba(vec4 x)
{
return vec4(
sRGB_to_linear(x.r),
sRGB_to_linear(x.g),
sRGB_to_linear(x.b),
x.a);
}
void main()
{
if (alpha == 1)
outColor = vec4(texture(rgb[0], inUV.xy).rgb, texture(rgb[1], inUV.zw).r);
else
outColor = texture(rgb[0], inUV.xy).rgba;
if (do_srgb)
{
outColor = sRGB_to_linear_rgba(outColor);
}
}
#endif
#extension GL_ARB_shading_language_include : require
#define VSR 0
#include "reprojection.glsl.inc"
+92
View File
@@ -0,0 +1,92 @@
/*
* WiVRn VR streaming
* Copyright (C) 2022 Guillaume Meunier <guillaume.meunier@centraliens.net>
* Copyright (C) 2022 Patrick Nicolas <patricknicolas@laposte.net>
*
* 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
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifdef VERT_SHADER
#if VSR
#extension GL_EXT_fragment_shading_rate: enable
#endif
layout (location = 0) in vec2 vPosition;
layout (location = 1) in uvec2 vUV;
layout(location = 0) out vec4 outUV;
layout(push_constant) uniform pc
{
ivec4 rgb_rect;
ivec4 a_rect;
};
void main()
{
gl_Position = vec4(vPosition, 0.0, 1.0);
#if VSR
gl_PrimitiveShadingRateEXT = int(bitfieldExtract(vUV.x, 28, 4));
vec2 uv = bitfieldInsert(vUV, uvec2(0), 28, 4);
#else
vec2 uv = vUV;
#endif
outUV.xy = (uv + rgb_rect.xy) / rgb_rect.zw;
outUV.zw = (uv + a_rect.xy) / a_rect.zw;
}
#endif
#ifdef FRAG_SHADER
layout(constant_id = 0) const int alpha = 1;
layout(constant_id = 1) const bool do_srgb = false;
layout(set = 0, binding = 0) uniform sampler2D rgb[alpha + 1];
layout(location = 0) in vec4 inUV;
layout(location = 0) out vec4 outColor;
float sRGB_to_linear(float x)
{
if (x <= 0.04045)
return x / 12.92;
return pow((x + 0.055) / 1.055, 2.4);
}
vec4 sRGB_to_linear_rgba(vec4 x)
{
return vec4(
sRGB_to_linear(x.r),
sRGB_to_linear(x.g),
sRGB_to_linear(x.b),
x.a);
}
void main()
{
if (alpha == 1)
outColor = vec4(texture(rgb[0], inUV.xy).rgb, texture(rgb[1], inUV.zw).r);
else
outColor = texture(rgb[0], inUV.xy).rgba;
if (do_srgb)
{
outColor = sRGB_to_linear_rgba(outColor);
}
}
#endif
+5
View File
@@ -0,0 +1,5 @@
#version 450
#extension GL_ARB_shading_language_include : require
#define VSR 1
#include "reprojection.glsl.inc"
+3 -34
View File
@@ -41,7 +41,7 @@ namespace wivrn
// Default port for server to listen, both TCP and UDP
static const int default_port = 9757;
static constexpr int protocol_revision = 2;
static constexpr int protocol_revision = 1;
enum class device_id : uint8_t
{
@@ -168,7 +168,6 @@ enum video_codec
h265,
hevc = h265,
av1,
raw,
};
struct audio_data
@@ -235,7 +234,6 @@ struct headset_info_packet
bool hand_tracking;
bool eye_gaze;
bool palm_pose;
bool user_presence;
bool passthrough;
face_type face_tracking;
uint32_t num_generic_trackers;
@@ -462,19 +460,6 @@ struct start_app
std::string app_id;
};
struct get_running_applications
{};
struct set_active_application
{
uint32_t id;
};
struct stop_application
{
uint32_t id;
};
using packets = std::variant<
crypto_handshake,
pin_check_1,
@@ -497,10 +482,7 @@ using packets = std::variant<
user_presence_changed,
override_foveation_center,
get_application_list,
start_app,
get_running_applications,
set_active_application,
stop_application>;
start_app>;
} // namespace from_headset
namespace to_headset
@@ -708,18 +690,6 @@ struct application_icon
std::vector<std::byte> image; // In PNG
};
struct running_applications
{
struct application
{
std::string name;
uint32_t id;
bool overlay;
bool active;
};
std::vector<application> applications;
};
using packets = std::variant<
crypto_handshake,
pin_check_2,
@@ -734,7 +704,6 @@ using packets = std::variant<
tracking_control,
refresh_rate_change,
application_list,
application_icon,
running_applications>;
application_icon>;
} // namespace to_headset
} // namespace wivrn
+2 -2
View File
@@ -61,8 +61,8 @@ Identifier of the encoder, one of
### `codec`
Default value: first supported by both headset and encoder of `av1`, `h264`, `h265`.
One of `h264`, `h265`, `av1`, `raw`.
Not all encoders support every codec, `x264` and `vulkan` only support `h264`. For `raw` codec, only `raw` encoder can be used.
One of `h264`, `h265` or `av1`.
Not all encoders support every codec, `x264` and `vulkan` only support `h264`.
### `width`, `height`, `offset_x`, `offset_y` (advanced)
Default values: full image (`width` = 1, `height` = 1, `offset_x` = 0, `offset_y` = 0)
+5
View File
@@ -35,6 +35,10 @@ finish-args:
# Set the active OpenXR / OpenVR runtime
- --filesystem=xdg-config/openxr:create
- --filesystem=xdg-config/openvr:create
# SlimeVR
- --filesystem=xdg-run/SlimeVRInput
- --filesystem=xdg-run/SlimeVRRpc
- --filesystem=xdg-run/app/dev.slimevr.SlimeVR
# Let outside application access the WiVRn socket
- --filesystem=xdg-run/wivrn:create
- --own-name=io.github.wivrn.Server
@@ -343,6 +347,7 @@ modules:
- -DWIVRN_BUILD_SERVER_LIBRARY=ON
- -DWIVRN_BUILD_DASHBOARD=OFF
- -DWIVRN_BUILD_WIVRNCTL=OFF
- -DWIVRN_FEATURE_SOLARXR=ON
- -DWIVRN_WERROR=ON
- -DFETCHCONTENT_FULLY_DISCONNECTED=ON
- -DFETCHCONTENT_BASE_DIR=deps
File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 158 KiB

+12 -12
View File
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WiVRn-dashboard\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-09-24 07:53+0200\n"
"POT-Creation-Date: 2025-09-12 14:54+0200\n"
"PO-Revision-Date: 2025-08-06 19:20+0200\n"
"Last-Translator: Álvaro De Quinta <blackcherry@danwin1210.de>\n"
"Language-Team: Spanish\n"
@@ -19,47 +19,47 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Gtranslator 48.0\n"
#: dashboard/apk_installer.cpp:165
#: dashboard/apk_installer.cpp:167
#, kde-format
msgid "Downloading APK: %1 MB / %2 MB"
msgstr "Descargando APK: %1 MB / %2 MB"
#: dashboard/apk_installer.cpp:167
#: dashboard/apk_installer.cpp:169
#, kde-format
msgid "Downloading APK: %1 MB"
msgstr "Descargando APK: %1 MB"
#: dashboard/apk_installer.cpp:176
#: dashboard/apk_installer.cpp:178
#, kde-format
msgid "Download cancelled"
msgstr "Descarga cancelada"
#: dashboard/apk_installer.cpp:192
#: dashboard/apk_installer.cpp:194
#, kde-format
msgid "Cannot download APK: %1"
msgstr "No se puede descargar el APK: %1"
#: dashboard/apk_installer.cpp:215
#: dashboard/apk_installer.cpp:217
#, kde-format
msgid "Installing APK"
msgstr "Instalando APK"
#: dashboard/apk_installer.cpp:219
#: dashboard/apk_installer.cpp:221
#, kde-format
msgid "adb failed to start: %1"
msgstr "Error al iniciar adb: %1"
#: dashboard/apk_installer.cpp:229
#: dashboard/apk_installer.cpp:231
#, kde-format
msgid "adb exited abnormally: %1"
msgstr "adb salió anormalmente: %1"
#: dashboard/apk_installer.cpp:237
#: dashboard/apk_installer.cpp:239
#, kde-format
msgid "The 'adb install' command failed: exit code %1"
msgstr "El comando 'adb install' falló: código de salida %1"
#: dashboard/apk_installer.cpp:242
#: dashboard/apk_installer.cpp:244
#, kde-format
msgid "Installation successful"
msgstr "Instalación completada con éxito"
@@ -933,12 +933,12 @@ msgstr "Finalizar"
msgid "Finished"
msgstr "Terminado"
#: dashboard/wivrn_server.cpp:593
#: dashboard/wivrn_server.cpp:592
#, kde-format
msgid "xrizer"
msgstr "xrizer"
#: dashboard/wivrn_server.cpp:594
#: dashboard/wivrn_server.cpp:593
#, kde-format
msgid "Open Composite"
msgstr "Open Composite"
+117 -137
View File
@@ -5,8 +5,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WiVRn 0.15\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-09-27 17:11+0200\n"
"PO-Revision-Date: 2025-09-28 22:27+0200\n"
"POT-Creation-Date: 2025-09-18 13:35+0200\n"
"PO-Revision-Date: 2025-09-18 17:35+0200\n"
"Last-Translator: Álvaro De Quinta <blackcherry@danwin1210.de>\n"
"Language-Team: Spanish\n"
"Language: es\n"
@@ -14,37 +14,12 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Gtranslator 49.0\n"
"X-Generator: Gtranslator 48.0\n"
#: client/scene.cpp:72
msgid "No supported swapchain format"
msgstr "Formato de swapchain no compatible"
#: client/scenes/app_launcher.cpp:135
msgid "Connected to WiVRn server"
msgstr "Conectado al servidor WiVRn"
#: client/scenes/app_launcher.cpp:137
#, c++-format
msgid "Connected to {}"
msgstr "Connectado a {}"
#: client/scenes/app_launcher.cpp:143
msgid "Start an application on the server to start streaming."
msgstr "Inicia una aplicación en el servidor para empezar la retransmisión"
#: client/scenes/app_launcher.cpp:153
msgid "Start an application on your computer or select one to start streaming."
msgstr ""
"Inicia una aplicación en tu ordenador o selecciona una para empezar la "
"retransmisión"
#: client/scenes/app_launcher.cpp:155
#, c++-format
msgid "Start an application on {} or select one to start streaming."
msgstr ""
"Inicia una aplicación en {} o selecciona una para empezar la retransmisión"
#: client/scenes/lobby.cpp:185
msgid "Incompatible WiVRn server: no protocol field in TXT"
msgstr "Servidor WiVRn incompatible: no hay campo de protocolo en TXT"
@@ -68,72 +43,97 @@ msgstr "No se puede conectar a {} ({}): {}"
msgid "Waiting for connection"
msgstr "Esperando conexión"
#: client/scenes/lobby_gui.cpp:107
#: client/scenes/lobby_gui.cpp:232
msgctxt "openxr_post_processing"
msgid "Normal"
msgstr "Normal"
#: client/scenes/lobby_gui.cpp:110
#: client/scenes/lobby_gui.cpp:235
msgctxt "openxr_post_processing"
msgid "Quality"
msgstr "Calidad"
#: client/scenes/lobby_gui.cpp:112
#: client/scenes/lobby_gui.cpp:237
msgctxt "openxr_post_processing"
msgid "Disabled"
msgstr "Deshabilitado"
#: client/scenes/lobby_gui.cpp:120 client/scenes/lobby_gui.cpp:264
#: client/scenes/stream_gui.cpp:944
#: client/scenes/lobby_gui.cpp:245 client/scenes/lobby_gui.cpp:402
#: client/scenes/stream_gui.cpp:838
msgid "Disconnect"
msgstr "Desconectar"
#: client/scenes/lobby_gui.cpp:140 client/scenes/stream_gui.cpp:940
#: client/scenes/lobby_gui.cpp:266 client/scenes/stream_gui.cpp:834
msgid "Close"
msgstr "Cerrar"
#: client/scenes/lobby_gui.cpp:146
#: client/scenes/lobby_gui.cpp:272
msgid "Connection"
msgstr "Conexión"
#: client/scenes/lobby_gui.cpp:148
#: client/scenes/lobby_gui.cpp:274
#, c++-format
msgid "Connection to {}"
msgstr "Conexión a {}"
#: client/scenes/lobby_gui.cpp:178
#: client/scenes/lobby_gui.cpp:304
msgid "PIN"
msgstr "PIN"
#: client/scenes/lobby_gui.cpp:200
#: client/scenes/lobby_gui.cpp:326
msgid "Input the PIN displayed on the dashboard"
msgstr "Ingresa el PIN que se muestra en el panel de control"
#: client/scenes/lobby_gui.cpp:290
#: client/scenes/lobby_gui.cpp:397
msgid "Connected to WiVRn server"
msgstr "Conectado al servidor WiVRn"
#: client/scenes/lobby_gui.cpp:399
#, c++-format
msgid "Connected to {}"
msgstr "Connectado a {}"
#: client/scenes/lobby_gui.cpp:409
msgid "Start an application on the server to start streaming."
msgstr "Inicia una aplicación en el servidor para empezar la retransmisión"
#: client/scenes/lobby_gui.cpp:421
msgid "Start an application on your computer or select one to start streaming."
msgstr ""
"Inicia una aplicación en tu ordenador o selecciona una para empezar la "
"retransmisión"
#: client/scenes/lobby_gui.cpp:423
#, c++-format
msgid "Start an application on {} or select one to start streaming."
msgstr ""
"Inicia una aplicación en {} o selecciona una para empezar la retransmisión"
#: client/scenes/lobby_gui.cpp:546
msgid "Name"
msgstr "Nombre"
#: client/scenes/lobby_gui.cpp:301
#: client/scenes/lobby_gui.cpp:557
msgid "Address"
msgstr "Dirección"
#: client/scenes/lobby_gui.cpp:310
#: client/scenes/lobby_gui.cpp:566
msgid "Port"
msgstr "Puerto"
#: client/scenes/lobby_gui.cpp:318
#: client/scenes/lobby_gui.cpp:574
msgid "TCP only"
msgstr "Solo TCP"
#: client/scenes/lobby_gui.cpp:325 client/scenes/stream_gui.cpp:908
#: client/scenes/lobby_gui.cpp:581
msgid "Cancel"
msgstr "Cancelar"
#: client/scenes/lobby_gui.cpp:339
#: client/scenes/lobby_gui.cpp:595
msgid "Save"
msgstr "Guardar"
#: client/scenes/lobby_gui.cpp:392
#: client/scenes/lobby_gui.cpp:648
msgid ""
"Start a WiVRn server on your\n"
"local network"
@@ -141,45 +141,45 @@ msgstr ""
"Inicia un servidor WiVRn en tu\n"
"red local"
#: client/scenes/lobby_gui.cpp:424
#: client/scenes/lobby_gui.cpp:680
msgid "Autoconnect"
msgstr "Conexión automática"
#: client/scenes/lobby_gui.cpp:450
#: client/scenes/lobby_gui.cpp:706
msgid "Connect"
msgstr "Conectar"
#: client/scenes/lobby_gui.cpp:460 client/wivrn_client.cpp:186
#: client/scenes/lobby_gui.cpp:716 client/wivrn_client.cpp:186
msgid "Incompatible server version"
msgstr "Versión del servidor incompatible"
#: client/scenes/lobby_gui.cpp:462
#: client/scenes/lobby_gui.cpp:718
msgid "Server not available"
msgstr "Servidor no disponible"
#: client/scenes/lobby_gui.cpp:544
#: client/scenes/lobby_gui.cpp:800
msgctxt "language selection, replace with the name of the language"
msgid "English"
msgstr "Español"
#: client/scenes/lobby_gui.cpp:558
#: client/scenes/lobby_gui.cpp:814
msgid "Language"
msgstr "Idioma"
#: client/scenes/lobby_gui.cpp:558 client/scenes/lobby_gui.cpp:560
#: client/scenes/lobby_gui.cpp:814 client/scenes/lobby_gui.cpp:816
msgid "System language"
msgstr "Idioma del sistema"
#: client/scenes/lobby_gui.cpp:585
#: client/scenes/lobby_gui.cpp:841
msgid "Refresh rate"
msgstr "Frecuencia de actualización"
#: client/scenes/lobby_gui.cpp:585 client/scenes/lobby_gui.cpp:587
#: client/scenes/lobby_gui.cpp:841 client/scenes/lobby_gui.cpp:843
msgctxt "automatic refresh rate"
msgid "Automatic"
msgstr "Automática"
#: client/scenes/lobby_gui.cpp:594
#: client/scenes/lobby_gui.cpp:850
msgid ""
"Select refresh rate based on measured application performance.\n"
"May cause flicker when a change happens."
@@ -188,61 +188,61 @@ msgstr ""
"aplicación.\n"
"Puede causar parpadeos cuando ocurre un cambio."
#: client/scenes/lobby_gui.cpp:611
#: client/scenes/lobby_gui.cpp:867
msgid "Minimum refresh rate"
msgstr "Tasa mínima de refresco"
#: client/scenes/lobby_gui.cpp:634
#: client/scenes/lobby_gui.cpp:890
msgid "Resolution scale"
msgstr "Escala de resolución"
#: client/scenes/lobby_gui.cpp:638
#: client/scenes/lobby_gui.cpp:894
#, c-format, c++-format
msgid "%d%% - {}x{} per eye"
msgstr "%d%% - {}x{} por ojo"
#: client/scenes/lobby_gui.cpp:649
#: client/scenes/lobby_gui.cpp:905
#, c++-format
msgid "Resolution larger than {}x{} may not be supported by the headset"
msgstr "La resolución mayor que {}x{} podría no ser compatible con el visor"
#: client/scenes/lobby_gui.cpp:655
#: client/scenes/lobby_gui.cpp:911
msgid "Enable microphone"
msgstr "Activar micrófono"
#: client/scenes/lobby_gui.cpp:664
#: client/scenes/lobby_gui.cpp:920
msgid "Unprocessed Microphone Audio"
msgstr "Entrada de audio sin procesar"
#: client/scenes/lobby_gui.cpp:670
#: client/scenes/lobby_gui.cpp:926
msgid "Force disable audio filters, such as noise cancellation"
msgstr ""
"Forzar la deshabilitación de filtros de audio, asi como la cancelación de "
"ruido"
#: client/scenes/lobby_gui.cpp:677
#: client/scenes/lobby_gui.cpp:933
msgid "Enable hand tracking"
msgstr "Activar seguimiento de manos"
#: client/scenes/lobby_gui.cpp:683 client/scenes/lobby_gui.cpp:695
#: client/scenes/lobby_gui.cpp:707 client/scenes/lobby_gui.cpp:724
#: client/scenes/lobby_gui.cpp:769
#: client/scenes/lobby_gui.cpp:939 client/scenes/lobby_gui.cpp:951
#: client/scenes/lobby_gui.cpp:963 client/scenes/lobby_gui.cpp:980
#: client/scenes/lobby_gui.cpp:1025
msgid "This feature is not supported by your headset"
msgstr "Esta función no es compatible con tu visor"
#: client/scenes/lobby_gui.cpp:689
#: client/scenes/lobby_gui.cpp:945
msgid "Enable eye tracking"
msgstr "Activar seguimiento ocular"
#: client/scenes/lobby_gui.cpp:701
#: client/scenes/lobby_gui.cpp:957
msgid "Enable face tracking"
msgstr "Activar seguimiento facial"
#: client/scenes/lobby_gui.cpp:715
#: client/scenes/lobby_gui.cpp:971
msgid "Enable body tracking"
msgstr "Habilitar seguimiento corporal"
#: client/scenes/lobby_gui.cpp:729
#: client/scenes/lobby_gui.cpp:985
msgid ""
"Requires 'Hand and body tracking' to be enabled in the Quest movement "
"tracking settings,\n"
@@ -253,11 +253,11 @@ msgstr ""
"si no el seguimiento corporal será medido por la posición de los controles y "
"el visor"
#: client/scenes/lobby_gui.cpp:739
#: client/scenes/lobby_gui.cpp:995
msgid "Enable lower body tracking"
msgstr "Habilitar seguimiento de cintura para abajo"
#: client/scenes/lobby_gui.cpp:745
#: client/scenes/lobby_gui.cpp:1001
msgid ""
"Estimate lower body joint positions using Generative Legs\n"
"Requires 'Hand and body tracking' to be enabled in the Quest movement "
@@ -268,11 +268,11 @@ msgstr ""
"Requiere habilitar 'Seguimiento de manos y del cuerpo' en los ajustes de "
"movimiento de Quest"
#: client/scenes/lobby_gui.cpp:748
#: client/scenes/lobby_gui.cpp:1004
msgid "Enable hip tracking"
msgstr "Habilitar seguimiento de cintura"
#: client/scenes/lobby_gui.cpp:754
#: client/scenes/lobby_gui.cpp:1010
msgid ""
"Only takes affect with lower body tracking enabled\n"
"May be desired when using another source of hip tracking"
@@ -280,15 +280,15 @@ msgstr ""
"Solo es funcional si tiene habilitado el seguimiento de cintura para abajo.\n"
"Puede ser necesario si está usando otro metodo para seguir la cintura"
#: client/scenes/lobby_gui.cpp:762
#: client/scenes/lobby_gui.cpp:1018
msgid "Enable video passthrough in lobby"
msgstr "Activar video passthrough en el lobby"
#: client/scenes/lobby_gui.cpp:773
#: client/scenes/lobby_gui.cpp:1029
msgid "Enable in-stream window"
msgstr "Habilitar ventana mientras se juega"
#: client/scenes/lobby_gui.cpp:776
#: client/scenes/lobby_gui.cpp:1032
msgid ""
"Enables the configuration window to be shown while the game is streaming.\n"
"If enabled, the window is activated by pressing both thumbsticks."
@@ -296,15 +296,15 @@ msgstr ""
"Permite que la ventana de configuración se muestre mientras se juega.\n"
"Si se habilita, la ventana se activará al presionar ambos joysticks."
#: client/scenes/lobby_gui.cpp:790 client/scenes/stream_gui.cpp:445
#: client/scenes/lobby_gui.cpp:1046 client/scenes/stream_gui.cpp:445
msgid "OpenXR post-processing"
msgstr "Post-procesamiento de OpenXR"
#: client/scenes/lobby_gui.cpp:794 client/scenes/stream_gui.cpp:449
#: client/scenes/lobby_gui.cpp:1050 client/scenes/stream_gui.cpp:449
msgid "Supersampling"
msgstr "Sobremuestreo"
#: client/scenes/lobby_gui.cpp:814 client/scenes/stream_gui.cpp:470
#: client/scenes/lobby_gui.cpp:1070 client/scenes/stream_gui.cpp:470
msgid ""
"Reduce flicker for high contrast edges.\n"
"Useful when the input resolution is high compared to the headset display"
@@ -313,11 +313,11 @@ msgstr ""
"Útil cuando la resolución de entrada es alta comparada con la pantalla del "
"visor"
#: client/scenes/lobby_gui.cpp:819 client/scenes/stream_gui.cpp:475
#: client/scenes/lobby_gui.cpp:1075 client/scenes/stream_gui.cpp:475
msgid "Sharpening"
msgstr "Nitidez"
#: client/scenes/lobby_gui.cpp:839 client/scenes/stream_gui.cpp:496
#: client/scenes/lobby_gui.cpp:1095 client/scenes/stream_gui.cpp:496
msgid ""
"Improve clarity of high contrast edges and counteract blur.\n"
"Useful when the input resolution is low compared to the headset display"
@@ -326,125 +326,125 @@ msgstr ""
"Útil cuando la resolución de entrada es baja comparada con la pantalla del "
"visor"
#: client/scenes/lobby_gui.cpp:935 client/scenes/lobby_gui.cpp:943
#: client/scenes/lobby_gui.cpp:1191 client/scenes/lobby_gui.cpp:1199
#: client/scenes/stream_gui.cpp:222 client/scenes/stream_gui.cpp:424
msgid "CPU time"
msgstr "Tiempo de CPU"
#: client/scenes/lobby_gui.cpp:939
#: client/scenes/lobby_gui.cpp:1195
msgid "CPU time [ms]"
msgstr "Tiempo de CPU [ms]"
#: client/scenes/lobby_gui.cpp:949 client/scenes/lobby_gui.cpp:957
#: client/scenes/lobby_gui.cpp:1205 client/scenes/lobby_gui.cpp:1213
#: client/scenes/stream_gui.cpp:224 client/scenes/stream_gui.cpp:425
msgid "GPU time"
msgstr "Tiempo de GPU"
#: client/scenes/lobby_gui.cpp:953
#: client/scenes/lobby_gui.cpp:1209
msgid "GPU time [ms]"
msgstr "Tiempo de GPU [ms]"
#: client/scenes/lobby_gui.cpp:996
#: client/scenes/lobby_gui.cpp:1252
msgid "Enable the microphone?"
msgstr "¿Habilitar micrófono?"
#: client/scenes/lobby_gui.cpp:1001
#: client/scenes/lobby_gui.cpp:1257
msgid "Enable eye tracking?"
msgstr "¿Habilitar seguimiento ocular?"
#: client/scenes/lobby_gui.cpp:1006
#: client/scenes/lobby_gui.cpp:1262
msgid "Enable face tracking?"
msgstr "¿Habilitar seguimiento facial?"
#: client/scenes/lobby_gui.cpp:1011
#: client/scenes/lobby_gui.cpp:1267
msgid "Enable body tracking?"
msgstr "¿Habilitar seguimiento corporal?"
#: client/scenes/lobby_gui.cpp:1019
#: client/scenes/lobby_gui.cpp:1275
msgid "Welcome to WiVRn"
msgstr "Bienvenido a WiVRn"
#: client/scenes/lobby_gui.cpp:1043
#: client/scenes/lobby_gui.cpp:1299
msgid "Yes"
msgstr "Sí"
#: client/scenes/lobby_gui.cpp:1050
#: client/scenes/lobby_gui.cpp:1306
msgid "No"
msgstr "No"
#: client/scenes/lobby_gui.cpp:1069 client/scenes/lobby_gui.cpp:1716
#: client/scenes/lobby_gui.cpp:1325 client/scenes/lobby_gui.cpp:1972
msgid "Licenses"
msgstr "Licencias"
#: client/scenes/lobby_gui.cpp:1394
#: client/scenes/lobby_gui.cpp:1650
msgid "Microphone is enabled"
msgstr "Micrófono activado"
#: client/scenes/lobby_gui.cpp:1395
#: client/scenes/lobby_gui.cpp:1651
msgid "Microphone is disabled"
msgstr "Micrófono desactivado"
#: client/scenes/lobby_gui.cpp:1404
#: client/scenes/lobby_gui.cpp:1660
msgid "Hand tracking is enabled"
msgstr "Seguimiento de manos activado"
#: client/scenes/lobby_gui.cpp:1405
#: client/scenes/lobby_gui.cpp:1661
msgid "Hand tracking is disabled"
msgstr "Seguimiento de manos desactivado"
#: client/scenes/lobby_gui.cpp:1414
#: client/scenes/lobby_gui.cpp:1670
msgid "Eye tracking is enabled"
msgstr "Seguimiento ocular activado"
#: client/scenes/lobby_gui.cpp:1415
#: client/scenes/lobby_gui.cpp:1671
msgid "Eye tracking is disabled"
msgstr "Seguimiento ocular desactivado"
#: client/scenes/lobby_gui.cpp:1425
#: client/scenes/lobby_gui.cpp:1681
msgid "Face tracking is enabled"
msgstr "Seguimiento facial activado"
#: client/scenes/lobby_gui.cpp:1426
#: client/scenes/lobby_gui.cpp:1682
msgid "Face tracking is disabled"
msgstr "Seguimiento facial desactivado"
#: client/scenes/lobby_gui.cpp:1436
#: client/scenes/lobby_gui.cpp:1692
msgid "Body tracking is enabled"
msgstr "Seguimiento corporal está habilitado"
#: client/scenes/lobby_gui.cpp:1437
#: client/scenes/lobby_gui.cpp:1693
msgid "Body tracking is disabled"
msgstr "Seguimiento corporal está deshabilitado"
#: client/scenes/lobby_gui.cpp:1453
#: client/scenes/lobby_gui.cpp:1709
msgid "Add server"
msgstr "Agregar servidor"
#: client/scenes/lobby_gui.cpp:1698
#: client/scenes/lobby_gui.cpp:1954
msgid "Server list"
msgstr "Lista de servidores"
#: client/scenes/lobby_gui.cpp:1701 client/scenes/stream_gui.cpp:925
#: client/scenes/lobby_gui.cpp:1957 client/scenes/stream_gui.cpp:822
msgid "Settings"
msgstr "Configuración"
#: client/scenes/lobby_gui.cpp:1704
#: client/scenes/lobby_gui.cpp:1960
msgid "Post-processing"
msgstr "Post-procesamiento"
#: client/scenes/lobby_gui.cpp:1708
#: client/scenes/lobby_gui.cpp:1964
msgid "Debug"
msgstr "Depuración"
#: client/scenes/lobby_gui.cpp:1713
#: client/scenes/lobby_gui.cpp:1969
msgid "About"
msgstr "Acerca de"
#: client/scenes/lobby_gui.cpp:1719
#: client/scenes/lobby_gui.cpp:1975
msgid "Exit"
msgstr "Salir"
#: client/scenes/lobby_gui.cpp:1736
#: client/scenes/lobby_gui.cpp:1992
msgid ""
"Press the grip button or put your palm up\n"
"to move the main window"
@@ -452,7 +452,7 @@ msgstr ""
"Pulsa el botón de agarre o pon tu palma hacia arriba\n"
"para mover la ventana principal"
#: client/scenes/lobby_gui.cpp:1738
#: client/scenes/lobby_gui.cpp:1994
msgid "Press the grip button to move the main window"
msgstr "Pulsa el botón de agarre para mover la ventana principal"
@@ -522,7 +522,7 @@ msgstr "Latencia estimada de movimiento a fotones: {}ms"
msgid "Press the grip button to move the window"
msgstr "Pulsa el botón de agarre para mover la ventana"
#: client/scenes/stream_gui.cpp:404 client/scenes/stream_gui.cpp:868
#: client/scenes/stream_gui.cpp:404 client/scenes/stream_gui.cpp:776
msgid "Press both thumbsticks to display the WiVRn window"
msgstr "Pulsa ambos joysticks para mostrar la ventana de WiVRn"
@@ -564,35 +564,15 @@ msgstr "Usa los joysticks para mover el centro de la fóvea"
msgid "Press A to save or B to cancel"
msgstr "Pulsa A para guardar o B para cancelar"
#: client/scenes/stream_gui.cpp:618
msgid "Running XR applications:"
msgstr "Aplicaciones XR ejecutandose:"
#: client/scenes/stream_gui.cpp:635
msgid "Overlays"
msgstr "Superposiciones"
#: client/scenes/stream_gui.cpp:674
msgid "Request to quit, may be ignored by the application"
msgstr "Pedir salir, puede ser ignorado por la aplicación"
#: client/scenes/stream_gui.cpp:677
msgid "Start"
msgstr "Iniciar"
#: client/scenes/stream_gui.cpp:922
#: client/scenes/stream_gui.cpp:819
msgid "Stats"
msgstr "Estadísticas"
#: client/scenes/stream_gui.cpp:928
msgid "Applications"
msgstr "Aplicaciones"
#: client/scenes/stream_gui.cpp:934
#: client/scenes/stream_gui.cpp:828
msgid "Statistics overlay"
msgstr "Superponer estadísticas"
#: client/scenes/stream_gui.cpp:937
#: client/scenes/stream_gui.cpp:831
msgid "Compact view"
msgstr "Vista compacta"
+118 -138
View File
@@ -5,8 +5,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WiVRn 0.15\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-09-27 16:57+0200\n"
"PO-Revision-Date: 2025-09-27 16:57+0200\n"
"POT-Creation-Date: 2025-09-18 00:05+0200\n"
"PO-Revision-Date: 2025-09-18 00:05+0200\n"
"Last-Translator: Guillaume Meunier <guillaume.meunier@centraliens.net>\n"
"Language-Team: French <>\n"
"Language: French\n"
@@ -19,33 +19,6 @@ msgstr ""
msgid "No supported swapchain format"
msgstr "Aucun format de swapchain supporté"
#: client/scenes/app_launcher.cpp:135
msgid "Connected to WiVRn server"
msgstr "Connecté au serveur WiVRn"
#: client/scenes/app_launcher.cpp:137
#, c++-format
msgid "Connected to {}"
msgstr "Connecté à {}"
#: client/scenes/app_launcher.cpp:143
msgid "Start an application on the server to start streaming."
msgstr ""
"Démarrez une application sur le serveur pour commencer la transmission."
#: client/scenes/app_launcher.cpp:153
msgid "Start an application on your computer or select one to start streaming."
msgstr ""
"Démarrez une application sur le serveur ou depuis la liste pour commencer la "
"transmission."
#: client/scenes/app_launcher.cpp:155
#, c++-format
msgid "Start an application on {} or select one to start streaming."
msgstr ""
"Démarrez une application sur {} ou depuis la liste pour commencer la "
"transmission."
#: client/scenes/lobby.cpp:185
msgid "Incompatible WiVRn server: no protocol field in TXT"
msgstr "Serveur WiVRn incompatible : pas de champ protocol dans le TXT"
@@ -70,72 +43,99 @@ msgstr "Impossible de se connecter à {} ({}): {}"
msgid "Waiting for connection"
msgstr "Attente de connexion"
#: client/scenes/lobby_gui.cpp:107
#: client/scenes/lobby_gui.cpp:232
msgctxt "openxr_post_processing"
msgid "Normal"
msgstr "Normal"
#: client/scenes/lobby_gui.cpp:110
#: client/scenes/lobby_gui.cpp:235
msgctxt "openxr_post_processing"
msgid "Quality"
msgstr "Qualité"
#: client/scenes/lobby_gui.cpp:112
#: client/scenes/lobby_gui.cpp:237
msgctxt "openxr_post_processing"
msgid "Disabled"
msgstr "Désactivé"
#: client/scenes/lobby_gui.cpp:120 client/scenes/lobby_gui.cpp:264
#: client/scenes/stream_gui.cpp:944
#: client/scenes/lobby_gui.cpp:245 client/scenes/lobby_gui.cpp:402
#: client/scenes/stream_gui.cpp:838
msgid "Disconnect"
msgstr "Déconnecter"
#: client/scenes/lobby_gui.cpp:140 client/scenes/stream_gui.cpp:940
#: client/scenes/lobby_gui.cpp:266 client/scenes/stream_gui.cpp:834
msgid "Close"
msgstr "Fermer"
#: client/scenes/lobby_gui.cpp:146
#: client/scenes/lobby_gui.cpp:272
msgid "Connection"
msgstr "Connexion en cours"
#: client/scenes/lobby_gui.cpp:148
#: client/scenes/lobby_gui.cpp:274
#, c++-format
msgid "Connection to {}"
msgstr "Connexion à {}"
#: client/scenes/lobby_gui.cpp:178
#: client/scenes/lobby_gui.cpp:304
msgid "PIN"
msgstr "Code PIN"
#: client/scenes/lobby_gui.cpp:200
#: client/scenes/lobby_gui.cpp:326
msgid "Input the PIN displayed on the dashboard"
msgstr "Entrez le code PIN affiché sur le tableau de bord"
#: client/scenes/lobby_gui.cpp:290
#: client/scenes/lobby_gui.cpp:397
msgid "Connected to WiVRn server"
msgstr "Connecté au serveur WiVRn"
#: client/scenes/lobby_gui.cpp:399
#, c++-format
msgid "Connected to {}"
msgstr "Connecté à {}"
#: client/scenes/lobby_gui.cpp:409
msgid "Start an application on the server to start streaming."
msgstr ""
"Démarrez une application sur le serveur pour commencer la transmission."
#: client/scenes/lobby_gui.cpp:421
msgid "Start an application on your computer or select one to start streaming."
msgstr ""
"Démarrez une application sur le serveur ou depuis la liste pour commencer la "
"transmission."
#: client/scenes/lobby_gui.cpp:423
#, c++-format
msgid "Start an application on {} or select one to start streaming."
msgstr ""
"Démarrez une application sur {} ou depuis la liste pour commencer la "
"transmission."
#: client/scenes/lobby_gui.cpp:546
msgid "Name"
msgstr "Nom"
#: client/scenes/lobby_gui.cpp:301
#: client/scenes/lobby_gui.cpp:557
msgid "Address"
msgstr "Adresse"
#: client/scenes/lobby_gui.cpp:310
#: client/scenes/lobby_gui.cpp:566
msgid "Port"
msgstr "Port"
#: client/scenes/lobby_gui.cpp:318
#: client/scenes/lobby_gui.cpp:574
msgid "TCP only"
msgstr "TCP seulement"
#: client/scenes/lobby_gui.cpp:325 client/scenes/stream_gui.cpp:908
#: client/scenes/lobby_gui.cpp:581
msgid "Cancel"
msgstr "Annuler"
#: client/scenes/lobby_gui.cpp:339
#: client/scenes/lobby_gui.cpp:595
msgid "Save"
msgstr "Enregistrer"
#: client/scenes/lobby_gui.cpp:392
#: client/scenes/lobby_gui.cpp:648
msgid ""
"Start a WiVRn server on your\n"
"local network"
@@ -143,45 +143,45 @@ msgstr ""
"Démarrez un serveur WiVRn sur\n"
"le réseau local"
#: client/scenes/lobby_gui.cpp:424
#: client/scenes/lobby_gui.cpp:680
msgid "Autoconnect"
msgstr "Autoconnexion"
#: client/scenes/lobby_gui.cpp:450
#: client/scenes/lobby_gui.cpp:706
msgid "Connect"
msgstr "Connexion"
#: client/scenes/lobby_gui.cpp:460 client/wivrn_client.cpp:186
#: client/scenes/lobby_gui.cpp:716 client/wivrn_client.cpp:186
msgid "Incompatible server version"
msgstr "Version du serveur incompatible"
#: client/scenes/lobby_gui.cpp:462
#: client/scenes/lobby_gui.cpp:718
msgid "Server not available"
msgstr "Serveur non disponible"
#: client/scenes/lobby_gui.cpp:544
#: client/scenes/lobby_gui.cpp:800
msgctxt "language selection, replace with the name of the language"
msgid "English"
msgstr "Français"
#: client/scenes/lobby_gui.cpp:558
#: client/scenes/lobby_gui.cpp:814
msgid "Language"
msgstr "Langue"
#: client/scenes/lobby_gui.cpp:558 client/scenes/lobby_gui.cpp:560
#: client/scenes/lobby_gui.cpp:814 client/scenes/lobby_gui.cpp:816
msgid "System language"
msgstr "Langue système"
#: client/scenes/lobby_gui.cpp:585
#: client/scenes/lobby_gui.cpp:841
msgid "Refresh rate"
msgstr "Taux de rafraichissement"
#: client/scenes/lobby_gui.cpp:585 client/scenes/lobby_gui.cpp:587
#: client/scenes/lobby_gui.cpp:841 client/scenes/lobby_gui.cpp:843
msgctxt "automatic refresh rate"
msgid "Automatic"
msgstr "Automatique"
#: client/scenes/lobby_gui.cpp:594
#: client/scenes/lobby_gui.cpp:850
msgid ""
"Select refresh rate based on measured application performance.\n"
"May cause flicker when a change happens."
@@ -190,59 +190,59 @@ msgstr ""
"des performances mesurées.\n"
"Peut causer des clignotements lors du changement de fréquence."
#: client/scenes/lobby_gui.cpp:611
#: client/scenes/lobby_gui.cpp:867
msgid "Minimum refresh rate"
msgstr "Taux minimal"
#: client/scenes/lobby_gui.cpp:634
#: client/scenes/lobby_gui.cpp:890
msgid "Resolution scale"
msgstr "Échelle"
#: client/scenes/lobby_gui.cpp:638
#: client/scenes/lobby_gui.cpp:894
#, c-format, c++-format
msgid "%d%% - {}x{} per eye"
msgstr "%d%% - {}x{} par œil"
#: client/scenes/lobby_gui.cpp:649
#: client/scenes/lobby_gui.cpp:905
#, c++-format
msgid "Resolution larger than {}x{} may not be supported by the headset"
msgstr "Les résolutions plus grandes que {}x{} pourraient ne pas fonctionner"
#: client/scenes/lobby_gui.cpp:655
#: client/scenes/lobby_gui.cpp:911
msgid "Enable microphone"
msgstr "Activer le micro"
#: client/scenes/lobby_gui.cpp:664
#: client/scenes/lobby_gui.cpp:920
msgid "Unprocessed Microphone Audio"
msgstr "Utiliser les données brutes du micro"
#: client/scenes/lobby_gui.cpp:670
#: client/scenes/lobby_gui.cpp:926
msgid "Force disable audio filters, such as noise cancellation"
msgstr "Désactive les traitements tels que la suppression du bruit"
#: client/scenes/lobby_gui.cpp:677
#: client/scenes/lobby_gui.cpp:933
msgid "Enable hand tracking"
msgstr "Activer le suivi des mains"
#: client/scenes/lobby_gui.cpp:683 client/scenes/lobby_gui.cpp:695
#: client/scenes/lobby_gui.cpp:707 client/scenes/lobby_gui.cpp:724
#: client/scenes/lobby_gui.cpp:769
#: client/scenes/lobby_gui.cpp:939 client/scenes/lobby_gui.cpp:951
#: client/scenes/lobby_gui.cpp:963 client/scenes/lobby_gui.cpp:980
#: client/scenes/lobby_gui.cpp:1025
msgid "This feature is not supported by your headset"
msgstr "Cette fonctionnalité n'est pas supportée par le casque"
#: client/scenes/lobby_gui.cpp:689
#: client/scenes/lobby_gui.cpp:945
msgid "Enable eye tracking"
msgstr "Activer le suivi des yeux"
#: client/scenes/lobby_gui.cpp:701
#: client/scenes/lobby_gui.cpp:957
msgid "Enable face tracking"
msgstr "Activer le suivi du visage"
#: client/scenes/lobby_gui.cpp:715
#: client/scenes/lobby_gui.cpp:971
msgid "Enable body tracking"
msgstr "Activer le suivi du corps"
#: client/scenes/lobby_gui.cpp:729
#: client/scenes/lobby_gui.cpp:985
msgid ""
"Requires 'Hand and body tracking' to be enabled in the Quest movement "
"tracking settings,\n"
@@ -253,11 +253,11 @@ msgstr ""
"suivi des mouvements du casque.\n"
"Sinon les positions seront déduites de celles des manettes et casque."
#: client/scenes/lobby_gui.cpp:739
#: client/scenes/lobby_gui.cpp:995
msgid "Enable lower body tracking"
msgstr "Activer le suivi du bas du corps"
#: client/scenes/lobby_gui.cpp:745
#: client/scenes/lobby_gui.cpp:1001
msgid ""
"Estimate lower body joint positions using Generative Legs\n"
"Requires 'Hand and body tracking' to be enabled in the Quest movement "
@@ -268,11 +268,11 @@ msgstr ""
"paramètres\n"
"de suivi de mouvements du casque."
#: client/scenes/lobby_gui.cpp:748
#: client/scenes/lobby_gui.cpp:1004
msgid "Enable hip tracking"
msgstr "Activer le suivi des hanches"
#: client/scenes/lobby_gui.cpp:754
#: client/scenes/lobby_gui.cpp:1010
msgid ""
"Only takes affect with lower body tracking enabled\n"
"May be desired when using another source of hip tracking"
@@ -280,15 +280,15 @@ msgstr ""
"N'a d'effet que si le suivi du bas du corps est activé.\n"
"Peut être utile si les hanches sont suivies via un autre moyen."
#: client/scenes/lobby_gui.cpp:762
#: client/scenes/lobby_gui.cpp:1018
msgid "Enable video passthrough in lobby"
msgstr "Activer la vue réelle dans l'accueil"
#: client/scenes/lobby_gui.cpp:773
#: client/scenes/lobby_gui.cpp:1029
msgid "Enable in-stream window"
msgstr "Activer la fenêtre WiVRn lors de la transmission"
#: client/scenes/lobby_gui.cpp:776
#: client/scenes/lobby_gui.cpp:1032
msgid ""
"Enables the configuration window to be shown while the game is streaming.\n"
"If enabled, the window is activated by pressing both thumbsticks."
@@ -298,15 +298,15 @@ msgstr ""
"Lorsque activé, la fenêtre peut être affichée en appuyant sur les deux "
"sticks."
#: client/scenes/lobby_gui.cpp:790 client/scenes/stream_gui.cpp:445
#: client/scenes/lobby_gui.cpp:1046 client/scenes/stream_gui.cpp:445
msgid "OpenXR post-processing"
msgstr "Post-traitement OpenXR"
#: client/scenes/lobby_gui.cpp:794 client/scenes/stream_gui.cpp:449
#: client/scenes/lobby_gui.cpp:1050 client/scenes/stream_gui.cpp:449
msgid "Supersampling"
msgstr "Suréchantillonnage"
#: client/scenes/lobby_gui.cpp:814 client/scenes/stream_gui.cpp:470
#: client/scenes/lobby_gui.cpp:1070 client/scenes/stream_gui.cpp:470
msgid ""
"Reduce flicker for high contrast edges.\n"
"Useful when the input resolution is high compared to the headset display"
@@ -314,11 +314,11 @@ msgstr ""
"Réduit le scintillement des contours à haut contraste.\n"
"Utile quand la résolution d’entrée est haute comparée à l’écran du casque"
#: client/scenes/lobby_gui.cpp:819 client/scenes/stream_gui.cpp:475
#: client/scenes/lobby_gui.cpp:1075 client/scenes/stream_gui.cpp:475
msgid "Sharpening"
msgstr "Affinage de netteté"
#: client/scenes/lobby_gui.cpp:839 client/scenes/stream_gui.cpp:496
#: client/scenes/lobby_gui.cpp:1095 client/scenes/stream_gui.cpp:496
msgid ""
"Improve clarity of high contrast edges and counteract blur.\n"
"Useful when the input resolution is low compared to the headset display"
@@ -326,125 +326,125 @@ msgstr ""
"Améliore la clarté des contours à haut contraste et réduit le flou.\n"
"Utile quand la résolution d’entrée est basse comparée à l’écran du casque"
#: client/scenes/lobby_gui.cpp:935 client/scenes/lobby_gui.cpp:943
#: client/scenes/lobby_gui.cpp:1191 client/scenes/lobby_gui.cpp:1199
#: client/scenes/stream_gui.cpp:222 client/scenes/stream_gui.cpp:424
msgid "CPU time"
msgstr "Temps CPU"
#: client/scenes/lobby_gui.cpp:939
#: client/scenes/lobby_gui.cpp:1195
msgid "CPU time [ms]"
msgstr "Temps CPU [ms]"
#: client/scenes/lobby_gui.cpp:949 client/scenes/lobby_gui.cpp:957
#: client/scenes/lobby_gui.cpp:1205 client/scenes/lobby_gui.cpp:1213
#: client/scenes/stream_gui.cpp:224 client/scenes/stream_gui.cpp:425
msgid "GPU time"
msgstr "Temps GPU"
#: client/scenes/lobby_gui.cpp:953
#: client/scenes/lobby_gui.cpp:1209
msgid "GPU time [ms]"
msgstr "Temps GPU [ms]"
#: client/scenes/lobby_gui.cpp:996
#: client/scenes/lobby_gui.cpp:1252
msgid "Enable the microphone?"
msgstr "Activer le micro ?"
#: client/scenes/lobby_gui.cpp:1001
#: client/scenes/lobby_gui.cpp:1257
msgid "Enable eye tracking?"
msgstr "Activer le suivi des yeux ?"
#: client/scenes/lobby_gui.cpp:1006
#: client/scenes/lobby_gui.cpp:1262
msgid "Enable face tracking?"
msgstr "Activer le suivi du visage ?"
#: client/scenes/lobby_gui.cpp:1011
#: client/scenes/lobby_gui.cpp:1267
msgid "Enable body tracking?"
msgstr "Activer le suivi du corps ?"
#: client/scenes/lobby_gui.cpp:1019
#: client/scenes/lobby_gui.cpp:1275
msgid "Welcome to WiVRn"
msgstr "Bienvenue sur WiVRn"
#: client/scenes/lobby_gui.cpp:1043
#: client/scenes/lobby_gui.cpp:1299
msgid "Yes"
msgstr "Oui"
#: client/scenes/lobby_gui.cpp:1050
#: client/scenes/lobby_gui.cpp:1306
msgid "No"
msgstr "Non"
#: client/scenes/lobby_gui.cpp:1069 client/scenes/lobby_gui.cpp:1716
#: client/scenes/lobby_gui.cpp:1325 client/scenes/lobby_gui.cpp:1972
msgid "Licenses"
msgstr "Licences"
#: client/scenes/lobby_gui.cpp:1394
#: client/scenes/lobby_gui.cpp:1650
msgid "Microphone is enabled"
msgstr "Le micro est activé"
#: client/scenes/lobby_gui.cpp:1395
#: client/scenes/lobby_gui.cpp:1651
msgid "Microphone is disabled"
msgstr "Le micro est désactivé"
#: client/scenes/lobby_gui.cpp:1404
#: client/scenes/lobby_gui.cpp:1660
msgid "Hand tracking is enabled"
msgstr "Le suivi des mains est activé"
#: client/scenes/lobby_gui.cpp:1405
#: client/scenes/lobby_gui.cpp:1661
msgid "Hand tracking is disabled"
msgstr "Le suivi des mains est désactivé"
#: client/scenes/lobby_gui.cpp:1414
#: client/scenes/lobby_gui.cpp:1670
msgid "Eye tracking is enabled"
msgstr "Le suivi des yeux est activé"
#: client/scenes/lobby_gui.cpp:1415
#: client/scenes/lobby_gui.cpp:1671
msgid "Eye tracking is disabled"
msgstr "Le suivi des yeux est désactivé"
#: client/scenes/lobby_gui.cpp:1425
#: client/scenes/lobby_gui.cpp:1681
msgid "Face tracking is enabled"
msgstr "Le suivi du visage est activé"
#: client/scenes/lobby_gui.cpp:1426
#: client/scenes/lobby_gui.cpp:1682
msgid "Face tracking is disabled"
msgstr "Le suivi du visage est désactivé"
#: client/scenes/lobby_gui.cpp:1436
#: client/scenes/lobby_gui.cpp:1692
msgid "Body tracking is enabled"
msgstr "Le suivi du corps est activé"
#: client/scenes/lobby_gui.cpp:1437
#: client/scenes/lobby_gui.cpp:1693
msgid "Body tracking is disabled"
msgstr "Le suivi du corps est désactivé"
#: client/scenes/lobby_gui.cpp:1453
#: client/scenes/lobby_gui.cpp:1709
msgid "Add server"
msgstr "Ajouter un serveur"
#: client/scenes/lobby_gui.cpp:1698
#: client/scenes/lobby_gui.cpp:1954
msgid "Server list"
msgstr "Serveurs"
#: client/scenes/lobby_gui.cpp:1701 client/scenes/stream_gui.cpp:925
#: client/scenes/lobby_gui.cpp:1957 client/scenes/stream_gui.cpp:822
msgid "Settings"
msgstr "Paramètres"
#: client/scenes/lobby_gui.cpp:1704
#: client/scenes/lobby_gui.cpp:1960
msgid "Post-processing"
msgstr "Post-traitement"
#: client/scenes/lobby_gui.cpp:1708
#: client/scenes/lobby_gui.cpp:1964
msgid "Debug"
msgstr "Debug"
#: client/scenes/lobby_gui.cpp:1713
#: client/scenes/lobby_gui.cpp:1969
msgid "About"
msgstr "À propos"
#: client/scenes/lobby_gui.cpp:1719
#: client/scenes/lobby_gui.cpp:1975
msgid "Exit"
msgstr "Quitter"
#: client/scenes/lobby_gui.cpp:1736
#: client/scenes/lobby_gui.cpp:1992
msgid ""
"Press the grip button or put your palm up\n"
"to move the main window"
@@ -452,7 +452,7 @@ msgstr ""
"Serrez la gâchette latérale ou pointez la paume\n"
"vers le haut pour bouger la fenêtre principale"
#: client/scenes/lobby_gui.cpp:1738
#: client/scenes/lobby_gui.cpp:1994
msgid "Press the grip button to move the main window"
msgstr "Serrez la gâchette latérale pour bouger la fenêtre principale"
@@ -522,7 +522,7 @@ msgstr "Latence mouvement à photons estimée: {}ms"
msgid "Press the grip button to move the window"
msgstr "Serrez la gâchette latérale pour bouger la fenêtre"
#: client/scenes/stream_gui.cpp:404 client/scenes/stream_gui.cpp:868
#: client/scenes/stream_gui.cpp:404 client/scenes/stream_gui.cpp:776
msgid "Press both thumbsticks to display the WiVRn window"
msgstr "Appuyez sur les deux sticks pour afficher la fenêtre de WiVRn"
@@ -564,35 +564,15 @@ msgstr "Utiliser le stick pour bouger le centre de fovéation"
msgid "Press A to save or B to cancel"
msgstr "A pour sauvegarder, B pour annuler"
#: client/scenes/stream_gui.cpp:618
msgid "Running XR applications:"
msgstr "Applications XR lancées :"
#: client/scenes/stream_gui.cpp:635
msgid "Overlays"
msgstr "Surcouches"
#: client/scenes/stream_gui.cpp:674
msgid "Request to quit, may be ignored by the application"
msgstr "Demande de quitter, peut être ignoré par l'application"
#: client/scenes/stream_gui.cpp:677
msgid "Start"
msgstr "Démarrer"
#: client/scenes/stream_gui.cpp:922
#: client/scenes/stream_gui.cpp:819
msgid "Stats"
msgstr "Statistiques"
#: client/scenes/stream_gui.cpp:928
msgid "Applications"
msgstr "Applications"
#: client/scenes/stream_gui.cpp:934
#: client/scenes/stream_gui.cpp:828
msgid "Statistics overlay"
msgstr "Statistiques seules"
#: client/scenes/stream_gui.cpp:937
#: client/scenes/stream_gui.cpp:831
msgid "Compact view"
msgstr "Vue compacte"
+117 -137
View File
@@ -5,8 +5,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WiVRn 0.15\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-09-27 16:57+0200\n"
"PO-Revision-Date: 2025-09-27 16:57+0200\n"
"POT-Creation-Date: 2025-09-18 00:05+0200\n"
"PO-Revision-Date: 2025-09-18 00:05+0200\n"
"Last-Translator: Albano Battistella <albanobattistella@gmail.com>\n"
"Language-Team: Italian <>\n"
"Language: Italian\n"
@@ -19,32 +19,6 @@ msgstr ""
msgid "No supported swapchain format"
msgstr "Nessun formato swapchain supportato"
#: client/scenes/app_launcher.cpp:135
msgid "Connected to WiVRn server"
msgstr "Connesso al server WiVRn"
#: client/scenes/app_launcher.cpp:137
#, c++-format
msgid "Connected to {}"
msgstr "Connesso a {}"
#: client/scenes/app_launcher.cpp:143
msgid "Start an application on the server to start streaming."
msgstr "Avvia un applicazione sul server per incominciare a trasmettere."
#: client/scenes/app_launcher.cpp:153
msgid "Start an application on your computer or select one to start streaming."
msgstr ""
"Avvia un applicazione sul computer o scegli dalla lista per incominciare a "
"trasmettere."
#: client/scenes/app_launcher.cpp:155
#, c++-format
msgid "Start an application on {} or select one to start streaming."
msgstr ""
"Avvia un applicazione su {} o scegli dalla lista per incominciare a "
"trasmettere."
#: client/scenes/lobby.cpp:185
msgid "Incompatible WiVRn server: no protocol field in TXT"
msgstr "Server WiVRn incompatibile: nessun campo protocollo in TXT"
@@ -68,72 +42,98 @@ msgstr "Impossibile connettersi a {} ({}): {}"
msgid "Waiting for connection"
msgstr "In attesa di connessione"
#: client/scenes/lobby_gui.cpp:107
#: client/scenes/lobby_gui.cpp:232
msgctxt "openxr_post_processing"
msgid "Normal"
msgstr "Normale"
#: client/scenes/lobby_gui.cpp:110
#: client/scenes/lobby_gui.cpp:235
msgctxt "openxr_post_processing"
msgid "Quality"
msgstr "Alta qualità"
#: client/scenes/lobby_gui.cpp:112
#: client/scenes/lobby_gui.cpp:237
msgctxt "openxr_post_processing"
msgid "Disabled"
msgstr "Disattivato"
#: client/scenes/lobby_gui.cpp:120 client/scenes/lobby_gui.cpp:264
#: client/scenes/stream_gui.cpp:944
#: client/scenes/lobby_gui.cpp:245 client/scenes/lobby_gui.cpp:402
#: client/scenes/stream_gui.cpp:838
msgid "Disconnect"
msgstr "Sconnetti"
#: client/scenes/lobby_gui.cpp:140 client/scenes/stream_gui.cpp:940
#: client/scenes/lobby_gui.cpp:266 client/scenes/stream_gui.cpp:834
msgid "Close"
msgstr "Chiudi"
#: client/scenes/lobby_gui.cpp:146
#: client/scenes/lobby_gui.cpp:272
msgid "Connection"
msgstr "Connessione"
#: client/scenes/lobby_gui.cpp:148
#: client/scenes/lobby_gui.cpp:274
#, c++-format
msgid "Connection to {}"
msgstr "Connessione a {}"
#: client/scenes/lobby_gui.cpp:178
#: client/scenes/lobby_gui.cpp:304
msgid "PIN"
msgstr "PIN"
#: client/scenes/lobby_gui.cpp:200
#: client/scenes/lobby_gui.cpp:326
msgid "Input the PIN displayed on the dashboard"
msgstr "Digitare il PIN visibile sul server"
#: client/scenes/lobby_gui.cpp:290
#: client/scenes/lobby_gui.cpp:397
msgid "Connected to WiVRn server"
msgstr "Connesso al server WiVRn"
#: client/scenes/lobby_gui.cpp:399
#, c++-format
msgid "Connected to {}"
msgstr "Connesso a {}"
#: client/scenes/lobby_gui.cpp:409
msgid "Start an application on the server to start streaming."
msgstr "Avvia un applicazione sul server per incominciare a trasmettere."
#: client/scenes/lobby_gui.cpp:421
msgid "Start an application on your computer or select one to start streaming."
msgstr ""
"Avvia un applicazione sul computer o scegli dalla lista per incominciare a "
"trasmettere."
#: client/scenes/lobby_gui.cpp:423
#, c++-format
msgid "Start an application on {} or select one to start streaming."
msgstr ""
"Avvia un applicazione su {} o scegli dalla lista per incominciare a "
"trasmettere."
#: client/scenes/lobby_gui.cpp:546
msgid "Name"
msgstr "Nome"
#: client/scenes/lobby_gui.cpp:301
#: client/scenes/lobby_gui.cpp:557
msgid "Address"
msgstr "Indirizzo"
#: client/scenes/lobby_gui.cpp:310
#: client/scenes/lobby_gui.cpp:566
msgid "Port"
msgstr "Porta"
#: client/scenes/lobby_gui.cpp:318
#: client/scenes/lobby_gui.cpp:574
msgid "TCP only"
msgstr "Solo TCP"
#: client/scenes/lobby_gui.cpp:325 client/scenes/stream_gui.cpp:908
#: client/scenes/lobby_gui.cpp:581
msgid "Cancel"
msgstr "Annulla"
#: client/scenes/lobby_gui.cpp:339
#: client/scenes/lobby_gui.cpp:595
msgid "Save"
msgstr "Salva"
#: client/scenes/lobby_gui.cpp:392
#: client/scenes/lobby_gui.cpp:648
msgid ""
"Start a WiVRn server on your\n"
"local network"
@@ -141,45 +141,45 @@ msgstr ""
"Avvia un server WiVRn sulla\n"
"rete locale"
#: client/scenes/lobby_gui.cpp:424
#: client/scenes/lobby_gui.cpp:680
msgid "Autoconnect"
msgstr "Connessione automatica"
#: client/scenes/lobby_gui.cpp:450
#: client/scenes/lobby_gui.cpp:706
msgid "Connect"
msgstr "Connetti"
#: client/scenes/lobby_gui.cpp:460 client/wivrn_client.cpp:186
#: client/scenes/lobby_gui.cpp:716 client/wivrn_client.cpp:186
msgid "Incompatible server version"
msgstr "Versione del server incompatibile"
#: client/scenes/lobby_gui.cpp:462
#: client/scenes/lobby_gui.cpp:718
msgid "Server not available"
msgstr "Server non disponibile"
#: client/scenes/lobby_gui.cpp:544
#: client/scenes/lobby_gui.cpp:800
msgctxt "language selection, replace with the name of the language"
msgid "English"
msgstr "Italiano"
#: client/scenes/lobby_gui.cpp:558
#: client/scenes/lobby_gui.cpp:814
msgid "Language"
msgstr "Lingua"
#: client/scenes/lobby_gui.cpp:558 client/scenes/lobby_gui.cpp:560
#: client/scenes/lobby_gui.cpp:814 client/scenes/lobby_gui.cpp:816
msgid "System language"
msgstr "Lingua del sistema"
#: client/scenes/lobby_gui.cpp:585
#: client/scenes/lobby_gui.cpp:841
msgid "Refresh rate"
msgstr "Frequenza di aggiornamento"
#: client/scenes/lobby_gui.cpp:585 client/scenes/lobby_gui.cpp:587
#: client/scenes/lobby_gui.cpp:841 client/scenes/lobby_gui.cpp:843
msgctxt "automatic refresh rate"
msgid "Automatic"
msgstr "Automatica"
#: client/scenes/lobby_gui.cpp:594
#: client/scenes/lobby_gui.cpp:850
msgid ""
"Select refresh rate based on measured application performance.\n"
"May cause flicker when a change happens."
@@ -188,60 +188,60 @@ msgstr ""
"misurate dell'applicazione.\n"
"Può causare un flash quando avviene il cambiamento."
#: client/scenes/lobby_gui.cpp:611
#: client/scenes/lobby_gui.cpp:867
msgid "Minimum refresh rate"
msgstr "Frequenza minima"
#: client/scenes/lobby_gui.cpp:634
#: client/scenes/lobby_gui.cpp:890
msgid "Resolution scale"
msgstr "Scala di risoluzione"
#: client/scenes/lobby_gui.cpp:638
#: client/scenes/lobby_gui.cpp:894
#, c-format, c++-format
msgid "%d%% - {}x{} per eye"
msgstr "%d%% - {}x{} per occhio"
#: client/scenes/lobby_gui.cpp:649
#: client/scenes/lobby_gui.cpp:905
#, c++-format
msgid "Resolution larger than {}x{} may not be supported by the headset"
msgstr ""
"Le risoluzioni superiori a {}x{} potrebbero non essere supportate dal visore"
#: client/scenes/lobby_gui.cpp:655
#: client/scenes/lobby_gui.cpp:911
msgid "Enable microphone"
msgstr "Attiva il microfono"
#: client/scenes/lobby_gui.cpp:664
#: client/scenes/lobby_gui.cpp:920
msgid "Unprocessed Microphone Audio"
msgstr "Usare dati grezzi del microfono"
#: client/scenes/lobby_gui.cpp:670
#: client/scenes/lobby_gui.cpp:926
msgid "Force disable audio filters, such as noise cancellation"
msgstr "Disattiva gli effetti come la cancellazione del rumore"
#: client/scenes/lobby_gui.cpp:677
#: client/scenes/lobby_gui.cpp:933
msgid "Enable hand tracking"
msgstr "Abilita il tracciamento delle mani"
#: client/scenes/lobby_gui.cpp:683 client/scenes/lobby_gui.cpp:695
#: client/scenes/lobby_gui.cpp:707 client/scenes/lobby_gui.cpp:724
#: client/scenes/lobby_gui.cpp:769
#: client/scenes/lobby_gui.cpp:939 client/scenes/lobby_gui.cpp:951
#: client/scenes/lobby_gui.cpp:963 client/scenes/lobby_gui.cpp:980
#: client/scenes/lobby_gui.cpp:1025
msgid "This feature is not supported by your headset"
msgstr "Questa funzionalità non è supportata dal visore"
#: client/scenes/lobby_gui.cpp:689
#: client/scenes/lobby_gui.cpp:945
msgid "Enable eye tracking"
msgstr "Abilita il tracciamento oculare"
#: client/scenes/lobby_gui.cpp:701
#: client/scenes/lobby_gui.cpp:957
msgid "Enable face tracking"
msgstr "Abilita il tracciamento facciale"
#: client/scenes/lobby_gui.cpp:715
#: client/scenes/lobby_gui.cpp:971
msgid "Enable body tracking"
msgstr "Abilita il tracciamento del corpo"
#: client/scenes/lobby_gui.cpp:729
#: client/scenes/lobby_gui.cpp:985
msgid ""
"Requires 'Hand and body tracking' to be enabled in the Quest movement "
"tracking settings,\n"
@@ -254,11 +254,11 @@ msgstr ""
"controller e\n"
"del visore."
#: client/scenes/lobby_gui.cpp:739
#: client/scenes/lobby_gui.cpp:995
msgid "Enable lower body tracking"
msgstr "Abilita il tracciamento del basso del corpo"
#: client/scenes/lobby_gui.cpp:745
#: client/scenes/lobby_gui.cpp:1001
msgid ""
"Estimate lower body joint positions using Generative Legs\n"
"Requires 'Hand and body tracking' to be enabled in the Quest movement "
@@ -269,11 +269,11 @@ msgstr ""
"impostazioni,\n"
"sezione \"Tracking dei movimenti\"."
#: client/scenes/lobby_gui.cpp:748
#: client/scenes/lobby_gui.cpp:1004
msgid "Enable hip tracking"
msgstr "Abilitia il tracciamento delle anche"
#: client/scenes/lobby_gui.cpp:754
#: client/scenes/lobby_gui.cpp:1010
msgid ""
"Only takes affect with lower body tracking enabled\n"
"May be desired when using another source of hip tracking"
@@ -282,15 +282,15 @@ msgstr ""
"Può essere utile se un altro metodo viene usato per il tracciamento\n"
"delle anche."
#: client/scenes/lobby_gui.cpp:762
#: client/scenes/lobby_gui.cpp:1018
msgid "Enable video passthrough in lobby"
msgstr "Abilita la visualizzazione reale in ingresso"
#: client/scenes/lobby_gui.cpp:773
#: client/scenes/lobby_gui.cpp:1029
msgid "Enable in-stream window"
msgstr "Attiva la finestra di WiVRn durante la trasmissione"
#: client/scenes/lobby_gui.cpp:776
#: client/scenes/lobby_gui.cpp:1032
msgid ""
"Enables the configuration window to be shown while the game is streaming.\n"
"If enabled, the window is activated by pressing both thumbsticks."
@@ -298,15 +298,15 @@ msgstr ""
"Abilita la finestra di configurazione quando il gioco viene trasmesso.\n"
"Se selezionato, la finestra può essere attivata premendo entrambi gli stick."
#: client/scenes/lobby_gui.cpp:790 client/scenes/stream_gui.cpp:445
#: client/scenes/lobby_gui.cpp:1046 client/scenes/stream_gui.cpp:445
msgid "OpenXR post-processing"
msgstr "Post-trattamento OpenXR"
#: client/scenes/lobby_gui.cpp:794 client/scenes/stream_gui.cpp:449
#: client/scenes/lobby_gui.cpp:1050 client/scenes/stream_gui.cpp:449
msgid "Supersampling"
msgstr "Supersamping"
#: client/scenes/lobby_gui.cpp:814 client/scenes/stream_gui.cpp:470
#: client/scenes/lobby_gui.cpp:1070 client/scenes/stream_gui.cpp:470
msgid ""
"Reduce flicker for high contrast edges.\n"
"Useful when the input resolution is high compared to the headset display"
@@ -314,11 +314,11 @@ msgstr ""
"Riduce i lampeggiamenti sui bordi ad alto contrasto.\n"
"Utile quando la risoluzine d'entrata è alta in confronto a quella del visore"
#: client/scenes/lobby_gui.cpp:819 client/scenes/stream_gui.cpp:475
#: client/scenes/lobby_gui.cpp:1075 client/scenes/stream_gui.cpp:475
msgid "Sharpening"
msgstr "Miglioramento della nitidezza"
#: client/scenes/lobby_gui.cpp:839 client/scenes/stream_gui.cpp:496
#: client/scenes/lobby_gui.cpp:1095 client/scenes/stream_gui.cpp:496
msgid ""
"Improve clarity of high contrast edges and counteract blur.\n"
"Useful when the input resolution is low compared to the headset display"
@@ -327,125 +327,125 @@ msgstr ""
"Utile quando la risoluzione d'entrate è bassa in contronto a quella del "
"visore"
#: client/scenes/lobby_gui.cpp:935 client/scenes/lobby_gui.cpp:943
#: client/scenes/lobby_gui.cpp:1191 client/scenes/lobby_gui.cpp:1199
#: client/scenes/stream_gui.cpp:222 client/scenes/stream_gui.cpp:424
msgid "CPU time"
msgstr "Tempo CPU"
#: client/scenes/lobby_gui.cpp:939
#: client/scenes/lobby_gui.cpp:1195
msgid "CPU time [ms]"
msgstr "Tempo CPU [ms]"
#: client/scenes/lobby_gui.cpp:949 client/scenes/lobby_gui.cpp:957
#: client/scenes/lobby_gui.cpp:1205 client/scenes/lobby_gui.cpp:1213
#: client/scenes/stream_gui.cpp:224 client/scenes/stream_gui.cpp:425
msgid "GPU time"
msgstr "Tempo GPU"
#: client/scenes/lobby_gui.cpp:953
#: client/scenes/lobby_gui.cpp:1209
msgid "GPU time [ms]"
msgstr "Tempo GPU [ms]"
#: client/scenes/lobby_gui.cpp:996
#: client/scenes/lobby_gui.cpp:1252
msgid "Enable the microphone?"
msgstr "Attivare il microfono?"
#: client/scenes/lobby_gui.cpp:1001
#: client/scenes/lobby_gui.cpp:1257
msgid "Enable eye tracking?"
msgstr "Attivare il tracciamento oculare?"
#: client/scenes/lobby_gui.cpp:1006
#: client/scenes/lobby_gui.cpp:1262
msgid "Enable face tracking?"
msgstr "Attivare il tracciamento facciale?"
#: client/scenes/lobby_gui.cpp:1011
#: client/scenes/lobby_gui.cpp:1267
msgid "Enable body tracking?"
msgstr "Attivare il tracciamento del corpo?"
#: client/scenes/lobby_gui.cpp:1019
#: client/scenes/lobby_gui.cpp:1275
msgid "Welcome to WiVRn"
msgstr "Benvenuto su WiVRn"
#: client/scenes/lobby_gui.cpp:1043
#: client/scenes/lobby_gui.cpp:1299
msgid "Yes"
msgstr "Sì"
#: client/scenes/lobby_gui.cpp:1050
#: client/scenes/lobby_gui.cpp:1306
msgid "No"
msgstr "No"
#: client/scenes/lobby_gui.cpp:1069 client/scenes/lobby_gui.cpp:1716
#: client/scenes/lobby_gui.cpp:1325 client/scenes/lobby_gui.cpp:1972
msgid "Licenses"
msgstr "Licenze"
#: client/scenes/lobby_gui.cpp:1394
#: client/scenes/lobby_gui.cpp:1650
msgid "Microphone is enabled"
msgstr "Microfono attivo"
#: client/scenes/lobby_gui.cpp:1395
#: client/scenes/lobby_gui.cpp:1651
msgid "Microphone is disabled"
msgstr "Microfono disattivato"
#: client/scenes/lobby_gui.cpp:1404
#: client/scenes/lobby_gui.cpp:1660
msgid "Hand tracking is enabled"
msgstr "Tracciamento delle mani attivo"
#: client/scenes/lobby_gui.cpp:1405
#: client/scenes/lobby_gui.cpp:1661
msgid "Hand tracking is disabled"
msgstr "Tracciamento delle mani disattivato"
#: client/scenes/lobby_gui.cpp:1414
#: client/scenes/lobby_gui.cpp:1670
msgid "Eye tracking is enabled"
msgstr "Tracciamento oculare attivo"
#: client/scenes/lobby_gui.cpp:1415
#: client/scenes/lobby_gui.cpp:1671
msgid "Eye tracking is disabled"
msgstr "Tracciamento oculare disattivato"
#: client/scenes/lobby_gui.cpp:1425
#: client/scenes/lobby_gui.cpp:1681
msgid "Face tracking is enabled"
msgstr "Tracciamento facciale attivato"
#: client/scenes/lobby_gui.cpp:1426
#: client/scenes/lobby_gui.cpp:1682
msgid "Face tracking is disabled"
msgstr "Tracciamento facciale disattivato"
#: client/scenes/lobby_gui.cpp:1436
#: client/scenes/lobby_gui.cpp:1692
msgid "Body tracking is enabled"
msgstr "Tracciamento del corpo attivato"
#: client/scenes/lobby_gui.cpp:1437
#: client/scenes/lobby_gui.cpp:1693
msgid "Body tracking is disabled"
msgstr "Tracciamento del corpo disattivato"
#: client/scenes/lobby_gui.cpp:1453
#: client/scenes/lobby_gui.cpp:1709
msgid "Add server"
msgstr "Aggiungi server"
#: client/scenes/lobby_gui.cpp:1698
#: client/scenes/lobby_gui.cpp:1954
msgid "Server list"
msgstr "Elenco dei server"
#: client/scenes/lobby_gui.cpp:1701 client/scenes/stream_gui.cpp:925
#: client/scenes/lobby_gui.cpp:1957 client/scenes/stream_gui.cpp:822
msgid "Settings"
msgstr "Impostazioni"
#: client/scenes/lobby_gui.cpp:1704
#: client/scenes/lobby_gui.cpp:1960
msgid "Post-processing"
msgstr "Post-trattamento"
#: client/scenes/lobby_gui.cpp:1708
#: client/scenes/lobby_gui.cpp:1964
msgid "Debug"
msgstr "Debug"
#: client/scenes/lobby_gui.cpp:1713
#: client/scenes/lobby_gui.cpp:1969
msgid "About"
msgstr "Informazioni"
#: client/scenes/lobby_gui.cpp:1719
#: client/scenes/lobby_gui.cpp:1975
msgid "Exit"
msgstr "Esci"
#: client/scenes/lobby_gui.cpp:1736
#: client/scenes/lobby_gui.cpp:1992
msgid ""
"Press the grip button or put your palm up\n"
"to move the main window"
@@ -453,7 +453,7 @@ msgstr ""
"Premi il pulsante laterale o punta il palmo della\n"
"mano verso l'alto per spostare la finestra principale"
#: client/scenes/lobby_gui.cpp:1738
#: client/scenes/lobby_gui.cpp:1994
msgid "Press the grip button to move the main window"
msgstr "Premi il pulsante laterale per spostare la finestra principale"
@@ -523,7 +523,7 @@ msgstr "Latenza stimata da movimento a fotoni: {}ms"
msgid "Press the grip button to move the window"
msgstr "Premi il pulsante laterale per spostare la finestra"
#: client/scenes/stream_gui.cpp:404 client/scenes/stream_gui.cpp:868
#: client/scenes/stream_gui.cpp:404 client/scenes/stream_gui.cpp:776
msgid "Press both thumbsticks to display the WiVRn window"
msgstr "Premi entrabli gli stick per mostrare la finestra di WiVRn"
@@ -565,35 +565,15 @@ msgstr "Usa gli stick per spostare il centro di foveazione"
msgid "Press A to save or B to cancel"
msgstr "A per salvare, B per annullare"
#: client/scenes/stream_gui.cpp:618
msgid "Running XR applications:"
msgstr "Applicazioni XR avviate:"
#: client/scenes/stream_gui.cpp:635
msgid "Overlays"
msgstr "Overlays"
#: client/scenes/stream_gui.cpp:674
msgid "Request to quit, may be ignored by the application"
msgstr "Chiede di chiudere, può essere ignorato dall'applicazione"
#: client/scenes/stream_gui.cpp:677
msgid "Start"
msgstr "Avvio"
#: client/scenes/stream_gui.cpp:922
#: client/scenes/stream_gui.cpp:819
msgid "Stats"
msgstr "Statistiche"
#: client/scenes/stream_gui.cpp:928
msgid "Applications"
msgstr "Applicazioni"
#: client/scenes/stream_gui.cpp:934
#: client/scenes/stream_gui.cpp:828
msgid "Statistics overlay"
msgstr "Solo statistiche"
#: client/scenes/stream_gui.cpp:937
#: client/scenes/stream_gui.cpp:831
msgid "Compact view"
msgstr "Modalità compatta"
+115 -135
View File
@@ -11,8 +11,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WiVRn\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-09-27 17:11+0200\n"
"PO-Revision-Date: 2025-09-27 22:14+0200\n"
"POT-Creation-Date: 2025-09-18 13:35+0200\n"
"PO-Revision-Date: 2025-09-18 16:52+0200\n"
"Last-Translator: Claudio Sampaio (Patola) <patola@gmail.com>\n"
"Language-Team: Portuguese <>\n"
"Language: pt_BR\n"
@@ -26,30 +26,6 @@ msgstr ""
msgid "No supported swapchain format"
msgstr "Sem formato de cadeia de troca suportado"
#: client/scenes/app_launcher.cpp:135
msgid "Connected to WiVRn server"
msgstr "Conectado ao servidor WiVRn"
#: client/scenes/app_launcher.cpp:137
#, c++-format
msgid "Connected to {}"
msgstr "Conectado a {}"
#: client/scenes/app_launcher.cpp:143
msgid "Start an application on the server to start streaming."
msgstr "Abra um aplicativo no servidor para iniciar o streaming."
#: client/scenes/app_launcher.cpp:153
msgid "Start an application on your computer or select one to start streaming."
msgstr ""
"Abra um aplicativo no seu computador ou selecione um para iniciar o "
"streaming."
#: client/scenes/app_launcher.cpp:155
#, c++-format
msgid "Start an application on {} or select one to start streaming."
msgstr "Abra um aplicativo em {} ou selecione um para iniciar o streaming."
#: client/scenes/lobby.cpp:185
msgid "Incompatible WiVRn server: no protocol field in TXT"
msgstr "Servidor WiVRn incompatível: sem campo protocolo no TXT"
@@ -73,72 +49,96 @@ msgstr "Incapaz de conectar a {} ({}): {}"
msgid "Waiting for connection"
msgstr "Aguardando conexão"
#: client/scenes/lobby_gui.cpp:107
#: client/scenes/lobby_gui.cpp:232
msgctxt "openxr_post_processing"
msgid "Normal"
msgstr "Normal"
#: client/scenes/lobby_gui.cpp:110
#: client/scenes/lobby_gui.cpp:235
msgctxt "openxr_post_processing"
msgid "Quality"
msgstr "Qualidade"
#: client/scenes/lobby_gui.cpp:112
#: client/scenes/lobby_gui.cpp:237
msgctxt "openxr_post_processing"
msgid "Disabled"
msgstr "Desabilitado"
#: client/scenes/lobby_gui.cpp:120 client/scenes/lobby_gui.cpp:264
#: client/scenes/stream_gui.cpp:944
#: client/scenes/lobby_gui.cpp:245 client/scenes/lobby_gui.cpp:402
#: client/scenes/stream_gui.cpp:838
msgid "Disconnect"
msgstr "Desconectar"
#: client/scenes/lobby_gui.cpp:140 client/scenes/stream_gui.cpp:940
#: client/scenes/lobby_gui.cpp:266 client/scenes/stream_gui.cpp:834
msgid "Close"
msgstr "Fechar"
#: client/scenes/lobby_gui.cpp:146
#: client/scenes/lobby_gui.cpp:272
msgid "Connection"
msgstr "Conexão"
#: client/scenes/lobby_gui.cpp:148
#: client/scenes/lobby_gui.cpp:274
#, c++-format
msgid "Connection to {}"
msgstr "Conexão a {}"
#: client/scenes/lobby_gui.cpp:178
#: client/scenes/lobby_gui.cpp:304
msgid "PIN"
msgstr "PIN"
#: client/scenes/lobby_gui.cpp:200
#: client/scenes/lobby_gui.cpp:326
msgid "Input the PIN displayed on the dashboard"
msgstr "Entre o PIN mostrado no painel"
#: client/scenes/lobby_gui.cpp:290
#: client/scenes/lobby_gui.cpp:397
msgid "Connected to WiVRn server"
msgstr "Conectado ao servidor WiVRn"
#: client/scenes/lobby_gui.cpp:399
#, c++-format
msgid "Connected to {}"
msgstr "Conectado a {}"
#: client/scenes/lobby_gui.cpp:409
msgid "Start an application on the server to start streaming."
msgstr "Abra um aplicativo no servidor para iniciar o streaming."
#: client/scenes/lobby_gui.cpp:421
msgid "Start an application on your computer or select one to start streaming."
msgstr ""
"Abra um aplicativo no seu computador ou selecione um para iniciar o "
"streaming."
#: client/scenes/lobby_gui.cpp:423
#, c++-format
msgid "Start an application on {} or select one to start streaming."
msgstr "Abra um aplicativo em {} ou selecione um para iniciar o streaming."
#: client/scenes/lobby_gui.cpp:546
msgid "Name"
msgstr "Nome"
#: client/scenes/lobby_gui.cpp:301
#: client/scenes/lobby_gui.cpp:557
msgid "Address"
msgstr "Endereço"
#: client/scenes/lobby_gui.cpp:310
#: client/scenes/lobby_gui.cpp:566
msgid "Port"
msgstr "Porta"
#: client/scenes/lobby_gui.cpp:318
#: client/scenes/lobby_gui.cpp:574
msgid "TCP only"
msgstr "TCP somente"
#: client/scenes/lobby_gui.cpp:325 client/scenes/stream_gui.cpp:908
#: client/scenes/lobby_gui.cpp:581
msgid "Cancel"
msgstr "Cancelar"
#: client/scenes/lobby_gui.cpp:339
#: client/scenes/lobby_gui.cpp:595
msgid "Save"
msgstr "Salvar"
#: client/scenes/lobby_gui.cpp:392
#: client/scenes/lobby_gui.cpp:648
msgid ""
"Start a WiVRn server on your\n"
"local network"
@@ -146,45 +146,45 @@ msgstr ""
"Inicie um servidor WiVRn em sua\n"
"rede local"
#: client/scenes/lobby_gui.cpp:424
#: client/scenes/lobby_gui.cpp:680
msgid "Autoconnect"
msgstr "Autoconectar"
#: client/scenes/lobby_gui.cpp:450
#: client/scenes/lobby_gui.cpp:706
msgid "Connect"
msgstr "Conectar"
#: client/scenes/lobby_gui.cpp:460 client/wivrn_client.cpp:186
#: client/scenes/lobby_gui.cpp:716 client/wivrn_client.cpp:186
msgid "Incompatible server version"
msgstr "Versão de servidor incompatível"
#: client/scenes/lobby_gui.cpp:462
#: client/scenes/lobby_gui.cpp:718
msgid "Server not available"
msgstr "Servidor não disponível"
#: client/scenes/lobby_gui.cpp:544
#: client/scenes/lobby_gui.cpp:800
msgctxt "language selection, replace with the name of the language"
msgid "English"
msgstr "Português (Brasil)"
#: client/scenes/lobby_gui.cpp:558
#: client/scenes/lobby_gui.cpp:814
msgid "Language"
msgstr "Linguagem"
#: client/scenes/lobby_gui.cpp:558 client/scenes/lobby_gui.cpp:560
#: client/scenes/lobby_gui.cpp:814 client/scenes/lobby_gui.cpp:816
msgid "System language"
msgstr "Linguagem do Sistema"
#: client/scenes/lobby_gui.cpp:585
#: client/scenes/lobby_gui.cpp:841
msgid "Refresh rate"
msgstr "Taxa de atualização"
#: client/scenes/lobby_gui.cpp:585 client/scenes/lobby_gui.cpp:587
#: client/scenes/lobby_gui.cpp:841 client/scenes/lobby_gui.cpp:843
msgctxt "automatic refresh rate"
msgid "Automatic"
msgstr "Automático"
#: client/scenes/lobby_gui.cpp:594
#: client/scenes/lobby_gui.cpp:850
msgid ""
"Select refresh rate based on measured application performance.\n"
"May cause flicker when a change happens."
@@ -192,60 +192,60 @@ 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:611
#: client/scenes/lobby_gui.cpp:867
msgid "Minimum refresh rate"
msgstr "Taxa de atualização mínima"
#: client/scenes/lobby_gui.cpp:634
#: client/scenes/lobby_gui.cpp:890
msgid "Resolution scale"
msgstr "Escala de resolução"
#: client/scenes/lobby_gui.cpp:638
#: client/scenes/lobby_gui.cpp:894
#, c-format, c++-format
msgid "%d%% - {}x{} per eye"
msgstr "%d%% - {}x{} por olho"
#: client/scenes/lobby_gui.cpp:649
#: client/scenes/lobby_gui.cpp:905
#, c++-format
msgid "Resolution larger than {}x{} may not be supported by the headset"
msgstr "Resolução maior que {}x{} pode não ser suportada pelo headset"
#: client/scenes/lobby_gui.cpp:655
#: client/scenes/lobby_gui.cpp:911
msgid "Enable microphone"
msgstr "Ativar microfone"
#: client/scenes/lobby_gui.cpp:664
#: client/scenes/lobby_gui.cpp:920
msgid "Unprocessed Microphone Audio"
msgstr "Áudio Não-processado de Microfone"
#: client/scenes/lobby_gui.cpp:670
#: client/scenes/lobby_gui.cpp:926
msgid "Force disable audio filters, such as noise cancellation"
msgstr ""
"Força a desativação de filtros de áudio tais como cancelamento de ruído"
#: client/scenes/lobby_gui.cpp:677
#: client/scenes/lobby_gui.cpp:933
msgid "Enable hand tracking"
msgstr "Ativar rastreamento de mãos"
#: client/scenes/lobby_gui.cpp:683 client/scenes/lobby_gui.cpp:695
#: client/scenes/lobby_gui.cpp:707 client/scenes/lobby_gui.cpp:724
#: client/scenes/lobby_gui.cpp:769
#: client/scenes/lobby_gui.cpp:939 client/scenes/lobby_gui.cpp:951
#: client/scenes/lobby_gui.cpp:963 client/scenes/lobby_gui.cpp:980
#: client/scenes/lobby_gui.cpp:1025
msgid "This feature is not supported by your headset"
msgstr "Este recurso não é suportado pelo seu headset"
#: client/scenes/lobby_gui.cpp:689
#: client/scenes/lobby_gui.cpp:945
msgid "Enable eye tracking"
msgstr "Ativar rastreamento ocular"
#: client/scenes/lobby_gui.cpp:701
#: client/scenes/lobby_gui.cpp:957
msgid "Enable face tracking"
msgstr "Ativar rastreamento facial"
#: client/scenes/lobby_gui.cpp:715
#: client/scenes/lobby_gui.cpp:971
msgid "Enable body tracking"
msgstr "Ativar rastreamento corporal"
#: client/scenes/lobby_gui.cpp:729
#: client/scenes/lobby_gui.cpp:985
msgid ""
"Requires 'Hand and body tracking' to be enabled in the Quest movement "
"tracking settings,\n"
@@ -257,11 +257,11 @@ msgstr ""
"estimados\n"
"com base nas posições do controle e do headset."
#: client/scenes/lobby_gui.cpp:739
#: client/scenes/lobby_gui.cpp:995
msgid "Enable lower body tracking"
msgstr "Ativar rastreamento corporal inferior"
#: client/scenes/lobby_gui.cpp:745
#: client/scenes/lobby_gui.cpp:1001
msgid ""
"Estimate lower body joint positions using Generative Legs\n"
"Requires 'Hand and body tracking' to be enabled in the Quest movement "
@@ -272,11 +272,11 @@ msgstr ""
"Requer que 'Rastreamento corporal e das mãos' esteja ativado nas\n"
"configurações de Rastreamento de Movimento do Quest"
#: client/scenes/lobby_gui.cpp:748
#: client/scenes/lobby_gui.cpp:1004
msgid "Enable hip tracking"
msgstr "Ativar rastreamento de quadril"
#: client/scenes/lobby_gui.cpp:754
#: client/scenes/lobby_gui.cpp:1010
msgid ""
"Only takes affect with lower body tracking enabled\n"
"May be desired when using another source of hip tracking"
@@ -284,15 +284,15 @@ msgstr ""
"Só tem efeito com o rastreamento corporal inferior ativado\n"
"Pode ser desejado ao usar outra fonte de rastreamento de quadril"
#: client/scenes/lobby_gui.cpp:762
#: client/scenes/lobby_gui.cpp:1018
msgid "Enable video passthrough in lobby"
msgstr "Habilitar repassagem de vídeo no lobby"
#: client/scenes/lobby_gui.cpp:773
#: client/scenes/lobby_gui.cpp:1029
msgid "Enable in-stream window"
msgstr "Habilitar janela na stream"
#: client/scenes/lobby_gui.cpp:776
#: client/scenes/lobby_gui.cpp:1032
msgid ""
"Enables the configuration window to be shown while the game is streaming.\n"
"If enabled, the window is activated by pressing both thumbsticks."
@@ -301,15 +301,15 @@ msgstr ""
"streamado.\n"
"Se habilitado, a janela é ativada clicando os dois joysticks simultaneamente."
#: client/scenes/lobby_gui.cpp:790 client/scenes/stream_gui.cpp:445
#: client/scenes/lobby_gui.cpp:1046 client/scenes/stream_gui.cpp:445
msgid "OpenXR post-processing"
msgstr "Pós-processamento OpenXR"
#: client/scenes/lobby_gui.cpp:794 client/scenes/stream_gui.cpp:449
#: client/scenes/lobby_gui.cpp:1050 client/scenes/stream_gui.cpp:449
msgid "Supersampling"
msgstr "Supersampling"
#: client/scenes/lobby_gui.cpp:814 client/scenes/stream_gui.cpp:470
#: client/scenes/lobby_gui.cpp:1070 client/scenes/stream_gui.cpp:470
msgid ""
"Reduce flicker for high contrast edges.\n"
"Useful when the input resolution is high compared to the headset display"
@@ -317,11 +317,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:819 client/scenes/stream_gui.cpp:475
#: client/scenes/lobby_gui.cpp:1075 client/scenes/stream_gui.cpp:475
msgid "Sharpening"
msgstr "Aumento de nitidez"
#: client/scenes/lobby_gui.cpp:839 client/scenes/stream_gui.cpp:496
#: client/scenes/lobby_gui.cpp:1095 client/scenes/stream_gui.cpp:496
msgid ""
"Improve clarity of high contrast edges and counteract blur.\n"
"Useful when the input resolution is low compared to the headset display"
@@ -329,125 +329,125 @@ msgstr ""
"Melhora a clareza de arestas de alto contraste e minimiza o desfoque.\n"
"Útil quando a resolução de entrada é baixa comparada ao display do headset"
#: client/scenes/lobby_gui.cpp:935 client/scenes/lobby_gui.cpp:943
#: client/scenes/lobby_gui.cpp:1191 client/scenes/lobby_gui.cpp:1199
#: client/scenes/stream_gui.cpp:222 client/scenes/stream_gui.cpp:424
msgid "CPU time"
msgstr "Tempo de CPU"
#: client/scenes/lobby_gui.cpp:939
#: client/scenes/lobby_gui.cpp:1195
msgid "CPU time [ms]"
msgstr "Tempo de CPU [ms]"
#: client/scenes/lobby_gui.cpp:949 client/scenes/lobby_gui.cpp:957
#: client/scenes/lobby_gui.cpp:1205 client/scenes/lobby_gui.cpp:1213
#: client/scenes/stream_gui.cpp:224 client/scenes/stream_gui.cpp:425
msgid "GPU time"
msgstr "Tempo de GPU"
#: client/scenes/lobby_gui.cpp:953
#: client/scenes/lobby_gui.cpp:1209
msgid "GPU time [ms]"
msgstr "Tempo de GPU [ms]"
#: client/scenes/lobby_gui.cpp:996
#: client/scenes/lobby_gui.cpp:1252
msgid "Enable the microphone?"
msgstr "Habilitar o microfone?"
#: client/scenes/lobby_gui.cpp:1001
#: client/scenes/lobby_gui.cpp:1257
msgid "Enable eye tracking?"
msgstr "Habilitar o rastreamento ocular?"
#: client/scenes/lobby_gui.cpp:1006
#: client/scenes/lobby_gui.cpp:1262
msgid "Enable face tracking?"
msgstr "Habilitar o rastreamento facial?"
#: client/scenes/lobby_gui.cpp:1011
#: client/scenes/lobby_gui.cpp:1267
msgid "Enable body tracking?"
msgstr "Habilitar o rastreamento corporal?"
#: client/scenes/lobby_gui.cpp:1019
#: client/scenes/lobby_gui.cpp:1275
msgid "Welcome to WiVRn"
msgstr "Bem vindo(a) ao WiVRn"
#: client/scenes/lobby_gui.cpp:1043
#: client/scenes/lobby_gui.cpp:1299
msgid "Yes"
msgstr "Sim"
#: client/scenes/lobby_gui.cpp:1050
#: client/scenes/lobby_gui.cpp:1306
msgid "No"
msgstr "Não"
#: client/scenes/lobby_gui.cpp:1069 client/scenes/lobby_gui.cpp:1716
#: client/scenes/lobby_gui.cpp:1325 client/scenes/lobby_gui.cpp:1972
msgid "Licenses"
msgstr "Licenças"
#: client/scenes/lobby_gui.cpp:1394
#: client/scenes/lobby_gui.cpp:1650
msgid "Microphone is enabled"
msgstr "O microfone está ativado"
#: client/scenes/lobby_gui.cpp:1395
#: client/scenes/lobby_gui.cpp:1651
msgid "Microphone is disabled"
msgstr "O microfone está desativado"
#: client/scenes/lobby_gui.cpp:1404
#: client/scenes/lobby_gui.cpp:1660
msgid "Hand tracking is enabled"
msgstr "O rastreamento de mãos está ativado"
#: client/scenes/lobby_gui.cpp:1405
#: client/scenes/lobby_gui.cpp:1661
msgid "Hand tracking is disabled"
msgstr "O rastreamento de mãos está desativado"
#: client/scenes/lobby_gui.cpp:1414
#: client/scenes/lobby_gui.cpp:1670
msgid "Eye tracking is enabled"
msgstr "O rastreamento ocular está ativado"
#: client/scenes/lobby_gui.cpp:1415
#: client/scenes/lobby_gui.cpp:1671
msgid "Eye tracking is disabled"
msgstr "O rastreamento ocular está desativado"
#: client/scenes/lobby_gui.cpp:1425
#: client/scenes/lobby_gui.cpp:1681
msgid "Face tracking is enabled"
msgstr "O rastreamento facial está ativado"
#: client/scenes/lobby_gui.cpp:1426
#: client/scenes/lobby_gui.cpp:1682
msgid "Face tracking is disabled"
msgstr "O rastreamento facial está desativado"
#: client/scenes/lobby_gui.cpp:1436
#: client/scenes/lobby_gui.cpp:1692
msgid "Body tracking is enabled"
msgstr "O rastreamento corporal está ativado"
#: client/scenes/lobby_gui.cpp:1437
#: client/scenes/lobby_gui.cpp:1693
msgid "Body tracking is disabled"
msgstr "O rastreamento corporal está desativado"
#: client/scenes/lobby_gui.cpp:1453
#: client/scenes/lobby_gui.cpp:1709
msgid "Add server"
msgstr "Adicionar servidor"
#: client/scenes/lobby_gui.cpp:1698
#: client/scenes/lobby_gui.cpp:1954
msgid "Server list"
msgstr "Lista de servidores"
#: client/scenes/lobby_gui.cpp:1701 client/scenes/stream_gui.cpp:925
#: client/scenes/lobby_gui.cpp:1957 client/scenes/stream_gui.cpp:822
msgid "Settings"
msgstr "Ajustes"
#: client/scenes/lobby_gui.cpp:1704
#: client/scenes/lobby_gui.cpp:1960
msgid "Post-processing"
msgstr "Pós-processamento"
#: client/scenes/lobby_gui.cpp:1708
#: client/scenes/lobby_gui.cpp:1964
msgid "Debug"
msgstr "Depurar"
#: client/scenes/lobby_gui.cpp:1713
#: client/scenes/lobby_gui.cpp:1969
msgid "About"
msgstr "Sobre"
#: client/scenes/lobby_gui.cpp:1719
#: client/scenes/lobby_gui.cpp:1975
msgid "Exit"
msgstr "Sair"
#: client/scenes/lobby_gui.cpp:1736
#: client/scenes/lobby_gui.cpp:1992
msgid ""
"Press the grip button or put your palm up\n"
"to move the main window"
@@ -455,7 +455,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:1738
#: client/scenes/lobby_gui.cpp:1994
msgid "Press the grip button to move the main window"
msgstr "Pressione o botão de aderência para mover a janela principal"
@@ -525,7 +525,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:404 client/scenes/stream_gui.cpp:868
#: client/scenes/stream_gui.cpp:404 client/scenes/stream_gui.cpp:776
msgid "Press both thumbsticks to display the WiVRn window"
msgstr "Pressione ambos os thumbsticks para mostrar a janela do WiVRn"
@@ -567,35 +567,15 @@ msgstr "Use os thumbsticks para mover o centro da foveação"
msgid "Press A to save or B to cancel"
msgstr "Pressione A para salvar ou B para cancelar"
#: client/scenes/stream_gui.cpp:618
msgid "Running XR applications:"
msgstr "Aplicativos XR rodando:"
#: client/scenes/stream_gui.cpp:635
msgid "Overlays"
msgstr "Overlays"
#: client/scenes/stream_gui.cpp:674
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:677
msgid "Start"
msgstr "Iniciar"
#: client/scenes/stream_gui.cpp:922
#: client/scenes/stream_gui.cpp:819
msgid "Stats"
msgstr "Estatísticas"
#: client/scenes/stream_gui.cpp:928
msgid "Applications"
msgstr "Aplicativos"
#: client/scenes/stream_gui.cpp:934
#: client/scenes/stream_gui.cpp:828
msgid "Statistics overlay"
msgstr "Overlay de estatísticas"
#: client/scenes/stream_gui.cpp:937
#: client/scenes/stream_gui.cpp:831
msgid "Compact view"
msgstr "Visualização compacta"
-5
View File
@@ -9,11 +9,6 @@ if [ -d ".git" ] ; then
exec git am --committer-date-is-author-date "$@"
fi
if ! type patch 2> /dev/null ; then
echo "patch command not found" >&1
exit 1
fi
# There is no reliable way to apply a patch and succeed if it was
# already applied. Just ignore errors...
for f in "$@" ; do
@@ -0,0 +1,154 @@
From dace1409153696ce05526de69597d1274e317374 Mon Sep 17 00:00:00 2001
From: Simon Zeni <simon.zeni@collabora.com>
Date: Wed, 3 Sep 2025 11:40:57 -0400
Subject: [PATCH 1/4] xrt: introduce xrt_list
---
src/xrt/include/xrt/xrt_compiler.h | 12 +++-
src/xrt/include/xrt/xrt_list.h | 105 +++++++++++++++++++++++++++++
2 files changed, 116 insertions(+), 1 deletion(-)
create mode 100644 src/xrt/include/xrt/xrt_list.h
diff --git a/src/xrt/include/xrt/xrt_compiler.h b/src/xrt/include/xrt/xrt_compiler.h
index 49a49a238..fccd68444 100644
--- a/src/xrt/include/xrt/xrt_compiler.h
+++ b/src/xrt/include/xrt/xrt_compiler.h
@@ -1,9 +1,10 @@
-// Copyright 2019, Collabora, Ltd.
+// Copyright 2019-2025, Collabora, Ltd.
// SPDX-License-Identifier: BSL-1.0
/*!
* @file
* @brief Header holding common defines.
* @author Jakob Bornecrantz <jakob@collabora.com>
+ * @author Simon Zeni <simon.zeni@collabora.com>
* @ingroup xrt_iface
*/
@@ -222,3 +223,12 @@ typedef intptr_t ssize_t;
#else
#define XRT_C11_COMPOUND(X) (X)
#endif
+
+/*
+ * `typeof` is standard in C23 only, it is a GNU extension prior to this version
+ */
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
+#define XRT_TYPEOF(expr) typeof(expr)
+#else
+#define XRT_TYPEOF(expr) __typeof(expr)
+#endif
diff --git a/src/xrt/include/xrt/xrt_list.h b/src/xrt/include/xrt/xrt_list.h
new file mode 100644
index 000000000..c6edd5c6b
--- /dev/null
+++ b/src/xrt/include/xrt/xrt_list.h
@@ -0,0 +1,105 @@
+// Copyright 2025, Collabora, Ltd.
+// SPDX-License-Identifier: BSL-1.0
+/*!
+ * @file
+ * @brief Circular doubly linked list
+ * @author Simon Zeni <simon.zeni@collabora.com>
+ * @ingroup xrt_iface
+ */
+
+#pragma once
+
+#include "xrt/xrt_compiler.h"
+
+#include <stdbool.h>
+#include <stddef.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*!
+ * TODO
+ *
+ * See https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/list.h
+ *
+ * @ingroup xrt_iface
+ */
+struct xrt_list
+{
+ //! Previous element of the list
+ struct xrt_list *prev;
+ //! Next element of the list
+ struct xrt_list *next;
+};
+
+static inline void
+xrt_list_init(struct xrt_list *list)
+{
+ list->prev = list;
+ list->next = list;
+}
+
+static inline void
+xrt_list_insert(struct xrt_list *list, struct xrt_list *element)
+{
+ element->prev = list;
+ element->next = list->next;
+ list->next = element;
+ element->next->prev = element;
+}
+
+static inline void
+xrt_list_remove(struct xrt_list *element)
+{
+ if (element->next == NULL && element->prev == NULL) {
+ return;
+ }
+
+ element->prev->next = element->next;
+ element->next->prev = element->prev;
+ element->next = NULL;
+ element->prev = NULL;
+}
+
+static inline size_t
+xrt_list_length(const struct xrt_list *list)
+{
+ size_t count = 0;
+
+ struct xrt_list *e = list->next;
+ while (e != list) {
+ e = e->next;
+ count++;
+ }
+
+ return count;
+}
+
+static inline bool
+xrt_list_empty(const struct xrt_list *list)
+{
+ return list->next == list;
+}
+
+#define XRT_LIST_FOR_EACH(pos, head, member) \
+ for (pos = container_of((head)->next, XRT_TYPEOF(*(pos)), member); &pos->member != (head); \
+ pos = container_of(pos->member.next, XRT_TYPEOF(*(pos), member))
+
+#define XRT_LIST_FOR_EACH_SAFE(pos, tmp, head, member) \
+ for (pos = container_of((head)->next, XRT_TYPEOF(*(pos)), member), \
+ tmp = container_of((pos)->member.next, XRT_TYPEOF(*(tmp)), member); \
+ &pos->member != (head); pos = tmp, tmp = container_of(pos->member.next, XRT_TYPEOF(*(tmp)), member))
+
+#define XRT_LIST_FOR_EACH_REVERSE(pos, head, member) \
+ for (pos = container_of((head)->prev, XRT_TYPEOF(*(pos)), member); &pos->member != (head); \
+ pos = container_of(pos->member.prev, XRT_TYPEOF(*(pos)), member))
+
+#define XRT_LIST_FOR_EACH_REVERSE_SAFE(pos, tmp, head, member) \
+ for (pos = container_of((head)->prev, XRT_TYPEOF(*(pos)), member), \
+ tmp = container_of((pos)->member.prev, XRT_TYPEOF(*(tmp)), member); \
+ &pos->member != (head); pos = tmp, tmp = container_of(pos->member.prev, XRT_TYPEOF(*(tmp)), member))
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--
2.51.0
@@ -0,0 +1,80 @@
From 61a77c13ae26ddcf2eeee7394e8022182e07167d Mon Sep 17 00:00:00 2001
From: Simon Zeni <simon.zeni@collabora.com>
Date: Wed, 3 Sep 2025 11:41:06 -0400
Subject: [PATCH 2/4] xrt: introduce xrt_signal
---
src/xrt/include/xrt/xrt_signal.h | 61 ++++++++++++++++++++++++++++++++
1 file changed, 61 insertions(+)
create mode 100644 src/xrt/include/xrt/xrt_signal.h
diff --git a/src/xrt/include/xrt/xrt_signal.h b/src/xrt/include/xrt/xrt_signal.h
new file mode 100644
index 000000000..ebd86bf6f
--- /dev/null
+++ b/src/xrt/include/xrt/xrt_signal.h
@@ -0,0 +1,61 @@
+// Copyright 2025, Collabora, Ltd.
+// SPDX-License-Identifier: BSL-1.0
+/*!
+ * @file
+ * @brief Source of an observable event
+ * @author Simon Zeni <simon.zeni@collabora.com>
+ * @ingroup xrt_iface
+ */
+
+#pragma once
+
+#include "xrt/xrt_list.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct xrt_listener;
+
+typedef void (*xrt_listener_notify_fn)(struct xrt_listener *listener, void *data);
+
+struct xrt_listener
+{
+ //! Part of xrt_signal::listeners
+ struct xrt_list link;
+
+ //! Callback function
+ xrt_listener_notify_fn notify;
+};
+
+struct xrt_signal
+{
+ //! Contains xrt_listener
+ struct xrt_list listeners;
+};
+
+static inline void
+xrt_signal_init(struct xrt_signal *signal)
+{
+ xrt_list_init(&signal->listeners);
+}
+
+static inline void
+xrt_signal_register(struct xrt_signal *signal, struct xrt_listener *listener)
+{
+ xrt_list_insert(signal->listeners.prev, &listener->link);
+}
+
+static inline void
+xrt_signal_emit(const struct xrt_signal *signal, void *data)
+{
+ struct xrt_listener *listener, *tmp;
+ XRT_LIST_FOR_EACH_SAFE(listener, tmp, &signal->listeners, link)
+ {
+ listener->notify(listener, data);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--
2.51.0
@@ -0,0 +1,58 @@
From a487ba3906e2be9cfe06cd51ab8aa91b7c61c31e Mon Sep 17 00:00:00 2001
From: Simon Zeni <simon.zeni@collabora.com>
Date: Thu, 4 Sep 2025 11:51:28 -0400
Subject: [PATCH 3/4] xrt: xrt: add destroy event to xrt_device
---
src/xrt/include/xrt/xrt_device.h | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/src/xrt/include/xrt/xrt_device.h b/src/xrt/include/xrt/xrt_device.h
index 15a46207a..ddc9e8434 100644
--- a/src/xrt/include/xrt/xrt_device.h
+++ b/src/xrt/include/xrt/xrt_device.h
@@ -1,4 +1,4 @@
-// Copyright 2019-2024, Collabora, Ltd.
+// Copyright 2019-2025, Collabora, Ltd.
// Copyright 2024-2025, NVIDIA CORPORATION.
// SPDX-License-Identifier: BSL-1.0
/*!
@@ -13,9 +13,10 @@
#pragma once
#include "xrt/xrt_defines.h"
+#include "xrt/xrt_limits.h"
#include "xrt/xrt_plane_detector.h"
+#include "xrt/xrt_signal.h"
#include "xrt/xrt_visibility_mask.h"
-#include "xrt/xrt_limits.h"
#ifdef __cplusplus
extern "C" {
@@ -314,6 +315,13 @@ struct xrt_device
//! What features/functions/things does this device supports?
struct xrt_device_supported supported;
+ //! Signals emitted by the device
+ struct
+ {
+ //! Emitted on xrt_device_destroy
+ struct xrt_signal destroy;
+ } events;
+
/*
*
@@ -1062,6 +1070,9 @@ xrt_device_destroy(struct xrt_device **xdev_ptr)
return;
}
+ xrt_signal_emit(&xdev->events.destroy, NULL);
+ assert(xrt_list_empty(&xdev->events.destroy.listeners));
+
xdev->destroy(xdev);
*xdev_ptr = NULL;
}
--
2.51.0
@@ -0,0 +1,61 @@
From ac3996d3cc6bb9b0ade862654166bc232096c65b Mon Sep 17 00:00:00 2001
From: Simon Zeni <simon.zeni@collabora.com>
Date: Thu, 4 Sep 2025 11:54:58 -0400
Subject: [PATCH 4/4] xrt: add xrt_device_init function
---
src/xrt/auxiliary/util/u_device.c | 2 ++
src/xrt/include/xrt/xrt_device.h | 11 +++++++++++
tests/tests_cxx_wrappers.cpp | 1 +
3 files changed, 14 insertions(+)
diff --git a/src/xrt/auxiliary/util/u_device.c b/src/xrt/auxiliary/util/u_device.c
index 748adcfe3..21a6d3db4 100644
--- a/src/xrt/auxiliary/util/u_device.c
+++ b/src/xrt/auxiliary/util/u_device.c
@@ -326,6 +326,8 @@ u_device_allocate(enum u_device_alloc_flags flags, size_t size, size_t input_cou
snprintf(xdev->tracking_origin->name, XRT_TRACKING_NAME_LEN, "%s", "No tracking");
}
+ xrt_device_init(xdev);
+
return xdev;
}
diff --git a/src/xrt/include/xrt/xrt_device.h b/src/xrt/include/xrt/xrt_device.h
index ddc9e8434..065a5e881 100644
--- a/src/xrt/include/xrt/xrt_device.h
+++ b/src/xrt/include/xrt/xrt_device.h
@@ -697,6 +697,17 @@ struct xrt_device
// Add new functions above destroy.
};
+/*!
+ * Initializes the common fields of a @ref xrt_device
+ *
+ * @public @memberof xrt_device
+ */
+static inline void
+xrt_device_init(struct xrt_device *xdev)
+{
+ xrt_signal_init(&xdev->events.destroy);
+}
+
/*!
* Helper function for @ref xrt_device::update_inputs.
*
diff --git a/tests/tests_cxx_wrappers.cpp b/tests/tests_cxx_wrappers.cpp
index 7dd36b6af..408975795 100644
--- a/tests/tests_cxx_wrappers.cpp
+++ b/tests/tests_cxx_wrappers.cpp
@@ -21,6 +21,7 @@ struct silly_device
silly_device(bool &destroyed_) : destroyed(&destroyed_)
{
base.destroy = [](xrt_device *xdev) { delete reinterpret_cast<silly_device *>(xdev); };
+ xrt_device_init(&base);
}
~silly_device()
{
--
2.51.0
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,561 @@
From 0ad51126916a6488310340a1e55927a891cabe23 Mon Sep 17 00:00:00 2001
From: rcelyte <rcelyte@battletrains.org>
Date: Mon, 15 Sep 2025 22:46:15 +0000
Subject: [PATCH 5/5] d/solarxr: Feed device poses to server
---
src/xrt/drivers/CMakeLists.txt | 2 +
src/xrt/drivers/solarxr/feeder.c | 316 ++++++++++++++++++++
src/xrt/drivers/solarxr/feeder.h | 62 ++++
src/xrt/drivers/solarxr/solarxr_device.c | 54 +++-
src/xrt/drivers/solarxr/solarxr_interface.h | 3 +
5 files changed, 431 insertions(+), 6 deletions(-)
create mode 100644 src/xrt/drivers/solarxr/feeder.c
create mode 100644 src/xrt/drivers/solarxr/feeder.h
diff --git a/src/xrt/drivers/CMakeLists.txt b/src/xrt/drivers/CMakeLists.txt
index 2e2124f52..a41d25117 100644
--- a/src/xrt/drivers/CMakeLists.txt
+++ b/src/xrt/drivers/CMakeLists.txt
@@ -513,6 +513,8 @@ endif()
if(XRT_BUILD_DRIVER_SOLARXR)
add_library(
drv_solarxr STATIC
+ solarxr/feeder.c
+ solarxr/feeder.h
solarxr/protocol.c
solarxr/protocol.h
solarxr/solarxr_device.c
diff --git a/src/xrt/drivers/solarxr/feeder.c b/src/xrt/drivers/solarxr/feeder.c
new file mode 100644
index 000000000..344c0860f
--- /dev/null
+++ b/src/xrt/drivers/solarxr/feeder.c
@@ -0,0 +1,316 @@
+// Copyright 2025, rcelyte
+// SPDX-License-Identifier: BSL-1.0
+/*!
+ * @file
+ * @brief SolarXR pose feeder
+ * @ingroup drv_solarxr
+ */
+
+#include "feeder.h"
+#include "solarxr_ipc_message.h"
+
+#include "xrt/xrt_device.h"
+
+#include <math.h>
+
+#define PROTOBUF_FLOAT(v_) ((uint8_t *)&(v_))[0], ((uint8_t *)&(v_))[1], ((uint8_t *)&(v_))[2], ((uint8_t *)&(v_))[3]
+#define PROTOBUF_INT32(v_) \
+ (uint8_t)(0x80 | (uint32_t)(v_)), (uint8_t)(0x80 | (uint32_t)(v_) >> 7), \
+ (uint8_t)(0x80 | (uint32_t)(v_) >> 14), (uint8_t)(0x80 | (uint32_t)(v_) >> 21), (uint32_t)(v_) >> 28
+
+struct feeder_device
+{
+ struct xrt_listener base;
+ struct xrt_device *xdev; // weak reference
+ struct feeder *feeder;
+ enum xrt_input_name input_name;
+ uint32_t id;
+ uint8_t last_status;
+ bool battery_charging;
+ float battery_charge;
+};
+
+static void
+feeder_device_detach(struct xrt_listener *const listener, void *const data)
+{
+ (void)data;
+ struct feeder_device *const device = (struct feeder_device *)listener;
+ struct feeder *const feeder = device->feeder;
+ os_mutex_lock(&feeder->mutex);
+ assert(device->xdev != NULL);
+ U_LOG_IFL_D(feeder->socket.log_level, "device \"%.*s\" was destroyed", (unsigned)ARRAY_SIZE(device->xdev->str),
+ device->xdev->str);
+ device->xdev = NULL;
+ xrt_list_remove(&listener->link);
+ os_mutex_unlock(&feeder->mutex);
+}
+
+void
+feeder_send_feedback(struct feeder *const feeder, const timepoint_ns time)
+{
+ if (!solarxr_ipc_socket_is_connected(&feeder->socket)) {
+ return;
+ }
+
+ // check for errors on the socket
+ if (!solarxr_ipc_socket_wait_timeout(&feeder->socket, 0)) {
+ U_LOG_IFL_E(feeder->socket.log_level, "connection lost");
+ solarxr_ipc_socket_destroy(&feeder->socket);
+ return;
+ }
+
+ os_mutex_lock(&feeder->mutex);
+ uint8_t packet[0x10000], *packet_end = packet;
+ for (uint32_t i = 0, devices_len = feeder->devices_len; i < devices_len; ++i) {
+ struct feeder_device *const device = &feeder->devices[i];
+ uint8_t status = 0; // Status::DISCONNECTED
+
+ if (device->xdev != NULL) {
+ // report meaningful changes in battery level
+ bool present = false, charging = false;
+ float charge = 0;
+ if (device->xdev->supported.battery_status &&
+ xrt_device_get_battery_status(device->xdev, &present, &charging, &charge) == XRT_SUCCESS &&
+ (charging != device->battery_charging || fabsf(charge - device->battery_charge) >= 1e-05)) {
+ device->battery_charging = charging;
+ device->battery_charge = charge;
+ uint8_t message[] = {
+ (5 << 3) | 2, 0, // ProtobufMessage::battery
+ (1 << 3) | 0, PROTOBUF_INT32(device->id), // Battery::tracker_id
+ (2 << 3) | 5, PROTOBUF_FLOAT(charge), // Battery::battery_level
+ (3 << 3) | 0, charging, // Battery::is_charging
+ };
+ message[1] = sizeof(message) - 2;
+ solarxr_ipc_message_write_single(&packet_end, &packet[ARRAY_SIZE(packet)], message,
+ sizeof(message));
+ }
+
+ // report pose
+ struct xrt_space_relation relation = {0};
+ assert(device->xdev->get_tracked_pose != NULL);
+ if (xrt_device_get_tracked_pose(device->xdev, device->input_name, time, &relation) ==
+ XRT_SUCCESS &&
+ (relation.relation_flags & XRT_SPACE_RELATION_ORIENTATION_VALID_BIT) != 0) {
+ uint8_t message[30 + 15] = {
+ (1 << 3) | 2, 0, // ProtobufMessage::position
+ (1 << 3) | 0, PROTOBUF_INT32(device->id), // Position::tracker_id
+ (5 << 3) | 5, PROTOBUF_FLOAT(relation.pose.orientation.x), // Position::qx
+ (6 << 3) | 5, PROTOBUF_FLOAT(relation.pose.orientation.y), // Position::qy
+ (7 << 3) | 5, PROTOBUF_FLOAT(relation.pose.orientation.z), // Position::qz
+ (8 << 3) | 5, PROTOBUF_FLOAT(relation.pose.orientation.w), // Position::qw
+ (9 << 3) | 0, 3, // Position::data_source = DataSource::FULL
+ };
+ uint32_t message_len = sizeof(message);
+ if ((relation.relation_flags & XRT_SPACE_RELATION_POSITION_VALID_BIT) != 0) {
+ const uint8_t position[15] = {
+ (2 << 3) | 5, PROTOBUF_FLOAT(relation.pose.position.x), // Position::x
+ (3 << 3) | 5, PROTOBUF_FLOAT(relation.pose.position.y), // Position::y
+ (4 << 3) | 5, PROTOBUF_FLOAT(relation.pose.position.z), // Position::z
+ };
+ memcpy(&message[sizeof(message) - sizeof(position)], position,
+ sizeof(position));
+ } else {
+ message_len -= 15;
+ }
+ message[1] = message_len - 2;
+ solarxr_ipc_message_write_single(&packet_end, &packet[ARRAY_SIZE(packet)], message,
+ message_len);
+ if ((relation.relation_flags & XRT_SPACE_RELATION_ORIENTATION_TRACKED_BIT) != 0) {
+ status = 1; // Status::OK
+ }
+ }
+ }
+
+ // report tracking status
+ if (status != device->last_status) {
+ device->last_status = status;
+ uint8_t message[] = {
+ (4 << 3) | 2, 0, // ProtobufMessage::tracker_status
+ (1 << 3) | 0, PROTOBUF_INT32(device->id), // TrackerStatus::tracker_id
+ (2 << 3) | 0, status, // TrackerStatus::status
+ };
+ message[1] = sizeof(message) - 2;
+ solarxr_ipc_message_write_single(&packet_end, &packet[ARRAY_SIZE(packet)], message,
+ sizeof(message));
+ }
+ }
+
+ // flush queued messages to socket
+ if (packet_end != packet) {
+ solarxr_ipc_socket_send_raw(&feeder->socket, packet, packet_end - packet);
+ }
+ os_mutex_unlock(&feeder->mutex);
+}
+
+static bool
+filter_feeder_device(struct xrt_device *const device)
+{
+ return device != NULL && device->supported.orientation_tracking;
+}
+
+bool
+feeder_set_devices(struct feeder *const feeder, struct xrt_device *const devices[const], const uint32_t devices_len)
+{
+ uint32_t device_count = 0;
+ for (uint32_t i = 0; i < devices_len; ++i) {
+ device_count += filter_feeder_device(devices[i]);
+ }
+ os_mutex_lock(&feeder->mutex);
+ for (uint32_t i = 0, devices_len = feeder->devices_len; i < devices_len; ++i) {
+ // The feeder protocol doesn't define a 'removed' message so
+ // the best we can do is the status to `DISCONNECTED`
+ if (feeder->devices[i].last_status != 0) {
+ uint8_t message[] = {
+ [sizeof(struct solarxr_ipc_message)] = (4 << 3) | 2,
+ 0, // ProtobufMessage::tracker_status
+ (1 << 3) | 0,
+ PROTOBUF_INT32(feeder->devices[i].id), // TrackerStatus::tracker_id
+ (2 << 3) | 0,
+ 0, // TrackerStatus::status = Status::DISCONNECTED
+ };
+ message[sizeof(struct solarxr_ipc_message) + 1] =
+ sizeof(message) - sizeof(struct solarxr_ipc_message) - 2;
+ solarxr_ipc_socket_send_raw(&feeder->socket, message,
+ solarxr_ipc_message_inline(message, sizeof(message)));
+ }
+
+ // unregister destroy listener
+ if (feeder->devices[i].base.link.prev != NULL && feeder->devices[i].base.link.next != NULL) {
+ xrt_list_remove(&feeder->devices[i].base.link);
+ }
+ feeder->devices[i] = (struct feeder_device){0};
+ }
+
+ // ensure IPC connection and device capacity
+ struct feeder_device *new_devices = NULL;
+ if (device_count != 0 && (solarxr_ipc_socket_is_connected(&feeder->socket) ||
+ solarxr_ipc_socket_connect(&feeder->socket, "SlimeVRInput", NULL, 0))) {
+ new_devices = realloc(feeder->devices, device_count * sizeof(*new_devices));
+ }
+
+ bool result;
+ if (new_devices == NULL) {
+ U_LOG_IFL_D(feeder->socket.log_level, "Clearing SolarXR feeder list");
+ free(feeder->devices);
+ feeder->devices = NULL;
+ feeder->devices_len = 0;
+ result = device_count == 0;
+ } else {
+ U_LOG_IFL_D(feeder->socket.log_level, "Setting SolarXR feeder xdevs:");
+ feeder->devices = new_devices;
+ feeder->devices_len = device_count;
+ for (uint32_t i = 0; i < devices_len; ++i) {
+ // must match condition used to compute `device_count`
+ if (!filter_feeder_device(devices[i])) {
+ continue;
+ }
+
+ // find a suitable pose input to report
+ enum xrt_input_name input_name = XRT_INPUT_GENERIC_TRACKER_POSE;
+ for (size_t input = 0, input_count = devices[i]->input_count; input < input_count; ++input) {
+ if (XRT_GET_INPUT_TYPE(devices[i]->inputs[input].name) == XRT_INPUT_TYPE_POSE) {
+ input_name = devices[i]->inputs[input].name;
+ break;
+ }
+ }
+
+ uint8_t role = 0;
+ const char *role_name = "NONE";
+ switch (devices[i]->device_type) {
+ case XRT_DEVICE_TYPE_HMD: {
+ role = 19;
+ role_name = "HMD";
+ } break;
+ case XRT_DEVICE_TYPE_RIGHT_HAND_CONTROLLER: {
+ role = 14;
+ role_name = "RIGHT_CONTROLLER";
+ } break;
+ case XRT_DEVICE_TYPE_LEFT_HAND_CONTROLLER: {
+ role = 13;
+ role_name = "LEFT_CONTROLLER";
+ } break;
+ case XRT_DEVICE_TYPE_ANY_HAND_CONTROLLER: {
+ role = 21;
+ role_name = "GENERIC_CONTROLLER";
+ } break;
+ default:;
+ }
+
+ // initialize state for the device
+ assert(new_devices - feeder->devices < feeder->devices_len);
+ const uint32_t id = feeder->next_id++;
+ *new_devices = (struct feeder_device){
+ .base.notify = feeder_device_detach,
+ .xdev = devices[i],
+ .feeder = feeder,
+ .input_name = input_name,
+ .id = id,
+ .last_status = UINT8_MAX,
+ };
+
+ // listen for destroy so we can safely clean up references to the xdev
+ xrt_signal_register(&devices[i]->events.destroy, &new_devices->base);
+
+ // advance head
+ ++new_devices;
+
+ // announce the new tracker
+ const uint32_t serial_len = strlen(devices[i]->serial), name_len = strlen(devices[i]->str);
+ const uint8_t message_1[] = {
+ (3 << 3) | 2, PROTOBUF_INT32(0), // ProtobufMessage::tracker_added
+ (1 << 3) | 0, PROTOBUF_INT32(id), // TrackerAdded::tracker_id
+ (4 << 3) | 0, role, // TrackerAdded::tracker_role
+ (2 << 3) | 2, PROTOBUF_INT32(serial_len),
+ };
+ const uint8_t message_2[] = {
+ (3 << 3) | 2,
+ PROTOBUF_INT32(name_len),
+ };
+ uint8_t packet[sizeof(struct solarxr_ipc_message) + sizeof(message_1) +
+ sizeof(devices[i]->serial) + sizeof(message_2) + sizeof(devices[i]->str)];
+ struct solarxr_ipc_message *const message =
+ solarxr_ipc_message_start(packet, &packet[ARRAY_SIZE(packet)]);
+ solarxr_ipc_message_write(message, &packet[ARRAY_SIZE(packet)], message_1, sizeof(message_1));
+ solarxr_ipc_message_write(message, &packet[ARRAY_SIZE(packet)],
+ (const uint8_t *)devices[i]->serial,
+ serial_len); // TrackerAdded::tracker_serial
+ solarxr_ipc_message_write(message, &packet[ARRAY_SIZE(packet)], message_2, sizeof(message_2));
+ solarxr_ipc_message_write(message, &packet[ARRAY_SIZE(packet)],
+ (const uint8_t *)devices[i]->str,
+ name_len); // TrackerAdded::tracker_name
+ const uint32_t packet_len = solarxr_ipc_message_end(message, &(uint8_t *){packet});
+ if (packet_len == 0) {
+ U_LOG_IFL_E(feeder->socket.log_level, "solarxr_ipc_message_end() failed");
+ assert(false);
+ continue;
+ }
+ const uint8_t tracker_added[] = {
+ PROTOBUF_INT32(packet_len - sizeof(*message) - sizeof((uint8_t[]){0, PROTOBUF_INT32(0)})),
+ };
+ memcpy(&message->body[1], tracker_added, sizeof(tracker_added));
+ solarxr_ipc_socket_send_raw(&feeder->socket, packet, packet_len);
+ U_LOG_IFL_D(feeder->socket.log_level,
+ " \"%s\" [id=%" PRIu32 " serial=\"%s\" role=TrackerRole::%s]", devices[i]->str,
+ id, devices[i]->serial, role_name);
+ }
+ assert(new_devices - feeder->devices == feeder->devices_len);
+ result = true;
+ }
+ os_mutex_unlock(&feeder->mutex);
+ return result;
+}
+
+bool
+feeder_init(struct feeder *const feeder, const enum u_logging_level log_level)
+{
+ solarxr_ipc_socket_init(&feeder->socket, log_level);
+ return os_mutex_init(&feeder->mutex) == 0;
+}
+
+void
+feeder_fini(struct feeder *const feeder)
+{
+ feeder_set_devices(feeder, NULL, 0);
+ os_mutex_destroy(&feeder->mutex);
+ solarxr_ipc_socket_destroy(&feeder->socket);
+}
diff --git a/src/xrt/drivers/solarxr/feeder.h b/src/xrt/drivers/solarxr/feeder.h
new file mode 100644
index 000000000..9e849055e
--- /dev/null
+++ b/src/xrt/drivers/solarxr/feeder.h
@@ -0,0 +1,62 @@
+// Copyright 2025, rcelyte
+// SPDX-License-Identifier: BSL-1.0
+/*!
+ * @file
+ * @brief SolarXR pose feeder
+ * @ingroup drv_solarxr
+ */
+
+#pragma once
+#include "solarxr_ipc_socket.h"
+
+#include "os/os_threading.h"
+
+/*!
+ * Object that observes a collection of @ref xrt_device objects,
+ * reporting their poses and status to a SolarXR server over IPC
+ * @ingroup drv_solarxr
+ */
+struct feeder_device;
+struct feeder
+{
+ struct os_mutex mutex;
+ struct solarxr_ipc_socket socket;
+ uint32_t next_id;
+ uint32_t devices_len;
+ struct feeder_device *devices;
+};
+
+bool
+feeder_init(struct feeder *feeder, enum u_logging_level log_level);
+
+void
+feeder_fini(struct feeder *feeder);
+
+/*!
+ * Poll all observed xdevs and
+ *
+ * Holds the mutex during most of the operation.
+ *
+ * @param feeder self
+ * @param time Timestamp used to query device poses
+ *
+ * @public @memberof feeder
+ */
+void
+feeder_send_feedback(struct feeder *feeder, timepoint_ns time); // thread safe
+
+/*!
+ * Set the list of devices to observe and announce them to the server
+ *
+ * Holds the mutex during most of the operation.
+ *
+ * @param feeder self
+ * @param devices array of devices
+ * @param devices_len size of @p devices
+ *
+ * @return true on success.
+ *
+ * @public @memberof feeder
+ */
+bool
+feeder_set_devices(struct feeder *feeder, struct xrt_device *const devices[], uint32_t devices_len); // thread safe
diff --git a/src/xrt/drivers/solarxr/solarxr_device.c b/src/xrt/drivers/solarxr/solarxr_device.c
index 77ebdb20b..c5bb56f78 100644
--- a/src/xrt/drivers/solarxr/solarxr_device.c
+++ b/src/xrt/drivers/solarxr/solarxr_device.c
@@ -2,6 +2,7 @@
// SPDX-License-Identifier: BSL-1.0
#include "solarxr_interface.h"
+#include "feeder.h"
#include "protocol.h"
#include "solarxr_ipc_message.h"
#include "solarxr_ipc_socket.h"
@@ -41,9 +42,10 @@ struct solarxr_generic_tracker
struct solarxr_device
{
struct xrt_device base;
+ struct feeder feeder;
struct os_thread thread;
struct solarxr_ipc_socket socket;
- _Atomic(timepoint_ns) next_sync;
+ _Atomic(timepoint_ns) last_feedback, next_sync;
struct os_mutex mutex;
_Atomic(timepoint_ns) timestamp;
_Atomic(uint64_t) enabled_bones;
@@ -271,6 +273,8 @@ solarxr_device_sync(struct solarxr_device *const device)
},
};
+ atomic_store(&device->last_feedback, time);
+ feeder_send_feedback(&device->feeder, time);
solarxr_ipc_socket_send_raw(
&device->socket, (const uint8_t *)&poll_packet,
solarxr_ipc_message_inline((uint8_t *)&poll_packet,
@@ -515,14 +519,26 @@ solarxr_device_handle_trackers(struct solarxr_device *const device,
}
static struct span
-solarxr_device_receive_blocking(struct solarxr_device *const device)
+solarxr_device_receive_blocking(struct solarxr_device *const device, const bool do_feedback)
{
+ const time_duration_ns timeout = debug_get_num_option_solarxr_sync_timeout_ms() * U_TIME_1MS_IN_NS;
+ time_duration_ns time_since_feedback = 0;
do {
+ if (do_feedback) {
+ const timepoint_ns time = os_monotonic_get_ns();
+ time_since_feedback = time - atomic_load(&device->last_feedback);
+ if (time_since_feedback > timeout) {
+ // ensures tracker poses are updated even when no XR app is polling them
+ atomic_store(&device->last_feedback, time);
+ feeder_send_feedback(&device->feeder, time);
+ time_since_feedback = 0;
+ }
+ }
const uint32_t buffer_len = solarxr_ipc_socket_receive(&device->socket);
if (buffer_len != 0) {
return (struct span){buffer_len, device->socket.buffer};
}
- } while (solarxr_ipc_socket_wait_timeout(&device->socket, -1));
+ } while (solarxr_ipc_socket_wait_timeout(&device->socket, do_feedback ? timeout - time_since_feedback : -1));
return (struct span){0};
}
@@ -530,7 +546,7 @@ static void *
solarxr_network_thread(void *const ptr)
{
struct solarxr_device *const device = (struct solarxr_device *)ptr;
- for (struct span buffer; (buffer = solarxr_device_receive_blocking(device)).length != 0;) {
+ for (struct span buffer; (buffer = solarxr_device_receive_blocking(device, true)).length != 0;) {
struct solarxr_message_bundle bundle;
if (!read_solarxr_message_bundle(&bundle, buffer.data, buffer.length,
(const solarxr_message_bundle_t *)buffer.data)) {
@@ -715,6 +731,7 @@ solarxr_device_destroy(struct xrt_device *xdev)
os_thread_join(&device->thread);
os_thread_destroy(&device->thread);
}
+ feeder_fini(&device->feeder);
for (size_t i = 0; i < ARRAY_SIZE(device->trackers); ++i) {
m_relation_history_destroy(&device->trackers[i]);
}
@@ -810,7 +827,8 @@ solarxr_device_create_xdevs(struct xrt_tracking_origin *const tracking_origin,
struct solarxr_generic_tracker *trackers[MAX_GENERIC_TRACKERS];
// `solarxr_device_destroy()` asserts unless both have attempted initialization
- if (os_mutex_init(&device->mutex) != 0) {
+ if (((int)!feeder_init(&device->feeder, debug_get_log_option_solarxr_log()) | os_mutex_init(&device->mutex)) !=
+ 0) {
goto fail;
}
@@ -1044,7 +1062,7 @@ solarxr_device_create_xdevs(struct xrt_tracking_origin *const tracking_origin,
}
if (use_trackers) {
- const struct span buffer = solarxr_device_receive_blocking(device);
+ const struct span buffer = solarxr_device_receive_blocking(device, false);
if (buffer.length == 0) {
U_LOG_IFL_E(debug_get_log_option_solarxr_log(), "solarxr_ipc_socket_receive() failed");
goto fail;
@@ -1174,3 +1192,27 @@ fail:
solarxr_device_destroy(&device->base);
return 0;
}
+
+bool
+solarxr_device_set_feeder_devices(struct xrt_device *const device,
+ struct xrt_device *const xdevs[const],
+ const uint32_t xdev_count)
+{
+ struct solarxr_device *const solarxr = solarxr_device(device);
+ if (solarxr == NULL) {
+ return false;
+ }
+ uint32_t filtered_xdevs_len = 0;
+ struct xrt_device *filtered_xdevs[XRT_SYSTEM_MAX_DEVICES];
+ for (uint32_t i = 0; i < xdev_count; ++i) {
+ if (xdevs[i] == device || solarxr_generic_tracker(xdevs[i]) != NULL) {
+ continue;
+ }
+ if (filtered_xdevs_len >= ARRAY_SIZE(filtered_xdevs)) {
+ U_LOG_IFL_E(debug_get_log_option_solarxr_log(), "too many feeder devices");
+ return false;
+ }
+ filtered_xdevs[filtered_xdevs_len++] = xdevs[i];
+ }
+ return feeder_set_devices(&solarxr->feeder, filtered_xdevs, filtered_xdevs_len);
+}
diff --git a/src/xrt/drivers/solarxr/solarxr_interface.h b/src/xrt/drivers/solarxr/solarxr_interface.h
index c56bb15b1..15916484f 100644
--- a/src/xrt/drivers/solarxr/solarxr_interface.h
+++ b/src/xrt/drivers/solarxr/solarxr_interface.h
@@ -31,6 +31,9 @@ solarxr_device_create(struct xrt_tracking_origin *const tracking_origin)
return out;
}
+bool
+solarxr_device_set_feeder_devices(struct xrt_device *solarxr, struct xrt_device *const xdevs[], uint32_t xdev_count);
+
#ifdef __cplusplus
}
--
2.51.0
@@ -0,0 +1,200 @@
From a0c03b2f602311a8c4299e250ecb64be9528194b Mon Sep 17 00:00:00 2001
From: rcelyte <rcelyte@battletrains.org>
Date: Fri, 23 Aug 2024 20:54:53 +0000
Subject: [PATCH] t/common: Load SolarXR driver
---
src/xrt/drivers/qwerty/qwerty_device.c | 4 ++++
.../targets/common/target_builder_lighthouse.c | 14 ++++++++++++++
src/xrt/targets/common/target_builder_qwerty.c | 14 ++++++++++++++
src/xrt/targets/common/target_builder_rift_s.c | 15 +++++++++++++++
src/xrt/targets/common/target_builder_steamvr.c | 15 +++++++++++++++
src/xrt/targets/common/target_builder_wmr.c | 14 ++++++++++++++
6 files changed, 76 insertions(+)
diff --git a/src/xrt/drivers/qwerty/qwerty_device.c b/src/xrt/drivers/qwerty/qwerty_device.c
index b390af901..fc60c869c 100644
--- a/src/xrt/drivers/qwerty/qwerty_device.c
+++ b/src/xrt/drivers/qwerty/qwerty_device.c
@@ -317,6 +317,8 @@ qwerty_hmd_create(void)
xd->inputs[0].name = XRT_INPUT_GENERIC_HEAD_POSE;
+ xd->supported.orientation_tracking = true;
+ xd->supported.position_tracking = true;
xd->update_inputs = u_device_noop_update_inputs;
xd->get_tracked_pose = qwerty_get_tracked_pose;
xd->get_view_poses = u_device_get_view_poses;
@@ -369,6 +371,8 @@ qwerty_controller_create(bool is_left, struct qwerty_hmd *qhmd)
xd->binding_profiles = binding_profiles;
xd->binding_profile_count = ARRAY_SIZE(binding_profiles);
+ xd->supported.orientation_tracking = true;
+ xd->supported.position_tracking = true;
xd->update_inputs = qwerty_update_inputs;
xd->get_tracked_pose = qwerty_get_tracked_pose;
xd->set_output = qwerty_set_output;
diff --git a/src/xrt/targets/common/target_builder_lighthouse.c b/src/xrt/targets/common/target_builder_lighthouse.c
index 78fe52ab4..da68c0b4a 100644
--- a/src/xrt/targets/common/target_builder_lighthouse.c
+++ b/src/xrt/targets/common/target_builder_lighthouse.c
@@ -58,6 +58,10 @@
#include "opengloves/opengloves_interface.h"
#endif
+#ifdef XRT_BUILD_DRIVER_SOLARXR
+#include "solarxr/solarxr_interface.h"
+#endif
+
#if defined(XRT_BUILD_DRIVER_SURVIVE)
#define DEFAULT_DRIVER "survive"
#else
@@ -740,6 +744,16 @@ end_valve_index:
try_add_opengloves(left, right, &unobstructed_left_ht, &unobstructed_right_ht);
}
+#ifdef XRT_BUILD_DRIVER_SOLARXR
+ const uint32_t count = solarxr_device_create_xdevs(head->tracking_origin, &xsysd->xdevs[xsysd->xdev_count],
+ ARRAY_SIZE(xsysd->xdevs) - xsysd->xdev_count);
+ if (count != 0) {
+ xsysd->static_roles.body = xsysd->xdevs[xsysd->xdev_count];
+ solarxr_device_set_feeder_devices(xsysd->static_roles.body, xsysd->xdevs, xsysd->xdev_count);
+ }
+ xsysd->xdev_count += count;
+#endif
+
// Assign to role(s).
ubrh->head = head;
ubrh->left = left;
diff --git a/src/xrt/targets/common/target_builder_qwerty.c b/src/xrt/targets/common/target_builder_qwerty.c
index 2c66ad303..76444147e 100644
--- a/src/xrt/targets/common/target_builder_qwerty.c
+++ b/src/xrt/targets/common/target_builder_qwerty.c
@@ -18,6 +18,10 @@
#include "qwerty/qwerty_interface.h"
+#ifdef XRT_BUILD_DRIVER_SOLARXR
+#include "solarxr/solarxr_interface.h"
+#endif
+
#include <assert.h>
@@ -100,6 +104,16 @@ qwerty_open_system_impl(struct xrt_builder *xb,
ubrh->left = left;
ubrh->right = right;
+#ifdef XRT_BUILD_DRIVER_SOLARXR
+ const uint32_t count = solarxr_device_create_xdevs(head->tracking_origin, &xsysd->xdevs[xsysd->xdev_count],
+ ARRAY_SIZE(xsysd->xdevs) - xsysd->xdev_count);
+ if (count != 0) {
+ xsysd->static_roles.body = xsysd->xdevs[xsysd->xdev_count];
+ solarxr_device_set_feeder_devices(xsysd->static_roles.body, xsysd->xdevs, xsysd->xdev_count);
+ }
+ xsysd->xdev_count += count;
+#endif
+
return XRT_SUCCESS;
}
diff --git a/src/xrt/targets/common/target_builder_rift_s.c b/src/xrt/targets/common/target_builder_rift_s.c
index fb284d77b..f48eebe35 100644
--- a/src/xrt/targets/common/target_builder_rift_s.c
+++ b/src/xrt/targets/common/target_builder_rift_s.c
@@ -28,6 +28,10 @@
#include "ht_ctrl_emu/ht_ctrl_emu_interface.h"
#endif
+#ifdef XRT_BUILD_DRIVER_SOLARXR
+#include "solarxr/solarxr_interface.h"
+#endif
+
#include "rift_s/rift_s_interface.h"
#include "rift_s/rift_s.h"
@@ -200,6 +204,17 @@ rift_s_open_system_impl(struct xrt_builder *xb,
}
#endif
+#ifdef XRT_BUILD_DRIVER_SOLARXR
+ const uint32_t count =
+ solarxr_device_create_xdevs((hmd_xdev != NULL) ? hmd_xdev->tracking_origin : NULL,
+ &xsysd->xdevs[xsysd->xdev_count], ARRAY_SIZE(xsysd->xdevs) - xsysd->xdev_count);
+ if (count != 0) {
+ xsysd->static_roles.body = xsysd->xdevs[xsysd->xdev_count];
+ solarxr_device_set_feeder_devices(xsysd->static_roles.body, xsysd->xdevs, xsysd->xdev_count);
+ }
+ xsysd->xdev_count += count;
+#endif
+
// Assign to role(s).
ubrh->head = hmd_xdev;
ubrh->left = left_xdev;
diff --git a/src/xrt/targets/common/target_builder_steamvr.c b/src/xrt/targets/common/target_builder_steamvr.c
index a603eeaf5..171ad0d9a 100644
--- a/src/xrt/targets/common/target_builder_steamvr.c
+++ b/src/xrt/targets/common/target_builder_steamvr.c
@@ -34,6 +34,10 @@
#include "xrt/xrt_space.h"
#include "util/u_space_overseer.h"
+#ifdef XRT_BUILD_DRIVER_SOLARXR
+#include "solarxr/solarxr_interface.h"
+#endif
+
#ifndef XRT_BUILD_DRIVER_STEAMVR_LIGHTHOUSE
#error "This builder requires the SteamVR Lighthouse driver"
#endif
@@ -166,6 +170,17 @@ steamvr_open_system(struct xrt_builder *xb,
SET_HT_ROLES(conforming)
#undef SET_HT_ROLES
+#ifdef XRT_BUILD_DRIVER_SOLARXR
+ const uint32_t count =
+ solarxr_device_create_xdevs(xsysd->static_roles.head->tracking_origin, &xsysd->xdevs[xsysd->xdev_count],
+ ARRAY_SIZE(xsysd->xdevs) - xsysd->xdev_count);
+ if (count != 0) {
+ xsysd->static_roles.body = xsysd->xdevs[xsysd->xdev_count];
+ solarxr_device_set_feeder_devices(xsysd->static_roles.body, xsysd->xdevs, xsysd->xdev_count);
+ }
+ xsysd->xdev_count += count;
+#endif
+
/*
* Space overseer.
*/
diff --git a/src/xrt/targets/common/target_builder_wmr.c b/src/xrt/targets/common/target_builder_wmr.c
index 57c3bfd7e..c0564c2a8 100644
--- a/src/xrt/targets/common/target_builder_wmr.c
+++ b/src/xrt/targets/common/target_builder_wmr.c
@@ -26,6 +26,10 @@
#include <assert.h>
+#ifdef XRT_BUILD_DRIVER_SOLARXR
+#include "solarxr/solarxr_interface.h"
+#endif
+
#ifndef XRT_BUILD_DRIVER_WMR
#error "Must only be built with XRT_BUILD_DRIVER_WMR set"
#endif
@@ -296,6 +300,16 @@ wmr_open_system_impl(struct xrt_builder *xb,
right = ht_right;
}
+#ifdef XRT_BUILD_DRIVER_SOLARXR
+ const uint32_t count = solarxr_device_create_xdevs(head->tracking_origin, &xsysd->xdevs[xsysd->xdev_count],
+ ARRAY_SIZE(xsysd->xdevs) - xsysd->xdev_count);
+ if (count != 0) {
+ xsysd->static_roles.body = xsysd->xdevs[xsysd->xdev_count];
+ solarxr_device_set_feeder_devices(xsysd->static_roles.body, xsysd->xdevs, xsysd->xdev_count);
+ }
+ xsysd->xdev_count += count;
+#endif
+
// Assign to role(s).
ubrh->head = head;
--
2.50.1
-312
View File
@@ -1,312 +0,0 @@
From 36c63e58e4d54c31872b95fdc7fb431c8cfc57ab Mon Sep 17 00:00:00 2001
From: Jakob Bornecrantz <tbornecrantz@nvidia.com>
Date: Fri, 15 Nov 2024 22:51:32 +0000
Subject: [PATCH] ipc: Add callbacks and unify main functions
---
src/xrt/ipc/server/ipc_server_interface.h | 58 +++++++++----
src/xrt/ipc/server/ipc_server_process.c | 84 ++++++++++---------
.../targets/service-lib/service_target.cpp | 38 +++++++--
3 files changed, 118 insertions(+), 62 deletions(-)
diff --git a/src/xrt/ipc/server/ipc_server_interface.h b/src/xrt/ipc/server/ipc_server_interface.h
index b870a52c8c..1b44af8a82 100644
--- a/src/xrt/ipc/server/ipc_server_interface.h
+++ b/src/xrt/ipc/server/ipc_server_interface.h
@@ -10,12 +10,10 @@
* @ingroup ipc_server
*/
-#include "xrt/xrt_compiler.h"
#include "xrt/xrt_config_os.h"
+#include "xrt/xrt_results.h"
-#ifndef XRT_OS_ANDROID
#include "util/u_debug_gui.h"
-#endif
#ifdef __cplusplus
@@ -23,7 +21,7 @@ extern "C" {
#endif
-#ifndef XRT_OS_ANDROID
+struct ipc_server;
/*!
* Information passed into the IPC server main function, used for customization
@@ -38,31 +36,57 @@ struct ipc_server_main_info
};
/*!
- * Main entrypoint to the compositor process.
*
* @ingroup ipc_server
*/
-int
-ipc_server_main(int argc, char **argv, const struct ipc_server_main_info *ismi);
-
-#endif
+struct ipc_server_callbacks
+{
+ /*!
+ * The IPC server failed to init.
+ *
+ * @param[in] xret The error code generated during init.
+ * @param[in] data User data given passed into the main function.
+ */
+ void (*init_failed)(xrt_result_t xret, void *data);
+ /*!
+ * The service has completed init and is entering its mainloop.
+ *
+ * @param[in] s The IPC server.
+ * @param[in] xinst Instance that was created by the IPC server.
+ * @param[in] data User data given passed into the main function.
+ */
+ void (*mainloop_entering)(struct ipc_server *s, struct xrt_instance *xinst, void *data);
-#ifdef XRT_OS_ANDROID
+ /*!
+ * The service is leaving the mainloop, after this callback returns the
+ * IPC server will destroy all resources created.
+ *
+ * @param[in] s The IPC server.
+ * @param[in] xinst Instance that was created by the IPC server.
+ * @param[in] data User data given passed into the main function.
+ */
+ void (*mainloop_leaving)(struct ipc_server *s, struct xrt_instance *xinst, void *data);
+};
/*!
- * Main entrypoint to the server process.
+ * Common main function for starting the IPC service.
*
- * @param ps Pointer to populate with the server struct.
- * @param startup_complete_callback Function to call upon completing startup
- * and populating *ps, but before entering
- * the mainloop.
- * @param data user data to pass to your callback.
+ * @ingroup ipc_server
+ */
+int
+ipc_server_main_common(const struct ipc_server_main_info *ismi, const struct ipc_server_callbacks *iscb, void *data);
+
+
+#ifndef XRT_OS_ANDROID
+
+/*!
+ * Main entrypoint to the compositor process.
*
* @ingroup ipc_server
*/
int
-ipc_server_main_android(struct ipc_server **ps, void (*startup_complete_callback)(void *data), void *data);
+ipc_server_main(int argc, char **argv, const struct ipc_server_main_info *ismi);
#endif
diff --git a/src/xrt/ipc/server/ipc_server_process.c b/src/xrt/ipc/server/ipc_server_process.c
index f972d6835a..32bad0ec56 100644
--- a/src/xrt/ipc/server/ipc_server_process.c
+++ b/src/xrt/ipc/server/ipc_server_process.c
@@ -972,9 +972,10 @@ ipc_server_get_system_properties(struct ipc_server *vs, struct xrt_system_proper
return XRT_SUCCESS;
}
-#ifndef XRT_OS_ANDROID
int
-ipc_server_main(int argc, char **argv, const struct ipc_server_main_info *ismi)
+ipc_server_main_common(const struct ipc_server_main_info *ismi,
+ const struct ipc_server_callbacks *callbacks,
+ void *data)
{
xrt_result_t xret = XRT_SUCCESS;
int ret = -1;
@@ -1002,11 +1003,8 @@ ipc_server_main(int argc, char **argv, const struct ipc_server_main_info *ismi)
xret = init_all(s, log_level);
U_LOG_CHK_ONLY_PRINT(log_level, xret, "init_all");
if (xret != XRT_SUCCESS) {
-#ifdef XRT_OS_LINUX
- // Print information how to debug issues.
- print_linux_end_user_failed_information(log_level);
-#endif
-
+ // Propegate the failure.
+ callbacks->init_failed(xret, data);
u_debug_gui_stop(&s->debug_gui);
free(s);
return -1;
@@ -1015,13 +1013,15 @@ ipc_server_main(int argc, char **argv, const struct ipc_server_main_info *ismi)
// Start the debug UI now (if enabled).
u_debug_gui_start(s->debug_gui, s->xinst, s->xsysd);
-#ifdef XRT_OS_LINUX
- // Print a very clear service started message.
- print_linux_end_user_started_information(log_level);
-#endif
+ // Tell the callbacks we are entering the main-loop.
+ callbacks->mainloop_entering(s, s->xinst, data);
+
// Main loop.
ret = main_loop(s);
+ // Tell the callbacks we are leaving the main-loop.
+ callbacks->mainloop_leaving(s, s->xinst, data);
+
// Stop the UI before tearing everything down.
u_debug_gui_stop(&s->debug_gui);
@@ -1038,39 +1038,43 @@ ipc_server_main(int argc, char **argv, const struct ipc_server_main_info *ismi)
return ret;
}
-#endif // !XRT_OS_ANDROID
-
-#ifdef XRT_OS_ANDROID
-int
-ipc_server_main_android(struct ipc_server **ps, void (*startup_complete_callback)(void *data), void *data)
-{
- xrt_result_t xret = XRT_SUCCESS;
- int ret = -1;
-
- // Get log level first.
- enum u_logging_level log_level = debug_get_log_option_ipc_log();
- struct ipc_server *s = U_TYPED_CALLOC(struct ipc_server);
- U_LOG_D("Created IPC server!");
-
- xret = init_all(s, log_level);
- U_LOG_CHK_ONLY_PRINT(log_level, xret, "init_all");
- if (xret != XRT_SUCCESS) {
- free(s);
- startup_complete_callback(data);
- return -1;
- }
+#ifndef XRT_OS_ANDROID
- *ps = s;
- startup_complete_callback(data);
+static void
+init_failed(xrt_result_t xret, void *data)
+{
+#ifdef XRT_OS_LINUX
+ // Print information how to debug issues.
+ print_linux_end_user_failed_information(debug_get_log_option_ipc_log());
+#endif
+}
- ret = main_loop(s);
+static void
+mainloop_entering(struct ipc_server *s, struct xrt_instance *xinst, void *data)
+{
+#ifdef XRT_OS_LINUX
+ // Print a very clear service started message.
+ print_linux_end_user_started_information(s->log_level);
+#endif
+}
- teardown_all(s);
- free(s);
+static void
+mainloop_leaving(struct ipc_server *s, struct xrt_instance *xinst, void *data)
+{
+ // No-op
+}
- U_LOG_I("Server exiting '%i'!", ret);
+int
+ipc_server_main(int argc, char **argv, const struct ipc_server_main_info *ismi)
+{
+ const struct ipc_server_callbacks callbacks = {
+ .init_failed = init_failed,
+ .mainloop_entering = mainloop_entering,
+ .mainloop_leaving = mainloop_leaving,
+ };
- return ret;
+ return ipc_server_main_common(ismi, &callbacks, NULL);
}
-#endif // XRT_OS_ANDROID
+
+#endif // !XRT_OS_ANDROID
diff --git a/src/xrt/targets/service-lib/service_target.cpp b/src/xrt/targets/service-lib/service_target.cpp
index 45877803d3..71c581da6b 100644
--- a/src/xrt/targets/service-lib/service_target.cpp
+++ b/src/xrt/targets/service-lib/service_target.cpp
@@ -1,4 +1,5 @@
// Copyright 2020, Collabora, Ltd.
+// Copyright 2024, Collabora, Ltd.
// SPDX-License-Identifier: BSL-1.0
/*!
* @file
@@ -41,10 +42,11 @@ public:
}
void
- signalStartupComplete()
+ signalStartupComplete(ipc_server *s)
{
std::unique_lock<std::mutex> lock{server_mutex};
startup_complete = true;
+ server = s;
startup_cond.notify_all();
}
@@ -53,15 +55,27 @@ public:
{
std::unique_lock lock(server_mutex);
if (!server && !server_thread) {
- server_thread = std::make_unique<std::thread>(
- [&]() { ipc_server_main_android(&server, signalStartupCompleteTrampoline, this); });
+ server_thread =
+ std::make_unique<std::thread>([&]() { ipc_server_main_common(&ismi, &callbacks, this); });
}
}
static void
- signalStartupCompleteTrampoline(void *data)
+ signalInitFailed(xrt_result_t xret, void *data)
{
- static_cast<IpcServerHelper *>(data)->signalStartupComplete();
+ static_cast<IpcServerHelper *>(data)->signalStartupComplete(nullptr);
+ }
+
+ static void
+ signalStartupCompleteTrampoline(ipc_server *s, xrt_instance *xsint, void *data)
+ {
+ static_cast<IpcServerHelper *>(data)->signalStartupComplete(s);
+ }
+
+ static void
+ signalShuttingDownTrampoline(ipc_server *s, xrt_instance *xsint, void *data)
+ {
+ // No-op
}
int32_t
@@ -114,6 +128,20 @@ private:
return server && completed;
}
+ const struct ipc_server_main_info ismi = {
+ .udgci =
+ {
+ .window_title = "Monado Android Service",
+ .open = U_DEBUG_GUI_OPEN_NEVER,
+ },
+ };
+
+ const struct ipc_server_callbacks callbacks = {
+ .init_failed = signalInitFailed,
+ .mainloop_entering = signalStartupCompleteTrampoline,
+ .mainloop_leaving = signalShuttingDownTrampoline,
+ };
+
//! Reference to the ipc_server, managed by ipc_server_process
struct ipc_server *server = NULL;
--
GitLab
-2
View File
@@ -79,7 +79,6 @@ if (WIVRN_BUILD_SERVER)
main.cpp
sleep_inhibitor.cpp
start_application.cpp
ipc_server_cb.cpp
target_instance_wivrn.cpp
wivrn_ipc.cpp
@@ -87,7 +86,6 @@ if (WIVRN_BUILD_SERVER)
encoder/encoder_settings.cpp
encoder/video_encoder.cpp
encoder/video_encoder_raw.cpp
driver/app_pacer.cpp
driver/clock_offset.cpp
-1
View File
@@ -64,7 +64,6 @@ NLOHMANN_JSON_SERIALIZE_ENUM(
{h265, "hevc"},
{av1, "av1"},
{av1, "AV1"},
{raw, "raw"},
})
NLOHMANN_JSON_SERIALIZE_ENUM(
+19 -4
View File
@@ -75,7 +75,7 @@ wivrn_hmd::wivrn_hmd(wivrn::wivrn_session * cnx,
.supported = {
.orientation_tracking = true,
.position_tracking = true,
.presence = info.user_presence,
.presence = true,
.battery_status = true,
},
.update_inputs = [](xrt_device *) { return XRT_SUCCESS; },
@@ -231,13 +231,28 @@ void wivrn_hmd::update_visibility_mask(const from_headset::visibility_mask_chang
m->at(mask.view_index) = mask.data;
}
bool wivrn_hmd::update_presence(bool new_presence)
bool wivrn_hmd::update_presence(bool new_presence, bool real)
{
if (this->presence.exchange(new_presence) != new_presence)
// if this presence change comes from headset, always honor it,
// otherwise try to keep it in sync with the real presence,
// while still changing presence to false when session is not
// visible
if (real || new_presence == this->real_presence || !new_presence)
{
U_LOG_I("user presence changed to %s", new_presence ? "true" : "false");
if (real && this->real_presence != new_presence)
{
U_LOG_I("Updating real user presence: %s -> %s", real_presence ? "true" : "false", new_presence ? "true" : "false");
this->real_presence = new_presence;
}
if (this->presence == new_presence)
return false;
U_LOG_I("Updating user presence: %s -> %s", this->presence ? "true" : "false", new_presence ? "true" : "false");
this->presence = new_presence;
return true;
}
return false;
}
} // namespace wivrn
+6 -1
View File
@@ -54,6 +54,10 @@ class wivrn_hmd : public xrt_device
from_headset::battery battery{};
std::atomic<bool> presence{true};
// last XR_EVENT_DATA_USER_PRESENCE_CHANGED_EXT from headset
// we must keep track of this to not go out of sync with headset when
// a session state change also triggers presence change
std::atomic<bool> real_presence{true};
thread_safe<std::array<std::optional<from_headset::visibility_mask_changed::masks>, 2>> visibility_mask;
wivrn::wivrn_session * cnx;
@@ -82,6 +86,7 @@ public:
void update_battery(const from_headset::battery &);
void update_tracking(const from_headset::tracking &, const clock_offset &);
void update_visibility_mask(const from_headset::visibility_mask_changed &);
bool update_presence(bool);
// real if this update comes from a presence changed event
bool update_presence(bool new_presence, bool real);
};
} // namespace wivrn
+28 -90
View File
@@ -25,8 +25,6 @@
#include "main/comp_compositor.h"
#include "main/comp_main_interface.h"
#include "main/comp_target.h"
#include "server/ipc_server.h"
#include "target_instance_wivrn.h"
#include "util/u_builders.h"
#include "util/u_logging.h"
#include "util/u_system.h"
@@ -141,7 +139,7 @@ bool wivrn::tracking_control_t::set_enabled(to_headset::tracking_control::id id,
return changed;
}
wivrn::wivrn_session::wivrn_session(std::unique_ptr<wivrn_connection> connection, instance & inst, u_system & system) :
wivrn::wivrn_session::wivrn_session(std::unique_ptr<wivrn_connection> connection, u_system & system) :
xrt_system_devices{
.get_roles = [](xrt_system_devices * self, xrt_system_roles * out_roles) { return ((wivrn_session *)self)->get_roles(out_roles); },
.feature_inc = [](xrt_system_devices * self, xrt_device_feature_type f) { return ((wivrn_session *)self)->feature_inc(f); },
@@ -149,7 +147,6 @@ wivrn::wivrn_session::wivrn_session(std::unique_ptr<wivrn_connection> connection
.destroy = [](xrt_system_devices * self) { delete ((wivrn_session *)self); },
},
connection(std::move(connection)),
inst(inst),
xrt_system(system),
hmd(this, get_info()),
left_controller(0, &hmd, this),
@@ -308,7 +305,6 @@ wivrn_session::~wivrn_session()
}
xrt_result_t wivrn::wivrn_session::create_session(std::unique_ptr<wivrn_connection> connection,
instance & inst,
u_system & system,
xrt_system_devices ** out_xsysd,
xrt_space_overseer ** out_xspovrs,
@@ -317,7 +313,7 @@ xrt_result_t wivrn::wivrn_session::create_session(std::unique_ptr<wivrn_connecti
std::unique_ptr<wivrn_session> self;
try
{
self.reset(new wivrn_session(std::move(connection), inst, system));
self.reset(new wivrn_session(std::move(connection), system));
}
catch (std::exception & e)
{
@@ -334,7 +330,6 @@ xrt_result_t wivrn::wivrn_session::create_session(std::unique_ptr<wivrn_connecti
U_LOG_E("Failed to create system compositor");
return xret;
}
self->system_compositor = *out_xsysc;
u_builder_create_space_overseer_legacy(
&self->xrt_system.broadcast,
@@ -673,34 +668,49 @@ void wivrn_session::operator()(from_headset::session_state_changed && event)
{
U_LOG_I("Session state changed: %s", xr::to_string(event.state));
bool visible, focused;
bool changed = false;
switch (event.state)
{
case XR_SESSION_STATE_SYNCHRONIZED:
visible = false;
focused = false;
changed = hmd.update_presence(false, false);
break;
case XR_SESSION_STATE_VISIBLE:
visible = true;
focused = false;
changed = hmd.update_presence(true, false);
break;
case XR_SESSION_STATE_FOCUSED:
visible = true;
focused = true;
changed = hmd.update_presence(true, false);
break;
default:
visible = false;
focused = false;
break;
return;
}
scoped_lock lock(inst.server->global_state.lock);
for (auto & t: inst.server->threads)
if (changed)
{
if (t.ics.server_thread_index < 0 or t.ics.xc == nullptr)
continue;
bool current = t.ics.client_state.session_overlay or
inst.server->global_state.active_client_index == t.ics.server_thread_index;
xrt_syscomp_set_state(system_compositor, t.ics.xc, visible and current, focused and current);
xrt_session_event_user_presence_change event = {
.type = XRT_SESSION_EVENT_USER_PRESENCE_CHANGE,
};
hmd.get_presence(&event.is_user_present);
push_event({.presence_change = event});
}
push_event(
{
.state = {
.type = XRT_SESSION_EVENT_STATE_CHANGE,
.visible = visible,
.focused = focused,
},
});
}
void wivrn_session::operator()(from_headset::user_presence_changed && event)
{
if (hmd.update_presence(event.present))
if (hmd.update_presence(event.present, true))
push_event(
{
.presence_change = {
@@ -783,54 +793,6 @@ void wivrn_session::operator()(const from_headset::start_app & request)
send_to_main(request);
}
void wivrn_session::operator()(const from_headset::get_running_applications &)
{
scoped_lock lock(inst.server->global_state.lock);
to_headset::running_applications msg{};
for (auto & t: inst.server->threads)
{
if (t.ics.server_thread_index < 0 or t.ics.xc == nullptr)
continue;
// nasty volatile
std::array<char, sizeof(t.ics.client_state.info.application_name)> tmp;
for (size_t i = 0; i + 1 < tmp.size(); ++i)
tmp[i] = t.ics.client_state.info.application_name[i];
tmp.back() = 0;
msg.applications.push_back(
{
.name = std::string(tmp.data()),
.id = t.ics.client_state.id,
.overlay = t.ics.client_state.session_overlay,
.active = t.ics.server_thread_index == inst.server->global_state.active_client_index,
});
}
connection->send_control(std::move(msg));
}
void wivrn_session::operator()(const from_headset::set_active_application & req)
{
ipc_server_set_active_client(inst.server, req.id);
ipc_server_update_state(inst.server);
// Send a refreshed application list
(*this)(from_headset::get_running_applications{});
}
void wivrn_session::operator()(const from_headset::stop_application & req)
{
scoped_lock lock(inst.server->global_state.lock);
for (auto & t: inst.server->threads)
{
if (t.ics.client_state.id == req.id)
{
U_LOG_I("Notify session loss pending for %s", t.ics.client_state.info.application_name);
auto when = os_monotonic_get_ns() + 200 * U_TIME_1MS_IN_NS;
xrt_syscomp_notify_loss_pending(system_compositor, t.ics.xc, when);
session_loss.lock()->emplace(when, req.id);
break;
}
}
}
void wivrn_session::operator()(audio_data && data)
{
if (audio_handle)
@@ -915,7 +877,6 @@ void wivrn_session::run(std::stop_token stop)
refresh.adjust(*connection);
}
}
poll_session_loss();
connection->poll(*this, 20);
}
catch (const std::exception & e)
@@ -1019,29 +980,6 @@ void wivrn_session::reconnect()
}
}
void wivrn_session::poll_session_loss()
{
auto locked = session_loss.lock();
auto now = os_monotonic_get_ns();
if (locked->empty())
return;
auto it = locked->begin();
scoped_lock lock(inst.server->global_state.lock);
while (it != locked->end() and it->first <= now)
{
for (auto & t: inst.server->threads)
{
if (t.ics.client_state.id == it->second)
{
U_LOG_I("Terminating %s", t.ics.client_state.info.application_name);
xrt_syscomp_notify_lost(system_compositor, t.ics.xc);
break;
}
}
it = locked->erase(it);
}
}
xrt_result_t wivrn_session::get_roles(xrt_system_roles * out_roles)
{
std::lock_guard lock(roles_mutex);
+1 -15
View File
@@ -21,7 +21,6 @@
#include "clock_offset.h"
#include "driver/app_pacer.h"
#include "utils/thread_safe.h"
#include "wivrn_connection.h"
#include "wivrn_controller.h"
#include "wivrn_hand_interaction.h"
@@ -32,7 +31,6 @@
#include "xrt/xrt_system.h"
#include <atomic>
#include <fstream>
#include <map>
#include <memory>
#include <mutex>
#include <shared_mutex>
@@ -45,7 +43,6 @@ union xrt_session_event;
namespace wivrn
{
class instance;
class wivrn_eye_tracker;
class wivrn_fb_face2_tracker;
class wivrn_htc_face_tracker;
@@ -95,12 +92,10 @@ class wivrn_session : public xrt_system_devices
{
friend wivrn_comp_target_factory;
std::unique_ptr<wivrn_connection> connection;
instance & inst;
pacing_app_factory app_pacers;
u_system & xrt_system;
xrt_space_overseer * space_overseer;
xrt_system_compositor * system_compositor;
std::mutex roles_mutex;
xrt_system_roles roles{
@@ -136,18 +131,14 @@ class wivrn_session : public xrt_system_devices
std::shared_ptr<audio_device> audio_handle;
// when sessions shall be destroyed, key is timestap, value is client id
thread_safe<std::map<int64_t, int32_t>> session_loss;
std::jthread thread;
wivrn_session(std::unique_ptr<wivrn_connection> connection, instance &, u_system &);
wivrn_session(std::unique_ptr<wivrn_connection> connection, u_system &);
public:
~wivrn_session();
static xrt_result_t create_session(std::unique_ptr<wivrn_connection> connection,
instance & instance,
u_system & system,
xrt_system_devices ** out_xsysd,
xrt_space_overseer ** out_xspovrs,
@@ -197,9 +188,6 @@ public:
void operator()(from_headset::override_foveation_center &&);
void operator()(from_headset::get_application_list &&);
void operator()(const from_headset::start_app &);
void operator()(const from_headset::get_running_applications &);
void operator()(const from_headset::set_active_application &);
void operator()(const from_headset::stop_application &);
void operator()(audio_data &&);
void operator()(to_monado::disconnect &&);
@@ -231,8 +219,6 @@ private:
void run(std::stop_token stop);
void reconnect();
void poll_session_loss();
// xrt_system implementation
xrt_result_t get_roles(xrt_system_roles * out_roles);
xrt_result_t feature_inc(xrt_device_feature_type type);
-4
View File
@@ -70,7 +70,6 @@ static void split_bitrate(std::vector<wivrn::encoder_settings> & encoders, uint6
break;
case wivrn::h265:
case wivrn::av1:
case wivrn::raw:
break;
}
encoder.bitrate = w;
@@ -297,9 +296,6 @@ static void fill_defaults(wivrn_vk_bundle & bundle, const std::vector<wivrn::vid
config.codec = h264; // this will fail if 10-bit is enabled
#endif
if (config.name == encoder_raw)
config.codec = raw;
if (not config.codec)
config.codec = bit_depth == 10 ? h265 : h264;
}
@@ -58,8 +58,6 @@ const char * encoder(video_codec codec)
return "hevc_vaapi";
case video_codec::av1:
return "av1_vaapi";
case video_codec::raw:
break;
}
throw std::runtime_error("invalid codec " + std::to_string(int(codec)));
}
@@ -241,8 +239,6 @@ video_encoder_va::video_encoder_va(wivrn_vk_bundle & vk,
case video_codec::av1:
encoder_ctx->profile = FF_PROFILE_AV1_MAIN;
break;
case video_codec::raw:
throw std::runtime_error("raw codec not supported");
}
for (auto option: settings.options)
{
-12
View File
@@ -42,7 +42,6 @@
#include "video_encoder_vulkan_h264.h"
// #include "video_encoder_vulkan_h265.h"
#endif
#include "video_encoder_raw.h"
namespace wivrn
{
@@ -127,8 +126,6 @@ std::unique_ptr<video_encoder> video_encoder::create(
// break;
case video_codec::av1:
throw std::runtime_error("av1 not supported for vulkan video encode");
case video_codec::raw:
throw std::runtime_error("raw codec only supported on raw encoder");
}
#else
throw std::runtime_error("Vulkan video encode not enabled");
@@ -158,12 +155,6 @@ std::unique_ptr<video_encoder> video_encoder::create(
throw std::runtime_error("vaapi support not enabled");
#endif
}
if (settings.encoder_name == encoder_raw)
{
res = std::make_unique<video_encoder_raw>(wivrn_vk, settings, fps, stream_idx);
}
if (not res)
throw std::runtime_error("Failed to create encoder " + settings.encoder_name);
@@ -183,9 +174,6 @@ std::unique_ptr<video_encoder> video_encoder::create(
case av1:
file += ".av1";
break;
case raw:
file += ".yuv";
break;
}
res->video_dump.open(file);
}
-1
View File
@@ -43,7 +43,6 @@ inline const char * encoder_nvenc = "nvenc";
inline const char * encoder_vaapi = "vaapi";
inline const char * encoder_x264 = "x264";
inline const char * encoder_vulkan = "vulkan";
inline const char * encoder_raw = "raw";
class video_encoder
{
-4
View File
@@ -74,8 +74,6 @@ static auto encode_guid(video_codec codec)
return NV_ENC_CODEC_HEVC_GUID;
case av1:
return NV_ENC_CODEC_AV1_GUID;
case raw:
break;
}
throw std::out_of_range("Invalid codec " + std::to_string(codec));
}
@@ -166,8 +164,6 @@ video_encoder_nvenc::video_encoder_nvenc(
params.encodeCodecConfig.av1Config.maxNumRefFramesInDPB = 0;
params.encodeCodecConfig.av1Config.idrPeriod = NVENC_INFINITE_GOPLENGTH;
break;
case video_codec::raw:
throw std::runtime_error("raw codec not supported for nvenc");
}
NV_ENC_INITIALIZE_PARAMS params2{
-121
View File
@@ -1,121 +0,0 @@
/*
* WiVRn VR streaming
* Copyright (C) 2025 Patrick Nicolas <patricknicolas@laposte.net>
*
* 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
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "video_encoder_raw.h"
#include "encoder/encoder_settings.h"
#include "utils/wivrn_vk_bundle.h"
wivrn::video_encoder_raw::video_encoder_raw(
wivrn_vk_bundle & vk,
encoder_settings & settings,
float fps,
uint8_t stream_idx) :
video_encoder(stream_idx, settings.channels, settings.bitrate_multiplier, true)
{
if (settings.bit_depth != 8)
throw std::runtime_error("Raw encoding is only supported for 8 bit");
rect = vk::Rect2D{
.offset = {
.x = settings.offset_x,
.y = settings.offset_y,
},
.extent = {
.width = settings.width,
.height = settings.height,
},
};
vk::DeviceSize buffer_size = settings.width * settings.height;
switch (settings.channels)
{
case to_headset::video_stream_description::channels_t::colour:
buffer_size += buffer_size / 2;
break;
case to_headset::video_stream_description::channels_t::alpha:
break;
}
for (auto & slot: buffers)
{
slot = buffer_allocation(
vk.device,
{
.size = buffer_size,
.usage = vk::BufferUsageFlagBits::eTransferDst,
},
{
.flags = VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT,
.usage = VMA_MEMORY_USAGE_AUTO,
},
"raw stream buffer");
}
}
std::pair<bool, vk::Semaphore> wivrn::video_encoder_raw::present_image(vk::Image y_cbcr, vk::raii::CommandBuffer & cmd_buf, uint8_t slot, uint64_t)
{
std::array regions{
vk::BufferImageCopy{
.imageSubresource = {
.aspectMask = vk::ImageAspectFlagBits::ePlane0,
.baseArrayLayer = uint32_t(channels),
.layerCount = 1,
},
.imageOffset = {
.x = rect.offset.x,
.y = rect.offset.y,
},
.imageExtent = {
.width = rect.extent.width,
.height = rect.extent.height,
.depth = 1,
},
},
vk::BufferImageCopy{
.bufferOffset = rect.extent.width * rect.extent.height,
.imageSubresource = {
.aspectMask = vk::ImageAspectFlagBits::ePlane1,
.baseArrayLayer = uint32_t(channels),
.layerCount = 1,
},
.imageOffset = {
.x = rect.offset.x / 2,
.y = rect.offset.y / 2,
},
.imageExtent = {
.width = rect.extent.width / 2,
.height = rect.extent.height / 2,
.depth = 1,
},
},
};
cmd_buf.copyImageToBuffer(
y_cbcr,
vk::ImageLayout::eTransferSrcOptimal,
buffers[slot],
std::span(regions.data(),
channels == to_headset::video_stream_description::channels_t::colour ? 2 : 1));
return {false, nullptr};
}
std::optional<wivrn::video_encoder::data> wivrn::video_encoder_raw::encode(bool idr, std::chrono::steady_clock::time_point pts, uint8_t slot)
{
return wivrn::video_encoder::data{
.encoder = this,
.span = std::span<uint8_t>((uint8_t *)buffers[slot].map(), buffers[slot].info().size),
};
}
-41
View File
@@ -1,41 +0,0 @@
/*
* WiVRn VR streaming
* Copyright (C) 2025 Patrick Nicolas <patricknicolas@laposte.net>
*
* 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
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#pragma once
#include "video_encoder.h"
#include "vk/allocation.h"
#include <array>
namespace wivrn
{
class video_encoder_raw : public video_encoder
{
std::array<buffer_allocation, num_slots> buffers;
vk::Rect2D rect;
public:
video_encoder_raw(wivrn_vk_bundle & vk, encoder_settings & settings, float fps, uint8_t stream_idx);
std::pair<bool, vk::Semaphore> present_image(vk::Image y_cbcr, vk::raii::CommandBuffer & cmd_buf, uint8_t slot, uint64_t frame_index) override;
std::optional<data> encode(bool idr, std::chrono::steady_clock::time_point pts, uint8_t slot) override;
};
} // namespace wivrn
-48
View File
@@ -1,48 +0,0 @@
/*
* WiVRn VR streaming
* Copyright (C) 2025 Patrick Nicolas <patricknicolas@laposte.net>
*
* 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
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "ipc_server_cb.h"
#include "target_instance_wivrn.h"
#include "utils/method.h"
namespace wivrn
{
void ipc_server_cb::init_failed(xrt_result res)
{
}
void ipc_server_cb::mainloop_entering(ipc_server * server, xrt_instance * xrt_inst)
{
auto inst = static_cast<wivrn::instance *>(xrt_inst);
inst->server = server;
}
void ipc_server_cb::mainloop_leaving(ipc_server * server, xrt_instance * xrt_inst)
{
auto inst = static_cast<wivrn::instance *>(xrt_inst);
inst->server = nullptr;
}
ipc_server_cb::ipc_server_cb() :
ipc_server_callbacks{
.init_failed = method_pointer2<&ipc_server_cb::init_failed>,
.mainloop_entering = method_pointer2<&ipc_server_cb::mainloop_entering>,
.mainloop_leaving = method_pointer2<&ipc_server_cb::mainloop_leaving>,
}
{}
} // namespace wivrn
-35
View File
@@ -1,35 +0,0 @@
/*
* WiVRn VR streaming
* Copyright (C) 2025 Patrick Nicolas <patricknicolas@laposte.net>
*
* 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
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#pragma once
#include "server/ipc_server_interface.h"
namespace wivrn
{
class ipc_server_cb : public ipc_server_callbacks
{
void init_failed(xrt_result);
void mainloop_entering(ipc_server *, xrt_instance *);
void mainloop_leaving(ipc_server *, xrt_instance *);
public:
using base = void;
ipc_server_cb();
};
} // namespace wivrn
+3 -4
View File
@@ -16,7 +16,6 @@
#include "driver/wivrn_connection.h"
#include "exit_codes.h"
#include "hostname.h"
#include "ipc_server_cb.h"
#include "protocol_version.h"
#include "start_application.h"
#include "utils/overloaded.h"
@@ -49,6 +48,7 @@
#include <glib.h>
#include <libnotify/notify.h>
#include <server/ipc_server_interface.h>
#include <shared/ipc_protocol.h>
#include <util/u_file.h>
@@ -249,12 +249,11 @@ void start_server(configuration config)
// foveation code does not allow oversampling
setenv("XRT_COMPOSITOR_SCALE_PERCENTAGE", "100", true);
// FIXME: synchronization fails on gfx pipeline
setenv("XRT_COMPOSITOR_COMPUTE", "1", true);
setenv("AMD_DEBUG", "lowlatencyenc", false);
wivrn::ipc_server_cb server_cb;
ipc_server_main_info server_info{
.udgci = {
.window_title = "WiVRn",
@@ -268,7 +267,7 @@ void start_server(configuration config)
try
{
exit(ipc_server_main_common(&server_info, &server_cb, nullptr));
exit(ipc_server_main(0, 0, &server_info /*argc, argv, ismi*/));
}
catch (std::exception & e)
{
+39 -40
View File
@@ -1,28 +1,16 @@
/*
* WiVRn VR streaming
* Copyright (C) 2025 Patrick Nicolas <patricknicolas@laposte.net>
*
* 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
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
// Copyright 2020-2022, Collabora, Ltd.
// SPDX-License-Identifier: BSL-1.0
/*!
* @file
* @brief Shared default implementation of the instance with compositor.
* @author Jakob Bornecrantz <jakob@collabora.com>
*/
#include "target_instance_wivrn.h"
#include "utils/method.h"
#include "xrt/xrt_instance.h"
#include "xrt/xrt_system.h"
#include "os/os_time.h"
#include "util/u_system.h"
#include "util/u_trace_marker.h"
@@ -31,13 +19,18 @@
#include "driver/wivrn_session.h"
#include "wivrn_ipc.h"
namespace wivrn
{
xrt_result_t instance::create_system(
struct xrt_system ** out_xsys,
struct xrt_system_devices ** out_xsysd,
struct xrt_space_overseer ** out_xspovrs,
struct xrt_system_compositor ** out_xsysc)
/*
*
* Internal functions.
*
*/
static xrt_result_t
wivrn_instance_create_system(struct xrt_instance * xinst,
struct xrt_system ** out_xsys,
struct xrt_system_devices ** out_xsysd,
struct xrt_space_overseer ** out_xspovrs,
struct xrt_system_compositor ** out_xsysc)
{
assert(out_xsysd != NULL);
assert(*out_xsysd == NULL);
@@ -48,7 +41,6 @@ xrt_result_t instance::create_system(
struct xrt_system_compositor * xsysc = NULL;
auto res = wivrn::wivrn_session::create_session(
std::move(connection),
*this,
*u_sys,
out_xsysd,
out_xspovrs,
@@ -57,29 +49,36 @@ xrt_result_t instance::create_system(
return res;
}
xrt_result_t instance::get_prober(struct xrt_prober ** out_xp)
static void
wivrn_instance_destroy(struct xrt_instance * xinst)
{
delete xinst;
}
static xrt_result_t
wivrn_instance_get_prober(struct xrt_instance * xinst, struct xrt_prober ** out_xp)
{
*out_xp = nullptr;
return XRT_ERROR_PROBER_NOT_SUPPORTED;
}
instance::instance() :
xrt_instance{
.create_system = method_pointer<&instance::create_system>,
.get_prober = method_pointer<&instance::get_prober>,
.destroy = [](xrt_instance * ptr) { delete (instance *)ptr; },
.startup_timestamp = os_monotonic_get_ns(),
}
{
}
/*
*
* Exported function(s).
*
*/
} // namespace wivrn
xrt_result_t
xrt_instance_create(struct xrt_instance_info * ii, struct xrt_instance ** out_xinst)
{
u_trace_marker_init();
*out_xinst = new wivrn::instance();
*out_xinst = new xrt_instance{
.create_system = wivrn_instance_create_system,
.get_prober = wivrn_instance_get_prober,
.destroy = wivrn_instance_destroy,
.startup_timestamp = os_monotonic_get_ns(),
};
return XRT_SUCCESS;
}
-41
View File
@@ -1,41 +0,0 @@
/*
* WiVRn VR streaming
* Copyright (C) 2025 Patrick Nicolas <patricknicolas@laposte.net>
*
* 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
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#pragma once
#include "server/ipc_server.h"
#include "xrt/xrt_instance.h"
namespace wivrn
{
class instance : public xrt_instance
{
xrt_result_t create_system(
xrt_system **,
xrt_system_devices **,
xrt_space_overseer **,
xrt_system_compositor **);
xrt_result_t get_prober(xrt_prober **);
public:
ipc_server * server = nullptr;
using base = xrt_instance;
instance();
};
} // namespace wivrn
-8
View File
@@ -32,10 +32,6 @@ struct method_trait<Method, Result (Class::*)(Args...)>
{
return std::invoke(Method, static_cast<Class *>(arg), args...);
}
static Result magic2(Args... args, Class::base * arg)
{
return std::invoke(Method, static_cast<Class *>(arg), args...);
}
};
} // namespace details
@@ -58,8 +54,4 @@ namespace wivrn
// }
template <auto Method>
auto method_pointer = ::details::method_trait<Method>::magic;
// same, but "this" argument is last
template <auto Method>
auto method_pointer2 = ::details::method_trait<Method>::magic2;
} // namespace wivrn
+56
View File
@@ -0,0 +1,56 @@
#!/bin/bash
cd $(dirname $0)/..
WIVRN_CLIENT_POT=$(mktemp)
WIVRN_DASHBOARD_POT=$(mktemp)
xgettext \
--c++ --from-code=UTF-8 \
--keyword=_:1,1t \
--keyword=_S:1,1t \
--keyword=_cS:1c,2,2t \
--keyword=_F:1,1t \
--output=$WIVRN_CLIENT_POT \
--package-name=WiVRn \
$(find client/ -name "*.cpp" | sort)
xgettext \
--c++ --kde --from-code=UTF-8 \
--keyword=i18n:1 \
--keyword=i18nc:1c,2 \
--keyword=i18np:1,2 \
--keyword=i18ncp:1c,2,3 \
--output=$WIVRN_DASHBOARD_POT \
--package-name=WiVRn-dashboard \
$(find dashboard/ -name "*.qml" -o -name "*.cpp" | sort)
sed -i 's/charset=CHARSET/charset=UTF-8/g' $WIVRN_CLIENT_POT $WIVRN_DASHBOARD_POT
RC=0
for i in locale/*
do
if [ -f $i/wivrn.po ]
then
tools/check_po.py $WIVRN_CLIENT_POT $i/wivrn.po $(basename $i)
if [ $? != 0 ]
then
RC=1
fi
fi
if [ -f $i/wivrn-dashboard.po ]
then
tools/check_po.py $WIVRN_DASHBOARD_POT $i/wivrn-dashboard.po $(basename $i)
if [ $? != 0 ]
then
RC=1
fi
fi
done
rm $WIVRN_CLIENT_POT $WIVRN_DASHBOARD_POT
exit $RC