improve some debug

This commit is contained in:
Wim Taymans 2020-11-03 18:04:42 +01:00
parent aeed0e3ea4
commit 8ca71060eb
2 changed files with 6 additions and 4 deletions

View file

@ -123,6 +123,7 @@ do_deactivate_link(struct spa_loop *loop,
static void clear_link(struct node_data *data, struct link *link)
{
struct pw_context *context = data->context;
pw_log_debug("link %p", link);
pw_loop_invoke(context->data_loop,
do_deactivate_link, SPA_ID_INVALID, NULL, 0, true, link);
pw_memmap_free(link->map);

View file

@ -297,12 +297,12 @@ static void node_update_state(struct pw_impl_node *node, enum pw_node_state stat
node->info.state = state;
impl->pending = state;
if (old == state)
return;
pw_log_debug(NAME" %p: (%s) %s -> %s (%s)", node, node->name,
pw_node_state_as_string(old), pw_node_state_as_string(state), error);
if (old == state)
return;
if (state == PW_NODE_STATE_ERROR) {
pw_log_error("(%s-%u) %s -> error (%s)", node->name, node->info.id,
pw_node_state_as_string(old), error);
@ -1921,7 +1921,8 @@ int pw_impl_node_set_state(struct pw_impl_node *node, enum pw_node_state state)
struct impl *impl = SPA_CONTAINER_OF(node, struct impl, this);
enum pw_node_state old = impl->pending;
pw_log_debug(NAME" %p: set state %s -> %s, active %d", node,
pw_log_debug(NAME" %p: set state (%s) %s -> %s, active %d", node,
pw_node_state_as_string(node->info.state),
pw_node_state_as_string(old),
pw_node_state_as_string(state),
node->active);