pod: remove SPA_POD_IS_OBJECT_TYPE

We have a safer version of that in iter.h
Use macros to get id and type of an object
Use safer checks in plugins.
This commit is contained in:
Wim Taymans 2019-10-29 10:08:46 +01:00
parent 241a6165d2
commit f7d32e78f2
5 changed files with 5 additions and 10 deletions

View file

@ -379,14 +379,12 @@ static inline int spa_pod_is_object(const struct spa_pod *pod)
static inline bool spa_pod_is_object_type(const struct spa_pod *pod, uint32_t type)
{
return (pod && spa_pod_is_object(pod) &&
((const struct spa_pod_object *) pod)->body.type == type);
return (pod && spa_pod_is_object(pod) && SPA_POD_OBJECT_TYPE(pod) == type);
}
static inline bool spa_pod_is_object_id(const struct spa_pod *pod, uint32_t id)
{
return (pod && spa_pod_is_object(pod) &&
((const struct spa_pod_object *) pod)->body.id == id);
return (pod && spa_pod_is_object(pod) && SPA_POD_OBJECT_ID(pod) == id);
}
static inline int spa_pod_is_sequence(const struct spa_pod *pod)