source-output: add a new API pa_source_output_set_preferred_source
authorHui Wang <hui.wang@canonical.com>
Sat, 7 Dec 2019 02:13:28 +0000 (10:13 +0800)
committerTanu Kaskinen <tanuk@iki.fi>
Sat, 14 Dec 2019 18:40:19 +0000 (18:40 +0000)
commite529db75ec9406fb1e52ba60f025e92c0595398c
tree3b883bd33253ddcc1cb21480fb406138c57d7f3e
parent5eec504d68345934a01f70cd1d2186e4d8b0db31
source-output: add a new API pa_source_output_set_preferred_source

If the source here is NULL, that means users want to clear the
preferred_source and move the source-output to the default_source,
otherwise set the preferred_source to the source->name and move the
source-output to the source. After that fire the source_output_change
event.

After adding this API, we can use this API to simplify the entry_apply
in the module-stream-restore.c.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
src/modules/module-stream-restore.c
src/pulsecore/source-output.c
src/pulsecore/source-output.h