mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
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:
parent
cd5e697e9f
commit
440f681f4b
70 changed files with 872 additions and 858 deletions
|
|
@ -109,7 +109,8 @@ static snd_pcm_format_t spa_alsa_format_to_alsa(struct type *map, uint32_t forma
|
|||
|
||||
int
|
||||
spa_alsa_enum_format(struct state *state, uint32_t *index,
|
||||
const struct spa_pod_object *filter,
|
||||
const struct spa_pod *filter,
|
||||
struct spa_pod **result,
|
||||
struct spa_pod_builder *builder)
|
||||
{
|
||||
snd_pcm_t *hndl;
|
||||
|
|
@ -120,7 +121,7 @@ spa_alsa_enum_format(struct state *state, uint32_t *index,
|
|||
uint8_t buffer[4096];
|
||||
struct spa_pod_builder b = SPA_POD_BUILDER_INIT(buffer, sizeof(buffer));
|
||||
struct spa_pod_prop *prop;
|
||||
struct spa_pod_object *fmt;
|
||||
struct spa_pod *fmt;
|
||||
int res;
|
||||
bool opened;
|
||||
|
||||
|
|
@ -193,7 +194,7 @@ spa_alsa_enum_format(struct state *state, uint32_t *index,
|
|||
|
||||
(*index)++;
|
||||
|
||||
if ((res = spa_pod_filter(builder, (struct spa_pod*)fmt, (struct spa_pod*)filter)) < 0)
|
||||
if ((res = spa_pod_filter(builder, result, fmt, filter)) < 0)
|
||||
goto next;
|
||||
|
||||
if (!opened)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue