X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=recipes-multimedia%2Fwireplumber%2Ffiles%2F30-v4l2-monitor.lua;fp=recipes-multimedia%2Fwireplumber%2Ffiles%2F30-v4l2-monitor.lua;h=3943862354579dc6fa444076b2b82fc363010fbf;hb=ed344ae0d62b25f73c8816a2c8fb6e8168424425;hp=0000000000000000000000000000000000000000;hpb=d5c1fb29dc1ae6f5d0dd6ddba1657a1feb1b9f62;p=AGL%2Fmeta-agl-demo.git diff --git a/recipes-multimedia/wireplumber/files/30-v4l2-monitor.lua b/recipes-multimedia/wireplumber/files/30-v4l2-monitor.lua new file mode 100644 index 000000000..394386235 --- /dev/null +++ b/recipes-multimedia/wireplumber/files/30-v4l2-monitor.lua @@ -0,0 +1,59 @@ +-- V4L2 monitor config file; with selecting by default USB camera -- + +v4l2_monitor = {} +v4l2_monitor.properties = {} + +v4l2_monitor.rules = { + -- An array of matches/actions to evaluate. + { + -- Rules for matching a device or node. It is an array of + -- properties that all need to match the regexp. If any of the + -- matches work, the actions are executed for the object. + matches = { + { + -- This matches all cards. + { "device.name", "matches", "v4l2_device.*" }, + }, + }, + -- Apply properties on the matched object. + apply_properties = { + -- ["device.nick"] = "My Device", + }, + }, + { + matches = { + { + -- Matches all sources. + { "node.name", "matches", "v4l2_input.*" }, + }, + { + -- Matches all sinks. + { "node.name", "matches", "v4l2_output.*" }, + }, + }, + apply_properties = { + --["node.nick"] = "My Node", + --["priority.driver"] = 100, + --["priority.session"] = 100, + --["node.pause-on-idle"] = false, + }, + }, + { + matches = { + { + { "node.name", "matches", "v4l2_input*usb*" }, + }, + }, + apply_properties = { + ["priority.driver"] = 1300, + ["priority.session"] = 1300, + }, + }, +} + +function v4l2_monitor.enable() + load_monitor("v4l2", { + properties = v4l2_monitor.properties, + rules = v4l2_monitor.rules, + }) +end