mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-11 13:30:02 -05:00
Introduce "available" concept for ports, and communicate that to clients. Bump protocol version to 24.
Note: There is still no notification when status availability changes. Signed-off-by: David Henningsson <david.henningsson@canonical.com>
This commit is contained in:
parent
fabb28f935
commit
961ec210a6
8 changed files with 88 additions and 53 deletions
|
|
@ -211,6 +211,14 @@ static void context_get_sink_info_callback(pa_pdispatch *pd, uint32_t command, u
|
|||
goto fail;
|
||||
}
|
||||
|
||||
i.ports[0][j].available = PA_PORT_AVAILABLE_UNKNOWN;
|
||||
if (o->context->version >= 24) {
|
||||
uint32_t av;
|
||||
if (pa_tagstruct_getu32(t, &av) < 0 || av > PA_PORT_AVAILABLE_YES)
|
||||
goto fail;
|
||||
i.ports[0][j].available = av;
|
||||
}
|
||||
|
||||
i.ports[j] = &i.ports[0][j];
|
||||
}
|
||||
|
||||
|
|
@ -476,6 +484,14 @@ static void context_get_source_info_callback(pa_pdispatch *pd, uint32_t command,
|
|||
goto fail;
|
||||
}
|
||||
|
||||
i.ports[0][j].available = PA_PORT_AVAILABLE_UNKNOWN;
|
||||
if (o->context->version >= 24) {
|
||||
uint32_t av;
|
||||
if (pa_tagstruct_getu32(t, &av) < 0 || av > PA_PORT_AVAILABLE_YES)
|
||||
goto fail;
|
||||
i.ports[0][j].available = av;
|
||||
}
|
||||
|
||||
i.ports[j] = &i.ports[0][j];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue