PipeWire: API Documentation

PipeWire 0.3.37

API Documentation

The API consists of two parts:

- The Core API to access a PipeWire instance. This API is used by all clients that need to communicate with the PipeWire Daemon and provides the necessary structs to interface with the daemon.
- The Implementation API and tools to build new objects and modules. This API is primarily used by the PipeWire Daemon itself but also by the PipeWire Session Manager and modules/extensions that need to build objects in the graph.

The APIs work through proxy objects, so that calling a method on an object invokes that same method on the remote side. Marshalling and de-marshalling is handled transparently by the PipeWire Module: Protocol Native. The below graph illustrates this approach:

It is common for clients to use both the Core API and the Implementation API and both APIs are provided by the same library.

# Core API

The Core API serves to access a PipeWire instance. This API is used by all clients to communicate with the PipeWire Daemon. It consists of the following object-specific APIs:

- The PipeWire Core Global Object
- PipeWire Context
- PipeWire Global Object
- PipeWire Client
- PipeWire Resources
- PipeWire Node
- PipeWire Port
- PipeWire Link

If you are familiar with Wayland implementation, the Core API is roughly equivalent to libwayland-client.

# Implementation API

The implementation API provides the tools to build new objects and modules. It consists of the following object-specific APIs:

- PipeWire Core Interface
- Client Object
- PipeWire Device Interface
- PipeWire Factory Interface
- Link Objects
- PipeWire Metadata Interface
- Dynamically loadable Module
- Node
- Port Object
- Control
- PipeWire Global Object
- PipeWire Resources
- PipeWire Work Queue Object

If you are familiar with Wayland implementation, the Implementation API is roughly equivalent to libwayland-server.