improve debug

This commit is contained in:
Wim Taymans 2021-03-29 11:41:06 +02:00
parent 74c6af1c55
commit 73f50bb964
2 changed files with 15 additions and 11 deletions

View file

@ -263,7 +263,8 @@ static int impl_node_add_port(void *object, enum spa_direction direction, uint32
this->last_port = port_id + 1;
port->valid = true;
spa_log_debug(this->log, NAME " %p: add port %d %d", this, port_id, this->last_port);
spa_log_debug(this->log, NAME " %p: add port %d:%d %d", this,
direction, port_id, this->last_port);
emit_port_info(this, port, true);
return 0;
@ -297,7 +298,8 @@ impl_node_remove_port(void *object, enum spa_direction direction, uint32_t port_
this->last_port = i + 1;
}
spa_log_debug(this->log, NAME " %p: remove port %d %d", this, port_id, this->last_port);
spa_log_debug(this->log, NAME " %p: remove port %d:%d %d", this,
direction, port_id, this->last_port);
spa_node_emit_port_info(&this->hooks, direction, port_id, NULL);
@ -566,13 +568,14 @@ impl_node_port_use_buffers(void *object,
uint32_t i;
spa_return_val_if_fail(this != NULL, -EINVAL);
spa_log_debug(this->log, NAME " %p: use %d buffers on port %d:%d",
this, n_buffers, direction, port_id);
spa_return_val_if_fail(CHECK_PORT(this, direction, port_id), -EINVAL);
port = GET_PORT(this, direction, port_id);
spa_log_debug(this->log, NAME " %p: use buffers %d on port %d:%d",
this, n_buffers, direction, port_id);
spa_return_val_if_fail(port->have_format, -EIO);
clear_buffers(this, port);
@ -597,8 +600,8 @@ impl_node_port_use_buffers(void *object,
if (direction == SPA_DIRECTION_OUTPUT)
queue_buffer(this, port, b);
spa_log_debug(this->log, NAME " %p: port %d.%d buffer %d n_data:%d data:%p maxsize:%d",
this, i, direction, port_id,
spa_log_debug(this->log, NAME " %p: port %d:%d buffer:%d n_data:%d data:%p maxsize:%d",
this, direction, port_id, i,
buffers[i]->n_datas, d[0].data, d[0].maxsize);
}
port->n_buffers = n_buffers;
@ -615,13 +618,14 @@ impl_node_port_set_io(void *object,
struct port *port;
spa_return_val_if_fail(this != NULL, -EINVAL);
spa_return_val_if_fail(CHECK_PORT(this, direction, port_id), -EINVAL);
port = GET_PORT(this, direction, port_id);
spa_log_debug(this->log, NAME " %p: port %d:%d io %d %p/%zd", this,
direction, port_id, id, data, size);
spa_return_val_if_fail(CHECK_PORT(this, direction, port_id), -EINVAL);
port = GET_PORT(this, direction, port_id);
switch (id) {
case SPA_IO_Buffers:
port->io = data;