mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2025-12-20 08:50:04 +01:00
get-filter-from-target: Don't bypass the hook if the session item is a regular filter
Regular filters should be treated as regular stream / device nodes. Note that the filter utils API is meant to be used using the direction of the main smart filter nodes. This is why we use the target direction instead of the actual stream direction to check if the stream session item is smart or not.
This commit is contained in:
parent
fa67121665
commit
4868b3c336
1 changed files with 4 additions and 4 deletions
|
|
@ -28,11 +28,13 @@ SimpleEventHook {
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
-- bypass the hook if the session item is a filter
|
-- bypass the hook if the session item is a smart filter
|
||||||
local node = si:get_associated_proxy ("node")
|
local node = si:get_associated_proxy ("node")
|
||||||
local node_props = node.properties
|
local node_props = node.properties
|
||||||
local link_group = node_props ["node.link-group"]
|
local link_group = node_props ["node.link-group"]
|
||||||
if link_group ~= nil then
|
local target_direction = cutils.getTargetDirection (si.properties)
|
||||||
|
if link_group ~= nil and
|
||||||
|
futils.is_filter_smart (target_direction, link_group) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -40,7 +42,6 @@ SimpleEventHook {
|
||||||
local target_node = target:get_associated_proxy ("node")
|
local target_node = target:get_associated_proxy ("node")
|
||||||
local target_node_props = target_node.properties
|
local target_node_props = target_node.properties
|
||||||
local target_link_group = target_node_props ["node.link-group"]
|
local target_link_group = target_node_props ["node.link-group"]
|
||||||
local target_direction = cutils.getTargetDirection (si.properties)
|
|
||||||
if target_link_group ~= nil and si_flags.has_defined_target then
|
if target_link_group ~= nil and si_flags.has_defined_target then
|
||||||
if futils.is_filter_smart (target_direction, target_link_group) and
|
if futils.is_filter_smart (target_direction, target_link_group) and
|
||||||
not futils.is_filter_disabled (target_direction, target_link_group) and
|
not futils.is_filter_disabled (target_direction, target_link_group) and
|
||||||
|
|
@ -51,7 +52,6 @@ SimpleEventHook {
|
||||||
|
|
||||||
-- Get the filter from the given target if it exists, otherwise get the
|
-- Get the filter from the given target if it exists, otherwise get the
|
||||||
-- default filter, but only if target was not defined
|
-- default filter, but only if target was not defined
|
||||||
local target_direction = cutils.getTargetDirection (si.properties)
|
|
||||||
local media_type = si_props["media.type"]
|
local media_type = si_props["media.type"]
|
||||||
local filter_target = futils.get_filter_from_target (target_direction, media_type, target)
|
local filter_target = futils.get_filter_from_target (target_direction, media_type, target)
|
||||||
if filter_target ~= nil then
|
if filter_target ~= nil then
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue