From 358824b330e20b9e6472fdefc4613e03b20c9abb Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 21 Oct 2008 18:24:45 +0200 Subject: add new virtual function may_move_to to sink inputs/source outputs to allow modules to forbid certain connections --- src/pulsecore/sink-input.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/pulsecore/sink-input.h') diff --git a/src/pulsecore/sink-input.h b/src/pulsecore/sink-input.h index ed95fe4b..97668c52 100644 --- a/src/pulsecore/sink-input.h +++ b/src/pulsecore/sink-input.h @@ -156,10 +156,15 @@ struct pa_sink_input { returns */ pa_usec_t (*get_latency) (pa_sink_input *i); /* may be NULL */ - /* If non_NULL this function is called from thread context if the + /* If non-NULL this function is called from thread context if the * state changes. The old state is found in thread_info.state. */ void (*state_change) (pa_sink_input *i, pa_sink_input_state_t state); /* may be NULL */ + /* If non-NULL this function is called before this sink input is + * move to a sink and if it returns FALSE the move will not + * be allowed */ + pa_bool_t (*may_move_to) (pa_sink_input *i, pa_sink *s); /* may be NULL */ + struct { pa_sink_input_state_t state; pa_atomic_t drained; @@ -292,6 +297,7 @@ pa_bool_t pa_sink_input_get_mute(pa_sink_input *i); pa_resample_method_t pa_sink_input_get_resample_method(pa_sink_input *i); int pa_sink_input_move_to(pa_sink_input *i, pa_sink *dest); +pa_bool_t pa_sink_input_may_move_to(pa_sink_input *i, pa_sink *dest); pa_sink_input_state_t pa_sink_input_get_state(pa_sink_input *i); -- cgit