pw-cli: always output to stdout

Use spa_debug_pod because spa_debug_format outputs to stderr
This commit is contained in:
Wim Taymans 2021-02-19 16:42:21 +01:00
parent 715a3a642a
commit 91875c1fd8

View file

@ -33,9 +33,10 @@
#endif
#include <getopt.h>
#define spa_debug(...) fprintf(stdout,__VA_ARGS__);fputc('\n', stdout)
#include <spa/utils/result.h>
#include <spa/debug/pod.h>
#include <spa/debug/format.h>
#include <spa/utils/keys.h>
#include <spa/utils/json.h>
#include <spa/pod/builder.h>
@ -681,7 +682,7 @@ static void info_link(struct proxy_data *pd)
printf("\n");
fprintf(stdout, "%c\tformat:\n", MARK_CHANGE(PW_LINK_CHANGE_MASK_FORMAT));
if (info->format)
spa_debug_format(2, NULL, info->format);
spa_debug_pod(2, NULL, info->format);
else
fprintf(stdout, "\t\tnone\n");
print_properties(info->props, MARK_CHANGE(PW_LINK_CHANGE_MASK_PROPS), true);
@ -815,9 +816,6 @@ static void event_param(void *object, int seq, uint32_t id,
fprintf(stdout, "remote %d object %d param %d index %d\n",
rd->id, data->global->id, id, index);
if (spa_pod_is_object_type(param, SPA_TYPE_OBJECT_Format))
spa_debug_format(2, NULL, param);
else
spa_debug_pod(2, NULL, param);
}
@ -2567,7 +2565,7 @@ dump_link(struct data *data, struct global *global,
printf("\n");
fprintf(stdout, "%sformat:\n", ind);
if (info->format)
spa_debug_format(8 * (level + 1) + 2, NULL, info->format);
spa_debug_pod(8 * (level + 1) + 2, NULL, info->format);
else
fprintf(stdout, "%s\tnone\n", ind);