libpipew...ent-node(7)

✨ libpipew...ent-node ✨ (Miscellaneous Information Manual)

okay bestie sit DOWN because this one is literally about letting your client flex its own processing nodes into the PipeWire daemon πŸ’… it's from the Miscellaneous Information Manual section, and no cap, it's kind of a banger if you're into that low-level audio graph life. let's go πŸ¦‹


🌸 NAME 🌸

libpipewire-module-client-node β€” Client Node πŸ‘‘


πŸ’– DESCRIPTION πŸ’–

Short version: this module lets clients export processing nodes to the PipeWire daemon. periodt.

It creates 2 export types, one for the PW_TYPE_INTERFACE_Node interface and another for the SPA_TYPE_INTERFACE_Node interface. two for the price of one, iconic.

With pw_core_export(), objects of these types can be exported to the PipeWire server. And the way that everything you do on the node locally shows up for connected clients… yeah, all actions performed on the node locally will be visible to connected clients, and scheduling of the Node will be performed. fr fr.

Objects of the PW_TYPE_INTERFACE_Node interface can be made with pw_context_create_node(), for example. You would manually need to create and add an object of the SPA_TYPE_INTERFACE_Node interface, though β€” no shortcut there. And heads up: exporting a SPA_TYPE_INTERFACE_Node directly will first wrap it in a PW_TYPE_INTERFACE_Node interface. it's giving ✨wrapped✨

Usually this module is not used directly but through the Stream and Filter APIs, which provides API to implement the SPA_TYPE_INTERFACE_Node interface. so like… you're normally vibing with the higher-level stuff, not raw-dogging this module. πŸ™ˆ

In some cases, it is possible to use this factory directly (the PipeWire JACK implementation does this, main character behavior honestly). With pw_core_create_object() on the client-node factory will result in a PW_TYPE_INTERFACE_ClientNode proxy that can be used to control the server side created Node Impl. πŸ”₯

Schematically, the client side Node Impl is wrapped in the ClientNode proxy and unwrapped by the server side resource so that all actions on the client side node are reflected on the server side node and server side actions are reflected in the client. two-way street, mutuals only πŸ’ž

  client side proxy                            server side resource
.------------------------------.            .----------------------------------.
| PW_TYPE_INTERFACE_ClientNode |            |  PW_TYPE_INTERFACE_Node          |
|.----------------------------.|  IPC       |.--------------------------------.|
|| PW_TYPE_INTERFACE_Node     || ----->     || SPA_TYPE_INTERFACE_Node        ||
||.--------------------------.||            ||.------------------------------.||
||| SPA_TYPE_INTERFACE_Node  |||            ||| PW_TYPE_INTERFACE_ClientNode |||
|||                          |||            |||                              |||
||'--------------------------'||            ||'------------------------------'||
|'----------------------------'|            |'--------------------------------'|

πŸŽ€ MODULE NAME πŸŽ€

libpipewire-module-client-node


🌈 MODULE OPTIONS 🌈

This module has no options. zero. none. a clean slate bestie 🧼✨ (lowkey refreshing ngl)


πŸ’œ PROPERTIES FOR THE CREATE_OBJECT CALL πŸ’œ

All properties are passed directly to the pw_context_create_node() call. no filtering, no secret sauce, straight through 🫢


πŸ“ EXAMPLE CONFIGURATION πŸ“

The module is usually added to the config file of the main PipeWire daemon and the clients. both of them! it's a whole family thing πŸ‘‘

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

πŸ¦‹ SEE ALSO πŸ¦‹

  • module-spa-node-factory: make nodes from a factory πŸ”§

lowkey a warning but really just a reminder: this module is usually not used directly β€” the Stream and Filter APIs are your besties here πŸ’–

so yeah, that's the whole page. that's the tea β˜• stay slay, go export some nodes, and remember: everything on the client is reflected on the server and vice versa. mutual. periodt. πŸ’…


this lil manual page came to you courtesy of PipeWire 1.6.11 β€” yeah the version is in the footer and yes I'm putting it in the sign-off like a true girlboss πŸŽ€ tysm for reading, mwah πŸ’‹

πŸ“¦ where this page comes from