summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wtaymans@redhat.com>2020-08-05 17:37:40 +0200
committerWim Taymans <wtaymans@redhat.com>2020-08-05 17:37:40 +0200
commit2cf5bf7ac1e48e394f9f01cb233b095e313f98bb (patch)
tree8ae947b4634191b64bcb3fa1b3b23c52652781c0
parent8e3ae33550334f15e71d5876fcac19aebc34953a (diff)
context: make it possible to control loaded modules
use the PIPEWIRE_PROFILE_MODULES env variable to load the modules when nothing else is given.
-rw-r--r--src/pipewire/context.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pipewire/context.c b/src/pipewire/context.c
index 63948c0e..697381eb 100644
--- a/src/pipewire/context.c
+++ b/src/pipewire/context.c
@@ -313,7 +313,10 @@ struct pw_context *pw_context_new(struct pw_loop *main_loop,
this->sc_pagesize = sysconf(_SC_PAGESIZE);
- if ((str = pw_properties_get(properties, PW_KEY_CONTEXT_PROFILE_MODULES)) == NULL)
+ str = pw_properties_get(properties, PW_KEY_CONTEXT_PROFILE_MODULES);
+ if (str == NULL)
+ str = getenv("PIPEWIRE_PROFILE_MODULES");
+ if (str == NULL)
str = "default";
load_module_profile(this, str);