mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-06-13 14:33:03 -04:00
props: add group name PropInfo and Props
Some objects might aggregate properties from multiple other objects. Make sure they are grouped together with the group property. This makes it possible to get per port group properties, for example.
This commit is contained in:
parent
d7f32af545
commit
b93c4f933d
3 changed files with 124 additions and 111 deletions
|
|
@ -25,6 +25,7 @@ extern "C" {
|
|||
static const struct spa_type_info spa_type_props[] = {
|
||||
{ SPA_PROP_START, SPA_TYPE_Id, SPA_TYPE_INFO_PROPS_BASE, spa_type_param, },
|
||||
{ SPA_PROP_unknown, SPA_TYPE_None, SPA_TYPE_INFO_PROPS_BASE "unknown", NULL },
|
||||
{ SPA_PROP_group, SPA_TYPE_String, SPA_TYPE_INFO_PROPS_BASE "group", NULL },
|
||||
{ SPA_PROP_device, SPA_TYPE_String, SPA_TYPE_INFO_PROPS_BASE "device", NULL },
|
||||
{ SPA_PROP_deviceName, SPA_TYPE_String, SPA_TYPE_INFO_PROPS_BASE "deviceName", NULL },
|
||||
{ SPA_PROP_deviceFd, SPA_TYPE_Fd, SPA_TYPE_INFO_PROPS_BASE "deviceFd", NULL },
|
||||
|
|
@ -95,6 +96,7 @@ static const struct spa_type_info spa_type_prop_info[] = {
|
|||
{ 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 },
|
||||
{ SPA_PROP_INFO_description, SPA_TYPE_String, SPA_TYPE_INFO_PROP_INFO_BASE "description", NULL },
|
||||
{ SPA_PROP_INFO_group, SPA_TYPE_String, SPA_TYPE_INFO_PROP_INFO_BASE "group", NULL },
|
||||
{ 0, 0, NULL, NULL },
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -19,17 +19,18 @@ extern "C" {
|
|||
/** properties of SPA_TYPE_OBJECT_PropInfo */
|
||||
enum spa_prop_info {
|
||||
SPA_PROP_INFO_START,
|
||||
SPA_PROP_INFO_id, /**< associated id of the property */
|
||||
SPA_PROP_INFO_name, /**< name of the property */
|
||||
SPA_PROP_INFO_id, /**< (Id) associated id of the property */
|
||||
SPA_PROP_INFO_name, /**< (String) name of the property */
|
||||
SPA_PROP_INFO_type, /**< type and range/enums of property */
|
||||
SPA_PROP_INFO_labels, /**< labels of property if any, this is a
|
||||
* struct with pairs of values, the first one
|
||||
* 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 (Id) */
|
||||
SPA_PROP_INFO_params, /**< is part of params property (Bool) */
|
||||
SPA_PROP_INFO_description, /**< User readable description */
|
||||
SPA_PROP_INFO_container, /**< (Id) type of container if any */
|
||||
SPA_PROP_INFO_params, /**< (Bool) is part of params property */
|
||||
SPA_PROP_INFO_description, /**< (String) User readable description */
|
||||
SPA_PROP_INFO_group, /**< (String) the property group name */
|
||||
};
|
||||
|
||||
/** predefined properties for SPA_TYPE_OBJECT_Props */
|
||||
|
|
@ -37,6 +38,7 @@ enum spa_prop {
|
|||
SPA_PROP_START,
|
||||
|
||||
SPA_PROP_unknown, /**< an unknown property */
|
||||
SPA_PROP_group, /**< (String) the property group name */
|
||||
|
||||
SPA_PROP_START_Device = 0x100, /**< device related properties */
|
||||
SPA_PROP_device,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue