mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
node: improve pending results
Make a special function for pending results to make it clear that it is different from normal results. Don't pass result code to result function, it is not useful because since the callback is called, all must be fine. The spa_pending is removed from the list right before the callback and can thus be freed in the callback. Pass the spa_pending in the pending callback so that extra data can be added that way. Reuse spa_pending objects in link and nodes instead of allocating. We always only have one pending operation and we can cancel any pending previous operation by removing the pending.
This commit is contained in:
parent
a3ca2df0fe
commit
98463b689b
33 changed files with 126 additions and 156 deletions
|
|
@ -359,7 +359,7 @@ spa_alsa_enum_format(struct state *state, uint32_t start, uint32_t num,
|
|||
if ((res = spa_pod_filter(&b, &result.param, fmt, filter)) < 0)
|
||||
goto next;
|
||||
|
||||
if ((res = func(data, count, 1, &result)) != 0)
|
||||
if ((res = func(data, count, &result)) != 0)
|
||||
goto exit;
|
||||
|
||||
if (++count != num)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue