-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feat(linux/portal): improve XDG portal capture for KDE and dual GPU systems #4510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Traine9
wants to merge
13
commits into
LizardByte:feat/linux/add-xdg-portal-grab
Choose a base branch
from
Traine9:feat/linux/add-xdg-portal-grab
base: feat/linux/add-xdg-portal-grab
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat(linux/portal): improve XDG portal capture for KDE and dual GPU systems #4510
Traine9
wants to merge
13
commits into
LizardByte:feat/linux/add-xdg-portal-grab
from
Traine9:feat/linux/add-xdg-portal-grab
+503
−127
Conversation
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
- Add KDE popup screen capture support - Add ScreenCast-only fallback when RemoteDesktop fails - Add restore_token support for session persistence - Handle dual GPU (Intel + NVIDIA) systems: use memory buffers for CUDA when display is on Intel, enable DMA-BUF when display is on NVIDIA - Add "XDG Portal" option to web UI capture dropdown - Add build instructions for XDG Portal support
26 tasks
- Add null checks in dbus_t destructor before g_object_unref calls - Fix loop variable scope by declaring EGLint i inside for loop - Unify create_session and create_screencast_session into create_portal_session() - Unify start_session and start_screencast_session into start_portal_session() - Refactor connect_to_portal() with helper functions to reduce cognitive complexity - Fix restore_token memory management by using std::string instead of raw pointer 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use the C++ nullptr literal instead of the C-style NULL macro for improved type safety. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add restore token persistence to disk for auto-reconnection - Merge nested if statements for cleaner control flow - Make session_token parameter const where applicable - Rename shadowed parameters (out_pipewire_node, out_width, out_height) - Split variable declarations into separate statements - Use member initializer list in pipewire_t constructor - Replace strstr with std::string_view::find - Extract helper functions to reduce nesting depth 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Encapsulate restore_token in accessor function to avoid global variable - Make format_map static constexpr - Replace C-style arrays with std::array - Use std::string_view::contains instead of find 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use inline variable for restore_token - Convert format_map to std::array - Use range-based for loops for format_map iteration 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace global variable with restore_token_t class using singleton pattern to satisfy SonarCloud's const global variable requirement. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Replace const std::string& with std::string_view in set() - Use const unique_ptr<string> to satisfy const global requirement 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ings Add session_cache_t singleton that caches portal D-Bus session data. This prevents creating multiple screen recording indicators in KDE system tray during encoder probing, as each portal session would otherwise show as a separate recording. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Detect hybrid GPU by checking for Intel vendor (0x8086) in DRM devices - Use memory buffers instead of DMA-BUF for CUDA on hybrid systems - Set row_pitch from pipewire buffer stride for correct CUDA copies - Return timeout when no pipewire buffer available yet 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use const unique_ptr for inline static instance (satisfies const global rule) - Replace std::lock_guard with std::scoped_lock using CTAD 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
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.



Summary
Test plan