From 30f8219afd2be4e4eb38d5bf1517f452505fa5b7 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 14 Oct 2021 09:55:14 +0200 Subject: [PATCH] stream: improve some debug --- src/pipewire/filter.c | 12 +++++++++--- src/pipewire/stream.c | 13 +++++++++---- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/pipewire/filter.c b/src/pipewire/filter.c index e76738f4c..e87abadfe 100644 --- a/src/pipewire/filter.c +++ b/src/pipewire/filter.c @@ -605,7 +605,7 @@ static int impl_port_set_io(void *object, enum spa_direction direction, uint32_t struct filter *impl = object; struct port *port; - pw_log_debug("%p: set io %s %p %zd", impl, + pw_log_debug("%p: id:%d (%s) %p %zd", impl, id, spa_debug_type_find_name(spa_type_io, id), data, size); if ((port = get_port(impl, direction, port_id)) == NULL) @@ -837,11 +837,14 @@ static int impl_port_set_param(void *object, const struct spa_pod *params[1]; uint32_t n_params = 0; + pw_log_debug("%p: port:%d.%d id:%d (%s) param:%p disconnecting:%d", impl, + direction, port_id, id, + spa_debug_type_find_name(spa_type_param, id), param, + impl->disconnecting); + if (impl->disconnecting && param != NULL) return -EIO; - pw_log_debug("%p: param changed: %p %d", impl, param, impl->disconnecting); - if ((port = get_port(impl, direction, port_id)) == NULL) return -EINVAL; @@ -887,6 +890,9 @@ static int impl_port_use_buffers(void *object, int prot, res; int size = 0; + pw_log_debug("%p: port:%d.%d buffers:%u disconnecting:%d", impl, + direction, port_id, n_buffers, impl->disconnecting); + if (impl->disconnecting && n_buffers > 0) return -EIO; diff --git a/src/pipewire/stream.c b/src/pipewire/stream.c index 88411fff4..2456265af 100644 --- a/src/pipewire/stream.c +++ b/src/pipewire/stream.c @@ -618,7 +618,7 @@ static int impl_port_set_io(void *object, enum spa_direction direction, uint32_t struct stream *impl = object; struct pw_stream *stream = &impl->this; - pw_log_debug("%p: set io id %d (%s) %p %zd", impl, id, + pw_log_debug("%p: id:%d (%s) %p %zd", impl, id, spa_debug_type_find_name(spa_type_io, id), data, size); switch (id) { @@ -747,12 +747,14 @@ static int impl_port_set_param(void *object, struct pw_stream *stream = &impl->this; int res; + pw_log_debug("%p: port:%d.%d id:%d (%s) param:%p disconnecting:%d", impl, + direction, port_id, id, + spa_debug_type_find_name(spa_type_param, id), param, + impl->disconnecting); + if (impl->disconnecting && param != NULL) return -EIO; - pw_log_debug("%p: param id %d (%s) changed: %p", impl, id, - spa_debug_type_find_name(spa_type_param, id), param); - if (param) pw_log_pod(SPA_LOG_LEVEL_DEBUG, param); @@ -791,6 +793,9 @@ static int impl_port_use_buffers(void *object, int prot, res; int size = 0; + pw_log_debug("%p: port:%d.%d buffers:%u disconnecting:%d", impl, + direction, port_id, n_buffers, impl->disconnecting); + if (impl->disconnecting && n_buffers > 0) return -EIO;