• Wp 0.5 »
  • Classes »
  • Wp.Link
  • Wp.Link
    • Methods
    • Virtual Methods
    • Properties
    • Signals
    • Fields
    • Class Details
      • Wp.Link
        • Wp.Link.new_from_factory()
        • Wp.Link.get_linked_object_ids()
        • Wp.Link.get_state()
    • Signal Details
      • Wp.Link.signals.state_changed()
    • Property Details
      • Wp.Link.props.state
  • Wp 0.5 »
  • Classes »
  • Wp.Link
  • Wp.Link
    • Methods
    • Virtual Methods
    • Properties
    • Signals
    • Fields
    • Class Details
      • Wp.Link
        • Wp.Link.new_from_factory()
        • Wp.Link.get_linked_object_ids()
        • Wp.Link.get_state()
    • Signal Details
      • Wp.Link.signals.state_changed()
    • Property Details
      • Wp.Link.props.state

Wp.Link¶

g GObject.GInterface GObject.GInterface Wp.PipewireObject Wp.PipewireObject GObject.GInterface->Wp.PipewireObject GObject.Object GObject.Object Wp.Object Wp.Object GObject.Object->Wp.Object Wp.GlobalProxy Wp.GlobalProxy Wp.Link Wp.Link Wp.GlobalProxy->Wp.Link Wp.Proxy Wp.Proxy Wp.Object->Wp.Proxy Wp.PipewireObject->Wp.Link Wp.Proxy->Wp.GlobalProxy

Subclasses:

None

Methods¶

Inherited:

Wp.GlobalProxy (4), Wp.Proxy (4), Wp.Object (12), GObject.Object (37), Wp.PipewireObject (9)

Structs:

GObject.ObjectClass (5)

class

new_from_factory (core, factory_name, properties)

get_linked_object_ids ()

get_state ()

Virtual Methods¶

Inherited:

Wp.Proxy (4), Wp.Object (4), GObject.Object (7), Wp.PipewireObject (7)

Properties¶

Inherited:

Wp.GlobalProxy (3), Wp.Proxy (2), Wp.Object (4), Wp.PipewireObject (3)

Name

Type

Flags

Short Description

state

Wp.LinkState

r

state

Signals¶

Inherited:

Wp.Proxy (4), GObject.Object (1), Wp.PipewireObject (1)

Name

Short Description

state-changed

Fields¶

Inherited:

Wp.Proxy (4), GObject.Object (1), Wp.PipewireObject (1)

Class Details¶

class Wp.Link(**kwargs)¶
Bases:

Wp.GlobalProxy, Wp.PipewireObject

Abstract:

No

Structure:

Wp.LinkClass

The Wp.Link class allows accessing the properties and methods of a PipeWire link object (struct pw_link). A Wp.Link is constructed internally when a new link appears on the PipeWire registry and it is made available through the Wp.ObjectManager API. Alternatively, a Wp.Link 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.

classmethod new_from_factory(core, factory_name, properties)¶
Parameters:
  • core (Wp.Core) – the wireplumber core

  • factory_name (str) – the pipewire factory name to construct the link

  • properties (Wp.Properties or None) – the properties to pass to the factory

Returns:

the new link or None if the core is not connected and therefore the link cannot be created

Return type:

Wp.Link or None

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.ProxyFeatures.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.

get_linked_object_ids()¶
Returns:

output_node:

the bound id of the output (source) node

output_port:

the bound id of the output (source) port

input_node:

the bound id of the input (sink) node

input_port:

the bound id of the input (sink) port

Return type:

(output_node: int, output_port: int, input_node: int, input_port: int)

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

Requires Wp.ProxyFeatures.PIPEWIRE_OBJECT_FEATURE_INFO

get_state()¶
Returns:

the current state of the link

error:

the error

Return type:

(Wp.LinkState, error: str)

Gets the current state of the link.

New in version 0.4.11.

Signal Details¶

Wp.Link.signals.state_changed(link, object, p0)¶
Signal Name:

state-changed

Flags:

RUN_LAST

Parameters:
  • link (Wp.Link) – The object which received the signal

  • object (Wp.LinkState) –

  • p0 (Wp.LinkState) –

Property Details¶

Wp.Link.props.state¶
Name:

state

Type:

Wp.LinkState

Default Value:

Wp.LinkState.INIT

Flags:

READABLE

state