.TH "libpipewire-module-link-factory" 7 "1.6.3" "PipeWire" \" -*- nroff -*- .ad l .nh .SH NAME libpipewire-module-link-factory \- Link Factory .SH DESCRIPTION .PP Allows clients to create links between ports\&. .PP This module creates a new factory\&. Clients that can see the factory can use the factory name (\fRlink-factory\fP) to create new link objects with \fBpw_core_create_object()\fP\&. It is also possible to create objects in the config file\&. .PP Object of the \fBPW_TYPE_INTERFACE_Link\fP will be created and a proxy to it will be returned\&. .PP As an argument to the create_object call, a set of properties will control what ports will be linked\&. .PP .SH "MODULE NAME" .PP .PP \fRlibpipewire-module-link-factory\fP .PP .SH "MODULE OPTIONS" .PP .PP .IP "\(bu" 2 \fRallow\&.link\&.passive\fP: if the \fRlink\&.passive\fP property is allowed\&. Default false\&. By default, the core will decide when a link is passive based on the properties of the node and ports\&. .PP .PP .SH "PROPERTIES FOR THE CREATE_OBJECT CALL" .PP .PP .IP "\(bu" 2 \fRlink\&.output\&.node\fP: The output node to use\&. This can be the node object\&.id, node\&.name, node\&.nick, node\&.description or object\&.path of a node\&. When the property is not given or NULL, the output port should be specified\&. .IP "\(bu" 2 \fRlink\&.output\&.port\fP: The output port to link\&. This can be a port object\&.id, port\&.name, port\&.alias or object\&.path\&. If an output node is specified, the port must belong to the node\&. Finding a port in a node using the port\&.id is deprecated and may lead to unexpected results when the port\&.id also matches an object\&.id\&. If no output port is given, an output node must be specified and a random (unlinked) port will be used from the node\&. .IP "\(bu" 2 \fRlink\&.input\&.node\fP: The input node to use\&. This can be the node object\&.id, node\&.name, node\&.nick, node\&.description or object\&.path of a node\&. When the property is not given or NULL, the input port should be specified\&. .IP "\(bu" 2 \fRlink\&.input\&.port\fP: The input port to link\&. This can be a port object\&.id, port\&.name, port\&.alias or object\&.path\&. If an input node is specified, the port must belong to the node\&. Finding a port in a node using the port\&.id is deprecated and may lead to unexpected results when the port\&.id also matches an object\&.id\&. If no input port is given, an input node must be specified and a random (unlinked) port will be used from the node\&. .IP "\(bu" 2 \fRobject\&.linger\fP: Keep the link around even when the client that created it is gone\&. .IP "\(bu" 2 \fRlink\&.passive\fP: 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\&. .PP .PP .SH "EXAMPLE CONFIGURATION" .PP .PP The module is usually added to the config file of the main pipewire daemon\&. .PP .PP .nf context\&.modules = [ { name = libpipewire\-link\-factory args = { #allow\&.link\&.passive = false } } ] .fi .PP .PP .SH "CONFIG OVERRIDE" .PP .PP A \fRmodule\&.link-factory\&.args\fP config section can be added to override the module arguments\&. .PP .PP .nf # ~/\&.config/pipewire/pipewire\&.conf\&.d/my\-link\-factory\-args\&.conf module\&.link\-factory\&.args = { #allow\&.link\&.passive = false } .fi .PP .PP .SH "CONFIG OBJECTS" .PP .PP To create an object from the factory, one can use the \fBpw_core_create_object()\fP method or make an object in the \fRcontext\&.objects\fP section like: .PP .PP .nf 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 } } .fi .PP .PP Note that this only works when the ports that need to be linked are available at the time the config file is parsed\&. .PP .SH "SEE ALSO" .PP .PP .IP "\(bu" 2 \fRpw-link\fP: a tool to manage port links .PP