mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
filters: Handle stream moves properly
This makes sure that we handle streams moving between sinks properly. To do this, we change the way the filter.* properties are handled a little bit. Firstly, this splits up the "filter.apply" property into two properties - "filter.want" and "filter.apply". "filter.apply" acts as before - it bypasses module-filter-heuristics and directly tells module-filter-apply what filters are to be applied. "filter.want" is used to tell module-filter-heuristics what filters the client wants. The module then decides whether to actually apply the filter or not (for now, this makes sure we don't apply echo-cancellation even if requested on phone sinks (where it is assumed AEC is taken care of or is not required). Next, we also make sure that we track whether the client set "filter.apply" or module-filter-heuristics did - and in the latter case, we recalculate "filter.apply" and then have module-filter-apply apply the filter if required. This introduces some evil in the form of causing the move_finish callback to possibly trigger another move, but we protect for this case (with a property) to be doubly sure of not causing an infinite loop.
This commit is contained in:
parent
42b378b130
commit
ceca42f706
3 changed files with 80 additions and 17 deletions
|
|
@ -62,9 +62,12 @@ PA_C_DECL_BEGIN
|
|||
/** For streams: logic role of this media. One of the strings "video", "music", "game", "event", "phone", "animation", "production", "a11y", "test" */
|
||||
#define PA_PROP_MEDIA_ROLE "media.role"
|
||||
|
||||
/** For streams: the name of a filter that is desired, e.g. "echo-cancel" or "equalizer-sink" \since 1.0 */
|
||||
/** For streams: the name of a filter that is desired, e.g. "echo-cancel" or "equalizer-sink". PulseAudio may choose to not apply the filter if it does not make sense (for example, applying echo-cancellation on a Bluetooth headset probably does not make sense. \since 1.0 */
|
||||
#define PA_PROP_FILTER_WANT "filter.want"
|
||||
|
||||
/** For streams: the name of a filter that is desired, e.g. "echo-cancel" or "equalizer-sink". Differs from PA_PROP_FILTER_WANT in that it forces PulseAudio to apply the filter, regardless of whether PulseAudio thinks it makes sense to do so or not. If this is set, PA_PROP_FILTER_WANT is ignored. In other words, you almost certainly do not want to use this. \since 1.0 */
|
||||
#define PA_PROP_FILTER_APPLY "filter.apply"
|
||||
|
||||
/** For streams: the name of a filter that should specifically suppressed (i.e. overrides PA_PROP_FILTER_WANT). Useful for the times that PA_PROP_FILTER_WANT is automatically added (e.g. echo-cancellation for phone streams when $VOIP_APP does it's own, internal AEC) \since 1.0 */
|
||||
#define PA_PROP_FILTER_SUPPRESS "filter.suppress"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue