Commit Graph

681 Commits

Author SHA1 Message Date
Vladimir Solomatin
5395a9a515 fix(linux/xdgportal): don't pass external_only argument to eglQueryDmaBufModifiersEXT (#4754) 2026-02-26 15:00:18 -05:00
Conn O'Griofa
502be64682 fix(linux/kmsgrab): fix handle leak in update_cursor (#4757) 2026-02-22 15:56:35 -05:00
Conn O'Griofa
95da4b5c85 feat(linux/xdgportal): implement reactive capture with duplicate detection (#4740)
* feat(linux/xdgportal): implement reactive capture with duplicate detection

Replaces polling-based frame capture with event-driven approach using
condition variables for immediate notification when new frames arrive.

Changes:
- on_process: Notify snapshot() via condition variable on new buffer
- fill_img: Extract and pass through PipeWire seq/pts metadata
- snapshot: Block on condition variable with timeout; detect and skip
  duplicate frames using seq/pts metadata to avoid redundant processing
- capture: Simplify catch-up logic to maintain timeline consistency
  by advancing in delay intervals without resetting origin

This eliminates tight polling loops and reduces unnecessary frame
processing when compositor reuses buffers.

* feat(linux/xdgportal): optimize software path and fix modesetting crashes

This patch addresses a performance bottleneck in the software encoding
path and a race condition during PipeWire stream re-initialization.

1. Performance Optimization (Double-Buffering):
   - Implemented a front/back buffer swapping strategy for the software
     (MemPtr) path.
   - Frame data is copied to a `back_buffer` without holding the
     `frame_mutex`, then swapped with the `front_buffer` under a
     short-lived lock.
   - This prevents memory bandwidth contention and allows the encoder
     and PipeWire threads to work in parallel without blocking.

2. Stability Fixes:
   - Implemented `frame_mutex` protection across `on_process`, `fill_img`,
     and `cleanup_stream` to prevent use-after-free and dangling pointers
     during resolution changes.
   - Enhanced `fill_img` to safely bail out if the stream is dead or
     no new frame is ready.
   - Added explicit state resets (`frame_ready = false`, `current_buffer = nullptr`)
     to ensure the encoder thread ignores stale data during re-init.

Fixes intermittent segfaults during resolution changes and restores
performance on systems using software encoding.

* feat(linux/xdgportal): support x-nv-video[0].clientRefreshRateX100 for requesting fractional NTSC framerates

* fix(linux/xdgportal): improve dbus & pipewire teardown logic

* Close dbus proxy connection; fixes orphaned XDG notification icons after
  mode changes or stream pauses via XDG icon interaction.
* Migrate shared pipewire destructor logic into cleanup_stream() to reduce
  duplication.

---------

Co-authored-by: Andy Grundman <andy@hybridized.org>
2026-02-22 12:43:49 -05:00
dependabot[bot]
00a52bb933 build(deps): bump third-party/moonlight-common-c from 6250fa2 to b187204 (#4751)
* build(deps): bump third-party/moonlight-common-c

Bumps [third-party/moonlight-common-c](https://github.com/moonlight-stream/moonlight-common-c) from `6250fa2` to `b187204`.
- [Commits](6250fa29ee...b187204769)

---
updated-dependencies:
- dependency-name: third-party/moonlight-common-c
  dependency-version: b187204769974b9af9d2a3c3bca83ad40e4f1ac9
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Add DATA_SHARDS_MAX definition

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Cameron Gutman <aicommander@gmail.com>
2026-02-20 23:15:32 -05:00
herbie
c9bcee4480 fix(linux): fix touch misalignment for wlgrab on scaled outputs (#4665) 2026-02-17 23:40:16 -05:00
Conn O'Griofa
24c5dfd622 fix(linux/xdgportal): stream scaling and mode change support (#4700) 2026-02-15 17:42:11 -05:00
Andy Grundman
941f6453c1 feat(macos/tray): allow tray icon paths to be set at runtime from .app bundle (#4711) 2026-02-13 08:19:39 -05:00
Conn O'Griofa
638cd699d4 fix(linux/xdgportal): improve thread loop (un)locking & teardown logic (#4705) 2026-02-12 10:34:22 -05:00
Yundi339
e22c5c9e8e fix(log): prevent sink destruction caused by backend exceptions (#4694) 2026-02-10 09:13:56 -05:00
David Lane
5bd3a2b225 docs: miscellaneous updates (#4597) 2026-02-08 00:12:38 -05:00
Conn O'Griofa
2f61116432 revert: "fix(linux/xdgportal): flag stream as realtime" (#4686)
This reverts commit bf574afdfd.
2026-02-07 22:03:27 -05:00
Coia Prant
d591643706 build(windows): add arm64 support (#3905)
Signed-off-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
Signed-off-by: Coia Prant <coiaprant@gmail.com>
Co-authored-by: Ricky8955555 <rkmiao@duck.com>
Co-authored-by: Mike Fara <mjfara@gmail.com>
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
2026-02-07 21:03:05 -05:00
Conn O'Griofa
bf574afdfd fix(linux/xdgportal): flag stream as realtime (#4684) 2026-02-07 11:32:37 -05:00
Conn O'Griofa
b48a96f9f1 fix(linux/xdgportal): populate host latency statistics (#4685) 2026-02-07 09:40:06 -05:00
David Lane
874880e5ea feat(linux)!: Support streaming through XDG portals and Pipewire (#4417)
Co-authored-by: Carlos Garnacho <carlosg@gnome.org>
Co-authored-by: Carson Katri <Carson.katri@gmail.com>
Co-authored-by: Bond <bond-d@ukr.net>
Co-authored-by: d.bondarev <d.bondarev@crm-onebox.com>
Co-authored-by: Conn O'Griofa <connogriofa@gmail.com>
2026-02-03 08:19:02 -05:00
David Lane
3ce39b36d0 fix(web-ui): modernize UI (#4631) 2026-01-29 10:16:37 -05:00
Cilps the Pumpkin
76b3a8596f feat(api): add application image endpoint (#4627)
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
2026-01-27 16:34:03 -05:00
Cole Leavitt
38a94b3cfd fix(linux/kms): skip NVIDIA cards for VAAPI on hybrid GPU laptops (#4473) 2026-01-25 19:10:11 -05:00
David Lane
7e286b90b6 feat(windows): add ViGEmBus driver management API and UI integration (#4625)
Introduces backend API endpoints for ViGEmBus status and installation, updates Windows build scripts to handle ViGEmBus versioning and installer download, and integrates ViGEmBus status and installation controls into the web UI. Removes legacy PowerShell scripts for gamepad driver management and related NSIS installer commands.
2026-01-25 12:06:51 -05:00
Andy Grundman
3a12f96a86 perf(threads): implement adjust_thread_priority for macOS and add set_thread_name (#4605) 2026-01-22 19:38:09 -05:00
Andy Grundman
aea9512682 chore: clean up implicit conversions (#4611) 2026-01-22 14:39:52 -05:00
Julio Sanz
aca5d23f4e fix(linux): fix issues with rendering and touchscreens when displays are scaled (#4607) 2026-01-21 18:29:53 -05:00
David Lane
19a6301140 build(windows): fix rc version for llvm clang (#4606) 2026-01-20 15:47:02 -05:00
Julio Sanz
c313851878 fix(linux): added support for logical screen size with zxdg_output_v1 (#4594) 2026-01-17 20:32:24 -05:00
Andy Grundman
b0bf510564 fix(macos/input): Fix handling of mouse wheel scroll events (#4592) 2026-01-17 09:29:16 -05:00
David Lane
ab52e27e0e fix(audio-info): crash when device name contains special characters (#4095) 2026-01-16 22:41:23 -05:00
tstokes22
fd2bfaac7e fix(windows): resolve disappearing cursor after KVM switch (#4407) 2026-01-16 19:45:16 -05:00
Andrew Marshall
8294ab23c1 fix(config): create apps.json from default after loading file_apps cfg (#4568) 2026-01-16 14:47:05 -05:00
Dregu
cf7b0dc7d3 fix(linux/wlr): Fix dmabuf buffer params protocol violation/leak (#4588) 2026-01-16 13:19:45 -05:00
Cameron Gutman
4a9f17415b build(vaapi): Add vaMapBuffers2() stub (#4581) 2026-01-12 23:33:00 -06:00
Cameron Gutman
5bacfd59ae fix(nvenc): Include bitstream restrictions in H.264/HEVC SPS (#4556) 2026-01-05 01:52:57 -06:00
David Lane
0aa7e3fd67 feat(network): allow binding to specific interface (#4481) 2025-12-23 13:08:12 -05:00
David Lane
3672254647 fix: namespace declaration for boost::process::v1 (#4518) 2025-12-20 10:25:26 -05:00
Cameron Gutman
f1f9e755a9 fix(tray): use the blocking event loop to avoid wasting power (#4457) 2025-11-29 12:39:45 -06:00
StringWeaver
adb443f0d1 fix(win): Windows.Graphics.Capture API frame rate capped at 60fps (#4424) 2025-11-16 21:53:23 -05:00
Martijn Courteaux
852dee0a68 fix(launch): Fix several launch failure conditions (exceptions thrown in child.wait, and boost::split_unix) (#4390) 2025-11-12 10:07:15 -05:00
David Lane
1d6d916b7a build: add freebsd support (#4049) 2025-11-11 23:46:11 -05:00
Martijn Courteaux
8836db5dbd fix(config): Add missing framerateX100 fields at the initializers for the video::config_t literals (#4391)
fix(config): Add missing frameX100 fields at the initializers for the video::config_t literals.
2025-11-06 19:55:20 -06:00
ns6089
cdb7e2b813 feat(video): use unified color conversion matrix generator (#4387) 2025-11-05 08:49:56 -05:00
David Lane
875ad1d11a build(deps): bump boost to 1.89 (#4253) 2025-11-01 21:02:15 -04:00
Sandro
f1a667532b fix(config): ensure apps.json is writeable (#4249) 2025-10-25 22:59:32 -04:00
xd-byte
d3af56d6fd fix(windows): Memory leak when EnumAdapters1 uses dxgi::adapter_t address as parameter (#4340) 2025-10-25 11:06:52 -04:00
Andy Grundman
6ed0c7a8f2 feat(fps): support x-nv-video[0].clientRefreshRateX100 for requesting fractional NTSC framerates (#4019) 2025-10-11 19:56:12 -04:00
Mariotaku
fbcf2116c2 feat(audio): allow sending continuous audio (#4261) 2025-10-11 16:53:11 -04:00
Kishi
8bff4d0780 feat(tray): Add runtime config option to enable/disable system tray (#4208) 2025-09-01 14:07:31 -04:00
ReenigneArcher
73f84fb6dd fix(tray): optionally run tray in main event loop enabling support for macOS (#3818)
Co-authored-by: Lukas Senionis <22381748+FrogTheFrog@users.noreply.github.com>
2025-09-01 11:30:18 -04:00
LizardByte-bot
705d763729 chore(l10n): update translations (#4115)
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
2025-08-31 16:06:09 -04:00
Kishi
a3da5edb68 fix(input): Add missing default value for ds5_inputtino_randomize_mac (#4207) 2025-08-29 09:52:56 -04:00
Ehren Bendler
26e5f2f610 build(Linux): Cleanup CUDA compiler options for modern versions (#4162) 2025-08-19 10:05:25 -04:00
Kishi
cc6e853fba feat(input/linux): allow ds5 gamepads to have a fixed device mac based on controller index (#4158) 2025-08-16 18:17:04 -04:00