spa: Improve PropInfo fields

The PropInfo either has a registered id (and then also a name from the
type-info) or a custom name as a string.
In all cases, the description contains a free form text that clarifies
the property.

Use the description in the stream controls name.
This commit is contained in:
Wim Taymans 2022-03-30 17:09:08 +02:00
parent 4ae94a6ca6
commit 2f5bba112f
19 changed files with 43 additions and 43 deletions

View file

@ -1172,7 +1172,7 @@ static int node_event_param(void *object, int seq,
if (spa_pod_parse_object(c->info,
SPA_TYPE_OBJECT_PropInfo, NULL,
SPA_PROP_INFO_name, SPA_POD_String(&c->control.name),
SPA_PROP_INFO_description, SPA_POD_OPT_String(&c->control.name),
SPA_PROP_INFO_type, SPA_POD_PodChoice(&type),
SPA_PROP_INFO_container, SPA_POD_OPT_Id(&container)) < 0) {
free(c);

View file

@ -101,14 +101,14 @@ endpoint_enum_params (void *object, int seq,
param = spa_pod_builder_add_object(&b,
SPA_TYPE_OBJECT_PropInfo, id,
SPA_PROP_INFO_id, SPA_POD_Id(SPA_PROP_volume),
SPA_PROP_INFO_name, SPA_POD_String("volume"),
SPA_PROP_INFO_description, SPA_POD_String("volume"),
SPA_PROP_INFO_type, SPA_POD_CHOICE_RANGE_Float(p->volume, 0.0, 1.0));
break;
case 1:
param = spa_pod_builder_add_object(&b,
SPA_TYPE_OBJECT_PropInfo, id,
SPA_PROP_INFO_id, SPA_POD_Id(SPA_PROP_mute),
SPA_PROP_INFO_name, SPA_POD_String("mute"),
SPA_PROP_INFO_description, SPA_POD_String("mute"),
SPA_PROP_INFO_type, SPA_POD_CHOICE_Bool(p->mute));
break;
default: