mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
v4l2: implement enum_formats with filter
Use the filter to query the device and return a filtered result.
This commit is contained in:
parent
8ada6736c0
commit
64ad745437
6 changed files with 302 additions and 44 deletions
|
|
@ -76,6 +76,7 @@ typedef void (*SpaNotify) (void *data);
|
|||
#define SPA_PTR_TO_UINT32(p) ((uint32_t) ((uintptr_t) (p)))
|
||||
#define SPA_UINT32_TO_PTR(u) ((void*) ((uintptr_t) (u)))
|
||||
|
||||
#define SPA_IDX_INVALID ((unsigned int)-1)
|
||||
#define SPA_ID_INVALID ((uint32_t)0xffffffff)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ spa_props_index_for_id (const SpaProps *props, uint32_t id)
|
|||
if (props->prop_info[i].id == id)
|
||||
return i;
|
||||
}
|
||||
return -1;
|
||||
return SPA_IDX_INVALID;
|
||||
}
|
||||
|
||||
static inline unsigned int
|
||||
|
|
@ -196,7 +196,7 @@ spa_props_index_for_name (const SpaProps *props, const char *name)
|
|||
if (strcmp (props->prop_info[i].name, name) == 0)
|
||||
return i;
|
||||
}
|
||||
return -1;
|
||||
return SPA_IDX_INVALID;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue