More type fixes

Param ids and IO ids are now simple enums.
Move some type info in one place, delete some type-info files
Fix type debug
Make audio layout an enum
Mark more enums as enums in types so they show us with their names in
the debug.
This commit is contained in:
Wim Taymans 2018-08-25 12:08:29 +02:00
parent 93a8747a44
commit d26aecfef2
82 changed files with 869 additions and 1118 deletions

View file

@ -76,7 +76,7 @@ static struct monitor_item *add_item(struct pw_spa_monitor *this,
if (spa_pod_object_parse(item,
":", SPA_MONITOR_ITEM_id, "s", &id,
":", SPA_MONITOR_ITEM_state, "i", &state,
":", SPA_MONITOR_ITEM_state, "I", &state,
":", SPA_MONITOR_ITEM_name, "s", &name,
":", SPA_MONITOR_ITEM_class, "s", &klass,
":", SPA_MONITOR_ITEM_factory, "p", &factory,
@ -185,7 +185,7 @@ static void change_item(struct pw_spa_monitor *this, struct spa_pod *item, uint6
if (spa_pod_object_parse(item,
":", SPA_MONITOR_ITEM_name, "s", &name,
":", SPA_MONITOR_ITEM_state, "i", &state,
":", SPA_MONITOR_ITEM_state, "I", &state,
":", SPA_MONITOR_ITEM_id, "s", &id, NULL) < 0)
return;

View file

@ -163,7 +163,7 @@ setup_props(struct pw_core *core, struct spa_node *spa_node, struct pw_propertie
uint8_t buf[2048];
struct spa_pod_builder b = SPA_POD_BUILDER_INIT(buf, sizeof(buf));
if ((res = spa_node_enum_params(spa_node, SPA_ID_PARAM_Props, &index, NULL, &props, &b)) <= 0) {
if ((res = spa_node_enum_params(spa_node, SPA_PARAM_Props, &index, NULL, &props, &b)) <= 0) {
pw_log_debug("spa_node_get_props failed: %d", res);
return res;
}
@ -192,7 +192,7 @@ setup_props(struct pw_core *core, struct spa_node *spa_node, struct pw_propertie
pw_properties_parse_bool(value);
break;
case SPA_ID_Enum:
SPA_POD_VALUE(struct spa_pod_id, &prop->body.value) =
SPA_POD_VALUE(struct spa_pod_enum, &prop->body.value) =
spa_debug_type_find_id(spa_debug_types, value);
break;
case SPA_ID_Int:
@ -219,7 +219,7 @@ setup_props(struct pw_core *core, struct spa_node *spa_node, struct pw_propertie
}
}
if ((res = spa_node_set_param(spa_node, SPA_ID_PARAM_Props, 0, props)) < 0) {
if ((res = spa_node_set_param(spa_node, SPA_PARAM_Props, 0, props)) < 0) {
pw_log_debug("spa_node_set_props failed: %d", res);
return res;
}