We're hiring!
*

New graphing tool for PipeWire debugging

Julian Bouzas avatar

Julian Bouzas
December 09, 2019

Share this post:

Reading time:

PipeWire, the new and emerging open source framework that aims to greatly improve the exchange and management of audio and video streams inside a Linux system, has seen a number of improvements and bug fixes over the past year. With many developers now actively contributing to it, PipeWire is maturing quickly and is well on its way to becoming the new standard.

At Collabora, we have been busy helping clients work with PipeWire, notably Automotive Grade Linux who have chosen to adopt PipeWire for its implementation of the low-level platform audio service, replacing previous solutions like 4A, PulseAudio and AudioManager. Assisting early adopters such as AGL has brought us to design and implement new elements within PipeWire, such as the session & policy management component WirePlumber, which George Kiagiadakis presented in October at the GStreamer Conference in Lyon.

In addition to WirePlumber, we are happy to announce that we have now implemented a new tool to simplify and ease the debugging process. Aptly named pipewire-dot, this new tool generates graph using the dot language depicting all the PipeWire objects and links between them.

The main purpose of this tool is to increase developers' productivity when debugging PipeWire, and quickly visualize how all PipeWire objects are connected with each other. Previously, this could only be done by reading long log files, or by parsing the output of the pipewire-monitor tool with a small script. However, these methods were never visual, and always required that developers spend time checking to see if the PipeWire objects were linked correctly when something was not working. Luckily, developers no longer need to do this, and can now visualize all the PipeWire structure and object properties by running the quick and simple pipewire-dot command.

Running the pipewire-dot command essentially creates a pw.dot file in the current directory that has the graph defined using the Graphviz dot description language. Afterwards, the user can easily display the graph using Graphviz tools such as the xdot command to view the graph directly in a window:

    $ xdot pw.dot

Or render a pw.png image using the dot command:

    $ dot -Tpng pw.dot > pw.png

The tool also accepts different flags that can generate different graphs. The default graph will only display the most common Pipewire objects: nodes, ports and links; which is the most common data the users want to check at first. However, more objects and information can be shown if we pass different options:

--all: This will show all pipewire objects in the graph
--smart: This will only show linked pipewire objects
--detail: This will additionally show all the object properties

Here are some usage examples with the generated graph (click on each image to view larger version):

  • $ pipewire-dot && xdot pw.dot

    PipeWire debugging graph example

  • $ pipewire-dot --all && xdot pw.dot

    PipeWire debugging graph example

  • $ pipewire-dot --smart --detail && xdot pw.dot

    PipeWire debugging graph example

Finally, some improvements could be done in the future to display more information in the generated graph. For example, the tool could be improved by displaying the format of the ports when they are configured. The graph can be very big if PipeWire has many clients using it, so another example of improvement could be adding an option to only display objects that use a specific multimedia device.

PipeWire is really shaping up to be the next big thing in managing media streams on Linux systems. With this new feature, and many other improvements developed by the community, we can now use it to build the next generation of products.

If you are interested in finding out more about PipeWire or need help with consulting services on audio/video in 2020, please reach out to us.

Comments (0)


Add a Comment






Allowed tags: <b><i><br>Add a new comment:


Search the newsroom

Latest Blog Posts

USB 3.0 preliminary support in U-boot for Radxa Rock-5B

31/05/2023

A while back I presented USB 2.0 host support that was added to U-boot for the Radxa Rock-5B RK3588 Rockchip board. This time, USB 3.0 was…

Radxa Rock-5B PCIe and RTL8125B networking in U-boot

18/05/2023

Work continues on the Radxa ROCK5B RK388, as PCIe and RTL8125B networking support in U-boot have now been added. Publishing code as Open…

Introducing Multiview for NVK

03/05/2023

NVK, an open-source Vulkan driver for NVIDIA hardware that is part of Mesa, now supports the Vulkan extension VK_KHR_multiview.

Adding bootloader support for USB 2.0 Host for Radxa ROCK 5B RK3588

27/04/2023

The beauty of Open Source is that we can reuse code written by many other people, keep their authorship, and credit them for their work,…

Meson & VSCode: Develop your project in a modern IDE

18/04/2023

Want to develop your Meson project in a modern IDE? Make sure to install Meson VSCode extension which is now fully functional with the recent…

Carlafox: Towards reliable open-source 3D perception

05/04/2023

Labeling errors are common in present open-source 3D perception datasets, which could have impactful consequences. To tackle this issue,…

Open Since 2005 logo

We use cookies on this website to ensure that you get the best experience. By continuing to use this website you are consenting to the use of these cookies. To find out more please follow this link.

Collabora Ltd © 2005-2023. All rights reserved. Privacy Notice. Sitemap.