Implement config/state file handling

Make methods to load_config and load/save state. For now the config
and state directories are the same but it might not be. Implement
the search path for all config/state files as:

  $XDG_CONFIG_HOME/[$prefix]/$name
  $HOME/.config/[$prefix]/$name
  $PIPEWIRE_CONFIG_DIR/pipewire/[$prefix]/$name
  /etc/pipewire/[$prefix]/$name

Make some config files for jack and RT clients. Make pw-cat use the
client-rt config.

Use core state and config management in media-session.
Move all session manager state and config files to the build dir and
set the PIPEWIRE_CONFIG_DIR to this build dir.
This commit is contained in:
Wim Taymans 2021-02-11 17:54:21 +01:00
parent c605672d43
commit fc90a4e48a
13 changed files with 380 additions and 216 deletions

View file

@ -0,0 +1,63 @@
# Daemon config file for PipeWire RT clients version @VERSION@ #
properties = {
## Configure properties in the system.
#mem.warn-mlock = false
#mem.allow-mlock = true
#mem.mlock-all = false
#log.level = 2
}
spa-libs = {
## <factory-name regex> = <library-name>
#
# Used to find spa factory names. It maps an spa factory name
# regular expression to a library name that should contain
# that factory.
#
audio.convert* = audioconvert/libspa-audioconvert
support.* = support/libspa-support
}
modules = {
## <module-name> = { [args = { <key>=<value> ... }]
# [flags = [ [ifexists] [nofail] ]}
#
# Loads a module with the given parameters.
# If ifexists is given, the module is ignored when it is not found.
# If nofail is given, module initialization failures are ignored.
#
# Uses RTKit to boost the data thread priority.
libpipewire-module-rtkit = {
args = {
#nice.level = -11
#rt.prio = 20
#rt.time.soft = 200000
#rt.time.hard = 200000
}
flags = [ ifexists nofail ]
}
# The native communication protocol.
libpipewire-module-protocol-native = null
# Allows creating nodes that run in the context of the
# client. Is used by all clients that want to provide
# data to PipeWire.
libpipewire-module-client-node = null
# Allows creating devices that run in the context of the
# client. Is used by the session manager.
libpipewire-module-client-device = null
# Makes a factory for wrapping nodes in an adapter with a
# converter and resampler.
libpipewire-module-adapter = null
# Allows applications to create metadata objects. It creates
# a factory for Metadata objects.
libpipewire-module-metadata = null
# Provides factories to make session manager objects.
libpipewire-module-session-manager = null
}