-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
feat(capture/linux): Support XDG portal and Pipewire #2507
Draft
garnacho
wants to merge
2
commits into
LizardByte:master
Choose a base branch
from
garnacho:xdg-portal
base: master
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.
+843
−2
Draft
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -189,12 +189,29 @@ if(X11_FOUND) | |||||||||||||||||||||||
"${CMAKE_SOURCE_DIR}/src/platform/linux/x11grab.cpp") | ||||||||||||||||||||||||
endif() | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
# XDG portal | ||||||||||||||||||||||||
if (${SUNSHINE_ENABLE_PORTAL}) | ||||||||||||||||||||||||
pkg_check_modules(GIO gio-2.0 gio-unix-2.0) | ||||||||||||||||||||||||
pkg_check_modules(PIPEWIRE libpipewire-0.3) | ||||||||||||||||||||||||
else() | ||||||||||||||||||||||||
set(GIO_FOUND OFF) | ||||||||||||||||||||||||
set(PIPEWIRE_FOUND OFF) | ||||||||||||||||||||||||
endif() | ||||||||||||||||||||||||
if(PIPEWIRE_FOUND) | ||||||||||||||||||||||||
add_compile_definitions(SUNSHINE_BUILD_PORTAL) | ||||||||||||||||||||||||
include_directories(${GIO_INCLUDE_DIRS} ${PIPEWIRE_INCLUDE_DIRS}) | ||||||||||||||||||||||||
list(APPEND PLATFORM_LIBRARIES ${GIO_LIBRARIES} ${PIPEWIRE_LIBRARIES}) | ||||||||||||||||||||||||
list(APPEND PLATFORM_TARGET_FILES | ||||||||||||||||||||||||
"${CMAKE_SOURCE_DIR}/src/platform/linux/portalgrab.cpp") | ||||||||||||||||||||||||
endif() | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
if(NOT ${CUDA_FOUND} | ||||||||||||||||||||||||
AND NOT ${WAYLAND_FOUND} | ||||||||||||||||||||||||
AND NOT ${X11_FOUND} | ||||||||||||||||||||||||
AND NOT ${PIPEWIRE_FOUND} | ||||||||||||||||||||||||
AND NOT (${LIBDRM_FOUND} AND ${LIBCAP_FOUND}) | ||||||||||||||||||||||||
AND NOT ${LIBVA_FOUND}) | ||||||||||||||||||||||||
Comment on lines
209
to
213
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||
message(FATAL_ERROR "Couldn't find either cuda, wayland, x11, (libdrm and libcap), or libva") | ||||||||||||||||||||||||
message(FATAL_ERROR "Couldn't find either cuda, wayland, x11, pipewire, (libdrm and libcap), or libva") | ||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Let's alphabetize these. |
||||||||||||||||||||||||
endif() | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
# tray icon | ||||||||||||||||||||||||
|
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Runtime deps will need to be added here: https://github.com/LizardByte/Sunshine/blob/master/cmake/packaging/linux.cmake#L43-L73
And for packaging need to be added in these different places:
Sunshine/scripts/linux_build.sh
Line 88 in 7dd836d
Sunshine/scripts/linux_build.sh
Line 151 in 7dd836d
Sunshine/packaging/sunshine.rb
Line 40 in 7dd836d
Sunshine/packaging/linux/Arch/PKGBUILD
Line 15 in 7dd836d
Sunshine/packaging/linux/fedora/Sunshine.spec
Line 18 in 7dd836d
Sunshine/packaging/linux/flatpak/dev.lizardbyte.app.Sunshine.yml
Line 31 in 7dd836d