component-loader: support dangling components

- Dangling components are those not present in the json config files but present
in the wireplumber lookup folders.
This commit is contained in:
Ashok Sidipotu
2022-10-27 15:06:41 +05:30
committed by Julian Bouzas
parent 904751ede1
commit 6f039003ec

View File

@@ -54,8 +54,12 @@ load_module (WpCore * core, const gchar * module_name,
GModule *gmodule;
gpointer module_init;
module_path = g_module_build_path (wp_get_module_dir (), module_name);
wp_debug_object(core, "loading module(%s) at %s", module_name, module_path);
if (!g_file_test (module_name, G_FILE_TEST_EXISTS))
module_path = g_module_build_path (wp_get_module_dir (), module_name);
else
module_path = g_strdup (module_name);
wp_debug_object (core, "loading module(%s) at %s", module_name, module_path);
gmodule = g_module_open (module_path, G_MODULE_BIND_LOCAL);
if (!gmodule) {
g_set_error (error, WP_DOMAIN_LIBRARY, WP_LIBRARY_ERROR_OPERATION_FAILED,