pod: improve the vararg pod builder and parser

Automatically parse and build key/value when in objects without having
to prefix the key with ":"
Automatically build control/value when in sequence without the "."
prefix.
Remove the builder with key/pod, taking a reference to the stack built
temporary pods is not allowed in c++. We can use the varargs version
with the same convenient syntax.
Remove the parser "*" option, it is unused.
Improve spa_pod_builder_add_* and spa_pod_parser_get_* and make them
look similar.
This commit is contained in:
Wim Taymans 2019-01-16 11:05:12 +01:00
parent 79d68ace68
commit 80cfda89c1
59 changed files with 1833 additions and 2005 deletions

View file

@ -70,9 +70,9 @@ inspect_node_params(struct data *data, struct spa_node *node)
break;
}
spa_pod_object_parse(param,
":", SPA_PARAM_LIST_id, "I", &id,
NULL);
spa_pod_parse_object(param,
SPA_TYPE_OBJECT_ParamList, NULL,
SPA_PARAM_LIST_id, SPA_POD_Id(&id));
printf("enumerating: %s:\n", spa_debug_type_find_name(NULL, id));
for (idx2 = 0;;) {
@ -111,9 +111,9 @@ inspect_port_params(struct data *data, struct spa_node *node,
error(0, -res, "port_enum_params");
break;
}
spa_pod_object_parse(param,
":", SPA_PARAM_LIST_id, "I", &id,
NULL);
spa_pod_parse_object(param,
SPA_TYPE_OBJECT_ParamList, NULL,
SPA_PARAM_LIST_id, SPA_POD_Id(&id));
printf("enumerating: %s:\n", spa_debug_type_find_name(NULL, id));
for (idx2 = 0;;) {