s/link-target: do not treat links to monitoring streams as role links

There are 2 cases captured here:

1. The stream has "stream.monitor = true", which is used
by pavucontrol for the vu meters and should probably not be managed
by the role policy, no matter if the target is a Source or a Sink

2. The stream is an Input (capture) stream and is targeting a Sink,
which may be used to target the sink's monitor ports. Even if we
want, we can't manage these links because they have opposite direction
than the one expected. Let's leave them alone...
This commit is contained in:
George Kiagiadakis 2024-06-25 19:58:21 +03:00
parent fd4607b4f5
commit ebe158d8cb

View file

@ -63,7 +63,12 @@ AsyncEventHook {
out_item = target
end
-- role links are those that link to targets with intended-roles
-- unless the stream is a monitor (usually pavucontrol) or the stream
-- is linking to the monitor ports of a sink (both are "input")
local is_media_role_link = target_props["device.intended-roles"] ~= nil
and not cutils.parseBool (si_props ["stream.monitor"])
and si_props["item.node.direction"] ~= target_props["item.node.direction"]
log:info (si,
string.format ("link %s <-> %s passthrough:%s, exclusive:%s, media role link:%s",