mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-07 13:30:09 -05:00
Use client protocol to configure resources
This commit is contained in:
parent
ae708c14e7
commit
dbb57fc58e
2 changed files with 4 additions and 10 deletions
|
|
@ -143,15 +143,6 @@ process_messages(struct native_client *client)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
on_resource_added(struct pw_listener *listener,
|
||||
struct pw_client *client, struct pw_resource *resource)
|
||||
{
|
||||
resource->iface = pw_protocol_get_interface(client->protocol,
|
||||
spa_type_map_get_type(client->core->type.map, resource->type),
|
||||
true);
|
||||
}
|
||||
|
||||
static void
|
||||
on_busy_changed(struct pw_listener *listener,
|
||||
struct pw_client *client)
|
||||
|
|
@ -235,7 +226,6 @@ static struct native_client *client_new(struct impl *impl, int fd)
|
|||
|
||||
spa_list_insert(impl->client_list.prev, &this->link);
|
||||
|
||||
pw_signal_add(&client->resource_added, &this->resource_added, on_resource_added);
|
||||
pw_signal_add(&client->busy_changed, &this->busy_changed, on_busy_changed);
|
||||
|
||||
pw_global_bind(impl->core->global, client, 0, 0);
|
||||
|
|
|
|||
|
|
@ -57,6 +57,10 @@ struct pw_resource *pw_resource_new(struct pw_client *client,
|
|||
if (user_data_size > 0)
|
||||
this->user_data = SPA_MEMBER(impl, sizeof(struct impl), void);
|
||||
|
||||
this->iface = pw_protocol_get_interface(client->protocol,
|
||||
spa_type_map_get_type(client->core->type.map, type),
|
||||
true);
|
||||
|
||||
pw_log_debug("resource %p: new for client %p id %u", this, client, id);
|
||||
pw_signal_emit(&client->resource_added, client, this);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue