PipeWire 0.3.65
spa/include/spa/debug/node.h
Go to the documentation of this file.
1/* Simple Plugin API
2 *
3 * Copyright © 2018 Wim Taymans
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice (including the next
13 * paragraph) shall be included in all copies or substantial portions of the
14 * Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
23 */
24
25#ifndef SPA_DEBUG_NODE_H
26#define SPA_DEBUG_NODE_H
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
37#include <spa/node/node.h>
38#include <spa/debug/context.h>
39#include <spa/debug/dict.h>
40
41static inline int spa_debugc_port_info(struct spa_debug_context *ctx, int indent, const struct spa_port_info *info)
42{
43 spa_debugc(ctx, "%*s" "struct spa_port_info %p:", indent, "", info);
44 spa_debugc(ctx, "%*s" " flags: \t%08" PRIx64, indent, "", info->flags);
45 spa_debugc(ctx, "%*s" " rate: \t%d/%d", indent, "", info->rate.num, info->rate.denom);
46 spa_debugc(ctx, "%*s" " props:", indent, "");
47 if (info->props)
48 spa_debugc_dict(ctx, indent + 2, info->props);
49 else
50 spa_debugc(ctx, "%*s" " none", indent, "");
51 return 0;
52}
53
54static inline int spa_debug_port_info(int indent, const struct spa_port_info *info)
55{
56 return spa_debugc_port_info(NULL, indent, info);
57}
63#ifdef __cplusplus
64} /* extern "C" */
65#endif
66
67#endif /* SPA_DEBUG_NODE_H */
spa/debug/dict.h
static int spa_debug_port_info(int indent, const struct spa_port_info *info)
Definition: spa/include/spa/debug/node.h:59
#define spa_debugc(_c, _fmt,...)
Definition: spa/include/spa/debug/context.h:57
static int spa_debugc_dict(struct spa_debug_context *ctx, int indent, const struct spa_dict *dict)
Definition: debug/dict.h:45
static int spa_debugc_port_info(struct spa_debug_context *ctx, int indent, const struct spa_port_info *info)
Definition: spa/include/spa/debug/node.h:46
spa/debug/context.h
spa/node/node.h
Definition: spa/include/spa/debug/context.h:53
uint32_t num
Definition: defs.h:140
uint32_t denom
Definition: defs.h:141
Port information structure.
Definition: spa/include/spa/node/node.h:113
uint64_t flags
port flags
Definition: spa/include/spa/node/node.h:151
struct spa_fraction rate
rate of sequence numbers on port
Definition: spa/include/spa/node/node.h:152