summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wtaymans@redhat.com>2019-07-15 17:09:44 +0200
committerWim Taymans <wtaymans@redhat.com>2019-07-15 17:09:44 +0200
commit453e75a23eb7f0ecf89dc9e031e54ae3d50f35cd (patch)
tree2155cd7efa016efa049b0a7fe29955527f8b4691
parent93006d6d9029e320f3634015ca7c38aed71153bf (diff)
improve some debug
-rw-r--r--spa/plugins/audioconvert/audioadapter.c2
-rw-r--r--spa/plugins/audioconvert/audioconvert.c2
-rw-r--r--spa/plugins/audioconvert/fmtconvert.c5
-rw-r--r--spa/plugins/audioconvert/resample.c7
-rw-r--r--spa/plugins/audioconvert/splitter.c6
-rw-r--r--src/modules/module-client-node/client-node.c2
-rw-r--r--src/pipewire/stream.c3
7 files changed, 20 insertions, 7 deletions
diff --git a/spa/plugins/audioconvert/audioadapter.c b/spa/plugins/audioconvert/audioadapter.c
index 53a8304f..1500568c 100644
--- a/spa/plugins/audioconvert/audioadapter.c
+++ b/spa/plugins/audioconvert/audioadapter.c
@@ -295,7 +295,7 @@ static void convert_port_info(void *data,
port_id--;
}
- spa_log_debug(this->log, NAME" %p: port info %d:%d", this,
+ spa_log_trace(this->log, NAME" %p: port info %d:%d", this,
direction, port_id);
spa_node_emit_port_info(&this->hooks, direction, port_id, info);
diff --git a/spa/plugins/audioconvert/audioconvert.c b/spa/plugins/audioconvert/audioconvert.c
index 6cc1c5f5..a09a41b2 100644
--- a/spa/plugins/audioconvert/audioconvert.c
+++ b/spa/plugins/audioconvert/audioconvert.c
@@ -464,6 +464,8 @@ static int impl_node_set_io(void *object, uint32_t id, void *data, size_t size)
spa_return_val_if_fail(this != NULL, -EINVAL);
+ spa_log_debug(this->log, NAME " %p: io %d %p/%zd", this, id, data, size);
+
switch (id) {
case SPA_IO_Position:
res = spa_node_set_io(this->resample, id, data, size);
diff --git a/spa/plugins/audioconvert/fmtconvert.c b/spa/plugins/audioconvert/fmtconvert.c
index c22524f5..5d8175cc 100644
--- a/spa/plugins/audioconvert/fmtconvert.c
+++ b/spa/plugins/audioconvert/fmtconvert.c
@@ -857,8 +857,9 @@ static int impl_node_process(void *object)
maxsize = outb->datas[0].maxsize;
n_samples = SPA_MIN(n_samples, maxsize / outport->stride);
- spa_log_trace_fp(this->log, NAME " %p: n_src:%d n_dst:%d size:%d maxsize:%d n_samples:%d",
- this, n_src_datas, n_dst_datas, size, maxsize, n_samples);
+ spa_log_trace_fp(this->log, NAME " %p: n_src:%d n_dst:%d size:%d maxsize:%d n_samples:%d p:%d",
+ this, n_src_datas, n_dst_datas, size, maxsize, n_samples,
+ this->is_passthrough);
for (i = 0; i < n_dst_datas; i++) {
dst_datas[i] = this->is_passthrough ?
diff --git a/spa/plugins/audioconvert/resample.c b/spa/plugins/audioconvert/resample.c
index 4cb310b1..a6884d17 100644
--- a/spa/plugins/audioconvert/resample.c
+++ b/spa/plugins/audioconvert/resample.c
@@ -223,6 +223,8 @@ static int impl_node_set_io(void *object, uint32_t id, void *data, size_t size)
spa_return_val_if_fail(this != NULL, -EINVAL);
+ spa_log_debug(this->log, NAME " %p: io %d %p/%zd", this, id, data, size);
+
switch (id) {
case SPA_IO_Position:
this->io_position = data;
@@ -794,9 +796,10 @@ static int impl_node_process(void *object)
resample_process(&this->resample, src_datas, &in_len, dst_datas, &out_len);
- spa_log_trace_fp(this->log, NAME " %p: in %d/%d %zd %d out %d/%d %zd %d",
+ spa_log_trace_fp(this->log, NAME " %p: in %d/%d %zd %d out %d/%d %zd %d max:%d",
this, pin_len, in_len, size / sizeof(float), inport->offset,
- pout_len, out_len, maxsize / sizeof(float), outport->offset);
+ pout_len, out_len, maxsize / sizeof(float), outport->offset,
+ max);
for (i = 0; i < db->n_datas; i++) {
db->datas[i].chunk->size = outport->offset + (out_len * sizeof(float));
diff --git a/spa/plugins/audioconvert/splitter.c b/spa/plugins/audioconvert/splitter.c
index ba128119..a79b998c 100644
--- a/spa/plugins/audioconvert/splitter.c
+++ b/spa/plugins/audioconvert/splitter.c
@@ -750,7 +750,11 @@ impl_node_port_use_buffers(void *object,
if (direction == SPA_DIRECTION_OUTPUT &&
!SPA_FLAG_CHECK(d[j].flags, SPA_DATA_FLAG_DYNAMIC))
this->is_passthrough = false;
+
+ spa_log_debug(this->log, NAME " %p: buffer %d data %d flags:%08x %p",
+ this, i, j, d[j].flags, b->datas[j]);
}
+
if (direction == SPA_DIRECTION_OUTPUT)
queue_buffer(this, port, i);
}
@@ -898,7 +902,7 @@ static int impl_node_process(void *object)
res |= SPA_STATUS_HAVE_BUFFER;
}
- spa_log_trace_fp(this->log, NAME " %p: %d %d %d %d %d %d", this,
+ spa_log_trace_fp(this->log, NAME " %p: n_src:%d n_dst:%d n_samples:%d max:%d stride:%d p:%d", this,
n_src_datas, n_dst_datas, n_samples, maxsize, inport->stride,
this->is_passthrough);
diff --git a/src/modules/module-client-node/client-node.c b/src/modules/module-client-node/client-node.c
index 55f16e9f..0aa46383 100644
--- a/src/modules/module-client-node/client-node.c
+++ b/src/modules/module-client-node/client-node.c
@@ -992,7 +992,7 @@ static int impl_node_process(void *object)
struct pw_node *n = impl->this.node;
struct timespec ts;
- spa_log_trace_fp(this->log, "%p: send process %p", this, impl->this.node->driver_node);
+ spa_log_trace_fp(this->log, "%p: send process driver:%p", this, impl->this.node->driver_node);
spa_system_clock_gettime(this->data_system, CLOCK_MONOTONIC, &ts);
n->rt.activation->status = TRIGGERED;
diff --git a/src/pipewire/stream.c b/src/pipewire/stream.c
index 0d97b470..40f676e1 100644
--- a/src/pipewire/stream.c
+++ b/src/pipewire/stream.c
@@ -307,6 +307,9 @@ static void call_process(struct stream *impl)
static int impl_set_io(void *object, uint32_t id, void *data, size_t size)
{
struct stream *impl = object;
+
+ pw_log_debug("stream %p: io %d %p/%zd", impl, id, data, size);
+
switch(id) {
case SPA_IO_Position:
if (data && size >= sizeof(struct spa_io_position))