context: add suport.dbus option

Add a support.dbus option in the context that can be used to disable
the dbus feature.
This commit is contained in:
Wim Taymans 2021-02-12 17:57:24 +01:00
parent 2c2ba6eec3
commit 70390a631e
3 changed files with 17 additions and 13 deletions

View file

@ -3,7 +3,7 @@ context.properties = {
# Properties to configure the session and some
# modules.
#mem.mlock-all = false
#dbus = true
#support.dbus = true
}
context.spa-libs = {

View file

@ -3,6 +3,7 @@ context.properties = {
## Configure properties in the system.
#library.name.system = support/libspa-support
#context.data-loop.library.name.system = support/libspa-support
#support.dbus = true
#link.max-buffers = 64
link.max-buffers = 16 # version < 3 clients can't handle more
#mem.warn-mlock = false

View file

@ -281,6 +281,8 @@ struct pw_context *pw_context_new(struct pw_loop *main_loop,
if ((cpu = spa_support_find(this->support, n_support, SPA_TYPE_INTERFACE_CPU)) != NULL)
pw_properties_setf(properties, PW_KEY_CPU_MAX_ALIGN, "%u", spa_cpu_get_max_align(cpu));
if ((str = pw_properties_get(properties, "support.dbus")) == NULL ||
pw_properties_parse_bool(str)) {
lib = pw_properties_get(properties, PW_KEY_LIBRARY_NAME_DBUS);
if (lib == NULL)
lib = "support/libspa-dbus";
@ -296,6 +298,7 @@ struct pw_context *pw_context_new(struct pw_loop *main_loop,
} else {
this->support[n_support++] = SPA_SUPPORT_INIT(SPA_TYPE_INTERFACE_DBus, dbus_iface);
}
}
this->n_support = n_support;
pw_array_init(&this->factory_lib, 32);