mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-21 06:59:59 -05:00
device-port: add type member
The clients might wanna to know for which purpose is the port. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
861836c5f7
commit
feee531c2b
9 changed files with 77 additions and 10 deletions
|
|
@ -220,8 +220,10 @@ static void context_get_sink_info_callback(pa_pdispatch *pd, uint32_t command, u
|
|||
i.ports[j]->available = av;
|
||||
}
|
||||
i.ports[j]->available_group = NULL;
|
||||
i.ports[j]->type = PA_DEVICE_PORT_TYPE_UNKNOWN;
|
||||
if (o->context->version >= 34) {
|
||||
if (pa_tagstruct_gets(t, &i.ports[j]->available_group) < 0)
|
||||
if (pa_tagstruct_gets(t, &i.ports[j]->available_group) < 0 ||
|
||||
pa_tagstruct_getu32(t, &i.ports[j]->type) < 0)
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
|
|
@ -498,8 +500,10 @@ static void context_get_source_info_callback(pa_pdispatch *pd, uint32_t command,
|
|||
i.ports[j]->available = av;
|
||||
}
|
||||
i.ports[j]->available_group = NULL;
|
||||
i.ports[j]->type = PA_DEVICE_PORT_TYPE_UNKNOWN;
|
||||
if (o->context->version >= 34) {
|
||||
if (pa_tagstruct_gets(t, &i.ports[j]->available_group) < 0)
|
||||
if (pa_tagstruct_gets(t, &i.ports[j]->available_group) < 0 ||
|
||||
pa_tagstruct_getu32(t, &i.ports[j]->type))
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
|
|
@ -872,8 +876,11 @@ static int fill_card_port_info(pa_context *context, pa_tagstruct* t, pa_card_inf
|
|||
return -PA_ERR_PROTOCOL;
|
||||
} else
|
||||
port->latency_offset = 0;
|
||||
|
||||
port->type = PA_DEVICE_PORT_TYPE_UNKNOWN;
|
||||
if (context->version >= 34) {
|
||||
if (pa_tagstruct_gets(t, &port->available_group) < 0)
|
||||
if (pa_tagstruct_gets(t, &port->available_group) < 0 ||
|
||||
pa_tagstruct_getu32(t, &port->type) < 0)
|
||||
return -PA_ERR_PROTOCOL;
|
||||
} else
|
||||
port->available_group = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue