[pulseaudio-discuss] Filter handling

Georg Chini georg at chini.tk
Fri Apr 7 09:26:08 UTC 2017


Hello,

the patch "filter-apply, ladspa-sink, virtual-surround-sink: 
filter-apply supports
ladspa-sink and virtual-surround-sink" by JeongYeon caused some discussion
between him, Arun and me on how to handle filters in a more general case.
Here is the result:

1) Generally, we have three different classes of filters:

     a) device based -> all streams that use the master sink/source are 
filtered
     b) stream based -> only a single stream is filtered
     c) stream group based -> groups of streams are filtered

2) For device based filters, all streams that exist on the master sink 
should be moved to
the filter sink when the filter is inserted. The master sink should then 
effectively be hidden
in the sense that any stream that tries to use the master sink will be 
redirected to the filter
sink.

2) The same filter (for example an equalizer sink) might be used in any 
of the classes
described above and there may be multiple instances of the same filter 
(for example
two equalizers for two different groups of streams). This means the 
filter class must
be given as a property when the filter is loaded. If no class is given, 
device based is
assumed.

3) filters loaded from default.pa or manually loaded filters are either 
device based or
stream group based filters. Because they are loaded manually and without 
an initial
stream associated with them they should not be unloaded by module-filter 
apply.

4) When using the filter.apply property we need further properties to 
define the class
of the filter (device/group/stream) and the initial parameters. If it is 
a group based filter,
a group name/number must also be supplied to distinguish between 
multiple instances
of the same filter.

Have we forgotten anything? Any other comments on this approach?

Regards
              Georg




More information about the pulseaudio-discuss mailing list