Wp.SpaDevice¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
Properties of the device |
||
r/w/co |
The spa device handle |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Fields¶
- Inherited:
Class Details¶
- class Wp.SpaDevice(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A
Wp.SpaDevice
allows running a spa_device object locally, loading the implementation from a SPA factory. This is useful to run device monitors inside the session manager and have control over creating the actual nodes that the spa_device requests to create. To enable the spa device, callWp.Object.activate
() requestingWp.SpaDeviceFeatures.ENABLED
. For actual devices (not device monitors) it also possible and desirable to export the device to PipeWire, which can be done by requestingWp.ProxyFeatures.PROXY_FEATURE_BOUND
fromWp.Object.activate
(). When exporting, the export should be done before enabling the device, by requesting both features at the same time.- classmethod new_from_spa_factory(core, factory_name, properties)¶
- Parameters:
core (
Wp.Core
) – the wireplumber corefactory_name (
str
) – the name of the SPA factoryproperties (
Wp.Properties
orNone
) – properties to be passed to device constructor
- Returns:
A new
Wp.SpaDevice
wrapping the device that was constructed by the factory, orNone
if the factory does not exist or was unable to construct the device- Return type:
Wp.SpaDevice
orNone
Constructs a SPA_TYPE_INTERFACE_Device by loading the given SPA factory_name.
To export this device to the PipeWire server, you need to call
Wp.Object.activate
() requestingWp.ProxyFeatures.PROXY_FEATURE_BOUND
and wait for the operation to complete.
- classmethod new_wrap(core, spa_device_handle, properties)¶
- Parameters:
core (
Wp.Core
) – the wireplumber coreproperties (
Wp.Properties
orNone
) – additional properties of the device
- Returns:
A new
Wp.SpaDevice
- Return type:
Constructs an SPA Device object from an existing device handle.
- get_managed_object(id)¶
- Parameters:
id (
int
) – the (device-internal) id of the object to get- Returns:
the managed object associated with id
- Return type:
Gets one of the objects managed by this device.
- get_properties()¶
- Returns:
the device properties
- Return type:
Gets the properties of this device.
- new_managed_object_iterator()¶
- Returns:
a
Wp.Iterator
that iterates over all the objects managed by this device- Return type:
Iterates through all the objects managed by this device.
New in version 0.4.11.
- set_managed_pending(id)¶
- Parameters:
id (
int
) – the (device-internal) id of the object
Marks a managed object id pending.
When an object id is pending, Props from received ObjectConfig events for the id are saved. When
Wp.SpaDevice.store_managed_object
later sets an object for the id, the saved Props are immediately set on the object and pending status is cleared. If an object is already set for the id, this has no effect.
- store_managed_object(id, object)¶
- Parameters:
id (
int
) – the (device-internal) id of the objectobject (
GObject.Object
orNone
) – the object to store orNone
to remove the managed object associated with id
Stores or removes a managed object into/from a device.
Signal Details¶
- Wp.SpaDevice.signals.create_object(spa_device, object, p0, p1, p2)¶
- Signal Name:
create-object
- Flags:
- Parameters:
spa_device (
Wp.SpaDevice
) – The object which received the signalobject (
int
) –p0 (
str
) –p1 (
str
) –p2 (
Wp.Properties
) –
- Wp.SpaDevice.signals.object_removed(spa_device, object)¶
- Signal Name:
object-removed
- Flags:
- Parameters:
spa_device (
Wp.SpaDevice
) – The object which received the signalobject (
int
) –
Property Details¶
- Wp.SpaDevice.props.properties¶
- Name:
properties
- Type:
- Default Value:
- Flags:
Properties of the device