wireplumber/src/config/main.lua.d/40-stream-defaults.lua
George Kiagiadakis 5028737032 restore-stream: add rules matching to allow overriding things per stream
You can now override:
* Whether to store/restore properties like volume
* Whether to store/restore the target.node
* Things like media.name/application.name/etc which affect which
  entry is going to be used in the state file

Related to #169
2022-02-03 12:07:00 +02:00

32 lines
753 B
Lua

stream_defaults = {}
stream_defaults.properties = {
-- whether to restore the last stream properties or not
["restore-props"] = true,
-- whether to restore the last stream target or not
["restore-target"] = true,
}
stream_defaults.rules = {
-- Rules to override settings per node
-- {
-- matches = {
-- {
-- { "application.name", "matches", "pw-play" },
-- },
-- },
-- apply_properties = {
-- ["state.restore-props"] = false,
-- ["state.restore-target"] = false,
-- },
-- },
}
function stream_defaults.enable()
-- Save and restore stream-specific properties
load_script("restore-stream.lua", {
properties = stream_defaults.properties,
rules = stream_defaults.rules,
})
end