metadata: add support for initial metadata

Add a metadata.values property that is used to fill the metadata store
with initial values.

Fixes #3076
This commit is contained in:
Wim Taymans 2023-04-14 15:07:26 +02:00
parent ccd118368e
commit f318edb699
4 changed files with 85 additions and 2 deletions

View file

@ -152,7 +152,15 @@ context.objects = [
#{ factory = spa-node-factory args = { factory.name = api.vulkan.compute.source node.name = my-compute-source } }
# Make a default metadata store
{ factory = metadata args = { metadata.name = default } }
{ factory = metadata
args = {
metadata.name = default
# metadata.values = [
# { key = default.audio.sink value = { name = somesink } }
# { key = default.audio.source value = { name = somesource } }
# ]
}
}
# A default dummy driver. This handles nodes marked with the "node.always-driver"
# property when no other driver is currently active. JACK clients need this.

View file

@ -263,6 +263,17 @@ context.objects = [
# audio.position = "FL,FR"
# }
#}
# Use the metadata factory to create metadata and some default values.
#{ factory = metadata
# args = {
# metadata.name = my-metadata
# metadata.values = [
# { key = default.audio.sink value = { name = somesink } }
# { key = default.audio.source value = { name = somesource } }
# ]
# }
#}
]
context.exec = [