Component Loader¶
-
struct WpComponentLoader¶
The component loader is a plugin that provides the ability to load components.
Components can be:
WirePlumber modules (libraries that provide WpPlugin and WpSiFactory objects)
PipeWire modules (libraries that extend libpipewire)
Scripts (ex. lua scripts)
Configuration files
The WirePlumber library provides built-in support for loading WirePlumber and PipeWire modules, without a component loader. For other kinds of components, like the lua scripts and config files, a component loader is provided in by external WirePlumber module.
-
struct _WpComponentLoaderClass¶
Public Members
-
WpPluginClass parent_class¶
-
gboolean (*supports_type)(WpComponentLoader *self, const gchar *type)¶
-
gboolean (*load)(WpComponentLoader *self, const gchar *component, const gchar *type, GVariant *args, GError **error)¶
-
WpPluginClass parent_class¶
-
gboolean wp_core_load_component(WpCore *self, const gchar *component, const gchar *type, GVariant *args, GError **error)¶
Loads the specified component on self.
The type will determine which component loader to use. The following types are built-in and will always work without a component loader:
”module” - Loads a WirePlumber module
”pw_module” - Loads a PipeWire module
- Parameters
self – the core
component – the module name or file name
type – the type of the component
args – (transfer floating)(nullable): additional arguments for the component, usually a dict or a string
error – (out) (optional): return location for errors, or NULL to ignore
- Returns
TRUE if loaded, FALSE if there was an error
-
WP_TYPE_COMPONENT_LOADER (wp_component_loader_get_type ())¶
The WpComponentLoader GType.