PipeWire 1.6.8

Loading...
Searching...
No Matches
node.h
Go to the documentation of this file.
1/* Simple Plugin API */
2/* SPDX-FileCopyrightText: Copyright © 2018 Wim Taymans */
3/* SPDX-License-Identifier: MIT */
4
5#ifndef SPA_DEBUG_NODE_H
6#define SPA_DEBUG_NODE_H
7
8#include <spa/node/node.h>
9#include <spa/debug/context.h>
10#include <spa/debug/dict.h>
11
12#ifdef __cplusplus
13 extern "C" {
14#endif
15
20
21#ifndef SPA_API_DEBUG_NODE
22 #ifdef SPA_API_IMPL
23 #define SPA_API_DEBUG_NODE SPA_API_IMPL
24 #else
25 #define SPA_API_DEBUG_NODE static inline
26 #endif
27#endif
28
29 SPA_API_DEBUG_NODE int spa_debugc_port_info(struct spa_debug_context *ctx, int indent, const struct spa_port_info *info)
30{
31 spa_debugc(ctx, "%*s" "struct spa_port_info %p:", indent, "", info);
32 spa_debugc(ctx, "%*s" " flags: \t%08" PRIx64, indent, "", info->flags);
33 spa_debugc(ctx, "%*s" " rate: \t%d/%d", indent, "", info->rate.num, info->rate.denom);
34 spa_debugc(ctx, "%*s" " props:", indent, "");
35 if (info->props)
36 spa_debugc_dict(ctx, indent + 2, info->props);
37 else
38 spa_debugc(ctx, "%*s" " none", indent, "");
39 return 0;
40}
41
42 SPA_API_DEBUG_NODE int spa_debug_port_info(int indent, const struct spa_port_info *info)
43{
44 return spa_debugc_port_info(NULL, indent, info);
45}
48
49
50
51#ifdef __cplusplus
52} /* extern "C" */
53#endif
54
55#endif /* SPA_DEBUG_NODE_H */
dict.h
spa/debug/dict.h
spa_debugc
#define spa_debugc(_c, _fmt,...)
Definition context.h:50
spa_debugc_dict
SPA_API_DEBUG_DICT int spa_debugc_dict(struct spa_debug_context *ctx, int indent, const struct spa_dict *dict)
Definition dict.h:35
spa_debugc_port_info
SPA_API_DEBUG_NODE int spa_debugc_port_info(struct spa_debug_context *ctx, int indent, const struct spa_port_info *info)
Definition node.h:36
SPA_API_DEBUG_NODE
#define SPA_API_DEBUG_NODE
Definition node.h:32
spa_debug_port_info
SPA_API_DEBUG_NODE int spa_debug_port_info(int indent, const struct spa_port_info *info)
Definition node.h:49
context.h
spa/debug/context.h
node.h
spa/node/node.h
spa_debug_context
Definition context.h:46
spa_port_info
Port information structure.
Definition node.h:103