5#ifndef SPA_POD_COMPARE_H
6#define SPA_POD_COMPARE_H
35 return *(uint32_t *) r1 == *(uint32_t *) r2 ? 0 : 1;
37 return *(int32_t *) r1 - *(int32_t *) r2;
39 return *(int64_t *) r1 - *(int64_t *) r2;
41 return *(
float *) r1 - *(
float *) r2;
43 return *(
double *) r1 - *(
double *) r2;
45 return strcmp((
char *)r1, (
char *)r2);
47 return memcmp((
char *)r1, (
char *)r2, size);
52 if (rec1->
width == rec2->width && rec1->
height == rec2->height)
54 else if (rec1->
width < rec2->width || rec1->
height < rec2->height)
64 n1 = ((int64_t) f1->
num) * f2->
denom;
65 n2 = ((int64_t) f2->num) * f1->
denom;
83 uint32_t n_vals1, n_vals2;
84 uint32_t choice1, choice2;
92 if (n_vals1 != n_vals2)
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:388
#define SPA_POD_BODY_CONST(pod)
Definition: pod/pod.h:41
static int spa_pod_compare_value(uint32_t type, const void *r1, const void *r2, uint32_t size)
Definition: compare.h:33
static void * spa_pod_next(const void *iter)
Definition: iter.h:40
#define SPA_POD_OBJECT_FOREACH(obj, iter)
Definition: iter.h:108
#define SPA_POD_BODY(pod)
Definition: pod/pod.h:39
#define SPA_POD_TYPE(pod)
Definition: pod/pod.h:28
#define SPA_POD_BODY_SIZE(pod)
Definition: pod/pod.h:26
static bool spa_pod_is_inside(const void *pod, uint32_t size, const void *iter)
Definition: iter.h:34
static int spa_pod_compare(const struct spa_pod *pod1, const struct spa_pod *pod2)
Definition: compare.h:84
static struct spa_pod * spa_pod_get_values(const struct spa_pod *pod, uint32_t *n_vals, uint32_t *choice)
Definition: iter.h:347
@ SPA_TYPE_Int
Definition: spa/include/spa/utils/type.h:34
@ SPA_TYPE_Rectangle
Definition: spa/include/spa/utils/type.h:40
@ SPA_TYPE_Long
Definition: spa/include/spa/utils/type.h:35
@ SPA_TYPE_Bool
Definition: spa/include/spa/utils/type.h:32
@ SPA_TYPE_Bytes
Definition: spa/include/spa/utils/type.h:39
@ SPA_TYPE_Object
Definition: spa/include/spa/utils/type.h:45
@ SPA_TYPE_Float
Definition: spa/include/spa/utils/type.h:36
@ SPA_TYPE_Fraction
Definition: spa/include/spa/utils/type.h:41
@ SPA_TYPE_None
Definition: spa/include/spa/utils/type.h:31
@ SPA_TYPE_Double
Definition: spa/include/spa/utils/type.h:37
@ SPA_TYPE_Id
Definition: spa/include/spa/utils/type.h:33
@ SPA_TYPE_Array
Definition: spa/include/spa/utils/type.h:43
@ SPA_TYPE_String
Definition: spa/include/spa/utils/type.h:38
@ SPA_TYPE_Struct
Definition: spa/include/spa/utils/type.h:44
#define spa_return_val_if_fail(expr, val)
Definition: defs.h:365
uint32_t num
Definition: defs.h:124
uint32_t denom
Definition: defs.h:125
Definition: pod/pod.h:183
Definition: pod/pod.h:208
uint32_t key
key of property, list of valid keys depends on the object type
Definition: pod/pod.h:209
struct spa_pod value
Definition: pod/pod.h:226
uint32_t width
Definition: defs.h:103
uint32_t height
Definition: defs.h:104