25 #ifndef SPA_POD_FILTER_H
26 #define SPA_POD_FILTER_H
67 memcpy(val, alt, size);
72 memcpy(val, alt, size);
80 for (i = 1; i < nvals; i++) {
90 memcpy(val, best, size);
101 uint32_t type,
const void *r1,
const void *r2, uint32_t size)
106 int32_t val = (*(int32_t *) r1) & (*(int32_t *) r2);
114 int64_t val = (*(int64_t *) r1) & (*(int64_t *) r2);
134 uint32_t j, k, nalt1, nalt2;
135 void *alt1, *alt2, *a1, *a2;
136 uint32_t type, size, p1c, p2c;
179 for (j = 0, a1 = alt1; j < nalt1; j++, a1 =
SPA_PTROFF(a1, size,
void)) {
180 for (k = 0, a2 = alt2; k < nalt2; k++, a2 =
SPA_PTROFF(a2,size,
void)) {
197 for (j = 0, a1 = alt1, a2 = alt2; j < nalt1; j++, a1 =
SPA_PTROFF(a1,size,
void)) {
219 for (k = 0, a1 = alt1, a2 = alt2; k < nalt2; k++, a2 =
SPA_PTROFF(a2,size,
void)) {
288 const struct spa_pod *filter, uint32_t filter_size)
296 bool do_copy =
false, do_advance =
false;
297 uint32_t filter_offset = 0;
static int spa_pod_builder_prop(struct spa_pod_builder *builder, uint32_t key, uint32_t flags)
Definition: builder.h:468
#define SPA_POD_CHOICE_VALUE_TYPE(choice)
Definition: pod.h:158
static int spa_pod_filter_flags_value(struct spa_pod_builder *b, uint32_t type, const void *r1, const void *r2, uint32_t size)
Definition: filter.h:105
static struct spa_pod * spa_pod_get_values(const struct spa_pod *pod, uint32_t *n_vals, uint32_t *choice)
Definition: iter.h:367
static 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:408
static void * spa_pod_builder_pop(struct spa_pod_builder *builder, struct spa_pod_frame *frame)
Definition: builder.h:186
static int spa_pod_compare_value(uint32_t type, const void *r1, const void *r2, uint32_t size)
Definition: compare.h:53
#define SPA_POD_PROP_FLAG_MANDATORY
is mandatory
Definition: pod.h:242
#define SPA_POD_CHOICE_VALUE_SIZE(choice)
Definition: pod.h:160
#define SPA_POD_OBJECT_FOREACH(obj, iter)
Definition: iter.h:128
#define SPA_POD_BODY(pod)
Definition: pod.h:59
static void spa_pod_builder_reset(struct spa_pod_builder *builder, struct spa_pod_builder_state *state)
Definition: builder.h:98
#define SPA_POD_TYPE(pod)
Definition: pod.h:48
static int spa_pod_filter_part(struct spa_pod_builder *b, const struct spa_pod *pod, uint32_t pod_size, const struct spa_pod *filter, uint32_t filter_size)
Definition: filter.h:291
static int spa_pod_choice_fix_default(struct spa_pod_choice *choice)
Definition: filter.h:53
static int spa_pod_builder_raw_padded(struct spa_pod_builder *builder, const void *data, uint32_t size)
Definition: builder.h:178
static int spa_pod_filter_prop(struct spa_pod_builder *b, const struct spa_pod_prop *p1, const struct spa_pod_prop *p2)
Definition: filter.h:133
static int spa_pod_builder_primitive(struct spa_pod_builder *builder, const struct spa_pod *p)
Definition: builder.h:204
static bool spa_pod_is_inside(const void *pod, uint32_t size, const void *iter)
Definition: iter.h:54
static int spa_pod_builder_push_struct(struct spa_pod_builder *builder, struct spa_pod_frame *frame)
Definition: builder.h:440
static void spa_pod_builder_get_state(struct spa_pod_builder *builder, struct spa_pod_builder_state *state)
Definition: builder.h:85
#define SPA_POD_FOREACH(pod, size, iter)
Definition: iter.h:115
static void * spa_pod_next(const void *iter)
Definition: iter.h:60
#define SPA_POD_CHOICE_VALUES(choice)
Definition: pod.h:164
#define SPA_POD_PROP_SIZE(prop)
Definition: pod.h:225
static struct spa_pod * spa_pod_builder_frame(struct spa_pod_builder *builder, struct spa_pod_frame *frame)
Definition: builder.h:125
static int spa_pod_builder_raw(struct spa_pod_builder *builder, const void *data, uint32_t size)
Definition: builder.h:148
static int spa_pod_builder_push_choice(struct spa_pod_builder *builder, struct spa_pod_frame *frame, uint32_t type, uint32_t flags)
Definition: builder.h:424
static int spa_pod_builder_int(struct spa_pod_builder *builder, int32_t val)
Definition: builder.h:265
static int spa_pod_builder_push_object(struct spa_pod_builder *builder, struct spa_pod_frame *frame, uint32_t type, uint32_t id)
Definition: builder.h:453
static int spa_pod_builder_long(struct spa_pod_builder *builder, int64_t val)
Definition: builder.h:274
#define SPA_POD_CHOICE_N_VALUES(choice)
Definition: pod.h:162
#define SPA_POD_SIZE(pod)
Definition: pod.h:50
static int spa_pod_filter(struct spa_pod_builder *b, struct spa_pod **result, const struct spa_pod *pod, const struct spa_pod *filter)
Definition: filter.h:392
static struct spa_pod * spa_pod_builder_deref(struct spa_pod_builder *builder, uint32_t offset)
Definition: builder.h:113
@ SPA_CHOICE_Step
range with step: default, min, max, step
Definition: pod.h:169
@ SPA_CHOICE_None
no choice, first value is current
Definition: pod.h:167
@ SPA_CHOICE_Flags
flags: default, possible flags,...
Definition: pod.h:171
@ SPA_CHOICE_Range
range: default, min, max
Definition: pod.h:168
@ SPA_CHOICE_Enum
list: default, alternative,...
Definition: pod.h:170
@ SPA_TYPE_Int
Definition: type.h:54
@ SPA_TYPE_Long
Definition: type.h:55
@ SPA_TYPE_Object
Definition: type.h:65
@ SPA_TYPE_Struct
Definition: type.h:64
#define spa_return_val_if_fail(expr, val)
Definition: defs.h:333
#define SPA_PTROFF(ptr_, offset_, type_)
Return the address (buffer + offset) as pointer of type.
Definition: defs.h:183
uint32_t type
type of choice, one of enum spa_choice_type
Definition: pod.h:175
struct spa_pod_choice_body body
Definition: pod.h:184
struct spa_pod pod
Definition: pod.h:183
uint32_t type
one of enum spa_type
Definition: pod.h:198
uint32_t id
id of the object, depends on the object type
Definition: pod.h:199
struct spa_pod_object_body body
Definition: pod.h:205
uint32_t key
key of property, list of valid keys depends on the object type
Definition: pod.h:229
uint32_t flags
flags for property
Definition: pod.h:245
struct spa_pod value
Definition: pod.h:246
uint32_t type
Definition: pod.h:65
uint32_t size
Definition: pod.h:64