5 #ifndef SPA_DEBUG_FORMAT_H 6 #define SPA_DEBUG_FORMAT_H 21 #include <spa/param/type-info.h> 24 #ifndef SPA_API_DEBUG_FORMAT 26 #define SPA_API_DEBUG_FORMAT SPA_API_IMPL 28 #define SPA_API_DEBUG_FORMAT static inline 35 uint32_t type,
void *body, uint32_t size)
47 snprintf(tmp,
sizeof(tmp),
"%d", *(int32_t*)body);
110 uint32_t type,
void *body, uint32_t size)
123 const char *media_type;
124 const char *media_subtype;
126 uint32_t mtype, mstype;
147 uint32_t i,
type, size, n_vals, choice;
167 key = ti ? ti->name : NULL;
177 const char *ssep, *esep, *sep;
197 for (i = 1; i < n_vals; i++) {
#define spa_debugc(_c, _fmt,...)
Definition: context.h:49
uint32_t type
Definition: type.h:155
uint32_t num
Definition: defs.h:138
uint32_t denom
Definition: defs.h:139
media type (Id enum spa_media_type)
Definition: format.h:93
#define SPA_POD_OBJECT_FOREACH(obj, iter)
Definition: iter.h:124
flags: default, possible flags,...
Definition: pod.h:151
#define SPA_POD_TYPE(pod)
Definition: pod.h:28
uint32_t type
Definition: pod.h:45
SPA_API_STRING int spa_strbuf_append(struct spa_strbuf *buf, const char *fmt,...)
Definition: string.h:390
SPA_API_POD_ITER struct spa_pod * spa_pod_get_values(const struct spa_pod *pod, uint32_t *n_vals, uint32_t *choice)
Definition: iter.h:363
SPA_API_DEBUG_TYPES const char * spa_debug_type_find_short_name(const struct spa_type_info *info, uint32_t type)
Definition: types.h:68
static const struct spa_type_info spa_type_media_type[]
Definition: format-types.h:39
#define spa_debugn(_fmt,...)
Definition: context.h:28
static const struct spa_type_info spa_types[]
Definition: type-info.h:38
SPA_API_FORMAT_UTILS int spa_format_parse(const struct spa_pod *format, uint32_t *media_type, uint32_t *media_subtype)
Definition: format-utils.h:37
#define SPA_POD_ARRAY_BODY_FOREACH(body, _size, iter)
Definition: iter.h:95
media subtype (Id enum spa_media_subtype)
Definition: format.h:94
struct spa_pod child
Definition: pod.h:122
SPA_API_DEBUG_FORMAT int spa_debug_format_value(const struct spa_type_info *info, uint32_t type, void *body, uint32_t size)
Definition: format.h:116
static const struct spa_type_info spa_type_format[]
Definition: format-types.h:135
not part of ABI
Definition: type.h:62
SPA_API_DEBUG_FORMAT int spa_debug_format(int indent, const struct spa_type_info *info, const struct spa_pod *format)
Definition: format.h:217
#define SPA_POD_BODY(pod)
Definition: pod.h:39
SPA_API_DEBUG_TYPES const char * spa_debug_type_find_name(const struct spa_type_info *info, uint32_t type)
Definition: types.h:61
no choice, first value is current
Definition: pod.h:147
buffer[1023]
Definition: core.h:437
list: default, alternative,...
Definition: pod.h:150
range: default, min, max
Definition: pod.h:148
SPA_API_DEBUG_TYPES const struct spa_type_info * spa_debug_type_find(const struct spa_type_info *info, uint32_t type)
Definition: types.h:37
SPA_API_DEBUG_FORMAT int spa_debugc_format(struct spa_debug_context *ctx, int indent, const struct spa_type_info *info, const struct spa_pod *format)
Definition: format.h:127
#define SPA_API_DEBUG_FORMAT
Definition: format.h:35
range with step: default, min, max, step
Definition: pod.h:149
static const struct spa_type_info spa_type_media_subtype[]
Definition: format-types.h:55
#define SPA_PTROFF(ptr_, offset_, type_)
Return the address (buffer + offset) as pointer of type.
Definition: defs.h:222
const struct spa_type_info * values
Definition: type.h:158
uint32_t key
key of property, list of valid keys depends on the object type
Definition: pod.h:209
uint32_t size
Definition: pod.h:44
struct spa_pod value
Definition: pod.h:230
SPA_API_DEBUG_FORMAT int spa_debug_strbuf_format_value(struct spa_strbuf *buffer, const struct spa_type_info *info, uint32_t type, void *body, uint32_t size)
Definition: format.h:41
SPA_API_STRING void spa_strbuf_init(struct spa_strbuf *buf, char *buffer, size_t maxsize)
Definition: string.h:380
uint32_t int int const char int r
Definition: core.h:445
SPA_API_DEBUG_TYPES const char * spa_debug_type_short_name(const char *name)
Definition: types.h:56