sink-input: Query sink inputs for max_rewind value when setting max_rewind

This patch is in preparation of allowing virtual sinks to specify their own
max_rewind limit.

Currently pa_sink_set_max_rewind_within_thread() simply sets the value of
max_rewind and informs the sink inputs about the new value. Virtual sinks
may however provide their own limit on max_rewind.

This patch allows to query the active sink inputs for the max_rewind value
they support and sets max_rewind to the minimum supported value. This way,
the max_rewind value from the virtual sinks can be communicated to the master
sink.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/120>
This commit is contained in:
Georg Chini 2021-01-01 00:32:52 +01:00 committed by PulseAudio Marge Bot
parent 5c6d91a97c
commit a37fd7eada
3 changed files with 44 additions and 0 deletions

View file

@ -347,6 +347,7 @@ static void reset_callbacks(pa_sink_input *i) {
i->send_event = NULL;
i->volume_changed = NULL;
i->mute_changed = NULL;
i->get_max_rewind_limit = NULL;
}
/* Called from main context */