-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
Use portal to request access to camera #238
Draft
marbetschar
wants to merge
5
commits into
main
Choose a base branch
from
portal/access_camera
base: main
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.
Draft
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
9084da5
Use libportal to request access to camera
marbetschar 992f1b9
Make Linter Happy
marbetschar 82edeb7
Fixed uncatched error due to namespace conflict
marbetschar edd7979
Experimenting with pipewiresrc
marbetschar 3b12df8
Using realize signal renders portal dialog on top
marbetschar 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
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
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.
Hi there. I've been looking into starting a new application involving webcam recording with GStreamer so I was taking a look through this source code and found this PR.
This function is largely duplicate code with the
create_pipeline
function which uses thev4l2src
GStreamer element. The common code could be factored out to another function. However, I'm not sure it's really necessary to keep the V4L2 code path at all. From https://blogs.gnome.org/uraeus/2021/10/01/pipewire-and-fixing-the-linux-video-capture-stack/ :In the future you may be able to remove the explicit call to the XDG Portal too:
However, taking a look at the source code for the pipewiresrc GStreamer element, I don't see any usage of the XDG Portal. I'm unclear if that's still on the roadmap to be implemented or if that idea was dismissed. I asked in the Pipewire Matrix room earlier today but haven't gotten a response yet.
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.
Cheese and Kamoso use the
camerabin
GStreamer element.Pipewire registers
pipewiresrc
withGST_RANK_PRIMARY + 1
socamerabin
automatically usespipewiresrc
if it is available. Runninggst-launch-1.0 -v camerabin
confirms this:Without Pipewire's GStreamer plugin,
camerabin
uses V4L2, runningGST_PLUGIN_FEATURE_RANK=pipewiresrc:NONE gst-launch-1.0 -v camerabin
:So
camerabin
would support both the cases of Pipewire being present or not. However, I don't know if there's a way to pass the file descriptor from the portal tocamerabin
.