Skip to content

Conversation

@ReenigneArcher
Copy link
Member

@ReenigneArcher ReenigneArcher commented Nov 12, 2025

Description

This PR replaces #2507 ... Thanks to @garnacho for the initial work on this!

This PR adds a new "grab" implementation to use XDG desktop portals and Pipewire.

TODO:

Screenshot

Issues Fixed or Closed

Roadmap Issues

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Unit tests have been added or updated for any new or modified functionality

AI Usage

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

This is not present in the glad version imported in Sunshine,
plug the holes so that these functions may be used.
Add a new portal "grab" implementation that will request the necessary
permissions over XDG portals and use Pipewire for video data streaming.
This supports DMA-Buf buffer exchange for hardware accelerated encoding
(VAAPI, nvenc), software encoding will only work with memory buffers.
@codecov
Copy link

codecov bot commented Nov 12, 2025

Bundle Report

Bundle size has no change ✅

@codecov
Copy link

codecov bot commented Nov 12, 2025

Codecov Report

❌ Patch coverage is 9.42928% with 365 lines in your changes missing coverage. Please review.
✅ Project coverage is 11.33%. Comparing base (a2e6fc9) to head (d65baf5).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/platform/linux/portalgrab.cpp 8.65% 347 Missing and 12 partials ⚠️
src/platform/linux/misc.cpp 40.00% 2 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4417      +/-   ##
==========================================
- Coverage   14.23%   11.33%   -2.91%     
==========================================
  Files          89       88       -1     
  Lines       18936    17998     -938     
  Branches     8677     8264     -413     
==========================================
- Hits         2696     2040     -656     
- Misses      12963    15248    +2285     
+ Partials     3277      710    -2567     
Flag Coverage Δ
FreeBSD-14.3-aarch64 ?
FreeBSD-14.3-amd64 ?
Linux-AppImage 8.58% <9.42%> (-2.98%) ⬇️
Windows-AMD64 13.34% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/platform/linux/misc.cpp 10.42% <40.00%> (-4.03%) ⬇️
src/platform/linux/portalgrab.cpp 8.65% <8.65%> (ø)

... and 57 files with indirect coverage changes

Require GIO and PIPEWIRE packages for portal support and use SYSTEM include directories. Also, clarify the fatal error message order for missing dependencies.
Pipewire has been added to the dependency lists for FreeBSD, Arch, Fedora, Homebrew, and Debian-based packaging and build scripts. This ensures proper support and integration for systems using Pipewire.
@ReenigneArcher ReenigneArcher force-pushed the feat/linux/add-xdg-portal-grab branch from f7173e3 to d65baf5 Compare November 15, 2025 03:28
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
111 New issues
111 New Code Smells (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants