param: rename properties, use info for key/value info

Add props field for configurable route properties (like volumue/mute)
This commit is contained in:
Wim Taymans 2020-06-26 16:21:52 +02:00
parent 41d7ccc336
commit ef0e5ee09e
2 changed files with 8 additions and 6 deletions

View file

@ -106,7 +106,7 @@ enum spa_param_profile {
SPA_PARAM_PROFILE_priority, /**< profile priority (Int) */
SPA_PARAM_PROFILE_available, /**< availability of the profile
* (Id enum spa_param_availability) */
SPA_PARAM_PROFILE_properties, /**< properties (Struct(
SPA_PARAM_PROFILE_info, /**< info (Struct(
* Int : n_items,
* (String : key,
* String : value)*)) */
@ -142,17 +142,18 @@ enum spa_param_route {
SPA_PARAM_ROUTE_START,
SPA_PARAM_ROUTE_index, /**< index of the routing destination (Int) */
SPA_PARAM_ROUTE_direction, /**< direction, input/output (Id enum spa_direction) */
SPA_PARAM_ROUTE_active, /**< if the route is active, (Bool) */
SPA_PARAM_ROUTE_device, /**< device id (Int) */
SPA_PARAM_ROUTE_name, /**< name of the routing destination (String) */
SPA_PARAM_ROUTE_description, /**< description of the destination (String) */
SPA_PARAM_ROUTE_priority, /**< priority of the destination (Int) */
SPA_PARAM_ROUTE_available, /**< availability of the destination
* (Id enum spa_param_availability) */
SPA_PARAM_ROUTE_properties, /**< properties (Struct(
SPA_PARAM_ROUTE_info, /**< info (Struct(
* Int : n_items,
* (String : key,
* String : value)*)) */
SPA_PARAM_ROUTE_profiles, /**< associated profile indexes (Array of Int) */
SPA_PARAM_ROUTE_props, /**< properties SPA_TYPE_OBJECT_Props */
};

View file

@ -288,7 +288,7 @@ static const struct spa_type_info spa_type_param_profile[] = {
{ SPA_PARAM_PROFILE_description, SPA_TYPE_String, SPA_TYPE_INFO_PARAM_PROFILE_BASE "description", NULL },
{ SPA_PARAM_PROFILE_priority, SPA_TYPE_Int, SPA_TYPE_INFO_PARAM_PROFILE_BASE "priority", NULL },
{ SPA_PARAM_PROFILE_available, SPA_TYPE_Id, SPA_TYPE_INFO_PARAM_PROFILE_BASE "available", spa_type_param_availability, },
{ SPA_PARAM_PROFILE_properties, SPA_TYPE_Struct, SPA_TYPE_INFO_PARAM_PROFILE_BASE "properties", NULL, },
{ SPA_PARAM_PROFILE_info, SPA_TYPE_Struct, SPA_TYPE_INFO_PARAM_PROFILE_BASE "info", NULL, },
{ SPA_PARAM_PROFILE_classes, SPA_TYPE_Struct, SPA_TYPE_INFO_PARAM_PROFILE_BASE "classes", NULL, },
{ 0, 0, NULL, NULL },
};
@ -325,13 +325,14 @@ static const struct spa_type_info spa_type_param_route[] = {
{ SPA_PARAM_ROUTE_START, SPA_TYPE_Id, SPA_TYPE_INFO_PARAM_ROUTE_BASE, spa_type_param, },
{ SPA_PARAM_ROUTE_index, SPA_TYPE_Int, SPA_TYPE_INFO_PARAM_ROUTE_BASE "index", NULL, },
{ SPA_PARAM_ROUTE_direction, SPA_TYPE_Id, SPA_TYPE_INFO_PARAM_ROUTE_BASE "direction", spa_type_direction, },
{ SPA_PARAM_ROUTE_active, SPA_TYPE_Bool, SPA_TYPE_INFO_PARAM_ROUTE_BASE "active", NULL, },
{ SPA_PARAM_ROUTE_device, SPA_TYPE_Int, SPA_TYPE_INFO_PARAM_ROUTE_BASE "device", NULL, },
{ SPA_PARAM_ROUTE_name, SPA_TYPE_String, SPA_TYPE_INFO_PARAM_ROUTE_BASE "name", NULL, },
{ SPA_PARAM_ROUTE_description, SPA_TYPE_String, SPA_TYPE_INFO_PARAM_ROUTE_BASE "description", NULL, },
{ SPA_PARAM_ROUTE_priority, SPA_TYPE_Int, SPA_TYPE_INFO_PARAM_ROUTE_BASE "priority", NULL, },
{ SPA_PARAM_ROUTE_available, SPA_TYPE_Id, SPA_TYPE_INFO_PARAM_ROUTE_BASE "available", spa_type_param_availability, },
{ SPA_PARAM_ROUTE_properties, SPA_TYPE_Struct, SPA_TYPE_INFO_PARAM_ROUTE_BASE "properties", NULL, },
{ SPA_PARAM_ROUTE_info, SPA_TYPE_Struct, SPA_TYPE_INFO_PARAM_ROUTE_BASE "info", NULL, },
{ SPA_PARAM_ROUTE_profiles, SPA_TYPE_Array, SPA_TYPE_INFO_PARAM_ROUTE_BASE "profiles", NULL, },
{ SPA_PARAM_ROUTE_props, SPA_TYPE_Object, SPA_TYPE_INFO_PARAM_ROUTE_BASE "props", NULL, },
{ 0, 0, NULL, NULL },
};