+ +
2da5fe7 OpenAVX v0.2.0 - High-performance open-standard IP audio and video transport suite
saifmukhtar · 2026-11-24
c · 50 lines · 1.0 KB · SPDX: MIT
main
1 /* Simple Plugin API */
2 /* SPDX-FileCopyrightText: Copyright © 2018 Wim Taymans */
3 /* SPDX-License-Identifier: MIT */
4  
5 #ifndef SPA_DEBUG_DICT_H
6 #define SPA_DEBUG_DICT_H
7  
8 #include <spa/debug/context.h>
9 #include <spa/utils/dict.h>
10  
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14  
15 /**
16 * \addtogroup spa_debug
17 * \{
18 */
19  
20 #ifndef SPA_API_DEBUG_DICT
21 #ifdef SPA_API_IMPL
22 #define SPA_API_DEBUG_DICT SPA_API_IMPL
23 #else
24 #define SPA_API_DEBUG_DICT static inline
25 #endif
26 #endif
27  
28 SPA_API_DEBUG_DICT int spa_debugc_dict(struct spa_debug_context *ctx, int indent, const struct spa_dict *dict)
29 {
30 const struct spa_dict_item *item;
31 spa_debugc(ctx, "%*sflags:%08x n_items:%d", indent, "", dict->flags, dict->n_items);
32 spa_dict_for_each(item, dict) {
33 spa_debugc(ctx, "%*s %s = \"%s\"", indent, "", item->key, item->value);
34 }
35 return 0;
36 }
37  
38 SPA_API_DEBUG_DICT int spa_debug_dict(int indent, const struct spa_dict *dict)
39 {
40 return spa_debugc_dict(NULL, indent, dict);
41 }
42 /**
43 * \}
44 */
45  
46 #ifdef __cplusplus
47 } /* extern "C" */
48 #endif
49  
50 #endif /* SPA_DEBUG_DICT_H */