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,21 @@
conf_files = [
[ 'bluez-monitor.conf', 'bluez-monitor.conf' ],
[ 'v4l2-monitor.conf', 'v4l2-monitor.conf' ],
[ 'media-session.conf', 'media-session.conf' ],
[ 'alsa-monitor.conf', 'alsa-monitor.conf' ],
[ 'with-jack', 'with-jack' ],
[ 'with-pulseaudio', 'with-pulseaudio' ],
]
foreach c : conf_files
configure_file(input : c.get(0),
output : c.get(1),
configuration : conf_config,
install_dir : join_paths(conf_install_dir, 'media-session.d'))
endforeach
install_data(
sources : [
'with-jack',
'with-pulseaudio' ],
install_dir : join_paths(conf_install_dir, 'media-session.d'))