diff options
author | Wim Taymans <wtaymans@redhat.com> | 2019-11-28 12:52:17 +0100 |
---|---|---|
committer | Wim Taymans <wtaymans@redhat.com> | 2019-11-29 13:34:06 +0100 |
commit | e3a1c4151e4c43e4dd6f3c4aeab3e26e76dd0075 (patch) | |
tree | 0d4b61b622c42cf0d6ec28ec2fd30f873c67b617 | |
parent | f56e4dbc4d4d9b401c03629b79ca0c6953199420 (diff) |
emit bound_id event
-rw-r--r-- | src/modules/module-client-device/resource-device.c | 11 | ||||
-rw-r--r-- | src/modules/module-client-node/client-node.c | 2 | ||||
-rw-r--r-- | src/modules/module-session-manager/endpoint.c | 1 | ||||
-rw-r--r-- | src/modules/module-session-manager/session.c | 1 | ||||
-rw-r--r-- | src/pipewire/client.c | 1 | ||||
-rw-r--r-- | src/pipewire/core.c | 1 | ||||
-rw-r--r-- | src/pipewire/device.c | 1 | ||||
-rw-r--r-- | src/pipewire/factory.c | 1 | ||||
-rw-r--r-- | src/pipewire/link.c | 1 | ||||
-rw-r--r-- | src/pipewire/module.c | 1 | ||||
-rw-r--r-- | src/pipewire/node.c | 1 | ||||
-rw-r--r-- | src/pipewire/port.c | 1 |
12 files changed, 23 insertions, 0 deletions
diff --git a/src/modules/module-client-device/resource-device.c b/src/modules/module-client-device/resource-device.c index 34a64728..cd3767a1 100644 --- a/src/modules/module-client-device/resource-device.c +++ b/src/modules/module-client-device/resource-device.c @@ -97,9 +97,20 @@ static void device_destroy(void *data) pw_resource_destroy(impl->resource); } +static void device_initialized(void *data) +{ + struct impl *impl = data; + struct pw_device *device = impl->device; + struct pw_global *global = pw_device_get_global(device); + + pw_log_debug("client-device %p: initialized global:%d", impl, global->id); + pw_resource_bound_id(impl->resource, global->id); +} + static const struct pw_device_events device_events = { PW_VERSION_DEVICE_EVENTS, .destroy = device_destroy, + .initialized = device_initialized, }; struct pw_device *pw_client_device_new(struct pw_resource *resource, diff --git a/src/modules/module-client-node/client-node.c b/src/modules/module-client-node/client-node.c index a1b5d72a..04ec2907 100644 --- a/src/modules/module-client-node/client-node.c +++ b/src/modules/module-client-node/client-node.c @@ -1228,6 +1228,8 @@ void pw_client_node_registered(struct pw_client_node *this, struct pw_global *gl if (this->resource == NULL) return; + pw_resource_bound_id(this->resource, node_id); + pw_client_node_resource_transport(this->resource, node_id, impl->other_fds[0], diff --git a/src/modules/module-session-manager/endpoint.c b/src/modules/module-session-manager/endpoint.c index 19640703..435c6a4d 100644 --- a/src/modules/module-session-manager/endpoint.c +++ b/src/modules/module-session-manager/endpoint.c @@ -317,6 +317,7 @@ int endpoint_init(struct endpoint *this, this->info.id = this->global->id; this->info.props = &this->props->dict; + pw_resource_bound_id(client_ep->resource, this->global->id); pw_client_endpoint_resource_set_id(client_ep->resource, this->global->id); return pw_global_register(this->global); diff --git a/src/modules/module-session-manager/session.c b/src/modules/module-session-manager/session.c index d64739d8..46a1362d 100644 --- a/src/modules/module-session-manager/session.c +++ b/src/modules/module-session-manager/session.c @@ -313,6 +313,7 @@ int session_init(struct session *this, this->info.id = this->global->id; this->info.props = &this->props->dict; + pw_resource_bound_id(client_sess->resource, this->global->id); pw_client_session_resource_set_id(client_sess->resource, this->global->id); return pw_global_register(this->global); diff --git a/src/pipewire/client.c b/src/pipewire/client.c index 8c84b9d1..469285c1 100644 --- a/src/pipewire/client.c +++ b/src/pipewire/client.c @@ -212,6 +212,7 @@ global_bind(void *_data, struct pw_client *client, uint32_t permissions, pw_log_debug(NAME" %p: bound to %d", this, resource->id); spa_list_append(&global->resource_list, &resource->link); + pw_resource_bound_id(resource, global->id); if (resource->id == 1) client->client_resource = resource; diff --git a/src/pipewire/core.c b/src/pipewire/core.c index e2d97ea2..3459237d 100644 --- a/src/pipewire/core.c +++ b/src/pipewire/core.c @@ -432,6 +432,7 @@ global_bind(void *_data, &core_methods, resource); spa_list_append(&global->resource_list, &resource->link); + pw_resource_bound_id(resource, global->id); if (resource->id == 0) client->core_resource = resource; diff --git a/src/pipewire/device.c b/src/pipewire/device.c index 844eeaaa..74294652 100644 --- a/src/pipewire/device.c +++ b/src/pipewire/device.c @@ -375,6 +375,7 @@ global_bind(void *_data, struct pw_client *client, uint32_t permissions, pw_log_debug(NAME" %p: bound to %d", this, resource->id); spa_list_append(&global->resource_list, &resource->link); + pw_resource_bound_id(resource, global->id); this->info.change_mask = PW_DEVICE_CHANGE_MASK_ALL; pw_device_resource_info(resource, &this->info); diff --git a/src/pipewire/factory.c b/src/pipewire/factory.c index b6648a3f..fc091c53 100644 --- a/src/pipewire/factory.c +++ b/src/pipewire/factory.c @@ -138,6 +138,7 @@ global_bind(void *_data, struct pw_client *client, uint32_t permissions, pw_log_debug(NAME" %p: bound to %d", this, resource->id); spa_list_append(&global->resource_list, &resource->link); + pw_resource_bound_id(resource, global->id); this->info.change_mask = ~0; pw_factory_resource_info(resource, &this->info); diff --git a/src/pipewire/link.c b/src/pipewire/link.c index c02d624c..b9e3d3c1 100644 --- a/src/pipewire/link.c +++ b/src/pipewire/link.c @@ -824,6 +824,7 @@ global_bind(void *_data, struct pw_client *client, uint32_t permissions, pw_log_debug(NAME" %p: bound to %d", this, resource->id); spa_list_append(&global->resource_list, &resource->link); + pw_resource_bound_id(resource, global->id); this->info.change_mask = ~0; pw_link_resource_info(resource, &this->info); diff --git a/src/pipewire/module.c b/src/pipewire/module.c index c10df9ef..b80cc89e 100644 --- a/src/pipewire/module.c +++ b/src/pipewire/module.c @@ -139,6 +139,7 @@ global_bind(void *_data, struct pw_client *client, uint32_t permissions, pw_log_debug(NAME" %p: bound to %d", this, resource->id); spa_list_append(&global->resource_list, &resource->link); + pw_resource_bound_id(resource, global->id); this->info.change_mask = ~0; pw_module_resource_info(resource, &this->info); diff --git a/src/pipewire/node.c b/src/pipewire/node.c index 49b4e0d5..bc70c3e6 100644 --- a/src/pipewire/node.c +++ b/src/pipewire/node.c @@ -522,6 +522,7 @@ global_bind(void *_data, struct pw_client *client, uint32_t permissions, pw_log_debug(NAME" %p: bound to %d", this, resource->id); spa_list_append(&global->resource_list, &resource->link); + pw_resource_bound_id(resource, global->id); this->info.change_mask = PW_NODE_CHANGE_MASK_ALL; pw_node_resource_info(resource, &this->info); diff --git a/src/pipewire/port.c b/src/pipewire/port.c index 01fd3479..962049bd 100644 --- a/src/pipewire/port.c +++ b/src/pipewire/port.c @@ -752,6 +752,7 @@ global_bind(void *_data, struct pw_client *client, uint32_t permissions, pw_log_debug(NAME" %p: bound to %d", this, resource->id); spa_list_append(&global->resource_list, &resource->link); + pw_resource_bound_id(resource, global->id); this->info.change_mask = PW_PORT_CHANGE_MASK_ALL; pw_port_resource_info(resource, &this->info); |