node: add port and node params

Add a new struct spa_param_info that lists the available params on
a node/port and if they are readable/writable/updated. We can use
this to replace and improve the PARAM_List and also to notify
property change and updates.

Update elements and code to deal with this new param stuff. Add
port and node info to most elements and signal changes.

Use async enum_params in -inspect and use the param info to know
which ones to enumerate.

Use the port info to know what parameters to update in the
remote-node.
This commit is contained in:
Wim Taymans 2019-02-27 16:43:01 +01:00
parent 3d25adc598
commit 499dd3ff22
52 changed files with 1979 additions and 1461 deletions

View file

@ -72,6 +72,19 @@ struct spa_fraction {
uint32_t denom;
};
struct spa_param_info {
uint32_t id;
#define SPA_PARAM_INFO_SERIAL (1<<0) /**< bit to signal update even when the
* read/write flags don't change */
#define SPA_PARAM_INFO_READ (1<<1)
#define SPA_PARAM_INFO_WRITE (1<<2)
#define SPA_PARAM_INFO_READWRITE (SPA_PARAM_INFO_WRITE|SPA_PARAM_INFO_READ)
uint32_t flags;
uint32_t padding[6];
};
#define SPA_PARAM_INFO(id,flags) (struct spa_param_info){ (id), (flags) }
#define SPA_N_ELEMENTS(arr) (sizeof(arr) / sizeof((arr)[0]))
#define SPA_MIN(a,b) \

View file

@ -123,7 +123,6 @@ static const struct spa_type_info spa_types[] = {
{ SPA_TYPE_OBJECT_START, SPA_TYPE_Object, SPA_TYPE_INFO_Object, NULL },
{ SPA_TYPE_OBJECT_MonitorItem, SPA_TYPE_Object, SPA_TYPE_INFO_MonitorItem, spa_type_monitor_item },
{ SPA_TYPE_OBJECT_ParamList, SPA_TYPE_Object, SPA_TYPE_INFO_PARAM_List, spa_type_param_list, },
{ SPA_TYPE_OBJECT_PropInfo, SPA_TYPE_Object, SPA_TYPE_INFO_PropInfo, spa_type_prop_info, },
{ SPA_TYPE_OBJECT_Props, SPA_TYPE_Object, SPA_TYPE_INFO_Props, spa_type_props },
{ SPA_TYPE_OBJECT_Format, SPA_TYPE_Object, SPA_TYPE_INFO_Format, spa_type_format },

View file

@ -94,7 +94,6 @@ enum {
/* Objects */
SPA_TYPE_OBJECT_START = 0x50000,
SPA_TYPE_OBJECT_MonitorItem,
SPA_TYPE_OBJECT_ParamList,
SPA_TYPE_OBJECT_PropInfo,
SPA_TYPE_OBJECT_Props,
SPA_TYPE_OBJECT_Format,