mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-05-05 22:58:02 +02:00
event-hooks: remove the unwanted second arg in simple hooks
This commit is contained in:
parent
695b99f0e8
commit
82a8bc5673
5 changed files with 12 additions and 12 deletions
|
|
@ -161,7 +161,7 @@ SimpleEventHook {
|
|||
Constraint { "wireplumber.is-endpoint", "-", type = "pw" },
|
||||
},
|
||||
},
|
||||
execute = function (_, event)
|
||||
execute = function (event)
|
||||
local node = event:get_subject ()
|
||||
local id = node ["bound-id"]
|
||||
if items [id] then
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ SimpleEventHook {
|
|||
Constraint { "event.subject.type", "=", "device" },
|
||||
},
|
||||
},
|
||||
execute = function (event, transition)
|
||||
execute = function (event)
|
||||
handleProfiles (event:get_subject (), true)
|
||||
end
|
||||
}:register ()
|
||||
|
|
@ -181,7 +181,7 @@ SimpleEventHook {
|
|||
Constraint { "event.subject.type", "=", "device" },
|
||||
},
|
||||
},
|
||||
execute = function (event, transition)
|
||||
execute = function (event)
|
||||
local device = event:get_subject ()
|
||||
local props = event:get_properties()
|
||||
local param_name = props ["event.subject.param-id"]
|
||||
|
|
@ -200,7 +200,7 @@ SimpleEventHook {
|
|||
Constraint { "event.subject.type", "=", "device" },
|
||||
},
|
||||
},
|
||||
execute = function (event, transition)
|
||||
execute = function (event)
|
||||
local device = event:get_subject ()
|
||||
local dev_id = device ["bound-id"]
|
||||
self.active_profiles [dev_id] = nil
|
||||
|
|
|
|||
|
|
@ -499,7 +499,7 @@ SimpleEventHook {
|
|||
Constraint { "event.subject.type", "=", "device" },
|
||||
},
|
||||
},
|
||||
execute = function (event, transition)
|
||||
execute = function (event)
|
||||
local new_dev_infos = {}
|
||||
local om = event:get_subject()
|
||||
for device in om:iterate () do
|
||||
|
|
@ -541,7 +541,7 @@ SimpleEventHook {
|
|||
Constraint { "event.subject.type", "=", "device" },
|
||||
},
|
||||
},
|
||||
execute = function (event, transition)
|
||||
execute = function (event)
|
||||
handleDevice (event:get_subject())
|
||||
end
|
||||
}:register()
|
||||
|
|
|
|||
|
|
@ -997,7 +997,7 @@ SimpleEventHook {
|
|||
Constraint { "active-features", "!", 0, type = "gobject" },
|
||||
},
|
||||
},
|
||||
execute = function (event, transition)
|
||||
execute = function (event)
|
||||
local si = event:get_subject()
|
||||
local si_props = si.properties
|
||||
|
||||
|
|
@ -1023,7 +1023,7 @@ SimpleEventHook {
|
|||
Constraint { "active-features", "!", 0, type = "gobject" },
|
||||
},
|
||||
},
|
||||
execute = function (event, transition)
|
||||
execute = function (event)
|
||||
local si = event:get_subject()
|
||||
unhandleLinkable (si)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -408,7 +408,7 @@ if config_restore_target then
|
|||
Constraint { "metadata.name", "=", "default" },
|
||||
},
|
||||
},
|
||||
execute = function (event, transition)
|
||||
execute = function (event)
|
||||
local metadata = event:get_subject()
|
||||
|
||||
-- process existing metadata
|
||||
|
|
@ -430,7 +430,7 @@ if config_restore_target then
|
|||
Constraint { "metadata.name", "=", "default" },
|
||||
},
|
||||
},
|
||||
execute = function (event, transition)
|
||||
execute = function (event)
|
||||
local subject = event:get_subject ()
|
||||
local props = event:get_properties ()
|
||||
|
||||
|
|
@ -544,7 +544,7 @@ SimpleEventHook {
|
|||
Constraint { "device.routes", "equals", "0", type = "pw" },
|
||||
},
|
||||
},
|
||||
execute = function (event, transition)
|
||||
execute = function (event)
|
||||
restoreStream (event:get_subject ())
|
||||
end
|
||||
}:register ()
|
||||
|
|
@ -574,7 +574,7 @@ SimpleEventHook {
|
|||
Constraint { "device.routes", "equals", "0", type = "pw" },
|
||||
},
|
||||
},
|
||||
execute = function (event, transition)
|
||||
execute = function (event)
|
||||
saveStream (event:get_subject())
|
||||
end
|
||||
}:register ()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue