-
-
Notifications
You must be signed in to change notification settings - Fork 205
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Audio portal #1129
Comments
One question here is: does it make to keep the camera separate? Or could this just be an 'Pipewire access' portal? I seem to remember that people have asked for screencast+audio before |
Screencast + audio has been requested on the PipeWire repo and here on x-d-p before. It's a sought after feature for livestreaming usecases as well as for applications like Zoom and Discord. I think Zoom already has a working implementation as of right now, but I could be wrong. Something else for consideration, maybe you could allow certain applications to only allow certain speaker devices, A similar WirePlumber issue exists for this, but hasn't been addressed so far. Not to say there should be a pop-up to select which device to play audio (which would be quite ridiculous), but having a way to allow applications to only use a PipeWire sink to output audio to that can be transformed later down the line would be terrific. |
I think the screencast+audio case would be entirely contained within the Screencast portal. Apps request a screencast with audio, get a PipeWire remote, and connect to whatever streams are available there. @Obsessee per-device control sounds like a policy to implement on the media session (WirePlumber) level, not on portal level. |
Since it's just audio, why not group camera and microphone as a request for audio input? |
Sure |
Differentiating between switches for input and output would be really terrific. I'd like to disallow badly behaving apps from capturing my microphone for voice input when I'm just using it to play music. Would especially help for fat fingering buttons on a Linux phone. I feel like bringing this up now before there's an implementation because I don't think it'd be considered a big enough issue to revise the portal later down the line.
I think application audio would probably be better fit for a Media Sharing portal, as it's not a (physical) device. |
Another device category I did not consider: MIDI devices. They're managed by PipeWire as well. |
PulseAudio access is done with About the sources:
Also how do you specify the control of the graph? Example Helvum. Or the DAW that want to control all the audio, but do not need the video. Shall we have a permission for fuller access or shall grant it like it is currently done with |
This sounds a bit like the devices portal that has been discussed as a "replacement" for the camera portal. Perhaps a less generic name is needed than "devices". A "audio" portal that doesn't involve cameras could work too I guess, but it should ideally be easy to open a PipeWire remote that gets you both microphone and camera streams. The "OpenPipeWireRemote" you add here adds different sources that would be exposed in the remote, including "camera", is that intentional?
The point here is to create some predictable expectations. If an app gets "microphone" access, it shouldn't be able to "eaves drop" on every app's PipeWire source. In other words, applications can be audio input, but that doesn't mean it's a "microphone". |
Yes indeed. |
We seem to cyclicly float between "specific portals for independent categories of devices", and "generic portal covering pretty much all that PipeWire covers". I can see pros and cons for both approaches, and I haven't really made my mind about it. I like the elegance and explicit semantic of specific portals. Want a camera? Camera portal; need audio? Audio portal; etc. But the downside is that we have to copy-paste an almost identical API in each one of them ( A catch-all PipeWire portal ("Devices" portal) would solve the multiple remotes problem, apps would be able to request multiple classes of devices in a single call ( I don't have a conclusive answer here, but I'm slightly happier with separate portals, even if that means apps having to open multiple PipeWire remotes. We can encode domain-specific knowledge in these portals - like the discussion above about audio device types, which wouldn't apply to camera video. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Right now, the almost ubiquitous way for sandboxed applications to access audio is through PulseAudio (even if the other end of the socket is PipeWire). On Flatpak, that translates to most apps having the
pipewire
socket always enabled as a static permission.This is not ideal for multiple reasons: we're trying to move away from static permissions as much as possible; and this mechanism doesn't give much granularity over permissions to control audio.
We should discuss and explore introducing an Audio portal, that would operate much like the Camera portal, but focused on the various ways apps can use audio devices.
The D-Bus interface would look roughly like this:
Design Considerations
CC @hfiguiere @matthiasclasen @jadahl
The text was updated successfully, but these errors were encountered: