mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
improve debug and error messages
This commit is contained in:
parent
44e74c599f
commit
f4e8ebab51
4 changed files with 29 additions and 9 deletions
|
|
@ -250,7 +250,7 @@ static int negotiate_buffers(struct impl *this)
|
|||
struct spa_data *datas;
|
||||
uint32_t follower_flags, conv_flags;
|
||||
|
||||
spa_log_debug(this->log, "%p: %d", this, this->n_buffers);
|
||||
spa_log_debug(this->log, NAME" %p: %d", this, this->n_buffers);
|
||||
|
||||
if (this->n_buffers > 0)
|
||||
return 0;
|
||||
|
|
@ -452,7 +452,7 @@ static int negotiate_format(struct impl *this)
|
|||
|
||||
spa_pod_builder_init(&b, buffer, sizeof(buffer));
|
||||
|
||||
spa_log_debug(this->log, NAME "%p: negiotiate", this);
|
||||
spa_log_debug(this->log, NAME " %p: negiotiate", this);
|
||||
|
||||
state = 0;
|
||||
format = NULL;
|
||||
|
|
|
|||
|
|
@ -401,7 +401,23 @@ client_node_set_param(void *object, uint32_t id, uint32_t flags,
|
|||
const struct spa_pod *param)
|
||||
{
|
||||
struct node_data *data = object;
|
||||
return spa_node_set_param(data->node->node, id, flags, param);
|
||||
struct pw_proxy *proxy = (struct pw_proxy*)data->client_node;
|
||||
int res;
|
||||
|
||||
pw_log_debug("node %p: set_param %s:", proxy,
|
||||
spa_debug_type_find_name(spa_type_param, id));
|
||||
|
||||
res = spa_node_set_param(data->node->node, id, flags, param);
|
||||
|
||||
if (res < 0) {
|
||||
pw_log_error("node %p: set_param %s (%d) %p: %s", proxy,
|
||||
spa_debug_type_find_name(spa_type_param, id),
|
||||
id, param, spa_strerror(res));
|
||||
pw_proxy_errorf(proxy, res, "node_set_param(%s) failed: %s",
|
||||
spa_debug_type_find_name(spa_type_param, id),
|
||||
spa_strerror(res));
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
@ -559,7 +575,8 @@ client_node_port_set_param(void *object,
|
|||
goto error_exit;
|
||||
}
|
||||
|
||||
pw_log_debug("port %p: set param %d %p", port, id, param);
|
||||
pw_log_debug("port %p: set_param %s %p", port,
|
||||
spa_debug_type_find_name(spa_type_param, id), param);
|
||||
|
||||
res = pw_impl_port_set_param(port, id, flags, param);
|
||||
if (res < 0)
|
||||
|
|
@ -572,12 +589,13 @@ client_node_port_set_param(void *object,
|
|||
clear_buffers(data, mix);
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
|
||||
error_exit:
|
||||
pw_log_error("port %p: set_param %d %p: %s", port, id, param, spa_strerror(res));
|
||||
pw_proxy_errorf(proxy, res, "port_set_param: %s", spa_strerror(res));
|
||||
pw_proxy_errorf(proxy, res, "port_set_param(%s) failed: %s",
|
||||
spa_debug_type_find_name(spa_type_param, id),
|
||||
spa_strerror(res));
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -905,7 +905,7 @@ int pw_context_recalc_graph(struct pw_context *context, const char *reason)
|
|||
fallback = n;
|
||||
|
||||
spa_list_for_each(s, &n->follower_list, follower_link) {
|
||||
pw_log_debug(NAME" %p: driver %p: follower %p %s: %d",
|
||||
pw_log_debug(NAME" %p: driver %p: follower %p %s: active:%d",
|
||||
context, n, s, s->name, s->active);
|
||||
if (s != n && s->active) {
|
||||
/* if the driving node has active followers, it
|
||||
|
|
@ -930,8 +930,8 @@ int pw_context_recalc_graph(struct pw_context *context, const char *reason)
|
|||
if (!n->visited) {
|
||||
struct pw_impl_node *t;
|
||||
|
||||
pw_log_debug(NAME" %p: unassigned node %p: '%s' %d %d", context,
|
||||
n, n->name, n->active, n->want_driver);
|
||||
pw_log_debug(NAME" %p: unassigned node %p: '%s' active:%d want_driver:%d",
|
||||
context, n, n->name, n->active, n->want_driver);
|
||||
|
||||
t = n->active && n->want_driver ? target : NULL;
|
||||
|
||||
|
|
|
|||
|
|
@ -1218,6 +1218,8 @@ int pw_impl_link_register(struct pw_impl_link *link,
|
|||
pw_global_add_listener(link->global, &link->global_listener, &global_events, link);
|
||||
pw_global_register(link->global);
|
||||
|
||||
pw_log_debug(NAME" %p: output_active:%d input_active:%d", link,
|
||||
input_node->active, output_node->active);
|
||||
if (input_node->active && output_node->active)
|
||||
pw_impl_link_prepare(link);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue