From cc3f01b248b32267d8c1988e2bd88d6afa4b5af7 Mon Sep 17 00:00:00 2001 From: George Kiagiadakis <george.kiagiadakis@collabora.com> Date: Thu, 12 Sep 2019 16:03:41 +0300 Subject: [PATCH] daemon config: add config command to load pipewire modules --- src/main.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/main.c b/src/main.c index 4e5b5ce9..83405f54 100644 --- a/src/main.c +++ b/src/main.c @@ -184,6 +184,19 @@ parse_commands_file (struct WpDaemonData *d, GInputStream * stream, if (!wp_module_load (d->core, abi, module, properties, error)) { return FALSE; } + } else if (!g_strcmp0 (cmd, "load-pipewire-module")) { + gchar *module, *props; + + module = strtok_r (NULL, " ", &saveptr); + props = module + strlen(module) + 1; + + if (!pw_module_load (wp_core_get_pw_core (d->core), module, props, + NULL)) { + g_set_error (error, WP_DOMAIN_DAEMON, WP_CODE_OPERATION_FAILED, + "failed to load pipewire module '%s': %s", module, + g_strerror (errno)); + return FALSE; + } } else if (!g_strcmp0 (cmd, "add-spa-lib")) { gchar *regex, *lib; gint ret; -- GitLab