media-session: improve param enumeration

Don't use subscribe, enum is more manageable.
Use user data field to check for changes.
Only enumerate readable params.
Enum all node params.
This commit is contained in:
Wim Taymans 2020-07-31 13:59:25 +02:00
parent f231392093
commit 5e51cbe48e
2 changed files with 31 additions and 37 deletions

View file

@ -120,7 +120,6 @@ struct sm_client {
struct sm_device {
struct sm_object obj;
unsigned int subscribe:1; /**< if we subscribed to param changes */
unsigned int locked:1; /**< if the device is locked by someone else right now */
#define SM_DEVICE_CHANGE_MASK_INFO (SM_OBJECT_CHANGE_MASK_LAST<<0)
@ -137,8 +136,6 @@ struct sm_node {
struct sm_device *device; /**< optional device */
struct spa_list link; /**< link in device node_list */
unsigned int subscribe:1; /**< if we subscribed to param changes */
uint32_t last_id;
#define SM_NODE_CHANGE_MASK_INFO (SM_OBJECT_CHANGE_MASK_LAST<<0)
#define SM_NODE_CHANGE_MASK_PARAMS (SM_OBJECT_CHANGE_MASK_LAST<<1)