summaryrefslogtreecommitdiffstats
path: root/src/pulsecore
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-02-12 03:35:57 +0100
committerLennart Poettering <lennart@poettering.net>2009-02-12 03:35:57 +0100
commitf0cc23d6e5dd9ce718e66978d7de2dbc94ded537 (patch)
treebff90bcabee7c4b047af8fc55c8da12b2f3aa932 /src/pulsecore
parent5d154255cbab0726ab30ec1f9e0b745face778fa (diff)
parent86bec09fa843160dd671cf53a32c13fafa0cb932 (diff)
Merge commit 'elmarco/bt-wip'
Diffstat (limited to 'src/pulsecore')
-rw-r--r--src/pulsecore/core.h2
-rw-r--r--src/pulsecore/sink.c6
-rw-r--r--src/pulsecore/source.c6
3 files changed, 10 insertions, 4 deletions
diff --git a/src/pulsecore/core.h b/src/pulsecore/core.h
index aca96bba..53e2d2c3 100644
--- a/src/pulsecore/core.h
+++ b/src/pulsecore/core.h
@@ -70,6 +70,7 @@ typedef enum pa_core_hook {
PA_CORE_HOOK_SINK_INPUT_UNLINK_POST,
PA_CORE_HOOK_SINK_INPUT_MOVE_START,
PA_CORE_HOOK_SINK_INPUT_MOVE_FINISH,
+ PA_CORE_HOOK_SINK_INPUT_MOVE_FAIL,
PA_CORE_HOOK_SINK_INPUT_STATE_CHANGED,
PA_CORE_HOOK_SINK_INPUT_PROPLIST_CHANGED,
PA_CORE_HOOK_SINK_INPUT_SET_VOLUME,
@@ -81,6 +82,7 @@ typedef enum pa_core_hook {
PA_CORE_HOOK_SOURCE_OUTPUT_UNLINK_POST,
PA_CORE_HOOK_SOURCE_OUTPUT_MOVE_START,
PA_CORE_HOOK_SOURCE_OUTPUT_MOVE_FINISH,
+ PA_CORE_HOOK_SOURCE_OUTPUT_MOVE_FAIL,
PA_CORE_HOOK_SOURCE_OUTPUT_STATE_CHANGED,
PA_CORE_HOOK_SOURCE_OUTPUT_PROPLIST_CHANGED,
PA_CORE_HOOK_SOURCE_OUTPUT_SEND_EVENT,
diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
index 57725873..eadef809 100644
--- a/src/pulsecore/sink.c
+++ b/src/pulsecore/sink.c
@@ -533,8 +533,10 @@ void pa_sink_move_all_fail(pa_queue *q) {
pa_assert(q);
while ((i = PA_SINK_INPUT(pa_queue_pop(q)))) {
- pa_sink_input_unlink(i);
- pa_sink_input_unref(i);
+ if (pa_hook_fire(&i->core->hooks[PA_CORE_HOOK_SINK_INPUT_MOVE_FAIL], i) == PA_HOOK_OK) {
+ pa_sink_input_unlink(i);
+ pa_sink_input_unref(i);
+ }
}
pa_queue_free(q, NULL, NULL);
diff --git a/src/pulsecore/source.c b/src/pulsecore/source.c
index 04c7f8b7..c31c89c3 100644
--- a/src/pulsecore/source.c
+++ b/src/pulsecore/source.c
@@ -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);