From 4cde1182d4a3fe1a5a0eb2c8d4263bf0065ae615 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Sun, 9 May 2021 21:13:30 +0200 Subject: [PATCH] spa: add params property Some properties can be part of a params field in the Props object and contain the string key and the pod value to be configured. This is easier to use than using the regular id. Add the fact that the property is also part of params in the PropInfo. --- spa/include/spa/param/props.h | 10 +++++++++- spa/include/spa/param/type-info.h | 3 +++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/spa/include/spa/param/props.h b/spa/include/spa/param/props.h index bd7a9fd22..344f5f9b5 100644 --- a/spa/include/spa/param/props.h +++ b/spa/include/spa/param/props.h @@ -42,7 +42,8 @@ enum spa_prop_info { * is of the type of the property, the second * one is a string with a user readable label * for the value. */ - SPA_PROP_INFO_container, /**< type of container if any */ + SPA_PROP_INFO_container, /**< type of container if any (Id) */ + SPA_PROP_INFO_params, /**< is part of params property (Bool) */ }; /** predefined properties for SPA_TYPE_OBJECT_Props */ @@ -100,6 +101,13 @@ enum spa_prop { SPA_PROP_gain, SPA_PROP_sharpness, + SPA_PROP_START_Other = 0x80000, /**< other properties */ + SPA_PROP_params, /**< simple control params + * (Struct( + * (String : key, + * Pod : value)*)) */ + + SPA_PROP_START_CUSTOM = 0x1000000, }; diff --git a/spa/include/spa/param/type-info.h b/spa/include/spa/param/type-info.h index 84e3c245a..0d305ef7d 100644 --- a/spa/include/spa/param/type-info.h +++ b/spa/include/spa/param/type-info.h @@ -121,6 +121,8 @@ static const struct spa_type_info spa_type_props[] = { { SPA_PROP_exposure, SPA_TYPE_Int, SPA_TYPE_INFO_PROPS_BASE "exposure", NULL }, { SPA_PROP_gain, SPA_TYPE_Int, SPA_TYPE_INFO_PROPS_BASE "gain", NULL }, { SPA_PROP_sharpness, SPA_TYPE_Int, SPA_TYPE_INFO_PROPS_BASE "sharpness", NULL }, + + { SPA_PROP_params, SPA_TYPE_Struct, SPA_TYPE_INFO_PROPS_BASE "params", NULL }, { 0, 0, NULL, NULL }, }; @@ -135,6 +137,7 @@ static const struct spa_type_info spa_type_prop_info[] = { { SPA_PROP_INFO_type, SPA_TYPE_Pod, SPA_TYPE_INFO_PROP_INFO_BASE "type", NULL }, { SPA_PROP_INFO_labels, SPA_TYPE_Struct, SPA_TYPE_INFO_PROP_INFO_BASE "labels", NULL }, { SPA_PROP_INFO_container, SPA_TYPE_Id, SPA_TYPE_INFO_PROP_INFO_BASE "container", NULL }, + { SPA_PROP_INFO_params, SPA_TYPE_Bool, SPA_TYPE_INFO_PROP_INFO_BASE "params", NULL }, { 0, 0, NULL, NULL }, };