-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Problem Statement
Streams need to be linked to devices before they can be used. There is a set of rules that determines what happens when a device is not found or destroyed called linking policy.
By default pipewire silently switches to some compatible or a default device, which is likely undesirable in most cases. It would be better to surface the problem to the user and let them decide whether they want to wait, reconfigure, or terminate the stream.
Proposed Solution
Use the following linking policy for non-default devices.
node.dont-reconnect: true (defaultfalse) <- we get an error when the device is destroyed.node.dont-fallback: true (defaultfalse) <- we get an error when the device is not found; this should only happen if the device is destroyed right after enumeration, so it's much less important.node.dont-move: false (defaultfalse)node.linger: false (defaultfalse)
These errors need to be surfaced to the user in some way. The obvious choice would be to accept a new error callback, invoked in these situations; cpal also has an API of this form.
Alternative Solutions
Expose the linking policy configuration to the user. This would need to be made pipewire-specific or we would need to find a portable way to do it (presumably other drivers also have similar settings).
It might be desirable to let users specify a general Properties value so that they can tune any stream properties themselves but that's a bigger can of worms.
Example Usage
TBD
Provide an example of how this feature would be used:
// Your example code hereAdditional Context
N/A
Checklist
- I have searched for existing issues that may be similar
- I have explained the feature's value proposition
- I have provided concrete examples
Metadata
Metadata
Assignees
Labels
Projects
Status