wireplumber/lib/wp
George Kiagiadakis 60382df63f conf: refactor configuration loading
Changes:

- Configuration files are no longer located by libpipewire,
  which allows us to control the paths that are being looked up.
  This is a requirement for installations where pipewire and
  wireplumber are built using different prefixes, in which case
  the configuration files of wireplumber end up being installed in
  a place that libpipewire doesn't look into...

- The location of conf files is now again $prefix/share/wireplumber,
  /etc/wireplumber and $XDG_CONFIG_HOME/wireplumber, instead of using
  the pipewire directories. Also, since the previous commits, we now
  also support $XDG_CONFIG_DIRS/wireplumber (typically /etc/xdg/wireplumber)
  and $XDG_DATA_DIRS/wireplumber for system-wide configuration.

- Since libpipewire doesn't expose the parser, we now also do the
  parsing of sections ourselves. This has the advantage that we can
  optimize it a bit for our use case.

- The WpConf API has changed to not be a singleton and it is a
  property of WpCore instead. The configuration is now expected
  to be opened before the core is created, which allows the caller
  to identify configuration errors in advance. By not being a singleton,
  we can also reuse the WpConf API to open other SPA-JSON files.

- WpConf also now has a lazy loading mechanism. The configuration
  files are mmap'ed and the various sections are located in advance,
  but not parsed until they are actually requested. Also, the sections
  are not copied in memory, unlike what happens in libpipewire. They
  are only copied when merging is needed.

- WpCore now disables loading of a configuration file in pw_context,
  if a WpConf is provided. This is to have complete control here.
  The 'context.spa-libs' and 'context.modules' sections are still
  loaded, but we load them in WpConf and pass them down to pw_context
  for parsing. If a WpConf is not provided, pw_context is left to load
  the default configuration file (client.conf normally).
2024-03-04 07:07:56 +00:00
..
private conf: refactor configuration loading 2024-03-04 07:07:56 +00:00
base-dirs.c base-dirs: return NULL from lookup_dirs() when the searched path is absolute 2024-03-04 07:07:56 +00:00
base-dirs.h base-dirs: add support for finding modules and remove wp_get_module_dir() 2024-03-04 07:07:56 +00:00
client.c client: add wp_client_update_properties 2023-10-15 21:27:14 +00:00
client.h client: add wp_client_update_properties 2023-10-15 21:27:14 +00:00
component-loader.c comp-loader: register the component & feature only if it activates successfully 2023-06-20 17:20:01 +03:00
component-loader.h core: introduce the notion of provided features on components 2023-06-20 12:39:29 +03:00
conf.c conf: refactor configuration loading 2024-03-04 07:07:56 +00:00
conf.h conf: refactor configuration loading 2024-03-04 07:07:56 +00:00
core.c conf: refactor configuration loading 2024-03-04 07:07:56 +00:00
core.h conf: refactor configuration loading 2024-03-04 07:07:56 +00:00
defs.h lib: add struct paddings to be able to maintain ABI compatibility 2021-06-08 17:38:14 +03:00
device.c log: rename "message" level to "notice" and print criticals with "E" 2023-05-18 16:19:49 +03:00
device.h device: add new wp_spa_device_managed_object_new_iterator API 2022-06-27 08:52:36 +00:00
error.c docs: fix C API documentation to work nicely with doxygen & sphinx 2021-05-25 14:19:53 +03:00
error.h core: load components internally and refactor main to just activate it 2023-06-23 18:01:26 +03:00
event-dispatcher.c event: add some trace logs to debug sorting hook dependencies 2024-01-08 12:28:21 +02:00
event-dispatcher.h event-dispatcher: refactor to use before/after dependencies on hooks 2023-04-17 07:48:18 -04:00
event-hook.c event*.c: add a few more log msgs 2023-08-15 07:14:59 +00:00
event-hook.h event-dispatcher: refactor to use before/after dependencies on hooks 2023-04-17 07:48:18 -04:00
event.c event: add some trace logs to debug sorting hook dependencies 2024-01-08 12:28:21 +02:00
event.h event*.c: add a few more log msgs 2023-08-15 07:14:59 +00:00
factory.c Merge branch '0.4' into next 2023-09-01 19:12:20 +03:00
factory.h wp-factory: enumerate pw_factory objects 2021-10-19 05:46:46 +00:00
global-proxy.c log: implement a log topics system, like pipewire 2023-05-16 20:42:28 +03:00
global-proxy.h lib: add struct paddings to be able to maintain ABI compatibility 2021-06-08 17:38:14 +03:00
iterator.c log: implement a log topics system, like pipewire 2023-05-16 20:42:28 +03:00
iterator.h lib: Use #define instead of 'static const' for constants 2021-06-24 09:24:16 -04:00
json-utils.c json-utils: correct typo 2024-02-12 13:15:02 +05:30
json-utils.h json-utils: add wp_json_utils_merge_containers(), factored out of conf.c 2023-11-14 12:02:31 +02:00
link.c link/node: Fix docs on state_changed_callback 2024-01-22 13:45:15 +01:00
link.h Revert "link: add WP_LINK_FEATURE_ESTABLISHED to track when a link is PAUSED/ACTIVE" 2023-10-24 11:31:45 +03:00
log.c log: rename back to wp_log_set_level 2024-01-13 16:33:05 +00:00
log.h log: rename back to wp_log_set_level 2024-01-13 16:33:05 +00:00
meson.build base-dirs: move file lookup utils out of wp.{c,h} and into base-dirs.{c,h} 2024-03-04 07:07:56 +00:00
metadata.c docs: fix documentation for WpMetadataItem 2024-03-04 06:33:04 +00:00
metadata.h metadata: remove wp_metadata_iterator_item_extract() API 2024-02-28 08:15:17 -05:00
module.c Revert "api: module: support loading arguments from file" 2023-10-24 11:55:52 +03:00
module.h Revert "api: module: support loading arguments from file" 2023-10-24 11:55:52 +03:00
node.c link/node: Fix docs on state_changed_callback 2024-01-22 13:45:15 +01:00
node.h docs: fix C API documentation to work nicely with doxygen & sphinx 2021-05-25 14:19:53 +03:00
object-interest.c tree-wide: refactor active feature checks to use _test_active_features() 2023-11-08 12:23:00 +02:00
object-interest.h lib: Use #define instead of 'static const' for constants 2021-06-24 09:24:16 -04:00
object-manager.c Merge branch 'master' into next 2023-12-23 18:34:00 +02:00
object-manager.h docs: fix C API documentation to work nicely with doxygen & sphinx 2021-05-25 14:19:53 +03:00
object.c lib: object: add functions to test active and supported features 2023-11-08 12:08:30 +02:00
object.h lib: object: add functions to test active and supported features 2023-11-08 12:08:30 +02:00
plugin.c object.h: don't include core.h 2023-06-23 18:01:26 +03:00
plugin.h core: make the object registration functions public 2023-06-20 12:39:29 +03:00
port.c tree-wide: refactor active feature checks to use _test_active_features() 2023-11-08 12:23:00 +02:00
port.h docs: fix C API documentation to work nicely with doxygen & sphinx 2021-05-25 14:19:53 +03:00
properties.c Merge branch 'master' into next 2023-12-23 18:34:00 +02:00
properties.h properties: add json to properties converters 2023-06-20 12:39:29 +03:00
proxy-interfaces.c log: implement a log topics system, like pipewire 2023-05-16 20:42:28 +03:00
proxy-interfaces.h lib: add struct paddings to be able to maintain ABI compatibility 2021-06-08 17:38:14 +03:00
proxy.c tree-wide: refactor active feature checks to use _test_active_features() 2023-11-08 12:23:00 +02:00
proxy.h proxy: abort activation if error or destroyed 2021-12-13 08:37:07 -05:00
session-item.c session-item: improve class description 2023-09-26 09:57:50 +03:00
session-item.h object.h: don't include core.h 2023-06-23 18:01:26 +03:00
settings.c settings: fix all coverity scan defects 2024-02-29 07:23:58 -05:00
settings.h settings: add API to set, reset, save, delete and iterate settings 2024-02-28 10:20:20 -05:00
si-factory.c core: make the object registration functions public 2023-06-20 12:39:29 +03:00
si-factory.h core: make the object registration functions public 2023-06-20 12:39:29 +03:00
si-interfaces.c log: implement a log topics system, like pipewire 2023-05-16 20:42:28 +03:00
si-interfaces.h lib: remove WpEndpoint and WpSiEndpoint APIs 2023-04-17 07:48:18 -04:00
spa-json.c spa-json: wrap the data instead of the spa_json* in _parser_get_json() 2024-03-04 07:07:56 +00:00
spa-json.h spa-json: add new "undefined" parser constructor 2024-03-04 07:07:56 +00:00
spa-pod.c spa-pod: don't use assertion macro in code that needs to run always 2023-11-08 20:41:34 +02:00
spa-pod.h spa-pod: add missing API sentinel 2022-01-21 13:59:03 +00:00
spa-type.c log: implement a log topics system, like pipewire 2023-05-16 20:42:28 +03:00
spa-type.h docs: Add brief descriptions to all functions 2021-06-02 17:38:34 +00:00
state.c state: add save_after_timeout() method to replace all custom timeout code 2024-01-04 16:38:33 +02:00
state.h state: add save_after_timeout() method to replace all custom timeout code 2024-01-04 16:38:33 +02:00
transition.c log: implement a log topics system, like pipewire 2023-05-16 20:42:28 +03:00
transition.h lib: add struct paddings to be able to maintain ABI compatibility 2021-06-08 17:38:14 +03:00
wp.c base-dirs: add support for finding modules and remove wp_get_module_dir() 2024-03-04 07:07:56 +00:00
wp.h base-dirs: add support for finding modules and remove wp_get_module_dir() 2024-03-04 07:07:56 +00:00
wpversion.h.in lib: add a version header 2020-06-02 18:26:40 +03:00