mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-31 11:09:04 -05:00
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:
parent
241a6165d2
commit
f7d32e78f2
5 changed files with 5 additions and 10 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue