PipeWire: PipeWire Modules

PipeWire 0.3.34

PipeWire Modules

A PipeWire module is effectively a PipeWire client in an `.so` file that shares the PipeWire Context with the loading entity.

Usually modules are loaded when they are listed in the configuration files. For example the default configuration file loads several modules:

context.modules = [
...
# The native communication protocol.
{ name = libpipewire-module-protocol-native }
# The profile module. Allows application to access profiler
# and performance data. It provides an interface that is used
# by pw-top and pw-profiler.
{ name = libpipewire-module-profiler }
# Allows applications to create metadata objects. It creates
# a factory for Metadata objects.
{ name = libpipewire-module-metadata }
# Creates a factory for making devices that run in the
# context of the PipeWire server.
{ name = libpipewire-module-spa-device-factory }
...
]
name
const char * name
Definition: media-session.c:2379
device
Definition: alsa-monitor.c:82
metadata
Definition: impl-metadata.c:43

And the matching libraries are:

$ ls -1 /usr/lib64/pipewire-0.3/libpipewire-module*
...
/usr/lib64/pipewire-0.3/libpipewire-module-metadata.so
/usr/lib64/pipewire-0.3/libpipewire-module-profiler.so
/usr/lib64/pipewire-0.3/libpipewire-module-protocol-native.so
/usr/lib64/pipewire-0.3/libpipewire-module-spa-device-factory.so
...

A module's entry point is the `pipewire__module_init` function, see PIPEWIRE_SYMBOL_MODULE_INIT.

int pipewire__module_init(struct pw_impl_module *module, const char *args).`
pipewire__module_init
int pipewire__module_init(struct pw_impl_module *module, const char *args)
Definition: module-access.c:364

See the PipeWire Module: Example Sink and PipeWire Module: Example Source modules for a general oveview of how modules look like.

List of known modules:

- PipeWire Module: Access
- PipeWire Module: Adapter
- PipeWire Module: Client Device
- PipeWire Module: Client Node
- PipeWire Module: Echo Cancel
- PipeWire Module: Example Sink
- PipeWire Module: Example Source
- PipeWire Module: Filter-Chain
- PipeWire Module: Link Factory
- PipeWire Module: Loopback
- PipeWire Module: Metadata
- PipeWire Module: Portal
- PipeWire Module: Profiler
- PipeWire Module: Protocol Native
- PipeWire Module: Protocol Pulse
- PipeWire Module: Protocol Simple
- PipeWire Module: Pulse Tunnel
- PipeWire Module: ROC sink
- PipeWire Module: ROC source
- PipeWire Module: RT
- PipeWire Module: RTKit
- PipeWire Module: Session Manager
- PipeWire Module: Zeroconf Discover