mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-15 07:00:05 -05:00
Make AllocParams into POD objects
Make allocparams into pod objects. This makes it easy to serialize, copy, create and intersect them. Add convenience macros for properties Add helper function to collect object properties.
This commit is contained in:
parent
b1f7df52e3
commit
8a6ce3b179
34 changed files with 948 additions and 1054 deletions
|
|
@ -43,26 +43,11 @@ spa_pod_builder_push_format (SpaPODBuilder *builder,
|
|||
spa_pod_builder_raw (builder, &p, sizeof(p)));
|
||||
}
|
||||
|
||||
static inline uint32_t
|
||||
spa_pod_builder_format (SpaPODBuilder *builder,
|
||||
uint32_t media_type,
|
||||
uint32_t media_subtype,
|
||||
uint32_t type, ...)
|
||||
{
|
||||
SpaPODFrame f;
|
||||
va_list args;
|
||||
uint32_t off;
|
||||
|
||||
off = spa_pod_builder_push_format (builder, &f, media_type, media_subtype);
|
||||
|
||||
va_start (args, type);
|
||||
spa_pod_builder_addv (builder, type, args);
|
||||
va_end (args);
|
||||
|
||||
spa_pod_builder_pop (builder, &f);
|
||||
|
||||
return off;
|
||||
}
|
||||
#define spa_pod_builder_format(b,f,media_type,media_subtype,...) \
|
||||
spa_pod_builder_object(b, f, 0, 0, \
|
||||
SPA_POD_TYPE_INT,media_type, \
|
||||
SPA_POD_TYPE_INT,media_subtype, \
|
||||
__VA_ARGS__)
|
||||
|
||||
SpaResult
|
||||
spa_format_filter (const SpaFormat *format,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue