mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04: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.
|
||||
#mem.mlock-all = false
|
||||
#context.profile.modules = default,rtkit
|
||||
#dbus = true
|
||||
}
|
||||
|
||||
spa-libs = {
|
||||
|
|
|
|||
|
|
@ -2349,13 +2349,16 @@ int main(int argc, char *argv[])
|
|||
|
||||
support = pw_context_get_support(impl.this.context, &n_support);
|
||||
|
||||
impl.dbus = spa_support_find(support, n_support, SPA_TYPE_INTERFACE_DBus);
|
||||
if (impl.dbus)
|
||||
impl.this.dbus_connection = spa_dbus_get_connection(impl.dbus, SPA_DBUS_TYPE_SESSION);
|
||||
if (impl.this.dbus_connection == NULL)
|
||||
pw_log_warn("no dbus connection");
|
||||
else
|
||||
pw_log_debug("got dbus connection %p", impl.this.dbus_connection);
|
||||
if ((str = pw_properties_get(impl.this.props, "dbus")) == NULL ||
|
||||
pw_properties_parse_bool(str)) {
|
||||
impl.dbus = spa_support_find(support, n_support, SPA_TYPE_INTERFACE_DBus);
|
||||
if (impl.dbus)
|
||||
impl.this.dbus_connection = spa_dbus_get_connection(impl.dbus, SPA_DBUS_TYPE_SESSION);
|
||||
if (impl.this.dbus_connection == NULL)
|
||||
pw_log_warn("no dbus connection");
|
||||
else
|
||||
pw_log_debug("got dbus connection %p", impl.this.dbus_connection);
|
||||
}
|
||||
|
||||
if ((res = start_session(&impl)) < 0)
|
||||
goto exit;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue