LIBPIPEWIRE-MODULE-METADATA(7)

πŸŽ€ libpipew...-metadata(7) β€” Miscellaneous Information Manual πŸŽ€

okay bestie, sit down, we're doing metadata today πŸ’… this is the page for libpipewire-module-metadata, straight outta the Miscellaneous Information Manual, and it's genuinely not that deep, I promise. iykyk.


✨ NAME ✨

libpipewire-module-metadata β€” Metadata. literally what it says on the tin πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

so basically? this module lets clients export a metadata store to the PipeWire server. that's the whole vibe. 🫢

the way that BOTH the client AND the server need to load this module for the metadata to actually get exported. like, both of you. no skipping. πŸ’–

this module creates a new factory and a new export type for the PW_TYPE_INTERFACE_Metadata interface. iconic behavior honestly.

a client will first create an implementation of the PW_TYPE_INTERFACE_Metadata interface with pw_context_create_metadata(), for example. then, with pw_core_export(), this module will create a server side resource to expose that metadata implementation to other clients. and girl β€” modifications done by the client on the local metadata interface will be visible to all PipeWire clients. all of them. the whole group chat. 😭✨

it's also possible to use the factory to create metadata in the current processes using a config file fragment. flexible queen πŸ‘‘

and as an argument to the create_object call, a set of properties will control the name of the metadata and some initial values. we love a configurable moment.


🌸 MODULE NAME 🌸

libpipewire-module-metadata


πŸ’€ MODULE OPTIONS πŸ’€

this module has no options.

...that's it. nothing. zero. not a single flag. she's low maintenance, she's unbothered, she serves πŸ’…


πŸ‘‘ PROPERTIES FOR THE CREATE_OBJECT CALL πŸ‘‘

these are the keys you can pass, bestie:

  • metadata.name β€” the name of the new metadata object. if you don't give it one, the metadata object name will be default. no name? automatic default. generous fr fr.
  • metadata.values β€” a JSON array of objects with initial values for the metadata object. your starter pack, essentially πŸ“

the metadata.values key has the following layout:

metadata.values = [
   { id = <int>  key = <key>  type = <type> value = <object> }
   ....
]

and inside each of those objects:

  • id β€” an optional object id for the metadata, default 0
  • key β€” a string, the metadata key
  • type β€” an optional metadata value type
  • value β€” a JSON item, the metadata value.

🌈 EXAMPLE CONFIGURATION 🌈

the module is usually added to the config file of the main PipeWire daemon and the clients. (again with the both-of-you thing. she's consistent.)

context.modules = [
{ name = libpipewire-module-metadata }
]

πŸ’œ CONFIG OBJECTS πŸ’œ

okay so if you wanna create an object from the factory, you can use the pw_core_create_object() method, or you can make an object in the context.objects section like in the main PipeWire daemon config file. two paths, same destination, main character energy either way ✨

context.objects = [
{ factory = metadata
    args = {
        metadata.name = default
        metadata.values = [
           { key = default.audio.sink   value = { name = somesink } }
           { key = default.audio.source value = { name = somesource } }
        ]
    }
}

this creates a new default metadata store with 2 key/values. two!! look at her go πŸ₯Ή


πŸ”₯ SEE ALSO πŸ”₯

  • pw-metadata: a tool to manage metadata

okay that's the whole page, you ate it, you understood it, periodt πŸ’…βœ¨

this was libpipewire-module-metadata(7) from PipeWire 1.6.11 β€” go forth and export your metadata, bestie, you got this πŸ«ΆπŸŽ€πŸ¦‹

πŸ“¦ where this page comes from