Session Items¶
-
struct
WpSessionItem
¶ Session items are high level objects that wrap underlying PipeWire objects and manage them. For example, a session item may be managing a node, taking responsibility for configuring the PortConfig and Format parameters of the node. Or another may be managing links between two nodes.
All the implementations are provided by modules and instantiated via the WpSiFactory class.
GObject Properties
-
struct
_WpSessionItemClass
¶ Public Members
-
WpObjectClass
parent_class
¶
-
void
reset)
(WpSessionItem *self)¶
-
gboolean
configure)
(WpSessionItem *self, WpProperties *props)¶
-
gpointer
get_associated_proxy)
(WpSessionItem *self, GType proxy_type)¶
-
void
disable_active)
(WpSessionItem *self)¶ disables the active feature of the session item
-
void
disable_exported)
(WpSessionItem *self)¶ disables the exported feature of the session item
-
void
enable_active)
(WpSessionItem *self, WpTransition *transition)¶ enables the active feature of the session item
-
void
enable_exported)
(WpSessionItem *self, WpTransition *transition)¶ enables the exported feature of the session item
-
WpObjectClass
-
enum
wpsessionitem::
WpSessionItemFeatures
¶ Flags to be used as WpObjectFeatures for WpSessionItem subclasses.
Values:
-
WP_SESSION_ITEM_FEATURE_ACTIVE
= (1 << 0)¶
-
WP_SESSION_ITEM_FEATURE_EXPORTED
= (1 << 1)¶
-
WP_SESSION_ITEM_FEATURE_CUSTOM_START
= (1 << 16)¶
-
-
guint
wp_object_get_id
(WpObject * self)¶ Gets the unique wireplumber Id of this object.
- Parameters
self
: the session item
-
void
wp_session_item_reset
(WpSessionItem * self)¶ Resets the session item.
This essentially removes the configuration and deactivates all active features.
- Parameters
self
: the session item
-
gboolean
wp_session_item_configure
(WpSessionItem * self, WpProperties * props)¶ Configures the session item with a set of properties.
- Return
TRUE on success, FALSE if the item could not be configured
- Parameters
self
: the session itemprops
: (transfer full): the properties used to configure the item
-
gboolean
wp_session_item_is_configured
(WpSessionItem * self)¶ Checks if the session item is configured.
- Return
TRUE if the item is configured, FALSE otherwise
- Parameters
self
: the session item
-
gpointer
wp_session_item_get_associated_proxy
(WpSessionItem * self, GType proxy_type)¶ An associated proxy is a WpProxy subclass instance that is somehow related to this item.
- Return
(nullable) (transfer full) (type WpProxy): the associated proxy of the specified proxy_type, or NULL if there is no association to such a proxy
- Parameters
self
: the session itemproxy_type
: a WpProxy subclass GType
-
guint32
wp_session_item_get_associated_proxy_id
(WpSessionItem * self, GType proxy_type)¶ Gets the bound id of a proxy associated with the session item.
- Return
the bound id of the associated proxy of the specified proxy_type, or
SPA_ID_INVALID
if there is no association to such a proxy- Parameters
self
: the session itemproxy_type
: a WpProxy subclass GType
-
void
wp_session_item_register
(WpSessionItem * self)¶ Registers the session item to its associated core.
- Parameters
self
: (transfer full): the session item
-
void
wp_session_item_remove
(WpSessionItem * self)¶ Removes the session item from its associated core.
- Parameters
self
: (transfer none): the session item
-
WpProperties*
wp_session_item_get_properties
(WpSessionItem * self)¶ Gets the properties of a session item.
- Return
(transfer full): the item’s properties.
- Parameters
self
: the session item
-
const gchar*
wp_session_item_get_property
(WpSessionItem * self, const gchar * key)¶ Looks up a named session item property value for a given key.
- Return
the item property value for the given key.
- Parameters
self
: the session itemkey
: the property key
-
void
wp_session_item_set_properties
(WpSessionItem * self, WpProperties * props)¶ Sets the item’s properties.
This should only be done by sub-classes after the configuration has been done.
- Parameters
self
: the session itemprops
: (transfer full): the new properties to set
-
void
wp_session_item_handle_proxy_destroyed
(WpProxy * proxy, WpSessionItem * item)¶ Helper callback for sub-classes that deffers and unexports the session item.
Only meant to be used when the pipewire proxy destroyed signal is triggered.
- Parameters
proxy
: the proxy that was destroyed by the serveritem
: the associated session item
-
WP_TYPE_SESSION_ITEM
(wp_session_item_get_type ())¶ The WpSessionItem GType.