mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
media-session: add dbus property to media-session
This commit is contained in:
parent
d624ed26f4
commit
f977c45240
2 changed files with 11 additions and 7 deletions
|
|
@ -5,6 +5,7 @@ properties = {
|
||||||
# modules.
|
# modules.
|
||||||
#mem.mlock-all = false
|
#mem.mlock-all = false
|
||||||
#context.profile.modules = default,rtkit
|
#context.profile.modules = default,rtkit
|
||||||
|
#dbus = true
|
||||||
}
|
}
|
||||||
|
|
||||||
spa-libs = {
|
spa-libs = {
|
||||||
|
|
|
||||||
|
|
@ -2349,13 +2349,16 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
support = pw_context_get_support(impl.this.context, &n_support);
|
support = pw_context_get_support(impl.this.context, &n_support);
|
||||||
|
|
||||||
impl.dbus = spa_support_find(support, n_support, SPA_TYPE_INTERFACE_DBus);
|
if ((str = pw_properties_get(impl.this.props, "dbus")) == NULL ||
|
||||||
if (impl.dbus)
|
pw_properties_parse_bool(str)) {
|
||||||
impl.this.dbus_connection = spa_dbus_get_connection(impl.dbus, SPA_DBUS_TYPE_SESSION);
|
impl.dbus = spa_support_find(support, n_support, SPA_TYPE_INTERFACE_DBus);
|
||||||
if (impl.this.dbus_connection == NULL)
|
if (impl.dbus)
|
||||||
pw_log_warn("no dbus connection");
|
impl.this.dbus_connection = spa_dbus_get_connection(impl.dbus, SPA_DBUS_TYPE_SESSION);
|
||||||
else
|
if (impl.this.dbus_connection == NULL)
|
||||||
pw_log_debug("got dbus connection %p", impl.this.dbus_connection);
|
pw_log_warn("no dbus connection");
|
||||||
|
else
|
||||||
|
pw_log_debug("got dbus connection %p", impl.this.dbus_connection);
|
||||||
|
}
|
||||||
|
|
||||||
if ((res = start_session(&impl)) < 0)
|
if ((res = start_session(&impl)) < 0)
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue