mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
properties: copy_keys -> update_keys
Change copy_keys to update_keys and make it more powerful by taking a spa_dict as the source. Copy some more properties in the session.
This commit is contained in:
parent
60cd74fdb0
commit
9df6efcd8d
12 changed files with 23 additions and 18 deletions
|
|
@ -83,6 +83,8 @@ static int client_endpoint_stream_update(void *object,
|
|||
PW_KEY_FACTORY_ID,
|
||||
PW_KEY_CLIENT_ID,
|
||||
PW_KEY_ENDPOINT_ID,
|
||||
PW_KEY_MEDIA_CLASS,
|
||||
PW_KEY_PRIORITY_SESSION,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
|
@ -93,7 +95,10 @@ static int client_endpoint_stream_update(void *object,
|
|||
props = pw_properties_new(NULL, NULL);
|
||||
if (!props)
|
||||
goto no_mem;
|
||||
pw_properties_copy_keys (endpoint->props, props, keys);
|
||||
|
||||
pw_properties_update_keys(props, &endpoint->props->dict, keys);
|
||||
if (info && info->props)
|
||||
pw_properties_update_keys(props, info->props, keys);
|
||||
|
||||
if (endpoint_stream_init(stream, stream_id, endpoint->info.id,
|
||||
this, core, props) < 0)
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ static int client_session_link_update(void *object,
|
|||
props = pw_properties_new(NULL, NULL);
|
||||
if (!props)
|
||||
goto no_mem;
|
||||
pw_properties_copy_keys (session->props, props, keys);
|
||||
pw_properties_update_keys(props, &session->props->dict, keys);
|
||||
|
||||
if (endpoint_link_init(link, link_id, session->info.id,
|
||||
this, core, props) < 0)
|
||||
|
|
|
|||
|
|
@ -287,6 +287,7 @@ int endpoint_init(struct endpoint *this,
|
|||
PW_KEY_FACTORY_ID,
|
||||
PW_KEY_CLIENT_ID,
|
||||
PW_KEY_DEVICE_ID,
|
||||
PW_KEY_MEDIA_CLASS,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
|
@ -299,7 +300,7 @@ int endpoint_init(struct endpoint *this,
|
|||
if (!properties)
|
||||
goto no_mem;
|
||||
|
||||
pw_properties_copy_keys(this->props, properties, keys);
|
||||
pw_properties_update_keys(properties, &this->props->dict, keys);
|
||||
|
||||
this->global = pw_global_new (core,
|
||||
PW_TYPE_INTERFACE_Endpoint,
|
||||
|
|
|
|||
|
|
@ -298,7 +298,7 @@ int session_init(struct session *this,
|
|||
if (!properties)
|
||||
goto no_mem;
|
||||
|
||||
pw_properties_copy_keys(this->props, properties, keys);
|
||||
pw_properties_update_keys(properties, &this->props->dict, keys);
|
||||
|
||||
this->global = pw_global_new (core,
|
||||
PW_TYPE_INTERFACE_Session,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue