mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
improve debug
This commit is contained in:
parent
40e3ba8bb4
commit
c164cb80c8
5 changed files with 19 additions and 8 deletions
|
|
@ -378,10 +378,11 @@ static int impl_node_send_command(void *object, const struct spa_command *comman
|
|||
spa_return_val_if_fail(this != NULL, -EINVAL);
|
||||
spa_return_val_if_fail(command != NULL, -EINVAL);
|
||||
|
||||
pw_log_debug(NAME " %p: send command %d", this, SPA_COMMAND_TYPE(command));
|
||||
|
||||
if (this->resource == NULL)
|
||||
return -EIO;
|
||||
|
||||
pw_log_debug(NAME " %p: send command %d", this, SPA_COMMAND_TYPE(command));
|
||||
return pw_client_node_resource_command(this->resource, command);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -228,6 +228,8 @@ static void pool_added(void *data, struct pw_memblock *block)
|
|||
{
|
||||
struct impl *impl = data;
|
||||
struct pw_client *client = &impl->this;
|
||||
|
||||
pw_log_debug("client %p: added block %d", client, block->id);
|
||||
if (client->core_resource) {
|
||||
pw_core_resource_add_mem(client->core_resource,
|
||||
block->id, block->type, block->fd,
|
||||
|
|
@ -239,6 +241,7 @@ static void pool_removed(void *data, struct pw_memblock *block)
|
|||
{
|
||||
struct impl *impl = data;
|
||||
struct pw_client *client = &impl->this;
|
||||
pw_log_debug("client %p: removed block %d", client, block->id);
|
||||
if (client->core_resource)
|
||||
pw_core_resource_remove_mem(client->core_resource, block->id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -244,10 +244,15 @@ static struct mapping * memblock_find_mapping(struct memblock *b,
|
|||
uint32_t flags, uint32_t offset, uint32_t size)
|
||||
{
|
||||
struct mapping *m;
|
||||
struct pw_mempool *pool = b->this.pool;
|
||||
|
||||
spa_list_for_each(m, &b->mappings, link) {
|
||||
if (m->offset <= offset && (m->offset + m->size) >= (offset + size))
|
||||
if (m->offset <= offset && (m->offset + m->size) >= (offset + size)) {
|
||||
pw_log_debug("pool %p: found %p id:%d fd:%d offs:%d size:%d ref:%d",
|
||||
pool, &b->this, b->this.id, b->this.fd,
|
||||
offset, size, b->this.ref);
|
||||
return m;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
|
@ -487,7 +492,8 @@ static struct memblock * mempool_find_fd(struct pw_mempool *pool, int fd)
|
|||
|
||||
spa_list_for_each(b, &impl->blocks, link) {
|
||||
if (fd == b->this.fd) {
|
||||
pw_log_debug("pool %p: found %p id:%d for fd %d", pool, &b->this, b->this.id, fd);
|
||||
pw_log_debug("pool %p: found %p id:%d fd:%d ref:%d",
|
||||
pool, &b->this, b->this.id, fd, b->this.ref);
|
||||
return b;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -719,10 +719,10 @@ static void dump_states(struct pw_node *driver)
|
|||
struct pw_node_activation *a = t->activation;
|
||||
if (t->node == NULL)
|
||||
continue;
|
||||
pw_log_warn("node %p (%s): required:%d s:%"PRIu64" a:%"PRIu64" f:%"PRIu64
|
||||
pw_log_warn("node %p (%s): pending:%d/%d s:%"PRIu64" a:%"PRIu64" f:%"PRIu64
|
||||
" waiting:%"PRIu64" process:%"PRIu64" status:%d",
|
||||
t->node, t->node->info.name,
|
||||
a->state[0].required,
|
||||
a->state[0].pending, a->state[0].required,
|
||||
a->signal_time,
|
||||
a->awake_time,
|
||||
a->finish_time,
|
||||
|
|
|
|||
|
|
@ -711,8 +711,8 @@ static int impl_node_process_input(void *object)
|
|||
|
||||
size = impl->time.ticks - impl->dequeued.incount;
|
||||
|
||||
pw_log_trace(NAME" %p: process in %d %d %"PRIu64" %"PRIi64" %"PRIu64, stream,
|
||||
io->status, io->buffer_id, impl->time.ticks, impl->time.delay, size);
|
||||
pw_log_trace(NAME" %p: process in status:%d id:%d ticks:%"PRIu64" delay:%"PRIi64" size:%"PRIi64,
|
||||
stream, io->status, io->buffer_id, impl->time.ticks, impl->time.delay, size);
|
||||
|
||||
if (io->status != SPA_STATUS_HAVE_BUFFER)
|
||||
goto done;
|
||||
|
|
@ -750,7 +750,7 @@ static int impl_node_process_output(void *object)
|
|||
uint32_t index;
|
||||
|
||||
again:
|
||||
pw_log_trace(NAME" %p: process out %d %d %"PRIu64" %"PRIi64, stream,
|
||||
pw_log_trace(NAME" %p: process out status:%d id:%d ticks:%"PRIu64" delay:%"PRIi64, stream,
|
||||
io->status, io->buffer_id, impl->time.ticks, impl->time.delay);
|
||||
|
||||
res = 0;
|
||||
|
|
@ -1531,6 +1531,7 @@ SPA_EXPORT
|
|||
int pw_stream_set_active(struct pw_stream *stream, bool active)
|
||||
{
|
||||
struct stream *impl = SPA_CONTAINER_OF(stream, struct stream, this);
|
||||
pw_log_debug(NAME" %p: active:%d", stream, active);
|
||||
if (impl->node)
|
||||
pw_node_set_active(impl->node, active);
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue