mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-12 13:30:10 -05:00
sink-input: change bool save_sink to char *preferred_sink
The finial objective is to store the preferred sink name in the sink-input struct, and use module-stream-restore to save and restore it. This patch just replaces the save_sink with preferred_sink, and tries to keep the original logic. Signed-off-by: Hui Wang <hui.wang@canonical.com>
This commit is contained in:
parent
26a66d103f
commit
fbf8716685
6 changed files with 55 additions and 28 deletions
|
|
@ -119,11 +119,16 @@ struct pa_sink_input {
|
|||
|
||||
bool muted:1;
|
||||
|
||||
/* if true then the sink we are connected to and/or the volume
|
||||
* set is worth remembering, i.e. was explicitly chosen by the
|
||||
* user and not automatically. module-stream-restore looks for
|
||||
/* if true then the volume and the mute state of this sink-input
|
||||
* are worth remembering, module-stream-restore looks for
|
||||
* this.*/
|
||||
bool save_sink:1, save_volume:1, save_muted:1;
|
||||
bool save_volume:1, save_muted:1;
|
||||
|
||||
/* if users move the sink-input to a sink, and the sink is not default_sink,
|
||||
* the sink->name will be saved in preferred_sink. And later if sink-input
|
||||
* is moved to other sinks for some reason, it still can be restored to the
|
||||
* preferred_sink at an appropriate time */
|
||||
char *preferred_sink;
|
||||
|
||||
pa_resample_method_t requested_resample_method, actual_resample_method;
|
||||
|
||||
|
|
@ -315,7 +320,9 @@ typedef struct pa_sink_input_new_data {
|
|||
|
||||
bool volume_writable:1;
|
||||
|
||||
bool save_sink:1, save_volume:1, save_muted:1;
|
||||
bool save_volume:1, save_muted:1;
|
||||
|
||||
char *preferred_sink;
|
||||
} pa_sink_input_new_data;
|
||||
|
||||
pa_sink_input_new_data* pa_sink_input_new_data_init(pa_sink_input_new_data *data);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue