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)
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
#define SPA_POD_BODY_CONST(pod)
Definition: pod.h:61
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_OBJECT_FOREACH(obj, iter)
Definition: iter.h:128
#define SPA_POD_BODY(pod)
Definition: pod.h:59
#define SPA_POD_TYPE(pod)
Definition: pod.h:48
#define SPA_POD_BODY_SIZE(pod)
Definition: pod.h:46
static bool spa_pod_is_inside(const void *pod, uint32_t size, const void *iter)
Definition: iter.h:54
static int spa_pod_compare(const struct spa_pod *pod1, const struct spa_pod *pod2)
Definition: compare.h:104
static void * spa_pod_next(const void *iter)
Definition: iter.h:60
@ SPA_TYPE_Int
Definition: type.h:54
@ SPA_TYPE_Rectangle
Definition: type.h:60
@ SPA_TYPE_Long
Definition: type.h:55
@ SPA_TYPE_Bool
Definition: type.h:52
@ SPA_TYPE_Bytes
Definition: type.h:59
@ SPA_TYPE_Object
Definition: type.h:65
@ SPA_TYPE_Float
Definition: type.h:56
@ SPA_TYPE_Fraction
Definition: type.h:61
@ SPA_TYPE_None
Definition: type.h:51
@ SPA_TYPE_Double
Definition: type.h:57
@ SPA_TYPE_Id
Definition: type.h:53
@ SPA_TYPE_Array
Definition: type.h:63
@ SPA_TYPE_String
Definition: type.h:58
@ SPA_TYPE_Struct
Definition: type.h:64
#define spa_return_val_if_fail(expr, val)
Definition: defs.h:333
uint32_t num
Definition: defs.h:122
uint32_t denom
Definition: defs.h:123
uint32_t key
key of property, list of valid keys depends on the object type
Definition: pod.h:229
struct spa_pod value
Definition: pod.h:246
uint32_t width
Definition: defs.h:101
uint32_t height
Definition: defs.h:102