mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-12 13:30:15 -05:00
utils: don't remove pending after first callback
Let the caller remove the pending result when finished. Use non _sync verions to enum_params in node/port/device. Set result.id in alsa and v4l2 correctly.
This commit is contained in:
parent
245a0d5634
commit
aab2b5594f
8 changed files with 89 additions and 60 deletions
|
|
@ -64,8 +64,9 @@ static inline int spa_node_enum_params_sync(struct spa_node *node,
|
|||
spa_pending_queue_add(queue, 0, &pending,
|
||||
spa_result_func_node_params, &data);
|
||||
res = spa_node_enum_params(node, 0, id, *index, 1, filter);
|
||||
spa_pending_remove(&pending);
|
||||
|
||||
if (data.data.param == NULL) {
|
||||
spa_pending_remove(&pending);
|
||||
if (res > 0)
|
||||
res = 0;
|
||||
} else {
|
||||
|
|
@ -92,8 +93,9 @@ static inline int spa_node_port_enum_params_sync(struct spa_node *node,
|
|||
spa_result_func_node_params, &data);
|
||||
res = spa_node_port_enum_params(node, 0, direction, port_id,
|
||||
id, *index, 1, filter);
|
||||
spa_pending_remove(&pending);
|
||||
|
||||
if (data.data.param == NULL) {
|
||||
spa_pending_remove(&pending);
|
||||
if (res > 0)
|
||||
res = 0;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue