WpNode
The WpNode class allows accessing the properties and methods of a
PipeWire node object (struct pw_node
).
A WpNode is constructed internally when a new node appears on the PipeWire registry and it is made available through the WpObjectManager API. Alternatively, a WpNode can also be constructed using wp_node_new_from_factory, which creates a new node object on the remote PipeWire server by calling into a factory.
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 and be used as if it was a WpNode
proxy to a remote object.
WpImplNode
Class structure
Constructors
wp_impl_node_new_from_pw_factory
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_proxy_augment 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
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.ImplNode.new_from_pw_factory
def Wp.ImplNode.new_from_pw_factory (core, factory_name, properties):
#python wrapper for 'wp_impl_node_new_from_pw_factory'
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.Proxy.augment requesting Wp.ProxyFeatures.BOUND and wait for the operation to complete.
Parameters:
core
(
Wp.Core
)
–
the wireplumber core
factory_name
(
str
)
–
the name of the pipewire factory
properties
(
Wp.Properties
)
–
properties to be passed to node constructor
A new Wp.ImplNode wrapping the node that was constructed by the factory, or None if the factory does not exist or was unable to construct the node
Wp.ImplNode.prototype.new_from_pw_factory
function Wp.ImplNode.prototype.new_from_pw_factory(core: Wp.Core, factory_name: String, properties: Wp.Properties): {
// javascript wrapper for 'wp_impl_node_new_from_pw_factory'
}
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.Proxy.prototype.augment requesting Wp.ProxyFeatures.BOUND and wait for the operation to complete.
Parameters:
core
(
Wp.Core
)
–
the wireplumber core
factory_name
(
String
)
–
the name of the pipewire factory
properties
(
Wp.Properties
)
–
properties to be passed to node constructor
A new Wp.ImplNode 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_impl_node_new_wrap
WpImplNode * wp_impl_node_new_wrap (WpCore * core, pw_impl_node* node)
Parameters:
core
–
the wireplumber core
node
–
an existing pw_impl_node to wrap
A new WpImplNode wrapping node
Wp.ImplNode.new_wrap
def Wp.ImplNode.new_wrap (core, node):
#python wrapper for 'wp_impl_node_new_wrap'
Parameters:
core
(
Wp.Core
)
–
the wireplumber core
node
(
object
)
–
an existing pw_impl_node to wrap
A new Wp.ImplNode wrapping node
Wp.ImplNode.prototype.new_wrap
function Wp.ImplNode.prototype.new_wrap(core: Wp.Core, node: Object): {
// javascript wrapper for 'wp_impl_node_new_wrap'
}
Parameters:
core
(
Wp.Core
)
–
the wireplumber core
node
(
Object
)
–
an existing pw_impl_node to wrap
A new Wp.ImplNode wrapping node
Properties
WpNode
GObject ╰──WpProxy ╰──WpNode ╰──WpImplNode
Members
parent_instance
(WpProxy)
–
Class structure
WpNode
GObject ╰──WpProxy ╰──WpNode ╰──WpImplNode
Members
parent_instance
(WpProxy)
–
WpNode
GObject ╰──WpProxy ╰──WpNode ╰──WpImplNode
Members
parent_instance
(WpProxy)
–
Constructors
wp_node_new_from_factory
WpNode * wp_node_new_from_factory (WpCore * core, const gchar * factory_name, WpProperties * properties)
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_proxy_augment, requesting at least WP_PROXY_FEATURE_BOUND. When this feature is ready, the node is ready for use on the server. If the node cannot be created, this augment operation will fail.
Parameters:
core
–
the wireplumber core
factory_name
–
the pipewire factory name to construct the node
properties
(
[nullable]
[transfer: full]
)
–
the properties to pass to the factory
the new node or NULL if the core is not connected and therefore the node cannot be created
Wp.Node.new_from_factory
def Wp.Node.new_from_factory (core, factory_name, properties):
#python wrapper for 'wp_node_new_from_factory'
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.Proxy.augment, requesting at least Wp.ProxyFeatures.BOUND. When this feature is ready, the node is ready for use on the server. If the node cannot be created, this augment operation will fail.
Parameters:
core
(
Wp.Core
)
–
the wireplumber core
factory_name
(
str
)
–
the pipewire factory name to construct the node
properties
(
Wp.Properties
)
–
the properties to pass to the factory
Wp.Node.prototype.new_from_factory
function Wp.Node.prototype.new_from_factory(core: Wp.Core, factory_name: String, properties: Wp.Properties): {
// javascript wrapper for 'wp_node_new_from_factory'
}
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.Proxy.prototype.augment, requesting at least Wp.ProxyFeatures.BOUND. When this feature is ready, the node is ready for use on the server. If the node cannot be created, this augment operation will fail.
Parameters:
core
(
Wp.Core
)
–
the wireplumber core
factory_name
(
String
)
–
the pipewire factory name to construct the node
properties
(
Wp.Properties
)
–
the properties to pass to the factory
Methods
wp_node_get_n_input_ports
guint wp_node_get_n_input_ports (WpNode * self, guint * max)
Requires WP_PROXY_FEATURE_INFO
Parameters:
self
–
the node
max
(
[out]
[optional]
)
–
the maximum supported number of input ports
the number of input ports of this node, as reported by the node info
Wp.Node.get_n_input_ports
def Wp.Node.get_n_input_ports (self):
#python wrapper for 'wp_node_get_n_input_ports'
Requires Wp.ProxyFeatures.INFO
Parameters:
self
(
Wp.Node
)
–
the node
Returns a tuple made of:
the number of input ports of this node, as reported by the node info
max
(
int
)
–
the number of input ports of this node, as reported by the node info
Wp.Node.prototype.get_n_input_ports
function Wp.Node.prototype.get_n_input_ports(): {
// javascript wrapper for 'wp_node_get_n_input_ports'
}
Requires Wp.ProxyFeatures.INFO
Parameters:
self
(
Wp.Node
)
–
the node
Returns a tuple made of:
the number of input ports of this node, as reported by the node info
max
(
Number
)
–
the number of input ports of this node, as reported by the node info
wp_node_get_n_output_ports
guint wp_node_get_n_output_ports (WpNode * self, guint * max)
Requires WP_PROXY_FEATURE_INFO
Parameters:
self
–
the node
max
(
[out]
[optional]
)
–
the maximum supported number of output ports
the number of output ports of this node, as reported by the node info
Wp.Node.get_n_output_ports
def Wp.Node.get_n_output_ports (self):
#python wrapper for 'wp_node_get_n_output_ports'
Requires Wp.ProxyFeatures.INFO
Parameters:
self
(
Wp.Node
)
–
the node
Returns a tuple made of:
the number of output ports of this node, as reported by the node info
max
(
int
)
–
the number of output ports of this node, as reported by the node info
Wp.Node.prototype.get_n_output_ports
function Wp.Node.prototype.get_n_output_ports(): {
// javascript wrapper for 'wp_node_get_n_output_ports'
}
Requires Wp.ProxyFeatures.INFO
Parameters:
self
(
Wp.Node
)
–
the node
Returns a tuple made of:
the number of output ports of this node, as reported by the node info
max
(
Number
)
–
the number of output ports of this node, as reported by the node info
wp_node_get_n_ports
guint wp_node_get_n_ports (WpNode * self)
Requires WP_NODE_FEATURE_PORTS
Parameters:
self
–
the node
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
Wp.Node.get_n_ports
def Wp.Node.get_n_ports (self):
#python wrapper for 'wp_node_get_n_ports'
Requires Wp.NodeFeatures.PORTS
Parameters:
self
(
Wp.Node
)
–
the node
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
Wp.Node.prototype.get_n_ports
function Wp.Node.prototype.get_n_ports(): {
// javascript wrapper for 'wp_node_get_n_ports'
}
Requires Wp.NodeFeatures.PORTS
Parameters:
self
(
Wp.Node
)
–
the node
the number of ports of this node. Note that this number may not add up to Wp.Node.prototype.get_n_input_ports + Wp.Node.prototype.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
wp_node_get_state
WpNodeState wp_node_get_state (WpNode * self, const gchar ** error)
Parameters:
self
–
error
–
Wp.Node.get_state
def Wp.Node.get_state (self, error):
#python wrapper for 'wp_node_get_state'
Wp.Node.prototype.get_state
function Wp.Node.prototype.get_state(error: String): {
// javascript wrapper for 'wp_node_get_state'
}
wp_node_iterate_ports
WpIterator * wp_node_iterate_ports (WpNode * self)
Requires WP_NODE_FEATURE_PORTS
Parameters:
self
–
the node
a WpIterator that iterates over all the ports that belong to this node
Wp.Node.iterate_ports
def Wp.Node.iterate_ports (self):
#python wrapper for 'wp_node_iterate_ports'
Requires Wp.NodeFeatures.PORTS
Parameters:
self
(
Wp.Node
)
–
the node
a Wp.Iterator that iterates over all the ports that belong to this node
Wp.Node.prototype.iterate_ports
function Wp.Node.prototype.iterate_ports(): {
// javascript wrapper for 'wp_node_iterate_ports'
}
Requires Wp.NodeFeatures.PORTS
Parameters:
self
(
Wp.Node
)
–
the node
a Wp.Iterator that iterates over all the ports that belong to this node
wp_node_iterate_ports_filtered
WpIterator * wp_node_iterate_ports_filtered (WpNode * self, ... ...)
Requires WP_NODE_FEATURE_PORTS
The constraints specified in the variable arguments must follow the rules documented in wp_object_interest_new.
a WpIterator that iterates over all the ports that belong to this node and match the constraints
wp_node_iterate_ports_filtered_full
WpIterator * wp_node_iterate_ports_filtered_full (WpNode * self, WpObjectInterest * interest)
Requires WP_NODE_FEATURE_PORTS
Parameters:
self
–
the node
interest
(
[transfer: full]
)
–
the interest
a WpIterator that iterates over all the ports that belong to this node and match the interest
Wp.Node.iterate_ports_filtered_full
def Wp.Node.iterate_ports_filtered_full (self, interest):
#python wrapper for 'wp_node_iterate_ports_filtered_full'
Requires Wp.NodeFeatures.PORTS
a Wp.Iterator that iterates over all the ports that belong to this node and match the interest
Wp.Node.prototype.iterate_ports_filtered_full
function Wp.Node.prototype.iterate_ports_filtered_full(interest: Wp.ObjectInterest): {
// javascript wrapper for 'wp_node_iterate_ports_filtered_full'
}
Requires Wp.NodeFeatures.PORTS
a Wp.Iterator that iterates over all the ports that belong to this node and match the interest
wp_node_lookup_port
WpPort * wp_node_lookup_port (WpNode * self, ... ...)
Requires WP_NODE_FEATURE_PORTS
The constraints specified in the variable arguments must follow the rules documented in wp_object_interest_new.
the first port that matches the constraints, or NULL if there is no such port
wp_node_lookup_port_full
WpPort * wp_node_lookup_port_full (WpNode * self, WpObjectInterest * interest)
Requires WP_NODE_FEATURE_PORTS
Parameters:
self
–
the node
interest
(
[transfer: full]
)
–
the interest
the first port that matches the interest, or NULL if there is no such port
Wp.Node.lookup_port_full
def Wp.Node.lookup_port_full (self, interest):
#python wrapper for 'wp_node_lookup_port_full'
Requires Wp.NodeFeatures.PORTS
Wp.Node.prototype.lookup_port_full
function Wp.Node.prototype.lookup_port_full(interest: Wp.ObjectInterest): {
// javascript wrapper for 'wp_node_lookup_port_full'
}
Requires Wp.NodeFeatures.PORTS
wp_node_send_command
wp_node_send_command (WpNode * self, WpNodeCommand command)
Sends a command to a node
Parameters:
self
–
the node
command
–
the command
Wp.Node.send_command
def Wp.Node.send_command (self, command):
#python wrapper for 'wp_node_send_command'
Sends a command to a node
Wp.Node.prototype.send_command
function Wp.Node.prototype.send_command(command: Wp.NodeCommand): {
// javascript wrapper for 'wp_node_send_command'
}
Sends a command to a node
Signals
ports-changed
ports_changed_callback (WpNode * self, gpointer user_data)
Emitted when the node's ports change. This is only emitted when WP_NODE_FEATURE_PORTS is enabled.
Parameters:
self
–
the node
user_data
–
Flags: Run Last
ports-changed
def ports_changed_callback (self, *user_data):
#python callback for the 'ports-changed' signal
Emitted when the node's ports change. This is only emitted when Wp.NodeFeatures.PORTS is enabled.
Flags: Run Last
ports-changed
function ports_changed_callback(self: Wp.Node, user_data: Object): {
// javascript callback for the 'ports-changed' signal
}
Emitted when the node's ports change. This is only emitted when Wp.NodeFeatures.PORTS is enabled.
Flags: Run Last
state-changed
state_changed_callback (WpNode * self, WpNodeState * old_state, WpNodeState * new_state, gpointer user_data)
Emitted when the node changes state. This is only emitted when WP_PROXY_FEATURE_INFO is enabled.
Parameters:
self
–
the node
old_state
–
the old state
new_state
–
the new state
user_data
–
Flags: Run Last
state-changed
def state_changed_callback (self, old_state, new_state, *user_data):
#python callback for the 'state-changed' signal
Emitted when the node changes state. This is only emitted when Wp.ProxyFeatures.INFO is enabled.
Parameters:
self
(
Wp.Node
)
–
the node
old_state
(
Wp.NodeState
)
–
the old state
new_state
(
Wp.NodeState
)
–
the new state
user_data
(
variadic
)
–
Flags: Run Last
state-changed
function state_changed_callback(self: Wp.Node, old_state: Wp.NodeState, new_state: Wp.NodeState, user_data: Object): {
// javascript callback for the 'state-changed' signal
}
Emitted when the node changes state. This is only emitted when Wp.ProxyFeatures.INFO is enabled.
Parameters:
self
(
Wp.Node
)
–
the node
old_state
(
Wp.NodeState
)
–
the old state
new_state
(
Wp.NodeState
)
–
the new state
user_data
(
Object
)
–
Flags: Run Last
Enumerations
WpNodeCommand
Members
WP_NODE_COMMAND_SUSPEND
(0)
–
suspends the node, the device might close
WP_NODE_COMMAND_PAUSE
(1)
–
pauses the node, the device will not close
WP_NODE_COMMAND_START
(2)
–
starts procesing data
WP_NODE_COMMAND_ENABLE
(3)
–
enables the node
WP_NODE_COMMAND_DISABLE
(4)
–
disables the node
Wp.NodeCommand
Members
Wp.NodeCommand.SUSPEND
(0)
–
suspends the node, the device might close
Wp.NodeCommand.PAUSE
(1)
–
pauses the node, the device will not close
Wp.NodeCommand.START
(2)
–
starts procesing data
Wp.NodeCommand.ENABLE
(3)
–
enables the node
Wp.NodeCommand.DISABLE
(4)
–
disables the node
Wp.NodeCommand
Members
Wp.NodeCommand.SUSPEND
(0)
–
suspends the node, the device might close
Wp.NodeCommand.PAUSE
(1)
–
pauses the node, the device will not close
Wp.NodeCommand.START
(2)
–
starts procesing data
Wp.NodeCommand.ENABLE
(3)
–
enables the node
Wp.NodeCommand.DISABLE
(4)
–
disables the node
WpNodeFeatures
An extension of WpProxyFeatures
Members
WP_NODE_FEATURE_PORTS
(65536)
–
caches information about ports, enabling the use of wp_node_get_n_ports, wp_node_lookup_port, wp_node_iterate_ports and related methods
Wp.NodeFeatures
An extension of Wp.ProxyFeatures
Members
Wp.NodeFeatures.PORTS
(65536)
–
caches information about ports, enabling the use of Wp.Node.get_n_ports, wp_node_lookup_port (not introspectable), Wp.Node.iterate_ports and related methods
Wp.NodeFeatures
An extension of Wp.ProxyFeatures
Members
Wp.NodeFeatures.PORTS
(65536)
–
caches information about ports, enabling the use of Wp.Node.prototype.get_n_ports, wp_node_lookup_port (not introspectable), Wp.Node.prototype.iterate_ports and related methods
WpNodeState
Members
WP_NODE_STATE_ERROR
(-1)
–
error state
WP_NODE_STATE_CREATING
(0)
–
the node is being created
WP_NODE_STATE_SUSPENDED
(1)
–
the node is suspended, the device might be closed
WP_NODE_STATE_IDLE
(2)
–
the node is running but there is no active port
WP_NODE_STATE_RUNNING
(3)
–
the node is running
Wp.NodeState
Members
Wp.NodeState.ERROR
(-1)
–
error state
Wp.NodeState.CREATING
(0)
–
the node is being created
Wp.NodeState.SUSPENDED
(1)
–
the node is suspended, the device might be closed
Wp.NodeState.IDLE
(2)
–
the node is running but there is no active port
Wp.NodeState.RUNNING
(3)
–
the node is running
Wp.NodeState
Members
Wp.NodeState.ERROR
(-1)
–
error state
Wp.NodeState.CREATING
(0)
–
the node is being created
Wp.NodeState.SUSPENDED
(1)
–
the node is suspended, the device might be closed
Wp.NodeState.IDLE
(2)
–
the node is running but there is no active port
Wp.NodeState.RUNNING
(3)
–
the node is running
Constants
WP_NODE_FEATURES_STANDARD
#define WP_NODE_FEATURES_STANDARD \ (WP_PROXY_FEATURES_STANDARD | \ WP_NODE_FEATURE_PORTS)
A constant set of features that contains the standard features that are available in the WpNode class.
Wp.NODE_FEATURES_STANDARD
A constant set of features that contains the standard features that are available in the Wp.Node class.
Wp.NODE_FEATURES_STANDARD
A constant set of features that contains the standard features that are available in the Wp.Node class.
The results of the search are