mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-13 13:29:58 -05:00
daemon.conf: Add boolean rescue_streams parameter
Since merge requests https://gitlab.freedesktop.org/pulseaudio/pulseaudio/merge_requests/209 and https://gitlab.freedesktop.org/pulseaudio/pulseaudio/merge_requests/216 the rescuing of streams could no longer be disabled. This patch adds a boolean parameter rescue-streams to daemon.conf which allows to disable rescuing. The parameter defaults to true (rescuing enabled).
This commit is contained in:
parent
97d0eda256
commit
b72f295597
11 changed files with 29 additions and 10 deletions
|
|
@ -213,6 +213,7 @@ struct pa_core {
|
|||
int exit_idle_time, scache_idle_time;
|
||||
|
||||
bool flat_volumes:1;
|
||||
bool rescue_streams:1;
|
||||
bool disallow_module_loading:1;
|
||||
bool disallow_exit:1;
|
||||
bool running_as_daemon:1;
|
||||
|
|
|
|||
|
|
@ -105,9 +105,10 @@ void pa_device_port_set_available(pa_device_port *p, pa_available_t status) {
|
|||
|
||||
sink = pa_device_port_get_sink(p);
|
||||
if (sink && p == sink->active_port) {
|
||||
if (sink->active_port->available == PA_AVAILABLE_NO)
|
||||
pa_sink_move_streams_to_default_sink(p->core, sink, false);
|
||||
else
|
||||
if (sink->active_port->available == PA_AVAILABLE_NO) {
|
||||
if (p->core->rescue_streams)
|
||||
pa_sink_move_streams_to_default_sink(p->core, sink, false);
|
||||
} else
|
||||
pa_core_move_streams_to_newly_available_preferred_sink(p->core, sink);
|
||||
}
|
||||
} else {
|
||||
|
|
@ -115,9 +116,10 @@ void pa_device_port_set_available(pa_device_port *p, pa_available_t status) {
|
|||
|
||||
source = pa_device_port_get_source(p);
|
||||
if (source && p == source->active_port) {
|
||||
if (source->active_port->available == PA_AVAILABLE_NO)
|
||||
pa_source_move_streams_to_default_source(p->core, source, false);
|
||||
else
|
||||
if (source->active_port->available == PA_AVAILABLE_NO) {
|
||||
if (p->core->rescue_streams)
|
||||
pa_source_move_streams_to_default_source(p->core, source, false);
|
||||
} else
|
||||
pa_core_move_streams_to_newly_available_preferred_source(p->core, source);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1980,7 +1980,7 @@ void pa_sink_input_fail_move(pa_sink_input *i) {
|
|||
return;
|
||||
|
||||
/* Can we move the sink input to the default sink? */
|
||||
if (pa_sink_input_may_move_to(i, i->core->default_sink)) {
|
||||
if (i->core->rescue_streams && pa_sink_input_may_move_to(i, i->core->default_sink)) {
|
||||
if (pa_sink_input_finish_move(i, i->core->default_sink, false) >= 0)
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -762,7 +762,7 @@ void pa_sink_unlink(pa_sink* s) {
|
|||
|
||||
pa_core_update_default_sink(s->core);
|
||||
|
||||
if (linked)
|
||||
if (linked && s->core->rescue_streams)
|
||||
pa_sink_move_streams_to_default_sink(s->core, s, false);
|
||||
|
||||
if (s->card)
|
||||
|
|
|
|||
|
|
@ -1607,7 +1607,7 @@ void pa_source_output_fail_move(pa_source_output *o) {
|
|||
return;
|
||||
|
||||
/* Can we move the source output to the default source? */
|
||||
if (pa_source_output_may_move_to(o, o->core->default_source)) {
|
||||
if (o->core->rescue_streams && pa_source_output_may_move_to(o, o->core->default_source)) {
|
||||
if (pa_source_output_finish_move(o, o->core->default_source, false) >= 0)
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -702,7 +702,7 @@ void pa_source_unlink(pa_source *s) {
|
|||
|
||||
pa_core_update_default_source(s->core);
|
||||
|
||||
if (linked)
|
||||
if (linked && s->core->rescue_streams)
|
||||
pa_source_move_streams_to_default_source(s->core, s, false);
|
||||
|
||||
if (s->card)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue