Wp.Device¶
- 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)
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Wp.Device(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
The
Wp.Device
class allows accessing the properties and methods of a PipeWire device object (struct pw_device). AWp.Device
is constructed internally when a new device appears on the PipeWire registry and it is made available through theWp.ObjectManager
API. Alternatively, aWp.Device
can also be constructed usingWp.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 corefactory_name (
str
) – the pipewire factory name to construct the deviceproperties (
Wp.Properties
orNone
) – 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:
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 leastWp.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.