pulsecore: add PA_CORE_HOOK_*_MOVE_FAIL

In case pa_*_move_all_fail(), it is nicer to let a module override the
default behavior to fallback on a different sink/source. (instead of
unlinking the sink_input/source_output)
This commit is contained in:
Marc-André Lureau 2009-02-11 19:16:42 +02:00
parent f56da98937
commit 86bec09fa8
3 changed files with 10 additions and 4 deletions

View file

@ -472,8 +472,10 @@ void pa_source_move_all_fail(pa_queue *q) {
pa_assert(q);
while ((o = PA_SOURCE_OUTPUT(pa_queue_pop(q)))) {
pa_source_output_unlink(o);
pa_source_output_unref(o);
if (pa_hook_fire(&o->core->hooks[PA_CORE_HOOK_SOURCE_OUTPUT_MOVE_FAIL], o) == PA_HOOK_OK) {
pa_source_output_unlink(o);
pa_source_output_unref(o);
}
}
pa_queue_free(q, NULL, NULL);