From e42de413e89249dca22b78f3c3d5a5c2e2e8b2f3 Mon Sep 17 00:00:00 2001 Message-ID: In-Reply-To: <1993383ddf67e296334c7916d6afc699ee6300c7.1737052666.git.sam@gentoo.org> References: <1993383ddf67e296334c7916d6afc699ee6300c7.1737052666.git.sam@gentoo.org> From: Wim Taymans Date: Tue, 3 Dec 2024 12:41:07 +0100 Subject: [PATCH 6/8] spa: fix some param type info Add an int array type and use this in the route properties. Fixes #4441 --- spa/include/spa/param/param-types.h | 5 +++++ spa/include/spa/param/route-types.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/spa/include/spa/param/param-types.h b/spa/include/spa/param/param-types.h index 4bed3651d..ebb8d988b 100644 --- a/spa/include/spa/param/param-types.h +++ b/spa/include/spa/param/param-types.h @@ -55,6 +55,11 @@ static const struct spa_type_info spa_type_prop_float_array[] = { { 0, 0, NULL, NULL }, }; +static const struct spa_type_info spa_type_prop_int_array[] = { + { SPA_PROP_START, SPA_TYPE_Int, SPA_TYPE_INFO_BASE "intArray", NULL, }, + { 0, 0, NULL, NULL }, +}; + static const struct spa_type_info spa_type_prop_channel_map[] = { { SPA_PROP_START, SPA_TYPE_Id, SPA_TYPE_INFO_BASE "channelMap", spa_type_audio_channel, }, { 0, 0, NULL, NULL }, diff --git a/spa/include/spa/param/route-types.h b/spa/include/spa/param/route-types.h index 619a9e2e8..78ced495e 100644 --- a/spa/include/spa/param/route-types.h +++ b/spa/include/spa/param/route-types.h @@ -32,9 +32,9 @@ static const struct spa_type_info spa_type_param_route[] = { { 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_info, SPA_TYPE_Struct, SPA_TYPE_INFO_PARAM_ROUTE_BASE "info", NULL, }, - { SPA_PARAM_ROUTE_profiles, SPA_TYPE_Int, SPA_TYPE_INFO_PARAM_ROUTE_BASE "profiles", NULL, }, + { SPA_PARAM_ROUTE_profiles, SPA_TYPE_Array, SPA_TYPE_INFO_PARAM_ROUTE_BASE "profiles", spa_type_prop_int_array, }, { SPA_PARAM_ROUTE_props, SPA_TYPE_OBJECT_Props, SPA_TYPE_INFO_PARAM_ROUTE_BASE "props", NULL, }, - { SPA_PARAM_ROUTE_devices, SPA_TYPE_Int, SPA_TYPE_INFO_PARAM_ROUTE_BASE "devices", NULL, }, + { SPA_PARAM_ROUTE_devices, SPA_TYPE_Array, SPA_TYPE_INFO_PARAM_ROUTE_BASE "devices", spa_type_prop_int_array, }, { SPA_PARAM_ROUTE_profile, SPA_TYPE_Int, SPA_TYPE_INFO_PARAM_ROUTE_BASE "profile", NULL, }, { SPA_PARAM_ROUTE_save, SPA_TYPE_Bool, SPA_TYPE_INFO_PARAM_ROUTE_BASE "save", NULL, }, { 0, 0, NULL, NULL }, -- 2.48.0