WpDevice

The WpDevice class allows accessing the properties and methods of a PipeWire device object (struct pw_device).

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.

A WpSpaDevice 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.

WpDevice

GObject
    ╰──WpProxy
        ╰──WpDevice

Class structure

WpDeviceClass

Fields
parent_class (WpProxyClass) –
No description available

Wp.DeviceClass

Attributes
parent_class (Wp.ProxyClass) –
No description available

Wp.DeviceClass

Attributes
parent_class (Wp.ProxyClass) –
No description available

WpDevice

GObject
    ╰──WpProxy
        ╰──WpDevice

WpDevice

GObject
    ╰──WpProxy
        ╰──WpDevice

Constructors

wp_device_new_from_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_proxy_augment, 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 augment operation will fail.

Parameters:

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

Returns ( [nullable] [transfer: full] ) –

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


Wp.Device.new_from_factory

def Wp.Device.new_from_factory (core, factory_name, properties):
    #python wrapper for 'wp_device_new_from_factory'

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.Proxy.augment, requesting at least Wp.ProxyFeatures.BOUND. When this feature is ready, the device is ready for use on the server. If the device cannot be created, this augment operation will fail.

Parameters:

core ( Wp.Core ) –

the wireplumber core

factory_name ( str ) –

the pipewire factory name to construct the device

properties ( Wp.Properties ) –

the properties to pass to the factory

Returns ( Wp.Device ) –

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


Wp.Device.prototype.new_from_factory

function Wp.Device.prototype.new_from_factory(core: Wp.Core, factory_name: String, properties: Wp.Properties): {
    // javascript wrapper for 'wp_device_new_from_factory'
}

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.Proxy.prototype.augment, requesting at least Wp.ProxyFeatures.BOUND. When this feature is ready, the device is ready for use on the server. If the device cannot be created, this augment operation will fail.

Parameters:

core ( Wp.Core ) –

the wireplumber core

factory_name ( String ) –

the pipewire factory name to construct the device

properties ( Wp.Properties ) –

the properties to pass to the factory

Returns ( Wp.Device ) –

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


WpSpaDevice

GObject
    ╰──WpSpaDevice

Class structure

WpSpaDeviceClass

Fields
parent_class (GObjectClass) –
No description available

Wp.SpaDeviceClass

Attributes
parent_class (GObject.ObjectClass) –
No description available

Wp.SpaDeviceClass

Attributes
parent_class (GObject.ObjectClass) –
No description available

WpSpaDevice

GObject
    ╰──WpSpaDevice

WpSpaDevice

GObject
    ╰──WpSpaDevice

Constructors

wp_spa_device_new_from_spa_factory

WpSpaDevice *
wp_spa_device_new_from_spa_factory (WpCore * core,
                                    const gchar * factory_name,
                                    WpProperties * properties)

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_proxy_augment requesting WP_PROXY_FEATURE_BOUND and wait for the operation to complete.

Parameters:

core

the wireplumber core

factory_name

the name of the SPA factory

properties ( [nullable] [transfer: full] ) –

properties to be passed to device constructor

Returns ( [nullable] [transfer: full] ) –

A new WpSpaDevice wrapping the device that was constructed by the factory, or NULL if the factory does not exist or was unable to construct the device


Wp.SpaDevice.new_from_spa_factory

def Wp.SpaDevice.new_from_spa_factory (core, factory_name, properties):
    #python wrapper for 'wp_spa_device_new_from_spa_factory'

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.Proxy.augment requesting Wp.ProxyFeatures.BOUND and wait for the operation to complete.

Parameters:

core ( Wp.Core ) –

the wireplumber core

factory_name ( str ) –

the name of the SPA factory

properties ( Wp.Properties ) –

properties to be passed to device constructor

Returns ( Wp.SpaDevice ) –

A new Wp.SpaDevice wrapping the device that was constructed by the factory, or None if the factory does not exist or was unable to construct the device


Wp.SpaDevice.prototype.new_from_spa_factory

function Wp.SpaDevice.prototype.new_from_spa_factory(core: Wp.Core, factory_name: String, properties: Wp.Properties): {
    // javascript wrapper for 'wp_spa_device_new_from_spa_factory'
}

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.Proxy.prototype.augment requesting Wp.ProxyFeatures.BOUND and wait for the operation to complete.

Parameters:

core ( Wp.Core ) –

the wireplumber core

factory_name ( String ) –

the name of the SPA factory

properties ( Wp.Properties ) –

properties to be passed to device constructor

Returns ( Wp.SpaDevice ) –

A new Wp.SpaDevice wrapping the device that was constructed by the factory, or null if the factory does not exist or was unable to construct the device


wp_spa_device_new_wrap

WpSpaDevice *
wp_spa_device_new_wrap (WpCore * core,
                        gpointer spa_device_handle,
                        WpProperties * properties)

Parameters:

core

the wireplumber core

spa_device_handle

the spa device handle

properties ( [nullable] [transfer: full] ) –

additional properties of the device

Returns ( [transfer: full] ) –

A new WpSpaDevice


Wp.SpaDevice.new_wrap

def Wp.SpaDevice.new_wrap (core, spa_device_handle, properties):
    #python wrapper for 'wp_spa_device_new_wrap'

Parameters:

core ( Wp.Core ) –

the wireplumber core

spa_device_handle ( object ) –

the spa device handle

properties ( Wp.Properties ) –

additional properties of the device

Returns ( Wp.SpaDevice ) –

A new Wp.SpaDevice


Wp.SpaDevice.prototype.new_wrap

function Wp.SpaDevice.prototype.new_wrap(core: Wp.Core, spa_device_handle: Object, properties: Wp.Properties): {
    // javascript wrapper for 'wp_spa_device_new_wrap'
}

Parameters:

core ( Wp.Core ) –

the wireplumber core

spa_device_handle ( Object ) –

the spa device handle

properties ( Wp.Properties ) –

additional properties of the device

Returns ( Wp.SpaDevice ) –

A new Wp.SpaDevice


Methods

wp_spa_device_activate

wp_spa_device_activate (WpSpaDevice * self)

Parameters:

self
No description available

Wp.SpaDevice.activate

def Wp.SpaDevice.activate (self):
    #python wrapper for 'wp_spa_device_activate'

Parameters:

self ( Wp.SpaDevice ) –
No description available

Wp.SpaDevice.prototype.activate

function Wp.SpaDevice.prototype.activate(): {
    // javascript wrapper for 'wp_spa_device_activate'
}

Parameters:

self ( Wp.SpaDevice ) –
No description available

wp_spa_device_export

wp_spa_device_export (WpSpaDevice * self,
                      GCancellable * cancellable,
                      GAsyncReadyCallback callback,
                      gpointer user_data)

Parameters:

self
No description available
cancellable
No description available
callback
No description available
user_data
No description available

Wp.SpaDevice.export

def Wp.SpaDevice.export (self, cancellable, callback, *user_data):
    #python wrapper for 'wp_spa_device_export'

Parameters:

self ( Wp.SpaDevice ) –
No description available
cancellable ( Gio.Cancellable ) –
No description available
callback ( Gio.AsyncReadyCallback ) –
No description available
user_data ( variadic ) –
No description available

Wp.SpaDevice.prototype.export

function Wp.SpaDevice.prototype.export(cancellable: Gio.Cancellable, callback: Gio.AsyncReadyCallback, user_data: Object): {
    // javascript wrapper for 'wp_spa_device_export'
}

Parameters:

self ( Wp.SpaDevice ) –
No description available
cancellable ( Gio.Cancellable ) –
No description available
callback ( Gio.AsyncReadyCallback ) –
No description available
user_data ( Object ) –
No description available

wp_spa_device_export_finish

gboolean
wp_spa_device_export_finish (WpSpaDevice * self,
                             GAsyncResult * res,
                             GError ** error)

Parameters:

self
No description available
res
No description available
error
No description available
Returns
No description available

Wp.SpaDevice.export_finish

@raises(GLib.GError)
def Wp.SpaDevice.export_finish (self, res):
    #python wrapper for 'wp_spa_device_export_finish'

Parameters:

self ( Wp.SpaDevice ) –
No description available
res ( Gio.AsyncResult ) –
No description available
Returns ( bool ) –
No description available

Wp.SpaDevice.prototype.export_finish

function Wp.SpaDevice.prototype.export_finish(res: Gio.AsyncResult): {
    // javascript wrapper for 'wp_spa_device_export_finish'
}

Parameters:

self ( Wp.SpaDevice ) –
No description available
res ( Gio.AsyncResult ) –
No description available
Returns ( Number ) –
No description available

wp_spa_device_get_bound_id

guint32
wp_spa_device_get_bound_id (WpSpaDevice * self)

Parameters:

self
No description available
Returns
No description available

Wp.SpaDevice.get_bound_id

def Wp.SpaDevice.get_bound_id (self):
    #python wrapper for 'wp_spa_device_get_bound_id'

Parameters:

self ( Wp.SpaDevice ) –
No description available
Returns ( int ) –
No description available

Wp.SpaDevice.prototype.get_bound_id

function Wp.SpaDevice.prototype.get_bound_id(): {
    // javascript wrapper for 'wp_spa_device_get_bound_id'
}

Parameters:

self ( Wp.SpaDevice ) –
No description available
Returns ( Number ) –
No description available

Signals

object-info

object_info_callback (WpSpaDevice * self,
                      guint id,
                      GType type,
                      gchar * factory,
                      WpProperties * properties,
                      WpProperties * parent_props,
                      gpointer user_data)

This signal is emitted when the device is creating or destroying a managed object. The handler is expected to actually construct or destroy the object using the requested SPA factory and with the given properties.

The handler may also use parent_props to enrich the properties set that will be assigned on the object. parent_props contains all the properties that this device object has.

When the object is being created, type can either be WP_TYPE_DEVICE or WP_TYPE_NODE. The handler is free to create a substitute of those, like WP_TYPE_SPA_DEVICE instead of WP_TYPE_DEVICE, depending on the use case.

Parameters:

self

the WpSpaDevice

id

the id of the managed object

type

the WpProxy subclass type that the managed object should have, or G_TYPE_NONE if the object is being destroyed

factory ( [nullable] ) –

the name of the SPA factory to use to construct the managed object, or NULL if the object is being destroyed

properties ( [nullable] ) –

additional properties that the managed object should have, or NULL if the object is being destroyed

parent_props

the properties of the device itself

user_data
No description available

Flags: Run First


object-info

def object_info_callback (self, id, type, factory, properties, parent_props, *user_data):
    #python callback for the 'object-info' signal

This signal is emitted when the device is creating or destroying a managed object. The handler is expected to actually construct or destroy the object using the requested SPA factory and with the given properties.

The handler may also use parent_props to enrich the properties set that will be assigned on the object. parent_props contains all the properties that this device object has.

When the object is being created, type can either be WP_TYPE_DEVICE (not introspectable) or WP_TYPE_NODE (not introspectable). The handler is free to create a substitute of those, like WP_TYPE_SPA_DEVICE (not introspectable) instead of WP_TYPE_DEVICE (not introspectable), depending on the use case.

Parameters:

self ( Wp.SpaDevice ) –

the Wp.SpaDevice

id ( int ) –

the id of the managed object

type ( GObject.Type ) –

the Wp.Proxy subclass type that the managed object should have, or G_TYPE_NONE (not introspectable) if the object is being destroyed

factory ( str ) –

the name of the SPA factory to use to construct the managed object, or None if the object is being destroyed

properties ( Wp.Properties ) –

additional properties that the managed object should have, or None if the object is being destroyed

parent_props ( Wp.Properties ) –

the properties of the device itself

user_data ( variadic ) –
No description available

Flags: Run First


object-info

function object_info_callback(self: Wp.SpaDevice, id: Number, type: GObject.Type, factory: String, properties: Wp.Properties, parent_props: Wp.Properties, user_data: Object): {
    // javascript callback for the 'object-info' signal
}

This signal is emitted when the device is creating or destroying a managed object. The handler is expected to actually construct or destroy the object using the requested SPA factory and with the given properties.

The handler may also use parent_props to enrich the properties set that will be assigned on the object. parent_props contains all the properties that this device object has.

When the object is being created, type can either be WP_TYPE_DEVICE (not introspectable) or WP_TYPE_NODE (not introspectable). The handler is free to create a substitute of those, like WP_TYPE_SPA_DEVICE (not introspectable) instead of WP_TYPE_DEVICE (not introspectable), depending on the use case.

Parameters:

self ( Wp.SpaDevice ) –

the Wp.SpaDevice

id ( Number ) –

the id of the managed object

type ( GObject.Type ) –

the Wp.Proxy subclass type that the managed object should have, or G_TYPE_NONE (not introspectable) if the object is being destroyed

factory ( String ) –

the name of the SPA factory to use to construct the managed object, or null if the object is being destroyed

properties ( Wp.Properties ) –

additional properties that the managed object should have, or null if the object is being destroyed

parent_props ( Wp.Properties ) –

the properties of the device itself

user_data ( Object ) –
No description available

Flags: Run First


Properties

core

“core” WpCore *

Flags : Read / Write / Construct Only


core

“self.props.core” Wp.Core

Flags : Read / Write / Construct Only


core

“core” Wp.Core

Flags : Read / Write / Construct Only


properties

“properties” WpProperties *

Flags : Read / Write / Construct Only


properties

“self.props.properties” Wp.Properties

Flags : Read / Write / Construct Only


properties

“properties” Wp.Properties

Flags : Read / Write / Construct Only


spa-device-handle

“spa-device-handle” gpointer

Flags : Read / Write / Construct Only


spa_device_handle

“self.props.spa_device_handle” object

Flags : Read / Write / Construct Only


spa-device-handle

“spa-device-handle” Object

Flags : Read / Write / Construct Only


Constants

WP_TYPE_DEVICE

#define WP_TYPE_DEVICE (wp_device_get_type ())

The WpDevice GType


WP_TYPE_SPA_DEVICE

#define WP_TYPE_SPA_DEVICE (wp_spa_device_get_type ())

The WpSpaDevice GType


The results of the search are