pipewire/src/daemon/media-session.d/media-session.conf
Pauli Virtanen b10123eceb policy-node: make streams follow default sink/src changes
The motivation is to have both existing and new streams that have been
created without explicit target node, to be directed to the same devices
at all times. To achieve this:

Consider what find_node returns as the "default node".

Consider streams that auto+reconnect and don't have an explicit target,
as following default.  In rescan, if the default node has changed,
relink such streams to the new default.

Remove the old code that explicitly moved streams when the default.*
metadata changed, as it implements a similar thing but in a less robust
way (may fail to do what's intended, because the default device
metadata is commonly unset, or the metadata callback comes before
session_create has seen the new nodes).

Enable this feature based on "policy-node.streams-follow-default"
property. Allow setting the property also by loading the
streams-follow-default module. Enable it by default only for the
with-pulseaudio module group.
2021-01-18 20:49:58 +01:00

59 lines
1.6 KiB
Text

# media-session config file
properties = {
# Properties to configure the session and some
# modules
}
spa-libs = {
# Mapping from factory name to library.
api.bluez5.* = bluez5/libspa-bluez5
api.alsa.* = alsa/libspa-alsa
api.v4l2.* = v4l2/libspa-v4l2
api.libcamera.* = libcamera/libspa-libcamera
}
modules = {
# These are the modules that are enabled when a file with
# the key name is found in the media-session.d config directory.
# the default bundle is always enabled.
default = [
flatpak # manages flatpak access
portal # manage portal permissions
v4l2 # video for linux udev detection
#libcamera # libcamera udev detection
suspend-node # suspend inactive nodes
policy-node # configure and link nodes
#metadata # export metadata API
#default-nodes # restore default nodes
#default-profile # restore default profiles
#default-routes # restore default route
#streams-follow-default # move streams when default changes
#alsa-seq # alsa seq midi support
#alsa-monitor # alsa udev detection
#bluez5 # bluetooth support
#restore-stream # restore stream settings
]
with-audio = [
metadata
default-nodes
default-profile
default-routes
alsa-seq
alsa-monitor
]
with-alsa = [
with-audio
]
with-jack = [
with-audio
]
with-pulseaudio = [
with-audio
bluez5
restore-stream
streams-follow-default
]
}