improve debug and error reporting

This commit is contained in:
Wim Taymans 2019-10-08 22:33:31 +02:00
parent 9aadc753c0
commit 9d842fb5eb
7 changed files with 45 additions and 22 deletions

View file

@ -134,16 +134,16 @@ spa_debug_pod_value(int indent, const struct spa_type_info *info,
ii = ti ? spa_debug_type_find(ti->values, 0) : NULL;
ii = ii ? spa_debug_type_find(ii->values, b->id) : NULL;
spa_debug("%*s" "Object: size %d, type %s, id %s", indent, "", size,
ti ? ti->name : "unknown", ii ? ii->name : "unknown");
spa_debug("%*s" "Object: size %d, type %s (%d), id %s (%d)", indent, "", size,
ti ? ti->name : "unknown", b->type, ii ? ii->name : "unknown", b->id);
info = ti ? ti->values : info;
SPA_POD_OBJECT_BODY_FOREACH(b, size, p) {
ii = spa_debug_type_find(info, p->key);
spa_debug("%*s" "Prop: key %s, context %d", indent+2, "",
ii ? ii->name : "unknown", p->context);
spa_debug("%*s" "Prop: key %s (%d), context %d", indent+2, "",
ii ? ii->name : "unknown", p->key, p->context);
spa_debug_pod_value(indent + 4, ii ? ii->values : NULL,
p->value.type,

View file

@ -1420,6 +1420,7 @@ mmap_init(struct impl *this,
d[0].fd = expbuf.fd;
d[0].data = NULL;
SPA_FLAG_SET(b->flags, BUFFER_FLAG_ALLOCATED);
spa_log_debug(this->log, "v4l2: EXPBUF fd:%d", expbuf.fd);
} else {
d[0].type = SPA_DATA_MemPtr;
d[0].flags = SPA_DATA_FLAG_READABLE;
@ -1435,6 +1436,7 @@ mmap_init(struct impl *this,
}
b->ptr = d[0].data;
SPA_FLAG_SET(b->flags, BUFFER_FLAG_MAPPED);
spa_log_debug(this->log, "v4l2: mmap ptr:%p", d[0].data);
}
spa_v4l2_buffer_recycle(this, i);
}