properties: return if property changed

make property_set functions return 1 if there was a change.
Only emit property change notifications when something actually
changed.
Try to only copy property value when needed.
This commit is contained in:
Wim Taymans 2018-10-04 15:18:31 +02:00
parent 0e2885b599
commit 31f4ceb137
8 changed files with 65 additions and 40 deletions

View file

@ -290,7 +290,7 @@ static void print_port(struct proxy_data *data)
if (print_all) {
int i;
printf(" \tdirection: \"%s\"\n", pw_direction_as_string(info->direction));
printf("%c\tparams:\n", MARK_CHANGE(1));
printf("%c\tparams:\n", MARK_CHANGE(2));
for (i = 0; i < data->n_params; i++) {
if (spa_pod_is_object_type(data->params[i], SPA_TYPE_OBJECT_Format))
spa_debug_format(12, NULL, data->params[i]);