mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
link: handle the right port in the callback
This commit is contained in:
parent
7b12212eeb
commit
a3ca2df0fe
4 changed files with 9 additions and 6 deletions
|
|
@ -1251,17 +1251,18 @@ static void client_node_resource_done(void *data, uint32_t seq)
|
|||
struct impl *impl = data;
|
||||
struct node *this = &impl->node;
|
||||
struct spa_pending *p, *t;
|
||||
|
||||
pw_log_debug("client-node %p: done %d", this, seq);
|
||||
uint32_t count = 0;
|
||||
|
||||
spa_list_for_each_safe(p, t, &this->pending_list, link) {
|
||||
pw_log_debug("client-node %p: check %d", this, p->seq);
|
||||
if (p->seq == (int) seq) {
|
||||
pw_log_debug("client-node %p: found %d", this, p->res);
|
||||
pw_log_debug("client-node %p: do callback %d", this, p->res);
|
||||
p->func(p->data, p->res, 0, NULL);
|
||||
spa_list_remove(&p->link);
|
||||
count++;
|
||||
}
|
||||
}
|
||||
if (count == 0)
|
||||
pw_log_warn("client-node %p: unhandled done %d", this, seq);
|
||||
}
|
||||
|
||||
void pw_client_node_registered(struct pw_client_node *this, uint32_t node_id)
|
||||
|
|
|
|||
|
|
@ -227,6 +227,7 @@ static int impl_node_set_param(struct spa_node *node, uint32_t id, uint32_t flag
|
|||
case SPA_PARAM_Profile:
|
||||
if (impl->started)
|
||||
return -EIO;
|
||||
pw_log_debug("set profile %d", id);
|
||||
if (impl->adapter != impl->cnode) {
|
||||
if ((res = spa_node_set_param(impl->adapter, id, flags, param)) < 0)
|
||||
return res;
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ static int complete_input(void *data, int seq, int res, const void *result)
|
|||
{
|
||||
struct pw_link *this = data;
|
||||
struct impl *impl = SPA_CONTAINER_OF(this, struct impl, this);
|
||||
struct pw_node *node = this->output->node;
|
||||
struct pw_node *node = this->input->node;
|
||||
seq = SPA_RESULT_ASYNC_SEQ(seq);
|
||||
pw_log_debug("link %p: node %p async complete %d %d", impl, node, seq, res);
|
||||
pw_work_queue_complete(impl->work, node, seq, res);
|
||||
|
|
|
|||
|
|
@ -1146,7 +1146,8 @@ pw_node_find_port(struct pw_node *node, enum pw_direction direction, uint32_t po
|
|||
port = p;
|
||||
}
|
||||
}
|
||||
pw_log_debug("node %p: return port %p", node, port);
|
||||
pw_log_debug("node %p: return %s port %d: %p", node,
|
||||
pw_direction_as_string(direction), port_id, port);
|
||||
return port;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue