Compare commits

..

191 Commits

Author SHA1 Message Date
Cameron Gutman 0b581011c5 Version 11.0 2023-02-28 21:31:32 -06:00
Cameron Gutman 67bcc56c6d Remove strict codec recovery timeout
Codec recovery depends on incoming frames, so it cannot be reliably time-constrained
2023-02-26 13:26:01 -06:00
Cameron Gutman 7d8cfa3c6a Remove URL filtering to fix wiki links to outside pages 2023-02-25 20:37:49 -06:00
Cameron Gutman f659af29da Fix mDNS detection of hosts with the same IP address
This is the case for PCs running GFE and Sunshine side-by-side.
2023-02-25 20:29:51 -06:00
Cameron Gutman 94b202f7b6 Update moonlight-common-c 2023-02-25 13:13:05 -06:00
Cameron Gutman ca86fdafab Merge remote-tracking branch 'origin/weblate' 2023-02-25 13:01:55 -06:00
Cameron Gutman 370dbb1a10 Send non-ASCII soft keys as UTF-8 2023-02-25 12:49:55 -06:00
luten145 f77543cd9b Added clipboard support
You can paste Android's clipboard contents.
2023-02-25 12:30:58 -06:00
Steffen_LT 7104e0d725 Relative mouse fix on Chromebooks with touchscreens 2023-02-25 12:28:49 -06:00
weng weng 230a67cac0 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (230 of 230 strings)

Translation: Moonlight Game Streaming/moonlight-android
Translate-URL: https://hosted.weblate.org/projects/moonlight/moonlight-android/zh_Hans/
2023-02-24 08:36:54 +01:00
Jen Kung-chih a695f38974 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (230 of 230 strings)

Translation: Moonlight Game Streaming/moonlight-android
Translate-URL: https://hosted.weblate.org/projects/moonlight/moonlight-android/zh_Hant/
2023-02-23 07:38:22 +01:00
Cameron Gutman 151c09f098 Merge remote-tracking branch 'origin/weblate' 2023-02-21 22:44:00 -06:00
gallegonovato 8200f5690d Translated using Weblate (Spanish)
Currently translated at 100.0% (230 of 230 strings)

Translation: Moonlight Game Streaming/moonlight-android
Translate-URL: https://hosted.weblate.org/projects/moonlight/moonlight-android/es/
2023-02-22 05:43:42 +01:00
Cameron Gutman 77a8cf2704 Remove the touchscreen trackpad option hiding entirely
Fixes #1184
2023-02-21 22:42:35 -06:00
Cameron Gutman fe424961e1 Update Fastlane metadata 2023-02-21 22:37:24 -06:00
Cameron Gutman b668cb78ff Update to AGP 7.4.1 2023-02-21 22:36:04 -06:00
bladeoner 48278419b0 Update Gradle to version 7.6 2023-02-21 22:29:32 -06:00
Cameron Gutman 632da03667 Merge remote-tracking branch 'origin/weblate' 2023-02-21 02:15:03 -06:00
Cameron Gutman d36b73fc1b Fix crash with IPv4-mapped IPv6 addresses 2023-02-20 23:31:53 -06:00
Cameron Gutman 292ed35555 Update moonlight-common-c 2023-02-20 23:24:32 -06:00
Cameron Gutman 02d0ad496f Fix error message being displayed even after successful WoL 2023-02-20 23:01:46 -06:00
Cameron Gutman eb2fc7af40 Add GameStream EOL notice for GFE PCs 2023-02-20 23:01:08 -06:00
Cameron Gutman 6550deedbb Fix handling of missing addresses 2023-02-20 22:35:27 -06:00
Cameron Gutman 80acd9b9eb Modernize HTTPS launch/resume for Sunshine 2023-02-20 22:04:41 -06:00
Cameron Gutman b961636f02 Plumb HDR metadata into MediaCodec 2023-02-20 21:42:45 -06:00
Cameron Gutman f4df0714b5 Implement horizontal scrolling with Sunshine 2023-02-20 19:56:01 -06:00
Cameron Gutman 91dd7b7049 Plumb non-normalized key flag extension for Sunshine 2023-02-20 19:52:52 -06:00
Karim Mreisi 121bef7d2d fix: use address and port for details hash 2023-02-20 13:32:55 -06:00
Karim Mreisi 3a9eabf50b fix: support host names with _
Use a JSON to properly encapsule different computer addresses and their
port, instead of using "_" as separator.

Fix usage of '_' in computer host names / domain names.
2023-02-20 13:32:55 -06:00
bladeoner c8198b4091 Update bug and feature_request forms 2023-02-20 13:25:03 -06:00
Cameron Gutman e4538e4a51 Only remove touchscreen-trackpad option on TV devices
Some VR headset devices can make use of this without a proper touchscreen
2023-02-20 13:22:01 -06:00
Cameron Gutman b47f3ef397 Remove input batching to replace with common-c implementation 2023-02-20 13:19:59 -06:00
Jen Kung-chih 6e096c0ac3 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (229 of 229 strings)

Translation: Moonlight Game Streaming/moonlight-android
Translate-URL: https://hosted.weblate.org/projects/moonlight/moonlight-android/zh_Hant/
2023-02-14 07:37:50 +01:00
weng weng ee3b4686bf Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (229 of 229 strings)

Translation: Moonlight Game Streaming/moonlight-android
Translate-URL: https://hosted.weblate.org/projects/moonlight/moonlight-android/zh_Hans/
2023-02-14 07:37:49 +01:00
gallegonovato 759b77eafe Translated using Weblate (Spanish)
Currently translated at 100.0% (229 of 229 strings)

Translation: Moonlight Game Streaming/moonlight-android
Translate-URL: https://hosted.weblate.org/projects/moonlight/moonlight-android/es/
2023-02-12 22:38:54 +01:00
Cameron Gutman de15ec666f Merge remote-tracking branch 'origin/weblate' 2023-02-11 14:27:49 -06:00
Cameron Gutman 3de86f15af Disable HEVC RFI on platforms with older Tegra BSPs
Fixes #1177
2023-02-11 14:26:54 -06:00
Cameron Gutman 1b9dff719c Remove most NVIDIA-specific references in code 2023-02-11 14:25:54 -06:00
Jorys Paulin abcf4e3d4a Translated using Weblate (French)
Currently translated at 100.0% (228 of 228 strings)

Translation: Moonlight Game Streaming/moonlight-android
Translate-URL: https://hosted.weblate.org/projects/moonlight/moonlight-android/fr/
2023-02-09 11:38:54 +01:00
Jen Kung-chih 9823abe686 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (228 of 228 strings)

Translation: Moonlight Game Streaming/moonlight-android
Translate-URL: https://hosted.weblate.org/projects/moonlight/moonlight-android/zh_Hant/
2023-01-24 09:51:09 +01:00
LUTEN 723e08f69b Translated using Weblate (Korean)
Currently translated at 100.0% (228 of 228 strings)

Translation: Moonlight Game Streaming/moonlight-android
Translate-URL: https://hosted.weblate.org/projects/moonlight/moonlight-android/ko/
2023-01-12 08:49:04 +01:00
ssantos daf0a0891e Translated using Weblate (Portuguese)
Currently translated at 100.0% (228 of 228 strings)

Translation: Moonlight Game Streaming/moonlight-android
Translate-URL: https://hosted.weblate.org/projects/moonlight/moonlight-android/pt/
2023-01-10 19:51:36 +01:00
Jen Kung-chih 49dc68f77f Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (228 of 228 strings)

Translation: Moonlight Game Streaming/moonlight-android
Translate-URL: https://hosted.weblate.org/projects/moonlight/moonlight-android/zh_Hant/
2022-12-30 06:51:13 +01:00
gallegonovato f81a1c36cc Translated using Weblate (Spanish)
Currently translated at 100.0% (228 of 228 strings)

Translation: Moonlight Game Streaming/moonlight-android
Translate-URL: https://hosted.weblate.org/projects/moonlight/moonlight-android/es/
2022-12-24 15:51:06 +01:00
Dan 9a11a771dd Translated using Weblate (Ukrainian)
Currently translated at 100.0% (228 of 228 strings)

Translation: Moonlight Game Streaming/moonlight-android
Translate-URL: https://hosted.weblate.org/projects/moonlight/moonlight-android/uk/
2022-12-21 01:50:21 +01:00
Translator-3000 b56a4b8b49 Translated using Weblate (Italian)
Currently translated at 100.0% (228 of 228 strings)

Translation: Moonlight Game Streaming/moonlight-android
Translate-URL: https://hosted.weblate.org/projects/moonlight/moonlight-android/it/
2022-12-19 18:49:33 +01:00
Cameron Gutman 1aa963992b Improve Xbox 360W controller numbering 2022-12-16 00:35:19 -06:00
Cameron Gutman 1b601324d0 Remove automatic detection logic for CONFIG_JOYSTICK_XPAD_LEDS=y
It doesn't work due to Android app sandboxing
2022-12-16 00:20:06 -06:00
Cameron Gutman 1aea723ef0 Rework Xbox360W support to handle multiple controllers 2022-12-15 23:33:48 -06:00
Cameron Gutman 1e828a10b9 Request our desired refresh rate rather than the actual frame rate
This ensures we'll get the highest compatible refresh rate rather than the lowest.
2022-12-15 22:53:25 -06:00
Cameron Gutman 970423f873 Use setFrameRate() instead of preferredDisplayModeId if the modes differ only by refresh rate
This seems to avoid a bug on the Chromecast 4K where it can decide to switch to 4K24 instead of 4K60

Fixes #1151
2022-12-14 23:05:22 -06:00
Cameron Gutman 2d7493fd1e Improve check for kernel support for Xbox360W LED configuration 2022-12-14 21:49:42 -06:00
sivan-koren fa7eb1c4b1 Set Lights on XBOX360 Wireless Controllers for New Android/Google TVs Through 2023 - Fixes: #1061 (#1157) 2022-12-14 21:29:41 -06:00
SpeedPartner 4916af3697 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (228 of 228 strings)

Translation: Moonlight Game Streaming/moonlight-android
Translate-URL: https://hosted.weblate.org/projects/moonlight/moonlight-android/zh_Hans/
2022-12-08 14:47:25 +01:00
Eric 8484bf1cb9 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (228 of 228 strings)

Translation: Moonlight Game Streaming/moonlight-android
Translate-URL: https://hosted.weblate.org/projects/moonlight/moonlight-android/zh_Hans/
2022-12-08 14:47:25 +01:00
SpeedPartner 005afb3c73 Translated using Weblate (Chinese (Simplified))
Currently translated at 98.6% (225 of 228 strings)

Translation: Moonlight Game Streaming/moonlight-android
Translate-URL: https://hosted.weblate.org/projects/moonlight/moonlight-android/zh_Hans/
2022-12-07 14:04:03 +01:00
Jen Kung-chih 84b0d004b9 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (228 of 228 strings)

Translation: Moonlight Game Streaming/moonlight-android
Translate-URL: https://hosted.weblate.org/projects/moonlight/moonlight-android/zh_Hant/
2022-12-07 11:47:26 +01:00
Cameron Gutman aa41bf8d97 Version 10.11 2022-12-04 13:54:37 -06:00
Cameron Gutman fba9a125bf Merge remote-tracking branch 'origin/weblate' 2022-12-01 18:40:24 -06:00
jonathanmasseurca 27312bd146 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (228 of 228 strings)

Translation: Moonlight Game Streaming/moonlight-android
Translate-URL: https://hosted.weblate.org/projects/moonlight/moonlight-android/pt_BR/
2022-12-02 01:39:46 +01:00
Jen Kung-chih 8f0c267ab8 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (228 of 228 strings)

Translation: Moonlight Game Streaming/moonlight-android
Translate-URL: https://hosted.weblate.org/projects/moonlight/moonlight-android/zh_Hant/
2022-12-02 01:39:46 +01:00
Zaraza225 a15d6a6b42 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (228 of 228 strings)

Translation: Moonlight Game Streaming/moonlight-android
Translate-URL: https://hosted.weblate.org/projects/moonlight/moonlight-android/uk/
2022-12-02 01:39:45 +01:00
jonathanmasseurca 8f9061b250 Translated using Weblate (French)
Currently translated at 100.0% (228 of 228 strings)

Translation: Moonlight Game Streaming/moonlight-android
Translate-URL: https://hosted.weblate.org/projects/moonlight/moonlight-android/fr/
2022-12-02 01:39:45 +01:00
Cameron Gutman ec57499e08 Handle escaping and unescaping IPv6 addresses in AddressTuple 2022-12-01 18:26:40 -06:00
Cameron Gutman 381598c5b6 Fix handling of IPv6 literals when adding a PC
Fixes #1152
2022-12-01 18:26:40 -06:00
Cameron Gutman 452d020da5 Merge remote-tracking branch 'origin/weblate' 2022-11-30 21:07:34 -06:00
Eric b5f875c2e5 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.1% (226 of 228 strings)

Translation: Moonlight Game Streaming/moonlight-android
Translate-URL: https://hosted.weblate.org/projects/moonlight/moonlight-android/zh_Hans/
2022-12-01 04:06:55 +01:00
Brandon Goldberg a31daeda96 Translated using Weblate (Spanish)
Currently translated at 100.0% (228 of 228 strings)

Translation: Moonlight Game Streaming/moonlight-android
Translate-URL: https://hosted.weblate.org/projects/moonlight/moonlight-android/es/
2022-12-01 04:06:55 +01:00
Cameron Gutman 437f52f53a Tweak full range option text 2022-11-30 00:16:05 -06:00
Cameron Gutman 33f0f7ecf0 Use Ctrl+Alt+Shift+Z as the unbind toggle to match other Moonlight clients 2022-11-29 23:28:13 -06:00
Cameron Gutman 6777e79e70 Fix inverted mouse capture bug 2022-11-29 23:25:39 -06:00
Cameron Gutman 16d1e6181b Update moonlight-common-c 2022-11-29 19:16:33 -06:00
Cameron Gutman a6c8db6c2c Introduce full range color option 2022-11-29 19:10:19 -06:00
Cameron Gutman 24aa0fecbe Revise HEVC option text 2022-11-29 19:05:30 -06:00
Cameron Gutman 1a776b1990 Add Czech translation to language list
Fixes #1147
2022-11-29 18:42:28 -06:00
Cameron Gutman 27df265c81 Merge remote-tracking branch 'origin/weblate' 2022-11-29 18:37:27 -06:00
Zaraza225 84c0372719 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (226 of 226 strings)

Translation: Moonlight Game Streaming/moonlight-android
Translate-URL: https://hosted.weblate.org/projects/moonlight/moonlight-android/uk/
2022-11-23 21:47:27 +01:00
Cameron Gutman 3879e57c4c Track network changes to invalidate PC online state appropriately 2022-11-21 23:15:19 -06:00
Cameron Gutman dcc3dcdaba Only match ports if the PC is online 2022-11-21 23:00:51 -06:00
Loïc Hesling d166635c7b Translated using Weblate (French)
Currently translated at 100.0% (226 of 226 strings)

Translation: Moonlight Game Streaming/moonlight-android
Translate-URL: https://hosted.weblate.org/projects/moonlight/moonlight-android/fr/
2022-11-17 12:47:40 +01:00
Cameron Gutman 33d484b7d1 Remove specific RFI opt-in for Sabrina since it's supported out of the box in Android 12 2022-11-13 19:10:35 -06:00
luten145 26bff28e4d Added MetaKey(WindowKey) Packet
Allows you to use Windows key combinations.

ex) Win+Tab , Win+D
2022-11-13 17:15:22 -06:00
Cameron Gutman 56eddff8d6 Default to Rec 709 on modern devices
Fixes #1138
Closes #1143
2022-11-13 13:47:41 -06:00
Cameron Gutman 37b9133eb6 Correct media performance class check
Media performance class is 12+ even though it has values for 11+
2022-11-13 13:27:43 -06:00
Cameron Gutman 4a64967b1f Ungrab meta key capture when toggling input capture 2022-11-13 13:19:23 -06:00
Translator-3000 23152b1264 Translated using Weblate (Italian)
Currently translated at 100.0% (226 of 226 strings)

Translation: Moonlight Game Streaming/moonlight-android
Translate-URL: https://hosted.weblate.org/projects/moonlight/moonlight-android/it/
2022-11-13 13:50:24 +01:00
Cameron Gutman 00415aac79 Version 10.10 2022-11-11 12:21:25 -06:00
Cameron Gutman cbe602655c Pass active HTTPS port if the HTTP port matches the active address 2022-11-09 20:53:06 -06:00
Cameron Gutman 236d8b7030 Extend timeouts for the PC's active address 2022-11-09 20:31:58 -06:00
Cameron Gutman 392e3c7fe3 Increase connection timeouts when the PC is presumed to be online 2022-11-09 20:22:07 -06:00
Cameron Gutman 57f55e6856 Use the current HTTP port as the default if ExternalPort doesn't exist 2022-11-09 19:56:46 -06:00
Cameron Gutman de54b27013 Plumb HTTPS port into the Game activity to avoid having to look it up again 2022-11-09 19:55:42 -06:00
Dominik Chrástecký c11338039f Translated using Weblate (Czech)
Currently translated at 100.0% (226 of 226 strings)

Translation: Moonlight Game Streaming/moonlight-android
Translate-URL: https://hosted.weblate.org/projects/moonlight/moonlight-android/cs/
2022-11-09 16:47:44 +01:00
Jen Kung-chih e712669d32 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (226 of 226 strings)

Translation: Moonlight Game Streaming/moonlight-android
Translate-URL: https://hosted.weblate.org/projects/moonlight/moonlight-android/zh_Hant/
2022-11-09 16:47:44 +01:00
Brandon Goldberg 3768ae33b7 Translated using Weblate (Spanish)
Currently translated at 100.0% (226 of 226 strings)

Translation: Moonlight Game Streaming/moonlight-android
Translate-URL: https://hosted.weblate.org/projects/moonlight/moonlight-android/es/
2022-11-09 16:47:43 +01:00
Cameron Gutman fdc39f0041 Merge remote-tracking branch 'origin/weblate' 2022-11-06 19:04:43 -06:00
Cameron Gutman 7f3b0b03a6 Add C2 equivalents for OMX decoders for futureproofing 2022-11-06 18:17:48 -06:00
Cameron Gutman 4a6a39dd4c Disable HEVC RFI on Fire TV 3 due to decoder hangs 2022-11-06 18:13:19 -06:00
Cameron Gutman 6a8486a076 Fix propagation of external port after guessing 2022-11-06 18:06:18 -06:00
Cameron Gutman 08a8a3043f Update moonlight-common-c with improved high quality audio 2022-11-06 17:37:13 -06:00
Cameron Gutman 7af290b6e1 Implement support for non-default ports with Sunshine
Fixes #1115
2022-11-06 17:36:46 -06:00
Cameron Gutman a896f9a28f Use the HTTPS port specified in the serverinfo response 2022-11-06 15:44:37 -06:00
Cameron Gutman ea003483c4 Plumb port numbers from mDNS discovery 2022-11-06 14:41:02 -06:00
Cameron Gutman 5b73317e30 Fix error handling if the server address cannot be resolved 2022-11-06 14:34:31 -06:00
Howard Wu 1af64b9985 Set forceDarkAllowed to false
Some system like MIUI forced inverse color (which cannot be turned off for games with night mode on) causes games without covers to become white, which like the game title color causes unreadability, this change prevents that problem.

ref https://stackoverflow.com/questions/63777438/how-to-avoid-forced-dark-theme-in-my-app-when-devices-can-force-it-at-app-level
2022-11-04 22:01:08 -05:00
Cameron Gutman af784cf79b Fix typo in boolean logic 2022-11-04 01:22:19 -05:00
Cameron Gutman a2b2131beb Add support for codec flush recovery 2022-11-04 01:20:00 -05:00
Cameron Gutman 2433ce8d24 Fix crashes on Fire OS 8 2022-11-03 23:17:15 -05:00
Cameron Gutman 8b861750e5 Update moonlight-common-c with improved video and audio packet loss handling 2022-11-03 22:20:39 -05:00
Cameron Gutman 99fcd3c669 Improve LAN/WAN detection for IPv6 and cellular connections 2022-11-03 22:19:48 -05:00
Cameron Gutman 0ddd8df272 Use HEVC by default if the decoder supports FEATURE_LowLatency or the media performance class is 12+ 2022-10-31 01:05:01 -05:00
TacoTheDank a96e508ffb Use try-with-resources 2022-10-31 00:33:09 -05:00
이정희 1f21d12d2b Translated using Weblate (Korean)
Currently translated at 100.0% (226 of 226 strings)

Translation: Moonlight Game Streaming/moonlight-android
Translate-URL: https://hosted.weblate.org/projects/moonlight/moonlight-android/ko/
2022-10-30 15:07:04 +01:00
sanhoe dd782ac4b2 Translated using Weblate (Korean)
Currently translated at 100.0% (226 of 226 strings)

Translation: Moonlight Game Streaming/moonlight-android
Translate-URL: https://hosted.weblate.org/projects/moonlight/moonlight-android/ko/
2022-10-29 06:12:57 +02:00
Cameron Gutman 51594e00b8 Revert "Use Rec 2020 colorspace for WCG support even if HDR is off on the host"
Rec 2020 conversion causes colors to be blown out in SDR

This reverts commit 6c85f5f8c3.
2022-10-13 01:18:26 -05:00
Cameron Gutman 6c85f5f8c3 Use Rec 2020 colorspace for WCG support even if HDR is off on the host 2022-10-13 00:52:45 -05:00
Cameron Gutman d0432de981 Plumb colorspace and color range into MediaCodecDecoderRenderer 2022-10-13 00:51:15 -05:00
Cameron Gutman 2cbc94e51d Allow a pairing attempt even if the PC is busy
Pairing while busy doesn't work with GFE but works with Sunshine
2022-10-12 22:15:41 -05:00
Cameron Gutman 3ea2aa1f74 Enable HEVC RFI on Fire TV and Chromecast devices 2022-10-12 21:50:40 -05:00
Cameron Gutman 1076b516d6 Enable HEVC RFI for decoders that support low latency options 2022-10-12 21:25:48 -05:00
bruh 4e87d25851 Translated using Weblate (Vietnamese)
Currently translated at 93.8% (212 of 226 strings)

Translation: Moonlight Game Streaming/moonlight-android
Translate-URL: https://hosted.weblate.org/projects/moonlight/moonlight-android/vi/
2022-10-12 18:26:37 +02:00
LedyBacer dadd3c7292 Translated using Weblate (Russian)
Currently translated at 100.0% (226 of 226 strings)

Translation: Moonlight Game Streaming/moonlight-android
Translate-URL: https://hosted.weblate.org/projects/moonlight/moonlight-android/ru/
2022-10-12 18:26:37 +02:00
Jen Kung-chih 9f8abe35f9 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (226 of 226 strings)

Translation: Moonlight Game Streaming/moonlight-android
Translate-URL: https://hosted.weblate.org/projects/moonlight/moonlight-android/zh_Hant/
2022-10-10 19:59:49 +02:00
Eric 0f869a7414 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (226 of 226 strings)

Translation: Moonlight Game Streaming/moonlight-android
Translate-URL: https://hosted.weblate.org/projects/moonlight/moonlight-android/zh_Hans/
2022-10-10 19:59:49 +02:00
Cameron Gutman aede16c85c Version 10.9 2022-10-07 22:02:56 -05:00
Cameron Gutman 61a82e6394 Merge remote-tracking branch 'origin/weblate' 2022-10-07 21:55:19 -05:00
Sargon-Isa 5a92925d6a Translated using Weblate (German)
Currently translated at 100.0% (226 of 226 strings)

Translation: Moonlight Game Streaming/moonlight-android
Translate-URL: https://hosted.weblate.org/projects/moonlight/moonlight-android/de/
2022-10-08 04:54:57 +02:00
Cameron Gutman fe697c918f Update moonlight-common-c with speculative RFI support 2022-10-07 21:54:00 -05:00
Cameron Gutman bc57a285ce Fix unescaped character 2022-10-04 20:03:10 -05:00
Cameron Gutman 85d8943b64 Merge remote-tracking branch 'origin/weblate' 2022-10-04 19:56:52 -05:00
Cameron Gutman aa6c32968b Add a special termination message for ML_ERROR_FRAME_CONVERSION 2022-10-04 19:51:49 -05:00
Cameron Gutman ad1808fb4e Update moonlight-common-c with further fixes for GFE 3.26 2022-10-04 19:50:49 -05:00
Kamil Szyc 576610e4c3 Translated using Weblate (Polish)
Currently translated at 1.7% (4 of 225 strings)

Translation: Moonlight Game Streaming/moonlight-android
Translate-URL: https://hosted.weblate.org/projects/moonlight/moonlight-android/pl/
2022-10-04 12:24:06 +02:00
Martin Dimitrov ace2266f14 Translated using Weblate (Bulgarian)
Currently translated at 59.5% (134 of 225 strings)

Translation: Moonlight Game Streaming/moonlight-android
Translate-URL: https://hosted.weblate.org/projects/moonlight/moonlight-android/bg/
2022-10-04 12:24:06 +02:00
Alexandru-Marian Buza 41cedfa6ec Fix requestMetaKeyEvent for Samsung devices with android 10+ (#1134)
Co-authored-by: Alexandru Buza <abuza@iqnox.com>
2022-10-03 22:50:04 -05:00
Cameron Gutman d46fab33b3 Enable HEVC RFI for Exynos decoders 2022-10-03 22:23:59 -05:00
Cameron Gutman 585dc45595 Enable RFI for HEVC on Qualcomm and Nvidia decoders 2022-10-03 21:33:05 -05:00
Cameron Gutman c3c9354a00 Update moonlight-common-c to support reliable RFI for HEVC 2022-10-03 21:32:11 -05:00
Cameron Gutman bdc8d08e65 Switch back to AGP 7.2.2
AGP 7.3.0 produces invalid bytecode for ControllerHandler, causing dex validation errors on Android Jelly Bean and KitKat

Fixes #1132
2022-10-03 21:30:01 -05:00
Cameron Gutman 9c792d3272 Adjust RendererException text to attempt to parse correctly in Google Play App Vitals 2022-10-03 21:28:37 -05:00
Cameron Gutman 23bc4daf9f Refactor input event handling in the Game activity 2022-10-03 21:25:43 -05:00
Kamil Szyc fd85ca2004 Added translation using Weblate (Polish) 2022-10-03 11:42:50 +02:00
Martin Dimitrov aadf88add1 Added translation using Weblate (Bulgarian) 2022-10-02 19:24:17 +02:00
sanhoe f14ce61ee3 Translated using Weblate (Korean)
Currently translated at 100.0% (225 of 225 strings)

Translation: Moonlight Game Streaming/moonlight-android
Translate-URL: https://hosted.weblate.org/projects/moonlight/moonlight-android/ko/
2022-09-29 12:16:23 +02:00
Cameron Gutman 539daf5789 Don't adjust maxBytesPerPicDenom and maxBitsPerMbDenom on newer devices 2022-09-23 21:27:27 -05:00
Cameron Gutman e8ea2a8ec1 Version 10.8.4 2022-09-22 23:17:58 -05:00
Cameron Gutman 9ed3b3a9df Fixed streaming on certain devices with GFE 3.26 2022-09-22 23:16:40 -05:00
Cameron Gutman 12487553de Version 10.8.2 2022-09-22 21:57:42 -05:00
Cameron Gutman 9c1a618b4a Fix stuck analog stick when a touch event is cancelled
This can happen if a stylus hover event is received while touching an OSC element
2022-09-21 01:11:45 -05:00
Cameron Gutman ac0e784417 Make StreamView transparent to touch events and handle everything in the background view
This is much simpler than trying to play games with touch handling between 2 views
2022-09-21 01:07:49 -05:00
Cameron Gutman 48cab6b203 Allow multi-finger gestures and absolute motion to pass seamlessly between the StreamView and background view 2022-09-21 00:21:43 -05:00
Cameron Gutman e1c0472069 Properly split touch events between regions outside the StreamView and the OSC
This restores the ability to use area outside the StreamView for the virtual trackpad and adds the ability to use OSC and the non-StreamView region for input at the same time.

Fixes #1129
2022-09-20 22:29:54 -05:00
Cameron Gutman 2c498ce707 Throw a RendererException instead of a bare IllegalStateException upon codec recovery failure 2022-09-20 21:43:35 -05:00
Cameron Gutman bc483edb29 Interrupt codec recovery when stopping the decoder 2022-09-18 18:53:37 -05:00
Cameron Gutman 9762f4c412 Only throw the codec exception on the last configuration attempt 2022-09-18 18:47:01 -05:00
Cameron Gutman 5bfce88fc5 Fix recovery timeout if no output frames are being received 2022-09-18 18:37:33 -05:00
Cameron Gutman 94ef66994d Trigger the decoder crash dialog if all recovery attempts fail 2022-09-18 18:29:45 -05:00
Cameron Gutman 257c29daca Improve handling of concurrent recoverable and non-recoverable errors and surface loss 2022-09-18 18:25:29 -05:00
Cameron Gutman 173483eb84 Only catch IllegalStateException or subclasses 2022-09-18 17:42:37 -05:00
Cameron Gutman 06099b2663 Only try to recover from CodecExceptions or IllegalStateExceptions 2022-09-18 00:20:41 -05:00
Cameron Gutman 33c1f0a71c Fix decoding crash if encoder didn't send VUI parameters 2022-09-18 00:04:29 -05:00
Cameron Gutman a3d78f1d80 Merge remote-tracking branch 'origin/weblate' 2022-09-17 23:32:55 -05:00
Cameron Gutman c573d213f8 Allow FFmpeg decoder on Waydroid 2022-09-17 14:51:03 -05:00
Cameron Gutman c72707aef9 Don't begin codec recovery if stopping 2022-09-17 13:52:22 -05:00
Cameron Gutman 313ef06c86 Only exclude touch events from non-view processing
Mouse events that go out of the StreamView area are okay
2022-09-17 13:36:44 -05:00
Cameron Gutman 6b79340c15 Don't handle motion events outside of Views to avoid spurious stream input while using OSC 2022-09-17 13:34:14 -05:00
Cameron Gutman d9a5b29372 Fix OSC handling of touches outside the StreamView 2022-09-17 13:32:40 -05:00
Cameron Gutman d2b0e093fc Reduce power by avoiding resends when OSC state is not changing 2022-09-17 13:07:52 -05:00
Cameron Gutman 945e563912 Switch to a Handler for gamepad mouse emulation 2022-09-17 12:55:15 -05:00
Cameron Gutman a7efa379eb Switch to a Handler for OSC retransmission 2022-09-16 18:21:56 -05:00
Cameron Gutman d04df4ebe5 Fix D-Pad buttons not releasing until all D-Pad input has ceased 2022-09-16 17:41:52 -05:00
Cameron Gutman 2a2c84ef3a Implement fallbacks for a failed codec restart or reset 2022-09-16 03:48:49 -05:00
Cameron Gutman bc97db893a Allow recovery of IllegalStateExceptions for older versions of Android 2022-09-16 03:28:57 -05:00
Cameron Gutman f216834df7 Limit the number of codec recovery attempts 2022-09-16 03:27:22 -05:00
Cameron Gutman be25a7d594 Fix a number of bugs in new codec recovery code 2022-09-16 03:19:36 -05:00
Cameron Gutman 10f43e8024 Try to adjust decoder exception to comply with Google Play crash message filtering 2022-09-16 00:32:34 -05:00
Cameron Gutman bbb3e8d071 Only catch RuntimeExceptions for decoders to avoid eating important exceptions 2022-09-16 00:26:02 -05:00
Cameron Gutman 4c3af35156 Update AGP to 7.3.0 2022-09-16 00:09:22 -05:00
Cameron Gutman 8656228014 Break out of wait on InterruptedException 2022-09-16 00:09:09 -05:00
Cameron Gutman 03f9ea8435 Use Handlers instead of Timers for one-shot events 2022-09-16 00:08:48 -05:00
Cameron Gutman 9cf27d8fb1 Don't throw exceptions during codec recovery 2022-09-15 02:16:24 -05:00
Cameron Gutman d1b24ea6af Consolidate touch tracking timers 2022-09-15 02:05:40 -05:00
Cameron Gutman b07ffbde29 Consolidate OSC timers 2022-09-15 01:59:29 -05:00
Cameron Gutman 1673236940 Abort if the decoder doesn't recover within 5 seconds 2022-09-15 01:37:10 -05:00
Cameron Gutman 06861a2d17 Add support for recovering from non-transient CodecExceptions 2022-09-15 01:15:15 -05:00
Cameron Gutman ef7ac62f97 Improve handling of transient CodecExceptions 2022-09-15 00:08:06 -05:00
Cameron Gutman 245a9f2751 Try a new input buffer if getInputBuffer() returns null 2022-09-14 23:54:07 -05:00
Cameron Gutman 1d38f158b5 Fix crash after the next fetchNextInputBuffer() if getInputBuffer() failed previously 2022-09-14 23:49:49 -05:00
Jorys Paulin 62a526854d Translated using Weblate (French)
Currently translated at 100.0% (225 of 225 strings)

Translation: Moonlight Game Streaming/moonlight-android
Translate-URL: https://hosted.weblate.org/projects/moonlight/moonlight-android/fr/
2022-09-14 15:22:45 +02:00
Jen Kung-chih 3dda940c92 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (225 of 225 strings)

Translation: Moonlight Game Streaming/moonlight-android
Translate-URL: https://hosted.weblate.org/projects/moonlight/moonlight-android/zh_Hant/
2022-09-13 08:19:00 +02:00
Howard Wu ab77c4720d Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (225 of 225 strings)

Translation: Moonlight Game Streaming/moonlight-android
Translate-URL: https://hosted.weblate.org/projects/moonlight/moonlight-android/zh_Hans/
2022-09-13 08:18:59 +02:00
90 changed files with 3552 additions and 1294 deletions
-48
View File
@@ -1,48 +0,0 @@
---
name: Bug report
about: Follow the troubleshooting guide before reporting a bug
---
**READ ME FIRST!**
If you're here because something basic is not working (like gamepad input, video, or similar), it's probably something specific to your setup, so make sure you've gone through the Troubleshooting Guide first: https://github.com/moonlight-stream/moonlight-docs/wiki/Troubleshooting
If you still have trouble with basic functionality after following the guide, join our Discord server where there are many other volunteers who can help (or direct you back here if it looks like a Moonlight bug after all). https://moonlight-stream.org/discord
**Describe the bug**
A clear and concise description of what the bug is.
**Steps to reproduce**
Any special steps that are required for the bug to appear.
**Screenshots**
If applicable, add screenshots to help explain your problem. If the issue is related to video glitching or poor quality, please include screenshots.
**Affected games**
List the games you've tried that exhibit the issue. To see if the issue is game-specific, try streaming Steam Big Picture with Moonlight and see if the issue persists there.
**Other Moonlight clients**
- Does the issue occur when using Moonlight on PC or iOS?
**Moonlight settings (please complete the following information)**
- Have any settings been adjusted from defaults?
- If so, which settings have been changed?
- Does the problem still occur after reverting settings back to default?
**Gamepad-related issues (please complete if problem is gamepad-related)**
- Do you have any gamepads connected to your host PC directly?
- If gamepad input is not working, does it work if you use Moonlight's on-screen controls?
- Does the problem still remain if you stream the desktop and use https://html5gamepad.com to test your gamepad?
- Instructions for streaming the desktop can be found here: https://github.com/moonlight-stream/moonlight-docs/wiki/Setup-Guide
**Device details (please complete the following information)**
- Android version: [e.g. Android 10]
- Device model: [e.g. Samsung Galaxy S21]
**Server PC details (please complete the following information)**
- OS: [e.g. Windows 10 1809]
- GeForce Experience version: [e.g. 3.16.0.140]
- Nvidia GPU driver: [e.g. 417.35]
- Antivirus and firewall software: [e.g. Windows Defender and Windows Firewall]
**Additional context**
Anything else you think may be relevant to the issue or special about your specific setup.
+176
View File
@@ -0,0 +1,176 @@
name: Bug report
description: Follow the troubleshooting guide before reporting a bug
title: "[Issue]: "
labels: bug
body:
- type: markdown
attributes:
value: |
Thank you for taking the time to fill out this bug form!
**READ ME FIRST!**
If you're here because something basic is not working (like gamepad input, video, or similar), it's probably something specific to your setup, so make sure you've gone through the Troubleshooting Guide first: https://github.com/moonlight-stream/moonlight-docs/wiki/Troubleshooting
If you still have trouble with basic functionality after following the guide, join our Discord server where there are many other volunteers who can help (or direct you back here if it looks like a Moonlight bug after all). https://moonlight-stream.org/discord
- type: textarea
id: describe-bug
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is.
validations:
required: true
- type: textarea
id: steps-reproduce
attributes:
label: Steps to reproduce
description: Any special steps that are required for the bug to appear.
validations:
required: true
- type: textarea
id: affected-games
attributes:
label: Affected games
description: List the games you've tried that exhibit the issue. To see if the issue is game-specific, try streaming Steam Big Picture with Moonlight and see if the issue persists there.
validations:
required: true
- type: dropdown
id: other-clients
attributes:
label: Other Moonlight clients
description: Does the issue occur when using Moonlight on PC or iOS?
options:
- "PC"
- "iOS"
validations:
required: true
- type: dropdown
id: settings-adjusted
attributes:
label: Moonlight adjusted settings
description: Have any settings been adjusted from defaults?
options:
- "Yes"
- "No"
validations:
required: true
- type: textarea
id: settings-adjusted-settings
attributes:
label: Moonlight adjusted settings (please complete the following information)
description: If the settings have been adjusted, which settings have been changed?
validations:
required: true
- type: dropdown
id: settings-default
attributes:
label: Moonlight default settings
description: Does the problem still occur after reverting settings back to default?
options:
- "Yes"
- "No"
validations:
required: true
- type: dropdown
id: gamepad-connected
attributes:
label: Gamepad-related connection issue
description: Do you have any gamepads connected to your host PC directly?
options:
- "Yes"
- "No"
validations:
required: true
- type: dropdown
id: gamepad-on-screen
attributes:
label: Gamepad-related input issue
description: If gamepad input is not working, does it work if you use Moonlight's on-screen controls?
options:
- "Yes"
- "No"
validations:
required: true
- type: dropdown
id: gamepad-test
attributes:
label: Gamepad-related streaming issue
description: |
Does the problem still remain if you stream the desktop and use https://html5gamepad.com to test your gamepad?
Instructions for streaming the desktop can be found here: https://github.com/moonlight-stream/moonlight-docs/wiki/Setup-Guide
options:
- "Yes"
- "No"
validations:
required: true
- type: input
id: android
attributes:
label: Android version
description: What is the Android version?
placeholder: e.g. Android 10
validations:
required: true
- type: input
id: device
attributes:
label: Device model
description: What is the device model?
placeholder: e.g. Samsung Galaxy S21
validations:
required: true
- type: input
id: server-os
attributes:
label: Server PC OS version
description: What is the PC OS version?
placeholder: e.g. Windows 10 1809
validations:
required: true
- type: input
id: server-geforce
attributes:
label: Server PC GeForce Experience version
description: What is the GeForce Experience version?
placeholder: e.g. 3.16.0.140
validations:
required: true
- type: input
id: server-driver
attributes:
label: Server PC Nvidia GPU driver version
description: What is the Nvidia GPU driver version?
placeholder: e.g. 417.35
validations:
required: true
- type: input
id: server-antivirus
attributes:
label: Server PC antivirus and firewall software
description: Which antivirus and firewall software are installed on the Server PC?
placeholder: e.g. Windows Defender and Windows Firewall
validations:
required: true
- type: textarea
id: screenshots
attributes:
label: Screenshots
description: If applicable, add screenshots to help explain your problem. If the issue is related to video glitching or poor quality, please include screenshots.
validations:
required: false
- type: textarea
id: logs
attributes:
label: Relevant log output
description: |
Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: Shell
validations:
required: false
- type: textarea
id: additional
attributes:
label: Additional context
description: Anything else you think may be relevant to the issue or special about your specific setup.
validations:
required: false
-17
View File
@@ -1,17 +0,0 @@
---
name: Feature request
about: Suggest an idea for this project
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
@@ -0,0 +1,37 @@
name: Feature request
description: Suggest an idea for this project
title: "[Feature request]: "
labels: enhancement
body:
- type: markdown
attributes:
value: |
Thank you for taking the time to fill out this feature form!
- type: textarea
id: feature
attributes:
label: Is your feature request related to a problem? Please describe.
description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
validations:
required: true
- type: textarea
id: solution
attributes:
label: Describe the solution you'd like
description: A clear and concise description of what you want to happen.
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Describe alternatives you've considered
description: A clear and concise description of any alternative solutions or features you've considered.
validations:
required: true
- type: textarea
id: screenshots
attributes:
label: Screenshots
description: Add any other context or screenshots about the feature request here.
validations:
required: false
+11 -2
View File
@@ -5,12 +5,14 @@ android {
compileSdk 33
namespace 'com.limelight'
defaultConfig {
minSdk 16
targetSdk 33
versionName "10.8.1"
versionCode = 288
versionName "11.0"
versionCode = 306
// Generate native debug symbols to allow Google Play to symbolicate our native crashes
ndk.debugSymbolLevel = 'FULL'
@@ -48,6 +50,12 @@ android {
}
}
compileOptions {
encoding "UTF-8"
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
lint {
disable 'MissingTranslation'
lintConfig file('lint.xml')
@@ -129,6 +137,7 @@ dependencies {
implementation 'org.jcodec:jcodec:0.2.3'
implementation 'com.squareup.okhttp3:okhttp:3.12.13'
implementation 'com.squareup.okio:okio:1.17.5'
// 3.5.8 requires minSdk 19, uses StandardCharsets.UTF_8 internally
implementation 'org.jmdns:jmdns:3.5.7'
implementation 'com.github.cgutman:ShieldControllerExtensions:1.0'
}
+1 -2
View File
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.limelight">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
+252 -112
View File
@@ -22,6 +22,7 @@ import com.limelight.nvstream.NvConnectionListener;
import com.limelight.nvstream.StreamConfiguration;
import com.limelight.nvstream.http.ComputerDetails;
import com.limelight.nvstream.http.NvApp;
import com.limelight.nvstream.http.NvHTTP;
import com.limelight.nvstream.input.KeyboardPacket;
import com.limelight.nvstream.input.MouseButtonPacket;
import com.limelight.nvstream.jni.MoonBridge;
@@ -30,7 +31,6 @@ import com.limelight.preferences.PreferenceConfiguration;
import com.limelight.ui.GameGestures;
import com.limelight.ui.StreamView;
import com.limelight.utils.Dialog;
import com.limelight.utils.NetHelper;
import com.limelight.utils.ServerHelper;
import com.limelight.utils.ShortcutHelper;
import com.limelight.utils.SpinnerDialog;
@@ -62,6 +62,7 @@ import android.os.IBinder;
import android.util.Rational;
import android.view.Display;
import android.view.InputDevice;
import android.view.KeyCharacterMap;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.Surface;
@@ -87,10 +88,9 @@ import java.util.Locale;
public class Game extends Activity implements SurfaceHolder.Callback,
OnGenericMotionListener, OnTouchListener, NvConnectionListener, EvdevListener,
OnSystemUiVisibilityChangeListener, GameGestures, StreamView.InputCallbacks,
PerfOverlayListener, UsbDriverService.UsbDriverStateListener
{
OnGenericMotionListener, OnTouchListener, NvConnectionListener, EvdevListener,
OnSystemUiVisibilityChangeListener, GameGestures, StreamView.InputCallbacks,
PerfOverlayListener, UsbDriverService.UsbDriverStateListener, View.OnKeyListener {
private int lastButtonState = 0;
// Only 2 touches are supported
@@ -126,6 +126,7 @@ public class Game extends Activity implements SurfaceHolder.Callback,
private int suppressPipRefCount = 0;
private String pcName;
private String appName;
private float desiredRefreshRate;
private InputCaptureProvider inputCaptureProvider;
private int modifierFlags = 0;
@@ -168,6 +169,8 @@ public class Game extends Activity implements SurfaceHolder.Callback,
};
public static final String EXTRA_HOST = "Host";
public static final String EXTRA_PORT = "Port";
public static final String EXTRA_HTTPS_PORT = "HttpsPort";
public static final String EXTRA_APP_NAME = "AppName";
public static final String EXTRA_APP_ID = "AppId";
public static final String EXTRA_UNIQUEID = "UniqueId";
@@ -232,13 +235,19 @@ public class Game extends Activity implements SurfaceHolder.Callback,
}
}
// Listen for events on the game surface
// Listen for non-touch events on the game surface
streamView = findViewById(R.id.surfaceView);
streamView.setOnGenericMotionListener(this);
streamView.setOnTouchListener(this);
streamView.setOnKeyListener(this);
streamView.setInputCallbacks(this);
boolean needsInputBatching = false;
// Listen for touch events on the background touch view to enable trackpad mode
// to work on areas outside of the StreamView itself. We use a separate View
// for this rather than just handling it at the Activity level, because that
// allows proper touch splitting, which the OSC relies upon.
View backgroundTouchView = findViewById(R.id.backgroundTouchView);
backgroundTouchView.setOnTouchListener(this);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
// Request unbuffered input event dispatching for all input classes we handle here.
// Without this, input events are buffered to be delivered in lock-step with VBlank,
@@ -250,10 +259,13 @@ public class Game extends Activity implements SurfaceHolder.Callback,
InputDevice.SOURCE_CLASS_POSITION | // Touchpads
InputDevice.SOURCE_CLASS_TRACKBALL // Mice (pointer capture)
);
// Since the OS isn't going to batch for us, we have to batch mouse events to
// avoid triggering a bug in GeForce Experience that can lead to massive latency.
needsInputBatching = true;
backgroundTouchView.requestUnbufferedDispatch(
InputDevice.SOURCE_CLASS_BUTTON | // Keyboards
InputDevice.SOURCE_CLASS_JOYSTICK | // Gamepads
InputDevice.SOURCE_CLASS_POINTER | // Touchscreens and mice (w/o pointer capture)
InputDevice.SOURCE_CLASS_POSITION | // Touchpads
InputDevice.SOURCE_CLASS_TRACKBALL // Mice (pointer capture)
);
}
notificationOverlayView = findViewById(R.id.notificationOverlay);
@@ -263,9 +275,6 @@ public class Game extends Activity implements SurfaceHolder.Callback,
inputCaptureProvider = InputCaptureManager.getInputCaptureProvider(this, this);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
// The view must be focusable for pointer capture to work.
streamView.setFocusable(true);
streamView.setDefaultFocusHighlightEnabled(false);
streamView.setOnCapturedPointerListener(new View.OnCapturedPointerListener() {
@Override
public boolean onCapturedPointer(View view, MotionEvent motionEvent) {
@@ -302,6 +311,8 @@ public class Game extends Activity implements SurfaceHolder.Callback,
pcName = Game.this.getIntent().getStringExtra(EXTRA_PC_NAME);
String host = Game.this.getIntent().getStringExtra(EXTRA_HOST);
int port = Game.this.getIntent().getIntExtra(EXTRA_PORT, NvHTTP.DEFAULT_HTTP_PORT);
int httpsPort = Game.this.getIntent().getIntExtra(EXTRA_HTTPS_PORT, 0); // 0 is treated as unknown
int appId = Game.this.getIntent().getIntExtra(EXTRA_APP_ID, StreamConfiguration.INVALID_APP_ID);
String uniqueId = Game.this.getIntent().getStringExtra(EXTRA_UNIQUEID);
String uuid = Game.this.getIntent().getStringExtra(EXTRA_PC_UUID);
@@ -441,11 +452,6 @@ public class Game extends Activity implements SurfaceHolder.Callback,
}
}
boolean vpnActive = NetHelper.isActiveNetworkVpn(this);
if (vpnActive) {
LimeLog.info("Detected active network is a VPN");
}
StreamConfiguration config = new StreamConfiguration.Builder()
.setResolution(prefConfig.width, prefConfig.height)
.setLaunchRefreshRate(prefConfig.fps)
@@ -454,10 +460,8 @@ public class Game extends Activity implements SurfaceHolder.Callback,
.setBitrate(prefConfig.bitrate)
.setEnableSops(prefConfig.enableSops)
.enableLocalAudioPlayback(prefConfig.playHostAudio)
.setMaxPacketSize(vpnActive ? 1024 : 1392) // Lower MTU on VPN
.setRemoteConfiguration(vpnActive ? // Use remote optimizations on VPN
StreamConfiguration.STREAM_CFG_REMOTE :
StreamConfiguration.STREAM_CFG_AUTO)
.setMaxPacketSize(1392)
.setRemoteConfiguration(StreamConfiguration.STREAM_CFG_AUTO) // NvConnection will perform LAN and VPN detection
.setHevcBitratePercentageMultiplier(75)
.setHevcSupported(decoderRenderer.isHevcSupported())
.setEnableHdr(willStreamHdr)
@@ -465,10 +469,16 @@ public class Game extends Activity implements SurfaceHolder.Callback,
.setClientRefreshRateX100((int)(displayRefreshRate * 100))
.setAudioConfiguration(prefConfig.audioConfiguration)
.setAudioEncryption(true)
.setColorSpace(decoderRenderer.getPreferredColorSpace())
.setColorRange(decoderRenderer.getPreferredColorRange())
.setPersistGamepadsAfterDisconnect(!prefConfig.multiController)
.build();
// Initialize the connection
conn = new NvConnection(host, uniqueId, config, PlatformBinding.getCryptoProvider(this), serverCert, needsInputBatching);
conn = new NvConnection(getApplicationContext(),
new ComputerDetails.AddressTuple(host, port),
httpsPort, uniqueId, config,
PlatformBinding.getCryptoProvider(this), serverCert);
controllerHandler = new ControllerHandler(this, conn, this, prefConfig);
keyboardTranslator = new KeyboardTranslator();
@@ -686,7 +696,7 @@ public class Game extends Activity implements SurfaceHolder.Callback,
if (manager != null) {
Class<?>[] parameterTypes = new Class<?>[2];
parameterTypes[0] = String.class;
parameterTypes[0] = ComponentName.class;
parameterTypes[1] = boolean.class;
Method requestMetaKeyEventMethod = semWindowManager.getDeclaredMethod("requestMetaKeyEvent", parameterTypes);
requestMetaKeyEventMethod.invoke(manager, this.getComponentName(), enabled);
@@ -796,6 +806,9 @@ public class Game extends Activity implements SurfaceHolder.Callback,
boolean refreshRateIsGood = isRefreshRateGoodMatch(bestMode.getRefreshRate());
boolean refreshRateIsEqual = isRefreshRateEqualMatch(bestMode.getRefreshRate());
LimeLog.info("Current display mode: "+bestMode.getPhysicalWidth()+"x"+
bestMode.getPhysicalHeight()+"x"+bestMode.getRefreshRate());
for (Display.Mode candidate : display.getSupportedModes()) {
boolean refreshRateReduced = candidate.getRefreshRate() < bestMode.getRefreshRate();
boolean resolutionReduced = candidate.getPhysicalWidth() < bestMode.getPhysicalWidth() ||
@@ -872,9 +885,30 @@ public class Game extends Activity implements SurfaceHolder.Callback,
refreshRateIsGood = isRefreshRateGoodMatch(candidate.getRefreshRate());
refreshRateIsEqual = isRefreshRateEqualMatch(candidate.getRefreshRate());
}
LimeLog.info("Selected display mode: "+bestMode.getPhysicalWidth()+"x"+
LimeLog.info("Best display mode: "+bestMode.getPhysicalWidth()+"x"+
bestMode.getPhysicalHeight()+"x"+bestMode.getRefreshRate());
windowLayoutParams.preferredDisplayModeId = bestMode.getModeId();
// Only apply new window layout parameters if we've actually changed the display mode
if (display.getMode().getModeId() != bestMode.getModeId()) {
// If we only changed refresh rate and we're on an OS that supports Surface.setFrameRate()
// use that instead of using preferredDisplayModeId to avoid the possibility of triggering
// bugs that can cause the system to switch from 4K60 to 4K24 on Chromecast 4K.
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S ||
display.getMode().getPhysicalWidth() != bestMode.getPhysicalWidth() ||
display.getMode().getPhysicalHeight() != bestMode.getPhysicalHeight()) {
// Apply the display mode change
windowLayoutParams.preferredDisplayModeId = bestMode.getModeId();
getWindow().setAttributes(windowLayoutParams);
}
else {
LimeLog.info("Using setFrameRate() instead of preferredDisplayModeId due to matching resolution");
}
}
else {
LimeLog.info("Current display mode is already the best display mode");
}
displayRefreshRate = bestMode.getRefreshRate();
}
// On L, we can at least tell the OS that we want a refresh rate
@@ -894,9 +928,13 @@ public class Game extends Activity implements SurfaceHolder.Callback,
bestRefreshRate = candidate;
}
}
LimeLog.info("Selected refresh rate: "+bestRefreshRate);
windowLayoutParams.preferredRefreshRate = bestRefreshRate;
displayRefreshRate = bestRefreshRate;
// Apply the refresh rate change
getWindow().setAttributes(windowLayoutParams);
}
else {
// Otherwise, the active display refresh rate is just
@@ -904,14 +942,6 @@ public class Game extends Activity implements SurfaceHolder.Callback,
displayRefreshRate = display.getRefreshRate();
}
// Enable HDMI ALLM (game mode) on Android R
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
windowLayoutParams.preferMinimalPostProcessing = true;
}
// Apply the display mode change
getWindow().setAttributes(windowLayoutParams);
// From 4.4 to 5.1 we can't ask for a 4K display mode, so we'll
// need to hint the OS to provide one.
boolean aspectRatioMatch = false;
@@ -943,6 +973,9 @@ public class Game extends Activity implements SurfaceHolder.Callback,
streamView.setDesiredAspectRatio((double)prefConfig.width / (double)prefConfig.height);
}
// Set the desired refresh rate that will get passed into setFrameRate() later
desiredRefreshRate = displayRefreshRate;
if (getPackageManager().hasSystemFeature(PackageManager.FEATURE_TELEVISION) ||
getPackageManager().hasSystemFeature(PackageManager.FEATURE_LEANBACK)) {
// TVs may take a few moments to switch refresh rates, and we can probably assume
@@ -1113,17 +1146,25 @@ public class Game extends Activity implements SurfaceHolder.Callback,
finish();
}
private void setInputGrabState(boolean grab) {
// Grab/ungrab the mouse cursor
if (grab) {
inputCaptureProvider.enableCapture();
}
else {
inputCaptureProvider.disableCapture();
}
// Grab/ungrab system keyboard shortcuts
setMetaKeyCaptureState(grab);
grabbedInput = grab;
}
private final Runnable toggleGrab = new Runnable() {
@Override
public void run() {
if (grabbedInput) {
inputCaptureProvider.disableCapture();
}
else {
inputCaptureProvider.enableCapture();
}
grabbedInput = !grabbedInput;
setInputGrabState(!grabbedInput);
}
};
@@ -1143,6 +1184,10 @@ public class Game extends Activity implements SurfaceHolder.Callback,
androidKeyCode == KeyEvent.KEYCODE_ALT_RIGHT) {
modifierMask = KeyboardPacket.MODIFIER_ALT;
}
else if (androidKeyCode == KeyEvent.KEYCODE_META_LEFT ||
androidKeyCode == KeyEvent.KEYCODE_META_RIGHT) {
modifierMask = KeyboardPacket.MODIFIER_META;
}
if (down) {
this.modifierFlags |= modifierMask;
@@ -1151,10 +1196,10 @@ public class Game extends Activity implements SurfaceHolder.Callback,
this.modifierFlags &= ~modifierMask;
}
// Check if Ctrl+Shift+Z is pressed
// Check if Ctrl+Alt+Shift+Z is pressed
if (androidKeyCode == KeyEvent.KEYCODE_Z &&
(modifierFlags & (KeyboardPacket.MODIFIER_CTRL | KeyboardPacket.MODIFIER_SHIFT)) ==
(KeyboardPacket.MODIFIER_CTRL | KeyboardPacket.MODIFIER_SHIFT))
(modifierFlags & (KeyboardPacket.MODIFIER_CTRL | KeyboardPacket.MODIFIER_ALT | KeyboardPacket.MODIFIER_SHIFT)) ==
(KeyboardPacket.MODIFIER_CTRL | KeyboardPacket.MODIFIER_ALT | KeyboardPacket.MODIFIER_SHIFT))
{
if (down) {
// Now that we've pressed the magic combo
@@ -1205,6 +1250,9 @@ public class Game extends Activity implements SurfaceHolder.Callback,
if (event.isAltPressed()) {
modifier |= KeyboardPacket.MODIFIER_ALT;
}
if (event.isMetaPressed()) {
modifier |= KeyboardPacket.MODIFIER_META;
}
return modifier;
}
@@ -1252,33 +1300,43 @@ public class Game extends Activity implements SurfaceHolder.Callback,
handled = controllerHandler.handleButtonDown(event);
}
// Try the keyboard handler if it wasn't handled as a game controller
if (!handled) {
// Try the keyboard handler
short translated = keyboardTranslator.translate(event.getKeyCode(), event.getDeviceId());
if (translated == 0) {
return false;
}
// Let this method take duplicate key down events
if (handleSpecialKeys(event.getKeyCode(), true)) {
return true;
}
// Eat repeat down events
if (event.getRepeatCount() > 0) {
return true;
}
// Pass through keyboard input if we're not grabbing
if (!grabbedInput) {
return false;
}
byte modifiers = getModifierState(event);
if (KeyboardTranslator.needsShift(event.getKeyCode())) {
modifiers |= KeyboardPacket.MODIFIER_SHIFT;
// We'll send it as a raw key event if we have a key mapping, otherwise we'll send it
// as UTF-8 text (if it's a printable character).
short translated = keyboardTranslator.translate(event.getKeyCode(), event.getDeviceId());
if (translated == 0) {
// Make sure it has a valid Unicode representation and it's not a dead character
// (which we don't support). If those are true, we can send it as UTF-8 text.
//
// NB: We need to be sure this happens before the getRepeatCount() check because
// UTF-8 events don't auto-repeat on the host side.
int unicodeChar = event.getUnicodeChar();
if ((unicodeChar & KeyCharacterMap.COMBINING_ACCENT) == 0 && (unicodeChar & KeyCharacterMap.COMBINING_ACCENT_MASK) != 0) {
conn.sendUtf8Text(""+(char)unicodeChar);
return true;
}
return false;
}
conn.sendKeyboardInput(translated, KeyboardPacket.KEY_DOWN, modifiers);
// Eat repeat down events
if (event.getRepeatCount() > 0) {
return true;
}
conn.sendKeyboardInput(translated, KeyboardPacket.KEY_DOWN, getModifierState(event),
keyboardTranslator.hasNormalizedMapping(event.getKeyCode(), event.getDeviceId()) ? 0 : MoonBridge.SS_KBE_FLAG_NON_NORMALIZED);
}
return true;
@@ -1322,13 +1380,8 @@ public class Game extends Activity implements SurfaceHolder.Callback,
handled = controllerHandler.handleButtonUp(event);
}
// Try the keyboard handler if it wasn't handled as a game controller
if (!handled) {
// Try the keyboard handler
short translated = keyboardTranslator.translate(event.getKeyCode(), event.getDeviceId());
if (translated == 0) {
return false;
}
if (handleSpecialKeys(event.getKeyCode(), false)) {
return true;
}
@@ -1338,16 +1391,43 @@ public class Game extends Activity implements SurfaceHolder.Callback,
return false;
}
byte modifiers = getModifierState(event);
if (KeyboardTranslator.needsShift(event.getKeyCode())) {
modifiers |= KeyboardPacket.MODIFIER_SHIFT;
short translated = keyboardTranslator.translate(event.getKeyCode(), event.getDeviceId());
if (translated == 0) {
// If we sent this event as UTF-8 on key down, also report that it was handled
// when we get the key up event for it.
int unicodeChar = event.getUnicodeChar();
return (unicodeChar & KeyCharacterMap.COMBINING_ACCENT) == 0 && (unicodeChar & KeyCharacterMap.COMBINING_ACCENT_MASK) != 0;
}
conn.sendKeyboardInput(translated, KeyboardPacket.KEY_UP, modifiers);
conn.sendKeyboardInput(translated, KeyboardPacket.KEY_UP, getModifierState(event),
keyboardTranslator.hasNormalizedMapping(event.getKeyCode(), event.getDeviceId()) ? 0 : MoonBridge.SS_KBE_FLAG_NON_NORMALIZED);
}
return true;
}
@Override
public boolean onKeyMultiple(int keyCode, int repeatCount, KeyEvent event) {
return handleKeyMultiple(event) || super.onKeyMultiple(keyCode, repeatCount, event);
}
private boolean handleKeyMultiple(KeyEvent event) {
// We can receive keys from a software keyboard that don't correspond to any existing
// KEYCODE value. Android will give those to us as an ACTION_MULTIPLE KeyEvent.
//
// Despite the fact that the Android docs say this is unused since API level 29, these
// events are still sent as of Android 13 for the above case.
//
// For other cases of ACTION_MULTIPLE, we will not report those as handled so hopefully
// they will be passed to us again as regular singular key events.
if (event.getKeyCode() != KeyEvent.KEYCODE_UNKNOWN || event.getCharacters() == null) {
return false;
}
conn.sendUtf8Text(event.getCharacters());
return true;
}
private TouchContext getTouchContext(int actionIndex)
{
if (actionIndex < touchContextMap.length) {
@@ -1473,6 +1553,7 @@ public class Game extends Activity implements SurfaceHolder.Callback,
if (event.getActionMasked() == MotionEvent.ACTION_SCROLL) {
// Send the vertical scroll packet
conn.sendMouseHighResScroll((short)(event.getAxisValue(MotionEvent.AXIS_VSCROLL) * 120));
conn.sendMouseHighResHScroll((short)(event.getAxisValue(MotionEvent.AXIS_HSCROLL) * 120));
}
if ((changedButtons & MotionEvent.BUTTON_PRIMARY) != 0) {
@@ -1574,15 +1655,22 @@ public class Game extends Activity implements SurfaceHolder.Callback,
return true;
}
if (view == null && !prefConfig.touchscreenTrackpad) {
// Absolute touch events should be dropped outside our view.
return true;
// If this is the parent view, we'll offset our coordinates to appear as if they
// are relative to the StreamView like our StreamView touch events are.
float xOffset, yOffset;
if (view != streamView && !prefConfig.touchscreenTrackpad) {
xOffset = -streamView.getX();
yOffset = -streamView.getY();
}
else {
xOffset = 0.f;
yOffset = 0.f;
}
int actionIndex = event.getActionIndex();
int eventX = (int)event.getX(actionIndex);
int eventY = (int)event.getY(actionIndex);
int eventX = (int)(event.getX(actionIndex) + xOffset);
int eventY = (int)(event.getY(actionIndex) + yOffset);
// Special handling for 3 finger gesture
if (event.getActionMasked() == MotionEvent.ACTION_POINTER_DOWN &&
@@ -1637,7 +1725,10 @@ public class Game extends Activity implements SurfaceHolder.Callback,
}
if (actionIndex == 0 && event.getPointerCount() > 1 && !context.isCancelled()) {
// The original secondary touch now becomes primary
context.touchDownEvent((int)event.getX(1), (int)event.getY(1), event.getEventTime(), false);
context.touchDownEvent(
(int)(event.getX(1) + xOffset),
(int)(event.getY(1) + yOffset),
event.getEventTime(), false);
}
break;
case MotionEvent.ACTION_MOVE:
@@ -1650,8 +1741,8 @@ public class Game extends Activity implements SurfaceHolder.Callback,
if (aTouchContextMap.getActionIndex() < event.getPointerCount())
{
aTouchContextMap.touchMoveEvent(
(int)event.getHistoricalX(aTouchContextMap.getActionIndex(), i),
(int)event.getHistoricalY(aTouchContextMap.getActionIndex(), i),
(int)(event.getHistoricalX(aTouchContextMap.getActionIndex(), i) + xOffset),
(int)(event.getHistoricalY(aTouchContextMap.getActionIndex(), i) + yOffset),
event.getHistoricalEventTime(i));
}
}
@@ -1662,8 +1753,8 @@ public class Game extends Activity implements SurfaceHolder.Callback,
if (aTouchContextMap.getActionIndex() < event.getPointerCount())
{
aTouchContextMap.touchMoveEvent(
(int)event.getX(aTouchContextMap.getActionIndex()),
(int)event.getY(aTouchContextMap.getActionIndex()),
(int)(event.getX(aTouchContextMap.getActionIndex()) + xOffset),
(int)(event.getY(aTouchContextMap.getActionIndex()) + yOffset),
event.getEventTime());
}
}
@@ -1687,22 +1778,27 @@ public class Game extends Activity implements SurfaceHolder.Callback,
return false;
}
@Override
public boolean onTouchEvent(MotionEvent event) {
return handleMotionEvent(null, event) || super.onTouchEvent(event);
}
@Override
public boolean onGenericMotionEvent(MotionEvent event) {
return handleMotionEvent(null, event) || super.onGenericMotionEvent(event);
}
private void updateMousePosition(View view, MotionEvent event) {
private void updateMousePosition(View touchedView, MotionEvent event) {
// X and Y are already relative to the provided view object
float eventX = event.getX(0);
float eventY = event.getY(0);
float eventX, eventY;
// For our StreamView itself, we can use the coordinates unmodified.
if (touchedView == streamView) {
eventX = event.getX(0);
eventY = event.getY(0);
}
else {
// For the containing background view, we must subtract the origin
// of the StreamView to get video-relative coordinates.
eventX = event.getX(0) - streamView.getX();
eventY = event.getY(0) - streamView.getY();
}
if (event.getPointerCount() == 1 && event.getActionIndex() == 0 &&
(event.getToolType(0) == MotionEvent.TOOL_TYPE_ERASER ||
@@ -1735,10 +1831,10 @@ public class Game extends Activity implements SurfaceHolder.Callback,
// Normalize these to the view size. We can't just drop them because we won't always get an event
// right at the boundary of the view, so dropping them would result in our cursor never really
// reaching the sides of the screen.
eventX = Math.min(Math.max(eventX, 0), view.getWidth());
eventY = Math.min(Math.max(eventY, 0), view.getHeight());
eventX = Math.min(Math.max(eventX, 0), streamView.getWidth());
eventY = Math.min(Math.max(eventY, 0), streamView.getHeight());
conn.sendMousePosition((short)eventX, (short)eventY, (short)view.getWidth(), (short)view.getHeight());
conn.sendMousePosition((short)eventX, (short)eventY, (short)streamView.getWidth(), (short)streamView.getHeight());
}
@Override
@@ -1749,7 +1845,7 @@ public class Game extends Activity implements SurfaceHolder.Callback,
@SuppressLint("ClickableViewAccessibility")
@Override
public boolean onTouch(View view, MotionEvent event) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
if (event.getAction() == MotionEvent.ACTION_DOWN) {
// Tell the OS not to buffer input events for us
//
@@ -1757,6 +1853,7 @@ public class Game extends Activity implements SurfaceHolder.Callback,
view.requestUnbufferedDispatch(event);
}
}
return handleMotionEvent(view, event);
}
@@ -1852,11 +1949,8 @@ public class Game extends Activity implements SurfaceHolder.Callback,
// Let the display go to sleep now
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
// Enable cursor visibility again
inputCaptureProvider.disableCapture();
// Disable meta key capture
setMetaKeyCaptureState(false);
// Ungrab input
setInputGrabState(false);
if (!displayedFailureDialog) {
displayedFailureDialog = true;
@@ -1887,6 +1981,10 @@ public class Game extends Activity implements SurfaceHolder.Callback,
message = getResources().getString(R.string.early_termination_error);
break;
case MoonBridge.ML_ERROR_FRAME_CONVERSION:
message = getResources().getString(R.string.frame_conversion_error);
break;
default:
message = getResources().getString(R.string.conn_terminated_msg);
break;
@@ -1962,16 +2060,13 @@ public class Game extends Activity implements SurfaceHolder.Callback,
h.postDelayed(new Runnable() {
@Override
public void run() {
inputCaptureProvider.enableCapture();
setInputGrabState(true);
}
}, 500);
// Keep the display on
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
// Enable meta key capture
setMetaKeyCaptureState(true);
// Update GameManager state to indicate we're in game
UiHelper.notifyStreamConnected(Game.this);
@@ -2010,9 +2105,9 @@ public class Game extends Activity implements SurfaceHolder.Callback,
}
@Override
public void setHdrMode(boolean enabled) {
public void setHdrMode(boolean enabled, byte[] hdrMetadata) {
LimeLog.info("Display HDR mode: " + (enabled ? "enabled" : "disabled"));
decoderRenderer.setHdrMode(enabled);
decoderRenderer.setHdrMode(enabled, hdrMetadata);
}
@Override
@@ -2035,11 +2130,37 @@ public class Game extends Activity implements SurfaceHolder.Callback,
@Override
public void surfaceCreated(SurfaceHolder holder) {
float desiredFrameRate;
surfaceCreated = true;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
// Tell the OS about our frame rate to allow it to adapt the display refresh rate appropriately
holder.getSurface().setFrameRate(prefConfig.fps, Surface.FRAME_RATE_COMPATIBILITY_FIXED_SOURCE);
// Android will pick the lowest matching refresh rate for a given frame rate value, so we want
// to report the true FPS value if refresh rate reduction is enabled. We also report the true
// FPS value if there's no suitable matching refresh rate. In that case, Android could try to
// select a lower refresh rate that avoids uneven pull-down (ex: 30 Hz for a 60 FPS stream on
// a display that maxes out at 50 Hz).
if (mayReduceRefreshRate() || desiredRefreshRate < prefConfig.fps) {
desiredFrameRate = prefConfig.fps;
}
else {
// Otherwise, we will pretend that our frame rate matches the refresh rate we picked in
// prepareDisplayForRendering(). This will usually be the highest refresh rate that our
// frame rate evenly divides into, which ensures the lowest possible display latency.
desiredFrameRate = desiredRefreshRate;
}
// Tell the OS about our frame rate to allow it to adapt the display refresh rate appropriately
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
// We want to change frame rate even if it's not seamless, since prepareDisplayForRendering()
// will not set the display mode on S+ if it only differs by the refresh rate. It depends
// on us to trigger the frame rate switch here.
holder.getSurface().setFrameRate(desiredFrameRate,
Surface.FRAME_RATE_COMPATIBILITY_FIXED_SOURCE,
Surface.CHANGE_FRAME_RATE_ALWAYS);
}
else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
holder.getSurface().setFrameRate(desiredFrameRate,
Surface.FRAME_RATE_COMPATIBILITY_FIXED_SOURCE);
}
}
@@ -2099,10 +2220,15 @@ public class Game extends Activity implements SurfaceHolder.Callback,
}
@Override
public void mouseScroll(byte amount) {
public void mouseVScroll(byte amount) {
conn.sendMouseScroll(amount);
}
@Override
public void mouseHScroll(byte amount) {
conn.sendMouseHScroll(amount);
}
@Override
public void keyboardEvent(boolean buttonDown, short keyCode) {
short keyMap = keyboardTranslator.translate(keyCode, -1);
@@ -2113,10 +2239,10 @@ public class Game extends Activity implements SurfaceHolder.Callback,
}
if (buttonDown) {
conn.sendKeyboardInput(keyMap, KeyboardPacket.KEY_DOWN, getModifierState());
conn.sendKeyboardInput(keyMap, KeyboardPacket.KEY_DOWN, getModifierState(), (byte)0);
}
else {
conn.sendKeyboardInput(keyMap, KeyboardPacket.KEY_UP, getModifierState());
conn.sendKeyboardInput(keyMap, KeyboardPacket.KEY_UP, getModifierState(), (byte)0);
}
}
}
@@ -2167,4 +2293,18 @@ public class Game extends Activity implements SurfaceHolder.Callback,
suppressPipRefCount--;
updatePipAutoEnter();
}
@Override
public boolean onKey(View view, int keyCode, KeyEvent keyEvent) {
switch (keyEvent.getAction()) {
case KeyEvent.ACTION_DOWN:
return handleKeyDown(keyEvent);
case KeyEvent.ACTION_UP:
return handleKeyUp(keyEvent);
case KeyEvent.ACTION_MULTIPLE:
return handleKeyMultiple(keyEvent);
default:
return false;
}
}
}
@@ -71,12 +71,6 @@ public class HelpActivity extends Activity {
refreshBackDispatchState();
}
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
return !(url.toUpperCase().startsWith("https://github.com/moonlight-stream/moonlight-docs/wiki/".toUpperCase()) ||
url.toUpperCase().startsWith("http://github.com/moonlight-stream/moonlight-docs/wiki/".toUpperCase()));
}
});
webView.loadUrl(getIntent().getData().toString());
+24 -11
View File
@@ -118,6 +118,7 @@ public class PcView extends Activity implements AdapterFragmentCallbacks {
private final static int VIEW_DETAILS_ID = 8;
private final static int FULL_APP_LIST_ID = 9;
private final static int TEST_NETWORK_ID = 10;
private final static int GAMESTREAM_EOL_ID = 11;
private void initializeViews() {
setContentView(R.layout.activity_pc_view);
@@ -352,9 +353,13 @@ public class PcView extends Activity implements AdapterFragmentCallbacks {
if (computer.details.state == ComputerDetails.State.OFFLINE ||
computer.details.state == ComputerDetails.State.UNKNOWN) {
menu.add(Menu.NONE, WOL_ID, 1, getResources().getString(R.string.pcview_menu_send_wol));
menu.add(Menu.NONE, GAMESTREAM_EOL_ID, 2, getResources().getString(R.string.pcview_menu_eol));
}
else if (computer.details.pairState != PairState.PAIRED) {
menu.add(Menu.NONE, PAIR_ID, 1, getResources().getString(R.string.pcview_menu_pair_pc));
if (computer.details.nvidiaServer) {
menu.add(Menu.NONE, GAMESTREAM_EOL_ID, 2, getResources().getString(R.string.pcview_menu_eol));
}
}
else {
if (computer.details.runningGameId != 0) {
@@ -362,6 +367,10 @@ public class PcView extends Activity implements AdapterFragmentCallbacks {
menu.add(Menu.NONE, QUIT_ID, 2, getResources().getString(R.string.applist_menu_quit));
}
if (computer.details.nvidiaServer) {
menu.add(Menu.NONE, GAMESTREAM_EOL_ID, 3, getResources().getString(R.string.pcview_menu_eol));
}
menu.add(Menu.NONE, FULL_APP_LIST_ID, 4, getResources().getString(R.string.pcview_menu_app_list));
}
@@ -383,10 +392,6 @@ public class PcView extends Activity implements AdapterFragmentCallbacks {
Toast.makeText(PcView.this, getResources().getString(R.string.pair_pc_offline), Toast.LENGTH_SHORT).show();
return;
}
if (computer.runningGameId != 0) {
Toast.makeText(PcView.this, getResources().getString(R.string.pair_pc_ingame), Toast.LENGTH_LONG).show();
return;
}
if (managerBinder == null) {
Toast.makeText(PcView.this, getResources().getString(R.string.error_manager_not_running), Toast.LENGTH_LONG).show();
return;
@@ -404,8 +409,7 @@ public class PcView extends Activity implements AdapterFragmentCallbacks {
stopComputerUpdates(true);
httpConn = new NvHTTP(ServerHelper.getCurrentAddressFromComputer(computer),
managerBinder.getUniqueId(),
computer.serverCert,
computer.httpsPort, managerBinder.getUniqueId(), computer.serverCert,
PlatformBinding.getCryptoProvider(PcView.this));
if (httpConn.getPairState() == PairState.PAIRED) {
// Don't display any toast, but open the app list
@@ -417,16 +421,22 @@ public class PcView extends Activity implements AdapterFragmentCallbacks {
// Spin the dialog off in a thread because it blocks
Dialog.displayDialog(PcView.this, getResources().getString(R.string.pair_pairing_title),
getResources().getString(R.string.pair_pairing_msg)+" "+pinStr, false);
getResources().getString(R.string.pair_pairing_msg)+" "+pinStr+"\n\n"+
getResources().getString(R.string.pair_pairing_help), false);
PairingManager pm = httpConn.getPairingManager();
PairState pairState = pm.pair(httpConn.getServerInfo(), pinStr);
PairState pairState = pm.pair(httpConn.getServerInfo(true), pinStr);
if (pairState == PairState.PIN_WRONG) {
message = getResources().getString(R.string.pair_incorrect_pin);
}
else if (pairState == PairState.FAILED) {
message = getResources().getString(R.string.pair_fail);
if (computer.runningGameId != 0) {
message = getResources().getString(R.string.pair_pc_ingame);
}
else {
message = getResources().getString(R.string.pair_fail);
}
}
else if (pairState == PairState.ALREADY_IN_PROGRESS) {
message = getResources().getString(R.string.pair_already_in_progress);
@@ -533,8 +543,7 @@ public class PcView extends Activity implements AdapterFragmentCallbacks {
String message;
try {
httpConn = new NvHTTP(ServerHelper.getCurrentAddressFromComputer(computer),
managerBinder.getUniqueId(),
computer.serverCert,
computer.httpsPort, managerBinder.getUniqueId(), computer.serverCert,
PlatformBinding.getCryptoProvider(PcView.this));
if (httpConn.getPairState() == PairingManager.PairState.PAIRED) {
httpConn.unpair();
@@ -657,6 +666,10 @@ public class PcView extends Activity implements AdapterFragmentCallbacks {
ServerHelper.doNetworkTest(PcView.this);
return true;
case GAMESTREAM_EOL_ID:
HelpLauncher.launchGameStreamEolFaq(PcView.this);
return true;
default:
return super.onContextItemSelected(item);
}
@@ -67,14 +67,12 @@ public class AndroidCryptoProvider implements LimelightCryptoProvider {
return null;
}
try {
FileInputStream fin = new FileInputStream(f);
try (final FileInputStream fin = new FileInputStream(f)) {
byte[] fileData = new byte[(int) f.length()];
if (fin.read(fileData) != f.length()) {
// Failed to read
fileData = null;
}
fin.close();
return fileData;
} catch (IOException e) {
return null;
@@ -160,32 +158,28 @@ public class AndroidCryptoProvider implements LimelightCryptoProvider {
}
private void saveCertKeyPair() {
try {
FileOutputStream certOut = new FileOutputStream(certFile);
FileOutputStream keyOut = new FileOutputStream(keyFile);
try (final FileOutputStream certOut = new FileOutputStream(certFile);
final FileOutputStream keyOut = new FileOutputStream(keyFile)
) {
// Write the certificate in OpenSSL PEM format (important for the server)
StringWriter strWriter = new StringWriter();
JcaPEMWriter pemWriter = new JcaPEMWriter(strWriter);
pemWriter.writeObject(cert);
pemWriter.close();
try (final JcaPEMWriter pemWriter = new JcaPEMWriter(strWriter)) {
pemWriter.writeObject(cert);
}
// Line endings MUST be UNIX for the PC to accept the cert properly
OutputStreamWriter certWriter = new OutputStreamWriter(certOut);
String pemStr = strWriter.getBuffer().toString();
for (int i = 0; i < pemStr.length(); i++) {
char c = pemStr.charAt(i);
if (c != '\r')
certWriter.append(c);
try (final OutputStreamWriter certWriter = new OutputStreamWriter(certOut)) {
String pemStr = strWriter.getBuffer().toString();
for (int i = 0; i < pemStr.length(); i++) {
char c = pemStr.charAt(i);
if (c != '\r')
certWriter.append(c);
}
}
certWriter.close();
// Write the private out in PKCS8 format
keyOut.write(key.getEncoded());
certOut.close();
keyOut.close();
LimeLog.info("Saved generated key pair to disk");
} catch (IOException e) {
// This isn't good because it means we'll have
@@ -9,6 +9,8 @@ import android.hardware.usb.UsbManager;
import android.media.AudioAttributes;
import android.os.Build;
import android.os.CombinedVibration;
import android.os.Handler;
import android.os.Looper;
import android.os.VibrationAttributes;
import android.os.VibrationEffect;
import android.os.Vibrator;
@@ -34,8 +36,6 @@ import com.limelight.utils.Vector2d;
import org.cgutman.shieldcontrollerextensions.SceManager;
import java.lang.reflect.InvocationTargetException;
import java.util.Timer;
import java.util.TimerTask;
public class ControllerHandler implements InputManager.InputDeviceListener, UsbDriverListener {
@@ -60,6 +60,7 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
private final GameGestures gestures;
private final Vibrator deviceVibrator;
private final SceManager sceManager;
private final Handler handler;
private boolean hasGameController;
private final PreferenceConfiguration prefConfig;
@@ -71,6 +72,7 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
this.gestures = gestures;
this.prefConfig = prefConfig;
this.deviceVibrator = (Vibrator) activityContext.getSystemService(Context.VIBRATOR_SERVICE);
this.handler = new Handler(Looper.getMainLooper());
this.sceManager = new SceManager(activityContext);
this.sceManager.start();
@@ -1292,28 +1294,6 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
}
}
private void toggleMouseEmulation(final GenericControllerContext context) {
if (context.mouseEmulationTimer != null) {
context.mouseEmulationTimer.cancel();
context.mouseEmulationTimer = null;
}
context.mouseEmulationActive = !context.mouseEmulationActive;
Toast.makeText(activityContext, "Mouse emulation is: " + (context.mouseEmulationActive ? "ON" : "OFF"), Toast.LENGTH_SHORT).show();
if (context.mouseEmulationActive) {
context.mouseEmulationTimer = new Timer();
context.mouseEmulationTimer.schedule(new TimerTask() {
@Override
public void run() {
// Send mouse movement events from analog sticks
sendEmulatedMouseEvent(context.leftStickX, context.leftStickY);
sendEmulatedMouseEvent(context.rightStickX, context.rightStickY);
}
}, 50, 50);
}
}
@TargetApi(31)
private boolean hasDualAmplitudeControlledRumbleVibrators(VibratorManager vm) {
int[] vibratorIds = vm.getVibratorIds();
@@ -1531,7 +1511,7 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
if ((context.inputMap & ControllerPacket.PLAY_FLAG) != 0 &&
event.getEventTime() - context.startDownTime > ControllerHandler.START_DOWN_TIME_MOUSE_MODE_MS &&
prefConfig.mouseEmulation) {
toggleMouseEmulation(context);
context.toggleMouseEmulation();
}
context.inputMap &= ~ControllerPacket.PLAY_FLAG;
break;
@@ -1878,7 +1858,7 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
usbDeviceContexts.put(controller.getControllerId(), context);
}
static class GenericControllerContext {
class GenericControllerContext {
public int id;
public boolean external;
@@ -1902,14 +1882,38 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
public short leftStickY = 0x0000;
public boolean mouseEmulationActive;
public Timer mouseEmulationTimer;
public short mouseEmulationLastInputMap;
public final int mouseEmulationReportPeriod = 50;
public final Runnable mouseEmulationRunnable = new Runnable() {
@Override
public void run() {
if (!mouseEmulationActive) {
return;
}
// Send mouse movement events from analog sticks
sendEmulatedMouseEvent(leftStickX, leftStickY);
sendEmulatedMouseEvent(rightStickX, rightStickY);
// Requeue the callback
handler.postDelayed(this, mouseEmulationReportPeriod);
}
};
public void toggleMouseEmulation() {
handler.removeCallbacks(mouseEmulationRunnable);
mouseEmulationActive = !mouseEmulationActive;
Toast.makeText(activityContext, "Mouse emulation is: " + (mouseEmulationActive ? "ON" : "OFF"), Toast.LENGTH_SHORT).show();
if (mouseEmulationActive) {
handler.postDelayed(mouseEmulationRunnable, mouseEmulationReportPeriod);
}
}
public void destroy() {
if (mouseEmulationTimer != null) {
mouseEmulationTimer.cancel();
mouseEmulationTimer = null;
}
mouseEmulationActive = false;
handler.removeCallbacks(mouseEmulationRunnable);
}
}
@@ -104,18 +104,20 @@ public class KeyboardTranslator implements InputManager.InputDeviceListener {
}
}
public static boolean needsShift(int keycode) {
switch (keycode)
{
case KeyEvent.KEYCODE_AT:
case KeyEvent.KEYCODE_POUND:
case KeyEvent.KEYCODE_PLUS:
case KeyEvent.KEYCODE_STAR:
return true;
default:
return false;
public boolean hasNormalizedMapping(int keycode, int deviceId) {
if (deviceId >= 0) {
KeyboardMapping mapping = keyboardMappings.get(deviceId);
if (mapping != null) {
// Try to map this device-specific keycode onto a QWERTY layout.
// GFE assumes incoming keycodes are from a QWERTY keyboard.
int qwertyKeyCode = mapping.getQwertyKeyCodeForDeviceKeyCode(keycode);
if (qwertyKeyCode != KeyEvent.KEYCODE_UNKNOWN) {
return true;
}
}
}
return false;
}
/**
@@ -343,20 +345,7 @@ public class KeyboardTranslator implements InputManager.InputDeviceListener {
translated = 0x6E;
break;
case KeyEvent.KEYCODE_AT:
translated = 2 + VK_0;
break;
case KeyEvent.KEYCODE_POUND:
translated = 3 + VK_0;
break;
case KeyEvent.KEYCODE_STAR:
translated = 8 + VK_0;
break;
default:
System.out.println("No key for "+keycode);
return 0;
}
}
@@ -44,7 +44,10 @@ public class AndroidNativePointerCaptureProvider extends AndroidPointerIconCaptu
// with SOURCE_TOUCHSCREEN, SOURCE_KEYBOARD, and SOURCE_MOUSE.
// Upon enabling pointer capture, that device will switch to
// SOURCE_KEYBOARD and SOURCE_TOUCHPAD.
if (device.supportsSource(InputDevice.SOURCE_TOUCHSCREEN)) {
// Only skip on non ChromeOS devices cause the ChromeOS pointer else
// gets disabled removing relative mouse capabilities
// on Chromebooks with touchscreens
if (device.supportsSource(InputDevice.SOURCE_TOUCHSCREEN) && !targetView.getContext().getPackageManager().hasSystemFeature("org.chromium.arc.device_management")) {
continue;
}
@@ -20,6 +20,7 @@ import com.limelight.LimeLog;
import com.limelight.R;
import com.limelight.preferences.PreferenceConfiguration;
import java.io.File;
import java.util.ArrayList;
public class UsbDriverService extends Service implements UsbDriverListener {
@@ -183,6 +184,9 @@ public class UsbDriverService extends Service implements UsbDriverListener {
else if (Xbox360Controller.canClaimDevice(device)) {
controller = new Xbox360Controller(device, connection, nextDeviceId++, this);
}
else if (Xbox360WirelessDongle.canClaimDevice(device)) {
controller = new Xbox360WirelessDongle(device, connection, nextDeviceId++, this);
}
else {
// Unreachable
return;
@@ -248,9 +252,32 @@ public class UsbDriverService extends Service implements UsbDriverListener {
}
}
public static boolean kernelSupportsXbox360W() {
// Check if this kernel is 4.2+ to see if the xpad driver sets Xbox 360 wireless LEDs
// https://github.com/torvalds/linux/commit/75b7f05d2798ee3a1cc5bbdd54acd0e318a80396
String kernelVersion = System.getProperty("os.version");
if (kernelVersion != null) {
if (kernelVersion.startsWith("2.") || kernelVersion.startsWith("3.") ||
kernelVersion.startsWith("4.0.") || kernelVersion.startsWith("4.1.")) {
// Even if LED devices are present, the driver won't set the initial LED state.
return false;
}
}
// We know we have a kernel that should set Xbox 360 wireless LEDs, but we still don't
// know if CONFIG_JOYSTICK_XPAD_LEDS was enabled during the kernel build. Unfortunately
// it's not possible to detect this reliably due to Android's app sandboxing. Reading
// /proc/config.gz and enumerating /sys/class/leds are both blocked by SELinux on any
// relatively modern device. We will assume that CONFIG_JOYSTICK_XPAD_LEDS=y on these
// kernels and users can override by using the settings option to claim all devices.
return true;
}
public static boolean shouldClaimDevice(UsbDevice device, boolean claimAllAvailable) {
return ((!kernelSupportsXboxOne() || !isRecognizedInputDevice(device) || claimAllAvailable) && XboxOneController.canClaimDevice(device)) ||
((!isRecognizedInputDevice(device) || claimAllAvailable) && Xbox360Controller.canClaimDevice(device));
((!isRecognizedInputDevice(device) || claimAllAvailable) && Xbox360Controller.canClaimDevice(device)) ||
// We must not call isRecognizedInputDevice() because wireless controllers don't share the same product ID as the dongle
((!kernelSupportsXbox360W() || claimAllAvailable) && Xbox360WirelessDongle.canClaimDevice(device));
}
private void start() {
@@ -0,0 +1,145 @@
package com.limelight.binding.input.driver;
import android.hardware.usb.UsbConstants;
import android.hardware.usb.UsbDevice;
import android.hardware.usb.UsbDeviceConnection;
import android.hardware.usb.UsbEndpoint;
import android.hardware.usb.UsbInterface;
import android.os.Build;
import android.view.InputDevice;
import com.limelight.LimeLog;
import java.nio.ByteBuffer;
public class Xbox360WirelessDongle extends AbstractController {
private UsbDevice device;
private UsbDeviceConnection connection;
private static final int XB360W_IFACE_SUBCLASS = 93;
private static final int XB360W_IFACE_PROTOCOL = 129; // Wireless only
private static final int[] SUPPORTED_VENDORS = {
0x045e, // Microsoft
};
public static boolean canClaimDevice(UsbDevice device) {
for (int supportedVid : SUPPORTED_VENDORS) {
if (device.getVendorId() == supportedVid &&
device.getInterfaceCount() >= 1 &&
device.getInterface(0).getInterfaceClass() == UsbConstants.USB_CLASS_VENDOR_SPEC &&
device.getInterface(0).getInterfaceSubclass() == XB360W_IFACE_SUBCLASS &&
device.getInterface(0).getInterfaceProtocol() == XB360W_IFACE_PROTOCOL) {
return true;
}
}
return false;
}
public Xbox360WirelessDongle(UsbDevice device, UsbDeviceConnection connection, int deviceId, UsbDriverListener listener) {
super(deviceId, listener, device.getVendorId(), device.getProductId());
this.device = device;
this.connection = connection;
}
private void sendLedCommandToEndpoint(UsbEndpoint endpoint, int controllerIndex) {
byte[] commandBuffer = {
0x00,
0x00,
0x08,
(byte) (0x40 + (2 + (controllerIndex % 4))),
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00};
int res = connection.bulkTransfer(endpoint, commandBuffer, commandBuffer.length, 3000);
if (res != commandBuffer.length) {
LimeLog.warning("LED set transfer failed: "+res);
}
}
private void sendLedCommandToInterface(UsbInterface iface, int controllerIndex) {
// Claim this interface to kick xpad off it (temporarily)
if (!connection.claimInterface(iface, true)) {
LimeLog.warning("Failed to claim interface: "+iface.getId());
return;
}
// Find the out endpoint for this interface
for (int i = 0; i < iface.getEndpointCount(); i++) {
UsbEndpoint endpt = iface.getEndpoint(i);
if (endpt.getDirection() == UsbConstants.USB_DIR_OUT) {
// Send the LED command
sendLedCommandToEndpoint(endpt, controllerIndex);
break;
}
}
// Release the interface to allow xpad to take over again
connection.releaseInterface(iface);
}
@Override
public boolean start() {
int controllerIndex = 0;
// On KitKat, there is a controller number associated with input devices.
// We can use this to approximate the likely controller number. This won't
// be completely accurate because there's no guarantee the order of interfaces
// matches the order that devices were enumerated by xpad, but it's probably
// better than nothing.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
for (int id : InputDevice.getDeviceIds()) {
InputDevice inputDev = InputDevice.getDevice(id);
if (inputDev == null) {
// Device was removed while looping
continue;
}
// Newer xpad versions use a special product ID (0x02a1) for controllers
// rather than copying the product ID of the dongle itself.
if (inputDev.getVendorId() == device.getVendorId() &&
(inputDev.getProductId() == device.getProductId() ||
inputDev.getProductId() == 0x02a1) &&
inputDev.getControllerNumber() > 0) {
controllerIndex = inputDev.getControllerNumber() - 1;
break;
}
}
}
// Send LED commands on the out endpoint of each interface. There is one interface
// corresponding to each possible attached controller.
for (int i = 0; i < device.getInterfaceCount(); i++) {
UsbInterface iface = device.getInterface(i);
// Skip the non-input interfaces
if (iface.getInterfaceClass() != UsbConstants.USB_CLASS_VENDOR_SPEC ||
iface.getInterfaceSubclass() != XB360W_IFACE_SUBCLASS ||
iface.getInterfaceProtocol() != XB360W_IFACE_PROTOCOL) {
continue;
}
sendLedCommandToInterface(iface, controllerIndex++);
}
// "Fail" to give control back to the kernel driver
return false;
}
@Override
public void stop() {
// Nothing to do
}
@Override
public void rumble(short lowFreqMotor, short highFreqMotor) {
// Unreachable.
}
}
@@ -9,6 +9,7 @@ public interface EvdevListener {
void mouseMove(int deltaX, int deltaY);
void mouseButtonEvent(int buttonId, boolean down);
void mouseScroll(byte amount);
void mouseVScroll(byte amount);
void mouseHScroll(byte amount);
void keyboardEvent(boolean buttonDown, short keyCode);
}
@@ -7,9 +7,6 @@ import android.view.View;
import com.limelight.nvstream.NvConnection;
import com.limelight.nvstream.input.MouseButtonPacket;
import java.util.Timer;
import java.util.TimerTask;
public class AbsoluteTouchContext implements TouchContext {
private int lastTouchDownX = 0;
private int lastTouchDownY = 0;
@@ -22,8 +19,29 @@ public class AbsoluteTouchContext implements TouchContext {
private boolean cancelled;
private boolean confirmedLongPress;
private boolean confirmedTap;
private Timer longPressTimer;
private Timer tapDownTimer;
private final Runnable longPressRunnable = new Runnable() {
@Override
public void run() {
// This timer should have already expired, but cancel it just in case
cancelTapDownTimer();
// Switch from a left click to a right click after a long press
confirmedLongPress = true;
if (confirmedTap) {
conn.sendMouseButtonUp(MouseButtonPacket.BUTTON_LEFT);
}
conn.sendMouseButtonDown(MouseButtonPacket.BUTTON_RIGHT);
}
};
private final Runnable tapDownRunnable = new Runnable() {
@Override
public void run() {
// Start our tap
tapConfirmed();
}
};
private final NvConnection conn;
private final int actionIndex;
@@ -136,67 +154,22 @@ public class AbsoluteTouchContext implements TouchContext {
lastTouchUpTime = eventTime;
}
private synchronized void startLongPressTimer() {
longPressTimer = new Timer(true);
longPressTimer.schedule(new TimerTask() {
@Override
public void run() {
synchronized (AbsoluteTouchContext.this) {
// Check if someone cancelled us
if (longPressTimer == null) {
return;
}
// Uncancellable now
longPressTimer = null;
// This timer should have already expired, but cancel it just in case
cancelTapDownTimer();
// Switch from a left click to a right click after a long press
confirmedLongPress = true;
if (confirmedTap) {
conn.sendMouseButtonUp(MouseButtonPacket.BUTTON_LEFT);
}
conn.sendMouseButtonDown(MouseButtonPacket.BUTTON_RIGHT);
}
}
}, LONG_PRESS_TIME_THRESHOLD);
private void startLongPressTimer() {
cancelLongPressTimer();
handler.postDelayed(longPressRunnable, LONG_PRESS_TIME_THRESHOLD);
}
private synchronized void cancelLongPressTimer() {
if (longPressTimer != null) {
longPressTimer.cancel();
longPressTimer = null;
}
private void cancelLongPressTimer() {
handler.removeCallbacks(longPressRunnable);
}
private synchronized void startTapDownTimer() {
tapDownTimer = new Timer(true);
tapDownTimer.schedule(new TimerTask() {
@Override
public void run() {
synchronized (AbsoluteTouchContext.this) {
// Check if someone cancelled us
if (tapDownTimer == null) {
return;
}
// Uncancellable now
tapDownTimer = null;
// Start our tap
tapConfirmed();
}
}
}, TOUCH_DOWN_DEAD_ZONE_TIME_THRESHOLD);
private void startTapDownTimer() {
cancelTapDownTimer();
handler.postDelayed(tapDownRunnable, TOUCH_DOWN_DEAD_ZONE_TIME_THRESHOLD);
}
private synchronized void cancelTapDownTimer() {
if (tapDownTimer != null) {
tapDownTimer.cancel();
tapDownTimer = null;
}
private void cancelTapDownTimer() {
handler.removeCallbacks(tapDownRunnable);
}
private void tapConfirmed() {
@@ -8,9 +8,6 @@ import com.limelight.nvstream.NvConnection;
import com.limelight.nvstream.input.MouseButtonPacket;
import com.limelight.preferences.PreferenceConfiguration;
import java.util.Timer;
import java.util.TimerTask;
public class RelativeTouchContext implements TouchContext {
private int lastTouchX = 0;
private int lastTouchY = 0;
@@ -21,7 +18,6 @@ public class RelativeTouchContext implements TouchContext {
private boolean confirmedMove;
private boolean confirmedDrag;
private boolean confirmedScroll;
private Timer dragTimer;
private double distanceMoved;
private double xFactor, yFactor;
private int pointerCount;
@@ -35,6 +31,25 @@ public class RelativeTouchContext implements TouchContext {
private final PreferenceConfiguration prefConfig;
private final Handler handler;
private final Runnable dragTimerRunnable = new Runnable() {
@Override
public void run() {
// Check if someone already set move
if (confirmedMove) {
return;
}
// The drag should only be processed for the primary finger
if (actionIndex != maxPointerCountInGesture - 1) {
return;
}
// We haven't been cancelled before the timer expired so begin dragging
confirmedDrag = true;
conn.sendMouseButtonDown(getMouseButtonIndex());
}
};
// Indexed by MouseButtonPacket.BUTTON_XXX - 1
private final Runnable[] buttonUpRunnables = new Runnable[] {
new Runnable() {
@@ -184,49 +199,16 @@ public class RelativeTouchContext implements TouchContext {
}
}
private synchronized void startDragTimer() {
// Cancel any existing drag timers
private void startDragTimer() {
cancelDragTimer();
dragTimer = new Timer(true);
dragTimer.schedule(new TimerTask() {
@Override
public void run() {
synchronized (RelativeTouchContext.this) {
// Check if someone already set move
if (confirmedMove) {
return;
}
// The drag should only be processed for the primary finger
if (actionIndex != maxPointerCountInGesture - 1) {
return;
}
// Check if someone cancelled us
if (dragTimer == null) {
return;
}
// Uncancellable now
dragTimer = null;
// We haven't been cancelled before the timer expired so begin dragging
confirmedDrag = true;
conn.sendMouseButtonDown(getMouseButtonIndex());
}
}
}, DRAG_TIME_THRESHOLD);
handler.postDelayed(dragTimerRunnable, DRAG_TIME_THRESHOLD);
}
private synchronized void cancelDragTimer() {
if (dragTimer != null) {
dragTimer.cancel();
dragTimer = null;
}
private void cancelDragTimer() {
handler.removeCallbacks(dragTimerRunnable);
}
private synchronized void checkForConfirmedMove(int eventX, int eventY) {
private void checkForConfirmedMove(int eventX, int eventY) {
// If we've already confirmed something, get out now
if (confirmedMove || confirmedDrag) {
return;
@@ -305,8 +305,7 @@ public class AnalogStick extends VirtualControllerElement {
// handle event depending on action
switch (event.getActionMasked()) {
// down event (touch event)
case MotionEvent.ACTION_DOWN:
case MotionEvent.ACTION_POINTER_DOWN: {
case MotionEvent.ACTION_DOWN: {
// set to dead zoned, will be corrected in update position if necessary
stick_state = STICK_STATE.MOVED_IN_DEAD_ZONE;
// check for double click
@@ -325,8 +324,8 @@ public class AnalogStick extends VirtualControllerElement {
break;
}
// up event (revoke touch)
case MotionEvent.ACTION_UP:
case MotionEvent.ACTION_POINTER_UP: {
case MotionEvent.ACTION_CANCEL:
case MotionEvent.ACTION_UP: {
setPressed(false);
break;
}
@@ -14,8 +14,6 @@ import android.view.MotionEvent;
import java.util.ArrayList;
import java.util.List;
import java.util.Timer;
import java.util.TimerTask;
/**
* This is a digital button on screen element. It is used to get click and double click user input.
@@ -43,22 +41,16 @@ public class DigitalButton extends VirtualControllerElement {
void onRelease();
}
/**
*
*/
private class TimerLongClickTimerTask extends TimerTask {
@Override
public void run() {
onLongClickCallback();
}
}
private List<DigitalButtonListener> listeners = new ArrayList<>();
private String text = "";
private int icon = -1;
private long timerLongClickTimeout = 3000;
private Timer timerLongClick = null;
private TimerLongClickTimerTask longClickTimerTask = null;
private final Runnable longClickRunnable = new Runnable() {
@Override
public void run() {
onLongClickCallback();
}
};
private final Paint paint = new Paint();
private final RectF rect = new RectF();
@@ -177,18 +169,8 @@ public class DigitalButton extends VirtualControllerElement {
listener.onClick();
}
if (timerLongClick != null) {
timerLongClick.cancel();
timerLongClick = null;
}
if (longClickTimerTask != null) {
longClickTimerTask.cancel();
longClickTimerTask = null;
}
timerLongClick = new Timer();
longClickTimerTask = new TimerLongClickTimerTask();
timerLongClick.schedule(longClickTimerTask, timerLongClickTimeout);
virtualController.getHandler().removeCallbacks(longClickRunnable);
virtualController.getHandler().postDelayed(longClickRunnable, timerLongClickTimeout);
}
private void onLongClickCallback() {
@@ -207,14 +189,7 @@ public class DigitalButton extends VirtualControllerElement {
}
// We may be called for a release without a prior click
if (timerLongClick != null) {
timerLongClick.cancel();
timerLongClick = null;
}
if (longClickTimerTask != null) {
longClickTimerTask.cancel();
longClickTimerTask = null;
}
virtualController.getHandler().removeCallbacks(longClickRunnable);
}
@Override
@@ -225,8 +200,7 @@ public class DigitalButton extends VirtualControllerElement {
int action = event.getActionMasked();
switch (action) {
case MotionEvent.ACTION_DOWN:
case MotionEvent.ACTION_POINTER_DOWN: {
case MotionEvent.ACTION_DOWN: {
movingButton = null;
setPressed(true);
onClickCallback();
@@ -241,8 +215,7 @@ public class DigitalButton extends VirtualControllerElement {
return true;
}
case MotionEvent.ACTION_CANCEL:
case MotionEvent.ACTION_UP:
case MotionEvent.ACTION_POINTER_UP: {
case MotionEvent.ACTION_UP: {
setPressed(false);
onReleaseCallback();
@@ -162,7 +162,6 @@ public class DigitalPad extends VirtualControllerElement {
// get masked (not specific to a pointer) action
switch (event.getActionMasked()) {
case MotionEvent.ACTION_DOWN:
case MotionEvent.ACTION_POINTER_DOWN:
case MotionEvent.ACTION_MOVE: {
direction = 0;
@@ -184,8 +183,7 @@ public class DigitalPad extends VirtualControllerElement {
return true;
}
case MotionEvent.ACTION_CANCEL:
case MotionEvent.ACTION_UP:
case MotionEvent.ACTION_POINTER_UP: {
case MotionEvent.ACTION_UP: {
direction = 0;
newDirectionCallback(direction);
invalidate();
@@ -5,6 +5,8 @@
package com.limelight.binding.input.virtual_controller;
import android.content.Context;
import android.os.Handler;
import android.os.Looper;
import android.util.DisplayMetrics;
import android.view.View;
import android.widget.Button;
@@ -17,8 +19,6 @@ import com.limelight.binding.input.ControllerHandler;
import java.util.ArrayList;
import java.util.List;
import java.util.Timer;
import java.util.TimerTask;
public class VirtualController {
public static class ControllerInputContext {
@@ -41,11 +41,17 @@ public class VirtualController {
private final ControllerHandler controllerHandler;
private final Context context;
private final Handler handler;
private final Runnable delayedRetransmitRunnable = new Runnable() {
@Override
public void run() {
sendControllerInputContextInternal();
}
};
private FrameLayout frame_layout = null;
private Timer retransmitTimer;
ControllerMode currentMode = ControllerMode.Active;
ControllerInputContext inputContext = new ControllerInputContext();
@@ -57,6 +63,7 @@ public class VirtualController {
this.controllerHandler = controllerHandler;
this.frame_layout = layout;
this.context = context;
this.handler = new Handler(Looper.getMainLooper());
buttonConfigure = new Button(context);
buttonConfigure.setAlpha(0.25f);
@@ -91,9 +98,11 @@ public class VirtualController {
}
public void hide() {
retransmitTimer.cancel();
Handler getHandler() {
return handler;
}
public void hide() {
for (VirtualControllerElement element : elements) {
element.setVisibility(View.INVISIBLE);
}
@@ -107,18 +116,6 @@ public class VirtualController {
}
buttonConfigure.setVisibility(View.VISIBLE);
// HACK: GFE sometimes discards gamepad packets when they are received
// very shortly after another. This can be critical if an axis zeroing packet
// is lost and causes an analog stick to get stuck. To avoid this, we send
// a gamepad input packet every 100 ms to ensure any loss can be recovered.
retransmitTimer = new Timer("OSC timer", true);
retransmitTimer.schedule(new TimerTask() {
@Override
public void run() {
sendControllerInputContext();
}
}, 100, 100);
}
public void removeElements() {
@@ -181,7 +178,7 @@ public class VirtualController {
return inputContext;
}
void sendControllerInputContext() {
private void sendControllerInputContextInternal() {
_DBG("INPUT_MAP + " + inputContext.inputMap);
_DBG("LEFT_TRIGGER " + inputContext.leftTrigger);
_DBG("RIGHT_TRIGGER " + inputContext.rightTrigger);
@@ -200,4 +197,19 @@ public class VirtualController {
);
}
}
void sendControllerInputContext() {
// Cancel retransmissions of prior gamepad inputs
handler.removeCallbacks(delayedRetransmitRunnable);
sendControllerInputContextInternal();
// HACK: GFE sometimes discards gamepad packets when they are received
// very shortly after another. This can be critical if an axis zeroing packet
// is lost and causes an analog stick to get stuck. To avoid this, we retransmit
// the gamepad state a few times unless another input event happens before then.
handler.postDelayed(delayedRetransmitRunnable, 25);
handler.postDelayed(delayedRetransmitRunnable, 50);
handler.postDelayed(delayedRetransmitRunnable, 75);
}
}
@@ -40,27 +40,31 @@ public class VirtualControllerConfigurationLoader {
VirtualController.ControllerInputContext inputContext =
controller.getControllerInputContext();
if (direction == DigitalPad.DIGITAL_PAD_DIRECTION_NO_DIRECTION) {
inputContext.inputMap &= ~ControllerPacket.LEFT_FLAG;
inputContext.inputMap &= ~ControllerPacket.RIGHT_FLAG;
inputContext.inputMap &= ~ControllerPacket.UP_FLAG;
inputContext.inputMap &= ~ControllerPacket.DOWN_FLAG;
controller.sendControllerInputContext();
return;
}
if ((direction & DigitalPad.DIGITAL_PAD_DIRECTION_LEFT) > 0) {
if ((direction & DigitalPad.DIGITAL_PAD_DIRECTION_LEFT) != 0) {
inputContext.inputMap |= ControllerPacket.LEFT_FLAG;
}
if ((direction & DigitalPad.DIGITAL_PAD_DIRECTION_RIGHT) > 0) {
else {
inputContext.inputMap &= ~ControllerPacket.LEFT_FLAG;
}
if ((direction & DigitalPad.DIGITAL_PAD_DIRECTION_RIGHT) != 0) {
inputContext.inputMap |= ControllerPacket.RIGHT_FLAG;
}
if ((direction & DigitalPad.DIGITAL_PAD_DIRECTION_UP) > 0) {
else {
inputContext.inputMap &= ~ControllerPacket.RIGHT_FLAG;
}
if ((direction & DigitalPad.DIGITAL_PAD_DIRECTION_UP) != 0) {
inputContext.inputMap |= ControllerPacket.UP_FLAG;
}
if ((direction & DigitalPad.DIGITAL_PAD_DIRECTION_DOWN) > 0) {
else {
inputContext.inputMap &= ~ControllerPacket.UP_FLAG;
}
if ((direction & DigitalPad.DIGITAL_PAD_DIRECTION_DOWN) != 0) {
inputContext.inputMap |= ControllerPacket.DOWN_FLAG;
}
else {
inputContext.inputMap &= ~ControllerPacket.DOWN_FLAG;
}
controller.sendControllerInputContext();
}
});
@@ -223,13 +223,21 @@ public abstract class VirtualControllerElement extends View {
@Override
public boolean onTouchEvent(MotionEvent event) {
// Ignore secondary touches on controls
//
// NB: We can get an additional pointer down if the user touches a non-StreamView area
// while also touching an OSC control, even if that pointer down doesn't correspond to
// an area of the OSC control.
if (event.getActionIndex() != 0) {
return true;
}
if (virtualController.getControllerMode() == VirtualController.ControllerMode.Active) {
return onElementTouchEvent(event);
}
switch (event.getActionMasked()) {
case MotionEvent.ACTION_DOWN:
case MotionEvent.ACTION_POINTER_DOWN: {
case MotionEvent.ACTION_DOWN: {
position_pressed_x = event.getX();
position_pressed_y = event.getY();
startSize_x = getWidth();
@@ -267,8 +275,7 @@ public abstract class VirtualControllerElement extends View {
return true;
}
case MotionEvent.ACTION_CANCEL:
case MotionEvent.ACTION_UP:
case MotionEvent.ACTION_POINTER_UP: {
case MotionEvent.ACTION_UP: {
actionCancel();
return true;
}
File diff suppressed because it is too large Load Diff
@@ -14,6 +14,7 @@ import android.annotation.SuppressLint;
import android.app.ActivityManager;
import android.content.Context;
import android.content.pm.ConfigurationInfo;
import android.media.MediaCodec;
import android.media.MediaCodecInfo;
import android.media.MediaCodecList;
import android.media.MediaCodecInfo.CodecCapabilities;
@@ -31,7 +32,6 @@ public class MediaCodecHelper {
private static final List<String> blacklistedDecoderPrefixes;
private static final List<String> spsFixupBitstreamFixupDecoderPrefixes;
private static final List<String> blacklistedAdaptivePlaybackPrefixes;
private static final List<String> deprioritizedHevcDecoders;
private static final List<String> baselineProfileHackPrefixes;
private static final List<String> directSubmitPrefixes;
private static final List<String> constrainedHighProfilePrefixes;
@@ -43,8 +43,10 @@ public class MediaCodecHelper {
private static final List<String> kirinDecoderPrefixes;
private static final List<String> exynosDecoderPrefixes;
private static final List<String> amlogicDecoderPrefixes;
private static final List<String> knownVendorLowLatencyOptions;
public static final boolean IS_EMULATOR = Build.HARDWARE.equals("ranchu") || Build.HARDWARE.equals("cheets");
public static final boolean SHOULD_BYPASS_SOFTWARE_BLOCK =
Build.HARDWARE.equals("ranchu") || Build.HARDWARE.equals("cheets") || Build.BRAND.equals("Android-x86");
private static boolean isLowEndSnapdragon = false;
private static boolean isAdreno620 = false;
@@ -70,7 +72,10 @@ public class MediaCodecHelper {
static {
refFrameInvalidationAvcPrefixes = new LinkedList<>();
refFrameInvalidationHevcPrefixes = new LinkedList<>();
refFrameInvalidationHevcPrefixes.add("omx.exynos");
refFrameInvalidationHevcPrefixes.add("c2.exynos");
// Qualcomm and NVIDIA may be added at runtime
}
@@ -82,18 +87,18 @@ public class MediaCodecHelper {
static {
blacklistedDecoderPrefixes = new LinkedList<>();
// Blacklist software decoders that don't support H264 high profile,
// but exclude the official AOSP and CrOS emulator from this restriction.
if (!IS_EMULATOR) {
// Blacklist software decoders that don't support H264 high profile except on systems
// that are expected to only have software decoders (like emulators).
if (!SHOULD_BYPASS_SOFTWARE_BLOCK) {
blacklistedDecoderPrefixes.add("omx.google");
blacklistedDecoderPrefixes.add("AVCDecoder");
}
// We want to avoid ffmpeg decoders since they're software decoders,
// but on Android-x86 they might be all we have (and also relatively
// performant on a modern x86 processor).
if (!Build.BRAND.equals("Android-x86")) {
blacklistedDecoderPrefixes.add("OMX.ffmpeg");
// We want to avoid ffmpeg decoders since they're usually software decoders,
// but we'll defer to the Android 10 isSoftwareOnly() API on newer devices
// to determine if we should use these or not.
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) {
blacklistedDecoderPrefixes.add("OMX.ffmpeg");
}
}
// Force these decoders disabled because:
@@ -172,6 +177,9 @@ public class MediaCodecHelper {
// vendor.low-latency.enable. We will still use HEVC if decoderCanMeetPerformancePointWithHevcAndNotAvc()
// determines it's the only way to meet the performance requirements.
//
// With the Android 12 update, Sabrina now uses HEVC (with RFI) based upon FEATURE_LowLatency
// support, which provides equivalent latency to H.264 now.
//
// FIXME: Should we do this for all Amlogic S905X SoCs?
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P && !Build.DEVICE.equalsIgnoreCase("sabrina")) {
whitelistedHevcDecoders.add("omx.amlogic");
@@ -194,14 +202,6 @@ public class MediaCodecHelper {
// during initialization to avoid SoCs with broken HEVC decoders.
}
static {
deprioritizedHevcDecoders = new LinkedList<>();
// These are decoders that work but aren't used by default for various reasons.
// Qualcomm is currently the only decoders in this group.
}
static {
useFourSlicesPrefixes = new LinkedList<>();
@@ -214,6 +214,15 @@ public class MediaCodecHelper {
// Old Qualcomm decoders are detected at runtime
}
static {
knownVendorLowLatencyOptions = new LinkedList<>();
knownVendorLowLatencyOptions.add("vendor.qti-ext-dec-low-latency.enable");
knownVendorLowLatencyOptions.add("vendor.hisi-ext-low-latency-video-dec.video-scene-for-low-latency-req");
knownVendorLowLatencyOptions.add("vendor.rtc-ext-dec-low-latency.enable");
knownVendorLowLatencyOptions.add("vendor.low-latency.enable");
}
static {
qualcommDecoderPrefixes = new LinkedList<>();
@@ -305,12 +314,33 @@ public class MediaCodecHelper {
// We still have to check Build.MANUFACTURER to catch Amazon Fire tablets.
if (context.getPackageManager().hasSystemFeature("amazon.hardware.fire_tv") ||
Build.MANUFACTURER.equalsIgnoreCase("Amazon")) {
// HEVC and RFI have been confirmed working on Fire TV 2, Fire TV Stick 2, Fire TV 4K Max,
// Fire HD 8 2020, and Fire HD 8 2022 models.
//
// This is probably a good enough sample to conclude that all MediaTek Fire OS devices
// are likely to be okay.
whitelistedHevcDecoders.add("omx.mtk");
refFrameInvalidationHevcPrefixes.add("omx.mtk");
refFrameInvalidationHevcPrefixes.add("c2.mtk");
// This requires setting vdec-lowlatency on the Fire TV 3, otherwise the decoder
// never produces any output frames. See comment above for details on why we only
// do this for Fire TV devices.
whitelistedHevcDecoders.add("omx.amlogic");
// Fire TV 3 seems to produce random artifacts on HEVC streams after packet loss.
// Enabling RFI turns these artifacts into full decoder output hangs, so let's not enable
// that for Fire OS 6 Amlogic devices. We will leave HEVC enabled because that's the only
// way these devices can hit 4K. Hopefully this is just a problem with the BSP used in
// the Fire OS 6 Amlogic devices, so we will leave this enabled for Fire OS 7+.
//
// Apart from a few TV models, the main Amlogic-based Fire TV devices are the Fire TV
// Cubes and Fire TV 3. This check will exclude the Fire TV 3 and Fire TV Cube 1, but
// allow the newer Fire TV Cubes to use HEVC RFI.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
refFrameInvalidationHevcPrefixes.add("omx.amlogic");
refFrameInvalidationHevcPrefixes.add("c2.amlogic");
}
}
ActivityManager activityManager =
@@ -324,19 +354,24 @@ public class MediaCodecHelper {
// Tegra K1 and later can do reference frame invalidation properly
if (configInfo.reqGlEsVersion >= 0x30000) {
LimeLog.info("Added omx.nvidia to AVC reference frame invalidation support list");
LimeLog.info("Added omx.nvidia/c2.nvidia to reference frame invalidation support list");
refFrameInvalidationAvcPrefixes.add("omx.nvidia");
LimeLog.info("Added omx.qcom/c2.qti to AVC reference frame invalidation support list");
refFrameInvalidationAvcPrefixes.add("omx.qcom");
refFrameInvalidationAvcPrefixes.add("c2.qti");
// Prior to M, we were tricking the decoder into using baseline profile, which
// won't support RFI properly.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
LimeLog.info("Added omx.intel to AVC reference frame invalidation support list");
refFrameInvalidationAvcPrefixes.add("omx.intel");
// Exclude HEVC RFI on Pixel C and Tegra devices prior to Android 11. Misbehaving RFI
// on these devices can cause hundreds of milliseconds of latency, so it's not worth
// using it unless we're absolutely sure that it will not cause increased latency.
if (!Build.DEVICE.equalsIgnoreCase("dragon") && Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
refFrameInvalidationHevcPrefixes.add("omx.nvidia");
}
refFrameInvalidationAvcPrefixes.add("c2.nvidia"); // Unconfirmed
refFrameInvalidationHevcPrefixes.add("c2.nvidia"); // Unconfirmed
LimeLog.info("Added omx.qcom/c2.qti to reference frame invalidation support list");
refFrameInvalidationAvcPrefixes.add("omx.qcom");
refFrameInvalidationHevcPrefixes.add("omx.qcom");
refFrameInvalidationAvcPrefixes.add("c2.qti");
refFrameInvalidationHevcPrefixes.add("c2.qti");
}
// Qualcomm's early HEVC decoders break hard on our HEVC stream. The best check to
@@ -348,13 +383,9 @@ public class MediaCodecHelper {
// (see comment on isGLES31SnapdragonRenderer).
//
if (isGLES31SnapdragonRenderer(glRenderer)) {
// We prefer reference frame invalidation support (which is only doable on AVC on
// older Qualcomm chips) vs. enabling HEVC by default. The user can override using the settings
// to force HEVC on. If HDR or mobile data will be used, we'll override this and use
// HEVC anyway.
LimeLog.info("Added omx.qcom/c2.qti to deprioritized HEVC decoders based on GLES 3.1+ support");
deprioritizedHevcDecoders.add("omx.qcom");
deprioritizedHevcDecoders.add("c2.qti");
LimeLog.info("Added omx.qcom/c2.qti to HEVC decoders based on GLES 3.1+ support");
whitelistedHevcDecoders.add("omx.qcom");
whitelistedHevcDecoders.add("c2.qti");
}
else {
blacklistedDecoderPrefixes.add("OMX.qcom.video.decoder.hevc");
@@ -374,8 +405,9 @@ public class MediaCodecHelper {
// decoder hangs on the newer GE8100, GE8300, and GE8320 GPUs, so we limit it to the
// Series6XT GPUs where we know it works.
if (glRenderer.contains("GX6")) {
LimeLog.info("Added omx.mtk to RFI list for HEVC");
LimeLog.info("Added omx.mtk/c2.mtk to RFI list for HEVC");
refFrameInvalidationHevcPrefixes.add("omx.mtk");
refFrameInvalidationHevcPrefixes.add("c2.mtk");
}
}
}
@@ -416,6 +448,35 @@ public class MediaCodecHelper {
return false;
}
private static boolean decoderSupportsKnownVendorLowLatencyOption(String decoderName) {
// It's only possible to probe vendor parameters on Android 12 and above.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
MediaCodec testCodec = null;
try {
// Unfortunately we have to create an actual codec instance to get supported options.
testCodec = MediaCodec.createByCodecName(decoderName);
// See if any of the vendor parameters match ones we know about
for (String supportedOption : testCodec.getSupportedVendorParameters()) {
for (String knownLowLatencyOption : knownVendorLowLatencyOptions) {
if (supportedOption.equalsIgnoreCase(knownLowLatencyOption)) {
LimeLog.info(decoderName + " supports known low latency option: " + supportedOption);
return true;
}
}
}
} catch (Exception e) {
// Tolerate buggy codecs
e.printStackTrace();
} finally {
if (testCodec != null) {
testCodec.release();
}
}
}
return false;
}
private static boolean decoderSupportsMaxOperatingRate(String decoderName) {
// Operate at maximum rate to lower latency as much as possible on
// some Qualcomm platforms. We could also set KEY_PRIORITY to 0 (realtime)
@@ -476,6 +537,8 @@ public class MediaCodecHelper {
// https://cs.android.com/android/_/android/platform/frameworks/av/+/01c10f8cdcd58d1e7025f426a72e6e75ba5d7fc2
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
// Try vendor-specific low latency options
//
// NOTE: Update knownVendorLowLatencyOptions if you modify this code!
if (isDecoderInList(qualcommDecoderPrefixes, decoderInfo.getName())) {
// Examples of Qualcomm's vendor extensions for Snapdragon 845:
// https://cs.android.com/android/platform/superproject/+/master:hardware/qcom/sdm845/media/mm-video-v4l2/vidc/vdec/src/omx_vdec_extensions.hpp
@@ -611,11 +674,24 @@ public class MediaCodecHelper {
return isDecoderInList(refFrameInvalidationAvcPrefixes, decoderName);
}
public static boolean decoderSupportsRefFrameInvalidationHevc(String decoderName) {
return isDecoderInList(refFrameInvalidationHevcPrefixes, decoderName);
public static boolean decoderSupportsRefFrameInvalidationHevc(MediaCodecInfo decoderInfo) {
// HEVC decoders seem to universally support RFI, but it can have huge latency penalties
// for some decoders due to the number of references frames being > 1. Old Amlogic
// decoders are known to have this problem.
//
// If the decoder supports FEATURE_LowLatency or any vendor low latency option,
// we will use that as an indication that it can handle HEVC RFI without excessively
// buffering frames.
if (decoderSupportsAndroidRLowLatency(decoderInfo, "video/hevc") ||
decoderSupportsKnownVendorLowLatencyOption(decoderInfo.getName())) {
LimeLog.info("Enabling HEVC RFI based on low latency option support");
return true;
}
return isDecoderInList(refFrameInvalidationHevcPrefixes, decoderInfo.getName());
}
public static boolean decoderIsWhitelistedForHevc(String decoderName, boolean meteredData, PreferenceConfiguration prefs) {
public static boolean decoderIsWhitelistedForHevc(MediaCodecInfo decoderInfo) {
// Google didn't have official support for HEVC (or more importantly, a CTS test) until
// Lollipop. I've seen some MediaTek devices on 4.4 crash when attempting to use HEVC,
// so I'm restricting HEVC usage to Lollipop and higher.
@@ -629,26 +705,36 @@ public class MediaCodecHelper {
// OMX.qcom.video.decoder.hevcswvdec
// OMX.SEC.hevc.sw.dec
//
if (decoderName.contains("sw")) {
if (decoderInfo.getName().contains("sw")) {
LimeLog.info("Disallowing HEVC on software decoder: " + decoderInfo.getName());
return false;
}
else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q && (!decoderInfo.isHardwareAccelerated() || decoderInfo.isSoftwareOnly())) {
LimeLog.info("Disallowing HEVC on software decoder: " + decoderInfo.getName());
return false;
}
// Some devices have HEVC decoders that we prefer not to use
// typically because it can't support reference frame invalidation.
// However, we will use it for HDR and for streaming over mobile networks
// since it works fine otherwise. We will also use it for 4K because RFI
// is currently disabled due to issues with video corruption.
if (isDecoderInList(deprioritizedHevcDecoders, decoderName)) {
if (meteredData || (prefs.width == 3840 && prefs.height == 2160)) {
LimeLog.info("Selected deprioritized decoder");
// If this device is media performance class 12 or higher, we will assume any hardware
// HEVC decoder present is fast and modern enough for streaming.
//
// [5.3/H-1-1] MUST NOT drop more than 2 frames in 10 seconds (i.e less than 0.333 percent frame drop) for a 1080p 60 fps video session under load.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
LimeLog.info("Media performance class: " + Build.VERSION.MEDIA_PERFORMANCE_CLASS);
if (Build.VERSION.MEDIA_PERFORMANCE_CLASS >= Build.VERSION_CODES.S) {
LimeLog.info("Allowing HEVC based on media performance class");
return true;
}
else {
return false;
}
}
return isDecoderInList(whitelistedHevcDecoders, decoderName);
// If the decoder supports FEATURE_LowLatency, we will assume it is fast and modern enough
// to be preferable for streaming over H.264 decoders.
if (decoderSupportsAndroidRLowLatency(decoderInfo, "video/hevc")) {
LimeLog.info("Allowing HEVC based on FEATURE_LowLatency support");
return true;
}
// Otherwise, we use our list of known working HEVC decoders
return isDecoderInList(whitelistedHevcDecoders, decoderInfo.getName());
}
@SuppressWarnings("deprecation")
@@ -721,7 +807,7 @@ public class MediaCodecHelper {
private static boolean isCodecBlacklisted(MediaCodecInfo codecInfo) {
// Use the new isSoftwareOnly() function on Android Q
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
if (!IS_EMULATOR && codecInfo.isSoftwareOnly()) {
if (!SHOULD_BYPASS_SOFTWARE_BLOCK && codecInfo.isSoftwareOnly()) {
LimeLog.info("Skipping software-only decoder: "+codecInfo.getName());
return true;
}
@@ -852,8 +938,7 @@ public class MediaCodecHelper {
public static String readCpuinfo() throws Exception {
StringBuilder cpuInfo = new StringBuilder();
BufferedReader br = new BufferedReader(new FileReader(new File("/proc/cpuinfo")));
try {
try (final BufferedReader br = new BufferedReader(new FileReader(new File("/proc/cpuinfo")))) {
for (;;) {
int ch = br.read();
if (ch == -1)
@@ -862,8 +947,6 @@ public class MediaCodecHelper {
}
return cpuInfo.toString();
} finally {
br.close();
}
}
@@ -9,7 +9,9 @@ import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
import com.limelight.LimeLog;
import com.limelight.nvstream.http.ComputerDetails;
import com.limelight.nvstream.http.NvHTTP;
import android.content.ContentValues;
import android.content.Context;
@@ -17,17 +19,28 @@ import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteException;
import org.json.JSONException;
import org.json.JSONObject;
public class ComputerDatabaseManager {
private static final String COMPUTER_DB_NAME = "computers3.db";
private static final String COMPUTER_DB_NAME = "computers4.db";
private static final String COMPUTER_TABLE_NAME = "Computers";
private static final String COMPUTER_UUID_COLUMN_NAME = "UUID";
private static final String COMPUTER_NAME_COLUMN_NAME = "ComputerName";
private static final String ADDRESSES_COLUMN_NAME = "Addresses";
private interface AddressFields {
String LOCAL = "local";
String REMOTE = "remote";
String MANUAL = "manual";
String IPv6 = "ipv6";
String ADDRESS = "address";
String PORT = "port";
}
private static final String MAC_ADDRESS_COLUMN_NAME = "MacAddress";
private static final String SERVER_CERT_COLUMN_NAME = "ServerCert";
private static final char ADDRESS_DELIMITER = ';';
private SQLiteDatabase computerDb;
public ComputerDatabaseManager(Context c) {
@@ -62,24 +75,54 @@ public class ComputerDatabaseManager {
for (ComputerDetails computer : oldComputers) {
updateComputer(computer);
}
oldComputers = LegacyDatabaseReader3.migrateAllComputers(c);
for (ComputerDetails computer : oldComputers) {
updateComputer(computer);
}
}
public void deleteComputer(ComputerDetails details) {
computerDb.delete(COMPUTER_TABLE_NAME, COMPUTER_UUID_COLUMN_NAME+"=?", new String[]{details.uuid});
}
public static JSONObject tupleToJson(ComputerDetails.AddressTuple tuple) throws JSONException {
if (tuple == null) {
return null;
}
JSONObject json = new JSONObject();
json.put(AddressFields.ADDRESS, tuple.address);
json.put(AddressFields.PORT, tuple.port);
return json;
}
public static ComputerDetails.AddressTuple tupleFromJson(JSONObject json, String name) throws JSONException {
if (!json.has(name)) {
return null;
}
JSONObject address = json.getJSONObject(name);
return new ComputerDetails.AddressTuple(
address.getString(AddressFields.ADDRESS), address.getInt(AddressFields.PORT));
}
public boolean updateComputer(ComputerDetails details) {
ContentValues values = new ContentValues();
values.put(COMPUTER_UUID_COLUMN_NAME, details.uuid);
values.put(COMPUTER_NAME_COLUMN_NAME, details.name);
StringBuilder addresses = new StringBuilder();
addresses.append(details.localAddress != null ? details.localAddress : "");
addresses.append(ADDRESS_DELIMITER).append(details.remoteAddress != null ? details.remoteAddress : "");
addresses.append(ADDRESS_DELIMITER).append(details.manualAddress != null ? details.manualAddress : "");
addresses.append(ADDRESS_DELIMITER).append(details.ipv6Address != null ? details.ipv6Address : "");
try {
JSONObject addresses = new JSONObject();
addresses.put(AddressFields.LOCAL, tupleToJson(details.localAddress));
addresses.put(AddressFields.REMOTE, tupleToJson(details.remoteAddress));
addresses.put(AddressFields.MANUAL, tupleToJson(details.manualAddress));
addresses.put(AddressFields.IPv6, tupleToJson(details.ipv6Address));
values.put(ADDRESSES_COLUMN_NAME, addresses.toString());
} catch (JSONException e) {
throw new RuntimeException(e);
}
values.put(ADDRESSES_COLUMN_NAME, addresses.toString());
values.put(MAC_ADDRESS_COLUMN_NAME, details.macAddress);
try {
if (details.serverCert != null) {
@@ -95,26 +138,28 @@ public class ComputerDatabaseManager {
return -1 != computerDb.insertWithOnConflict(COMPUTER_TABLE_NAME, null, values, SQLiteDatabase.CONFLICT_REPLACE);
}
private static String readNonEmptyString(String input) {
if (input.isEmpty()) {
return null;
}
return input;
}
private ComputerDetails getComputerFromCursor(Cursor c) {
ComputerDetails details = new ComputerDetails();
details.uuid = c.getString(0);
details.name = c.getString(1);
try {
JSONObject addresses = new JSONObject(c.getString(2));
details.localAddress = tupleFromJson(addresses, AddressFields.LOCAL);
details.remoteAddress = tupleFromJson(addresses, AddressFields.REMOTE);
details.manualAddress = tupleFromJson(addresses, AddressFields.MANUAL);
details.ipv6Address = tupleFromJson(addresses, AddressFields.IPv6);
} catch (JSONException e) {
throw new RuntimeException(e);
}
String[] addresses = c.getString(2).split(""+ADDRESS_DELIMITER, -1);
details.localAddress = readNonEmptyString(addresses[0]);
details.remoteAddress = readNonEmptyString(addresses[1]);
details.manualAddress = readNonEmptyString(addresses[2]);
details.ipv6Address = readNonEmptyString(addresses[3]);
// External port is persisted in the remote address field
if (details.remoteAddress != null) {
details.externalPort = details.remoteAddress.port;
}
else {
details.externalPort = NvHTTP.DEFAULT_HTTP_PORT;
}
details.macAddress = c.getString(3);
@@ -136,28 +181,26 @@ public class ComputerDatabaseManager {
}
public List<ComputerDetails> getAllComputers() {
Cursor c = computerDb.rawQuery("SELECT * FROM "+COMPUTER_TABLE_NAME, null);
LinkedList<ComputerDetails> computerList = new LinkedList<>();
while (c.moveToNext()) {
computerList.add(getComputerFromCursor(c));
try (final Cursor c = computerDb.rawQuery("SELECT * FROM "+COMPUTER_TABLE_NAME, null)) {
LinkedList<ComputerDetails> computerList = new LinkedList<>();
while (c.moveToNext()) {
computerList.add(getComputerFromCursor(c));
}
return computerList;
}
c.close();
return computerList;
}
public ComputerDetails getComputerByUUID(String uuid) {
Cursor c = computerDb.query(COMPUTER_TABLE_NAME, null, COMPUTER_UUID_COLUMN_NAME+"=?", new String[]{ uuid }, null, null, null);
if (!c.moveToFirst()) {
// No matching computer
c.close();
return null;
try (final Cursor c = computerDb.query(
COMPUTER_TABLE_NAME, null, COMPUTER_UUID_COLUMN_NAME+"=?",
new String[]{ uuid }, null, null, null)
) {
if (!c.moveToFirst()) {
// No matching computer
return null;
}
return getComputerFromCursor(c);
}
ComputerDetails details = getComputerFromCursor(c);
c.close();
return details;
}
}
@@ -64,6 +64,8 @@ public class ComputerManagerService extends Service {
private boolean pollingActive = false;
private final Lock defaultNetworkLock = new ReentrantLock();
private ConnectivityManager.NetworkCallback networkCallback;
private DiscoveryService.DiscoveryBinder discoveryBinder;
private final ServiceConnection discoveryServiceConnection = new ServiceConnection() {
public void onServiceConnected(ComponentName className, IBinder binder) {
@@ -139,7 +141,7 @@ public class ComputerManagerService extends Service {
// then use STUN to populate the external address field if
// it's not set already.
if (details.remoteAddress == null) {
InetAddress addr = InetAddress.getByName(details.activeAddress);
InetAddress addr = InetAddress.getByName(details.activeAddress.address);
if (addr.isSiteLocalAddress()) {
populateExternalAddress(details);
}
@@ -369,7 +371,12 @@ public class ComputerManagerService extends Service {
// Perform the STUN request if we're not on a VPN or if we bound to a network
if (!activeNetworkIsVpn || boundToNetwork) {
details.remoteAddress = NvConnection.findExternalAddressForMdns("stun.moonlight-stream.org", 3478);
String stunResolvedAddress = NvConnection.findExternalAddressForMdns("stun.moonlight-stream.org", 3478);
if (stunResolvedAddress != null) {
// We don't know for sure what the external port is, so we will have to guess.
// When we contact the PC (if we haven't already), it will update the port.
details.remoteAddress = new ComputerDetails.AddressTuple(stunResolvedAddress, details.guessExternalPort());
}
}
// Unbind from the network
@@ -396,7 +403,7 @@ public class ComputerManagerService extends Service {
// Populate the computer template with mDNS info
if (computer.getLocalAddress() != null) {
details.localAddress = computer.getLocalAddress().getHostAddress();
details.localAddress = new ComputerDetails.AddressTuple(computer.getLocalAddress().getHostAddress(), computer.getPort());
// Since we're on the same network, we can use STUN to find
// our WAN address, which is also very likely the WAN address
@@ -406,7 +413,7 @@ public class ComputerManagerService extends Service {
}
}
if (computer.getIpv6Address() != null) {
details.ipv6Address = computer.getIpv6Address().getHostAddress();
details.ipv6Address = new ComputerDetails.AddressTuple(computer.getIpv6Address().getHostAddress(), computer.getPort());
}
try {
@@ -424,11 +431,6 @@ public class ComputerManagerService extends Service {
}
}
@Override
public void notifyComputerRemoved(MdnsComputer computer) {
// Nothing to do here
}
@Override
public void notifyDiscoveryFailure(Exception e) {
LimeLog.severe("mDNS discovery failed");
@@ -543,12 +545,21 @@ public class ComputerManagerService extends Service {
}
}
private ComputerDetails tryPollIp(ComputerDetails details, String address) {
private ComputerDetails tryPollIp(ComputerDetails details, ComputerDetails.AddressTuple address) {
try {
NvHTTP http = new NvHTTP(address, idManager.getUniqueId(), details.serverCert,
// If the current address's port number matches the active address's port number, we can also assume
// the HTTPS port will also match. This assumption is currently safe because Sunshine sets all ports
// as offsets from the base HTTP port and doesn't allow custom HttpsPort responses for WAN vs LAN.
boolean portMatchesActiveAddress = details.state == ComputerDetails.State.ONLINE &&
details.activeAddress != null && address.port == details.activeAddress.port;
NvHTTP http = new NvHTTP(address, portMatchesActiveAddress ? details.httpsPort : 0, idManager.getUniqueId(), details.serverCert,
PlatformBinding.getCryptoProvider(ComputerManagerService.this));
ComputerDetails newDetails = http.getComputerDetails();
// If this PC is currently online at this address, extend the timeouts to allow more time for the PC to respond.
boolean isLikelyOnline = details.state == ComputerDetails.State.ONLINE && address.equals(details.activeAddress);
ComputerDetails newDetails = http.getComputerDetails(isLikelyOnline);
// Check if this is the PC we expected
if (newDetails.uuid == null) {
@@ -572,14 +583,14 @@ public class ComputerManagerService extends Service {
}
private static class ParallelPollTuple {
public String address;
public ComputerDetails.AddressTuple address;
public ComputerDetails existingDetails;
public boolean complete;
public Thread pollingThread;
public ComputerDetails returnedDetails;
public ParallelPollTuple(String address, ComputerDetails existingDetails) {
public ParallelPollTuple(ComputerDetails.AddressTuple address, ComputerDetails existingDetails) {
this.address = address;
this.existingDetails = existingDetails;
}
@@ -591,7 +602,7 @@ public class ComputerManagerService extends Service {
}
}
private void startParallelPollThread(ParallelPollTuple tuple, HashSet<String> uniqueAddresses) {
private void startParallelPollThread(ParallelPollTuple tuple, HashSet<ComputerDetails.AddressTuple> uniqueAddresses) {
// Don't bother starting a polling thread for an address that doesn't exist
// or if the address has already been polled with an earlier tuple
if (tuple.address == null || !uniqueAddresses.add(tuple.address)) {
@@ -625,7 +636,7 @@ public class ComputerManagerService extends Service {
// These must be started in order of precedence for the deduplication algorithm
// to result in the correct behavior.
HashSet<String> uniqueAddresses = new HashSet<>();
HashSet<ComputerDetails.AddressTuple> uniqueAddresses = new HashSet<>();
startParallelPollThread(localInfo, uniqueAddresses);
startParallelPollThread(manualInfo, uniqueAddresses);
startParallelPollThread(remoteInfo, uniqueAddresses);
@@ -730,10 +741,49 @@ public class ComputerManagerService extends Service {
}
releaseLocalDatabaseReference();
// Monitor for network changes to invalidate our PC state
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
networkCallback = new ConnectivityManager.NetworkCallback() {
@Override
public void onAvailable(Network network) {
LimeLog.info("Resetting PC state for new available network");
synchronized (pollingTuples) {
for (PollingTuple tuple : pollingTuples) {
tuple.computer.state = ComputerDetails.State.UNKNOWN;
if (listener != null) {
listener.notifyComputerUpdated(tuple.computer);
}
}
}
}
@Override
public void onLost(Network network) {
LimeLog.info("Offlining PCs due to network loss");
synchronized (pollingTuples) {
for (PollingTuple tuple : pollingTuples) {
tuple.computer.state = ComputerDetails.State.OFFLINE;
if (listener != null) {
listener.notifyComputerUpdated(tuple.computer);
}
}
}
}
};
ConnectivityManager connMgr = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
connMgr.registerDefaultNetworkCallback(networkCallback);
}
}
@Override
public void onDestroy() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
ConnectivityManager connMgr = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
connMgr.unregisterNetworkCallback(networkCallback);
}
if (discoveryBinder != null) {
// Unbind from the discovery service
unbindService(discoveryServiceConnection);
@@ -821,7 +871,7 @@ public class ComputerManagerService extends Service {
PollingTuple tuple = getPollingTuple(computer);
try {
NvHTTP http = new NvHTTP(ServerHelper.getCurrentAddressFromComputer(computer), idManager.getUniqueId(),
NvHTTP http = new NvHTTP(ServerHelper.getCurrentAddressFromComputer(computer), computer.httpsPort, idManager.getUniqueId(),
computer.serverCert, PlatformBinding.getCryptoProvider(ComputerManagerService.this));
String appList;
@@ -849,18 +899,12 @@ public class ComputerManagerService extends Service {
if (!appList.isEmpty() &&
(!list.isEmpty() || emptyAppListResponses >= EMPTY_LIST_THRESHOLD)) {
// Open the cache file
OutputStream cacheOut = null;
try {
cacheOut = CacheHelper.openCacheFileForOutput(getCacheDir(), "applist", computer.uuid);
try (final OutputStream cacheOut = CacheHelper.openCacheFileForOutput(
getCacheDir(), "applist", computer.uuid)
) {
CacheHelper.writeStringToOutputStream(cacheOut, appList);
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
if (cacheOut != null) {
cacheOut.close();
}
} catch (IOException ignored) {}
}
// Reset empty count if it wasn't empty this time
@@ -33,12 +33,11 @@ public class IdentityManager {
private static String loadUniqueId(Context c) {
// 2 Hex digits per byte
char[] uid = new char[UID_SIZE_IN_BYTES * 2];
InputStreamReader reader = null;
LimeLog.info("Reading UID from disk");
try {
reader = new InputStreamReader(c.openFileInput(UNIQUE_ID_FILE_NAME));
if (reader.read(uid) != UID_SIZE_IN_BYTES * 2)
{
try (final InputStreamReader reader =
new InputStreamReader(c.openFileInput(UNIQUE_ID_FILE_NAME))
) {
if (reader.read(uid) != UID_SIZE_IN_BYTES * 2) {
LimeLog.severe("UID file data is truncated");
return null;
}
@@ -50,12 +49,6 @@ public class IdentityManager {
LimeLog.severe("Error while reading UID file");
e.printStackTrace();
return null;
} finally {
if (reader != null) {
try {
reader.close();
} catch (IOException ignored) {}
}
}
}
@@ -64,20 +57,14 @@ public class IdentityManager {
LimeLog.info("Generating new UID");
String uidStr = String.format((Locale)null, "%016x", new Random().nextLong());
OutputStreamWriter writer = null;
try {
writer = new OutputStreamWriter(c.openFileOutput(UNIQUE_ID_FILE_NAME, 0));
try (final OutputStreamWriter writer =
new OutputStreamWriter(c.openFileOutput(UNIQUE_ID_FILE_NAME, 0))
) {
writer.write(uidStr);
LimeLog.info("UID written to disk");
} catch (IOException e) {
LimeLog.severe("Error while writing UID file");
e.printStackTrace();
} finally {
if (writer != null) {
try {
writer.close();
} catch (IOException ignored) {}
}
}
// We can return a UID even if I/O fails
@@ -7,6 +7,7 @@ import android.database.sqlite.SQLiteException;
import com.limelight.LimeLog;
import com.limelight.nvstream.http.ComputerDetails;
import com.limelight.nvstream.http.NvHTTP;
import java.net.InetAddress;
import java.net.UnknownHostException;
@@ -30,26 +31,26 @@ public class LegacyDatabaseReader {
// too. To disambiguate, we'll need to prefix them with a string
// greater than the allowable IP address length.
try {
details.localAddress = InetAddress.getByAddress(c.getBlob(2)).getHostAddress();
details.localAddress = new ComputerDetails.AddressTuple(InetAddress.getByAddress(c.getBlob(2)).getHostAddress(), NvHTTP.DEFAULT_HTTP_PORT);
LimeLog.warning("DB: Legacy local address for " + details.name);
} catch (UnknownHostException e) {
// This is probably a hostname/address with the prefix string
String stringData = c.getString(2);
if (stringData.startsWith(ADDRESS_PREFIX)) {
details.localAddress = c.getString(2).substring(ADDRESS_PREFIX.length());
details.localAddress = new ComputerDetails.AddressTuple(c.getString(2).substring(ADDRESS_PREFIX.length()), NvHTTP.DEFAULT_HTTP_PORT);
} else {
LimeLog.severe("DB: Corrupted local address for " + details.name);
}
}
try {
details.remoteAddress = InetAddress.getByAddress(c.getBlob(3)).getHostAddress();
details.remoteAddress = new ComputerDetails.AddressTuple(InetAddress.getByAddress(c.getBlob(3)).getHostAddress(), NvHTTP.DEFAULT_HTTP_PORT);
LimeLog.warning("DB: Legacy remote address for " + details.name);
} catch (UnknownHostException e) {
// This is probably a hostname/address with the prefix string
String stringData = c.getString(3);
if (stringData.startsWith(ADDRESS_PREFIX)) {
details.remoteAddress = c.getString(3).substring(ADDRESS_PREFIX.length());
details.remoteAddress = new ComputerDetails.AddressTuple(c.getString(3).substring(ADDRESS_PREFIX.length()), NvHTTP.DEFAULT_HTTP_PORT);
} else {
LimeLog.severe("DB: Corrupted remote address for " + details.name);
}
@@ -68,37 +69,34 @@ public class LegacyDatabaseReader {
}
private static List<ComputerDetails> getAllComputers(SQLiteDatabase db) {
Cursor c = db.rawQuery("SELECT * FROM " + COMPUTER_TABLE_NAME, null);
LinkedList<ComputerDetails> computerList = new LinkedList<>();
while (c.moveToNext()) {
ComputerDetails details = getComputerFromCursor(c);
try (final Cursor c = db.rawQuery("SELECT * FROM " + COMPUTER_TABLE_NAME, null)) {
LinkedList<ComputerDetails> computerList = new LinkedList<>();
while (c.moveToNext()) {
ComputerDetails details = getComputerFromCursor(c);
// If a critical field is corrupt or missing, skip the database entry
if (details.uuid == null) {
continue;
// If a critical field is corrupt or missing, skip the database entry
if (details.uuid == null) {
continue;
}
computerList.add(details);
}
computerList.add(details);
return computerList;
}
c.close();
return computerList;
}
public static List<ComputerDetails> migrateAllComputers(Context c) {
SQLiteDatabase computerDb = null;
try {
try (final SQLiteDatabase computerDb = SQLiteDatabase.openDatabase(
c.getDatabasePath(COMPUTER_DB_NAME).getPath(),
null, SQLiteDatabase.OPEN_READONLY)
) {
// Open the existing database
computerDb = SQLiteDatabase.openDatabase(c.getDatabasePath(COMPUTER_DB_NAME).getPath(), null, SQLiteDatabase.OPEN_READONLY);
return getAllComputers(computerDb);
} catch (SQLiteException e) {
return new LinkedList<ComputerDetails>();
} finally {
// Close and delete the old DB
if (computerDb != null) {
computerDb.close();
}
c.deleteDatabase(COMPUTER_DB_NAME);
}
}
@@ -6,6 +6,7 @@ import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteException;
import com.limelight.nvstream.http.ComputerDetails;
import com.limelight.nvstream.http.NvHTTP;
import java.io.ByteArrayInputStream;
import java.security.cert.CertificateException;
@@ -23,9 +24,9 @@ public class LegacyDatabaseReader2 {
details.uuid = c.getString(0);
details.name = c.getString(1);
details.localAddress = c.getString(2);
details.remoteAddress = c.getString(3);
details.manualAddress = c.getString(4);
details.localAddress = new ComputerDetails.AddressTuple(c.getString(2), NvHTTP.DEFAULT_HTTP_PORT);
details.remoteAddress = new ComputerDetails.AddressTuple(c.getString(3), NvHTTP.DEFAULT_HTTP_PORT);
details.manualAddress = new ComputerDetails.AddressTuple(c.getString(4), NvHTTP.DEFAULT_HTTP_PORT);
details.macAddress = c.getString(5);
// This column wasn't always present in the old schema
@@ -49,37 +50,34 @@ public class LegacyDatabaseReader2 {
}
public static List<ComputerDetails> getAllComputers(SQLiteDatabase computerDb) {
Cursor c = computerDb.rawQuery("SELECT * FROM "+COMPUTER_TABLE_NAME, null);
LinkedList<ComputerDetails> computerList = new LinkedList<>();
while (c.moveToNext()) {
ComputerDetails details = getComputerFromCursor(c);
try (final Cursor c = computerDb.rawQuery("SELECT * FROM "+COMPUTER_TABLE_NAME, null)) {
LinkedList<ComputerDetails> computerList = new LinkedList<>();
while (c.moveToNext()) {
ComputerDetails details = getComputerFromCursor(c);
// If a critical field is corrupt or missing, skip the database entry
if (details.uuid == null) {
continue;
// If a critical field is corrupt or missing, skip the database entry
if (details.uuid == null) {
continue;
}
computerList.add(details);
}
computerList.add(details);
return computerList;
}
c.close();
return computerList;
}
public static List<ComputerDetails> migrateAllComputers(Context c) {
SQLiteDatabase computerDb = null;
try {
try (final SQLiteDatabase computerDb = SQLiteDatabase.openDatabase(
c.getDatabasePath(COMPUTER_DB_NAME).getPath(),
null, SQLiteDatabase.OPEN_READONLY)
) {
// Open the existing database
computerDb = SQLiteDatabase.openDatabase(c.getDatabasePath(COMPUTER_DB_NAME).getPath(), null, SQLiteDatabase.OPEN_READONLY);
return getAllComputers(computerDb);
} catch (SQLiteException e) {
return new LinkedList<ComputerDetails>();
} finally {
// Close and delete the old DB
if (computerDb != null) {
computerDb.close();
}
c.deleteDatabase(COMPUTER_DB_NAME);
}
}
@@ -0,0 +1,123 @@
package com.limelight.computers;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteException;
import com.limelight.nvstream.http.ComputerDetails;
import com.limelight.nvstream.http.NvHTTP;
import java.io.ByteArrayInputStream;
import java.security.cert.CertificateException;
import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
import java.util.LinkedList;
import java.util.List;
public class LegacyDatabaseReader3 {
private static final String COMPUTER_DB_NAME = "computers3.db";
private static final String COMPUTER_TABLE_NAME = "Computers";
private static final char ADDRESS_DELIMITER = ';';
private static final char PORT_DELIMITER = '_';
private static String readNonEmptyString(String input) {
if (input.isEmpty()) {
return null;
}
return input;
}
private static ComputerDetails.AddressTuple splitAddressToTuple(String input) {
if (input == null) {
return null;
}
String[] parts = input.split(""+PORT_DELIMITER, -1);
if (parts.length == 1) {
return new ComputerDetails.AddressTuple(parts[0], NvHTTP.DEFAULT_HTTP_PORT);
}
else {
return new ComputerDetails.AddressTuple(parts[0], Integer.parseInt(parts[1]));
}
}
private static String splitTupleToAddress(ComputerDetails.AddressTuple tuple) {
return tuple.address+PORT_DELIMITER+tuple.port;
}
private static ComputerDetails getComputerFromCursor(Cursor c) {
ComputerDetails details = new ComputerDetails();
details.uuid = c.getString(0);
details.name = c.getString(1);
String[] addresses = c.getString(2).split(""+ADDRESS_DELIMITER, -1);
details.localAddress = splitAddressToTuple(readNonEmptyString(addresses[0]));
details.remoteAddress = splitAddressToTuple(readNonEmptyString(addresses[1]));
details.manualAddress = splitAddressToTuple(readNonEmptyString(addresses[2]));
details.ipv6Address = splitAddressToTuple(readNonEmptyString(addresses[3]));
// External port is persisted in the remote address field
if (details.remoteAddress != null) {
details.externalPort = details.remoteAddress.port;
}
else {
details.externalPort = NvHTTP.DEFAULT_HTTP_PORT;
}
details.macAddress = c.getString(3);
try {
byte[] derCertData = c.getBlob(4);
if (derCertData != null) {
details.serverCert = (X509Certificate) CertificateFactory.getInstance("X.509")
.generateCertificate(new ByteArrayInputStream(derCertData));
}
} catch (CertificateException e) {
e.printStackTrace();
}
// This signifies we don't have dynamic state (like pair state)
details.state = ComputerDetails.State.UNKNOWN;
return details;
}
public static List<ComputerDetails> getAllComputers(SQLiteDatabase computerDb) {
try (final Cursor c = computerDb.rawQuery("SELECT * FROM "+COMPUTER_TABLE_NAME, null)) {
LinkedList<ComputerDetails> computerList = new LinkedList<>();
while (c.moveToNext()) {
ComputerDetails details = getComputerFromCursor(c);
// If a critical field is corrupt or missing, skip the database entry
if (details.uuid == null) {
continue;
}
computerList.add(details);
}
return computerList;
}
}
public static List<ComputerDetails> migrateAllComputers(Context c) {
try (final SQLiteDatabase computerDb = SQLiteDatabase.openDatabase(
c.getDatabasePath(COMPUTER_DB_NAME).getPath(),
null, SQLiteDatabase.OPEN_READONLY)
) {
// Open the existing database
return getAllComputers(computerDb);
} catch (SQLiteException e) {
return new LinkedList<ComputerDetails>();
} finally {
// Close and delete the old DB
c.deleteDatabase(COMPUTER_DB_NAME);
}
}
}
@@ -54,13 +54,6 @@ public class DiscoveryService extends Service {
}
}
@Override
public void notifyComputerRemoved(MdnsComputer computer) {
if (boundListener != null) {
boundListener.notifyComputerRemoved(computer);
}
}
@Override
public void notifyDiscoveryFailure(Exception e) {
if (boundListener != null) {
@@ -154,21 +154,15 @@ public class DiskAssetLoader {
}
public void populateCacheWithStream(CachedAppAssetLoader.LoaderTuple tuple, InputStream input) {
OutputStream out = null;
boolean success = false;
try {
out = CacheHelper.openCacheFileForOutput(cacheDir, "boxart", tuple.computer.uuid, tuple.app.getAppId() + ".png");
try (final OutputStream out = CacheHelper.openCacheFileForOutput(
cacheDir, "boxart", tuple.computer.uuid, tuple.app.getAppId() + ".png")
) {
CacheHelper.writeInputStreamToOutputStream(input, out, MAX_ASSET_SIZE);
success = true;
} catch (IOException e) {
e.printStackTrace();
} finally {
if (out != null) {
try {
out.close();
} catch (IOException ignored) {}
}
if (!success) {
LimeLog.warning("Unable to populate cache with tuple: "+tuple);
CacheHelper.deleteCacheFile(cacheDir, "boxart", tuple.computer.uuid, tuple.app.getAppId() + ".png");
@@ -22,8 +22,9 @@ public class NetworkAssetLoader {
public InputStream getBitmapStream(CachedAppAssetLoader.LoaderTuple tuple) {
InputStream in = null;
try {
NvHTTP http = new NvHTTP(ServerHelper.getCurrentAddressFromComputer(tuple.computer), uniqueId,
tuple.computer.serverCert, PlatformBinding.getCryptoProvider(context));
NvHTTP http = new NvHTTP(ServerHelper.getCurrentAddressFromComputer(tuple.computer),
tuple.computer.httpsPort, uniqueId, tuple.computer.serverCert,
PlatformBinding.getCryptoProvider(context));
in = http.getBoxArt(tuple.app);
} catch (IOException ignored) {}
@@ -1,11 +1,15 @@
package com.limelight.nvstream;
import com.limelight.nvstream.http.ComputerDetails;
import java.security.cert.X509Certificate;
import javax.crypto.SecretKey;
public class ConnectionContext {
public String serverAddress;
public ComputerDetails.AddressTuple serverAddress;
public int httpsPort;
public boolean isNvidiaServerSoftware;
public X509Certificate serverCert;
public StreamConfiguration streamConfig;
public NvConnectionListener connListener;
@@ -22,5 +26,8 @@ public class ConnectionContext {
public int negotiatedWidth, negotiatedHeight;
public boolean negotiatedHdr;
public int negotiatedRemoteStreaming;
public int negotiatedPacketSize;
public int videoCapabilities;
}
@@ -1,8 +1,20 @@
package com.limelight.nvstream;
import android.app.ActivityManager;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.IpPrefix;
import android.net.LinkProperties;
import android.net.Network;
import android.net.NetworkCapabilities;
import android.net.NetworkInfo;
import android.net.RouteInfo;
import android.os.Build;
import java.io.IOException;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.nio.ByteBuffer;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
@@ -19,7 +31,8 @@ import org.xmlpull.v1.XmlPullParserException;
import com.limelight.LimeLog;
import com.limelight.nvstream.av.audio.AudioRenderer;
import com.limelight.nvstream.av.video.VideoDecoderRenderer;
import com.limelight.nvstream.http.GfeHttpResponseException;
import com.limelight.nvstream.http.ComputerDetails;
import com.limelight.nvstream.http.HostHttpResponseException;
import com.limelight.nvstream.http.LimelightCryptoProvider;
import com.limelight.nvstream.http.NvApp;
import com.limelight.nvstream.http.NvHTTP;
@@ -29,34 +42,28 @@ import com.limelight.nvstream.jni.MoonBridge;
public class NvConnection {
// Context parameters
private String host;
private LimelightCryptoProvider cryptoProvider;
private String uniqueId;
private ConnectionContext context;
private static Semaphore connectionAllowed = new Semaphore(1);
private final boolean isMonkey;
private final boolean batchMouseInput;
private final Context appContext;
private static final int MOUSE_BATCH_PERIOD_MS = 5;
private Timer mouseInputTimer;
private final Object mouseInputLock = new Object();
private short relMouseX, relMouseY, relMouseWidth, relMouseHeight;
private short absMouseX, absMouseY, absMouseWidth, absMouseHeight;
public NvConnection(String host, String uniqueId, StreamConfiguration config, LimelightCryptoProvider cryptoProvider, X509Certificate serverCert, boolean batchMouseInput)
{
this.host = host;
public NvConnection(Context appContext, ComputerDetails.AddressTuple host, int httpsPort, String uniqueId, StreamConfiguration config, LimelightCryptoProvider cryptoProvider, X509Certificate serverCert)
{
this.appContext = appContext;
this.cryptoProvider = cryptoProvider;
this.uniqueId = uniqueId;
this.batchMouseInput = batchMouseInput;
this.context = new ConnectionContext();
this.context.serverAddress = host;
this.context.httpsPort = httpsPort;
this.context.streamConfig = config;
this.context.serverCert = serverCert;
// This is unique per connection
this.context.riKey = generateRiAesKey();
context.riKeyId = generateRiKeyId();
this.context.riKeyId = generateRiKeyId();
this.isMonkey = ActivityManager.isUserAMonkey();
}
@@ -80,11 +87,6 @@ public class NvConnection {
}
public void stop() {
// Stop sending additional input
if (mouseInputTimer != null) {
mouseInputTimer.cancel();
}
// Interrupt any pending connection. This is thread-safe.
MoonBridge.interruptConnection();
@@ -99,29 +101,129 @@ public class NvConnection {
connectionAllowed.release();
}
private void flushMousePosition() {
synchronized (mouseInputLock) {
if (relMouseX != 0 || relMouseY != 0) {
if (relMouseWidth != 0 || relMouseHeight != 0) {
MoonBridge.sendMouseMoveAsMousePosition(relMouseX, relMouseY, relMouseWidth, relMouseHeight);
}
else {
MoonBridge.sendMouseMove(relMouseX, relMouseY);
}
relMouseX = relMouseY = relMouseWidth = relMouseHeight = 0;
}
if (absMouseX != 0 || absMouseY != 0 || absMouseWidth != 0 || absMouseHeight != 0) {
MoonBridge.sendMousePosition(absMouseX, absMouseY, absMouseWidth, absMouseHeight);
absMouseX = absMouseY = absMouseWidth = absMouseHeight = 0;
private InetAddress resolveServerAddress() throws IOException {
// Try to find an address that works for this host
InetAddress[] addrs = InetAddress.getAllByName(context.serverAddress.address);
for (InetAddress addr : addrs) {
try (Socket s = new Socket()) {
s.setSoLinger(true, 0);
s.connect(new InetSocketAddress(addr, context.serverAddress.port), 1000);
return addr;
} catch (IOException e) {
e.printStackTrace();
}
}
// If we made it here, we didn't manage to find a working address. If DNS returned any
// address, we'll use the first available address and hope for the best.
if (addrs.length > 0) {
return addrs[0];
}
else {
throw new IOException("No addresses found for "+context.serverAddress);
}
}
private int detectServerConnectionType() {
ConnectivityManager connMgr = (ConnectivityManager) appContext.getSystemService(Context.CONNECTIVITY_SERVICE);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
Network activeNetwork = connMgr.getActiveNetwork();
if (activeNetwork != null) {
NetworkCapabilities netCaps = connMgr.getNetworkCapabilities(activeNetwork);
if (netCaps != null) {
if (netCaps.hasTransport(NetworkCapabilities.TRANSPORT_VPN) ||
!netCaps.hasCapability(NetworkCapabilities.NET_CAPABILITY_NOT_VPN)) {
// VPNs are treated as remote connections
return StreamConfiguration.STREAM_CFG_REMOTE;
}
else if (netCaps.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR)) {
// Cellular is always treated as remote to avoid any possible
// issues with 464XLAT or similar technologies.
return StreamConfiguration.STREAM_CFG_REMOTE;
}
}
// Check if the server address is on-link
LinkProperties linkProperties = connMgr.getLinkProperties(activeNetwork);
if (linkProperties != null) {
InetAddress serverAddress;
try {
serverAddress = resolveServerAddress();
} catch (IOException e) {
e.printStackTrace();
// We can't decide without being able to resolve the server address
return StreamConfiguration.STREAM_CFG_AUTO;
}
// If the address is in the NAT64 prefix, always treat it as remote
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
IpPrefix nat64Prefix = linkProperties.getNat64Prefix();
if (nat64Prefix != null && nat64Prefix.contains(serverAddress)) {
return StreamConfiguration.STREAM_CFG_REMOTE;
}
}
for (RouteInfo route : linkProperties.getRoutes()) {
// Skip non-unicast routes (which are all we get prior to Android 13)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU && route.getType() != RouteInfo.RTN_UNICAST) {
continue;
}
// Find the first route that matches this address
if (route.matches(serverAddress)) {
// If there's no gateway, this is an on-link destination
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
// We want to use hasGateway() because getGateway() doesn't adhere
// to documented behavior of returning null for on-link addresses.
if (!route.hasGateway()) {
return StreamConfiguration.STREAM_CFG_LOCAL;
}
}
else {
// getGateway() is documented to return null for on-link destinations,
// but it actually returns the unspecified address (0.0.0.0 or ::).
InetAddress gateway = route.getGateway();
if (gateway == null || gateway.isAnyLocalAddress()) {
return StreamConfiguration.STREAM_CFG_LOCAL;
}
}
// We _should_ stop after the first matching route, but for some reason
// Android doesn't always report IPv6 routes in descending order of
// specificity and metric. To handle that case, we enumerate all matching
// routes, assuming that an on-link route will always be preferred.
}
}
}
}
}
else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
NetworkInfo activeNetworkInfo = connMgr.getActiveNetworkInfo();
if (activeNetworkInfo != null) {
switch (activeNetworkInfo.getType()) {
case ConnectivityManager.TYPE_VPN:
case ConnectivityManager.TYPE_MOBILE:
case ConnectivityManager.TYPE_MOBILE_DUN:
case ConnectivityManager.TYPE_MOBILE_HIPRI:
case ConnectivityManager.TYPE_MOBILE_MMS:
case ConnectivityManager.TYPE_MOBILE_SUPL:
case ConnectivityManager.TYPE_WIMAX:
// VPNs and cellular connections are always remote connections
return StreamConfiguration.STREAM_CFG_REMOTE;
}
}
}
// If we can't determine the connection type, let moonlight-common-c decide.
return StreamConfiguration.STREAM_CFG_AUTO;
}
private boolean startApp() throws XmlPullParserException, IOException
{
NvHTTP h = new NvHTTP(context.serverAddress, uniqueId, context.serverCert, cryptoProvider);
NvHTTP h = new NvHTTP(context.serverAddress, context.httpsPort, uniqueId, context.serverCert, cryptoProvider);
String serverInfo = h.getServerInfo();
String serverInfo = h.getServerInfo(true);
context.serverAppVersion = h.getServerVersion(serverInfo);
if (context.serverAppVersion == null) {
@@ -129,6 +231,9 @@ public class NvConnection {
return false;
}
ComputerDetails details = h.getComputerDetails(serverInfo);
context.isNvidiaServerSoftware = details.nvidiaServer;
// May be missing for older servers
context.serverGfeVersion = h.getGfeVersion(serverInfo);
@@ -171,6 +276,18 @@ public class NvConnection {
context.negotiatedWidth = context.streamConfig.getWidth();
context.negotiatedHeight = context.streamConfig.getHeight();
}
// We will perform some connection type detection if the caller asked for it
if (context.streamConfig.getRemote() == StreamConfiguration.STREAM_CFG_AUTO) {
context.negotiatedRemoteStreaming = detectServerConnectionType();
context.negotiatedPacketSize =
context.negotiatedRemoteStreaming == StreamConfiguration.STREAM_CFG_REMOTE ?
1024 : context.streamConfig.getMaxPacketSize();
}
else {
context.negotiatedRemoteStreaming = context.streamConfig.getRemote();
context.negotiatedPacketSize = context.streamConfig.getMaxPacketSize();
}
//
// Video stream format will be decided during the RTSP handshake
@@ -192,14 +309,14 @@ public class NvConnection {
if (h.getCurrentGame(serverInfo) != 0) {
try {
if (h.getCurrentGame(serverInfo) == app.getAppId()) {
if (!h.resumeApp(context)) {
if (!h.launchApp(context, "resume", app.getAppId(), context.negotiatedHdr)) {
context.connListener.displayMessage("Failed to resume existing session");
return false;
}
} else {
return quitAndLaunch(h, context);
}
} catch (GfeHttpResponseException e) {
} catch (HostHttpResponseException e) {
if (e.getErrorCode() == 470) {
// This is the error you get when you try to resume a session that's not yours.
// Because this is fairly common, we'll display a more detailed message.
@@ -232,7 +349,7 @@ public class NvConnection {
context.connListener.displayMessage("Failed to quit previous session! You must quit it manually");
return false;
}
} catch (GfeHttpResponseException e) {
} catch (HostHttpResponseException e) {
if (e.getErrorCode() == 599) {
context.connListener.displayMessage("This session wasn't started by this device," +
" so it cannot be quit. End streaming on the original " +
@@ -250,7 +367,7 @@ public class NvConnection {
private boolean launchNotRunningApp(NvHTTP h, ConnectionContext context)
throws IOException, XmlPullParserException {
// Launch the app since it's not running
if (!h.launchApp(context, context.streamConfig.getApp().getAppId(), context.negotiatedHdr)) {
if (!h.launchApp(context, "launch", context.streamConfig.getApp().getAppId(), context.negotiatedHdr)) {
context.connListener.displayMessage("Failed to launch application");
return false;
}
@@ -269,7 +386,6 @@ public class NvConnection {
String appName = context.streamConfig.getApp().getAppName();
context.serverAddress = host;
context.connListener.stageStarting(appName);
try {
@@ -278,7 +394,7 @@ public class NvConnection {
return;
}
context.connListener.stageComplete(appName);
} catch (GfeHttpResponseException e) {
} catch (HostHttpResponseException e) {
e.printStackTrace();
context.connListener.displayMessage(e.getMessage());
context.connListener.stageFailed(appName, 0, e.getErrorCode());
@@ -307,19 +423,21 @@ public class NvConnection {
// we must not invoke that functionality in parallel.
synchronized (MoonBridge.class) {
MoonBridge.setupBridge(videoDecoderRenderer, audioRenderer, connectionListener);
int ret = MoonBridge.startConnection(context.serverAddress,
int ret = MoonBridge.startConnection(context.serverAddress.address,
context.serverAppVersion, context.serverGfeVersion, context.rtspSessionUrl,
context.negotiatedWidth, context.negotiatedHeight,
context.streamConfig.getRefreshRate(), context.streamConfig.getBitrate(),
context.streamConfig.getMaxPacketSize(),
context.streamConfig.getRemote(), context.streamConfig.getAudioConfiguration().toInt(),
context.negotiatedPacketSize, context.negotiatedRemoteStreaming,
context.streamConfig.getAudioConfiguration().toInt(),
context.streamConfig.getHevcSupported(),
context.negotiatedHdr,
context.streamConfig.getHevcBitratePercentageMultiplier(),
context.streamConfig.getClientRefreshRateX100(),
context.streamConfig.getEncryptionFlags(),
context.riKey.getEncoded(), ib.array(),
context.videoCapabilities);
context.videoCapabilities,
context.streamConfig.getColorSpace(),
context.streamConfig.getColorRange());
if (ret != 0) {
// LiStartConnection() failed, so the caller is not expected
// to stop the connection themselves. We need to release their
@@ -327,20 +445,6 @@ public class NvConnection {
connectionAllowed.release();
return;
}
if (batchMouseInput) {
// High polling rate mice can cause GeForce Experience's input queue to get backed up,
// causing massive input latency. We counter this by limiting our mouse events to 200 Hz
// which appears to avoid triggering the issue on all known configurations.
mouseInputTimer = new Timer("MouseInput", true);
mouseInputTimer.schedule(new TimerTask() {
@Override
public void run() {
// Flush the mouse position every 5 ms
flushMousePosition();
}
}, MOUSE_BATCH_PERIOD_MS, MOUSE_BATCH_PERIOD_MS);
}
}
}
}).start();
@@ -349,65 +453,27 @@ public class NvConnection {
public void sendMouseMove(final short deltaX, final short deltaY)
{
if (!isMonkey) {
synchronized (mouseInputLock) {
relMouseX += deltaX;
relMouseY += deltaY;
// Reset these to ensure we don't send this as a position update
relMouseWidth = 0;
relMouseHeight = 0;
}
if (!batchMouseInput) {
flushMousePosition();
}
MoonBridge.sendMouseMove(deltaX, deltaY);
}
}
public void sendMousePosition(short x, short y, short referenceWidth, short referenceHeight)
{
if (!isMonkey) {
synchronized (mouseInputLock) {
absMouseX = x;
absMouseY = y;
absMouseWidth = referenceWidth;
absMouseHeight = referenceHeight;
}
if (!batchMouseInput) {
flushMousePosition();
}
MoonBridge.sendMousePosition(x, y, referenceWidth, referenceHeight);
}
}
public void sendMouseMoveAsMousePosition(short deltaX, short deltaY, short referenceWidth, short referenceHeight)
{
if (!isMonkey) {
synchronized (mouseInputLock) {
// Only accumulate the delta if the reference size is the same
if (relMouseWidth == referenceWidth && relMouseHeight == referenceHeight) {
relMouseX += deltaX;
relMouseY += deltaY;
}
else {
relMouseX = deltaX;
relMouseY = deltaY;
}
relMouseWidth = referenceWidth;
relMouseHeight = referenceHeight;
}
if (!batchMouseInput) {
flushMousePosition();
}
MoonBridge.sendMouseMoveAsMousePosition(deltaX, deltaY, referenceWidth, referenceHeight);
}
}
public void sendMouseButtonDown(final byte mouseButton)
{
if (!isMonkey) {
flushMousePosition();
MoonBridge.sendMouseButton(MouseButtonPacket.PRESS_EVENT, mouseButton);
}
}
@@ -415,7 +481,6 @@ public class NvConnection {
public void sendMouseButtonUp(final byte mouseButton)
{
if (!isMonkey) {
flushMousePosition();
MoonBridge.sendMouseButton(MouseButtonPacket.RELEASE_EVENT, mouseButton);
}
}
@@ -443,26 +508,36 @@ public class NvConnection {
}
}
public void sendKeyboardInput(final short keyMap, final byte keyDirection, final byte modifier) {
public void sendKeyboardInput(final short keyMap, final byte keyDirection, final byte modifier, final byte flags) {
if (!isMonkey) {
MoonBridge.sendKeyboardInput(keyMap, keyDirection, modifier);
MoonBridge.sendKeyboardInput(keyMap, keyDirection, modifier, flags);
}
}
public void sendMouseScroll(final byte scrollClicks) {
if (!isMonkey) {
flushMousePosition();
MoonBridge.sendMouseScroll(scrollClicks);
MoonBridge.sendMouseHighResScroll((short)(scrollClicks * 120)); // WHEEL_DELTA
}
}
public void sendMouseHScroll(final byte scrollClicks) {
if (!isMonkey) {
MoonBridge.sendMouseHighResHScroll((short)(scrollClicks * 120)); // WHEEL_DELTA
}
}
public void sendMouseHighResScroll(final short scrollAmount) {
if (!isMonkey) {
flushMousePosition();
MoonBridge.sendMouseHighResScroll(scrollAmount);
}
}
public void sendMouseHighResHScroll(final short scrollAmount) {
if (!isMonkey) {
MoonBridge.sendMouseHighResHScroll(scrollAmount);
}
}
public void sendUtf8Text(final String text) {
if (!isMonkey) {
MoonBridge.sendUtf8Text(text);
@@ -14,5 +14,5 @@ public interface NvConnectionListener {
void rumble(short controllerNumber, short lowFreqMotor, short highFreqMotor);
void setHdrMode(boolean enabled);
void setHdrMode(boolean enabled, byte[] hdrMetadata);
}
@@ -27,6 +27,9 @@ public class StreamConfiguration {
private boolean enableHdr;
private int attachedGamepadMask;
private int encryptionFlags;
private int colorRange;
private int colorSpace;
private boolean persistGamepadsAfterDisconnect;
public static class Builder {
private StreamConfiguration config = new StreamConfiguration();
@@ -107,6 +110,11 @@ public class StreamConfiguration {
return this;
}
public StreamConfiguration.Builder setPersistGamepadsAfterDisconnect(boolean value) {
config.persistGamepadsAfterDisconnect = value;
return this;
}
public StreamConfiguration.Builder setClientRefreshRateX100(int refreshRateX100) {
config.clientRefreshRateX100 = refreshRateX100;
return this;
@@ -131,7 +139,17 @@ public class StreamConfiguration {
config.supportsHevc = supportsHevc;
return this;
}
public StreamConfiguration.Builder setColorRange(int colorRange) {
config.colorRange = colorRange;
return this;
}
public StreamConfiguration.Builder setColorSpace(int colorSpace) {
config.colorSpace = colorSpace;
return this;
}
public StreamConfiguration build() {
return config;
}
@@ -219,6 +237,10 @@ public class StreamConfiguration {
return attachedGamepadMask;
}
public boolean getPersistGamepadsAfterDisconnect() {
return persistGamepadsAfterDisconnect;
}
public int getClientRefreshRateX100() {
return clientRefreshRateX100;
}
@@ -226,4 +248,12 @@ public class StreamConfiguration {
public int getEncryptionFlags() {
return encryptionFlags;
}
public int getColorRange() {
return colorRange;
}
public int getColorSpace() {
return colorSpace;
}
}
@@ -16,5 +16,5 @@ public abstract class VideoDecoderRenderer {
public abstract int getCapabilities();
public abstract void setHdrMode(boolean enabled);
public abstract void setHdrMode(boolean enabled, byte[] hdrMetadata);
}
@@ -1,6 +1,7 @@
package com.limelight.nvstream.http;
import java.security.cert.X509Certificate;
import java.util.Objects;
public class ComputerDetails {
@@ -8,22 +9,73 @@ public class ComputerDetails {
ONLINE, OFFLINE, UNKNOWN
}
public static class AddressTuple {
public String address;
public int port;
public AddressTuple(String address, int port) {
if (address == null) {
throw new IllegalArgumentException("Address cannot be null");
}
if (port <= 0) {
throw new IllegalArgumentException("Invalid port");
}
// If this was an escaped IPv6 address, remove the brackets
if (address.startsWith("[") && address.endsWith("]")) {
address = address.substring(1, address.length() - 1);
}
this.address = address;
this.port = port;
}
@Override
public int hashCode() {
return Objects.hash(address, port);
}
@Override
public boolean equals(Object obj) {
if (!(obj instanceof AddressTuple)) {
return false;
}
AddressTuple that = (AddressTuple) obj;
return address.equals(that.address) && port == that.port;
}
public String toString() {
if (address.contains(":")) {
// IPv6
return "[" + address + "]:" + port;
}
else {
// IPv4 and hostnames
return address + ":" + port;
}
}
}
// Persistent attributes
public String uuid;
public String name;
public String localAddress;
public String remoteAddress;
public String manualAddress;
public String ipv6Address;
public AddressTuple localAddress;
public AddressTuple remoteAddress;
public AddressTuple manualAddress;
public AddressTuple ipv6Address;
public String macAddress;
public X509Certificate serverCert;
// Transient attributes
public State state;
public String activeAddress;
public AddressTuple activeAddress;
public int httpsPort;
public int externalPort;
public PairingManager.PairState pairState;
public int runningGameId;
public String rawAppList;
public boolean nvidiaServer;
public ComputerDetails() {
// Use defaults
@@ -35,6 +87,27 @@ public class ComputerDetails {
update(details);
}
public int guessExternalPort() {
if (externalPort != 0) {
return externalPort;
}
else if (remoteAddress != null) {
return remoteAddress.port;
}
else if (activeAddress != null) {
return activeAddress.port;
}
else if (ipv6Address != null) {
return ipv6Address.port;
}
else if (localAddress != null) {
return localAddress.port;
}
else {
return NvHTTP.DEFAULT_HTTP_PORT;
}
}
public void update(ComputerDetails details) {
this.state = details.state;
this.name = details.name;
@@ -43,12 +116,18 @@ public class ComputerDetails {
this.activeAddress = details.activeAddress;
}
// We can get IPv4 loopback addresses with GS IPv6 Forwarder
if (details.localAddress != null && !details.localAddress.startsWith("127.")) {
if (details.localAddress != null && !details.localAddress.address.startsWith("127.")) {
this.localAddress = details.localAddress;
}
if (details.remoteAddress != null) {
this.remoteAddress = details.remoteAddress;
}
else if (this.remoteAddress != null && details.externalPort != 0) {
// If we have a remote address already (perhaps via STUN) but our updated details
// don't have a new one (because GFE doesn't send one), propagate the external
// port to the current remote address. We may have tried to guess it previously.
this.remoteAddress.port = details.externalPort;
}
if (details.manualAddress != null) {
this.manualAddress = details.manualAddress;
}
@@ -61,8 +140,11 @@ public class ComputerDetails {
if (details.serverCert != null) {
this.serverCert = details.serverCert;
}
this.externalPort = details.externalPort;
this.httpsPort = details.httpsPort;
this.pairState = details.pairState;
this.runningGameId = details.runningGameId;
this.nvidiaServer = details.nvidiaServer;
this.rawAppList = details.rawAppList;
}
@@ -80,6 +162,7 @@ public class ComputerDetails {
str.append("MAC Address: ").append(macAddress).append("\n");
str.append("Pair State: ").append(pairState).append("\n");
str.append("Running Game ID: ").append(runningGameId).append("\n");
str.append("HTTPS Port: ").append(httpsPort).append("\n");
return str.toString();
}
}
@@ -2,13 +2,13 @@ package com.limelight.nvstream.http;
import java.io.IOException;
public class GfeHttpResponseException extends IOException {
public class HostHttpResponseException extends IOException {
private static final long serialVersionUID = 1543508830807804222L;
private int errorCode;
private String errorMsg;
public GfeHttpResponseException(int errorCode, String errorMsg) {
public HostHttpResponseException(int errorCode, String errorMsg) {
this.errorCode = errorCode;
this.errorMsg = errorMsg;
}
@@ -23,6 +23,6 @@ public class GfeHttpResponseException extends IOException {
@Override
public String getMessage() {
return "GeForce Experience returned error: "+errorMsg+" (Error code: "+errorCode+")";
return "Host PC returned error: "+errorMsg+" (Error code: "+errorCode+")";
}
}
@@ -8,6 +8,7 @@ import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.io.StringReader;
import java.net.Inet4Address;
import java.net.InetAddress;
import java.net.Proxy;
import java.net.Socket;
@@ -62,19 +63,22 @@ public class NvHTTP {
private String uniqueId;
private PairingManager pm;
public static final int HTTPS_PORT = 47984;
public static final int HTTP_PORT = 47989;
public static final int CONNECTION_TIMEOUT = 3000;
public static final int READ_TIMEOUT = 5000;
private static final int DEFAULT_HTTPS_PORT = 47984;
public static final int DEFAULT_HTTP_PORT = 47989;
public static final int SHORT_CONNECTION_TIMEOUT = 3000;
public static final int LONG_CONNECTION_TIMEOUT = 5000;
public static final int READ_TIMEOUT = 7000;
// Print URL and content to logcat on debug builds
private static boolean verbose = BuildConfig.DEBUG;
private HttpUrl baseUrlHttps;
private HttpUrl baseUrlHttp;
private int httpsPort;
private OkHttpClient httpClient;
private OkHttpClient httpClientWithReadTimeout;
private OkHttpClient httpClientLongConnectTimeout;
private OkHttpClient httpClientLongConnectNoReadTimeout;
private OkHttpClient httpClientShortConnectTimeout;
private X509TrustManager defaultTrustManager;
private X509TrustManager trustManager;
@@ -167,20 +171,34 @@ public class NvHTTP {
}
};
httpClient = new OkHttpClient.Builder()
httpClientLongConnectTimeout = new OkHttpClient.Builder()
.connectionPool(new ConnectionPool(0, 1, TimeUnit.MILLISECONDS))
.hostnameVerifier(hv)
.readTimeout(0, TimeUnit.MILLISECONDS)
.connectTimeout(CONNECTION_TIMEOUT, TimeUnit.MILLISECONDS)
.readTimeout(READ_TIMEOUT, TimeUnit.MILLISECONDS)
.connectTimeout(LONG_CONNECTION_TIMEOUT, TimeUnit.MILLISECONDS)
.proxy(Proxy.NO_PROXY)
.build();
httpClientWithReadTimeout = httpClient.newBuilder()
.readTimeout(READ_TIMEOUT, TimeUnit.MILLISECONDS)
httpClientShortConnectTimeout = httpClientLongConnectTimeout.newBuilder()
.connectTimeout(SHORT_CONNECTION_TIMEOUT, TimeUnit.MILLISECONDS)
.build();
httpClientLongConnectNoReadTimeout = httpClientLongConnectTimeout.newBuilder()
.readTimeout(0, TimeUnit.MILLISECONDS)
.build();
}
public HttpUrl getHttpsUrl(boolean likelyOnline) throws IOException {
if (httpsPort == 0) {
// Fetch the HTTPS port if we don't have it already
httpsPort = getHttpsPort(openHttpConnectionToString(likelyOnline ? httpClientLongConnectTimeout : httpClientShortConnectTimeout,
baseUrlHttp, "serverinfo"));
}
return new HttpUrl.Builder().scheme("https").host(baseUrlHttp.host()).port(httpsPort).build();
}
public NvHTTP(String address, String uniqueId, X509Certificate serverCert, LimelightCryptoProvider cryptoProvider) throws IOException {
public NvHTTP(ComputerDetails.AddressTuple address, int httpsPort, String uniqueId, X509Certificate serverCert, LimelightCryptoProvider cryptoProvider) throws IOException {
// Use the same UID for all Moonlight clients so we can quit games
// started by other Moonlight clients.
this.uniqueId = "0123456789ABCDEF";
@@ -189,17 +207,25 @@ public class NvHTTP {
initializeHttpState(cryptoProvider);
this.httpsPort = httpsPort;
try {
// If this is an IPv4-mapped IPv6 address, OkHTTP will choke on it if it's
// in IPv6 form, because InetAddress.getByName() will return an Inet4Address
// for what OkHTTP thinks is an IPv6 address. Normalize it into IPv4 form
// to avoid triggering this bug.
String addressString = address.address;
if (addressString.contains(":") && addressString.contains(".")) {
InetAddress addr = InetAddress.getByName(addressString);
if (addr instanceof Inet4Address) {
addressString = ((Inet4Address)addr).getHostAddress();
}
}
this.baseUrlHttp = new HttpUrl.Builder()
.scheme("http")
.host(address)
.port(HTTP_PORT)
.build();
this.baseUrlHttps = new HttpUrl.Builder()
.scheme("https")
.host(address)
.port(HTTPS_PORT)
.host(addressString)
.port(address.port)
.build();
} catch (IllegalArgumentException e) {
// Encapsulate IllegalArgumentException into IOException for callers to handle more easily
@@ -253,7 +279,7 @@ public class NvHTTP {
return getXmlString(new StringReader(str), tagname, throwIfMissing);
}
private static void verifyResponseStatus(XmlPullParser xpp) throws GfeHttpResponseException {
private static void verifyResponseStatus(XmlPullParser xpp) throws HostHttpResponseException {
// We use Long.parseLong() because in rare cases GFE can send back a status code of
// 0xFFFFFFFF, which will cause Integer.parseInt() to throw a NumberFormatException due
// to exceeding Integer.MAX_VALUE. We'll get the desired error code of -1 by just casting
@@ -267,12 +293,15 @@ public class NvHTTP {
statusCode = 418;
statusMsg = "Missing audio capture device. Reinstall GeForce Experience.";
}
throw new GfeHttpResponseException(statusCode, statusMsg);
throw new HostHttpResponseException(statusCode, statusMsg);
}
}
public String getServerInfo() throws IOException, XmlPullParserException {
public String getServerInfo(boolean likelyOnline) throws IOException, XmlPullParserException {
String resp;
// If we believe the PC is online, give it a little extra time to respond
OkHttpClient client = likelyOnline ? httpClientLongConnectTimeout : httpClientShortConnectTimeout;
//
// TODO: Shield Hub uses HTTP for this and is able to get an accurate PairStatus with HTTP.
@@ -284,13 +313,13 @@ public class NvHTTP {
if (serverCert != null) {
try {
try {
resp = openHttpConnectionToString(baseUrlHttps, "serverinfo", true);
resp = openHttpConnectionToString(client, getHttpsUrl(likelyOnline), "serverinfo");
} catch (SSLHandshakeException e) {
// Detect if we failed due to a server cert mismatch
if (e.getCause() instanceof CertificateException) {
// Jump to the GfeHttpResponseException exception handler to retry
// over HTTP which will allow us to pair again to update the cert
throw new GfeHttpResponseException(401, "Server certificate mismatch");
throw new HostHttpResponseException(401, "Server certificate mismatch");
}
else {
throw e;
@@ -301,10 +330,10 @@ public class NvHTTP {
// We want this because it will throw us into the HTTP case if the client is unpaired.
getServerVersion(resp);
}
catch (GfeHttpResponseException e) {
catch (HostHttpResponseException e) {
if (e.getErrorCode() == 401) {
// Cert validation error - fall back to HTTP
return openHttpConnectionToString(baseUrlHttp, "serverinfo", true);
return openHttpConnectionToString(client, baseUrlHttp, "serverinfo");
}
// If it's not a cert validation error, throw it
@@ -315,14 +344,21 @@ public class NvHTTP {
}
else {
// No pinned cert, so use HTTP
return openHttpConnectionToString(baseUrlHttp , "serverinfo", true);
return openHttpConnectionToString(client, baseUrlHttp, "serverinfo");
}
}
public ComputerDetails getComputerDetails() throws IOException, XmlPullParserException {
private static ComputerDetails.AddressTuple makeTuple(String address, int port) {
if (address == null) {
return null;
}
return new ComputerDetails.AddressTuple(address, port);
}
public ComputerDetails getComputerDetails(String serverInfo) throws IOException, XmlPullParserException {
ComputerDetails details = new ComputerDetails();
String serverInfo = getServerInfo();
details.name = getXmlString(serverInfo, "hostname", false);
if (details.name == null || details.name.isEmpty()) {
details.name = "UNKNOWN";
@@ -331,20 +367,32 @@ public class NvHTTP {
// UUID is mandatory to determine which machine is responding
details.uuid = getXmlString(serverInfo, "uniqueid", true);
details.macAddress = getXmlString(serverInfo, "mac", false);
details.localAddress = getXmlString(serverInfo, "LocalIP", false);
details.httpsPort = getHttpsPort(serverInfo);
// This is missing on on recent GFE versions
details.remoteAddress = getXmlString(serverInfo, "ExternalIP", false);
details.macAddress = getXmlString(serverInfo, "mac", false);
// FIXME: Do we want to use the current port?
details.localAddress = makeTuple(getXmlString(serverInfo, "LocalIP", false), baseUrlHttp.port());
// This is missing on on recent GFE versions, but it's present on Sunshine
details.externalPort = getExternalPort(serverInfo);
details.remoteAddress = makeTuple(getXmlString(serverInfo, "ExternalIP", false), details.externalPort);
details.pairState = getPairState(serverInfo);
details.runningGameId = getCurrentGame(serverInfo);
// The MJOLNIR codename was used by GFE but never by any third-party server
details.nvidiaServer = getXmlString(serverInfo, "state", true).contains("MJOLNIR");
// We could reach it so it's online
details.state = ComputerDetails.State.ONLINE;
return details;
}
public ComputerDetails getComputerDetails(boolean likelyOnline) throws IOException, XmlPullParserException {
return getComputerDetails(getServerInfo(likelyOnline));
}
// This hack is Android-specific but we do it on all platforms
// because it doesn't really matter
@@ -378,25 +426,18 @@ public class NvHTTP {
.build();
}
private ResponseBody openHttpConnection(HttpUrl baseUrl, String path, boolean enableReadTimeout) throws IOException {
return openHttpConnection(baseUrl, path, null, enableReadTimeout);
private ResponseBody openHttpConnection(OkHttpClient client, HttpUrl baseUrl, String path) throws IOException {
return openHttpConnection(client, baseUrl, path, null);
}
// Read timeout should be enabled for any HTTP query that requires no outside action
// on the GFE server. Examples of queries that DO require outside action are launch, resume, and quit.
// The initial pair query does require outside action (user entering a PIN) but subsequent pairing
// queries do not.
private ResponseBody openHttpConnection(HttpUrl baseUrl, String path, String query, boolean enableReadTimeout) throws IOException {
private ResponseBody openHttpConnection(OkHttpClient client, HttpUrl baseUrl, String path, String query) throws IOException {
HttpUrl completeUrl = getCompleteUrl(baseUrl, path, query);
Request request = new Request.Builder().url(completeUrl).get().build();
Response response;
if (enableReadTimeout) {
response = performAndroidTlsHack(httpClientWithReadTimeout).newCall(request).execute();
}
else {
response = performAndroidTlsHack(httpClient).newCall(request).execute();
}
Response response = performAndroidTlsHack(client).newCall(request).execute();
ResponseBody body = response.body();
@@ -413,17 +454,17 @@ public class NvHTTP {
throw new FileNotFoundException(completeUrl.toString());
}
else {
throw new GfeHttpResponseException(response.code(), response.message());
throw new HostHttpResponseException(response.code(), response.message());
}
}
private String openHttpConnectionToString(HttpUrl baseUrl, String path, boolean enableReadTimeout) throws IOException {
return openHttpConnectionToString(baseUrl, path, null, enableReadTimeout);
private String openHttpConnectionToString(OkHttpClient client, HttpUrl baseUrl, String path) throws IOException {
return openHttpConnectionToString(client, baseUrl, path, null);
}
private String openHttpConnectionToString(HttpUrl baseUrl, String path, String query, boolean enableReadTimeout) throws IOException {
private String openHttpConnectionToString(OkHttpClient client, HttpUrl baseUrl, String path, String query) throws IOException {
try {
ResponseBody resp = openHttpConnection(baseUrl, path, query, enableReadTimeout);
ResponseBody resp = openHttpConnection(client, baseUrl, path, query);
String respString = resp.string();
resp.close();
@@ -448,7 +489,7 @@ public class NvHTTP {
}
public PairingManager.PairState getPairState() throws IOException, XmlPullParserException {
return getPairState(getServerInfo());
return getPairState(getServerInfo(true));
}
public PairingManager.PairState getPairState(String serverInfo) throws IOException, XmlPullParserException {
@@ -527,6 +568,32 @@ public class NvHTTP {
}
}
public int getHttpsPort(String serverInfo) {
try {
return Integer.parseInt(getXmlString(serverInfo, "HttpsPort", true));
} catch (XmlPullParserException e) {
e.printStackTrace();
return DEFAULT_HTTPS_PORT;
} catch (IOException e) {
e.printStackTrace();
return DEFAULT_HTTPS_PORT;
}
}
public int getExternalPort(String serverInfo) {
// This is an extension which is not present in GFE. It is present for Sunshine to be able
// to support dynamic HTTP WAN ports without requiring the user to manually enter the port.
try {
return Integer.parseInt(getXmlString(serverInfo, "ExternalPort", true));
} catch (XmlPullParserException e) {
// Expected on non-Sunshine servers
return baseUrlHttp.port();
} catch (IOException e) {
e.printStackTrace();
return baseUrlHttp.port();
}
}
public NvApp getAppById(int appId) throws IOException, XmlPullParserException {
LinkedList<NvApp> appList = getAppList();
for (NvApp appFromList : appList) {
@@ -618,40 +685,37 @@ public class NvHTTP {
}
public String getAppListRaw() throws IOException {
return openHttpConnectionToString(baseUrlHttps, "applist", true);
return openHttpConnectionToString(httpClientLongConnectTimeout, getHttpsUrl(true), "applist");
}
public LinkedList<NvApp> getAppList() throws GfeHttpResponseException, IOException, XmlPullParserException {
public LinkedList<NvApp> getAppList() throws HostHttpResponseException, IOException, XmlPullParserException {
if (verbose) {
// Use the raw function so the app list is printed
return getAppListByReader(new StringReader(getAppListRaw()));
}
else {
ResponseBody resp = openHttpConnection(baseUrlHttps, "applist", true);
LinkedList<NvApp> appList = getAppListByReader(new InputStreamReader(resp.byteStream()));
resp.close();
return appList;
try (final ResponseBody resp = openHttpConnection(httpClientLongConnectTimeout, getHttpsUrl(true), "applist")) {
return getAppListByReader(new InputStreamReader(resp.byteStream()));
}
}
}
String executePairingCommand(String additionalArguments, boolean enableReadTimeout) throws GfeHttpResponseException, IOException {
return openHttpConnectionToString(baseUrlHttp, "pair",
"devicename=roth&updateState=1&" + additionalArguments,
enableReadTimeout);
String executePairingCommand(String additionalArguments, boolean enableReadTimeout) throws HostHttpResponseException, IOException {
return openHttpConnectionToString(enableReadTimeout ? httpClientLongConnectTimeout : httpClientLongConnectNoReadTimeout,
baseUrlHttp, "pair", "devicename=roth&updateState=1&" + additionalArguments);
}
String executePairingChallenge() throws GfeHttpResponseException, IOException {
return openHttpConnectionToString(baseUrlHttps, "pair",
"devicename=roth&updateState=1&phrase=pairchallenge",
true);
String executePairingChallenge() throws HostHttpResponseException, IOException {
return openHttpConnectionToString(httpClientLongConnectTimeout, getHttpsUrl(true),
"pair", "devicename=roth&updateState=1&phrase=pairchallenge");
}
public void unpair() throws IOException {
openHttpConnectionToString(baseUrlHttp, "unpair", true);
openHttpConnectionToString(httpClientLongConnectTimeout, baseUrlHttp, "unpair");
}
public InputStream getBoxArt(NvApp app) throws IOException {
ResponseBody resp = openHttpConnection(baseUrlHttps, "appasset", "appid=" + app.getAppId() + "&AssetType=2&AssetIdx=0", true);
ResponseBody resp = openHttpConnection(httpClientLongConnectTimeout, getHttpsUrl(true), "appasset", "appid=" + app.getAppId() + "&AssetType=2&AssetIdx=0");
return resp.byteStream();
}
@@ -686,27 +750,30 @@ public class NvHTTP {
return new String(hexChars);
}
public boolean launchApp(ConnectionContext context, int appId, boolean enableHdr) throws IOException, XmlPullParserException {
public boolean launchApp(ConnectionContext context, String verb, int appId, boolean enableHdr) throws IOException, XmlPullParserException {
// Using an FPS value over 60 causes SOPS to default to 720p60,
// so force it to 0 to ensure the correct resolution is set. We
// used to use 60 here but that locked the frame rate to 60 FPS
// on GFE 3.20.3.
int fps = context.streamConfig.getLaunchRefreshRate() > 60 ? 0 : context.streamConfig.getLaunchRefreshRate();
int fps = context.isNvidiaServerSoftware && context.streamConfig.getLaunchRefreshRate() > 60 ?
0 : context.streamConfig.getLaunchRefreshRate();
// Using an unsupported resolution (not 720p, 1080p, or 4K) causes
// GFE to force SOPS to 720p60. This is fine for < 720p resolutions like
// 360p or 480p, but it is not ideal for 1440p and other resolutions.
// When we detect an unsupported resolution, disable SOPS unless it's under 720p.
// FIXME: Detect support resolutions using the serverinfo response, not a hardcoded list
boolean enableSops = context.streamConfig.getSops();
if (context.negotiatedWidth * context.negotiatedHeight > 1280 * 720 &&
context.negotiatedWidth * context.negotiatedHeight != 1920 * 1080 &&
context.negotiatedWidth * context.negotiatedHeight != 3840 * 2160) {
LimeLog.info("Disabling SOPS due to non-standard resolution: "+context.negotiatedWidth+"x"+context.negotiatedHeight);
enableSops = false;
if (context.isNvidiaServerSoftware) {
// Using an unsupported resolution (not 720p, 1080p, or 4K) causes
// GFE to force SOPS to 720p60. This is fine for < 720p resolutions like
// 360p or 480p, but it is not ideal for 1440p and other resolutions.
// When we detect an unsupported resolution, disable SOPS unless it's under 720p.
// FIXME: Detect support resolutions using the serverinfo response, not a hardcoded list
if (context.negotiatedWidth * context.negotiatedHeight > 1280 * 720 &&
context.negotiatedWidth * context.negotiatedHeight != 1920 * 1080 &&
context.negotiatedWidth * context.negotiatedHeight != 3840 * 2160) {
LimeLog.info("Disabling SOPS due to non-standard resolution: "+context.negotiatedWidth+"x"+context.negotiatedHeight);
enableSops = false;
}
}
String xmlStr = openHttpConnectionToString(baseUrlHttps, "launch",
String xmlStr = openHttpConnectionToString(httpClientLongConnectNoReadTimeout, getHttpsUrl(true), verb,
"appid=" + appId +
"&mode=" + context.negotiatedWidth + "x" + context.negotiatedHeight + "x" + fps +
"&additionalStates=1&sops=" + (enableSops ? 1 : 0) +
@@ -715,26 +782,11 @@ public class NvHTTP {
(!enableHdr ? "" : "&hdrMode=1&clientHdrCapVersion=0&clientHdrCapSupportedFlagsInUint32=0&clientHdrCapMetaDataId=NV_STATIC_METADATA_TYPE_1&clientHdrCapDisplayData=0x0x0x0x0x0x0x0x0x0x0") +
"&localAudioPlayMode=" + (context.streamConfig.getPlayLocalAudio() ? 1 : 0) +
"&surroundAudioInfo=" + context.streamConfig.getAudioConfiguration().getSurroundAudioInfo() +
(context.streamConfig.getAttachedGamepadMask() != 0 ? "&remoteControllersBitmap=" + context.streamConfig.getAttachedGamepadMask() : "") +
(context.streamConfig.getAttachedGamepadMask() != 0 ? "&gcmap=" + context.streamConfig.getAttachedGamepadMask() : ""),
false);
if (!getXmlString(xmlStr, "gamesession", true).equals("0")) {
// sessionUrl0 will be missing for older GFE versions
context.rtspSessionUrl = getXmlString(xmlStr, "sessionUrl0", false);
return true;
}
else {
return false;
}
}
public boolean resumeApp(ConnectionContext context) throws IOException, XmlPullParserException {
String xmlStr = openHttpConnectionToString(baseUrlHttps, "resume",
"rikey="+bytesToHex(context.riKey.getEncoded()) +
"&rikeyid="+context.riKeyId +
"&surroundAudioInfo=" + context.streamConfig.getAudioConfiguration().getSurroundAudioInfo(),
false);
if (!getXmlString(xmlStr, "resume", true).equals("0")) {
"&remoteControllersBitmap=" + context.streamConfig.getAttachedGamepadMask() +
"&gcmap=" + context.streamConfig.getAttachedGamepadMask() +
"&gcpersist="+(context.streamConfig.getPersistGamepadsAfterDisconnect() ? 1 : 0));
if ((verb.equals("launch") && !getXmlString(xmlStr, "gamesession", true).equals("0") ||
(verb.equals("resume") && !getXmlString(xmlStr, "resume", true).equals("0")))) {
// sessionUrl0 will be missing for older GFE versions
context.rtspSessionUrl = getXmlString(xmlStr, "sessionUrl0", false);
return true;
@@ -745,17 +797,17 @@ public class NvHTTP {
}
public boolean quitApp() throws IOException, XmlPullParserException {
String xmlStr = openHttpConnectionToString(baseUrlHttps, "cancel", false);
String xmlStr = openHttpConnectionToString(httpClientLongConnectNoReadTimeout, getHttpsUrl(true), "cancel");
if (getXmlString(xmlStr, "cancel", true).equals("0")) {
return false;
}
// Newer GFE versions will just return success even if quitting fails
// if we're not the original requestor.
if (getCurrentGame(getServerInfo()) != 0) {
if (getCurrentGame(getServerInfo(true)) != 0) {
// Generate a synthetic GfeResponseException letting the caller know
// that they can't kill someone else's stream.
throw new GfeHttpResponseException(599, "");
throw new HostHttpResponseException(599, "");
}
return true;
@@ -7,4 +7,5 @@ public class KeyboardPacket {
public static final byte MODIFIER_SHIFT = 0x01;
public static final byte MODIFIER_CTRL = 0x02;
public static final byte MODIFIER_ALT = 0x04;
}
public static final byte MODIFIER_META = 0x08;
}
@@ -30,6 +30,13 @@ public class MoonBridge {
public static final int FRAME_TYPE_PFRAME = 0;
public static final int FRAME_TYPE_IDR = 1;
public static final int COLORSPACE_REC_601 = 0;
public static final int COLORSPACE_REC_709 = 1;
public static final int COLORSPACE_REC_2020 = 2;
public static final int COLOR_RANGE_LIMITED = 0;
public static final int COLOR_RANGE_FULL = 1;
public static final int CAPABILITY_DIRECT_SUBMIT = 1;
public static final int CAPABILITY_REFERENCE_FRAME_INVALIDATION_AVC = 2;
public static final int CAPABILITY_REFERENCE_FRAME_INVALIDATION_HEVC = 4;
@@ -45,6 +52,7 @@ public class MoonBridge {
public static final int ML_ERROR_NO_VIDEO_FRAME = -101;
public static final int ML_ERROR_UNEXPECTED_EARLY_TERMINATION = -102;
public static final int ML_ERROR_PROTECTED_CONTENT = -103;
public static final int ML_ERROR_FRAME_CONVERSION = -104;
public static final int ML_PORT_INDEX_TCP_47984 = 0;
public static final int ML_PORT_INDEX_TCP_47989 = 1;
@@ -65,6 +73,8 @@ public class MoonBridge {
public static final int ML_TEST_RESULT_INCONCLUSIVE = 0xFFFFFFFF;
public static final byte SS_KBE_FLAG_NON_NORMALIZED = 0x01;
private static AudioRenderer audioRenderer;
private static VideoDecoderRenderer videoRenderer;
private static NvConnectionListener connectionListener;
@@ -243,9 +253,9 @@ public class MoonBridge {
}
}
public static void bridgeClSetHdrMode(boolean enabled) {
public static void bridgeClSetHdrMode(boolean enabled, byte[] hdrMetadata) {
if (connectionListener != null) {
connectionListener.setHdrMode(enabled);
connectionListener.setHdrMode(enabled, hdrMetadata);
}
}
@@ -271,7 +281,8 @@ public class MoonBridge {
int clientRefreshRateX100,
int encryptionFlags,
byte[] riAesKey, byte[] riAesIv,
int videoCapabilities);
int videoCapabilities,
int colorSpace, int colorRange);
public static native void stopConnection();
@@ -296,12 +307,12 @@ public class MoonBridge {
short leftStickX, short leftStickY,
short rightStickX, short rightStickY);
public static native void sendKeyboardInput(short keyMap, byte keyDirection, byte modifier);
public static native void sendMouseScroll(byte scrollClicks);
public static native void sendKeyboardInput(short keyMap, byte keyDirection, byte modifier, byte flags);
public static native void sendMouseHighResScroll(short scrollAmount);
public static native void sendMouseHighResHScroll(short scrollAmount);
public static native void sendUtf8Text(String text);
public static native String getStageName(int stage);
@@ -6,12 +6,14 @@ import java.net.InetAddress;
public class MdnsComputer {
private InetAddress localAddr;
private Inet6Address v6Addr;
private int port;
private String name;
public MdnsComputer(String name, InetAddress localAddress, Inet6Address v6Addr) {
public MdnsComputer(String name, InetAddress localAddress, Inet6Address v6Addr, int port) {
this.name = name;
this.localAddr = localAddress;
this.v6Addr = v6Addr;
this.port = port;
}
public String getName() {
@@ -26,6 +28,10 @@ public class MdnsComputer {
return v6Addr;
}
public int getPort() {
return port;
}
@Override
public int hashCode() {
return name.hashCode();
@@ -36,7 +42,7 @@ public class MdnsComputer {
if (o instanceof MdnsComputer) {
MdnsComputer other = (MdnsComputer)o;
if (!other.name.equals(name)) {
if (!other.name.equals(name) || other.port != port) {
return false;
}
@@ -7,7 +7,6 @@ import java.net.Inet6Address;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
@@ -25,13 +24,13 @@ public class MdnsDiscoveryAgent implements ServiceListener {
private MdnsDiscoveryListener listener;
private Thread discoveryThread;
private HashMap<InetAddress, MdnsComputer> computers = new HashMap<InetAddress, MdnsComputer>();
private HashSet<String> pendingResolution = new HashSet<String>();
private HashSet<MdnsComputer> computers = new HashSet<>();
private HashSet<String> pendingResolution = new HashSet<>();
// The resolver factory's instance member has a static lifetime which
// means our ref count and listener must be static also.
private static int resolverRefCount = 0;
private static HashSet<ServiceListener> listeners = new HashSet<ServiceListener>();
private static HashSet<ServiceListener> listeners = new HashSet<>();
private static ServiceListener nvstreamListener = new ServiceListener() {
@Override
public void serviceAdded(ServiceEvent event) {
@@ -107,7 +106,7 @@ public class MdnsDiscoveryAgent implements ServiceListener {
return false;
}
}
};
}
static {
// Override jmDNS's default topology discovery class with ours
@@ -260,8 +259,8 @@ public class MdnsDiscoveryAgent implements ServiceListener {
// Add a computer object for each IPv4 address reported by the PC
for (Inet4Address v4Addr : v4Addrs) {
synchronized (computers) {
MdnsComputer computer = new MdnsComputer(info.getName(), v4Addr, v6GlobalAddr);
if (computers.put(computer.getLocalAddress(), computer) == null) {
MdnsComputer computer = new MdnsComputer(info.getName(), v4Addr, v6GlobalAddr, info.getPort());
if (computers.add(computer)) {
// This was a new entry
listener.notifyComputerAdded(computer);
}
@@ -273,9 +272,8 @@ public class MdnsDiscoveryAgent implements ServiceListener {
Inet6Address v6LocalAddr = getLocalAddress(v6Addrs);
if (v6LocalAddr != null || v6GlobalAddr != null) {
MdnsComputer computer = new MdnsComputer(info.getName(), v6LocalAddr, v6GlobalAddr);
if (computers.put(v6LocalAddr != null ?
computer.getLocalAddress() : computer.getIpv6Address(), computer) == null) {
MdnsComputer computer = new MdnsComputer(info.getName(), v6LocalAddr, v6GlobalAddr, info.getPort());
if (computers.add(computer)) {
// This was a new entry
listener.notifyComputerAdded(computer);
}
@@ -353,7 +351,7 @@ public class MdnsDiscoveryAgent implements ServiceListener {
public List<MdnsComputer> getComputerSet() {
synchronized (computers) {
return new ArrayList<MdnsComputer>(computers.values());
return new ArrayList<>(computers);
}
}
@@ -377,28 +375,6 @@ public class MdnsDiscoveryAgent implements ServiceListener {
@Override
public void serviceRemoved(ServiceEvent event) {
LimeLog.info("mDNS: Machine disappeared: "+event.getInfo().getName());
Inet4Address v4Addrs[] = event.getInfo().getInet4Addresses();
for (Inet4Address addr : v4Addrs) {
synchronized (computers) {
MdnsComputer computer = computers.remove(addr);
if (computer != null) {
listener.notifyComputerRemoved(computer);
break;
}
}
}
Inet6Address v6Addrs[] = event.getInfo().getInet6Addresses();
for (Inet6Address addr : v6Addrs) {
synchronized (computers) {
MdnsComputer computer = computers.remove(addr);
if (computer != null) {
listener.notifyComputerRemoved(computer);
break;
}
}
}
}
@Override
@@ -2,6 +2,5 @@ package com.limelight.nvstream.mdns;
public interface MdnsDiscoveryListener {
void notifyComputerAdded(MdnsComputer computer);
void notifyComputerRemoved(MdnsComputer computer);
void notifyDiscoveryFailure(Exception e);
}
@@ -10,38 +10,87 @@ import com.limelight.LimeLog;
import com.limelight.nvstream.http.ComputerDetails;
public class WakeOnLanSender {
private static final int[] PORTS_TO_TRY = new int[] {
// These ports will always be tried as-is.
private static final int[] STATIC_PORTS_TO_TRY = new int[] {
9, // Standard WOL port (privileged port)
47998, 47999, 48000, 48002, 48010, // Ports opened by GFE
47009, // Port opened by Moonlight Internet Hosting Tool for WoL (non-privileged port)
};
// These ports will be offset by the base port number (47989) to support alternate ports.
private static final int[] DYNAMIC_PORTS_TO_TRY = new int[] {
47998, 47999, 48000, 48002, 48010, // Ports opened by GFE
};
private static void sendPacketsForAddress(InetAddress address, int httpPort, DatagramSocket sock, byte[] payload) throws IOException {
IOException lastException = null;
boolean sentWolPacket = false;
// Try the static ports
for (int port : STATIC_PORTS_TO_TRY) {
try {
DatagramPacket dp = new DatagramPacket(payload, payload.length);
dp.setAddress(address);
dp.setPort(port);
sock.send(dp);
sentWolPacket = true;
} catch (IOException e) {
e.printStackTrace();
lastException = e;
}
}
// Try the dynamic ports
for (int port : DYNAMIC_PORTS_TO_TRY) {
try {
DatagramPacket dp = new DatagramPacket(payload, payload.length);
dp.setAddress(address);
dp.setPort((port - 47989) + httpPort);
sock.send(dp);
sentWolPacket = true;
} catch (IOException e) {
e.printStackTrace();
lastException = e;
}
}
if (!sentWolPacket) {
throw lastException;
}
}
public static void sendWolPacket(ComputerDetails computer) throws IOException {
DatagramSocket sock = new DatagramSocket(0);
byte[] payload = createWolPayload(computer);
IOException lastException = null;
boolean sentWolPacket = false;
try {
// Try all resolved remote and local addresses and IPv4 broadcast address.
try (final DatagramSocket sock = new DatagramSocket(0)) {
// Try all resolved remote and local addresses and broadcast addresses.
// The broadcast address is required to avoid stale ARP cache entries
// making the sleeping machine unreachable.
for (String unresolvedAddress : new String[] {
computer.localAddress, computer.remoteAddress, computer.manualAddress, computer.ipv6Address, "255.255.255.255"
for (ComputerDetails.AddressTuple address : new ComputerDetails.AddressTuple[] {
computer.localAddress, computer.remoteAddress,
computer.manualAddress, computer.ipv6Address,
}) {
if (unresolvedAddress == null) {
if (address == null) {
continue;
}
try {
for (InetAddress resolvedAddress : InetAddress.getAllByName(unresolvedAddress)) {
// Try all the ports for each resolved address
for (int port : PORTS_TO_TRY) {
DatagramPacket dp = new DatagramPacket(payload, payload.length);
dp.setAddress(resolvedAddress);
dp.setPort(port);
sock.send(dp);
sendPacketsForAddress(InetAddress.getByName("255.255.255.255"), address.port, sock, payload);
sentWolPacket = true;
} catch (IOException e) {
e.printStackTrace();
lastException = e;
}
try {
for (InetAddress resolvedAddress : InetAddress.getAllByName(address.address)) {
try {
sendPacketsForAddress(resolvedAddress, address.port, sock, payload);
sentWolPacket = true;
} catch (IOException e) {
e.printStackTrace();
lastException = e;
}
}
} catch (IOException e) {
@@ -52,8 +101,6 @@ public class WakeOnLanSender {
lastException = e;
}
}
} finally {
sock.close();
}
// Propagate the DNS resolution exception if we didn't
@@ -65,18 +112,20 @@ public class WakeOnLanSender {
private static byte[] macStringToBytes(String macAddress) {
byte[] macBytes = new byte[6];
@SuppressWarnings("resource")
Scanner scan = new Scanner(macAddress).useDelimiter(":");
for (int i = 0; i < macBytes.length && scan.hasNext(); i++) {
try {
macBytes[i] = (byte) Integer.parseInt(scan.next(), 16);
} catch (NumberFormatException e) {
LimeLog.warning("Malformed MAC address: "+macAddress+" (index: "+i+")");
break;
try (@SuppressWarnings("resource")
final Scanner scan = new Scanner(macAddress).useDelimiter(":")
) {
for (int i = 0; i < macBytes.length && scan.hasNext(); i++) {
try {
macBytes[i] = (byte) Integer.parseInt(scan.next(), 16);
} catch (NumberFormatException e) {
LimeLog.warning("Malformed MAC address: " + macAddress + " (index: " + i + ")");
break;
}
}
return macBytes;
}
scan.close();
return macBytes;
}
private static byte[] createWolPayload(ComputerDetails computer) {
@@ -6,6 +6,8 @@ import java.net.InetAddress;
import java.net.InterfaceAddress;
import java.net.NetworkInterface;
import java.net.SocketException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.UnknownHostException;
import java.util.Collections;
import java.util.concurrent.LinkedBlockingQueue;
@@ -96,8 +98,31 @@ public class AddComputerManually extends Activity {
}
}
private void doAddPc(String host) throws InterruptedException {
private URI parseRawUserInputToUri(String rawUserInput) {
try {
// Try adding a scheme and parsing the remaining input.
// This handles input like 127.0.0.1:47989, [::1], [::1]:47989, and 127.0.0.1.
URI uri = new URI("moonlight://" + rawUserInput);
if (uri.getHost() != null && !uri.getHost().isEmpty()) {
return uri;
}
} catch (URISyntaxException ignored) {}
try {
// Attempt to escape the input as an IPv6 literal.
// This handles input like ::1.
URI uri = new URI("moonlight://[" + rawUserInput + "]");
if (uri.getHost() != null && !uri.getHost().isEmpty()) {
return uri;
}
} catch (URISyntaxException ignored) {}
return null;
}
private void doAddPc(String rawUserInput) throws InterruptedException {
boolean wrongSiteLocal = false;
boolean invalidInput = false;
boolean success;
int portTestResult;
@@ -106,8 +131,28 @@ public class AddComputerManually extends Activity {
try {
ComputerDetails details = new ComputerDetails();
details.manualAddress = host;
success = managerBinder.addComputerBlocking(details);
// Check if we parsed a host address successfully
URI uri = parseRawUserInputToUri(rawUserInput);
if (uri != null && uri.getHost() != null && !uri.getHost().isEmpty()) {
String host = uri.getHost();
int port = uri.getPort();
// If a port was not specified, use the default
if (port == -1) {
port = NvHTTP.DEFAULT_HTTP_PORT;
}
details.manualAddress = new ComputerDetails.AddressTuple(host, port);
success = managerBinder.addComputerBlocking(details);
if (!success){
wrongSiteLocal = isWrongSubnetSiteLocalAddress(host);
}
} else {
// Invalid user input
success = false;
invalidInput = true;
}
} catch (InterruptedException e) {
// Propagate the InterruptedException to the caller for proper handling
dialog.dismiss();
@@ -117,13 +162,11 @@ public class AddComputerManually extends Activity {
// https://github.com/square/okhttp/blob/okhttp_27/okhttp/src/main/java/com/squareup/okhttp/HttpUrl.java#L705
e.printStackTrace();
success = false;
invalidInput = true;
}
// Keep the SpinnerDialog open while testing connectivity
if (!success){
wrongSiteLocal = isWrongSubnetSiteLocalAddress(host);
}
if (!success && !wrongSiteLocal) {
if (!success && !wrongSiteLocal && !invalidInput) {
// Run the test before dismissing the spinner because it can take a few seconds.
portTestResult = MoonBridge.testClientConnectivity(ServerHelper.CONNECTION_TEST_SERVER, 443,
MoonBridge.ML_PORT_FLAG_TCP_47984 | MoonBridge.ML_PORT_FLAG_TCP_47989);
@@ -134,7 +177,10 @@ public class AddComputerManually extends Activity {
dialog.dismiss();
if (wrongSiteLocal) {
if (invalidInput) {
Dialog.displayDialog(this, getResources().getString(R.string.conn_error_title), getResources().getString(R.string.addpc_unknown_host), false);
}
else if (wrongSiteLocal) {
Dialog.displayDialog(this, getResources().getString(R.string.conn_error_title), getResources().getString(R.string.addpc_wrong_sitelocal), false);
}
else if (!success) {
@@ -48,6 +48,7 @@ public class PreferenceConfiguration {
private static final String ABSOLUTE_MOUSE_MODE_PREF_STRING = "checkbox_absolute_mouse_mode";
private static final String ENABLE_AUDIO_FX_PREF_STRING = "checkbox_enable_audiofx";
private static final String REDUCE_REFRESH_RATE_PREF_STRING = "checkbox_reduce_refresh_rate";
private static final String FULL_RANGE_PREF_STRING = "checkbox_full_range";
static final String DEFAULT_RESOLUTION = "1280x720";
static final String DEFAULT_FPS = "60";
@@ -80,6 +81,7 @@ public class PreferenceConfiguration {
private static final boolean DEFAULT_ABSOLUTE_MOUSE_MODE = false;
private static final boolean DEFAULT_ENABLE_AUDIO_FX = false;
private static final boolean DEFAULT_REDUCE_REFRESH_RATE = false;
private static final boolean DEFAULT_FULL_RANGE = false;
public static final int FORCE_H265_ON = -1;
public static final int AUTOSELECT_H265 = 0;
@@ -124,6 +126,7 @@ public class PreferenceConfiguration {
public boolean absoluteMouseMode;
public boolean enableAudioFx;
public boolean reduceRefreshRate;
public boolean fullRange;
public static boolean isNativeResolution(int width, int height) {
// It's not a native resolution if it matches an existing resolution option
@@ -348,6 +351,7 @@ public class PreferenceConfiguration {
.remove(VIDEO_FORMAT_PREF_STRING)
.remove(ENABLE_HDR_PREF_STRING)
.remove(UNLOCK_FPS_STRING)
.remove(FULL_RANGE_PREF_STRING)
.apply();
}
@@ -505,6 +509,7 @@ public class PreferenceConfiguration {
config.absoluteMouseMode = prefs.getBoolean(ABSOLUTE_MOUSE_MODE_PREF_STRING, DEFAULT_ABSOLUTE_MOUSE_MODE);
config.enableAudioFx = prefs.getBoolean(ENABLE_AUDIO_FX_PREF_STRING, DEFAULT_ENABLE_AUDIO_FX);
config.reduceRefreshRate = prefs.getBoolean(REDUCE_REFRESH_RATE_PREF_STRING, DEFAULT_REDUCE_REFRESH_RATE);
config.fullRange = prefs.getBoolean(FULL_RANGE_PREF_STRING, DEFAULT_FULL_RANGE);
return config;
}
@@ -252,19 +252,10 @@ public class StreamSettings extends Activity {
PreferenceScreen screen = getPreferenceScreen();
// hide on-screen controls category on non touch screen devices
if (!getActivity().getPackageManager().
hasSystemFeature(PackageManager.FEATURE_TOUCHSCREEN)) {
{
PreferenceCategory category =
(PreferenceCategory) findPreference("category_onscreen_controls");
screen.removePreference(category);
}
{
PreferenceCategory category =
(PreferenceCategory) findPreference("category_input_settings");
category.removePreference(findPreference("checkbox_touchscreen_trackpad"));
}
if (!getActivity().getPackageManager().hasSystemFeature(PackageManager.FEATURE_TOUCHSCREEN)) {
PreferenceCategory category =
(PreferenceCategory) findPreference("category_onscreen_controls");
screen.removePreference(category);
}
// Hide remote desktop mouse mode on pre-Oreo (which doesn't have pointer capture)
@@ -44,4 +44,8 @@ public class HelpLauncher {
public static void launchTroubleshooting(Context context) {
launchUrl(context, "https://github.com/moonlight-stream/moonlight-docs/wiki/Troubleshooting");
}
public static void launchGameStreamEolFaq(Context context) {
launchUrl(context, "https://github.com/moonlight-stream/moonlight-docs/wiki/NVIDIA-GameStream-End-Of-Service-Announcement-FAQ");
}
}
@@ -6,13 +6,12 @@ import android.widget.Toast;
import com.limelight.AppView;
import com.limelight.Game;
import com.limelight.PcView;
import com.limelight.R;
import com.limelight.ShortcutTrampoline;
import com.limelight.binding.PlatformBinding;
import com.limelight.computers.ComputerManagerService;
import com.limelight.nvstream.http.ComputerDetails;
import com.limelight.nvstream.http.GfeHttpResponseException;
import com.limelight.nvstream.http.HostHttpResponseException;
import com.limelight.nvstream.http.NvApp;
import com.limelight.nvstream.http.NvHTTP;
import com.limelight.nvstream.jni.MoonBridge;
@@ -27,7 +26,7 @@ import java.security.cert.CertificateEncodingException;
public class ServerHelper {
public static final String CONNECTION_TEST_SERVER = "android.conntest.moonlight-stream.org";
public static String getCurrentAddressFromComputer(ComputerDetails computer) throws IOException {
public static ComputerDetails.AddressTuple getCurrentAddressFromComputer(ComputerDetails computer) throws IOException {
if (computer.activeAddress == null) {
throw new IOException("No active address for "+computer.name);
}
@@ -56,7 +55,9 @@ public class ServerHelper {
public static Intent createStartIntent(Activity parent, NvApp app, ComputerDetails computer,
ComputerManagerService.ComputerManagerBinder managerBinder) {
Intent intent = new Intent(parent, Game.class);
intent.putExtra(Game.EXTRA_HOST, computer.activeAddress);
intent.putExtra(Game.EXTRA_HOST, computer.activeAddress.address);
intent.putExtra(Game.EXTRA_PORT, computer.activeAddress.port);
intent.putExtra(Game.EXTRA_HTTPS_PORT, computer.httpsPort);
intent.putExtra(Game.EXTRA_APP_NAME, app.getAppName());
intent.putExtra(Game.EXTRA_APP_ID, app.getAppId());
intent.putExtra(Game.EXTRA_APP_HDR, app.isHdrSupported());
@@ -126,14 +127,14 @@ public class ServerHelper {
NvHTTP httpConn;
String message;
try {
httpConn = new NvHTTP(ServerHelper.getCurrentAddressFromComputer(computer),
httpConn = new NvHTTP(ServerHelper.getCurrentAddressFromComputer(computer), computer.httpsPort,
managerBinder.getUniqueId(), computer.serverCert, PlatformBinding.getCryptoProvider(parent));
if (httpConn.quitApp()) {
message = parent.getResources().getString(R.string.applist_quit_success) + " " + app.getAppName();
} else {
message = parent.getResources().getString(R.string.applist_quit_fail) + " " + app.getAppName();
}
} catch (GfeHttpResponseException e) {
} catch (HostHttpResponseException e) {
if (e.getErrorCode() == 599) {
message = "This session wasn't started by this device," +
" so it cannot be quit. End streaming on the original " +
+15 -3
View File
@@ -93,7 +93,7 @@ Java_com_limelight_nvstream_jni_MoonBridge_init(JNIEnv *env, jclass clazz) {
BridgeClConnectionTerminatedMethod = (*env)->GetStaticMethodID(env, clazz, "bridgeClConnectionTerminated", "(I)V");
BridgeClRumbleMethod = (*env)->GetStaticMethodID(env, clazz, "bridgeClRumble", "(SSS)V");
BridgeClConnectionStatusUpdateMethod = (*env)->GetStaticMethodID(env, clazz, "bridgeClConnectionStatusUpdate", "(I)V");
BridgeClSetHdrModeMethod = (*env)->GetStaticMethodID(env, clazz, "bridgeClSetHdrMode", "(Z)V");
BridgeClSetHdrModeMethod = (*env)->GetStaticMethodID(env, clazz, "bridgeClSetHdrMode", "(Z[B)V");
}
int BridgeDrSetup(int videoFormat, int width, int height, int redrawRate, void* context, int drFlags) {
@@ -331,7 +331,16 @@ void BridgeClConnectionStatusUpdate(int connectionStatus) {
void BridgeClSetHdrMode(bool enabled) {
JNIEnv* env = GetThreadEnv();
(*env)->CallStaticVoidMethod(env, GlobalBridgeClass, BridgeClSetHdrModeMethod, enabled);
jbyteArray hdrMetadataByteArray = NULL;
SS_HDR_METADATA hdrMetadata;
// Check if HDR metadata was provided
if (enabled && LiGetHdrMetadata(&hdrMetadata)) {
hdrMetadataByteArray = (*env)->NewByteArray(env, sizeof(SS_HDR_METADATA));
(*env)->SetByteArrayRegion(env, hdrMetadataByteArray, 0, sizeof(SS_HDR_METADATA), (jbyte*)&hdrMetadata);
}
(*env)->CallStaticVoidMethod(env, GlobalBridgeClass, BridgeClSetHdrModeMethod, enabled, hdrMetadataByteArray);
if ((*env)->ExceptionCheck(env)) {
// We will crash here
(*JVM)->DetachCurrentThread(JVM);
@@ -386,7 +395,8 @@ Java_com_limelight_nvstream_jni_MoonBridge_startConnection(JNIEnv *env, jclass c
jint clientRefreshRateX100,
jint encryptionFlags,
jbyteArray riAesKey, jbyteArray riAesIv,
jint videoCapabilities) {
jint videoCapabilities,
jint colorSpace, jint colorRange) {
SERVER_INFORMATION serverInfo = {
.address = (*env)->GetStringUTFChars(env, address, 0),
.serverInfoAppVersion = (*env)->GetStringUTFChars(env, appVersion, 0),
@@ -406,6 +416,8 @@ Java_com_limelight_nvstream_jni_MoonBridge_startConnection(JNIEnv *env, jclass c
.hevcBitratePercentageMultiplier = hevcBitratePercentageMultiplier,
.clientRefreshRateX100 = clientRefreshRateX100,
.encryptionFlags = encryptionFlags,
.colorSpace = colorSpace,
.colorRange = colorRange
};
jbyte* riAesKeyBuf = (*env)->GetByteArrayElements(env, riAesKey, NULL);
+7 -7
View File
@@ -47,13 +47,8 @@ Java_com_limelight_nvstream_jni_MoonBridge_sendControllerInput(JNIEnv *env, jcla
}
JNIEXPORT void JNICALL
Java_com_limelight_nvstream_jni_MoonBridge_sendKeyboardInput(JNIEnv *env, jclass clazz, jshort keyCode, jbyte keyAction, jbyte modifiers) {
LiSendKeyboardEvent(keyCode, keyAction, modifiers);
}
JNIEXPORT void JNICALL
Java_com_limelight_nvstream_jni_MoonBridge_sendMouseScroll(JNIEnv *env, jclass clazz, jbyte scrollClicks) {
LiSendScrollEvent(scrollClicks);
Java_com_limelight_nvstream_jni_MoonBridge_sendKeyboardInput(JNIEnv *env, jclass clazz, jshort keyCode, jbyte keyAction, jbyte modifiers, jbyte flags) {
LiSendKeyboardEvent2(keyCode, keyAction, modifiers, flags);
}
JNIEXPORT void JNICALL
@@ -61,6 +56,11 @@ Java_com_limelight_nvstream_jni_MoonBridge_sendMouseHighResScroll(JNIEnv *env, j
LiSendHighResScrollEvent(scrollAmount);
}
JNIEXPORT void JNICALL
Java_com_limelight_nvstream_jni_MoonBridge_sendMouseHighResHScroll(JNIEnv *env, jclass clazz, jshort scrollAmount) {
LiSendHighResHScrollEvent(scrollAmount);
}
JNIEXPORT void JNICALL
Java_com_limelight_nvstream_jni_MoonBridge_sendUtf8Text(JNIEnv *env, jclass clazz, jstring text) {
const char* utf8Text = (*env)->GetStringUTFChars(env, text, NULL);
+13 -1
View File
@@ -4,11 +4,23 @@
android:layout_height="match_parent"
tools:context=".Game" >
<View
android:id="@+id/backgroundTouchView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center" />
<com.limelight.ui.StreamView
android:id="@+id/surfaceView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center" />
android:layout_gravity="center"
android:focusable="true"
android:focusableInTouchMode="true"
android:focusedByDefault="true"
android:defaultFocusHighlightEnabled="false">
<requestFocus />
</com.limelight.ui.StreamView>
<TextView
android:id="@+id/performanceOverlay"
+144
View File
@@ -0,0 +1,144 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="pair_incorrect_pin">Неправилен ПИН</string>
<string name="no_video_received_error">Няма получено видео от хоста.</string>
<string name="pacing_latency">Предпочитане на най-ниската латентност</string>
<string name="pacing_balanced_alt">Балансирано с FPS лимит</string>
<string name="pacing_smoothness">Предпочитане на най-плавно видео (може значително да увеличи латентността)</string>
<string name="conn_metered">Предупреждение: Вашата активна мрежова връзка се измерва!</string>
<string name="conn_client_latency_hw">латентност на хардуерния декодер:</string>
<string name="conn_hardware_latency">Средна латентност на хардуерно декодиране:</string>
<string name="ip_hint">IP адрес на GeForce PC</string>
<string name="pcview_menu_send_wol">Изпращане на Wake-On-LAN заявка</string>
<string name="pcview_menu_delete_pc">Изтрий компютъра</string>
<string name="pcview_menu_test_network">Тестване на мрежовата връзка</string>
<string name="pcview_menu_details">Детайли</string>
<string name="nettest_title_waiting">Тестване на мрежовата връзка</string>
<string name="nettest_title_done">Тестът на мрежата е завършен</string>
<string name="pairing">Сдвояване…</string>
<string name="pair_pc_offline">Компютърът е офлайн</string>
<string name="pair_pc_ingame">Компютърът в момента е в игра. Трябва да затворите играта преди сдвояване.</string>
<string name="pair_pairing_title">Сдвояване</string>
<string name="wol_waking_pc">Събуждащ се компютъра…</string>
<string name="unpair_fail">Неуспешно раздвояване</string>
<string name="unpair_error">Устройството не беше сдвоено</string>
<string name="error_pc_offline">Компютърът е офлайн</string>
<string name="title_decoding_error">Видеодекодерът крашна</string>
<string name="no_frame_received_error">Мрежовата ви връзка не работи добре. Намалете настройката си за битрейт на видео или опитайте с по-бърза връзка.</string>
<string name="conn_client_latency">Средна латентност при декодиране на кадър:</string>
<string name="conn_starting">Стартиране</string>
<string name="conn_terminated_title">Връзката е прекратена</string>
<string name="yes">Да</string>
<string name="applist_menu_hide_app">Скриване на приложението</string>
<string name="applist_refresh_title">Списък с приложения</string>
<string name="summary_resolution_list">Увеличете, за да подобрите яснотата на изображението. Намалете за по-добра производителност на устройства от по-нисък клас и по-бавни мрежи.</string>
<string name="title_fps_list">Кадрова честота на видео</string>
<string name="scut_deleted_pc">Компютърът е изтрит</string>
<string name="scut_not_paired">Компютърът не е сдвоен</string>
<string name="scut_pc_not_found">Компютърът не е намерен</string>
<string name="scut_invalid_uuid">Предоставеният компютър не е валиден</string>
<string name="scut_invalid_app_id">Предоставеното приложение не е валидно</string>
<string name="help_loading_msg">Помощната страница се зарежда…</string>
<string name="help_loading_title">Помощ</string>
<string name="pcview_menu_header_online">Онлайн</string>
<string name="pcview_menu_header_unknown">Презареждане</string>
<string name="pcview_menu_pair_pc">Сдвояване с компютър</string>
<string name="pcview_menu_header_offline">Извън линия</string>
<string name="pcview_menu_app_list">Вижте Всички Приложения</string>
<string name="pcview_menu_unpair_pc">Раздвояване</string>
<string name="nettest_text_waiting">Moonlight тества вашата мрежова връзка, за да определи дали NVIDIA GameStream е блокиран.
\n
\nТова може да отнеме няколко секунди…</string>
<string name="nettest_text_success">Вашата мрежа изглежда не блокира Moonlight. Ако все още имате проблеми със свързването, проверете настройките на защитната стена на вашия компютър.
\n
\nАко се опитвате да стриймвате през интернет, инсталирайте Moonlight Internet Hosting Tool на вашия компютър и стартирайте включения тестер за интернет стрийминг, за да проверите интернет връзката на вашия компютър.</string>
<string name="nettest_text_inconclusive">Мрежовият тест не можа да бъде извършен, защото нито един от сървърите за тестване на връзката на Moonlight не е достъпен. Проверете връзката си с интернет или опитайте отново по-късно.</string>
<string name="nettest_text_failure">Текущата мрежова връзка на вашето устройство изглежда блокира Moonlight. Стриймването през интернет може да не работи, докато сте свързани към тази мрежа.
\n
\nСледните мрежови портове са блокирани:
\n</string>
<string name="nettest_text_blocked">Текущата мрежова връзка на вашето устройство блокира Moonlight. Стриймването през интернет може да не работи, докато сте свързани към тази мрежа.</string>
<string name="pair_pairing_msg">Моля, въведете следния ПИН на избрания компютър:</string>
<string name="pair_fail">Неуспешно сдвояване</string>
<string name="pair_already_in_progress">Сдвояването вече е в ход</string>
<string name="wol_pc_online">Компютърът е онлайн</string>
<string name="wol_no_mac">Компютърът не може да бъде събуден, защото GFE не изпрати MAC адрес</string>
<string name="wol_fail">Неуспешно изпращане на Wake-On-LAN пакети</string>
<string name="wol_waking_msg">Може да отнеме няколко секунди, докато вашият компютър се събуди. Ако не стане, уверете се, че е конфигуриран правилно за Wake-On-LAN.</string>
<string name="unpairing">Раздвояване…</string>
<string name="unpair_success">Раздвояването бе успешно</string>
<string name="video_decoder_init_failed">Видео декодерът не успя да се инициализира. Вашето устройство може да не поддържа избраната резолюция или честота.</string>
<string name="error_manager_not_running">Услугата ComputerManager не работи. Моля, изчакайте няколко секунди или рестартирайте приложението.</string>
<string name="error_404">GFE върна грешка HTTP 404. Уверете се, че вашият компютър има поддръжана видео карта. Използването на софтуер за отдалечен работен плот също може да причини тази грешка. Опитайте да рестартирате машината си или да преинсталирате GFE.</string>
<string name="message_decoding_error">Moonlight претърпя срив поради несъвместимост с видеодекодера на това устройство. Уверете се, че GeForce Experience е актуализиран до най-новата версия на вашия компютър. Опитайте да коригирате настройките за стриймване, ако сривовете продължат.</string>
<string name="title_decoding_reset">Нулиране на видео настройките</string>
<string name="message_decoding_reset">Видео декодерът на вашето устройство продължава да се срива при избраните от вас настройки за стриймване. Настройките са нулирани по подразбиране.</string>
<string name="audioconf_stereo">Стерео</string>
<string name="applist_refresh_msg">Приложенията се опресняват…</string>
<string name="error_usb_prohibited">USB достъпът е забранен от администратора на вашето устройство. Проверете настройките на Knox или MDM.</string>
<string name="audioconf_71surround">7.1 съраунд звук</string>
<string name="audioconf_51surround">5.1 съраунд звук</string>
<string name="videoformat_hevcauto">Автоматично</string>
<string name="videoformat_hevcalways">Винаги използване на HEVC (може да крашне)</string>
<string name="videoformat_hevcnever">Никога да не се използва HEVC</string>
<string name="summary_frame_pacing">Посочете как да се балансира забавянето и плавността на видеото</string>
<string name="title_frame_pacing">Стъпка на видео кадрите</string>
<string name="pacing_balanced">Балансирано</string>
<string name="check_ports_msg">Проверете вашата защитна стена и правилата за препращане на портове за порт(ове):</string>
<string name="conn_establishing_title">Установяване на връзка</string>
<string name="conn_establishing_msg">Стартиране на връзка</string>
<string name="conn_error_msg">Неуспешно стартиране</string>
<string name="conn_terminated_msg">Връзката беше прекратена</string>
<string name="conn_error_title">Грешка при свързване</string>
<string name="no">Не</string>
<string name="help">Помощ</string>
<string name="lost_connection">Загубена връзка с компютър</string>
<string name="title_details">Подробности</string>
<string name="delete_pc_msg">Сигурни ли сте, че искате да изтриете този компютър\?</string>
<string name="poor_connection_msg">Лоша връзка с компютъра</string>
<string name="perf_overlay_streamdetails">Видео поток: %1$s %2$.2f FPS</string>
<string name="perf_overlay_decoder">Декодер: %1$s</string>
<string name="perf_overlay_netdrops">Кадри, пропуснати от вашата мрежова връзка: %1$.2f%%</string>
<string name="perf_overlay_incomingfps">Входяща честота на кадрите от мрежата: %1$.2f FPS</string>
<string name="perf_overlay_netlatency">Средно забавяне на мрежата: %1$d ms (variance: %2$d ms)</string>
<string name="applist_connect_msg">Свързване с компютъра…</string>
<string name="perf_overlay_renderingfps">Кадрова честота на изобразяване: %1$.2f FPS</string>
<string name="perf_overlay_dectime">Средно време за декодиране: %1$.2f ms</string>
<string name="applist_menu_quit">Прекратяване на сесията</string>
<string name="msg_add_pc">Свързване към компютъра…</string>
<string name="applist_menu_resume">Възобновяване на сесията</string>
<string name="applist_menu_quit_and_start">Изключване на текущата игра и стартиране</string>
<string name="applist_menu_cancel">Отказ</string>
<string name="applist_menu_details">Виж детайлите</string>
<string name="applist_menu_scut">Създаване на пряк път</string>
<string name="applist_refresh_error_title">Грешка</string>
<string name="applist_menu_tv_channel">Добавяне към канал</string>
<string name="applist_refresh_error_msg">Неуспешно получаване на списък с приложения</string>
<string name="applist_quit_success">Успешно изключване</string>
<string name="applist_quit_app">Изключване</string>
<string name="applist_quit_fail">Неуспешно изключване</string>
<string name="applist_details_id">ID на приложението:</string>
<string name="applist_quit_confirmation">Сигурни ли сте, че искате да затворите работещото приложение\? Всички незапазени данни ще бъдат загубени.</string>
<string name="title_add_pc">Ръчно добавяне на компютър</string>
<string name="addpc_fail">Неуспешна връзка с посочения компютър. Уверете се, че необходимите портове са разрешени през защитната стена.</string>
<string name="category_basic_settings">Основни настройки</string>
<string name="addpc_success">Успешно добавен компютър</string>
<string name="addpc_enter_ip">Трябва да въведете IP адрес</string>
<string name="addpc_wrong_sitelocal">Този адрес не изглежда правилен. Трябва да използвате публичния IP адрес на вашия рутер за стриймване през интернет.</string>
<string name="title_resolution_list">Видео резолюция</string>
<string name="summary_fps_list">Увеличете за по-плавен видео поток. Намалете за по-добра производителност на устройства от по-нисък клас.</string>
<string name="title_seekbar_bitrate">Видео битрейт</string>
<string name="suffix_seekbar_bitrate_mbps">Mbps</string>
<string name="title_audio_config_list">Конфигурация на съраунд звук</string>
<string name="summary_audio_config_list">Активиране на 5.1 или 7.1 съраунд звук за системи за домашно кино</string>
<string name="summary_seekbar_bitrate">Увеличете за по-добро качество на изображението. Намалете, за да подобрите производителността при по-бавни връзки.</string>
<string name="resolution_prefix_native_portrait">(Портрет)</string>
<string name="title_checkbox_enable_audiofx">Активиране на поддръжката на системния еквалайзер</string>
<string name="title_checkbox_stretch_video">Разтегляне на видеото на цял екран</string>
<string name="resolution_prefix_native_landscape">(Пейзаж)</string>
<string name="category_audio_settings">Аудио настройки</string>
<string name="category_input_settings">Настройки за въвеждане</string>
<string name="title_checkbox_touchscreen_trackpad">Използване на сензорния екран като тракпад</string>
<string name="title_checkbox_multi_controller">Автоматично откриване на наличен контролер</string>
<string name="summary_checkbox_multi_controller">Премахването на отметката от тази опция принуждава контролер винаги да присъства</string>
</resources>
+250 -1
View File
@@ -1,2 +1,251 @@
<?xml version="1.0" encoding="utf-8"?>
<resources></resources>
<resources>
<string name="conn_establishing_title">Připojování</string>
<string name="conn_metered">Varování: Vaše aktivní připojení je měřené!</string>
<string name="conn_error_msg">Spouštění se nezdařilo</string>
<string name="conn_client_latency_hw">zpoždění hardwarového dekodéru:</string>
<string name="conn_terminated_title">Spojení ukončeno</string>
<string name="resolution_prefix_native_fullscreen">Nativní celá obrazovka</string>
<string name="summary_checkbox_enable_audiofx">Umožňuje fungování zvukových efektů během streamování, ale může zvýšit zpoždění zvuku</string>
<string name="early_termination_error">Na hostitelském PC se něco pokazilo při spouštění streamu.
\n
\nUjistěte se, že na hostitelském počítači neběží žádný obsah chráněný DRM. Můžete také zkusit restartovat hostitelský PC.
\n
\nPokud problém přetrvává, zkuste přeinstalovat ovladače GPU a GeForce Experience.</string>
<string name="wol_waking_pc">Probouzení PC…</string>
<string name="nettest_text_success">Vypadá to, že vaše síť Moonlight neblokuje. Pokud máte i tak potíže s připojením, zkontrolujte nastavení firewallu vašeho PC.
\n
\nPokud se pokoušíte streamovat po internetu, nainstalujte si na svůj počítač Moonlight Internet Hosting Tool a spusťte přiložený program Internet Streaming Tester pro kontrolu vašeho připojení k Internetu.</string>
<string name="error_unknown_host">Nezdařilo se zjistit hostitele</string>
<string name="nettest_text_waiting">Moonlight testuje vaše síťové připojení, aby zjistil, jestli je NVIDIA GameStream zablokován.
\n
\nTo může chvilku zabrat…</string>
<string name="nettest_title_waiting">Testování připojení k síti</string>
<string name="pairing">Párování…</string>
<string name="pair_pc_offline">Počítač je offline</string>
<string name="unpairing">Rušení párování…</string>
<string name="unpair_success">Párování úspěšně zrušeno</string>
<string name="unpair_error">Zařízení nebylo spárováno</string>
<string name="error_manager_not_running">Služba ComputerManager neběží. Vyčkejte prosím chvíli nebo restartujte aplikaci.</string>
<string name="error_pc_offline">Počítač je offline</string>
<string name="unpair_fail">Zrušení párování se nezdařilo</string>
<string name="error_404">GFE vrátilo HTTP chybu 404. Ujistěte se, že vaše PC má podporované GPU. Tato chyba může být způsobena i použitím softwaru pro vzdálenou plochu. Zkuste restartovat počítač, nebo přeinstalujte GFE.</string>
<string name="title_decoding_error">Dekodér videa spadnul</string>
<string name="error_usb_prohibited">Správce zařízení neumožňuje přístup k USB. Zkontrolujte nastavení Knoxu nebo MDM.</string>
<string name="message_decoding_error">Moonlight spadnul kvůli nekompatibilnímu video dekodéru na tomto zařízení. Ujistěte se, že je GeForce Experience na vašem PC aktualizováno na nejnovější verzi. Zkuste upravit nastavení streamování, pokud aplikace padá opakovaně.</string>
<string name="message_decoding_reset">Video dekodér vašeho zařízení při současných nastaveních streamování padá. Vaše nastavení streamování byla resetována na výchozí.</string>
<string name="video_decoder_init_failed">Nezdařilo se spustit video dekodér. Vaše zařízení nemusí podporovat zvolené rozlišení nebo snímkovou frekvenci.</string>
<string name="no_video_received_error">Od hostitele nebylo přijato žádné video.</string>
<string name="no_frame_received_error">Vaše připojení k síti není dost rychlé. Zkuste snížit datový tok videa nebo použijte rychlejší připojení.</string>
<string name="applist_menu_hide_app">Skrýt aplikaci</string>
<string name="title_add_pc">Přidat PC ručně</string>
<string name="title_audio_config_list">Konfigurace prostorového zvuku</string>
<string name="searching_pc">Hledání PC, na kterých běží GameStream...
\n
\nUjistěte se, že je GameStream povolen v záložce SHIELD v nastavení GeForce Experience.</string>
<string name="applist_menu_quit">Ukončit</string>
<string name="applist_menu_quit_and_start">Ukončit současnou hru a spustit</string>
<string name="applist_menu_cancel">Zrušit</string>
<string name="applist_menu_tv_channel">Přidat do kanálu</string>
<string name="applist_refresh_title">Seznam aplikací</string>
<string name="applist_menu_resume">Pokračovat</string>
<string name="applist_menu_details">Zobrazit detaily</string>
<string name="applist_menu_scut">Vytvořit zkratku</string>
<string name="addpc_success">Počítač přidán úspěšně</string>
<string name="applist_details_id">ID aplikace:</string>
<string name="addpc_fail">K zadanému počítači se nepodařilo připojit. Ujistěte se, že jsou ve firewallu povoleny nezbytné porty.</string>
<string name="addpc_enter_ip">Musíte zadat IP adresu</string>
<string name="title_native_res_dialog">Varování pro nativní rozlišení</string>
<string name="title_checkbox_vibrate_fallback">Emulovat podporu vibrací</string>
<string name="title_seekbar_deadzone">Upravit deadzone analogových páček</string>
<string name="check_ports_msg">Zkontrolujte svůj firewall a pravidla přesměrování pro tyto porty:</string>
<string name="conn_terminated_msg">Spojení bylo ukončeno</string>
<string name="ip_hint">IP adresa GeForce PC</string>
<string name="conn_hardware_latency">Průměrné zpoždění hardwarového dekodéru:</string>
<string name="conn_client_latency">Průměrné zpoždění při dekódování snímků:</string>
<string name="perf_overlay_netlatency">Průměrné zpoždění sítě: %1$d ms (odchylka: %2$d ms)</string>
<string name="perf_overlay_dectime">Průměrný čas pro dekódování: %1$.2f ms</string>
<string name="applist_connect_msg">Připojování k PC…</string>
<string name="title_checkbox_touchscreen_trackpad">Použít dotykový displej jako trackpad</string>
<string name="title_checkbox_multi_controller">Automatická detekce připojení herního ovladače</string>
<string name="summary_checkbox_multi_controller">Odškrtnutí této možnosti vynutí, aby byl herní ovladač vždy připojen</string>
<string name="summary_checkbox_xb1_driver">Povolí zabudovaný USB ovladač pro zařízení bez nativní podpory pro Xbox ovladač</string>
<string name="summary_checkbox_vibrate_fallback">Rozvibruje vaše zařízení pro emulaci vibrací ovladače, pokud je váš herní ovladač nepodporuje</string>
<string name="suffix_seekbar_deadzone">%</string>
<string name="summary_seekbar_deadzone">Poznámka: Některé hry mohou vynutit větší deadzone, než jaká je nastavena v Moonlightu.</string>
<string name="title_checkbox_xb1_driver">Xbox 360/One USB gamepad ovladač</string>
<string name="title_checkbox_usb_bind_all">Vynutit nativní podporu herního ovladače Xbox</string>
<string name="summary_checkbox_mouse_emulation">Dlouhým podržením tlačítka Start přepnete herní ovladač do režimu myši</string>
<string name="summary_checkbox_usb_bind_all">Použít USB ovladač Moonlightu pro všechny podporované gamepady, i když existuje nativní podpora pro Xbox ovladač</string>
<string name="title_checkbox_mouse_emulation">Emulace myši pomocí herního ovladače</string>
<string name="title_checkbox_flip_face_buttons">Přehodit tlačítka A/B, X/Y</string>
<string name="title_checkbox_absolute_mouse_mode">Režim myši pro vzdálenou plochu</string>
<string name="summary_checkbox_absolute_mouse_mode">Tímto zapnete přirozenější zrychlování myši pro použití ve vzdálené ploše, ale možnost je nekompatibilní se spoustou her.</string>
<string name="summary_osc_opacity">Zmenšete či zvětšete průhlednost ovladače na obrazovce</string>
<string name="summary_only_l3r3">Skryje veškerá virtuální tlačítka kromě L3 a R3</string>
<string name="category_ui_settings">Nastavení zobrazení</string>
<string name="suffix_osc_opacity">%</string>
<string name="title_setup_guide">Průvodce nastavením</string>
<string name="title_checkbox_disable_warnings">Zakázat varovací zprávy</string>
<string name="category_help">Nápověda</string>
<string name="summary_checkbox_disable_warnings">Zakáže varování o pomalém připojení během streamování</string>
<string name="title_disable_frame_drop">Nezahazovat snímky</string>
<string name="title_enable_perf_overlay">Zobrazit během streamování informace o výkonu</string>
<string name="summary_enable_perf_overlay">Zobrazit realtime informace o výkonu streamu během streamování</string>
<string name="resolution_4k">4K</string>
<string name="fps_30">30 FPS</string>
<string name="title_troubleshooting">Průvodce řešením problémů</string>
<string name="summary_troubleshooting">Zobrazit tipy pro diagnózu a opravu běžných problémů se streamováním</string>
<string name="resolution_720p">720p</string>
<string name="resolution_1080p">1080p</string>
<string name="resolution_1440p">1440p</string>
<string name="videoformat_hevcauto">Automaticky</string>
<string name="audioconf_71surround">7.1 prostorový zvuk</string>
<string name="pacing_balanced">Vyvážené</string>
<string name="pacing_smoothness">Preferovat plynulejší video (může výrazně zvýšit zpoždění)</string>
<string name="resolution_prefix_native_landscape">(na šířku)</string>
<string name="resolution_prefix_native_portrait">(na výšku)</string>
<string name="category_audio_settings">Nastavení zvuku</string>
<string name="title_checkbox_enable_audiofx">Povolit podporu systémového ekvalizéru</string>
<string name="category_input_settings">Nastavení vstupu</string>
<string name="summary_setup_guide">Zobrazit instrukce k nastavení vašeho herního PC pro streamování</string>
<string name="dialog_title_osc_opacity">Změnit průhlednost</string>
<string name="fps_60">60 FPS</string>
<string name="fps_90">90 FPS</string>
<string name="fps_120">120 FPS</string>
<string name="audioconf_stereo">Stereo</string>
<string name="audioconf_51surround">5.1 prostorový zvuk</string>
<string name="help_loading_msg">Načítání stránky s nápovědou…</string>
<string name="pcview_menu_header_online">Online</string>
<string name="pcview_menu_header_offline">Offline</string>
<string name="pcview_menu_header_unknown">Obnovování</string>
<string name="pcview_menu_app_list">Zobrazit všechny aplikace</string>
<string name="pcview_menu_pair_pc">Spárovat s PC</string>
<string name="pcview_menu_unpair_pc">Zrušit párování</string>
<string name="pcview_menu_send_wol">Poslat Wake-On-LAN požadavek</string>
<string name="pcview_menu_delete_pc">Smazat PC</string>
<string name="pcview_menu_test_network">Otestovat připojení k síti</string>
<string name="pcview_menu_details">Zobrazit detaily</string>
<string name="nettest_title_done">Test sítě dokončen</string>
<string name="nettest_text_inconclusive">Test sítě nemohl být proveden, protože se nezdařilo připoojení k žádným z testovacíh serverů Moonlight. Zkontrolujte své připojení k Internetu, nebo to zkuste znovu později.</string>
<string name="nettest_text_failure">Současná síť vašeho počítače nejspíš blokuje Moonlight. Streamování přes Internet nemusí během připojení k této síti fungovat.
\n
\nNásledující porty byly zablokovány:
\n</string>
<string name="nettest_text_blocked">Vaše současné připojení k síti blokuje Moonlight. Streamování přes Internet nemusí fungovat, dokud jste připojeni k této síti.</string>
<string name="pair_pc_ingame">Na počítači momentálně běží hra. Před párováním musíte hru zavřít.</string>
<string name="pair_pairing_title">Párování</string>
<string name="pair_pairing_msg">Vložte prosím následující PIN na cílovém PC:</string>
<string name="pair_incorrect_pin">Nesprávný PIN</string>
<string name="pair_fail">Párování selhalo</string>
<string name="pair_already_in_progress">Párování již probíhá</string>
<string name="wol_pc_online">Počítač je online</string>
<string name="wol_no_mac">Nezdařilo se probudit PC, protože GFE nezaslalo MAC adresu</string>
<string name="title_decoding_reset">Reset nastavení videa</string>
<string name="unable_to_pin_shortcut">Váš současný launcher neumožňuje vytváření zástupců.</string>
<string name="conn_establishing_msg">Připojování</string>
<string name="conn_starting">Spouštění</string>
<string name="conn_error_title">Chyba připojení</string>
<string name="frame_conversion_error">Hostitelský počítač hlásí fatální chybu enkódování videa.
\n
\nZkuste vypnout HDR, změňte rozlišení streamu nebo rozlišení displeje hostitelského PC.</string>
<string name="yes">Ano</string>
<string name="no">Ne</string>
<string name="lost_connection">Připojení k PC bylo ztraceno</string>
<string name="title_details">Detaily</string>
<string name="perf_overlay_renderingfps">Vykreslovací snímková frekvence: %1$.2f FPS</string>
<string name="perf_overlay_netdrops">Snímky zahozeny vašim připojením: %1$.2f%%</string>
<string name="applist_refresh_msg">Obnovování aplikací…</string>
<string name="applist_refresh_error_title">Chyba</string>
<string name="applist_refresh_error_msg">Nezdařilo se získat seznam aplikací</string>
<string name="applist_quit_app">Ukončování</string>
<string name="applist_quit_success">Úspěšně ukončeno</string>
<string name="applist_quit_fail">Ukončení se nezdařilo</string>
<string name="applist_quit_confirmation">Určitě chcete ukončit běžící aplikaci\? Neuložená data budou ztracena.</string>
<string name="msg_add_pc">Připojování k PC…</string>
<string name="addpc_unknown_host">Nezdařilo se připojit k adrese PC. Ujistěte se, že v adrese není překlep.</string>
<string name="addpc_wrong_sitelocal">Tahle adresa nevypadá správně. Musíte zadat veřejnou IP vašeho routeru, pokud chcete streamovat přes Internet.</string>
<string name="category_basic_settings">Základní nastavení</string>
<string name="title_resolution_list">Rozlišení videa</string>
<string name="summary_resolution_list">Zvyšte přo zlepšení ostrosti obrazu. Snižte pro lepší výkon na levnějších zařízeních nebo pomalejších sítích.</string>
<string name="summary_audio_config_list">Povolit 5.1 nebo 7.1 prostorový zvuk pro systémy domácího kina</string>
<string name="summary_checkbox_touchscreen_trackpad">Pokud je povoleno, dotykový displej funguje jako trackpad. Pokud je zakázáno, dotykový displej ovládá kurzor myši přímo.</string>
<string name="title_reset_osc">Vymazat uložené rozložení ovladače na obrazovce</string>
<string name="summary_reset_osc">Resetuje všechna nastavení ovladače na obrazovce na jejich výchozí velikost a pozici</string>
<string name="title_osc_opacity">Změnit průhlednost ovladače na obrazovce</string>
<string name="category_advanced_settings">Pokročilá nastavení</string>
<string name="title_unlock_fps">Odemknout všechny možné snímkové frekvence</string>
<string name="title_checkbox_reduce_refresh_rate">Povolit snížení obnovovací frekvence</string>
<string name="summary_checkbox_reduce_refresh_rate">Menší obnovovací frekvence displeje může šetřit energii výměnou za zvýšení zpoždění videa</string>
<string name="title_checkbox_mouse_nav_buttons">Povolit tlačítka myši zpět a vpřed</string>
<string name="summary_checkbox_mouse_nav_buttons">Povolení této možnosti může na některých pochybných zařízeních rozbít klikání pravým tlačítkem</string>
<string name="summary_checkbox_flip_face_buttons">Přehodí tlačítka A/B a X/Y na herním ovladači a instrukcích na obrazovce</string>
<string name="toast_reset_osc_success">Ovladač na obrazovce resetován</string>
<string name="dialog_title_reset_osc">Reset rozložení</string>
<string name="dialog_text_reset_osc">Jste si jisti, že chcete smazat vaše uložené rozložení ovladače\?</string>
<string name="title_checkbox_enable_pip">Povolit sledovací rezim obraz-v-obraze</string>
<string name="summary_checkbox_enable_sops">Povolit GFE měnit herní nastavení pro optimální streamování</string>
<string name="title_checkbox_host_audio">Přehrávat zvuk na PC</string>
<string name="summary_checkbox_host_audio">Přehraje zvuk z počítače a tohoto zařízení</string>
<string name="summary_unlock_fps">Streamování v 90 nebo 120 FPS může snížit zpoždění na dražších zařízeních, ale může způsobit zasekávání nebo nestabilitu na zařízeních, které je nepodporují</string>
<string name="title_enable_post_stream_toast">Zobrazit informace o zpoždění po streamování</string>
<string name="summary_enable_post_stream_toast">Zobrazit informace o zpoždění po skončení streamování</string>
<string name="title_privacy_policy">Zásady ochrany osobních údajů</string>
<string name="summary_privacy_policy">Zobrazit zásady ochrany osobních údajů Moonlightu</string>
<string name="resolution_360p">360p</string>
<string name="resolution_480p">480p</string>
<string name="pacing_balanced_alt">Vyvážené s limitem FPS</string>
<string name="scut_deleted_pc">PC smazán</string>
<string name="scut_not_paired">PC nespárován</string>
<string name="scut_pc_not_found">PC nenalezen</string>
<string name="scut_invalid_uuid">Zadaný počítač není platný</string>
<string name="scut_invalid_app_id">Zadaná aplikace není platná</string>
<string name="help_loading_title">Zobrazení nápovědy</string>
<string name="wol_waking_msg">Může trvat pár sekund, než se váš počítač probudí. Pokud se tak nestane, ujistěte se, že máte správně nastaveno Wake-On-LAN.</string>
<string name="wol_fail">Nezdařilo se odeslat Wake-On-LAN pakety</string>
<string name="help">Nápověda</string>
<string name="delete_pc_msg">Určitě chcete smazat tento PC\?</string>
<string name="slow_connection_msg">Pomalé připojení k PC
\nSnižte datový tok</string>
<string name="poor_connection_msg">Špatné připojení k PC</string>
<string name="perf_overlay_streamdetails">Video stream: %1$s %2$.2f FPS</string>
<string name="perf_overlay_decoder">Dekodér: %1$s</string>
<string name="perf_overlay_incomingfps">Příchozí snímková frekvence po síti: %1$.2f FPS</string>
<string name="text_native_res_dialog">GeForce Experience oficiálně nepodporuje nativní rozlišení a proto nenastaví rozlišení displeje vašeho hostitelského PC. Musíte jej nastavit ručně ve hře.
\n
\nPokud v NVIDIA Control Panelu vytvoříte vlastní rozlišení pro vaše zařízení, prosím ujistěte se, že jste si přečetli a že chápete varování od NVIDIE ohledně možného poškození monitoru, nestability PC a dalších možných problémů.
\n
\nNejsme zodpovědni za žádné problémy, které vzniknou používáním vlastního rozlišení na vašem PC.
\n
\nA nakonec, vaše zařízení nebo hostitelský počítač nemusí podporovat streamování v nativním rozlišení. Pokud vám to nefunguje, bohužel se s tím nedá nic dělat.</string>
<string name="title_fps_list">Snímková frekvence videa</string>
<string name="summary_fps_list">Zvyšte pro plynulejší video stream. Snižte pro lepší výkon na levnějších zařízeních.</string>
<string name="title_seekbar_bitrate">Datový tok videa</string>
<string name="summary_seekbar_bitrate">Zvyšte pro lepší kvalitu obrazu. Snižte pro zlepšení výkonu u pomalých připojení.</string>
<string name="suffix_seekbar_bitrate_mbps">Mbps</string>
<string name="title_checkbox_stretch_video">Natáhnout video na celou obrazovku</string>
<string name="resolution_prefix_native">Nativní</string>
<string name="category_on_screen_controls_settings">Nastavení ovládání na obrazovce</string>
<string name="title_checkbox_show_onscreen_controls">Zobrazovat ovládání na obrazovce</string>
<string name="summary_checkbox_show_onscreen_controls">Zobrazit překrytí virtuálního ovladače na dotykovém displeji</string>
<string name="title_checkbox_vibrate_osc">Povolit vibrace</string>
<string name="summary_checkbox_vibrate_osc">Vibruje vašim zařízením pro emulaci vibrací ovladače při použití ovladače na obrazovce</string>
<string name="title_only_l3r3">Zobrazit pouze L3 a R3</string>
<string name="summary_checkbox_enable_pip">Umožní, aby byl stream sledován (ale ne ovládá) během multitaskingu</string>
<string name="title_language_list">Jazyk</string>
<string name="summary_language_list">Jazyk, který bude Moonlight používat</string>
<string name="title_checkbox_small_icon_mode">Použít malý box art</string>
<string name="summary_checkbox_small_icon_mode">Díky menšímu box artu v seznamu aplikací uvidíte na obrazovce více aplikací naráz</string>
<string name="category_host_settings">Nastavení hostitele</string>
<string name="title_checkbox_enable_sops">Optimalizovat herní nastavení</string>
<string name="summary_disable_frame_drop">Může na některých zařízeních snížit mikrozádrhy, ale může zvýšit zpoždění</string>
<string name="title_video_format">Změnit nastavení HEVC</string>
<string name="summary_video_format">HEVC sníží datový přenos, ale vyžaduje novější zařízení</string>
<string name="title_enable_hdr">Povolit HDR (experimentální)</string>
<string name="summary_enable_hdr">Streamovat v HDR, pokud jej hra a GPU počítače podporují. HDR vyžaduje GPU GTX 1000 nebo novější.</string>
<string name="videoformat_hevcalways">Vždy použít HEVC (může padat)</string>
<string name="videoformat_hevcnever">Nikdy nepoužívat HEVC</string>
<string name="title_frame_pacing">Frame pacing videa</string>
<string name="summary_frame_pacing">Zvolte, jak vyvážit zpoždění videa a jeho plynulost</string>
<string name="pacing_latency">Preferovat nejnižší zpoždění</string>
</resources>
+3
View File
@@ -259,4 +259,7 @@
<string name="title_checkbox_reduce_refresh_rate">Aktualisierungsrate verringern erlauben</string>
<string name="summary_checkbox_reduce_refresh_rate">Durch das Verringern der Display Aktualisierungsrate, kann, auf Kosten der Video-Latenz, der Akkuverbrauch reduziert werden</string>
<string name="resolution_prefix_native_landscape">(Landscape)</string>
<string name="frame_conversion_error">Der Host-PC hat einen schwerwiegenden Videocodierungsfehler gemeldet.
\n
\nVersuchen Sie, den HDR-Modus zu deaktivieren, die Streaming-Auflösung zu ändern oder die Bildschirmauflösung des Host-PCs zu ändern.</string>
</resources>
+25 -16
View File
@@ -16,7 +16,7 @@
<string name="pair_fail">Fallo al emparejar</string>
<!-- WOL messages -->
<string name="wol_pc_online">Ordenador encendido</string>
<string name="wol_no_mac">Imposible iniciar PC porque GFE no ha enviado una dirección MAC</string>
<string name="wol_no_mac">No se puede activar el PC porque no hay ninguna dirección MAC almacenada</string>
<string name="wol_waking_pc">Iniciando PC…</string>
<string name="wol_waking_msg">Puede tomar algunos segundos iniciar tu PC.
Si no se inicia asegúrate que está configurado correctamente para Wake-On-LAN.
@@ -47,10 +47,10 @@
<string name="conn_terminated_title">Conexión finalizada</string>
<string name="conn_terminated_msg">La conexión ha finalizando</string>
<!-- General strings -->
<string name="ip_hint">Dirección IP del PC con GeForce</string>
<string name="searching_pc">Buscando por PCs con GameStream ejecutándose...
<string name="ip_hint">Dirección IP del host del ordenador</string>
<string name="searching_pc">Buscando el hostal del PC en tu red local...
\n
\nVerifica que GameStream esté activado en las opciones de SHIELD dentro de GeForce Experience.</string>
\n Asegúrate de que Sunshine se está ejecutando en el PC anfitrión o de que GameStream está activado en los ajustes de GeForce Experience SHIELD.</string>
<string name="yes">Si</string>
<string name="no">No</string>
<string name="lost_connection">Conexión perdida</string>
@@ -76,7 +76,7 @@
<string name="addpc_enter_ip">Debes introducir una dirección IP</string>
<!-- Preferences -->
<string name="category_basic_settings">Configuración básica</string>
<string name="title_resolution_list">Seleccionar resolución y FPS</string>
<string name="title_resolution_list">Seleccionar resolución</string>
<string name="summary_resolution_list">Establecer unos valores demasiado altos puede causar retraso o cierres inesperados.</string>
<string name="title_seekbar_bitrate">Seleccionar bitrate de vídeo</string>
<string name="summary_seekbar_bitrate">Usa bitrate bajo para reducir "parpadeo". Incrementa el bitrate para mayor calidad de imagen.</string>
@@ -109,8 +109,8 @@
<string name="title_video_format">Cambiar configuración HEVC</string>
<string name="summary_video_format">HEVC reduce el ancho de banda de vídeo, pero requiere un dispositivo reciente</string>
<!-- Array strings -->
<string name="videoformat_hevcauto">Usar HEVC sólo si es estable</string>
<string name="videoformat_hevcalways">Siempre usar HEVC (puede fallar)</string>
<string name="videoformat_hevcauto">Automático (Recomendado)</string>
<string name="videoformat_hevcalways">Preferir HEVC</string>
<string name="videoformat_hevcnever">Nunca usar HEVC</string>
<string name="nettest_title_done">Prueba de Red Completada</string>
<string name="scut_not_paired">PC no emparejado</string>
@@ -122,9 +122,9 @@
<string name="pcview_menu_test_network">Probar Conexión de Red</string>
<string name="pcview_menu_details">Ver Detalles</string>
<string name="nettest_title_waiting">Probando Conexión de Red</string>
<string name="nettest_text_waiting">Moonlight esta probando tu conexión de red para determinar si NVIDIA GameStream esta bloqueado.
<string name="nettest_text_waiting">Moonlight está probando tu conexión a la red para determinar si algún puerto necesario está bloqueado.
\n
\nEsto puede tomar algunos segundos </string>
\nEsto puede tardar unos segundos…</string>
<string name="nettest_text_inconclusive">La prueba de red no pudo ejecutarse debido a que no se pudo alcanzar ningún servidor de prueba de conexión de Moonlight. Revisa tu conexión a internet o prueba nuevamente mas tarde.</string>
<string name="nettest_text_failure">La actual conexión de red de tu dispositivo parece estar bloqueando Moonlight. La Transmisión mediante Internet puede no funcionar mientras estes conectado a esta red.
\n
@@ -165,7 +165,7 @@
<string name="resolution_1440p">1440p</string>
<string name="resolution_4k">4K</string>
<string name="suffix_osc_opacity">%</string>
<string name="title_checkbox_enable_pip">Actividad modo Pantalla-en-Pantalla para observador</string>
<string name="title_checkbox_enable_pip">Activar modo Pantalla-en-Pantalla para modo espectador</string>
<string name="resolution_720p">720p</string>
<string name="fps_120">120 FPS</string>
<string name="audioconf_71surround">7.1 Sonido Envolvente</string>
@@ -177,16 +177,14 @@
<string name="audioconf_stereo">Estéreo</string>
<string name="check_ports_msg">Revisa la configuración de tu firewall, así como, las reglas de redireccionamiento para él(los) puerto(s):</string>
<string name="error_usb_prohibited">El acceso a USB está restringido en tu dispositivo por el administrador. Revisar tus ajustes en MDM o Knox.</string>
<string name="message_decoding_error">Moonlight se ha cerrado debido a una incompatibilidad con el decodificador de vídeo de este dispositivo. Asegúrate de que GeForce Experience está actualizado a la última versión en tu PC. Intenta ajustar la configuración de streaming si los bloqueos continúan.</string>
<string name="message_decoding_error">Moonlight se ha bloqueado debido a una incompatibilidad con el descodificador de vídeo de este dispositivo. Intenta ajustar la configuración de streaming si los bloqueos continúan.</string>
<string name="message_decoding_reset">La decodificación de video de tu equipo sigue fallando con las opciones elegidas. Las opciones de la transmisión han sido revertidas a las predeterminadas.</string>
<string name="video_decoder_init_failed">El descodificador de video no pudo ser iniciado. Tu dispositivo puede no soportar la resolución elegida o la tasa de cuadros por segundo.</string>
<string name="no_frame_received_error">La conexión de internet no está teniendo un buen desempeño. Reduce la tasa de bits de video o prueba en una conexión de mayor velocidad.</string>
<string name="unable_to_pin_shortcut">Tu lanzador predeterminado no permite la creación de accesos directos anclados.</string>
<string name="early_termination_error">Algo ha salido mal en el PC anfitrión cuando se inicio la transmisión.
<string name="early_termination_error">Algo ha fallado en tu ordenador al iniciar la transmisión.
\n
\nVerifica que no tengas ningún contenido protegido por DRM abierto en el equipo. También prueba reiniciando el equipo anfitrión.
\n
\nSi el problema persiste, intenta reinstalar los controladores de la tarjeta de video (GPU) además de GeForce Experience.</string>
\nAsegúrate de que no tienes ningún contenido protegido por DRM abierto en tu ordenador. También puedes probar a reiniciar el ordenador.</string>
<string name="title_details">Detalles</string>
<string name="poor_connection_msg">Conexión pobre al PC</string>
<string name="applist_menu_details">Ver Detalles</string>
@@ -244,7 +242,7 @@
<string name="title_disable_frame_drop">Nunca disminuir cuadros</string>
<string name="summary_disable_frame_drop">Puede reducir micro-tartamudeos (Stuttering) en algunos dispositivos , pero puede incrementar latencia</string>
<string name="title_enable_hdr">Activar HDR (Alto Rango Dinámico / Experimental)</string>
<string name="summary_enable_hdr">Transmitir HDR (Alto Rango Dinámico) cuando el juego, el PC y la Tarjeta de Video (GPU) lo soporten. HDR requiere de una Tarjeta de Video de la serie GTX 1000 o superior.</string>
<string name="summary_enable_hdr">Transmite en HDR cuando el juego y la GPU del PC lo admitan. HDR requiere una GPU compatible con la codificación HEVC Main 10.</string>
<string name="summary_enable_perf_overlay">Mostrar en tiempo real la información del desempeño de la transmisión mientras está activa la misma</string>
<string name="title_enable_post_stream_toast">Mostrar mensajes sobre latencia mientras se transmite</string>
<string name="category_help">Ayuda</string>
@@ -256,4 +254,15 @@
<string name="fps_60">60 FPS</string>
<string name="fps_90">90 FPS</string>
<string name="title_frame_pacing">Ritmo de cuadros por segundo en video</string>
<string name="resolution_prefix_native_portrait">(Retrato)</string>
<string name="frame_conversion_error">El PC anfitrión ha reportado un error fatal en el codificador de video.
\n
\nIntenta deshabilitar el modo HDR, cambiar la resolución de la transmisión, o cambiar la resolución de pantalla del PC anfitrión.</string>
<string name="resolution_prefix_native_landscape">(Panorama)</string>
<string name="summary_checkbox_reduce_refresh_rate">Tasa de refresco menores pueden ahorrar energía a cambio de una mayor latencia de video</string>
<string name="title_checkbox_reduce_refresh_rate">Permitir reducción de la tasa de refresco</string>
<string name="title_full_range">Forzar video de rango completo (Experimental)</string>
<string name="summary_full_range">Esto provocará la pérdida de detalles en las áreas claras y oscuras si su dispositivo no muestra correctamente el contenido de video de rango completo.</string>
<string name="pair_pairing_help">Si el hostal del ordenador ejecuta Sunshine, navegue a la interfaz de usuario web de Sunshine para ingresar el PIN.</string>
<string name="pcview_menu_eol">Fin de servicio de NVIDIA GameStream</string>
</resources>
+14 -3
View File
@@ -137,7 +137,7 @@
<string name="category_input_settings">Paramètres d\'entrée</string>
<string name="title_checkbox_touchscreen_trackpad">Utilisez l\'écran tactile comme trackpad</string>
<string name="summary_checkbox_touchscreen_trackpad">S\'il est activé, l\'écran tactile agit comme un trackpad. S\'il est désactivé, l\'écran tactile contrôle directement le curseur de la souris.</string>
<string name="title_checkbox_multi_controller">Prise en charge de plusieurs contrôleurs</string>
<string name="title_checkbox_multi_controller">Forcer la présence d\'un contrôleur</string>
<string name="summary_checkbox_multi_controller">Lorsqu\'elle n\'est pas cochée, tous les contrôleurs sont regroupés</string>
<string name="title_checkbox_vibrate_fallback">Emuler support vibration de secours</string>
<string name="summary_checkbox_vibrate_fallback">Emuler des tremblements si votre manette ne le prend pas en charge</string>
@@ -228,8 +228,8 @@
<string name="audioconf_stereo">Stéréo</string>
<string name="audioconf_51surround">Son surround 5.1</string>
<string name="audioconf_71surround">Son surround 7.1</string>
<string name="videoformat_hevcauto">Automatique</string>
<string name="videoformat_hevcalways">Utilisez toujours HEVC (mais il peut planter)</string>
<string name="videoformat_hevcauto">Automatique (recommandé)</string>
<string name="videoformat_hevcalways">Préférez le HEVC</string>
<string name="videoformat_hevcnever">N\'utilisez jamais HEVC</string>
<string name="title_frame_pacing">Frame-pacing vidéo</string>
<string name="summary_frame_pacing">Spécifiez comment équilibrer latence et fluidité de la vidéo</string>
@@ -253,4 +253,15 @@
<string name="title_checkbox_absolute_mouse_mode">Mode souris pour bureau à distance</string>
<string name="summary_seekbar_deadzone">Remarque : Certains jeux peuvent imposer une zone morte plus grande que celle que Moonlight est configuré pour utiliser.</string>
<string name="summary_checkbox_absolute_mouse_mode">Cela peut rendre l\'accélération de la souris plus naturelle pour l\'utilisation du bureau à distance, mais elle est incompatible avec de nombreux jeux.</string>
<string name="resolution_prefix_native_landscape">(Paysage)</string>
<string name="resolution_prefix_native_portrait">(Portrait)</string>
<string name="title_checkbox_reduce_refresh_rate">Autoriser la réduction du taux de rafraîchissement</string>
<string name="summary_checkbox_reduce_refresh_rate">Des taux de rafraîchissement d\'affichage plus bas peuvent économiser de l\'énergie au détriment d\'une latence vidéo plus importante</string>
<string name="summary_checkbox_enable_audiofx">Permet aux effets audio de fonctionner lors du streaming, mais peut augmenter la latence</string>
<string name="title_checkbox_enable_audiofx">Activer le support de l\'égalisateur système</string>
<string name="frame_conversion_error">Le PC hôte a signalé une erreur d\'encodage fatale.
\n
\nEssayez de désactiver le mode HDR, de changer la résolution du flux ou la résolution de votre PC hôte.</string>
<string name="title_full_range">Forcer la vidéo sur toute la gamme de couleurs (expérimental)</string>
<string name="summary_full_range">Ceci entraînera une perte de détails dans les zones claires et sombres si votre appareil n\'affiche pas correctement le contenu vidéo de la gamme complète de couleurs.</string>
</resources>
+13 -2
View File
@@ -208,8 +208,8 @@
<string name="audioconf_stereo">Stereo</string>
<string name="audioconf_51surround">Surround 5.1</string>
<string name="audioconf_71surround">Surround 7.1</string>
<string name="videoformat_hevcauto">Automatico</string>
<string name="videoformat_hevcalways">Usa sempre HEVC (potrebbe essere instabile)</string>
<string name="videoformat_hevcauto">Automatico (Consigliato)</string>
<string name="videoformat_hevcalways">Preferisci HEVC</string>
<string name="videoformat_hevcnever">Non usare mai HEVC</string>
<string name="title_frame_pacing">Bilanciamento frame video</string>
<string name="summary_frame_pacing">Specifica come bilanciare il ritardo video e la fluidità</string>
@@ -254,4 +254,15 @@
<string name="title_privacy_policy">Informativa sulla privacy</string>
<string name="summary_troubleshooting">Visualizza i suggerimenti per la diagnosi e la risoluzione dei problemi di streaming più comuni</string>
<string name="summary_privacy_policy">Visualizza l\'informativa sulla privacy di Moonlight</string>
<string name="frame_conversion_error">Il PC host ha segnalato un errore fatale di codifica video.
\n
\nProva a disabilitare la modalità HDR, modificare la risoluzione dello streaming o la risoluzione del display del tuo PC host.</string>
<string name="summary_checkbox_reduce_refresh_rate">Una minore frequenza di aggiornamento del display può risparmiare energia a scapito di una latenza video aggiuntiva</string>
<string name="resolution_prefix_native_landscape">(Panorama)</string>
<string name="resolution_prefix_native_portrait">(Ritratto)</string>
<string name="title_checkbox_enable_audiofx">Abilita il supporto per l\'equalizzatore di sistema</string>
<string name="summary_checkbox_enable_audiofx">Consente agli effetti audio di funzionare durante lo streaming, ma può aumentare la latenza audio</string>
<string name="title_checkbox_reduce_refresh_rate">Consenti riduzione della frequenza di aggiornamento</string>
<string name="summary_full_range">Ciò causerà la perdita di dettagli in aree chiare e scure se il dispositivo non visualizza correttamente i contenuti video a gamma completa.</string>
<string name="title_full_range">Forza video full range (sperimentale)</string>
</resources>
+12 -3
View File
@@ -191,7 +191,7 @@
<string name="title_enable_perf_overlay">스트리밍 중 성능 정보 표시</string>
<string name="summary_enable_perf_overlay">스트리밍하는 동안 실시간 스트림 성능 정보 표시</string>
<string name="summary_enable_hdr">게임 및 PC의 GPU가 HDR을 지원하는 경우 HDR을 활성화합니다. HDR에는 GTX 1000 시리즈 또는 그 이상의 GPU가 필요합니다.</string>
<string name="title_enable_hdr">HDR활성화 (실험중인 기능)</string>
<string name="title_enable_hdr">HDR활성화 (실험)</string>
<string name="summary_disable_frame_drop">일부 장치에서 미세한 끊김 현상을 줄일 수 있지만 지연 시간이 늘어날 수 있습니다.</string>
<string name="title_disable_frame_drop">프레임드랍 최적화</string>
<string name="summary_unlock_fps">90 또는 120FPS로 스트리밍하면 지연 시간이 줄어들 수 있지만 이를 지원할 수 없는 장치에서는 지연 또는 불안정 할 수 있습니다</string>
@@ -221,8 +221,8 @@
<string name="unable_to_pin_shortcut">현재 런처에서는 바로가기 생성이 불가능합니다.</string>
<string name="resolution_prefix_native_fullscreen">네이티브 (전체화면)</string>
<!-- Array strings -->
<string name="videoformat_hevcauto">자동</string>
<string name="videoformat_hevcalways">항상 HEVC 사용(깨질 가능성 있음)</string>
<string name="videoformat_hevcauto">자동 (권장)</string>
<string name="videoformat_hevcalways">HEVC 선호</string>
<string name="videoformat_hevcnever">HEVC 사용하지 않기</string>
<string name="summary_seekbar_deadzone">참고: 일부 게임은 이 설정값보다 더 큰 데드존이 적용되있을 수 있습니다.</string>
<string name="resolution_1080p">1080p</string>
@@ -255,4 +255,13 @@
<string name="title_frame_pacing">비디오 프레임 처리방식</string>
<string name="pacing_smoothness">가장 부드러운 비디오 선호(대기 시간이 크게 증가할 수 있음)</string>
<string name="category_help">도움말</string>
<string name="resolution_prefix_native_landscape">(가로)</string>
<string name="resolution_prefix_native_portrait">(세로)</string>
<string name="title_checkbox_reduce_refresh_rate">주사율 감소 허용</string>
<string name="summary_checkbox_reduce_refresh_rate">화면 주사율을 낮춰서 영상 지연 시간이 증가하고 전력을 절약할 수 있습니다.</string>
<string name="frame_conversion_error">호스트 PC에서 치명적인 비디오 인코딩 오류를 보고했습니다.
\n
\nHDR 모드를 비활성화하거나 스트리밍 해상도를 변경하거나 호스트 PC의 디스플레이 해상도를 변경해 보십시오.</string>
<string name="summary_full_range">밝기범위를 \"전체(0~255)\"로 설정합니다. 장치의 디스플레이가 \"제한(16~235)\" 범위로 출력하는 경우 밝기가 제대로 표현되지 않습니다.</string>
<string name="title_full_range">전체 범위 비디오 활성화 (실험용)</string>
</resources>
+7
View File
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="scut_deleted_pc">PC usunięty</string>
<string name="scut_pc_not_found">PC nie znaleziony</string>
<string name="pcview_menu_header_unknown">Odświeżanie</string>
<string name="scut_not_paired">PC niesparowany</string>
</resources>
+7 -2
View File
@@ -53,8 +53,8 @@
<string name="resolution_4k">4K</string>
<string name="fps_30">30 FPS</string>
<string name="fps_60">60 FPS</string>
<string name="videoformat_hevcalways">Sempre usar HEVC (talvez crashe)</string>
<string name="videoformat_hevcauto">Automático</string>
<string name="videoformat_hevcalways">Prefira HEVC</string>
<string name="videoformat_hevcauto">Automático (recomendado)</string>
<string name="fps_120">120 FPS</string>
<string name="audioconf_stereo">Stereo</string>
<string name="audioconf_51surround">5.1 Surround</string>
@@ -245,4 +245,9 @@
<string name="resolution_prefix_native_portrait">(Retrato)</string>
<string name="title_checkbox_enable_audiofx">Habilitar sistema de suporte à equalização</string>
<string name="summary_checkbox_enable_audiofx">Permitir que efeitos de audio funcionem durante o streaming, pode acrescentar latência de audio</string>
<string name="title_full_range">Forçar vídeo de gama completa de cores (Experimental)</string>
<string name="frame_conversion_error">O PC host relatou um erro fatal de codificação de vídeo.
\n
\nTente desativar o modo HDR, alterar a resolução de streaming ou alterar a resolução do PC host.</string>
<string name="summary_full_range">Isso causará perda de detalhes em áreas claras e escuras se o seu dispositivo não exibir corretamente todo o conteúdo de vídeo em cores.</string>
</resources>
+227
View File
@@ -23,4 +23,231 @@
<string name="nettest_text_waiting">Moonlight está testando sua conexão com a rede para determinar se o NVIDIA GameStream está bloqueado.
\n
\nEste processo pode demorar alguns segundos…</string>
<string name="pacing_balanced">Balanceado</string>
<string name="nettest_text_success">A sua rede não parece estar a bloquear o Moonlight. Se ainda tiver problemas a se conectar, verifique as configurações de firewall do seu PC.
\n
\nSe estiver a tentar transmitir pela Internet, instale o Moonlight Internet Hosting Tool no seu PC e execute o Internet Streaming Tester para verificar a conexão com a Internet do seu PC.</string>
<string name="nettest_text_failure">A conexão de rede atual do seu aparelho parece estar a bloquear o Moonlight. A transmissão pela Internet pode não funcionar enquanto estiver conectado a esta rede.
\n
\nAs seguintes portas de rede estão bloqueadas:
\n</string>
<string name="nettest_text_blocked">A conexão de rede atual do seu aparelho está a bloquear o Moonlight. A transmissão pela Internet pode não funcionar enquanto estiver conectado a esta rede.</string>
<string name="wol_waking_msg">Pode levar alguns segundos até o seu PC acordar. Se isso não acontecer, verifique se ele está configurado corretamente para Wake-On-LAN.</string>
<string name="wol_fail">Falha ao enviar pacotes Wake-On-LAN</string>
<string name="unpair_success">Despareado com sucesso</string>
<string name="unpair_fail">Falha ao desparear</string>
<string name="title_decoding_error">Decodificador de Vídeo Crashou</string>
<string name="title_decoding_reset">Resetar Configurações de Vídeo</string>
<string name="message_decoding_error">Moonlight crashou devido a uma incompatibilidade com o decodificador de vídeo deste aparelho. Certifique-se de que o GeForce Experience esteja atualizado à versão mais recente no seu PC. Tente ajustar as configurações de transmissão se as falhas continuarem.</string>
<string name="unable_to_pin_shortcut">O seu launcher atual não permite a criação de atalhos fixados.</string>
<string name="video_decoder_init_failed">Falha ao iniciar o decodificador de vídeo. O seu aparelho pode não suportar a resolução ou taxa de quadros selecionada.</string>
<string name="frame_conversion_error">O PC host relatou um erro fatal de codificação de vídeo.
\n
\nTente desativar o modo HDR, alterar a resolução de streaming ou alterar a resolução do PC host.</string>
<string name="early_termination_error">Algo deu errado no seu PC ao iniciar a transmissão.
\n
\nCertifique-se de não ter nenhum conteúdo protegido por DRM aberto no seu PC. Também pode tentar reiniciar ele.
\n
\nSe o problema persistir, tente reinstalar os drivers da GPU e o GeForce Experience.</string>
<string name="conn_metered">Aviso: A sua conexão de rede atual é limitada!</string>
<string name="conn_client_latency">Latência média de decodificação de quadros:</string>
<string name="conn_client_latency_hw">latência do decodificador de hardware:</string>
<string name="conn_error_msg">Falha ao iniciar</string>
<string name="conn_terminated_title">Conexão Encerrada</string>
<string name="conn_terminated_msg">A conexão foi encerrada</string>
<string name="ip_hint">Endereço de IP do PC GeForce</string>
<string name="searching_pc">Procurando por PCs a executar o GameStream...
\n
\nCertifique-se de que o GameStream esteja ativado nas configurações do SHIELD do GeForce Experience.</string>
<string name="perf_overlay_renderingfps">Taxa de quadros renderizando: %1$.2f FPS</string>
<string name="perf_overlay_netdrops">Quadros dropados pela rede: %1$.2f%%</string>
<string name="perf_overlay_netlatency">Latência média da rede: %1$d ms (variação: %2$d ms)</string>
<string name="applist_menu_scut">Criar Atalho</string>
<string name="applist_refresh_msg">A recarregar apps…</string>
<string name="applist_refresh_error_msg">Falha ao obter a lista de apps</string>
<string name="applist_quit_app">Saindo</string>
<string name="applist_quit_success">Saiu com sucesso</string>
<string name="applist_quit_fail">Falha ao sair</string>
<string name="text_native_res_dialog">Os modos de resolução nativa não são oficialmente suportados pelo GeForce Experience, portanto, ele não definirá a resolução da ecrã do host. Precisará configurá-lo manualmente durante o jogo.
\n
\nSe optar por criar uma resolução personalizada no Painel de controle da NVIDIA para corresponder à resolução do seu aparelho, certifique-se de ter lido e entendido o aviso da NVIDIA sobre possíveis danos ao monitor, instabilidade do PC e outros problemas potenciais.
\n
\nNão nos responsabilizamos por quaisquer problemas resultantes da criação de uma resolução personalizada no seu PC.
\n
\nPor fim, o seu aparelho ou PC host pode não suportar transmissões na resolução nativa. Se não funcionar no seu aparelho, está sem sorte, infelizmente.</string>
<string name="suffix_seekbar_bitrate_mbps">Mbps</string>
<string name="resolution_prefix_native_landscape">(Paisagem)</string>
<string name="resolution_prefix_native_portrait">(Retrato)</string>
<string name="title_audio_config_list">Configurações de som Surround</string>
<string name="title_checkbox_enable_audiofx">Ativar sistema de suporte à equalização</string>
<string name="title_checkbox_multi_controller">Detecção automática de gamepad</string>
<string name="summary_checkbox_vibrate_fallback">Vibra o seu aparelho para emular rumble se o seu gamepad não suportar</string>
<string name="title_seekbar_deadzone">Ajustar zona morta do analógico</string>
<string name="summary_checkbox_enable_audiofx">Permitir que efeitos de audio funcionem durante o streaming, pode acrescentar latência de audio</string>
<string name="summary_checkbox_xb1_driver">Ativa um driver USB integrado para aparelhos sem suporte nativo aos controles Xbox</string>
<string name="title_checkbox_usb_bind_all">Substituir o suporte nativo ao gamepad do Xbox</string>
<string name="summary_checkbox_usb_bind_all">Use o driver USB do Moonlight para todos os gamepads suportados, mesmo se houver suporte nativo ao controle Xbox</string>
<string name="title_checkbox_mouse_emulation">Emulação de rato pelo gamepad</string>
<string name="summary_checkbox_mouse_emulation">Segure o botão Start para mudar o gamepad ao modo de rato</string>
<string name="summary_checkbox_flip_face_buttons">Inverte os botões A/B e X/Y dos gamepads e controles de ecrã</string>
<string name="title_checkbox_absolute_mouse_mode">Modo de rato para área de trabalho remota</string>
<string name="summary_checkbox_absolute_mouse_mode">Isso pode alterar a aceleração do rato para se comportar mais naturalmente para uso em desktop remoto, mas é incompatível com muitos jogos.</string>
<string name="category_on_screen_controls_settings">Configurações de Controles de Ecrã</string>
<string name="title_checkbox_show_onscreen_controls">Mostrar controles no ecrã</string>
<string name="summary_checkbox_show_onscreen_controls">Ativa o controle virtual no ecrã de toque</string>
<string name="summary_only_l3r3">Esconde todos os botões virtuais exceto o L3 e R3</string>
<string name="dialog_title_reset_osc">Resetar Layout</string>
<string name="toast_reset_osc_success">Controles de ecrã redefinidos para o padrão</string>
<string name="title_osc_opacity">Mudar a opacidade dos controles de ecrã</string>
<string name="dialog_title_osc_opacity">Mudar opacidade</string>
<string name="suffix_osc_opacity">%</string>
<string name="category_ui_settings">Configurações de Interface</string>
<string name="title_checkbox_enable_pip">Ativar modo Picture-in-Picture</string>
<string name="summary_checkbox_enable_pip">Permite que a transmissão seja visualizada (mas não controlada) enquanto usa outros apps</string>
<string name="summary_checkbox_small_icon_mode">Diminui o tamanho dos ícones permitindo que mais apps sejam visíveis no ecrã</string>
<string name="summary_checkbox_host_audio">Reproduz o áudio do computador e deste aparelho</string>
<string name="category_advanced_settings">Configurações Avançadas</string>
<string name="title_unlock_fps">Liberar todas as taxas de quadros possíveis</string>
<string name="summary_unlock_fps">Transmitir a 90 ou 120 FPS pode reduzir a latência em aparelhos de última geração, mas pode causar atraso ou instabilidade em aparelhos que não suportam</string>
<string name="title_checkbox_reduce_refresh_rate">Permitir redução de taxa de atualização</string>
<string name="summary_checkbox_reduce_refresh_rate">Taxas menores de atualização do display podem gravar energia ao custo de latência de video adicional</string>
<string name="summary_checkbox_disable_warnings">Desativa as mensagens de aviso de conexão no ecrã durante a transmissão</string>
<string name="summary_disable_frame_drop">Talvez reduza o micro-stuttering em alguns aparelhos, mas pode aumentar a latência</string>
<string name="summary_video_format">HEVC reduz os requisitos de largura de banda de vídeo, mas requer um aparelho mais atual</string>
<string name="title_enable_hdr">Ativar HDR (Experimental)</string>
<string name="summary_full_range">Isso causará perda de detalhes em áreas claras e escuras se o seu aparelho não exibir corretamente todo o conteúdo de vídeo em cores.</string>
<string name="title_disable_frame_drop">Nunca dropar quadros</string>
<string name="summary_enable_perf_overlay">Exibe informações de performance em tempo real durante a transmissão</string>
<string name="title_enable_post_stream_toast">Mostrar aviso de latência após terminar a transmissão</string>
<string name="title_troubleshooting">Guia de solução de problemas</string>
<string name="summary_troubleshooting">Veja dicas para diagnosticar e corrigir problemas comuns de streaming</string>
<string name="resolution_360p">360p</string>
<string name="resolution_1080p">1080p</string>
<string name="fps_60">60 FPS</string>
<string name="fps_90">90 FPS</string>
<string name="fps_120">120 FPS</string>
<string name="audioconf_stereo">Stereo</string>
<string name="audioconf_51surround">5.1 Surround</string>
<string name="videoformat_hevcauto">Automático (recomendado)</string>
<string name="videoformat_hevcnever">Nunca usar HEVC</string>
<string name="title_frame_pacing">Ritmo de quadros</string>
<string name="pacing_smoothness">Preferir vídeo mais suave (pode aumentar significativamente a latência)</string>
<string name="summary_seekbar_deadzone">Nota: Alguns jogos podem impor uma zona morta maior do que o Moonlight está configurado para usar.</string>
<string name="dialog_text_reset_osc">Tem certeza de que deseja apagar o layout salvo dos controles de ecrã\?</string>
<string name="category_host_settings">Configurações de Host</string>
<string name="pacing_balanced_alt">Equilibrado com limite de FPS</string>
<string name="audioconf_71surround">7.1 Surround</string>
<string name="videoformat_hevcalways">Prefira HEVC</string>
<string name="error_404">GFE retornou um erro HTTP 404. Verifique se o seu PC tem uma GPU compatível. O uso do software de área de trabalho remota também pode causar esse erro. Tente reiniciar o seu computador ou reinstalar o GFE.</string>
<string name="message_decoding_reset">O decodificador de vídeo do seu aparelho continua crashando nas configurações de transmissão selecionadas. As suas configurações de transmissão foram redefinidas para o padrão.</string>
<string name="error_usb_prohibited">O acesso USB é proibido pelo administrador do seu aparelho. Verifique as suas configurações de Knox ou MDM.</string>
<string name="no_video_received_error">Nenhum vídeo recebido do host.</string>
<string name="no_frame_received_error">A sua conexão de rede não está funcionando bem. Reduza a configuração da taxa de bits do vídeo ou tente uma conexão mais rápida.</string>
<string name="check_ports_msg">Verifique o firewall e permita a(s) seguinte(s) para porta(s):</string>
<string name="conn_hardware_latency">Latência média de decodificação de hardware:</string>
<string name="conn_starting">Iniciando</string>
<string name="conn_error_title">Erro de Conexão</string>
<string name="yes">Sim</string>
<string name="no">Não</string>
<string name="lost_connection">Conexão perdida com o PC</string>
<string name="title_details">Detalhes</string>
<string name="help">Ajuda</string>
<string name="delete_pc_msg">Tem certeza de que deseja apagar este PC\?</string>
<string name="poor_connection_msg">Conexão ruim com o PC</string>
<string name="slow_connection_msg">Conexão lenta com o PC
\nReduza sua taxa de bits</string>
<string name="perf_overlay_streamdetails">Transmissão: %1$s %2$.2f FPS</string>
<string name="perf_overlay_decoder">Decodificador: %1$s</string>
<string name="perf_overlay_incomingfps">Taxa de quadros recebidos pela rede:: %1$.2f FPS</string>
<string name="perf_overlay_dectime">Tempo médio de decodificação: %1$.2f ms</string>
<string name="applist_connect_msg">Conectando ao PC…</string>
<string name="applist_menu_resume">Retomar Sessão</string>
<string name="applist_menu_quit">Sair da Sessão</string>
<string name="applist_menu_quit_and_start">Sair do Jogo Atual e Iniciar</string>
<string name="applist_menu_cancel">Cancelar</string>
<string name="applist_menu_details">Ver Detalhes</string>
<string name="applist_menu_tv_channel">Adicionar ao Canal</string>
<string name="applist_menu_hide_app">Esconder app</string>
<string name="applist_refresh_title">Lista de apps</string>
<string name="applist_refresh_error_title">Erro</string>
<string name="applist_quit_confirmation">Tem certeza de que deseja sair da app em execução\? Todos os dados não salvos serão perdidos.</string>
<string name="applist_details_id">ID do App:</string>
<string name="title_add_pc">Adicionar PC Manualmente</string>
<string name="msg_add_pc">Conectando ao PC…</string>
<string name="addpc_success">Computador adicionado com sucesso</string>
<string name="addpc_unknown_host">Não foi possível encontrar o PC. Certifique-se de que não cometeu um erro de digitação no endereço.</string>
<string name="addpc_enter_ip">Deve inserir um endereço de IP</string>
<string name="addpc_wrong_sitelocal">Esse endereço não parece certo. Deve usar o endereço de IP público do seu roteador para transmitir pela Internet.</string>
<string name="category_basic_settings">Configurações Básicas</string>
<string name="title_resolution_list">Resolução</string>
<string name="summary_resolution_list">Aumente para melhorar a clareza da imagem. Diminua para melhor desempenho em aparelhos de baixo custo e redes mais lentas.</string>
<string name="title_native_res_dialog">Alerta de Resolução Nativa</string>
<string name="title_fps_list">Taxa de quadros por segundo</string>
<string name="title_seekbar_bitrate">Taxa de bits</string>
<string name="summary_seekbar_bitrate">Aumente para uma melhor qualidade de imagem. Diminua para melhorar o desempenho em conexões mais lentas.</string>
<string name="title_checkbox_stretch_video">Esticar vídeo ao ecrã cheio</string>
<string name="resolution_prefix_native">Nativa</string>
<string name="resolution_prefix_native_fullscreen">Ecrã Cheio Nativo</string>
<string name="category_audio_settings">Configurações de Áudio</string>
<string name="summary_audio_config_list">Ativa o som Surround 5.1 ou 7.1 para sistemas de home theater</string>
<string name="category_input_settings">Configurações de Controles</string>
<string name="title_checkbox_touchscreen_trackpad">Usar o ecrã como um trackpad</string>
<string name="summary_checkbox_touchscreen_trackpad">Se ativado, o ecrã sensível ao toque funciona como um trackpad. Se desativado, o ecrã controla diretamente o cursor do rato.</string>
<string name="summary_checkbox_multi_controller">Desmarque esta opção para forçar o gamepad a estar sempre presente</string>
<string name="title_checkbox_vibrate_fallback">Emular suporte rumble com vibração</string>
<string name="title_checkbox_vibrate_osc">Ativar vibração</string>
<string name="summary_checkbox_vibrate_osc">Vibra o seu aparelho para emular rumble nos controles de ecrã</string>
<string name="title_only_l3r3">Mostrar somente L3 e R3</string>
<string name="title_reset_osc">Limpar o layout salvo dos controles de ecrã</string>
<string name="summary_reset_osc">Redefine todos os controles no ecrã para tamanho e posição padrão dele</string>
<string name="summary_osc_opacity">Deixe os controles de ecrã mais/menos transparentes</string>
<string name="title_language_list">Idioma</string>
<string name="summary_language_list">Idioma para ser usado no Moonlight</string>
<string name="title_checkbox_small_icon_mode">Mostrar ícones menores</string>
<string name="summary_checkbox_enable_sops">Permitir que o GFE modifique as configurações do jogo para otimizar a transmissão</string>
<string name="title_checkbox_host_audio">Reproduzir áudio no PC</string>
<string name="title_checkbox_disable_warnings">Desativar mensagens de alerta</string>
<string name="title_video_format">Mudar configurações do HEVC</string>
<string name="summary_enable_hdr">Transmita HDR quando o jogo e a GPU do PC suportarem. O HDR requer uma GPU da série GTX 1000 ou posterior.</string>
<string name="title_enable_perf_overlay">Mostrar status de performance durante a transmissão</string>
<string name="nettest_title_done">Teste de Internet Completo</string>
<string name="nettest_text_inconclusive">O teste de rede não pôde ser executado porque nenhum dos servidores de teste de conexão do Moonlight estava acessível. Verifique a sua conexão com a Internet ou tente novamente mais tarde.</string>
<string name="pairing">A parear…</string>
<string name="pair_pc_offline">Esse computador está offline</string>
<string name="pair_pc_ingame">Esse computador está atualmente num jogo. Deve fechar o jogo antes de parear.</string>
<string name="pair_pairing_msg">Insira o seguinte PIN no PC de destino:</string>
<string name="pair_incorrect_pin">PIN incorreto</string>
<string name="pair_already_in_progress">Pareamento já em andamento</string>
<string name="wol_pc_online">Esse computador está disponível</string>
<string name="wol_no_mac">Não foi possível acordar o PC porque o GFE não enviou um endereço MAC</string>
<string name="wol_waking_pc">Acordando o PC…</string>
<string name="unpairing">Despareando…</string>
<string name="unpair_error">Aparelho não pareado</string>
<string name="error_pc_offline">Esse computador está indisponível</string>
<string name="error_manager_not_running">O serviço ComputerManager não está em execução. Aguarde alguns segundos ou reinicie a app..</string>
<string name="error_unknown_host">Falha ao encontrar o host</string>
<string name="title_setup_guide">Guia de configuração</string>
<string name="title_full_range">Forçar vídeo de gama completa de cores (Experimental)</string>
<string name="conn_establishing_title">Estabelecendo Conexão</string>
<string name="conn_establishing_msg">Iniciando a conexão</string>
<string name="addpc_fail">Não foi possível conectar ao computador especificado. Certifique-se de que as portas necessárias sejam permitidas pelo firewall.</string>
<string name="summary_fps_list">Aumente para uma transmissão de vídeo mais suave. Diminua para melhor desempenho em aparelhos de baixo custo.</string>
<string name="suffix_seekbar_deadzone">%</string>
<string name="title_checkbox_xb1_driver">Driver de gamepad USB Xbox 360/One</string>
<string name="title_checkbox_enable_sops">Otimizar configurações de jogo</string>
<string name="summary_enable_post_stream_toast">Exibe uma mensagem com informações de latência após o término da transmissão</string>
<string name="category_help">Ajuda</string>
<string name="summary_setup_guide">Veja instruções sobre como configurar o seu PC para streaming</string>
<string name="resolution_1440p">1440p</string>
<string name="resolution_4k">4K</string>
<string name="fps_30">30 FPS</string>
<string name="pacing_latency">Preferir baixa latência</string>
<string name="title_checkbox_mouse_nav_buttons">Ativar os botões de voltar e avançar do rato</string>
<string name="summary_checkbox_mouse_nav_buttons">Ativar esta opção pode bugar o clique com o botão direito em alguns aparelhos com bugs</string>
<string name="title_checkbox_flip_face_buttons">Inverter botões</string>
<string name="title_privacy_policy">Política de privacidade</string>
<string name="summary_privacy_policy">Veja a política de privacidade do Moonlight</string>
<string name="resolution_480p">480p</string>
<string name="resolution_720p">720p</string>
<string name="summary_frame_pacing">Especifique o equilíbrio entre latência e suavidade do vídeo</string>
</resources>
+38 -5
View File
@@ -84,7 +84,7 @@
<!-- Preferences -->
<string name="category_basic_settings">Общие Настройки</string>
<string name="title_resolution_list">Выберите разрешение и частоту кадров</string>
<string name="summary_resolution_list">Выбор слишком высокого значеня для своего устройства может вызвать тормоза или вылеты</string>
<string name="summary_resolution_list">Увеличьте для повышения чёткости изображения. Уменьшите для лучшей производительности на медленных устройствах или сетях.</string>
<string name="title_seekbar_bitrate">Выберите битрейт видео</string>
<string name="summary_seekbar_bitrate">Низкий битрейт уменьшит зависания. Увеличение битрейта улучшит качество изображения.</string>
<string name="title_checkbox_stretch_video">Растягивать видео на весь экран</string>
@@ -184,7 +184,7 @@
<string name="scut_invalid_uuid">Указанный PC недействителен</string>
<string name="scut_invalid_app_id">Указанное приложение недействительно</string>
<string name="suffix_osc_opacity">%</string>
<string name="suffix_seekbar_bitrate_mbps">Мб/с</string>
<string name="suffix_seekbar_bitrate_mbps">Мбит/с</string>
<string name="applist_menu_hide_app">Скрыть приложение</string>
<string name="pcview_menu_test_network">Тестовое подключение к сети</string>
<string name="pcview_menu_header_unknown">Обновление</string>
@@ -213,13 +213,46 @@
<string name="perf_overlay_streamdetails">Видеострим: %1$s %2$.2f FPS</string>
<string name="resolution_prefix_native_fullscreen">Родной полноэкранный режим</string>
<string name="perf_overlay_netlatency">Средняя задержка сети: %1$d мс (дисперсия: %2$d мс)</string>
<!-- Array strings -->
<string name="audioconf_stereo">Стерео</string>
<string name="audioconf_51surround">5.1 Объёмный звук</string>
<string name="audioconf_71surround">7.1 Объёмный звук</string>
<string name="videoformat_hevcauto">Использовать HEVC только если безопасно</string>
<string name="videoformat_hevcauto">Автоматически</string>
<string name="videoformat_hevcalways">Всегда использовать HEVC если доступно</string>
<string name="videoformat_hevcnever">Никогда не использовать HEVC</string>
<string name="pacing_latency">Минимальная задержка</string>
<string name="pacing_balanced">Баланс</string>
<string name="pacing_smoothness">Максимальная плавность (может значительно увеличить задержку)</string>
<string name="title_checkbox_enable_audiofx">Включить поддержку системного эквалайзера</string>
<string name="summary_checkbox_absolute_mouse_mode">Может сделать движения мыши естественней для удаленного рабочего стола, но несовместимо с большинством игр.</string>
<string name="summary_checkbox_reduce_refresh_rate">Сниженная частота обновления может экономить батарею за счет дополнительной задержки видео</string>
<string name="resolution_prefix_native_landscape">(Горизонтальный)</string>
<string name="fps_60">60 FPS</string>
<string name="fps_90">90 FPS</string>
<string name="fps_120">120 FPS</string>
<string name="frame_conversion_error">Хост-ПК сообщил о критической ошибке кодирования видео.
\n
\nПопробуйте выключить HDR, изменить разрешение стрима или разрешение экрана на хост-ПК.</string>
<string name="summary_checkbox_enable_audiofx">Позволяет работать аудио эффектам во время стрима, но может увеличить задержку звука</string>
<string name="title_setup_guide">Инструкция по настройке</string>
<string name="summary_setup_guide">Посмотреть инструкцию о том как настроить ваш пк для стриминга</string>
<string name="title_troubleshooting">Руководство по устранению неполадок</string>
<string name="summary_frame_pacing">Укажите как сбалансировать задержку и плавностью видео</string>
<string name="summary_privacy_policy">Посмотреть политику конфиденциальности Moonlight</string>
<string name="title_privacy_policy">Политика конфиденциальности</string>
<string name="resolution_360p">360p</string>
<string name="resolution_1080p">1080p</string>
<string name="resolution_1440p">1440p</string>
<string name="summary_troubleshooting">Посмотрите советы по обнаружению и устранению проблем</string>
<string name="category_help">Помощь</string>
<string name="resolution_720p">720p</string>
<string name="resolution_prefix_native_portrait">(Портретный)</string>
<string name="summary_seekbar_deadzone">Некоторые игры могут принудительно увеличить мёртвую зону вместо указанной в Moonlight.</string>
<string name="title_checkbox_absolute_mouse_mode">Режим удалённого рабочего стола для мыши</string>
<string name="title_checkbox_reduce_refresh_rate">Разрешить снижение частоты обновления</string>
<string name="resolution_4k">4K</string>
<string name="fps_30">30 FPS</string>
<string name="title_frame_pacing">Скорость вывода/отрисовки кадра</string>
<string name="pacing_balanced_alt">Сбалансированно с лимитом FPS</string>
<string name="resolution_480p">480p</string>
</resources>
+37 -15
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- PC view menu entries -->
<string name="pcview_menu_app_list">Подивитися перелік додатків</string>
<string name="pcview_menu_app_list">Подивитися перелік застосунків</string>
<string name="pcview_menu_pair_pc">Створити пару з пристроєм</string>
<string name="pcview_menu_unpair_pc">Розірвати пару</string>
<string name="pcview_menu_send_wol">Надіслати запит Wake-On-LAN</string>
@@ -27,7 +27,7 @@
<string name="unpair_error">Пристрій не було спарено</string>
<!-- Errors -->
<string name="error_pc_offline">Пристрій вимкнено чи знаходиться поза мережею</string>
<string name="error_manager_not_running">Сервіс ComputerManager не запущено. Будь ласка, зачекайте кілька секунд або перезапустіть додаток.</string>
<string name="error_manager_not_running">Сервіс ComputerManager не запущено. Будь ласка, зачекайте кілька секунд або перезапустіть застосунок.</string>
<string name="error_unknown_host">Неможливо знайти хоста</string>
<string name="error_404">GFE повернув помилку HTTP 404. Переконайтеся що ваш пристрій використовує підтримуваний GPU. Використання програм для віддаленого доступу також може викликати цю помилку. Спробуйте перезавантажити пристрій або перевстановити GFE.</string>
<!-- Start application messages -->
@@ -56,14 +56,14 @@
<string name="applist_menu_quit_and_start">Вийти з поточної гри і запустити</string>
<string name="applist_menu_cancel">Скасувати</string>
<string name="applist_menu_tv_channel">Додати на канал</string>
<string name="applist_refresh_title">Перелік додатків</string>
<string name="applist_refresh_msg">Оновлення додатків…</string>
<string name="applist_refresh_title">Перелік застосунків</string>
<string name="applist_refresh_msg">Оновлення застосунків…</string>
<string name="applist_refresh_error_title">Помилка</string>
<string name="applist_refresh_error_msg">Помилка отримання переліку додатків</string>
<string name="applist_refresh_error_msg">Помилка отримання переліку застосунків</string>
<string name="applist_quit_app">Виходимо з</string>
<string name="applist_quit_success">Успішний вихід з</string>
<string name="applist_quit_fail">Помилка при виході</string>
<string name="applist_quit_confirmation">Ви впевнені, що хочете вийти з запущеного додатку? Усі незбережені дані будуть втрачені.</string>
<string name="applist_quit_confirmation">Ви впевнені, що хочете вийти з запущеного застосунку\? Усі незбережені дані будуть втрачені.</string>
<!-- Add computer manually activity -->
<string name="title_add_pc">Додати пристрій вручну</string>
<string name="msg_add_pc">З\'єднання з пристроєм…</string>
@@ -93,7 +93,7 @@
<string name="title_language_list">Мова</string>
<string name="summary_language_list">Мова, яка буде використовуватися в Moonlight</string>
<string name="title_checkbox_small_icon_mode">Використовувати маленькі іконки</string>
<string name="summary_checkbox_small_icon_mode">Використовувати маленькі іконки в сітці додатків, для відображення більшої кількості елементів на екрані</string>
<string name="summary_checkbox_small_icon_mode">Використовувати маленькі іконки в сітці застосунків, для відображення більшої кількості елементів на екрані</string>
<string name="category_host_settings">Налаштування хоста</string>
<string name="title_checkbox_enable_sops">Оптимізувати ігрові налаштування</string>
<string name="summary_checkbox_enable_sops">Дозволити GFE змінювати налаштування ігор для оптимальної трансляції</string>
@@ -121,7 +121,7 @@
<string name="error_usb_prohibited">USB доступ заборонений адміністратором пристрою. Перевірте налаштування Knox або MDM.</string>
<string name="addpc_wrong_sitelocal">Вказана адреса неправильна. Ви повинні ввести публічну IP-адресу вашого мережника (роутера) для передачі через інтернет.</string>
<string name="title_checkbox_enable_pip">Увімкнути режим перегляду \"Картинка в картинці\"</string>
<string name="summary_checkbox_enable_pip">Дозволяє переглядати трансляцію (але не керувати нею) під час роботи в інших додатках</string>
<string name="summary_checkbox_enable_pip">Дозволяє переглядати стрім (але не контролювати) під час багатозадачності</string>
<string name="title_checkbox_usb_bind_all">Вимкнути рідну підтримку Xbox контролерів від Андроїда</string>
<string name="summary_checkbox_usb_bind_all">Використовувати USB драйвер Moonlight для усіх підтриманих контролерів, навіть якщо існує рідна підтримка</string>
<string name="title_checkbox_mouse_emulation">Емуляція миші через контролер</string>
@@ -148,7 +148,7 @@
<string name="title_details">Деталі</string>
<string name="title_enable_perf_overlay">Увімкнути відображення статистики</string>
<string name="title_unlock_fps">Розблокувати всі можливі частоти кадрів</string>
<string name="applist_details_id">ID додатку:</string>
<string name="applist_details_id">ID застосунку:</string>
<string name="title_checkbox_vibrate_fallback">Емуляція вібровіддачі</string>
<string name="summary_checkbox_vibrate_osc">Вібрація пристрою для емуляції вібровіддачі при екранному управлінні</string>
<string name="summary_checkbox_vibrate_fallback">Вібрує пристрій для емуляції вібровіддачі, якщо під\'єднаний контролер не підтримує її</string>
@@ -169,7 +169,7 @@
<string name="perf_overlay_dectime">Середній час розцифрування: %1$.2f мс</string>
<string name="summary_fps_list">Збільшіть для плавнішого відео потоку. Зменшіть для кращої продуктивності на повільних пристроях.</string>
<string name="scut_invalid_uuid">Зазначений пристрій недійсний</string>
<string name="scut_invalid_app_id">Зазначений додаток недійсний</string>
<string name="scut_invalid_app_id">Зазначений застосунок недійсний</string>
<string name="title_osc_opacity">Змінити прозорість екранних елементів керування</string>
<string name="summary_osc_opacity">Зробити екранні елементи керування більш/менш прозорими</string>
<string name="dialog_title_osc_opacity">Зміна прозорості</string>
@@ -178,9 +178,9 @@
<string name="summary_enable_post_stream_toast">Показувати статистику затримки після закінчення трансляції</string>
<string name="early_termination_error">Щось пішло не так на пристрої хоста при початку трансляції.
\n
\nВпевніться що у вас не відкриті додатки з DRM змістом на пристрої хоста. Ви також можете спробувати перезапустити його.
\nПереконайтеся, що на головному ПК немає відкритого вмісту, захищеного DRM. Ви також можете спробувати перезавантажити головний ПК.
\n
\nЯкщо проблема не виправиться, спробуйте перевстановити драйвера для вашої відео карти та, GeForce Experience якщо встановлено.</string>
\nЯкщо проблема не зникає, спробуйте перевстановити драйвери GPU та GeForce Experience.</string>
<string name="nettest_text_success">Схоже що ваша мережа не блокує Moonlight. Якщо у вас й надалі проблеми з підключенням, перевірте налаштування брандмауера.
\n
\nЯкщо ви намагаєтеся транслювати через Інтернет, встановіть на своєму пристрої Moonlight Internet Hosting Tool, та запустіть випробування мережі щоб перевірити ваше з\'єднання до Інтернету.</string>
@@ -195,7 +195,7 @@
\n
\nЗрештою, пристрої клієнта чи хоста можуть не підтримувати трансляції рідною роздільною здатністю. Якщо це не працює на вашому пристрої, вам на жаль просто не пощастило.</string>
<string name="title_native_res_dialog">Застереження про рідну роздільну здатність</string>
<string name="applist_menu_hide_app">Сховати додаток</string>
<string name="applist_menu_hide_app">Сховати застосунок</string>
<string name="perf_overlay_netlatency">Середня затримка мережі: %1$d мс (розбіжність %2$d мс)</string>
<string name="perf_overlay_streamdetails">Відео трансл: %1$s %2$.2f FPS</string>
<string name="check_ports_msg">Перевірте правила брандмауера та переадресації для наступних портів:</string>
@@ -218,8 +218,8 @@
<string name="pcview_menu_header_offline">Поза мережею</string>
<string name="pcview_menu_header_online">В мережі</string>
<!-- Array strings -->
<string name="videoformat_hevcauto">Використовувати HEVC тільки якщо безпечно</string>
<string name="videoformat_hevcalways">Завжди використовувати HEVC якщо доступно</string>
<string name="videoformat_hevcauto">Автоматичний (рекомендовано)</string>
<string name="videoformat_hevcalways">Використовувати HEVC</string>
<string name="videoformat_hevcnever">Ніколи не використовувати HEVC</string>
<string name="title_frame_pacing">Швидкість кадрів відео</string>
<string name="summary_frame_pacing">Укажіть баланс відео затримки та плавності</string>
@@ -239,4 +239,26 @@
<string name="audioconf_stereo">Стерео</string>
<string name="audioconf_51surround">5.1 Об\'ємний Звук</string>
<string name="audioconf_71surround">7.1 Об\'ємний Звук</string>
<string name="summary_checkbox_enable_audiofx">Дозволяє аудіоефектам функціонувати під час потокового передавання, але може збільшити затримку звуку</string>
<string name="title_troubleshooting">Гайд з усунення несправностей</string>
<string name="title_privacy_policy">Політика конфіденційності</string>
<string name="summary_troubleshooting">Переглянути поради щодо діагностики та усунення поширених проблем з потоковою передачею</string>
<string name="summary_checkbox_reduce_refresh_rate">Більш низька частота оновлення дисплея може заощадити енергію за рахунок деякої додаткової затримки відео</string>
<string name="summary_seekbar_deadzone">Примітка: Деякі ігри можуть встановлювати більшу мертву зону, ніж та, на яку налаштовано Moonlight.</string>
<string name="title_checkbox_absolute_mouse_mode">Режим миші віддаленого робочого столу</string>
<string name="title_setup_guide">Гайд по налаштуванню</string>
<string name="summary_setup_guide">Переглянути інструкцію, як налаштувати ігровий ПК для стрімінгу</string>
<string name="pacing_balanced_alt">Збалансований з лімітом FPS</string>
<string name="resolution_prefix_native_landscape">(Горизонтальний)</string>
<string name="resolution_prefix_native_portrait">(Портретний)</string>
<string name="title_checkbox_enable_audiofx">Увімкнення підтримки системного еквалайзера</string>
<string name="summary_checkbox_absolute_mouse_mode">Це може зробити прискорення миші більш природним під час використання віддаленого робочого столу, але воно несумісне з багатьма іграми.</string>
<string name="title_checkbox_reduce_refresh_rate">Дозволити зниження частоти оновлення</string>
<string name="category_help">Допомога</string>
<string name="summary_privacy_policy">Переглянути політику конфіденційності Moonlight</string>
<string name="frame_conversion_error">Головний комп\'ютер повідомив про фатальну помилку кодування відео.
\n
\nСпробуйте вимкнути режим HDR, змінити роздільну здатність потокового відео або змінити роздільну здатність дисплея головного комп\'ютера.</string>
<string name="title_full_range">Сила повного спектру відео (експериментальна)</string>
<string name="summary_full_range">Це може призвести до втрати деталей у світлих і темних областях, якщо пристрій не відображає належним чином весь діапазон відеоконтенту.</string>
</resources>
+2
View File
@@ -2,5 +2,7 @@
<style name="AppBaseTheme" parent="android:Theme.Material">
<item name="android:navigationBarColor">@android:color/transparent</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<!-- Avoid some systems like MIUI which break the visibility of games title -->
<item name="android:forceDarkAllowed">false</item>
</style>
</resources>
+7
View File
@@ -228,4 +228,11 @@
<string name="videoformat_hevcauto">Chỉ sử dụng HEVC nếu ổn định</string>
<string name="videoformat_hevcalways">Luôn sử dụng HEVC (có thể gây crash)</string>
<string name="videoformat_hevcnever">Không bao giờ sử dụng HEVC</string>
<string name="resolution_prefix_native_landscape">(Ngang)</string>
<string name="frame_conversion_error">PC chủ đã gặp lỗi mã hoá video nghiêm trọng.
\n
\nHãy thử tắt chế độ HDR, đổi độ phân giải stream, hoặc đổi độ phân giải màn hình PC chủ.</string>
<string name="title_checkbox_enable_audiofx">Hỗ trợ bộ cân bằng của hệ thống</string>
<string name="summary_checkbox_enable_audiofx">Cho phép hiệu ứng âm thanh hoạt động khi stream, nhưng có thể tăng độ trễ âm thanh</string>
<string name="resolution_prefix_native_portrait">(Dọc)</string>
</resources>
+25 -14
View File
@@ -27,7 +27,7 @@
<string name="pair_already_in_progress"> 配对中,请稍候 </string>
<!-- WOL messages -->
<string name="wol_pc_online"> 电脑在线中 </string>
<string name="wol_no_mac"> 无法唤醒电脑因为GFE没有返回MAC地址 </string>
<string name="wol_no_mac">无法唤醒电脑因为没有存储的 MAC 地址</string>
<string name="wol_waking_pc"> 唤醒电脑中…… </string>
<string name="wol_waking_msg">唤醒电脑需要一些时间。如果电脑没有唤醒,请确保 Wake-On-LAN 设置无误。</string>
<string name="wol_fail"> 无法发送Wake-On-LAN数据包 </string>
@@ -42,7 +42,7 @@
<string name="error_unknown_host"> 无法解析主机地址 </string>
<string name="error_404">GFE返回了HTTP 404 错误,确保你的电脑显卡支持串流。使用远程桌面软件同样会引起此错误,请尝试重启电脑或重装GFE。</string>
<string name="title_decoding_error"> 视频解码器崩溃 </string>
<string name="message_decoding_error"> 由于与该设备的视频解码器不兼容,Moonlight已崩溃。确保你电脑上的GFE已更新至最新版本,如果崩溃继续,请尝试调整串流设置。 </string>
<string name="message_decoding_error">由于与该设备的视频解码器不兼容,Moonlight已崩溃。如果崩溃继续,请尝试调整串流设置。</string>
<string name="title_decoding_reset"> 重置视频设置 </string>
<string name="message_decoding_reset"> 由于设备的视频解码器在你选择的串流设置上持续崩溃,已重置你的串流设置。 </string>
<string name="error_usb_prohibited"> 设备管理员已禁止USB访问。请检查您的Knox或MDM设置。 </string>
@@ -60,10 +60,10 @@
<string name="conn_terminated_title"> 连接终结 </string>
<string name="conn_terminated_msg"> 连接已被终结 </string>
<!-- General strings -->
<string name="ip_hint"> 串流电脑的IP地址 </string>
<string name="searching_pc">正在搜寻运行GAMESTREAM的电脑……
<string name="ip_hint">串流电脑的IP地址</string>
<string name="searching_pc">在你的本地网络中搜索串流主机PC...
\n
\n 确保GFE SHIELD设置里的GAMESTREAM已开启</string>
\n 确保Sunshine在主机上运行,或在GeForce Experience SHIELD设置中启用GameStream</string>
<string name="yes"> 确定 </string>
<string name="no"> 取消 </string>
<string name="lost_connection"> 与电脑失去连接 </string>
@@ -167,8 +167,8 @@
<string name="summary_disable_frame_drop"> 可能会减少在一些设备上的卡顿,但会增加延迟 </string>
<string name="title_video_format"> 更改HEVC设置 </string>
<string name="summary_video_format">HEVC能降低视频带宽需求,但需要较新的设备才能支持</string>
<string name="title_enable_hdr"> 启用 HDR 实验 </string>
<string name="summary_enable_hdr"> 当游戏和显卡支持时以HDR模式串流。 HDR需要GTX 1000系列或更高规格显卡。 </string>
<string name="title_enable_hdr">启用 HDR (实验性)</string>
<string name="summary_enable_hdr">当游戏和显卡支持时以HDR模式串流。 HDR需要显卡支持 HEVC Main 10 编码。</string>
<string name="title_enable_perf_overlay"> 启用性能信息 </string>
<string name="summary_enable_perf_overlay"> 在串流中显示实时性能信息 </string>
<string name="title_enable_post_stream_toast">串流完毕显示延迟信息</string>
@@ -186,7 +186,7 @@
\n
\n如果您想通过互联网进行流媒体传输,请在您的电脑上安装Moonlight互联网主机工具,并运行附带的互联网流媒体测试器来检查您的电脑的互联网连接。</string>
<string name="nettest_title_done">网络测试完成</string>
<string name="nettest_text_waiting">Moonlight正在测试你的网络连接,以确定NVIDIA GameStream是否被阻止
<string name="nettest_text_waiting">Moonlight正在测试你的网络连接,请确保所需端口没有被屏蔽
\n
\n这可能需要几秒钟……</string>
<string name="nettest_title_waiting">测试网络连接中</string>
@@ -208,22 +208,20 @@
<string name="check_ports_msg">请检查您的防火墙和端口转发规则中的端口:</string>
<string name="early_termination_error">开始串流时您的主机电脑出了点问题。
\n
\n请确保没有在主机电脑上开启任何受DRM保护的内容。您也可以尝试重新启动主机电脑。
\n
\n如果问题仍然存在,请尝试重新安装GPU驱动和GFE。</string>
\n请确保没有在主机电脑上开启任何受DRM保护的内容。您也可以尝试重新启动主机电脑。</string>
<string name="no_frame_received_error">您的网络连接质量不佳。请降低视频码率设置或更换更快的网络连接。</string>
<string name="no_video_received_error">没有接收到来自主机的视频。</string>
<string name="video_decoder_init_failed">视频解码器初始化失败。您的设备可能不支持选定的分辨率或帧数。</string>
<string name="nettest_text_blocked">您设备当前的网络连接拦截了Moonlight。连接到该网络时可能无法通过互联网串流。</string>
<string name="perf_overlay_netlatency">平均网络延迟: %1$d ms (抖动: %2$d ms)</string>
<string name="perf_overlay_streamdetails">视频流: %1$s %2$.2f FPS</string>
<string name="resolution_prefix_native_fullscreen">本地全屏</string>
<string name="resolution_prefix_native_fullscreen">原生全屏</string>
<!-- Array strings -->
<string name="audioconf_stereo">立体声</string>
<string name="audioconf_51surround">5.1环绕声</string>
<string name="audioconf_71surround">7.1环绕声</string>
<string name="videoformat_hevcauto">自动</string>
<string name="videoformat_hevcalways">强制使用HEVC(不稳定)</string>
<string name="videoformat_hevcauto">自动(推荐)</string>
<string name="videoformat_hevcalways">首选 HEVC</string>
<string name="videoformat_hevcnever">不使用HEVC</string>
<string name="title_frame_pacing">视频帧速调节</string>
<string name="resolution_360p">360p</string>
@@ -251,4 +249,17 @@
<string name="summary_seekbar_deadzone">注意:有些游戏可以执行一个比Moonlight摇杆配置的更大的盲区。</string>
<string name="title_checkbox_absolute_mouse_mode">适合远程桌面的鼠标模式</string>
<string name="summary_checkbox_absolute_mouse_mode">这可以使得鼠标加速在远程桌面使用中表现得更自然,但它与许多游戏不兼容。</string>
<string name="resolution_prefix_native_landscape">(横向)</string>
<string name="resolution_prefix_native_portrait">(纵向)</string>
<string name="title_checkbox_enable_audiofx">启用对系统均衡器的支持</string>
<string name="summary_checkbox_enable_audiofx">串流时允许音效工作,可能会导致音频延迟增加</string>
<string name="title_checkbox_reduce_refresh_rate">允许降低刷新率</string>
<string name="summary_checkbox_reduce_refresh_rate">较低的屏幕刷新率可以在增加一些视频延迟的情况下省电</string>
<string name="frame_conversion_error">主机 PC 报告了致命的视频编码错误。
\n
\n尝试禁用 HDR 模式、更改流分辨率或更改主机 PC 的显示分辨率。</string>
<string name="summary_full_range">如果你的设备无法正确显示全范围视频内容,这会导致明暗区域的细节丢失。</string>
<string name="title_full_range">强制完全动态范围视频 (实验性)</string>
<string name="pair_pairing_help">如果你的主机运行的是 Sunshine,那请前往Sunshine的网页界面输入PIN码。</string>
<string name="pcview_menu_eol">NVIDIA GameStream 终止服务</string>
</resources>
+41 -32
View File
@@ -27,7 +27,7 @@
<string name="pair_already_in_progress">正在配對,請稍候</string>
<!-- WOL messages -->
<string name="wol_pc_online">電腦已上線</string>
<string name="wol_no_mac">無法喚醒電腦因為 GFE 沒有傳送 MAC 位址</string>
<string name="wol_no_mac">無法喚醒電腦因為沒有已儲存的 MAC 位址</string>
<string name="wol_waking_pc">正在喚醒電腦…</string>
<string name="wol_waking_msg">喚醒電腦需要一些時間。如果電腦沒有喚醒,請確保 Wake-On-LAN 設定無誤。</string>
<string name="wol_fail">無法傳送 Wake-On-LAN 資料包</string>
@@ -35,16 +35,16 @@
<string name="unpairing">正在取消配對…</string>
<string name="unpair_success"> 成功取消配對 </string>
<string name="unpair_fail"> 無法配對 </string>
<string name="unpair_error">裝置沒有配對</string>
<string name="unpair_error">裝置尚未配對</string>
<!-- Errors -->
<string name="error_pc_offline">電腦已離線</string>
<string name="error_manager_not_running">ComputerManager 服務未執行。請稍等幾秒或重啟應用程式。</string>
<string name="error_manager_not_running">ComputerManager 服務未執行。請稍等幾秒或重啟應用程式。</string>
<string name="error_unknown_host"> 無法解析主機位址 </string>
<string name="error_404">GFE 回了 HTTP 404 錯誤確保你的電腦顯示卡支援串流。使用遠端桌面軟體同樣會引起此錯誤,請嘗試重啟電腦或重新安裝 GFE。</string>
<string name="title_decoding_error">視訊解碼器崩潰</string>
<string name="message_decoding_error">由於與裝置的視訊解碼器不相容,Moonlight 已崩潰。確保你電腦上的 GFE 已更新至最新版本,如果崩潰繼續,請嘗試調整串流設定。</string>
<string name="error_404">GFE 回了 HTTP 404 錯誤,請確保你的電腦 GPU 支援串流。使用遠端桌面軟體同樣會引起此錯誤,請嘗試重啟電腦或重新安裝 GFE。</string>
<string name="title_decoding_error">視訊解碼器已當機</string>
<string name="message_decoding_error">由於與這個裝置的視訊解碼器不相容,Moonlight 已當機。若當機持續,請嘗試調整串流設定。</string>
<string name="title_decoding_reset">重設視訊設定</string>
<string name="message_decoding_reset">由於裝置的視訊解碼器在你選取的串流設定上持續崩潰,已重設你的串流設定。</string>
<string name="message_decoding_reset">由於裝置的視訊解碼器在你選取的串流設定上持續當機,已重設你的串流設定。</string>
<string name="error_usb_prohibited">裝置管理員已禁止 USB 訪問。請檢查您的 Knox 或 MDM 設定。</string>
<string name="unable_to_pin_shortcut">您目前的啟動器不允許創建釘選的捷徑。</string>
<!-- Start application messages -->
@@ -56,14 +56,14 @@
<string name="conn_hardware_latency">硬體解碼器平均延時:</string>
<string name="conn_starting">正在啟動</string>
<string name="conn_error_title">連線錯誤</string>
<string name="conn_error_msg"> 啟動失敗 </string>
<string name="conn_error_msg">無法啟動</string>
<string name="conn_terminated_title">連線已終止</string>
<string name="conn_terminated_msg">連線已終止</string>
<!-- General strings -->
<string name="ip_hint">串流電腦的 IP 位址</string>
<string name="searching_pc">正在搜尋執行 GAMESTREAM 的電腦…
<string name="ip_hint">主機電腦的 IP 位址</string>
<string name="searching_pc">正在您的區域網路中搜尋主機電腦…
\n
\n請確保 GFE SHIELD 設定裡的 GAMESTREAM 已啟用</string>
\n 請確保 Sunshine 正在您的主機電腦中執行,或在 GFE SHIELD 設定中啟用 GAMESTREAM。</string>
<string name="yes"> 確定 </string>
<string name="no"> 取消 </string>
<string name="lost_connection">與電腦失去連線</string>
@@ -74,8 +74,8 @@
\n 請降低位元速率</string>
<string name="poor_connection_msg">與電腦連線不良</string>
<string name="perf_overlay_decoder">解碼器:%1$s</string>
<string name="perf_overlay_incomingfps">網路接收影格%1$.2f FPS</string>
<string name="perf_overlay_renderingfps">渲染影格數%1$.2f FPS</string>
<string name="perf_overlay_incomingfps">網路接收影格速率%1$.2f FPS</string>
<string name="perf_overlay_renderingfps">轉譯影格速率%1$.2f FPS</string>
<string name="perf_overlay_netdrops">網路丟失影格:%1$.2f%%</string>
<string name="perf_overlay_dectime">平均解碼時間:%1$.2f ms</string>
<!-- AppList activity -->
@@ -90,10 +90,10 @@
<string name="applist_refresh_title">遊戲清單</string>
<string name="applist_refresh_msg">正在重新整理…</string>
<string name="applist_refresh_error_title"> 錯誤 </string>
<string name="applist_refresh_error_msg">取得遊戲清單失敗</string>
<string name="applist_refresh_error_msg">無法取得遊戲清單</string>
<string name="applist_quit_app">正在結束</string>
<string name="applist_quit_success">結束成功</string>
<string name="applist_quit_fail">結束失敗</string>
<string name="applist_quit_success">成功結束</string>
<string name="applist_quit_fail">無法結束</string>
<string name="applist_quit_confirmation">您確定要結束執行中的遊戲?所有未儲存的資料將丟失。</string>
<string name="applist_details_id">App ID</string>
<!-- Add computer manually activity -->
@@ -109,11 +109,11 @@
<string name="title_resolution_list">視訊解析度</string>
<string name="summary_resolution_list">高解析度提升圖像清晰度。低解析度提升在低效能裝置和較慢網路中的串流體驗。</string>
<string name="title_fps_list">視訊影格速率</string>
<string name="summary_fps_list">提高影格速率以得更順暢的視訊串流,降低可在低效能裝置上得更好的串流體驗。</string>
<string name="summary_fps_list">提高影格速率以得更順暢的視訊串流,降低可在低效能裝置上得更好的串流體驗。</string>
<string name="title_seekbar_bitrate">視訊位元速率</string>
<string name="summary_seekbar_bitrate">提高位元速率以提升圖像品質,降低可在較慢的網路中得更好的串流體驗。</string>
<string name="summary_seekbar_bitrate">提高位元速率以提升圖像品質,降低可在較慢的網路中得更好的串流體驗。</string>
<string name="title_unlock_fps">解鎖所有可用影格速率</string>
<string name="summary_unlock_fps">以 90 或 120 畫面更新率串流可能會減少在高效能裝置上的網路延時,但在不支援的裝置上造成卡頓或崩潰</string>
<string name="summary_unlock_fps">以 90 或 120 畫面更新率串流可能會減少在高效能裝置上的網路延時,但在不支援的裝置上卡頓或不穩定的狀況</string>
<string name="title_checkbox_stretch_video">將畫面延展至全螢幕</string>
<string name="title_checkbox_disable_warnings">停用錯誤訊息</string>
<string name="summary_checkbox_disable_warnings">停用串流中連線錯誤訊息</string>
@@ -140,7 +140,7 @@
<string name="title_checkbox_mouse_nav_buttons"> 啟用前進後退滑鼠鍵 </string>
<string name="summary_checkbox_mouse_nav_buttons">在一些支援不佳的裝置上啟用此項可能會使其右鍵失效</string>
<string name="title_checkbox_flip_face_buttons">反轉技能鍵</string>
<string name="summary_checkbox_flip_face_buttons">為手把和虛擬控制器交換 A/B 和 X/Y 技能按鍵</string>
<string name="summary_checkbox_flip_face_buttons">為手把和螢幕控制按鈕交換 A/B 和 X/Y 技能按鍵</string>
<string name="category_on_screen_controls_settings">螢幕控制按鈕設定</string>
<string name="title_checkbox_show_onscreen_controls">顯示螢幕控制按鈕</string>
<string name="summary_checkbox_show_onscreen_controls">在觸控式螢幕上顯示一層虛擬控制器</string>
@@ -152,7 +152,7 @@
<string name="summary_reset_osc">重設所有螢幕控制按鈕為預設大小和位置</string>
<string name="dialog_title_reset_osc">重設按鈕版面配置</string>
<string name="dialog_text_reset_osc">你確定要刪除已儲存的螢幕按鈕版面配置嗎?</string>
<string name="toast_reset_osc_success">螢幕按鈕佈局已經重設</string>
<string name="toast_reset_osc_success">螢幕控制按鈕已重設為預設值</string>
<string name="category_ui_settings">使用者介面設定</string>
<string name="title_language_list"> 語言 </string>
<string name="summary_language_list">選擇 Moonlight 顯示的語言</string>
@@ -169,15 +169,15 @@
<string name="title_video_format">變更 HEVC 設定</string>
<string name="summary_video_format">HEVC 能降低視訊頻寬需求,但需要較新的裝置才能支援</string>
<string name="title_enable_hdr">啟用 HDR (實驗性)</string>
<string name="summary_enable_hdr">遊戲和顯示卡支援時以 HDR 模式串流HDR 需要 GTX 1000 系列或更高規格顯示卡</string>
<string name="summary_enable_hdr">遊戲和 GPU 支援時以 HDR 模式串流HDR 模式需要支援 HEVC Main 10 編碼的 GPU</string>
<string name="title_enable_perf_overlay">串流時顯示效能資訊</string>
<string name="summary_enable_perf_overlay">在串流中顯示即時效能資訊</string>
<string name="title_enable_post_stream_toast">串流後顯示延時資訊</string>
<string name="summary_enable_post_stream_toast">串流結束後顯示延時資訊</string>
<string name="title_osc_opacity">變更螢幕按鈕透明度</string>
<string name="title_osc_opacity">變更螢幕控制按鈕透明度</string>
<string name="dialog_title_osc_opacity">變更不透明度</string>
<string name="suffix_osc_opacity">%</string>
<string name="summary_osc_opacity">螢幕按钮變得更透明/更不透明</string>
<string name="summary_osc_opacity">使螢幕控制按钮變得更透明/更不透明</string>
<string name="suffix_seekbar_bitrate_mbps">Mbps</string>
<string name="resolution_prefix_native">本機</string>
<string name="text_native_res_dialog">本機解析度模式不受 GFE 的官方支援,因此不會自動設定主機的顯示解析度。您需要在遊戲中手動進行設定。
@@ -190,14 +190,12 @@
<string name="title_native_res_dialog">本機解析度警告</string>
<string name="applist_menu_hide_app">隱藏遊戲</string>
<string name="check_ports_msg">檢查您的防火牆和通訊埠轉送規則中的通訊埠:</string>
<string name="early_termination_error">開始串流時您的主機電腦出了點問題。
<string name="early_termination_error">您的主機電腦在開始串流時出了點問題。
\n
\n請確保沒有在主機電腦上開啟任何受 DRM 保護的內容。您也可以嘗試重新開機主機電腦。
\n
\n如果問題仍然存在,請嘗試重新安裝 GPU 驅動程式和 GFE。</string>
\n請確保沒有在主機電腦上開啟任何受 DRM 保護的內容。您也可以嘗試重新開機主機電腦。</string>
<string name="no_frame_received_error">您的網路連線品質不佳。降低視訊位元速率設定或更換更快的連線。</string>
<string name="no_video_received_error">沒有接收到來自主機的視訊。</string>
<string name="video_decoder_init_failed">視訊解碼器初始化失敗。您的裝置可能不支援選取的解析度或影格速率。</string>
<string name="video_decoder_init_failed">無法初始化視訊解碼器,您的裝置可能不支援選取的解析度或影格速率。</string>
<string name="nettest_text_blocked">您裝置目前的網路連線封鎖了 Moonlight。連線到該網路時可能無法透過網際網路串流。</string>
<string name="nettest_text_failure">您裝置目前的網路連線似乎封鎖了 Moonlight。連線到該網路時可能無法透過網際網路串流。
\n
@@ -208,7 +206,7 @@
\n
\n如果您是嘗試透過網際網路串流,請在您的電腦上安裝 Moonlight Internet Hosting Tool,然後執行裡面的 Internet Streaming Tester 來檢查電腦的網際網路連線。</string>
<string name="nettest_title_done">網路檢測完畢</string>
<string name="nettest_text_waiting">Moonlight 正在測試您的網路連線以確認 NVIDIA 遊戲串流服務是否被封鎖。
<string name="nettest_text_waiting">Moonlight 正在測試您的網路連線以確認必要連接埠是否被封鎖。
\n
\n可能需要等待一些時間…</string>
<string name="nettest_title_waiting">正在測試網路連線</string>
@@ -223,8 +221,8 @@
<string name="audioconf_stereo">立體聲</string>
<string name="audioconf_51surround">5.1 環場音效</string>
<string name="audioconf_71surround">7.1 環場音效</string>
<string name="videoformat_hevcauto">自動</string>
<string name="videoformat_hevcalways">強制使用 HEVC (可能會當機)</string>
<string name="videoformat_hevcauto">自動 (建議)</string>
<string name="videoformat_hevcalways">優先使用 HEVC</string>
<string name="videoformat_hevcnever">不使用 HEVC</string>
<string name="resolution_4k">4K</string>
<string name="fps_30">30 FPS</string>
@@ -254,4 +252,15 @@
<string name="summary_checkbox_absolute_mouse_mode">這可以讓滑鼠在遠端桌面使用中的加速表現更加自然,但與很多遊戲不相容。</string>
<string name="title_checkbox_enable_audiofx">啟用系統等化器支援</string>
<string name="summary_checkbox_enable_audiofx">允許音訊效果在串流中發揮作用,但可能會增加音訊延遲</string>
<string name="resolution_prefix_native_landscape">(橫向)</string>
<string name="resolution_prefix_native_portrait">(直向)</string>
<string name="title_checkbox_reduce_refresh_rate">允許減小重新整理率</string>
<string name="summary_checkbox_reduce_refresh_rate">更低的顯示器重新整理速率可在犧牲一些額外視訊延遲的狀況下節省電力</string>
<string name="frame_conversion_error">主機電腦回報了一個嚴重的視訊編碼錯誤。
\n
\n嘗試停用 HDR 模式,變更串流解析度,或變更您的主機電腦的顯示器解析度。</string>
<string name="title_full_range">強制全範圍視訊 (實驗性)</string>
<string name="summary_full_range">若您的裝置無法正確地顯示全範圍視訊內容,將會導致淺色區域和深色區域的細節遺失。</string>
<string name="pair_pairing_help">若您的主機電腦正在執行 Sunshine,請導覽至 Sunshine 網頁 UI 並輸入 PIN 碼。</string>
<string name="pcview_menu_eol">NVIDIA GameStream 終止服務</string>
</resources>
+2
View File
@@ -64,6 +64,7 @@
<item>Magyar</item>
<item>Ελληνικά</item>
<item>Português do Brasil</item>
<item>Čeština</item>
</string-array>
<string-array name="language_values" translatable="false">
<item>default</item>
@@ -85,6 +86,7 @@
<item>hu</item>
<item>el</item>
<item>pt-BR</item>
<item>cs</item>
</string-array>
<string-array name="video_format_names">
+15 -10
View File
@@ -22,10 +22,11 @@
<string name="pcview_menu_delete_pc">Delete PC</string>
<string name="pcview_menu_test_network">Test Network Connection</string>
<string name="pcview_menu_details">View Details</string>
<string name="pcview_menu_eol">NVIDIA GameStream End-of-Service</string>
<!-- Network test strings -->
<string name="nettest_title_waiting">Testing Network Connection</string>
<string name="nettest_text_waiting">Moonlight is testing your network connection to determine if NVIDIA GameStream is blocked.\n\nThis may take a few seconds…</string>
<string name="nettest_text_waiting">Moonlight is testing your network connection to determine if any required ports are blocked.\n\nThis may take a few seconds…</string>
<string name="nettest_title_done">Network Test Complete</string>
<string name="nettest_text_success">Your network does not appear to be blocking Moonlight. If you still have trouble connecting, check your PC\'s firewall settings.\n\nIf you are trying to stream over the Internet, install the Moonlight Internet Hosting Tool on your PC and run the included Internet Streaming Tester to check your PC\'s Internet connection.</string>
<string name="nettest_text_inconclusive">The network test could not be performed because none of Moonlight\'s connection testing servers were reachable. Check your Internet connection or try again later.</string>
@@ -38,13 +39,14 @@
<string name="pair_pc_ingame">Computer is currently in a game. You must close the game before pairing.</string>
<string name="pair_pairing_title">Pairing</string>
<string name="pair_pairing_msg">Please enter the following PIN on the target PC:</string>
<string name="pair_pairing_help">If your host PC is running Sunshine, navigate to the Sunshine web UI to enter the PIN.</string>
<string name="pair_incorrect_pin">Incorrect PIN</string>
<string name="pair_fail">Pairing failed</string>
<string name="pair_already_in_progress">Pairing already in progress</string>
<!-- WOL messages -->
<string name="wol_pc_online">Computer is online</string>
<string name="wol_no_mac">Unable to wake PC because GFE didn\'t send a MAC address</string>
<string name="wol_no_mac">Unable to wake PC because there is no stored MAC address</string>
<string name="wol_waking_pc">Waking PC…</string>
<string name="wol_waking_msg">It may take a few seconds for your PC to wake up.
If it doesn\'t, make sure it\'s configured properly for Wake-On-LAN.
@@ -65,7 +67,7 @@
Using remote desktop software can also cause this error. Try rebooting your machine or reinstalling GFE.
</string>
<string name="title_decoding_error">Video Decoder Crashed</string>
<string name="message_decoding_error">Moonlight has crashed due to an incompatibility with this device\'s video decoder. Ensure GeForce Experience is updated to the latest version on your PC. Try adjusting the streaming settings if the crashes continue.</string>
<string name="message_decoding_error">Moonlight has crashed due to an incompatibility with this device\'s video decoder. Try adjusting the streaming settings if the crashes continue.</string>
<string name="title_decoding_reset">Video Settings Reset</string>
<string name="message_decoding_reset">Your device\'s video decoder continues to crash at your selected streaming settings. Your streaming settings have been reset to default.</string>
<string name="error_usb_prohibited">USB access is prohibited by your device administrator. Check your Knox or MDM settings.</string>
@@ -73,7 +75,8 @@
<string name="video_decoder_init_failed">Video decoder failed to initialize. Your device may not support the selected resolution or frame rate.</string>
<string name="no_video_received_error">No video received from host.</string>
<string name="no_frame_received_error">Your network connection isn\'t performing well. Reduce your video bitrate setting or try a faster connection.</string>
<string name="early_termination_error">Something went wrong on your host PC when starting the stream.\n\nMake sure you don\'t have any DRM-protected content open on your host PC. You can also try restarting your host PC.\n\nIf the issue persists, try reinstalling your GPU drivers and GeForce Experience.</string>
<string name="early_termination_error">Something went wrong on your host PC when starting the stream.\n\nMake sure you don\'t have any DRM-protected content open on your host PC. You can also try restarting your host PC.</string>
<string name="frame_conversion_error">The host PC reported a fatal video encoding error.\n\nTry disabling HDR mode, changing the streaming resolution, or changing your host PC\'s display resolution.</string>
<string name="check_ports_msg">Check your firewall and port forwarding rules for port(s):</string>
<!-- Start application messages -->
@@ -90,9 +93,9 @@
<string name="conn_terminated_msg">The connection was terminated</string>
<!-- General strings -->
<string name="ip_hint">IP address of GeForce PC</string>
<string name="searching_pc">Searching for PCs with GameStream running…\n\n
Ensure GameStream is enabled in the GeForce Experience SHIELD settings.</string>
<string name="ip_hint">IP address of host PC</string>
<string name="searching_pc">Searching for host PCs on your local network…\n\n
Ensure Sunshine is running on your host PC or GameStream is enabled in the GeForce Experience SHIELD settings.</string>
<string name="yes">Yes</string>
<string name="no">No</string>
<string name="lost_connection">Lost connection to PC</string>
@@ -227,7 +230,9 @@
<string name="title_video_format">Change HEVC settings</string>
<string name="summary_video_format">HEVC lowers video bandwidth requirements but requires a newer device</string>
<string name="title_enable_hdr">Enable HDR (Experimental)</string>
<string name="summary_enable_hdr">Stream HDR when the game and PC GPU support it. HDR requires a GTX 1000 series GPU or later.</string>
<string name="summary_enable_hdr">Stream HDR when the game and PC GPU support it. HDR requires a GPU with HEVC Main 10 encoding support.</string>
<string name="title_full_range">Force full range video (Experimental)</string>
<string name="summary_full_range">This will cause loss of detail in light and dark areas if your device doesn\'t properly display full range video content.</string>
<string name="title_enable_perf_overlay">Show performance stats while streaming</string>
<string name="summary_enable_perf_overlay">Display real-time stream performance information while streaming</string>
<string name="title_enable_post_stream_toast">Show latency message after streaming</string>
@@ -258,8 +263,8 @@
<string name="audioconf_51surround">5.1 Surround Sound</string>
<string name="audioconf_71surround">7.1 Surround Sound</string>
<string name="videoformat_hevcauto">Automatic</string>
<string name="videoformat_hevcalways">Always use HEVC (may crash)</string>
<string name="videoformat_hevcauto">Automatic (Recommended)</string>
<string name="videoformat_hevcalways">Prefer HEVC</string>
<string name="videoformat_hevcnever">Never use HEVC</string>
<string name="title_frame_pacing">Video frame pacing</string>
+1
View File
@@ -19,4 +19,5 @@
<locale android:name="hu"/>
<locale android:name="el"/>
<locale android:name="pt-BR"/>
<locale android:name="cs"/>
</locale-config>
+5
View File
@@ -211,6 +211,11 @@
android:title="@string/title_enable_hdr"
android:summary="@string/summary_enable_hdr"
android:defaultValue="false" />
<CheckBoxPreference
android:key="checkbox_full_range"
android:title="@string/title_full_range"
android:summary="@string/summary_full_range"
android:defaultValue="false" />
<CheckBoxPreference
android:key="checkbox_enable_perf_overlay"
android:title="@string/title_enable_perf_overlay"
@@ -38,7 +38,8 @@ public class EvdevCaptureProvider extends InputCaptureProvider {
public void run() {
int deltaX = 0;
int deltaY = 0;
byte deltaScroll = 0;
byte deltaVScroll = 0;
byte deltaHScroll = 0;
// Bind a local listening socket for evdevreader to connect to
try {
@@ -115,9 +116,13 @@ public class EvdevCaptureProvider extends InputCaptureProvider {
listener.mouseMove(deltaX, deltaY);
deltaX = deltaY = 0;
}
if (deltaScroll != 0) {
listener.mouseScroll(deltaScroll);
deltaScroll = 0;
if (deltaVScroll != 0) {
listener.mouseVScroll(deltaVScroll);
deltaVScroll = 0;
}
if (deltaHScroll != 0) {
listener.mouseHScroll(deltaHScroll);
deltaHScroll = 0;
}
break;
@@ -129,8 +134,11 @@ public class EvdevCaptureProvider extends InputCaptureProvider {
case EvdevEvent.REL_Y:
deltaY = event.value;
break;
case EvdevEvent.REL_HWHEEL:
deltaHScroll = (byte) event.value;
break;
case EvdevEvent.REL_WHEEL:
deltaScroll = (byte) event.value;
deltaVScroll = (byte) event.value;
break;
}
break;
@@ -13,6 +13,7 @@ public class EvdevEvent {
/* Relative axes */
public static final short REL_X = 0x00;
public static final short REL_Y = 0x01;
public static final short REL_HWHEEL = 0x06;
public static final short REL_WHEEL = 0x08;
/* Buttons */
+1 -1
View File
@@ -5,7 +5,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.2'
classpath 'com.android.tools.build:gradle:7.4.1'
}
}
@@ -0,0 +1,3 @@
- Fixed several input bugs with the on-screen gamepad
- Implemented recovery logic for video decoder errors
- Updated community contributed translations from Weblate
@@ -0,0 +1 @@
- Added support for GeForce Experience 3.26
@@ -0,0 +1,6 @@
- Qualcomm devices now use HEVC by default for improved efficiency
- Added system key capture on Samsung devices running Android 10 or later
- Improved frame loss handling when using HEVC
- Fixed streaming crash on devices running Android 4.1 to 4.4
- Fixed streaming at resolutions below 720x540 with GeForce Experience 3.26
- Updated community contributed translations from Weblate
@@ -0,0 +1,6 @@
- Added support for custom ports when hosting on Sunshine
- Enabled HEVC by default on additional devices
- Enabled fast HEVC frame loss recovery on additional devices
- Improved audio quality when streaming remotely
- Improved video performance and audio quality when streaming locally over IPv6
- Updated community contributed translations from Weblate
@@ -0,0 +1,7 @@
- Changed the default SDR colorspace from BT.601 to BT.709
- Changed the input capture toggle shortcut from Ctrl+Shift+Z to Ctrl+Alt+Shift+Z for consistency with other clients
- Toggling input capture now properly toggles keyboard capture on Samsung devices
- PC state is now refreshed more quickly after a network change
- Fixed entering IPv6 addresses on the Add PC page
- Added an experimental option to request full range video
- Updated community contributed translations from Weblate
@@ -0,0 +1,10 @@
- Added support for horizontal scrolling with Sunshine hosts
- Enhanced HDR tonemapping when streaming from Sunshine hosts
- Reduced input latency via increased input polling rate
- Added support for typing non-ASCII characters with the software keyboard
- Fixed issues detecting Sunshine and GFE running on the same PC
- Fixed relative mouse mode not working on some Chrome OS devices
- Fixed error message appearing after Wake-on-LAN even when it was successful
- Fixed a bug handling PCs with addresses that contain underscores
- Fixed a bug that could cause Chromecasts to enter 24 Hz mode when streaming
- Fixed touchscreen trackpad mode toggle not appearing on certain devices
@@ -1,6 +1,6 @@
This app streams games, programs, or your full desktop from an NVIDIA GameStream-compatible PC or <a href="https://github.com/SunshineStream/Sunshine">Sunshine Stream</a> on your local network or the Internet. Mouse, keyboard, and controller input is sent from your Android device to the PC.
This app streams games, programs, or your full desktop from your PC or <a href="https://github.com/LizardByte/Sunshine">Sunshine</a> on your local network or the Internet. Mouse, keyboard, and controller input is sent from your Android device to the PC.
Streaming performance may vary based on your client device and network setup. HDR requires an HDR10-capable device, GTX 1000-series GPU, and HDR10-enabled game.
Streaming performance may vary based on your client device and network setup. HDR requires an HDR10-capable device, a GPU that can encode HEVC Main 10, and an HDR10-enabled game.
'''Features'''
* Open-source and completely free (no ads, IAPs, or "Pro")
@@ -9,25 +9,22 @@ Streaming performance may vary based on your client device and network setup. HD
* Up to 4K 120 FPS HDR streaming with 7.1 surround sound
* Keyboard and mouse support (best with Android 8.0 or later)
* Stylus/S-Pen support
* Supports PS3, PS4, Xbox 360, Xbox One, and Android gamepads
* Supports PS3/4/5, Xbox 360/One/Series, and Android gamepads
* Force feedback support
* Local co-op with up to 4 connected controllers
* Mouse control via gamepad by long-pressing Start
'''PC Requirements for NVIDIA'''
* NVIDIA GeForce GTX/RTX or NVIDIA Quadro GPU
* Windows 7 or later
* NVIDIA GeForce Experience or NVIDIA Quadro Experience installed
'''PC Requirements for SunshineStream'''
* Linux, MacOS, Windows
* AMD, Nvidia GPUs or Software encoding
'''Quick Setup Instructions'''
# Make sure GeForce/Quadro Experience is open on your PC. Turn on GameStream in the SHIELD settings page.
'''Quick Setup Host Instructions for GeForce Experience (NVIDIA-only)'''
# Make sure GeForce Experience is open on your PC. Turn on GameStream in the SHIELD settings page.
# Tap on the PC in Moonlight and type the PIN on your PC
# Start streaming!
'''Quick Setup Host Instructions for Sunshine (all GPUs)'''
# Install Sunshine on your PC from https://github.com/LizardByte/Sunshine/releases
# Navigate to the Sunshine Web UI on your PC for first-time setup
# Tap on the PC in Moonlight and type the PIN in the Sunshine Web UI on your PC
# Start streaming!
To have a good experience, you need a mid to high-end wireless router with a good wireless connection to your Android device (5 GHz highly recommended) and a good connection from your PC to your router (Ethernet highly recommended).
'''Detailed Setup Instructions'''
@@ -1 +1 @@
Play games from your PC on Android (NVIDIA or SunshineStream)
Play games from your PC on Android
+1 -1
View File
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists