mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
media-session: pass the client.id in the endpoint
Pass the client.id that we made this endpoint for in the endpoint properties. This makes it possible to let pulse find the client that belongs to the endpiont. The client.id is used to find the client that actually made the object (the session manager)
This commit is contained in:
parent
b518496136
commit
f2ce69c4bd
4 changed files with 7 additions and 1 deletions
|
|
@ -639,7 +639,9 @@ static int set_mask(pa_context *c, struct global *g)
|
|||
g->event = PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT;
|
||||
}
|
||||
|
||||
if ((str = pw_properties_get(g->props, PW_KEY_CLIENT_ID)) != NULL)
|
||||
if ((str = pw_properties_get(g->props, PW_KEY_ENDPOINT_CLIENT_ID)) != NULL)
|
||||
g->endpoint_info.client_id = atoi(str);
|
||||
else if ((str = pw_properties_get(g->props, PW_KEY_CLIENT_ID)) != NULL)
|
||||
g->endpoint_info.client_id = atoi(str);
|
||||
if ((str = pw_properties_get(g->props, PW_KEY_DEVICE_ID)) != NULL)
|
||||
g->endpoint_info.device_id = atoi(str);
|
||||
|
|
|
|||
|
|
@ -244,6 +244,8 @@ static struct client_endpoint *make_endpoint(struct node *node)
|
|||
pw_properties_set(props, PW_KEY_ENDPOINT_NAME, name);
|
||||
if ((str = spa_dict_lookup(dict, PW_KEY_OBJECT_ID)) != NULL)
|
||||
pw_properties_set(props, PW_KEY_NODE_ID, str);
|
||||
if ((str = spa_dict_lookup(dict, PW_KEY_CLIENT_ID)) != NULL)
|
||||
pw_properties_set(props, PW_KEY_ENDPOINT_CLIENT_ID, str);
|
||||
if ((str = spa_dict_lookup(dict, PW_KEY_NODE_AUTOCONNECT)) != NULL)
|
||||
pw_properties_set(props, PW_KEY_ENDPOINT_AUTOCONNECT, str);
|
||||
if ((str = spa_dict_lookup(dict, PW_KEY_NODE_TARGET)) != NULL)
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ extern "C" {
|
|||
|
||||
#define PW_KEY_ENDPOINT_ID "endpoint.id" /**< id of an endpoint */
|
||||
#define PW_KEY_ENDPOINT_NAME "endpoint.name" /**< the name of an endpoint */
|
||||
#define PW_KEY_ENDPOINT_CLIENT_ID "endpoint.client.id" /**< client of the endpoint */
|
||||
#define PW_KEY_ENDPOINT_ICON_NAME "endpoint.icon-name" /**< an XDG icon name for the device.
|
||||
* Ex. "sound-card-speakers-usb" */
|
||||
#define PW_KEY_ENDPOINT_AUTOCONNECT "endpoint.autoconnect" /**< try to automatically connect this
|
||||
|
|
|
|||
|
|
@ -306,6 +306,7 @@ int endpoint_init(struct endpoint *this,
|
|||
PW_KEY_MEDIA_CLASS,
|
||||
PW_KEY_PRIORITY_SESSION,
|
||||
PW_KEY_ENDPOINT_NAME,
|
||||
PW_KEY_ENDPOINT_CLIENT_ID,
|
||||
PW_KEY_ENDPOINT_ICON_NAME,
|
||||
NULL
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue