-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Dimidium Totius (in preparation for PipeWire camera and audio, part 1) #8153
Dimidium Totius (in preparation for PipeWire camera and audio, part 1) #8153
Conversation
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.
looks fine and works on my machine.
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.
Commit message nits:
Remove the pipewire_node field, and just create the stream directly
from the passed now.
Perhaps missing a word? I feel like something is amiss.
- existance -> existence
- prespective -> perspective
- screencast -?> ScreenCast
- ying -> yin
Other than nits, and the previous review, I really don't have any items I'm worried about.
Instead of returning an opaque void* pointer, return the leaf C type obs_pipewire_data*. This commit introduces no functional changes.
When the linux-pipewire plugin is unloaded, make sure to cleanup the D-Bus proxy for the ScreenCast portal too. This effectively doesn't change anything, but it's always good to keep up with the code hygiene.
And let each portal pass the stream properties relevant to them. This makes the pipewire.c more independent of the actual portal by providing a wrapper to create a stream. This will be relevant later, when linux-pipewire introduces more portals like the Camera one.
This separation of obs_pipewire_create() and play_pipewire_stream() was an artifact of how the original code was written, and there is no reason to keep this separation anymore. Inlining it will help future commits too.
We don't actually need to restore the node id anymore, since this is handled by the screencast-portal.c code now. Remove the pipewire_node field, and just create the stream directly from the passed file descriptor now.
This commit introduces an important distinction in the initialization process that is essential to future camera and audio work: it splits creating and connecting to the PipeWire socket, from connecting to specific PipeWire nodes. Right now, for the only consumer in existence - the ScreenCast portal code - this distinction is irrelevant, but from an API perspective it just makes sense to model it this way.
Next commits will introduce new obs_pipewire_* types, so this renaming will make it slightly easier to read the code with different types.
A trivial cosmetic change. This groups the constructor and destructor together. Two sides of the same coin, yin and yang, bound by their nature, and linked by their position in code.
3a76148
to
0a6ef85
Compare
Thanks for the review. The commit messages were adjusted. |
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.
Looks good to me.
Description
Various cleanups in preparation for making
linux-pipewire
handle cameras and audio. This pull request contains the "easy" half of #6669 and should not be controversial.What is done here is:
Motivation and Context
Prepare the
linux-pipewire
plugin to receive support for cameras and audio. This is also an effort to get #6669 unstuck.How Has This Been Tested?
Types of changes
Checklist: