Go to the documentation of this file.
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)) {
296 bool do_copy =
false, do_advance =
false;
297 uint32_t filter_offset = 0;
Definition: pod/pod.h:175
void spa_pod_builder_reset(struct spa_pod_builder *builder, struct spa_pod_builder_state *state)
Definition: builder.h:87
@ SPA_TYPE_Long
Definition: build-12683127/doc/spa/utils/type.h:49
Definition: pod/pod.h:156
#define spa_return_val_if_fail(expr, val)
Definition: defs.h:251
void * spa_pod_next(const void *iter)
Definition: iter.h:55
#define SPA_POD_CHOICE_VALUE_TYPE(choice)
Definition: pod/pod.h:135
uint32_t type
one of enum spa_type
Definition: pod/pod.h:170
@ SPA_CHOICE_Range
range: default, min, max
Definition: pod/pod.h:142
#define SPA_POD_OBJECT_FOREACH(obj, iter)
Definition: iter.h:123
#define SPA_POD_CHOICE_N_VALUES(choice)
Definition: pod/pod.h:137
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:399
int spa_pod_choice_fix_default(struct spa_pod_choice *choice)
Definition: build-12683127/doc/spa/pod/filter.h:48
int spa_pod_builder_raw_padded(struct spa_pod_builder *builder, const void *data, uint32_t size)
Definition: builder.h:167
@ SPA_TYPE_Int
Definition: build-12683127/doc/spa/utils/type.h:48
Definition: pod/pod.h:199
@ SPA_CHOICE_Enum
list: default, alternative,...
Definition: pod/pod.h:144
uint32_t id
id of the object, depends on the object type
Definition: pod/pod.h:171
int spa_pod_compare_value(uint32_t type, const void *r1, const void *r2, uint32_t size)
Definition: compare.h:48
int spa_pod_filter_prop(struct spa_pod_builder *b, const struct spa_pod_prop *p1, const struct spa_pod_prop *p2)
Definition: build-12683127/doc/spa/pod/filter.h:128
#define SPA_POD_TYPE(pod)
Definition: pod/pod.h:41
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:426
bool spa_pod_is_inside(const void *pod, uint32_t size, const void *iter)
Definition: iter.h:49
#define SPA_PTROFF(ptr_, offset_, type_)
Return the address (buffer + offset) as pointer of type.
Definition: defs.h:159
#define SPA_POD_CHOICE_VALUE_SIZE(choice)
Definition: pod/pod.h:136
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: build-12683127/doc/spa/pod/filter.h:286
int spa_pod_builder_primitive(struct spa_pod_builder *builder, const struct spa_pod *p)
Definition: builder.h:193
@ SPA_CHOICE_Flags
flags: default, possible flags,...
Definition: pod/pod.h:145
int spa_pod_filter(struct spa_pod_builder *b, struct spa_pod **result, const struct spa_pod *pod, const struct spa_pod *filter)
Definition: build-12683127/doc/spa/pod/filter.h:387
void * spa_pod_builder_pop(struct spa_pod_builder *builder, struct spa_pod_frame *frame)
Definition: builder.h:175
struct spa_pod_choice_body body
Definition: pod/pod.h:158
uint64_t size
This field is set by the user and the sum of all queued buffer is returned in the time info.
Definition: stream.h:178
struct spa_pod * spa_pod_builder_frame(struct spa_pod_builder *builder, struct spa_pod_frame *frame)
Definition: builder.h:114
int spa_pod_builder_raw(struct spa_pod_builder *builder, const void *data, uint32_t size)
Definition: builder.h:137
struct spa_pod_object_body body
Definition: pod/pod.h:177
struct spa_pod * spa_pod_get_values(const struct spa_pod *pod, uint32_t *n_vals, uint32_t *choice)
Definition: iter.h:362
#define SPA_POD_BODY(pod)
Definition: pod/pod.h:47
struct spa_pod * spa_pod_builder_deref(struct spa_pod_builder *builder, uint32_t offset)
Definition: builder.h:102
#define SPA_POD_PROP_FLAG_MANDATORY
is mandatory
Definition: pod/pod.h:209
uint32_t key
key of property, list of valid keys depends on the object type
Definition: pod/pod.h:200
uint32_t size
Definition: pod/pod.h:51
void spa_pod_builder_get_state(struct spa_pod_builder *builder, struct spa_pod_builder_state *state)
Definition: builder.h:74
@ SPA_TYPE_Object
Definition: build-12683127/doc/spa/utils/type.h:59
int spa_pod_builder_long(struct spa_pod_builder *builder, int64_t val)
Definition: builder.h:257
uint32_t type
type of choice, one of enum spa_choice_type
Definition: pod/pod.h:149
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:403
int spa_pod_builder_prop(struct spa_pod_builder *builder, uint32_t key, uint32_t flags)
Definition: builder.h:441
int spa_pod_builder_int(struct spa_pod_builder *builder, int32_t val)
Definition: builder.h:249
@ SPA_CHOICE_None
no choice, first value is current
Definition: pod/pod.h:141
struct spa_pod pod
Definition: pod/pod.h:157
uint32_t type
Definition: pod/pod.h:52
@ SPA_CHOICE_Step
range with step: default, min, max, step
Definition: pod/pod.h:143
uint32_t flags
flags for property
Definition: pod/pod.h:211
#define SPA_POD_CHOICE_VALUES(choice)
Definition: pod/pod.h:138
#define SPA_POD_SIZE(pod)
Definition: pod/pod.h:42
Definition: pod/pod.h:161
struct spa_pod value
Definition: pod/pod.h:212
#define SPA_POD_FOREACH(pod, size, iter)
Definition: iter.h:110
uint32_t offset
Definition: builder.h:47
int spa_pod_filter_flags_value(struct spa_pod_builder *b, uint32_t type, const void *r1, const void *r2, uint32_t size)
Definition: build-12683127/doc/spa/pod/filter.h:100
int spa_pod_builder_push_struct(struct spa_pod_builder *builder, struct spa_pod_frame *frame)
Definition: builder.h:414
#define SPA_POD_PROP_SIZE(prop)
Definition: pod/pod.h:196
@ SPA_TYPE_Struct
Definition: build-12683127/doc/spa/utils/type.h:58