mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
emit bound_id event
This commit is contained in:
parent
f56e4dbc4d
commit
e3a1c4151e
12 changed files with 23 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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],
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue