WirePlumber
0.4.11

The WirePlumber Daemon

  • Installing WirePlumber
  • Running the WirePlumber daemon
  • Configuration
  • Debug Logging

The WirePlumber Library

  • C API Documentation
    • Library Initialization
    • Core
    • WpObject
    • Object Manager
    • Object Interest
    • Iterator
    • Transitions
    • Error Codes
    • Debug Logging
    • PipeWire Proxy
    • PipeWire Object
    • PipeWire Global Object Proxy
    • PipeWire Node
    • PipeWire Port
    • PipeWire Link
    • PipeWire Device
    • PipeWire Client
    • PipeWire Metadata
    • PipeWire Endpoint
    • Spa Device
    • Local Nodes
    • Local Modules
    • Properties Dictionary
    • Spa Type Information
    • Spa Json
    • Spa Pod (Plain Old Data)
    • Plugins
    • Component Loader
    • Session Items
    • Session Items Interfaces
    • Session Items Factory
    • State Storage
  • Lua API Documentation

Resources

  • Contributing to WirePlumber
  • Testing
  • Community Resources
  • Releases
WirePlumber
  • »
  • C API Documentation »
  • PipeWire Link
  • View page source
Previous Next

PipeWire Link

digraph inheritance { rankdir=LR; GObject -> WpObject; WpObject -> WpProxy; WpProxy -> WpGlobalProxy; WpGlobalProxy -> WpLink; GInterface -> WpPipewireObject; WpPipewireObject -> WpLink; }

struct WpLink

The WpLink class allows accessing the properties and methods of a PipeWire link object (struct pw_link).

A WpLink is constructed internally when a new link appears on the PipeWire registry and it is made available through the WpObjectManager API. Alternatively, a WpLink can also be constructed using wp_link_new_from_factory(), which creates a new link object on the remote PipeWire server by calling into a factory.

GObject Properties

state

The current state of the link

WpLinkState

G_PARAM_READABLE

GObject Signals

state-changed

void
state_changed_callback (WpLink * self,
                        WpLinkState * old_state,
                        WpLinkState * new_state,
                        gpointer user_data)

Emitted when the link changes state. This is only emitted when WP_PIPEWIRE_OBJECT_FEATURE_INFO is enabled.

Parameters:

  • old_state - the old state

  • new_state - the new state

Flags: G_SIGNAL_RUN_LAST

enum WpLinkState

The state of the link.

Values:

enumerator WP_LINK_STATE_ERROR = -2

the link is in error

enumerator WP_LINK_STATE_UNLINKED = -1

the link is unlinked

enumerator WP_LINK_STATE_INIT = 0

the link is initialized

enumerator WP_LINK_STATE_NEGOTIATING = 1

the link is negotiating formats

enumerator WP_LINK_STATE_ALLOCATING = 2

the link is allocating buffers

enumerator WP_LINK_STATE_PAUSED = 3

the link is paused

enumerator WP_LINK_STATE_ACTIVE = 4

the link is active

enum WpLinkFeatures

An extension of WpProxyFeatures.

Values:

enumerator WP_LINK_FEATURE_ESTABLISHED = (WP_PROXY_FEATURE_CUSTOM_START << 0)

waits until the state of the link is >= PAUSED

WpLink *wp_link_new_from_factory(WpCore *core, const gchar *factory_name, WpProperties *properties)

Constructs a link on the PipeWire server by asking the remote factory factory_name to create it.

Because of the nature of the PipeWire protocol, this operation completes asynchronously at some point in the future. In order to find out when this is done, you should call wp_object_activate(), requesting at least WP_PROXY_FEATURE_BOUND. When this feature is ready, the link is ready for use on the server. If the link cannot be created, this activation operation will fail.

Parameters
  • core – the wireplumber core

  • factory_name – the pipewire factory name to construct the link

  • properties – (nullable) (transfer full): the properties to pass to the factory

Returns

(nullable) (transfer full): the new link or NULL if the core is not connected and therefore the link cannot be created

void wp_link_get_linked_object_ids(WpLink *self, guint32 *output_node, guint32 *output_port, guint32 *input_node, guint32 *input_port)

Retrieves the ids of the objects that are linked by this link.

Remark

Requires WP_PIPEWIRE_OBJECT_FEATURE_INFO

Parameters
  • self – the link

  • output_node – (out) (optional): the bound id of the output (source) node

  • output_port – (out) (optional): the bound id of the output (source) port

  • input_node – (out) (optional): the bound id of the input (sink) node

  • input_port – (out) (optional): the bound id of the input (sink) port

WpLinkState wp_link_get_state(WpLink *self, const gchar **error)

Gets the current state of the link.

Since

0.4.11

Parameters
  • self – the link

  • error – (out) (optional) (transfer none): the error

Returns

the current state of the link

WP_TYPE_LINK (wp_link_get_type ())

The WpLink GType.

Previous Next

© Copyright 2021, Collabora.

Built with Sphinx using a theme provided by Read the Docs.