From c9f7439b52759be0bec5d4023c8dd11aa5012371 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 16 Nov 2018 16:41:13 +0100 Subject: [PATCH] media-session: debug profile --- src/examples/media-session.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/examples/media-session.c b/src/examples/media-session.c index 03222335a..5c461b3dd 100644 --- a/src/examples/media-session.c +++ b/src/examples/media-session.c @@ -34,6 +34,7 @@ #include #include #include +#include #include "pipewire/core.h" #include "pipewire/control.h" @@ -479,11 +480,11 @@ handle_node(struct impl *impl, uint32_t id, uint32_t parent_id, spa_list_append(&impl->node_list, &node->l); node->type = NODE_TYPE_UNKNOWN; + pw_log_debug(NAME" %p: node media.class %s", impl, media_class); + if (media_class == NULL) return 0; - pw_log_debug(NAME" %p: node media.class %s", impl, media_class); - if (strstr(media_class, "Stream/") == media_class) { media_class += strlen("Stream/"); @@ -1098,6 +1099,10 @@ static int rescan_node(struct impl *impl, struct node *node) SPA_PARAM_PROFILE_format, spa_format_audio_raw_build(&b, SPA_PARAM_Format, &audio_info), 0); + + if (pw_log_level_enabled(SPA_LOG_LEVEL_DEBUG)) + spa_debug_pod(2, NULL, param); + pw_node_proxy_set_param((struct pw_node_proxy*)node->obj.proxy, SPA_PARAM_Profile, 0, param);