Go to the documentation of this file.
25 #ifndef SPA_DEBUG_FORMAT_H
26 #define SPA_DEBUG_FORMAT_H
44 uint32_t type,
void *body, uint32_t size)
48 fprintf(stderr,
"%s", *(int32_t *) body ?
"true" :
"false");
55 snprintf(tmp,
sizeof(tmp),
"%d", *(int32_t*)body);
58 fprintf(stderr,
"%s", str);
62 fprintf(stderr,
"%d", *(int32_t *) body);
65 fprintf(stderr,
"%" PRIi64, *(int64_t *) body);
68 fprintf(stderr,
"%f", *(
float *) body);
71 fprintf(stderr,
"%g", *(
double *) body);
74 fprintf(stderr,
"%s", (
char *) body);
79 fprintf(stderr,
"%" PRIu32
"x%" PRIu32, r->
width, r->
height);
85 fprintf(stderr,
"%" PRIu32
"/%" PRIu32, f->
num, f->
denom);
89 fprintf(stderr,
"Bitmap");
92 fprintf(stderr,
"Bytes");
100 fprintf(stderr,
"< ");
103 fprintf(stderr,
", ");
106 fprintf(stderr,
" >");
110 fprintf(stderr,
"INVALID type %d", type);
119 const char *media_type;
120 const char *media_subtype;
122 uint32_t mtype, mstype;
136 fprintf(stderr,
"%*s %s/%s\n", indent,
"",
143 uint32_t i,
type, size, n_vals, choice;
161 key = ti ? ti->
name : NULL;
163 fprintf(stderr,
"%*s %16s : (%s) ", indent,
"",
170 const char *ssep, *esep, *sep;
188 fprintf(stderr,
"%s", ssep);
190 for (i = 1; i < n_vals; i++) {
193 fprintf(stderr,
"%s", sep);
196 fprintf(stderr,
"%s", esep);
198 fprintf(stderr,
"\n");
Definition: pod/pod.h:175
uint32_t width
Definition: defs.h:87
const struct spa_type_info spa_type_format[]
Definition: param/type-info.h:244
@ SPA_TYPE_Float
Definition: build-12683127/doc/spa/utils/type.h:50
@ SPA_FORMAT_mediaType
media type (Id enum spa_media_type)
Definition: param/format.h:102
@ SPA_TYPE_Long
Definition: build-12683127/doc/spa/utils/type.h:49
const char * spa_debug_type_find_short_name(const struct spa_type_info *info, uint32_t type)
Definition: types.h:75
@ SPA_CHOICE_Range
range: default, min, max
Definition: pod/pod.h:142
#define SPA_POD_OBJECT_FOREACH(obj, iter)
Definition: iter.h:123
@ SPA_TYPE_Id
Definition: build-12683127/doc/spa/utils/type.h:47
uint32_t type
Definition: build-12683127/doc/spa/utils/type.h:138
@ SPA_TYPE_Int
Definition: build-12683127/doc/spa/utils/type.h:48
Definition: build-12683127/doc/spa/utils/type.h:137
Definition: pod/pod.h:199
@ SPA_CHOICE_Enum
list: default, alternative,...
Definition: pod/pod.h:144
@ _SPA_TYPE_LAST
not part of ABI
Definition: build-12683127/doc/spa/utils/type.h:65
uint32_t height
Definition: defs.h:88
@ SPA_TYPE_Array
Definition: build-12683127/doc/spa/utils/type.h:57
#define SPA_POD_TYPE(pod)
Definition: pod/pod.h:41
@ SPA_TYPE_Rectangle
Definition: build-12683127/doc/spa/utils/type.h:54
#define SPA_PTROFF(ptr_, offset_, type_)
Return the address (buffer + offset) as pointer of type.
Definition: defs.h:159
@ SPA_CHOICE_Flags
flags: default, possible flags,...
Definition: pod/pod.h:145
#define SPA_POD_ARRAY_BODY_FOREACH(body, _size, iter)
Definition: iter.h:94
const char * name
Definition: build-12683127/doc/spa/utils/type.h:140
const struct spa_type_info spa_types[]
Definition: utils/type-info.h:78
@ SPA_TYPE_String
Definition: build-12683127/doc/spa/utils/type.h:52
@ SPA_TYPE_Bitmap
Definition: build-12683127/doc/spa/utils/type.h:56
struct spa_pod * spa_pod_get_values(const struct spa_pod *pod, uint32_t *n_vals, uint32_t *choice)
Definition: iter.h:362
@ SPA_TYPE_Bool
Definition: build-12683127/doc/spa/utils/type.h:46
Definition: pod/pod.h:122
#define SPA_POD_BODY(pod)
Definition: pod/pod.h:47
uint32_t key
key of property, list of valid keys depends on the object type
Definition: pod/pod.h:200
@ SPA_FORMAT_mediaSubtype
media subtype (Id enum spa_media_subtype)
Definition: param/format.h:103
uint32_t size
Definition: pod/pod.h:51
@ SPA_TYPE_Bytes
Definition: build-12683127/doc/spa/utils/type.h:53
@ SPA_TYPE_Double
Definition: build-12683127/doc/spa/utils/type.h:51
@ SPA_TYPE_Object
Definition: build-12683127/doc/spa/utils/type.h:59
const struct spa_type_info * values
Definition: build-12683127/doc/spa/utils/type.h:141
uint32_t denom
Definition: defs.h:106
int spa_format_parse(const struct spa_pod *format, uint32_t *media_type, uint32_t *media_subtype)
Definition: format-utils.h:42
@ SPA_TYPE_Fraction
Definition: build-12683127/doc/spa/utils/type.h:55
int spa_debug_format(int indent, const struct spa_type_info *info, const struct spa_pod *format)
Definition: debug/format.h:116
@ SPA_CHOICE_None
no choice, first value is current
Definition: pod/pod.h:141
uint32_t type
Definition: pod/pod.h:52
const struct spa_type_info spa_type_media_subtype[]
Definition: param/type-info.h:194
const char * spa_debug_type_short_name(const char *name)
Definition: types.h:60
const struct spa_type_info * spa_debug_type_find(const struct spa_type_info *info, uint32_t type)
Definition: types.h:41
@ SPA_CHOICE_Step
range with step: default, min, max, step
Definition: pod/pod.h:143
const struct spa_type_info spa_type_media_type[]
Definition: param/type-info.h:180
int spa_debug_format_value(const struct spa_type_info *info, uint32_t type, void *body, uint32_t size)
Definition: debug/format.h:43
struct spa_pod value
Definition: pod/pod.h:212
uint32_t num
Definition: defs.h:105
struct spa_pod child
Definition: pod/pod.h:123
const char * spa_debug_type_find_name(const struct spa_type_info *info, uint32_t type)
Definition: types.h:68