pulse-server: avoid emitting changes for unused params

Don't emit change events when latency or tag change, for example.
This commit is contained in:
Wim Taymans 2023-09-14 11:03:39 +02:00
parent 2804a8f1f6
commit 13caae49b5

View file

@ -318,7 +318,7 @@ static void device_event_info(void *data, const struct pw_device_info *info)
case SPA_PARAM_EnumRoute: case SPA_PARAM_EnumRoute:
changed++; changed++;
break; break;
case SPA_PARAM_Route: default:
break; break;
} }
add_param(&o->pending_list, info->params[i].seq, id, NULL); add_param(&o->pending_list, info->params[i].seq, id, NULL);
@ -435,7 +435,16 @@ static void node_event_info(void *data, const struct pw_node_info *info)
continue; continue;
info->params[i].user = 0; info->params[i].user = 0;
changed++; switch (id) {
case SPA_PARAM_Props:
case SPA_PARAM_PropInfo:
case SPA_PARAM_Format:
case SPA_PARAM_EnumFormat:
changed++;
break;
default:
break;
}
add_param(&o->pending_list, info->params[i].seq, id, NULL); add_param(&o->pending_list, info->params[i].seq, id, NULL);
if (!(info->params[i].flags & SPA_PARAM_INFO_READ)) if (!(info->params[i].flags & SPA_PARAM_INFO_READ))
continue; continue;