Session Items¶
digraph inheritance { rankdir=LR; GObject -> WpObject; WpObject -> WpSessionItem; }-
struct
WpSessionItem
¶ 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
-
wpsessionitem::
WpSessionItemFeatures
¶ Flags to be used as WpObjectFeatures for WpSessionItem subclasses.
Values:
-
guint
wp_session_item_get_id
(WpSessionItem * self)¶ Gets the unique Id of the session item.
- 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. For example:
- An exported WpSiEndpoint should have at least:
- an associated WpSiEndpoint
- an associated WpSession
- In cases where the item wraps a single PipeWire node, it should also have an associated WpNode
- 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
- An exported WpSiEndpoint should have at least:
-
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 the registry.
- 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.