mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2025-12-25 04:20:09 +01:00
This is a new rules section that allows defining rules to modify component definitions. This is useful to add repetitive dependencies, for example, as in the case of "type = script/lua" that always requires the "support.lua-scripting" feature. This can also be useful to modify other component properties, such as the arguments, in overriding configuration files, without needing to redefine the whole components section.
109 lines
1.7 KiB
Text
109 lines
1.7 KiB
Text
context.modules = [
|
|
{ name = libpipewire-module-protocol-native }
|
|
]
|
|
|
|
wireplumber.profiles = {
|
|
test = {
|
|
virtual.four = required
|
|
}
|
|
}
|
|
|
|
wireplumber.components = [
|
|
# expected load order:
|
|
# five, one, six, two, three, four, seven
|
|
# eight is not loaded - optional feature
|
|
{
|
|
name = one
|
|
type = test
|
|
provides = support.one
|
|
}
|
|
{
|
|
name = two
|
|
type = test
|
|
provides = support.two
|
|
requires = [ support.one ]
|
|
}
|
|
{
|
|
type = virtual
|
|
provides = virtual.four
|
|
requires = [ INVALID ]
|
|
}
|
|
{
|
|
name = three
|
|
type = test
|
|
provides = INVALID
|
|
wants = [ support.two ]
|
|
}
|
|
{
|
|
name = four
|
|
type = test
|
|
provides = support.four
|
|
requires = [ support.five ]
|
|
wants = [ support.three ]
|
|
}
|
|
{
|
|
name = five
|
|
type = test
|
|
provides = support.five
|
|
}
|
|
{
|
|
name = six
|
|
type = test
|
|
provides = support.six
|
|
requires = [ support.one ]
|
|
}
|
|
{
|
|
name = seven
|
|
type = test
|
|
requires = [ support.five ]
|
|
}
|
|
{
|
|
name = eight
|
|
type = test
|
|
provides = support.eight
|
|
requires = [ support.four ]
|
|
}
|
|
]
|
|
|
|
wireplumber.components.rules = [
|
|
{
|
|
matches = [
|
|
{
|
|
name = two
|
|
}
|
|
]
|
|
actions = {
|
|
merge = {
|
|
# final array should be [ support.one, support.six ]
|
|
# if this fails, support.six will not be loaded
|
|
requires = [ support.six ]
|
|
}
|
|
}
|
|
}
|
|
|
|
{
|
|
matches = [
|
|
{
|
|
name = three
|
|
}
|
|
]
|
|
actions = {
|
|
merge = {
|
|
provides = support.three
|
|
}
|
|
}
|
|
}
|
|
|
|
{
|
|
matches = [
|
|
{
|
|
provides = virtual.four
|
|
}
|
|
]
|
|
actions = {
|
|
override = {
|
|
requires = [ support.four ]
|
|
}
|
|
}
|
|
}
|
|
]
|