Skip to content

refactor daemon, refactor component loading, cleanup

George Kiagiadakis requested to merge gkiagia/wireplumber:cleanup into master

a big set of changes, admittedly

  • Remove obsolete modules and configuration files
  • make WpPlugin inherit from WpObject and use wp_object_activate, which has the advantage of being asynchronous and it also has error reporting
  • introduce WpComponentLoader, a WpPlugin subclass that allows loading other "components". "components" can be modules, pipewire modules, lua scripts, lua configuration files, etc... it's fully extensible to load any kind of dynamically loadable piece of code
  • remove WpModule; it was never useful in any way, except for wp_module_load, which is now available as wp_core_load_component; also, this allows us to use WpModule in the future to wrap pw_module, if needed
  • a few changes in wplua to be able to use it for split configuration files
  • added a NOT_EQUALS verb in WpObjectInterest; this is now used in main.c to select all plugins except the lua-scripting one, which is activated separately
  • Add global wp_get_foo_dir() functions to get the standard configuration, data and modules directories
  • refactor m-lua-scripting to be a WpComponentLoader and let it load both scripts with the lua api that we had before but also configuration files with no exposed api (except for some lua basics); scripts can also be split into multiple files (ex config.lua can be split in config.lua.d/*.lua)
  • Install scripts in /usr/share/wireplumber, as users should always have the default versions available; however, allow overriding scripts from /etc/wireplumber/scripts/, so it's possible for users to copy a standard script and modify it
  • Refactor the code in main.c

Merge request reports

Loading