Feature request: `port-factory` module
It's the requirement of the session manager to create port objects on nodes, and pipewire-media-session
and WirePlumber have slightly different ways of doing that. Both, however, involve changing the PortConfig
parameter on the node object. I'm new to working with pipewire as a developer, but this feels a bit like an implementation detail that should not leak outside the pipewire daemon.
It also seems to be violating the design concept of ownership, since client nodes are created by the clients. However, even setting aside whether it makes sense for this responsibility to be on the session manager at all, a port-factory
module/factory would allow unifying the logic, validation, etc in different session managers. It would also allow ports to be defined in config using the same validation/logic - this exists for adapters with auto-port-config
, but not for other nodes.
Context: I'm trying to implement a very very minimal session manager (for a two-node graph) in rust and finding it extremely tricky and error-prone to create ports.