

- #Image capture could not open a connection to the device module Bluetooth
- #Image capture could not open a connection to the device module professional
Which brings us back to PipeWire… Combining parts of all these designs together, PipeWire provides a flexible media server that can be used to implement desktop, embedded, professional and non-professional use cases for both audio and video. The problem here, however, is of course that JACK does not handle well the typical desktop use case and is complex to use for a non-professional. This may involve a “default” device target, but it normally follows a set of more complex user-configurable rules that allow flexibility in setting up the audio processing stage for professional audio applications. The session manager watches for applications connecting or disconnecting and uses its own logic to link them to a device or a peer application. This is left to an external component: the session manager. But unlike PulseAudio, it implements no connection logic internally. JACK similarly allows applications to just create a stream and forget about the device.

On the other side there is JACK, which deals with a specific use case as well: professional audio. Also, PulseAudio does not handle video streams… The problem here, however, is that while this logic is great for most desktop applications, it does not scale well to other use cases. This default device preference can be changed at runtime and application streams can be transparently redurected to another device, abstracting away all complexity. PulseAudio maintains this “default” device preference internally and automatically creates the necessary internal links to make things work when a new stream comes in from an application. Application developers no longer have to provide a means to configure which device to use, although they still can if they want to. In PulseAudio, audio devices are opened and configured internally and audio applications can just create streams of any desired format and request to play or capture from the “default” device. PulseAudio has improved this situation significantly for audio applications.

Last but not least, accessing devices directly increases the complexity of the applications’ media pipelines in order to handle multiple device formats or deal with mis-behaving / non-standard devices. In some cases, another issue is that devices are controlled exclusively by a single application, not allowing more complex use cases where sharing a device is required.
#Image capture could not open a connection to the device module Bluetooth
switch audio playback from laptop speakers to a bluetooth headset while music is playing), unless the application implements the complex operations required to do so. Furthermore, such setups do not allow transparent switching of devices (ex. in ALSA), in some setups this is not the case, burdening the application developer to provide a way to configure device selection.

While system configuration can exist to have a “system default” device (ex. choose an audio sample rate, a format, a video resolution, etc). This means they need to choose themselves the device they want to open and set it up according to their media requirements (i.e. In traditional setups, applications have direct access to devices. In other words, it needs a mechanism to decide which application is going to be connected to which device, how and when. Apart from providing a mechanism to create media streams, however, stream exchange also requires a mechanism to define who is exchanging data with whom. This functionality defines PipeWire as a stream exchange framework. To achieve this, it provides a generic way for applications to create media streams, which can then be directed to any device or other application for playback or capture. The main purpose of PipeWire is to act as an intermediate layer between applications and devices. In this post, I will attempt to explain a bit more about WirePlumber and give some context for future blog posts on this subject. My colleague Julian blogged about PipeWire earlier this year, mentioning that at Collabora, as part of our work for Automotive Grade Linux, has been developing a PipeWire session manager called WirePlumber.
