PipeWire  0.3.59
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
29 extern "C" {
30 #endif
31 
37 #include <spa/node/node.h>
38 #include <spa/debug/log.h>
39 #include <spa/debug/dict.h>
40 
41 static inline int spa_debug_port_info(int indent, const struct spa_port_info *info)
42 {
43  spa_debug("%*s" "struct spa_port_info %p:", indent, "", info);
44  spa_debug("%*s" " flags: \t%08" PRIx64, indent, "", info->flags);
45  spa_debug("%*s" " rate: \t%d/%d", indent, "", info->rate.num, info->rate.denom);
46  spa_debug("%*s" " props:", indent, "");
47  if (info->props)
48  spa_debug_dict(indent + 2, info->props);
49  else
50  spa_debug("%*s" " none", indent, "");
51  return 0;
52 }
53 
59 #ifdef __cplusplus
60 } /* extern "C" */
61 #endif
62 
63 #endif /* SPA_DEBUG_NODE_H */
spa/debug/dict.h
static int spa_debug_dict(int indent, const struct spa_dict *dict)
Definition: dict.h:45
static int spa_debug_port_info(int indent, const struct spa_port_info *info)
Definition: node.h:46
#define spa_debug(fmt,...)
Definition: log.h:44
spa/debug/log.h
spa/node/node.h
uint32_t num
Definition: defs.h:140
uint32_t denom
Definition: defs.h:141
Port information structure.
Definition: node.h:113
uint64_t flags
port flags
Definition: node.h:151
struct spa_fraction rate
rate of sequence numbers on port
Definition: node.h:152