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.
WpLink
Class structure
Constructors
wp_link_new_from_factory
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_proxy_augment, 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 augment 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
the new link or NULL if the core is not connected and therefore the link cannot be created
Wp.Link.new_from_factory
def Wp.Link.new_from_factory (core, factory_name, properties):
#python wrapper for 'wp_link_new_from_factory'
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.Proxy.augment, requesting at least Wp.ProxyFeatures.BOUND. When this feature is ready, the link is ready for use on the server. If the link 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 link
properties
(
Wp.Properties
)
–
the properties to pass to the factory
Wp.Link.prototype.new_from_factory
function Wp.Link.prototype.new_from_factory(core: Wp.Core, factory_name: String, properties: Wp.Properties): {
// javascript wrapper for 'wp_link_new_from_factory'
}
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.Proxy.prototype.augment, requesting at least Wp.ProxyFeatures.BOUND. When this feature is ready, the link is ready for use on the server. If the link 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 link
properties
(
Wp.Properties
)
–
the properties to pass to the factory
Methods
wp_link_get_linked_object_ids
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
Note: Using this method requires WP_PROXY_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
Wp.Link.get_linked_object_ids
def Wp.Link.get_linked_object_ids (self):
#python wrapper for 'wp_link_get_linked_object_ids'
Retrieves the ids of the objects that are linked by this link
Note: Using this method requires Wp.ProxyFeatures.INFO
Parameters:
self
(
Wp.Link
)
–
the link
Wp.Link.prototype.get_linked_object_ids
function Wp.Link.prototype.get_linked_object_ids(): {
// javascript wrapper for 'wp_link_get_linked_object_ids'
}
Retrieves the ids of the objects that are linked by this link
Note: Using this method requires Wp.ProxyFeatures.INFO
Parameters:
self
(
Wp.Link
)
–
the link
Constants
The results of the search are