Wp.PipewireObject¶
- Implementations:
Wp.Client
,Wp.Device
,Wp.Factory
,Wp.ImplNode
,Wp.Link
,Wp.Node
,Wp.Port
Methods¶
|
|
|
|
|
|
|
|
|
Virtual Methods¶
|
|
|
|
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r |
The native info structure |
||
r |
The param info of the object |
||
r |
The properties of the pipewire object |
Signals¶
Name |
Short Description |
---|---|
Fields¶
None
Class Details¶
- class Wp.PipewireObject¶
- Bases:
- Structure:
An interface for standard PipeWire objects. The common characteristic of all objects that implement this interface is the presence of an “info” structure that contains additional properties for this object (in the form of a spa_dict / pw_properties) and optionally also some parameters that can be enumerated and set on the object.
- enum_params(id, filter, cancellable, callback, *user_data)¶
- Parameters:
id (
str
orNone
) – the parameter id to enumerate orNone
for all parameterscancellable (
Gio.Cancellable
orNone
) – a cancellable for the async operationcallback (
Gio.AsyncReadyCallback
orNone
) – a callback to call with the result
Enumerate object parameters.
This will asynchronously return the result, or an error, by calling the given callback. The result is going to be a
Wp.Iterator
containingWp.SpaPod
objects, which can be retrieved withWp.PipewireObject.enum_params_finish
().
- enum_params_finish(res)¶
- Parameters:
res (
Gio.AsyncResult
) – the async result- Raises:
- Returns:
an iterator to iterate over the collected params, or
None
if the operation resulted in error; the items in the iterator areWp.SpaPod
- Return type:
Wp.Iterator
orNone
Finishes an asynchronous parameter enumeration operation.
- enum_params_sync(id, filter)¶
- Parameters:
- Returns:
an iterator to iterate over cached parameters, or
None
if parameters for this id are not cached; the items in the iterator areWp.SpaPod
- Return type:
Wp.Iterator
orNone
This method can be used to retrieve object parameters in a synchronous way (in contrast with
Wp.PipewireObject.enum_params
(), which is async).The WP_PIPEWIRE_OBJECT_FEATURE_PARAM_<something> feature that corresponds to the specified id must have been activated earlier. These features enable monitoring and caching of params underneath, so that they are always available for retrieval with this method. Note, however, that cached params may be out-of-date if they have changed very recently on the remote object and the caching mechanism hasn’t been able to update them yet, so if you really need up-to-date information you should only rely on
Wp.PipewireObject.enum_params
() instead.
- get_native_info()¶
-
Retrieves the native infor structure of this object (pw_node_info, pw_port_info, etc…)
- get_param_info()¶
- Returns:
a variant of type a{ss} or
None
if the object does not support params at all- Return type:
GLib.Variant
orNone
Returns the available parameters of this pipewire object.
The return value is a
GLib.Variant
of type a{ss}, where the key of each map entry is a spa param type id (the same ids that you can pass inWp.PipewireObject.enum_params
()) and the value is a string that can contain the following letters, each of them representing a flag:r: the param is readable (SPA_PARAM_INFO_READ)
w: the param is writable (SPA_PARAM_INFO_WRITE)
For params that are readable, you can query them with
Wp.PipewireObject.enum_params
() Params that are writable can be set withWp.PipewireObject.set_param
() RequiresWp.ProxyFeatures.PIPEWIRE_OBJECT_FEATURE_INFO
- get_properties()¶
- Returns:
the pipewire properties of this object; normally these are the properties that are part of the info structure
- Return type:
Retrieves the PipeWire properties of this object.
- get_property(key)¶
- Parameters:
key (
str
) – the property name- Returns:
the value of the pipewire property key or
None
if the property doesn’t exist- Return type:
Returns the value of a single pipewire property.
This is the same as getting the whole properties structure with
Wp.PipewireObject.get_properties
() and accessing a single property withWp.Properties.get
(), but saves one call and having to clean up theWp.Properties
reference count afterwards. The value is owned by the proxy, but it is guaranteed to stay alive until execution returns back to the event loop. RequiresWp.ProxyFeatures.PIPEWIRE_OBJECT_FEATURE_INFO
- new_properties_iterator()¶
- Returns:
an iterator that iterates over the pipewire properties of this object. Use wp_properties_iterator_item_get_key() and wp_properties_iterator_item_get_value() to parse the items returned by this iterator.
- Return type:
Iterates over the object’s PipeWire properties.
- set_param(id, flags, param)¶
- Parameters:
- Returns:
- Return type:
Sets a parameter on the object.
- do_enum_params(id, filter, cancellable, callback, *user_data) virtual¶
- Parameters:
id (
str
orNone
) – the parameter id to enumerate orNone
for all parameterscancellable (
Gio.Cancellable
orNone
) – a cancellable for the async operationcallback (
Gio.AsyncReadyCallback
orNone
) – a callback to call with the result
Enumerate object parameters.
This will asynchronously return the result, or an error, by calling the given callback. The result is going to be a
Wp.Iterator
containingWp.SpaPod
objects, which can be retrieved withWp.PipewireObject.enum_params_finish
().
- do_enum_params_finish(res) virtual¶
- Parameters:
res (
Gio.AsyncResult
) – the async result- Returns:
an iterator to iterate over the collected params, or
None
if the operation resulted in error; the items in the iterator areWp.SpaPod
- Return type:
Wp.Iterator
orNone
Finishes an asynchronous parameter enumeration operation.
- do_enum_params_sync(id, filter) virtual¶
- Parameters:
- Returns:
an iterator to iterate over cached parameters, or
None
if parameters for this id are not cached; the items in the iterator areWp.SpaPod
- Return type:
Wp.Iterator
orNone
This method can be used to retrieve object parameters in a synchronous way (in contrast with
Wp.PipewireObject.enum_params
(), which is async).The WP_PIPEWIRE_OBJECT_FEATURE_PARAM_<something> feature that corresponds to the specified id must have been activated earlier. These features enable monitoring and caching of params underneath, so that they are always available for retrieval with this method. Note, however, that cached params may be out-of-date if they have changed very recently on the remote object and the caching mechanism hasn’t been able to update them yet, so if you really need up-to-date information you should only rely on
Wp.PipewireObject.enum_params
() instead.
- do_get_native_info() virtual¶
-
Retrieves the native infor structure of this object (pw_node_info, pw_port_info, etc…)
- do_get_param_info() virtual¶
- Returns:
a variant of type a{ss} or
None
if the object does not support params at all- Return type:
GLib.Variant
orNone
Returns the available parameters of this pipewire object.
The return value is a
GLib.Variant
of type a{ss}, where the key of each map entry is a spa param type id (the same ids that you can pass inWp.PipewireObject.enum_params
()) and the value is a string that can contain the following letters, each of them representing a flag:r: the param is readable (SPA_PARAM_INFO_READ)
w: the param is writable (SPA_PARAM_INFO_WRITE)
For params that are readable, you can query them with
Wp.PipewireObject.enum_params
() Params that are writable can be set withWp.PipewireObject.set_param
() RequiresWp.ProxyFeatures.PIPEWIRE_OBJECT_FEATURE_INFO
- do_get_properties() virtual¶
- Returns:
the pipewire properties of this object; normally these are the properties that are part of the info structure
- Return type:
Retrieves the PipeWire properties of this object.
Signal Details¶
- Wp.PipewireObject.signals.params_changed(pipewire_object, object)¶
- Signal Name:
params-changed
- Flags:
- Parameters:
pipewire_object (
Wp.PipewireObject
) – The object which received the signalobject (
str
) –
Property Details¶
- Wp.PipewireObject.props.native_info¶
-
The native info structure
- Wp.PipewireObject.props.param_info¶
- Name:
param-info
- Type:
- Default Value:
- Flags:
The param info of the object
- Wp.PipewireObject.props.properties¶
- Name:
properties
- Type:
- Default Value:
- Flags:
The properties of the pipewire object