The WpDevice class allows accessing the properties and methods of a PipeWire device object (
A WpDevice is constructed internally when a new device appears on the PipeWire registry and it is made available through the WpObjectManager API. Alternatively, a WpDevice can also be constructed using wp_device_new_from_factory(), which creates a new device object on the remote PipeWire server by calling into a factory.
WpDevice *wp_device_new_from_factory(WpCore *core, const gchar *factory_name, WpProperties *properties)
Constructs a device 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 device is ready for use on the server. If the device cannot be created, this activation operation will fail.
core – the wireplumber core
factory_name – the pipewire factory name to construct the device
properties – (nullable) (transfer full): the properties to pass to the factory
(nullable) (transfer full): the new device or NULL if the core is not connected and therefore the device cannot be created
WP_TYPE_DEVICE (wp_device_get_type ())
The WpDevice GType.