sink, source: Send notifications when flags change

The hooks aren't currently used, but for example, the D-Bus protocol
could use them if it implemented flag change signals.
This commit is contained in:
Tanu Kaskinen 2013-03-28 17:30:16 +02:00
parent ed51769a59
commit 4096989ad6
3 changed files with 8 additions and 0 deletions

View file

@ -710,6 +710,9 @@ void pa_source_update_flags(pa_source *s, pa_source_flags_t mask, pa_source_flag
pa_log_debug("Source %s: DYNAMIC_LATENCY flag %s.",
s->name, (s->flags & PA_SOURCE_DYNAMIC_LATENCY) ? "enabled" : "disabled");
pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SOURCE | PA_SUBSCRIPTION_EVENT_CHANGE, s->index);
pa_hook_fire(&s->core->hooks[PA_CORE_HOOK_SOURCE_FLAGS_CHANGED], s);
PA_IDXSET_FOREACH(output, s->outputs, idx) {
if (output->destination_source)
pa_source_update_flags(output->destination_source, mask, value);