PipeWire  1.4.6
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 #ifdef __cplusplus
9 extern "C" {
10 #endif
11 
17 #include <spa/node/node.h>
18 #include <spa/debug/context.h>
19 #include <spa/debug/dict.h>
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 }
51 #ifdef __cplusplus
52 } /* extern "C" */
53 #endif
54 
55 #endif /* SPA_DEBUG_NODE_H */
spa/debug/dict.h
#define spa_debugc(_c, _fmt,...)
Definition: context.h:49
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_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
#define SPA_API_DEBUG_NODE
Definition: node.h:32
SPA_API_DEBUG_NODE int spa_debug_port_info(int indent, const struct spa_port_info *info)
Definition: node.h:49
spa/debug/context.h
spa/node/node.h
Definition: context.h:45
uint32_t num
Definition: defs.h:138
uint32_t denom
Definition: defs.h:139
Port information structure.
Definition: node.h:103
uint64_t flags
port flags
Definition: node.h:141
struct spa_fraction rate
rate of sequence numbers on port
Definition: node.h:142