pw-*: Use user data to track param changes

Use the new param_info user field to track individual param
changes and only notify thos that changed.
This commit is contained in:
Wim Taymans 2020-03-06 15:36:57 +01:00
parent 43601ad722
commit e9884fcfb5
2 changed files with 22 additions and 16 deletions

View file

@ -234,10 +234,12 @@ static void print_params(struct spa_param_info *params, uint32_t n_params, char
for (i = 0; i < n_params; i++) {
const struct spa_type_info *type_info = spa_type_param;
fprintf(stdout, "%c\t %d (%s) %c%c\n", mark, params[i].id,
spa_debug_type_find_name(type_info, params[i].id),
params[i].flags & SPA_PARAM_INFO_READ ? 'r' : '-',
params[i].flags & SPA_PARAM_INFO_WRITE ? 'w' : '-');
fprintf(stdout, "%c\t %d (%s) %c%c\n",
params[i].user > 0 ? mark : ' ', params[i].id,
spa_debug_type_find_name(type_info, params[i].id),
params[i].flags & SPA_PARAM_INFO_READ ? 'r' : '-',
params[i].flags & SPA_PARAM_INFO_WRITE ? 'w' : '-');
params[i].user = 0;
}
}