Loading...
Searching...
No Matches
iter.h
Go to the documentation of this file.
/* Simple Plugin API */
/* SPDX-FileCopyrightText: Copyright © 2018 Wim Taymans */
/* SPDX-License-Identifier: MIT */
#ifndef SPA_POD_ITER_H
#define SPA_POD_ITER_H
#include <errno.h>
#include <sys/types.h>
#include <spa/pod/pod.h>
#include <spa/pod/body.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifndef SPA_API_POD_ITER
#ifdef SPA_API_IMPL
#define SPA_API_POD_ITER SPA_API_IMPL
#else
#define SPA_API_POD_ITER static inline
#endif
#endif
SPA_API_POD_ITER bool spa_pod_is_inside(const void *pod, uint32_t size, const void *iter)
{
size_t remaining;
return spa_ptr_type_inside(pod, size, iter, struct spa_pod, &remaining) &&
remaining >= SPA_POD_BODY_SIZE(iter);
}
SPA_API_POD_ITER void *spa_pod_next(const void *iter)
{
return SPA_PTROFF(iter, SPA_ROUND_UP_N(SPA_POD_SIZE(iter), SPA_POD_ALIGN), void);
}
SPA_API_POD_ITER struct spa_pod_prop *spa_pod_prop_first(const struct spa_pod_object_body *body)
{
return SPA_PTROFF(body, sizeof(struct spa_pod_object_body), struct spa_pod_prop);
}
SPA_API_POD_ITER bool spa_pod_prop_is_inside(const struct spa_pod_object_body *body,
uint32_t size, const struct spa_pod_prop *iter)
{
size_t remaining;
return spa_ptr_type_inside(body, size, iter, struct spa_pod_prop, &remaining) &&
remaining >= iter->value.size;
}
SPA_API_POD_ITER struct spa_pod_prop *spa_pod_prop_next(const struct spa_pod_prop *iter)
{
return SPA_PTROFF(iter, SPA_ROUND_UP_N(SPA_POD_PROP_SIZE(iter), SPA_POD_ALIGN), struct spa_pod_prop);
}
SPA_API_POD_ITER struct spa_pod_control *spa_pod_control_first(const struct spa_pod_sequence_body *body)
{
return SPA_PTROFF(body, sizeof(struct spa_pod_sequence_body), struct spa_pod_control);
}
SPA_API_POD_ITER bool spa_pod_control_is_inside(const struct spa_pod_sequence_body *body,
uint32_t size, const struct spa_pod_control *iter)
{
size_t remaining;
return spa_ptr_type_inside(body, size, iter, struct spa_pod_control, &remaining) &&
remaining >= iter->value.size;
}
SPA_API_POD_ITER struct spa_pod_control *spa_pod_control_next(const struct spa_pod_control *iter)
{
return SPA_PTROFF(iter, SPA_ROUND_UP_N(SPA_POD_CONTROL_SIZE(iter), SPA_POD_ALIGN), struct spa_pod_control);
}
#define SPA_POD_ARRAY_BODY_FOREACH(body, _size, iter) \
for ((iter) = (__typeof__(iter))SPA_PTROFF((body), sizeof(struct spa_pod_array_body), void); \
(body)->child.size > 0 && spa_ptrinside(body, _size, iter, (body)->child.size, NULL); \
(iter) = (__typeof__(iter))SPA_PTROFF((iter), (body)->child.size, void))
#define SPA_POD_ARRAY_FOREACH(obj, iter) \
SPA_POD_ARRAY_BODY_FOREACH(&(obj)->body, SPA_POD_BODY_SIZE(obj), iter)
#define SPA_POD_CHOICE_BODY_FOREACH(body, _size, iter) \
for ((iter) = (__typeof__(iter))SPA_PTROFF((body), sizeof(struct spa_pod_choice_body), void); \
(body)->child.size > 0 && spa_ptrinside(body, _size, iter, (body)->child.size, NULL); \
(iter) = (__typeof__(iter))SPA_PTROFF((iter), (body)->child.size, void))
#define SPA_POD_CHOICE_FOREACH(obj, iter) \
SPA_POD_CHOICE_BODY_FOREACH(&(obj)->body, SPA_POD_BODY_SIZE(obj), iter)
#define SPA_POD_FOREACH(pod, size, iter) \
for ((iter) = (pod); \
spa_pod_is_inside(pod, size, iter); \
(iter) = (__typeof__(iter))spa_pod_next(iter))
#define SPA_POD_STRUCT_FOREACH(obj, iter) \
SPA_POD_FOREACH(SPA_POD_STRUCT_BODY(obj), SPA_POD_BODY_SIZE(obj), iter)
#define SPA_POD_OBJECT_BODY_FOREACH(body, size, iter) \
for ((iter) = spa_pod_prop_first(body); \
spa_pod_prop_is_inside(body, size, iter); \
(iter) = spa_pod_prop_next(iter))
#define SPA_POD_OBJECT_FOREACH(obj, iter) \
SPA_POD_OBJECT_BODY_FOREACH(&(obj)->body, SPA_POD_BODY_SIZE(obj), iter)
#define SPA_POD_SEQUENCE_BODY_FOREACH(body, size, iter) \
for ((iter) = spa_pod_control_first(body); \
spa_pod_control_is_inside(body, size, iter); \
(iter) = spa_pod_control_next(iter))
#define SPA_POD_SEQUENCE_FOREACH(seq, iter) \
SPA_POD_SEQUENCE_BODY_FOREACH(&(seq)->body, SPA_POD_BODY_SIZE(seq), iter)
SPA_API_POD_ITER void *spa_pod_from_data(void *data, size_t maxsize, off_t offset, size_t size)
{
struct spa_pod pod;
const void *body;
if (spa_pod_body_from_data(data, maxsize, offset, size, &pod, &body) < 0)
return NULL;
return SPA_PTROFF(data, offset, void);
}
SPA_API_POD_ITER int spa_pod_get_bool(const struct spa_pod *pod, bool *value)
{
return spa_pod_body_get_bool(pod, SPA_POD_BODY_CONST(pod), value);
}
SPA_API_POD_ITER int spa_pod_get_id(const struct spa_pod *pod, uint32_t *value)
{
return spa_pod_body_get_id(pod, SPA_POD_BODY_CONST(pod), value);
}
SPA_API_POD_ITER int spa_pod_get_int(const struct spa_pod *pod, int32_t *value)
{
return spa_pod_body_get_int(pod, SPA_POD_BODY_CONST(pod), value);
}
SPA_API_POD_ITER int spa_pod_get_long(const struct spa_pod *pod, int64_t *value)
{
return spa_pod_body_get_long(pod, SPA_POD_BODY_CONST(pod), value);
}
SPA_API_POD_ITER int spa_pod_get_float(const struct spa_pod *pod, float *value)
{
return spa_pod_body_get_float(pod, SPA_POD_BODY_CONST(pod), value);
}
SPA_API_POD_ITER int spa_pod_get_double(const struct spa_pod *pod, double *value)
{
return spa_pod_body_get_double(pod, SPA_POD_BODY_CONST(pod), value);
}
SPA_API_POD_ITER int spa_pod_get_string(const struct spa_pod *pod, const char **value)
{
return spa_pod_body_get_string(pod, SPA_POD_BODY_CONST(pod), value);
}
SPA_API_POD_ITER int spa_pod_copy_string(const struct spa_pod *pod, size_t maxlen, char *dest)
{
return spa_pod_body_copy_string(pod, SPA_POD_BODY_CONST(pod), dest, maxlen);
}
SPA_API_POD_ITER int spa_pod_get_bytes(const struct spa_pod *pod, const void **value, uint32_t *len)
{
return spa_pod_body_get_bytes(pod, SPA_POD_BODY_CONST(pod), value, len);
}
SPA_API_POD_ITER int spa_pod_get_pointer(const struct spa_pod *pod, uint32_t *type, const void **value)
{
return spa_pod_body_get_pointer(pod, SPA_POD_BODY_CONST(pod), type, value);
}
SPA_API_POD_ITER int spa_pod_get_fd(const struct spa_pod *pod, int64_t *value)
{
return spa_pod_body_get_fd(pod, SPA_POD_BODY_CONST(pod), value);
}
SPA_API_POD_ITER int spa_pod_get_rectangle(const struct spa_pod *pod, struct spa_rectangle *value)
{
return spa_pod_body_get_rectangle(pod, SPA_POD_BODY_CONST(pod), value);
}
SPA_API_POD_ITER int spa_pod_get_fraction(const struct spa_pod *pod, struct spa_fraction *value)
{
return spa_pod_body_get_fraction(pod, SPA_POD_BODY_CONST(pod), value);
}
SPA_API_POD_ITER void *spa_pod_get_array_full(const struct spa_pod *pod, uint32_t *n_values,
uint32_t *val_size, uint32_t *val_type)
{
return (void*)spa_pod_body_get_array_values(pod, SPA_POD_BODY(pod), n_values, val_size, val_type);
}
SPA_API_POD_ITER void *spa_pod_get_array(const struct spa_pod *pod, uint32_t *n_values)
{
uint32_t size, type;
return spa_pod_get_array_full(pod, n_values, &size, &type);
}
SPA_API_POD_ITER uint32_t spa_pod_copy_array_full(const struct spa_pod *pod, uint32_t type,
uint32_t size, void *values, uint32_t max_values)
{
uint32_t n_values, val_size, val_type;
const void *v = spa_pod_get_array_full(pod, &n_values, &val_size, &val_type);
if (v == NULL || max_values == 0 || val_type != type || val_size != size)
return 0;
n_values = SPA_MIN(n_values, max_values);
memcpy(values, v, val_size * n_values);
return n_values;
}
#define spa_pod_copy_array(pod,type,values,max_values) \
spa_pod_copy_array_full(pod,type,sizeof(values[0]),values,max_values)
SPA_API_POD_ITER struct spa_pod *spa_pod_get_values(const struct spa_pod *pod,
uint32_t *n_vals, uint32_t *choice)
{
if (spa_pod_is_choice(pod)) {
const struct spa_pod_choice *p = (const struct spa_pod_choice*)pod;
uint32_t type, size;
spa_pod_choice_body_get_values(p, SPA_POD_BODY_CONST(p), n_vals, choice, &size, &type);
return (struct spa_pod*)&p->body.child;
} else {
*n_vals = pod->size < spa_pod_type_size(pod->type) ? 0 : 1;
*choice = SPA_CHOICE_None;
return (struct spa_pod*)pod;
}
}
SPA_API_POD_ITER bool spa_pod_is_object_type(const struct spa_pod *pod, uint32_t type)
{
return (pod && spa_pod_is_object(pod) && SPA_POD_OBJECT_TYPE(pod) == type);
}
SPA_API_POD_ITER bool spa_pod_is_object_id(const struct spa_pod *pod, uint32_t id)
{
return (pod && spa_pod_is_object(pod) && SPA_POD_OBJECT_ID(pod) == id);
}
SPA_API_POD_ITER const struct spa_pod_prop *spa_pod_object_find_prop(const struct spa_pod_object *pod,
const struct spa_pod_prop *start, uint32_t key)
{
const struct spa_pod_prop *first, *res;
first = spa_pod_prop_first(&pod->body);
start = start ? spa_pod_prop_next(start) : first;
for (res = start; spa_pod_prop_is_inside(&pod->body, pod->pod.size, res);
res = spa_pod_prop_next(res)) {
if (res->key == key)
return res;
}
for (res = first; res != start; res = spa_pod_prop_next(res)) {
if (res->key == key)
return res;
}
return NULL;
}
SPA_API_POD_ITER const struct spa_pod_prop *spa_pod_find_prop(const struct spa_pod *pod,
const struct spa_pod_prop *start, uint32_t key)
{
if (!spa_pod_is_object(pod))
return NULL;
return spa_pod_object_find_prop((const struct spa_pod_object *)pod, start, key);
}
SPA_API_POD_ITER int spa_pod_object_has_props(const struct spa_pod_object *pod)
{
struct spa_pod_prop *res;
SPA_POD_OBJECT_FOREACH(pod, res)
return 1;
return 0;
}
SPA_API_POD_ITER int spa_pod_object_fixate(struct spa_pod_object *pod)
{
struct spa_pod_prop *res;
SPA_POD_OBJECT_FOREACH(pod, res) {
if (spa_pod_is_choice(&res->value) &&
!SPA_FLAG_IS_SET(res->flags, SPA_POD_PROP_FLAG_DONT_FIXATE))
((struct spa_pod_choice*)&res->value)->body.type = SPA_CHOICE_None;
}
return 0;
}
SPA_API_POD_ITER int spa_pod_object_is_fixated(const struct spa_pod_object *pod)
{
struct spa_pod_prop *res;
SPA_POD_OBJECT_FOREACH(pod, res) {
if (spa_pod_is_choice(&res->value) &&
((struct spa_pod_choice*)&res->value)->body.type != SPA_CHOICE_None)
return 0;
}
return 1;
}
SPA_API_POD_ITER int spa_pod_fixate(struct spa_pod *pod)
{
if (!spa_pod_is_object(pod))
return -EINVAL;
return spa_pod_object_fixate((struct spa_pod_object *)pod);
}
SPA_API_POD_ITER int spa_pod_is_fixated(const struct spa_pod *pod)
{
if (!spa_pod_is_object(pod))
return -EINVAL;
return spa_pod_object_is_fixated((const struct spa_pod_object *)pod);
}
/**
* \}
*/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* SPA_POD_ITER_H */
body.h
spa/pod/body.h
res
uint32_t int int res
Definition core.h:433
spa_pod_control_is_inside
SPA_API_POD_ITER bool spa_pod_control_is_inside(const struct spa_pod_sequence_body *body, uint32_t size, const struct spa_pod_control *iter)
Definition iter.h:75
spa_pod_get_int
SPA_API_POD_ITER int spa_pod_get_int(const struct spa_pod *pod, int32_t *value)
Definition iter.h:148
spa_pod_prop_first
SPA_API_POD_ITER struct spa_pod_prop * spa_pod_prop_first(const struct spa_pod_object_body *body)
Definition iter.h:51
spa_pod_from_data
SPA_API_POD_ITER void * spa_pod_from_data(void *data, size_t maxsize, off_t offset, size_t size)
Definition iter.h:129
spa_pod_body_get_pointer
SPA_API_POD_BODY int spa_pod_body_get_pointer(const struct spa_pod *pod, const void *body, uint32_t *type, const void **value)
Definition body.h:282
SPA_POD_BODY_CONST
#define SPA_POD_BODY_CONST(pod)
Definition pod.h:46
spa_pod_find_prop
SPA_API_POD_ITER const struct spa_pod_prop * spa_pod_find_prop(const struct spa_pod *pod, const struct spa_pod_prop *start, uint32_t key)
Definition iter.h:274
spa_pod_body_get_array_values
SPA_API_POD_BODY const void * spa_pod_body_get_array_values(const struct spa_pod *pod, const void *body, uint32_t *n_values, uint32_t *val_size, uint32_t *val_type)
Definition body.h:380
spa_pod_get_values
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:229
spa_pod_prop_is_inside
SPA_API_POD_ITER bool spa_pod_prop_is_inside(const struct spa_pod_object_body *body, uint32_t size, const struct spa_pod_prop *iter)
Definition iter.h:56
spa_pod_control_next
SPA_API_POD_ITER struct spa_pod_control * spa_pod_control_next(const struct spa_pod_control *iter)
Definition iter.h:84
spa_pod_body_get_string
SPA_API_POD_BODY int spa_pod_body_get_string(const struct spa_pod *pod, const void *body, const char **value)
Definition body.h:236
spa_pod_get_pointer
SPA_API_POD_ITER int spa_pod_get_pointer(const struct spa_pod *pod, uint32_t *type, const void **value)
Definition iter.h:183
spa_pod_get_id
SPA_API_POD_ITER int spa_pod_get_id(const struct spa_pod *pod, uint32_t *value)
Definition iter.h:143
spa_pod_get_bytes
SPA_API_POD_ITER int spa_pod_get_bytes(const struct spa_pod *pod, const void **value, uint32_t *len)
Definition iter.h:178
spa_pod_body_get_fraction
SPA_API_POD_BODY int spa_pod_body_get_fraction(const struct spa_pod *pod, const void *body, struct spa_fraction *value)
Definition body.h:330
spa_pod_object_find_prop
SPA_API_POD_ITER const struct spa_pod_prop * spa_pod_object_find_prop(const struct spa_pod_object *pod, const struct spa_pod_prop *start, uint32_t key)
Definition iter.h:254
spa_pod_object_fixate
SPA_API_POD_ITER int spa_pod_object_fixate(struct spa_pod_object *pod)
Definition iter.h:290
SPA_POD_OBJECT_FOREACH
#define SPA_POD_OBJECT_FOREACH(obj, iter)
Definition iter.h:118
SPA_POD_BODY
#define SPA_POD_BODY(pod)
Definition pod.h:44
spa_pod_is_object
SPA_API_POD_BODY int spa_pod_is_object(const struct spa_pod *pod)
Definition body.h:428
spa_pod_next
SPA_API_POD_ITER void * spa_pod_next(const void *iter)
Definition iter.h:46
spa_pod_get_fd
SPA_API_POD_ITER int spa_pod_get_fd(const struct spa_pod *pod, int64_t *value)
Definition iter.h:188
SPA_POD_BODY_SIZE
#define SPA_POD_BODY_SIZE(pod)
Definition pod.h:31
spa_pod_get_array_full
SPA_API_POD_ITER void * spa_pod_get_array_full(const struct spa_pod *pod, uint32_t *n_values, uint32_t *val_size, uint32_t *val_type)
Definition iter.h:203
spa_pod_get_long
SPA_API_POD_ITER int spa_pod_get_long(const struct spa_pod *pod, int64_t *value)
Definition iter.h:153
spa_pod_get_float
SPA_API_POD_ITER int spa_pod_get_float(const struct spa_pod *pod, float *value)
Definition iter.h:158
spa_pod_control_first
SPA_API_POD_ITER struct spa_pod_control * spa_pod_control_first(const struct spa_pod_sequence_body *body)
Definition iter.h:70
spa_pod_type_size
SPA_API_POD_BODY uint32_t spa_pod_type_size(uint32_t type)
Definition body.h:45
spa_pod_get_bool
SPA_API_POD_ITER int spa_pod_get_bool(const struct spa_pod *pod, bool *value)
Definition iter.h:138
SPA_POD_PROP_FLAG_DONT_FIXATE
#define SPA_POD_PROP_FLAG_DONT_FIXATE
choices need no fixation
Definition pod.h:244
spa_pod_body_get_double
SPA_API_POD_BODY int spa_pod_body_get_double(const struct spa_pod *pod, const void *body, double *value)
Definition body.h:221
spa_pod_is_fixated
SPA_API_POD_ITER int spa_pod_is_fixated(const struct spa_pod *pod)
Definition iter.h:318
spa_pod_get_rectangle
SPA_API_POD_ITER int spa_pod_get_rectangle(const struct spa_pod *pod, struct spa_rectangle *value)
Definition iter.h:193
spa_pod_get_double
SPA_API_POD_ITER int spa_pod_get_double(const struct spa_pod *pod, double *value)
Definition iter.h:163
SPA_POD_CONTROL_SIZE
#define SPA_POD_CONTROL_SIZE(ev)
Definition pod.h:254
spa_pod_body_copy_string
SPA_API_POD_BODY int spa_pod_body_copy_string(const struct spa_pod *pod, const void *body, char *dest, size_t maxlen)
Definition body.h:249
spa_pod_fixate
SPA_API_POD_ITER int spa_pod_fixate(struct spa_pod *pod)
Definition iter.h:311
spa_pod_prop_next
SPA_API_POD_ITER struct spa_pod_prop * spa_pod_prop_next(const struct spa_pod_prop *iter)
Definition iter.h:65
SPA_POD_PROP_SIZE
#define SPA_POD_PROP_SIZE(prop)
Definition pod.h:224
spa_pod_copy_string
SPA_API_POD_ITER int spa_pod_copy_string(const struct spa_pod *pod, size_t maxlen, char *dest)
Definition iter.h:173
spa_pod_body_get_long
SPA_API_POD_BODY int spa_pod_body_get_long(const struct spa_pod *pod, const void *body, int64_t *value)
Definition body.h:190
spa_pod_choice_body_get_values
SPA_API_POD_BODY const void * spa_pod_choice_body_get_values(const struct spa_pod_choice *pod, const void *body, uint32_t *n_values, uint32_t *choice, uint32_t *val_size, uint32_t *val_type)
Definition body.h:406
spa_pod_body_get_int
SPA_API_POD_BODY int spa_pod_body_get_int(const struct spa_pod *pod, const void *body, int32_t *value)
Definition body.h:177
spa_pod_is_object_id
SPA_API_POD_ITER bool spa_pod_is_object_id(const struct spa_pod *pod, uint32_t id)
Definition iter.h:249
spa_pod_is_inside
SPA_API_POD_ITER bool spa_pod_is_inside(const void *pod, uint32_t size, const void *iter)
Definition iter.h:38
spa_pod_body_get_float
SPA_API_POD_BODY int spa_pod_body_get_float(const struct spa_pod *pod, const void *body, float *value)
Definition body.h:206
SPA_POD_OBJECT_TYPE
#define SPA_POD_OBJECT_TYPE(obj)
Definition pod.h:192
SPA_POD_OBJECT_ID
#define SPA_POD_OBJECT_ID(obj)
Definition pod.h:194
spa_pod_body_get_rectangle
SPA_API_POD_BODY int spa_pod_body_get_rectangle(const struct spa_pod *pod, const void *body, struct spa_rectangle *value)
Definition body.h:316
spa_pod_body_get_bool
SPA_API_POD_BODY int spa_pod_body_get_bool(const struct spa_pod *pod, const void *body, bool *value)
Definition body.h:151
spa_pod_copy_array_full
SPA_API_POD_ITER uint32_t spa_pod_copy_array_full(const struct spa_pod *pod, uint32_t type, uint32_t size, void *values, uint32_t max_values)
Definition iter.h:214
spa_pod_is_object_type
SPA_API_POD_ITER bool spa_pod_is_object_type(const struct spa_pod *pod, uint32_t type)
Definition iter.h:244
spa_pod_object_is_fixated
SPA_API_POD_ITER int spa_pod_object_is_fixated(const struct spa_pod_object *pod)
Definition iter.h:300
spa_pod_get_string
SPA_API_POD_ITER int spa_pod_get_string(const struct spa_pod *pod, const char **value)
Definition iter.h:168
spa_pod_body_from_data
SPA_API_POD_BODY int spa_pod_body_from_data(void *data, size_t maxsize, off_t offset, size_t size, struct spa_pod *pod, const void **body)
Definition body.h:118
SPA_POD_SIZE
#define SPA_POD_SIZE(pod)
Definition pod.h:35
SPA_POD_ALIGN
#define SPA_POD_ALIGN
Definition pod.h:26
spa_pod_body_get_fd
SPA_API_POD_BODY int spa_pod_body_get_fd(const struct spa_pod *pod, const void *body, int64_t *value)
Definition body.h:300
spa_pod_get_array
SPA_API_POD_ITER void * spa_pod_get_array(const struct spa_pod *pod, uint32_t *n_values)
Definition iter.h:208
spa_pod_get_fraction
SPA_API_POD_ITER int spa_pod_get_fraction(const struct spa_pod *pod, struct spa_fraction *value)
Definition iter.h:198
spa_pod_is_choice
SPA_API_POD_BODY int spa_pod_is_choice(const struct spa_pod *pod)
Definition body.h:389
spa_pod_body_get_id
SPA_API_POD_BODY int spa_pod_body_get_id(const struct spa_pod *pod, const void *body, uint32_t *value)
Definition body.h:164
spa_pod_object_has_props
SPA_API_POD_ITER int spa_pod_object_has_props(const struct spa_pod_object *pod)
Definition iter.h:282
spa_pod_body_get_bytes
SPA_API_POD_BODY int spa_pod_body_get_bytes(const struct spa_pod *pod, const void *body, const void **value, uint32_t *len)
Definition body.h:267
SPA_CHOICE_None
@ SPA_CHOICE_None
no choice, first value is current
Definition pod.h:161
SPA_MIN
#define SPA_MIN(a, b)
Definition defs.h:165
SPA_ROUND_UP_N
#define SPA_ROUND_UP_N(num, align)
Definition defs.h:364
SPA_FLAG_IS_SET
#define SPA_FLAG_IS_SET(field, flag)
Definition defs.h:90
spa_ptr_type_inside
#define spa_ptr_type_inside(p1, s1, p2, type, remaining)
Definition defs.h:430
SPA_PTROFF
#define SPA_PTROFF(ptr_, offset_, type_)
Return the address (buffer + offset) as pointer of type.
Definition defs.h:222
SPA_API_POD_ITER
#define SPA_API_POD_ITER
Definition iter.h:29
pod.h
spa/pod/pod.h
spa_fraction
Definition defs.h:137
spa_pod_choice_body::child
struct spa_pod child
Definition pod.h:171
spa_pod_choice_body::type
uint32_t type
type of choice, one of enum spa_choice_type
Definition pod.h:169
spa_pod_choice
Definition pod.h:176
spa_pod_choice::body
struct spa_pod_choice_body body
Definition pod.h:178
spa_pod_choice::pod
struct spa_pod pod
Definition pod.h:177
spa_pod_control
Definition pod.h:257
spa_pod_control::value
struct spa_pod value
control value, depends on type
Definition pod.h:260
spa_pod_control::offset
uint32_t offset
media offset
Definition pod.h:258
spa_pod_object_body
Definition pod.h:196
spa_pod_object
Definition pod.h:202
spa_pod_object::pod
struct spa_pod pod
Definition pod.h:203
spa_pod_object::body
struct spa_pod_object_body body
Definition pod.h:204
spa_pod_prop
Definition pod.h:227
spa_pod_prop::key
uint32_t key
key of property, list of valid keys depends on the object type
Definition pod.h:228
spa_pod_prop::value
struct spa_pod value
Definition pod.h:249
spa_pod_sequence_body
Definition pod.h:264
spa_pod
Definition pod.h:57
spa_pod::type
uint32_t type
Definition pod.h:59
spa_pod::size
uint32_t size
Definition pod.h:58
spa_rectangle
Definition defs.h:116