client-node: send own activation to client for stats

This commit is contained in:
Wim Taymans 2019-03-06 09:52:40 +01:00
parent 5ee287d79b
commit 412c7f4cee

View file

@ -1243,12 +1243,23 @@ static void client_node_resource_pong(void *data, int seq)
void pw_client_node_registered(struct pw_client_node *this, uint32_t node_id) void pw_client_node_registered(struct pw_client_node *this, uint32_t node_id)
{ {
struct impl *impl = SPA_CONTAINER_OF(this, struct impl, this); struct impl *impl = SPA_CONTAINER_OF(this, struct impl, this);
struct pw_node *node = this->node;
struct mem *m;
pw_log_debug("client-node %p: %d", this, node_id); pw_log_debug("client-node %p: %d", this, node_id);
pw_client_node_resource_transport(this->resource, pw_client_node_resource_transport(this->resource,
node_id, node_id,
impl->other_fds[0], impl->other_fds[0],
impl->other_fds[1]); impl->other_fds[1]);
m = ensure_mem(impl, node->activation->fd, SPA_DATA_MemFd, node->activation->flags);
pw_client_node_resource_set_activation(this->resource,
node_id,
impl->other_fds[1],
m->id,
0,
sizeof(struct pw_node_activation));
} }
static void node_initialized(void *data) static void node_initialized(void *data)