Go to the documentation of this file.
25 #ifndef SPA_POD_COMPARE_H
26 #define SPA_POD_COMPARE_H
55 return *(uint32_t *) r1 == *(uint32_t *) r2 ? 0 : 1;
57 return *(int32_t *) r1 - *(int32_t *) r2;
59 return *(int64_t *) r1 - *(int64_t *) r2;
61 return *(
float *) r1 - *(
float *) r2;
63 return *(
double *) r1 - *(
double *) r2;
65 return strcmp((
char *)r1, (
char *)r2);
67 return memcmp((
char *)r1, (
char *)r2, size);
72 if (rec1->
width == rec2->width && rec1->
height == rec2->height)
74 else if (rec1->
width < rec2->width || rec1->
height < rec2->height)
84 n1 = ((int64_t) f1->
num) * f2->
denom;
85 n2 = ((int64_t) f2->num) * f1->
denom;
103 uint32_t n_vals1, n_vals2;
104 uint32_t choice1, choice2;
112 if (n_vals1 != n_vals2)
@ SPA_TYPE_None
Definition: build-12775836/doc/spa/utils/type.h:45
Definition: pod/pod.h:175
uint32_t width
Definition: defs.h:87
@ SPA_TYPE_Float
Definition: build-12775836/doc/spa/utils/type.h:50
@ SPA_TYPE_Long
Definition: build-12775836/doc/spa/utils/type.h:49
#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_OBJECT_FOREACH(obj, iter)
Definition: iter.h:123
@ SPA_TYPE_Id
Definition: build-12775836/doc/spa/utils/type.h:47
@ SPA_TYPE_Int
Definition: build-12775836/doc/spa/utils/type.h:48
Definition: pod/pod.h:199
int spa_pod_compare_value(uint32_t type, const void *r1, const void *r2, uint32_t size)
Definition: compare.h:48
uint32_t height
Definition: defs.h:88
@ SPA_TYPE_Array
Definition: build-12775836/doc/spa/utils/type.h:57
#define SPA_POD_BODY_CONST(pod)
Definition: pod/pod.h:48
#define SPA_POD_TYPE(pod)
Definition: pod/pod.h:41
@ SPA_TYPE_Rectangle
Definition: build-12775836/doc/spa/utils/type.h:54
bool spa_pod_is_inside(const void *pod, uint32_t size, const void *iter)
Definition: iter.h:49
@ SPA_TYPE_String
Definition: build-12775836/doc/spa/utils/type.h:52
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-12775836/doc/spa/utils/type.h:46
#define SPA_POD_BODY(pod)
Definition: pod/pod.h:47
int spa_pod_compare(const struct spa_pod *pod1, const struct spa_pod *pod2)
Definition: compare.h:99
uint32_t key
key of property, list of valid keys depends on the object type
Definition: pod/pod.h:200
@ SPA_TYPE_Bytes
Definition: build-12775836/doc/spa/utils/type.h:53
@ SPA_TYPE_Double
Definition: build-12775836/doc/spa/utils/type.h:51
#define SPA_POD_BODY_SIZE(pod)
Definition: pod/pod.h:40
@ SPA_TYPE_Object
Definition: build-12775836/doc/spa/utils/type.h:59
uint32_t denom
Definition: defs.h:106
@ SPA_TYPE_Fraction
Definition: build-12775836/doc/spa/utils/type.h:55
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
struct spa_pod value
Definition: pod/pod.h:212
uint32_t num
Definition: defs.h:105
@ SPA_TYPE_Struct
Definition: build-12775836/doc/spa/utils/type.h:58