Wp.Device

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.Device Wp.Device Wp.GlobalProxy Wp.GlobalProxy Wp.GlobalProxy->Wp.Device Wp.Proxy Wp.Proxy Wp.Object->Wp.Proxy Wp.PipewireObject->Wp.Device 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)

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)

Signals

Inherited:

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

Fields

Inherited:

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

Class Details

class Wp.Device(**kwargs)
Bases:

Wp.GlobalProxy, Wp.PipewireObject

Abstract:

No

Structure:

Wp.DeviceClass

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

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 device

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

Returns:

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

Return type:

Wp.Device or None

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