Local Nodes — WirePlumber 0.5.17 documentation

# Local Nodes

struct WpImplNode

  A WpImplNode allows running a node implementation (`struct pw_impl_node`) locally, loading the implementation from factory or wrapping a manually constructed `pw_impl_node`. This object can then be exported to PipeWire by requesting WP_PROXY_FEATURE_BOUND.

  GObject Properties

  Remark

  When the "client-context" component is loaded, which is the case in the default daemon configuration, wp_impl_node_new_from_pw_factory() creates the node in a secondary `pw_context` that runs on its own thread, so that the node is not affected by anything that blocks WirePlumber's main loop, and exports it on that context's connection. The WpImplNode itself stays on the thread that created it: its features, signals and the rest of its API are unchanged. Nodes wrapped with wp_impl_node_new_wrap() belong to whichever context the given `pw_impl_node` was created in, which is the core's own `pw_context` in most cases, and are exported on the core's connection.

  pw-impl-node

    The actual node implementation, `struct pw_impl_node *`

    `gpointer` | `G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY`

WpImplNode *wp_impl_node_new_wrap(WpCore *core, struct pw_impl_node *node)

  Constructs a node object from an existing `pw_impl_node`.

  Parameters:

    - core -- the wireplumber core

    - node -- an existing `pw_impl_node` to wrap

  Returns:

    (transfer full): A new WpImplNode wrapping node

WpImplNode *wp_impl_node_new_from_pw_factory(WpCore *core, const gchar *factory_name, WpProperties *properties)

  Constructs a new node, locally on this process, using the specified factory_name.

  To export this node to the PipeWire server, you need to call wp_object_activate() requesting WP_PROXY_FEATURE_BOUND and wait for the operation to complete.

  Parameters:

    - core -- the wireplumber core

    - factory_name -- the name of the pipewire factory

    - properties -- (nullable) (transfer full): properties to be passed to node constructor

  Returns:

    (nullable) (transfer full): A new WpImplNode wrapping the node that was constructed by the factory, or NULL if the factory does not exist or was unable to construct the node

WP_TYPE_IMPL_NODE (wp_impl_node_get_type ())

  The WpImplNode GType.