props: improve property introspection

Make a new PropInfo parameter that allows us to iterate all
properties. Make some new fields to set labels and names for
properties. We will be able to add more things to describe the
properties this way.
Use the Props param to simply query or set properties.
We can now make int enum properties and describe all possible
values with labels, we don't need to register types anymore.
This then makes it possible to enumerate the v4l2 controls and make
them available as control params.
This commit is contained in:
Wim Taymans 2017-12-15 16:30:56 +01:00
parent 1c19342487
commit e5e360d5df
13 changed files with 611 additions and 175 deletions

View file

@ -534,16 +534,16 @@ impl_node_port_enum_params(struct spa_node *node,
id, t->param_io.Prop,
":", t->param_io.id, "I", t->io_prop_volume,
":", t->param_io.size, "i", sizeof(struct spa_pod_double),
":", t->param_io.propId, "I", t->prop_volume,
":", t->param_io.propType, "dru", p->volume, 2, 0.0, 10.0);
":", t->param.propId, "I", t->prop_volume,
":", t->param.propType, "dru", p->volume, 2, 0.0, 10.0);
break;
case 1:
param = spa_pod_builder_object(&b,
id, t->param_io.Prop,
":", t->param_io.id, "I", t->io_prop_mute,
":", t->param_io.size, "i", sizeof(struct spa_pod_bool),
":", t->param_io.propId, "I", t->prop_mute,
":", t->param_io.propType, "b", p->mute);
":", t->param.propId, "I", t->prop_mute,
":", t->param.propType, "b", p->mute);
break;
default:
return 0;