Wp.Node¶
- Subclasses:
None
Methods¶
- Inherited:
Wp.GlobalProxy (4), Wp.Proxy (4), Wp.Object (12), GObject.Object (37), Wp.PipewireObject (9)
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
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 |
---|---|---|---|
r |
max-input-ports |
||
r |
max-output-ports |
||
r |
n-input-ports |
||
r |
n-output-ports |
||
r |
state |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Fields¶
- Inherited:
Class Details¶
- class Wp.Node(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
The
Wp.Node
class allows accessing the properties and methods of a PipeWire node object (struct pw_node). AWp.Node
is constructed internally when a new node appears on the PipeWire registry and it is made available through theWp.ObjectManager
API. Alternatively, aWp.Node
can also be constructed usingWp.Node.new_from_factory
(), which creates a new node 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 corefactory_name (
str
) – the pipewire factory name to construct the nodeproperties (
Wp.Properties
orNone
) – the properties to pass to the factory
- Returns:
the new node or
None
if the core is not connected and therefore the node cannot be created- Return type:
Constructs a node 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 leastWp.ProxyFeatures.PROXY_FEATURE_BOUND
. When this feature is ready, the node is ready for use on the server. If the node cannot be created, this activation operation will fail.
- get_n_input_ports()¶
- Returns:
the number of input ports of this node, as reported by the node info
- max:
the maximum supported number of input ports
- Return type:
Gets the number of input ports of this node.
- get_n_output_ports()¶
- Returns:
the number of output ports of this node, as reported by the node info
- max:
the maximum supported number of output ports
- Return type:
Gets the number of output ports of this node.
- get_n_ports()¶
- Returns:
the number of ports of this node.
- Return type:
Gets the number of ports of this node.
Note that this number may not add up to
Wp.Node.get_n_input_ports
() +Wp.Node.get_n_output_ports
() because it is discovered by looking at the number of available ports in the registry, however ports may appear there with a delay or may not appear at all if this client does not have permission to read them RequiresWp.NodeFeatures.PORTS
- get_state()¶
- Returns:
the current state of the node
- error:
the error
- Return type:
(
Wp.NodeState
, error:str
)
Gets the current state of the node.
- lookup_port_full(interest)¶
- Parameters:
interest (
Wp.ObjectInterest
) – the interest- Returns:
the first port that matches the interest, or
None
if there is no such port- Return type:
Retrieves the first port that matches the interest.
Requires
Wp.NodeFeatures.PORTS
- new_ports_filtered_iterator_full(interest)¶
- Parameters:
interest (
Wp.ObjectInterest
) – the interest- Returns:
a
Wp.Iterator
that iterates overWp.Port
objects- Return type:
Gets a new iterator that iterates over all the ports that belong to this node and match the interest.
Requires
Wp.NodeFeatures.PORTS
- new_ports_iterator()¶
- Returns:
a
Wp.Iterator
that iterates overWp.Port
objects- Return type:
Gets a new iterator that iterates over all the ports that belong to this node.
Requires
Wp.NodeFeatures.PORTS
Signal Details¶
- Wp.Node.signals.ports_changed(node)¶
- Wp.Node.signals.state_changed(node, object, p0)¶
- Signal Name:
state-changed
- Flags:
- Parameters:
node (
Wp.Node
) – The object which received the signalobject (
Wp.NodeState
) –p0 (
Wp.NodeState
) –
Property Details¶
- Wp.Node.props.max_input_ports¶
-
max-input-ports
- Wp.Node.props.max_output_ports¶
-
max-output-ports
- Wp.Node.props.n_input_ports¶
-
n-input-ports
- Wp.Node.props.n_output_ports¶
-
n-output-ports
- Wp.Node.props.state¶
- Name:
state
- Type:
- Default Value:
- Flags:
state