fix(xdg-portal): add support for cursor_mode#4620
Draft
ReenigneArcher wants to merge 20 commits intomasterfrom
Draft
fix(xdg-portal): add support for cursor_mode#4620ReenigneArcher wants to merge 20 commits intomasterfrom
ReenigneArcher wants to merge 20 commits intomasterfrom
Conversation
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.
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.
A value of 2 indicates "Remember this Selection". Co-authored-by: Carson Katri <Carson.katri@gmail.com>
…ystems (#4510) Co-authored-by: Carlos Garnacho <carlosg@gnome.org> Co-authored-by: Carson Katri <Carson.katri@gmail.com> Co-authored-by: d.bondarev <d.bondarev@crm-onebox.com>
Corrects the installation path for sunshine-kms to use %{buildroot}%{_bindir} instead of %{_bindir}, ensuring proper packaging for RPM builds.
Replaced raw arrays with std::array for type safety and clarity in buffer and struct allocations throughout portalgrab.cpp. Updated related code to use .data() and .size() where appropriate, improving maintainability and reducing potential for errors.
Changed C-style string constants to array declarations for REQUEST_PREFIX and SESSION_PREFIX. Updated function calls to use std::array::data() for params. Split spa_pod_frame variable declarations for clarity.
Updated path string construction in portalgrab.cpp to use std::format instead of g_strdup_printf, improving type safety and readability.
Applied minor refactoring for improved code clarity and consistency: added [[maybe_unused]] to unused parameters, replaced C-style casts with static_cast, removed unnecessary semicolon, and simplified std::fill_n usage.
Refactored parameter assignment to avoid post-increment in array indexing and improve clarity. Updated token check to use direct character comparison. Replaced enum class usage with 'using enum' for mem_type_e. Improved logging for unrecognized capture status by using std::to_underlying.
Updated function parameters and local variables to use const qualifiers where appropriate. Replaced C-style casts with C++ static_cast for improved type safety and clarity. Minor code cleanups and style improvements.
Added the -DSUNSHINE_ENABLE_PORTAL=ON flag to FreeBSD CI, COPR spec, Flatpak, and linux_build.sh scripts to ensure the portal feature is enabled across all build targets. Also reordered some CMake flags for consistency.
27 tasks
a72c887 to
dcc11f7
Compare
dcc11f7 to
dd56d99
Compare
|
Bundle ReportBundle size has no change ✅ |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4620 +/- ##
==========================================
+ Coverage 15.50% 16.05% +0.55%
==========================================
Files 94 72 -22
Lines 19089 14571 -4518
Branches 8801 6925 -1876
==========================================
- Hits 2960 2340 -620
+ Misses 14346 11339 -3007
+ Partials 1783 892 -891
Flags with carried forward coverage won't be shown. Click here to find out more.
|
4821198 to
a10aed4
Compare
a10aed4 to
cb67b3e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Description
This PR adds support for
cursor_modein XDG portal grab capture.Note: This is fully AI generated.
Screenshot
Issues Fixed or Closed
Roadmap Issues
Type of Change
Checklist
AI Usage