source: move the streams to the default_source when the source unlink

When a source is unlinked, all streams of this source are moved to
default_source, this action is implemented in the core rather than
modules now.

And after this change, the module-rescue-streams is not needed, but
for backward compatibility, we keep it as a dummy module.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
This commit is contained in:
Hui Wang 2019-12-10 16:26:34 +08:00 committed by Tanu Kaskinen
parent 976a366c9f
commit 5e0d5a8682
12 changed files with 35 additions and 267 deletions

View file

@ -483,7 +483,7 @@ void pa_source_set_reference_volume_direct(pa_source *s, const pa_cvolume *volum
* PA_AVAILABLE_NO, this function is called to move the streams of the old
* default_source or the source with active_port equals PA_AVAILABLE_NO to the
* current default_source conditionally*/
void pa_source_move_streams_to_default_source(pa_core *core, pa_source *old_source);
void pa_source_move_streams_to_default_source(pa_core *core, pa_source *old_source, bool default_source_changed);
#define pa_source_assert_io_context(s) \
pa_assert(pa_thread_mq_get() || !PA_SOURCE_IS_LINKED((s)->state))