summaryrefslogtreecommitdiffstats
path: root/recipes-multimedia/wireplumber/files
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-multimedia/wireplumber/files')
-rw-r--r--recipes-multimedia/wireplumber/files/30-AGL-demo-v4l2.conf22
-rw-r--r--recipes-multimedia/wireplumber/files/30-v4l2-monitor.lua59
2 files changed, 22 insertions, 59 deletions
diff --git a/recipes-multimedia/wireplumber/files/30-AGL-demo-v4l2.conf b/recipes-multimedia/wireplumber/files/30-AGL-demo-v4l2.conf
new file mode 100644
index 000000000..0a2a3b639
--- /dev/null
+++ b/recipes-multimedia/wireplumber/files/30-AGL-demo-v4l2.conf
@@ -0,0 +1,22 @@
+# meta-agl-demo WirePlumber V4L2 monitor configuration
+
+monitor.v4l2.rules = [
+ #
+ # Bump the priority of any USB camera
+ # Higher priority means it gets selected as the default if it's present
+ # This makes camera-gstreamer work out of the box in demos with a USB camera
+ #
+ {
+ matches = [
+ {
+ node.name = "~v4l2_input.*usb.*"
+ }
+ ]
+ actions = {
+ update-props = {
+ priority.driver = 1300
+ priority.session = 1300
+ }
+ }
+ }
+]
diff --git a/recipes-multimedia/wireplumber/files/30-v4l2-monitor.lua b/recipes-multimedia/wireplumber/files/30-v4l2-monitor.lua
deleted file mode 100644
index 394386235..000000000
--- a/recipes-multimedia/wireplumber/files/30-v4l2-monitor.lua
+++ /dev/null
@@ -1,59 +0,0 @@
--- 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