Improve enum_param

Add an argument to pass the result param to the caller instead of
having the caller have to pick it up from the builder.
Improve docs for node, clock and monitor
Pass spa_pod everywhere instead of spa_pod_object.
Pass result argument to spa_pod_filter to make things a little
nicer.
This commit is contained in:
Wim Taymans 2017-11-13 17:57:38 +01:00
parent cd5e697e9f
commit 440f681f4b
70 changed files with 872 additions and 858 deletions

View file

@ -177,12 +177,18 @@ struct spa_pod_object {
struct spa_pod_object_body body;
};
static inline bool spa_pod_is_object_type(struct spa_pod *pod, uint32_t type)
static inline bool spa_pod_is_object_type(const struct spa_pod *pod, uint32_t type)
{
return (pod->type == SPA_POD_TYPE_OBJECT
return (pod && pod->type == SPA_POD_TYPE_OBJECT
&& ((struct spa_pod_object *) pod)->body.type == type);
}
static inline bool spa_pod_is_object_id(const struct spa_pod *pod, uint32_t id)
{
return (pod && pod->type == SPA_POD_TYPE_OBJECT
&& ((struct spa_pod_object *) pod)->body.id == id);
}
struct spa_pod_pointer_body {
uint32_t type;
void *value;