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

@ -1160,14 +1160,14 @@ spa_v4l2_enum_controls(struct impl *this, int seq,
queryctrl.minimum,
queryctrl.maximum,
queryctrl.step),
SPA_PROP_INFO_name, SPA_POD_String(queryctrl.name));
SPA_PROP_INFO_description, SPA_POD_String(queryctrl.name));
break;
case V4L2_CTRL_TYPE_BOOLEAN:
param = spa_pod_builder_add_object(&b,
SPA_TYPE_OBJECT_PropInfo, SPA_PARAM_PropInfo,
SPA_PROP_INFO_id, SPA_POD_Id(prop_id),
SPA_PROP_INFO_type, SPA_POD_CHOICE_Bool(queryctrl.default_value),
SPA_PROP_INFO_name, SPA_POD_String(queryctrl.name));
SPA_PROP_INFO_description, SPA_POD_String(queryctrl.name));
break;
case V4L2_CTRL_TYPE_MENU:
{
@ -1178,7 +1178,7 @@ spa_v4l2_enum_controls(struct impl *this, int seq,
spa_pod_builder_add(&b,
SPA_PROP_INFO_id, SPA_POD_Id(prop_id),
SPA_PROP_INFO_type, SPA_POD_CHOICE_ENUM_Int(1, queryctrl.default_value),
SPA_PROP_INFO_name, SPA_POD_String(queryctrl.name),
SPA_PROP_INFO_description, SPA_POD_String(queryctrl.name),
0);
spa_zero(querymenu);