LIBPIPEWIRE-MODULE-LINK-FACTORY(7)
π libpipewire-module-link-factory π
okay bestie, welcome to the Link Factory page, straight out of the Miscellaneous Information Manual (the name's libpipewire-module-link-factory, and the manual section is 7, iykyk). sit down, grab a strawberry π, and let's get into it.
β¨ NAME β¨
libpipewire-module-link-factory β Link Factory, but make it iconic π
πΈ DESCRIPTION πΈ
So the whole serve of this module? It lets clients create links between ports. That's it, that's the vibe. π¦
This module creates a new factory. Clients that can see the factory can use the factory name (link-factory) to create brand new link objects with pw_core_create_object(). And plot twist β you can also make objects in the config file. versatile queen π
An object of the PW_TYPE_INTERFACE_Link will be created, and a proxy to it will be returned. cute little proxy handoff π«Ά
And listen: when you pass an argument to the create_object call, a whole set of properties controls what ports will be linked. that's where the magic happens, no cap.
π MODULE NAME π
libpipewire-module-link-factory
(it's giving "the name is literally right there" π)
π MODULE OPTIONS π
allow.link.passiveβ if thelink.passiveproperty is allowed. Default isfalse. By default, the core will decide when a link is passive based on the properties of the node and ports. so the core is the main character here and you're just vibing π
π PROPERTIES FOR THE CREATE_OBJECT CALL π
okay this is the part you actually need, so pay attention bestie, I'm not repeating myself π₯
link.output.nodeβ the output node to use. This can be the nodeobject.id,node.name,node.nick,node.descriptionorobject.pathof a node. When the property is not given orNULL, the output port should be specified. πlink.output.portβ the output port to link. This can be a portobject.id,port.name,port.aliasorobject.path. If an output node is specified, the port must belong to the node. Finding a port in a node using theport.idis deprecated and may lead to unexpected results when theport.idalso matches anobject.id. π© And if no output port is given, an output node must be specified and a random (unlinked) port will be used from the node. surprise port, but make it functional β¨link.input.nodeβ the input node to use. This can be the nodeobject.id,node.name,node.nick,node.descriptionorobject.pathof a node. When the property is not given orNULL, the input port should be specified. πlink.input.portβ the input port to link. This can be a portobject.id,port.name,port.aliasorobject.path. If an input node is specified, the port must belong to the node. Finding a port in a node using theport.idis deprecated and may lead to unexpected results when theport.idalso matches anobject.id. π If no input port is given, an input node must be specified and a random (unlinked) port will be used from the node. her again πobject.lingerβ keep the link around even when the client that created it is gone. she does not leave when the party ends, she is the party πlink.passiveβ the link is passive, meaning that it will not keep nodes busy. By default this property is ignored and the node and port properties are used to determine the passive state of the link. so default = ignored, the node and port props are running the show π«
β EXAMPLE CONFIGURATION β
The module is usually added to the config file of the main pipewire daemon. standard behaviour, no notes π§
context.modules = [
{ name = libpipewire-link-factory
args = {
#allow.link.passive = false
}
}
]
π¦ CONFIG OVERRIDE π¦
A module.link-factory.args config section can be added to override the module arguments. glow up your module args, queen π
# ~/.config/pipewire/pipewire.conf.d/my-link-factory-args.conf
module.link-factory.args = {
#allow.link.passive = false
}
π CONFIG OBJECTS π
To create an object from the factory, you've got options bestie: use the pw_core_create_object() method, or make an object in the context.objects section, like this:
context.objects = [
{ factory = link-factory
args = {
link.output.node = system
link.output.port = capture_2
link.input.node = my-mic
link.input.port = input_FR
}
}
β οΈ Note that this only works when the ports that need to be linked are available at the time the config file is parsed. if they're not there yet? she simply cannot, and it will not work. timing is everything fr fr π
πΈ SEE ALSO πΈ
pw-link: a tool to manage port links (your bestie for wrangling ports, periodt π)
and that's the whole page bestie!! this was written for PipeWire 1.6.11 π β yes, that's the version and the source in the footer, consider it my lil sign-off. go forth and link those ports, you absolute legend πβ¨πΈπ¦
π¦ where this page comes from
- fedora 44: pipewire-libs 1.6.11-1.fc44 Β· MIT AND GPL-2.0-or-later AND BSD-2-Clause AND LGPL-2.0-or-later
- fedora 44: pipewire-libs 1.6.11-1.fc44 Β· MIT AND GPL-2.0-or-later AND BSD-2-Clause AND LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms