mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-10 13:29:58 -05:00
introspect: Get formats for sources
This gets the list of supported formats for a source in pa_context_get_source_info*(). Also prints these in 'pactl list'.
This commit is contained in:
parent
5d35375aa7
commit
fdf3a08814
5 changed files with 82 additions and 18 deletions
|
|
@ -3131,6 +3131,19 @@ static void source_fill_tagstruct(pa_native_connection *c, pa_tagstruct *t, pa_s
|
|||
|
||||
pa_tagstruct_puts(t, source->active_port ? source->active_port->name : NULL);
|
||||
}
|
||||
|
||||
if (c->version >= 22) {
|
||||
uint32_t i;
|
||||
pa_format_info *f;
|
||||
pa_idxset *formats = pa_source_get_formats(source);
|
||||
|
||||
pa_tagstruct_putu8(t, (uint8_t) pa_idxset_size(formats));
|
||||
PA_IDXSET_FOREACH(f, formats, i) {
|
||||
pa_tagstruct_put_format_info(t, f);
|
||||
}
|
||||
|
||||
pa_idxset_free(formats, (pa_free2_cb_t) pa_format_info_free2, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
static void client_fill_tagstruct(pa_native_connection *c, pa_tagstruct *t, pa_client *client) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue