Bug 453641

Summary: Pipewire capture node attributes could use more information
Product: [Plasma] kwin Reporter: winblocker
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: normal CC: aleixpol, jgrulich, nate
Priority: NOR    
Version First Reported In: 5.24.5   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description winblocker 2022-05-10 23:47:27 UTC
SUMMARY
In a pipewire video capture session the node as returned by "pw-cli ls Node" could benefit from additional information. For example if i want to match a "Stream/Output/Audio" node to a "Stream/Output/Video" node from a window capture there is not enough information. The current "Stream/Output/Video" node (window capture) returned by "pw-cli ls Node" looks like this:

        id 65, type PipeWire:Interface:Node/3
                object.serial = "769"
                client.id = "177"
                node.name = "kwin_wayland"
                media.class = "Stream/Output/Video"

From looking at other nodes listed on my system there should be additional properties like node.nick and node.description that could be used. My proposal is to change the provided info so that the application name is provided instead of "kwin_wayland" for window capture nodes. An optional extension of this proposal would be to provide more information like screen name (ex. wayland-0) or monitor name for screen capture nodes.
Sidenote: node.nick takes precedence in applications like helvum so providing the window title / application name there would be preferred if name and nick are both used.

STEPS TO REPRODUCE
1. Start a pipewire video capture
2. Run "pw-cli ls Node" through terminal

SOFTWARE/OS VERSIONS
Operating System: Manjaro Linux
KDE Plasma Version: 5.24.5
KDE Frameworks Version: 5.93.0
Qt Version: 5.15.3
Kernel Version: 5.17.6-1-MANJARO (64-bit)
Graphics Platform: Wayland
Processors: 32 × AMD Ryzen 9 5950X 16-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: AMD Radeon RX 6900 XT