filter-apply: Add ability to pass parameters to a filter module 03/125103/2
authorKimJeongYeon <jeongyeon.kim@samsung.com>
Thu, 13 Apr 2017 23:06:36 +0000 (08:06 +0900)
committeryoungseok lee <youngseok7.lee@samsung.com>
Fri, 26 May 2017 05:34:57 +0000 (05:34 +0000)
commit620e42074870b3bc2be19cac85044373cd30ffd6
tree5e80abd2e364da2d261e91827f92a4df11e363b4
parent36ae434cd1c54564d3b98627e46b1d1058717fe7
filter-apply: Add ability to pass parameters to a filter module

Currently passing parameters to a filter loaded by module-filter-apply is
not possible.

To enable passing parameters to a filter this patch uses an additional property
filter.apply.{MODULE_NAME}.parameters. This way, filters like virtual-surround-sink
and ladspa-sink are fully supported. For example:
paplay file.wav --property=filter.apply=ladspa-sink \
                --property=filter.apply.ladspa-sink.parameters="plugin=ladspa \
                  label=ladspa_stereo control=0"

This patch based on:
https://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/?id=caabff2728d9d588664f8a0ea2f8441804c8b91a

Note for tizen:
Proplist 'filter.apply.extra.parameters' and 'filter.apply.extra.group' are removed.
Also, their names are modified as below.
1) 'filter.apply.extra.group' to 'filter.apply.{MODULE_NAME}.group'
2) 'filter.apply.extra.parameters' to 'filter.apply.{MODULE_NAME}.parameters'
For example:
paplay file1.wav --property=filter.apply=ladspa-sink \
                 --property=filter.apply.ladspa-sink.group=group1 \
                 --property=filter.apply.ladspa-sink.parameters="plugin=ladspa1 \
                   label=ladspa_stereo control=0"
paplay file2.wav --property=filter.apply=ladspa-sink \
                 --property=filter.apply.ladspa-sink.group=group2 \
                 --property=filter.apply.ladspa-sink.parameters="plugin=ladspa2 \
                   label=ladspa_stereo control=0"

Signed-off-by: KimJeongYeon <jeongyeon.kim@samsung.com>
Change-Id: Ia1c85aca2be1f7f4328674146e5caa5e78f5e536
src/modules/module-filter-apply.c
src/pulse/proplist.h