]> code.delx.au - pulseaudio/commit
filters: Handle stream moves properly
authorArun Raghavan <arun.raghavan@collabora.co.uk>
Thu, 21 Apr 2011 07:22:27 +0000 (12:52 +0530)
committerColin Guthrie <colin@mageia.org>
Sat, 23 Apr 2011 17:23:38 +0000 (18:23 +0100)
commitceca42f706c7d193cbda4e201d84f62790f0a465
tree9ff7c94a553856214bd8edde50854d321c79ba98
parent42b378b13028751cbdd607cb6b7c840b9fb28876
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.
src/modules/module-filter-apply.c
src/modules/module-filter-heuristics.c
src/pulse/proplist.h