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.SpaDeviceallows 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_BOUNDfromWp.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.PropertiesorNone) – properties to be passed to device constructor
- Returns:
A new
Wp.SpaDevicewrapping the device that was constructed by the factory, orNoneif the factory does not exist or was unable to construct the device- Return type:
Wp.SpaDeviceorNone
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_BOUNDand wait for the operation to complete.
- classmethod new_wrap(core, spa_device_handle, properties)¶
- Parameters:
core (
Wp.Core) – the wireplumber coreproperties (
Wp.PropertiesorNone) – 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.Iteratorthat 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_objectlater 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.ObjectorNone) – the object to store orNoneto 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