filter-utils: Check main filter nodes in a more robust way
This patch makes the check more robust when detecting main filter nodes. This is because some filters might append '/Internal' to their main node media class. The direction check has also been improved to work with Video filters.
This commit is contained in:
@@ -306,14 +306,13 @@ local function rescanFilters (om, metadata_om)
|
|||||||
|
|
||||||
-- Only handle the main filter nodes
|
-- Only handle the main filter nodes
|
||||||
filter.media_class = n.properties ["media.class"]
|
filter.media_class = n.properties ["media.class"]
|
||||||
if filter.media_class ~= "Audio/Sink" and
|
if string.find (filter.media_class, "Stream") then
|
||||||
filter.media_class ~= "Audio/Source" and
|
|
||||||
filter.media_class ~= "Video/Source" then
|
|
||||||
goto skip_linkable
|
goto skip_linkable
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Filter direction
|
-- Filter direction
|
||||||
if filter.media_class == "Audio/Sink" then
|
if string.find (filter.media_class, "Audio/Sink") or
|
||||||
|
string.find (filter.media_class, "Video/Sink") then
|
||||||
filter.direction = "input"
|
filter.direction = "input"
|
||||||
else
|
else
|
||||||
filter.direction = "output"
|
filter.direction = "output"
|
||||||
|
Reference in New Issue
Block a user