Commit graph

28 commits

Author SHA1 Message Date
Wim Taymans
6e88c30080 pw-top: do initial refresh after first data 2022-10-21 16:44:59 +02:00
Wim Taymans
ec90b575d7 pw-top: also show IEC958 passthrough formats 2022-10-21 10:23:34 +02:00
Niklāvs Koļesņikovs
cba334f028 treewide: fix some strict-prototypes Clang warnings/errors
Clang 15 at least with my build configuration emits warnings about
function prototypes that lack argument types. Most notably this
happens with functions that take no arguments which in compiler view
equates to the void type i.e. void f(void) instead of void f(). As I
understand, this will become an error in some future Clang release,
so might as well fix it now.

Since these were discovered not by a linter but by the actual compiler
for my particular build configuration, some f() may have escaped for
now. But at least it's enough to build PipeWire with most optional
features enabled even when -Werror=strict-prototypes is enabled.

For anyone else wanting to have a go at this, these can be upgraded
from warnings to errors by adding -Werror=strict-prototypes to the
custom CFLAGS which probably works with GCC, too, but has only been
done with Clang 15.0.2.

Finally my editor automatically stripped trailing spaces upon saving
the modified files. I assume it's probably not worth keeping those
invisible bytes around but this may have slightly dubious implications
as it did also turn indented empty lines of JACK license header into
regular empty lines.

Signed-off-by: Niklāvs Koļesņikovs <89q1r14hd@relay.firefox.com>
2022-10-12 07:32:47 +00:00
Jonas Holmberg
70c314f254 pw-top: Print microseconds as "us"
Avoid unicode characters in the columns since it breaks formatting on
non-unicode hosts.
2022-09-08 16:31:48 +02:00
Wim Taymans
75af02edcd stream: add Format and EnumFormat on stream nodes
The stream only has one format/enumformat list for the one port it has
so also expose this on the node. We can then remove the adapter for
video.

We can also now show midi (control) streams as the format in pw-top.
2022-09-06 20:42:19 +02:00
Wim Taymans
e9b7667b55 pw-top: remove some slashes to avoid confusion
Update man page
2022-09-06 18:32:56 +02:00
Wim Taymans
76631e6251 pw-top: show negotiated formats
Add a column with negotiated formats.
It requires an adapter that will enumerate the port formats so it does
not work for video streams yet.

Fixes #2566
2022-09-06 15:36:58 +02:00
Wim Taymans
cbef4a601f pw-top: improve error output
Print +++ when the node was signal/awake but not awake/finish.
Print --- otherwise.
2022-04-19 17:49:46 +02:00
Wim Taymans
ee2b20a55c pw-top: handle invalid timings
Handle invalid signal, awake and finish timings by placing
*** instead of huge numbers.
2022-04-19 17:35:51 +02:00
Wim Taymans
e3ff445d4b pw-top: clear errors when idle 2022-04-19 12:26:20 +02:00
Wim Taymans
be11da540a pw-top: clear measurements when idle 2022-04-19 12:23:48 +02:00
Wim Taymans
ae8c6f827b pw-top: remove nodes from driver when idle
When we detect that no new profiler info has arrived for a node, assume
it was removed from the driver.

This avoids having idle nodes seemingly attached to an idle driver
when there is no activity.
2022-04-19 12:06:53 +02:00
Tasos Sahanidis
daf85f1cd6 pw-top: Fix unicode character clipping
Instead of using snprintf to clip the node line to the terminal width,
causing multibyte characters to be split improperly, this lets curses
wrap the text as it normally would, and then overwrites the wrapped
text with the next line, simulating clipping.
2022-02-28 18:30:34 +00:00
Wim Taymans
e82f775fb3 tools: remove listeners 2022-02-09 16:30:13 +01:00
Wim Taymans
afc88a12e5 tools: cleanup up printf
Make all tools output to stdout (pw-mon mostly) so that we can pipe the
output around.
Send errors to stderr.
fprintf(stdout, ...)  -> printf(...)
setlinebuf for stdout so that pipe works better.

See #2110
2022-02-07 17:03:46 +01:00
George Kiagiadakis
59407d2f08 includes: update all references to extensions to point to pipewire/extensions
This also brings the advantage that all tools, examples, modules, components
can also be compiled standalone out-of-tree using libpipewire from the system
2021-06-18 17:54:18 +03:00
Peter Hutterer
e1211e6a94 tools: fix scan-build errors for unused variables
All cases of value stored but never read
2021-05-26 07:51:27 +00:00
Peter Hutterer
7697ed0757 treewide: replace strcmp() == 0 with spa_streq()
This change is only done in source files for now, header files will be done
separately.
2021-05-18 22:10:27 +10:00
Wim Taymans
c85a04fb49 tools: add some check when parsing the profile info
Fail when we can't parse the profile info to avoid using invalid
values.
2021-03-27 20:37:26 +01:00
Arseny Maslennikov
403f27c531 meson, pw-top: use ncursesw
Some PulseAudio clients are known to use localised client and
stream names as values for the respective PulseAudio props, most
notably plain old pavucontrol.

We call setlocale before anything else for ncurses to display
localised text correctly. We also want to link with ncursesw, which
supports multibyte Unicode locales.
2021-03-25 11:22:52 +00:00
Wim Taymans
81ebc33b57 pw-top: period -> quantum
period has other connotations in alsa
2021-02-18 09:16:49 +01:00
Wim Taymans
be7415dac8 pw-top: improve period and rate columns 2021-02-03 11:46:01 +01:00
Wim Taymans
2b44f42845 pass the complete buffer size to snprintf
There is no reason to pass size-1, snprintf will always put a \0
at the end.
2021-02-02 12:09:29 +01:00
Wim Taymans
07b52299db pw-top: make a line shorter so that it fits better 2021-01-21 17:46:47 +01:00
Wim Taymans
4fb967211e pw-top: refresh immediately 2021-01-21 15:20:07 +01:00
Nicolai Syvertsen
7a82be3361 pw-top: Fallback to app name if no node name/desc exists 2021-01-04 19:26:44 +00:00
Wim Taymans
f28fb692a4 pw-top: handle io 2020-12-25 16:35:38 +01:00
Wim Taymans
ae8f8b25f6 pw-top: add new tool
Uses ncurses to display all drivers and nodes with their latency,
error count and DSP usage.
2020-12-25 16:33:54 +01:00