summaryrefslogtreecommitdiffstats
path: root/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/host.lua.d/30-v4l2-monitor.lua
diff options
context:
space:
mode:
Diffstat (limited to 'meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/host.lua.d/30-v4l2-monitor.lua')
-rw-r--r--meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/host.lua.d/30-v4l2-monitor.lua48
1 files changed, 48 insertions, 0 deletions
diff --git a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/host.lua.d/30-v4l2-monitor.lua b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/host.lua.d/30-v4l2-monitor.lua
new file mode 100644
index 000000000..a4eb58ac8
--- /dev/null
+++ b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/host.lua.d/30-v4l2-monitor.lua
@@ -0,0 +1,48 @@
+-- V4L2 monitor config file --
+
+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,
+ },
+ },
+}
+
+function v4l2_monitor.enable()
+ load_monitor("v4l2", {
+ properties = v4l2_monitor.properties,
+ rules = v4l2_monitor.rules,
+ })
+end