PipeWire: PipeWire Media Session

PipeWire 0.4.1

PipeWire Media Session

PipeWire Media Session is the reference/example session manager provided by the PipeWire project.

On startup, Media Session reads the `media-session.conf` configuration file to configure itself. The following directories are searched for this file:

- in `$XDG_CONFIG_HOME/pipewire/media-session.d/` (usually `$HOME/.config/pipewire/media-session.d/`)
- `$sysconfdir/pipewire/media-session.d` (usually `/etc/pipewire/media-session.d/`)
- `$datadir/pipewire/media-session.d/` (usually `/usr/share/pipewire/media-session.d/`)

The environment variable `MEDIA_SESSION_CONFIG_DIR` can be used to specify an alternative config directory.

## Access management

The Media Session Module: Access Flatpak module handles clients that have PW_KEY_ACCESS set to "flatpak". Other clients are ignored.

The module sets the permissions of all objects to `RX`. This limits the flatpaks from doing modifications to other objects.

Because this will also set the core object permission `R`, the client will resume with the new permissions.

`pipewire-media-session` implements PW_KEY_MEDIA_CATEGORY type "Manager" applications by simply setting the client permissions to ALL. No additional checks are performed yet.

## Modules

List of Media Session modules:

- Media Session Module: Access Flatpak
- Media Session Module: Access Portal
- Media Session Module: ALSA Endpoint
- Media Session Module: ALSA MIDI
- Media Session Module: ALSA Monitor
- Media Session Module: BlueZ Auto-Switch
- Media Session Module: BlueZ Endpoint
- Media Session Module: BlueZ Monitor
- Media Session Module: Default Nodes
- Media Session Module: Default Profile
- Media Session Module: Default Routes
- Media Session Module: libCamera Monitor
- Media Session Module: Logind
- Media Session Module: Metadata
- Media Session Module: No DSP
- Media Session Module: Policy Endpoint
- Media Session Module: Policy Node
- Media Session Module: Restore Stream
- Media Session Module: Session Manager
- Media Session Module: Stream Endpoint
- Media Session Module: Stream Follow Default
- Media Session Module: Suspend Node
- Media Session Module: V4L2 Endpoint
- Media Session Module: V4L2 Monitor