tools: add Latency reporting to pw-link

Rework how the monitor mode works. Instead of having separate paths for
the list and monitor mode, reuse the list mode. We simply mark all
changes and then list the changes in a loop.

This makes it possible to accumulate some updates and print them
together.

Add a -t option to list the latency params on a port.
This commit is contained in:
Wim Taymans 2025-09-03 14:38:03 +02:00
parent 0f1e4f8706
commit 0877eba761
2 changed files with 168 additions and 110 deletions

View file

@ -4,7 +4,7 @@ The PipeWire Link Command
# SYNOPSIS
**pw-link** \[*options*\] -o-l \[*out-pattern*\] \[*in-pattern*\]
**pw-link** \[*options*\] -o|-i|-l|-t \[*out-pattern*\] \[*in-pattern*\]
**pw-link** \[*options*\] *output* *input*
@ -42,6 +42,9 @@ List input ports
\par -l | \--links
List links
\par -t | \--latency
List port latencies
\par -m | \--monitor
Monitor links and ports. **pw-link** will not exit but monitor and print
new and destroyed ports or links.