PipeWire Session
WpImplSession
GObject ╰──WpObject ╰──WpProxy ╰──WpGlobalProxy ╰──WpSession ╰──WpImplSession
A WpImplSession allows implementing a session and exporting it to PipeWire. To export a WpImplSession, activate WP_PROXY_FEATURE_BOUND.
Class structure
Constructors
wp_impl_session_new
WpImplSession * wp_impl_session_new (WpCore * core)
Parameters:
core
–
the WpCore
the newly constructed session implementation
Methods
wp_impl_session_set_property
wp_impl_session_set_property (WpImplSession * self, const gchar* key, const gchar* value)
Sets the specified property on the PipeWire properties of the session.
If this property is set before exporting the session, then it is also used in the construction process of the session object and appears as a global property.
Parameters:
self
–
the session implementation
key
–
a property key
value
–
a property value
wp_impl_session_update_properties
wp_impl_session_update_properties (WpImplSession * self, WpProperties * updates)
Adds or updates the values of the PipeWire properties of the session using the properties in updates as a source.
If the properties are set before exporting the session, then they are also used in the construction process of the session object and appear as global properties.
Parameters:
self
–
the session implementation
updates
–
a set of properties to add or update in the session's properties
WpSession
GObject ╰──WpObject ╰──WpProxy ╰──WpGlobalProxy ╰──WpSession ╰──WpImplSession
The WpSession class allows accessing the properties and methods of a
PipeWire session object (struct pw_session
from the session-manager
extension).
A WpSession is constructed internally when a new session appears on the PipeWire registry and it is made available through the WpObjectManager API.
Members
parent_instance
(WpGlobalProxy)
–
Class structure
Methods
wp_session_get_n_endpoints
guint wp_session_get_n_endpoints (WpSession * self)
Requires WP_SESSION_FEATURE_ENDPOINTS
Parameters:
self
–
the session
the number of endpoints of this session
wp_session_get_n_links
guint wp_session_get_n_links (WpSession * self)
Requires WP_SESSION_FEATURE_LINKS
Parameters:
self
–
the session
the number of endpoint links of this session
wp_session_get_name
const gchar* wp_session_get_name (WpSession * self)
Requires WP_PIPEWIRE_OBJECT_FEATURE_INFO
Parameters:
self
–
the session
the (unique) name of the session
wp_session_lookup_endpoint
WpEndpoint * wp_session_lookup_endpoint (WpSession * self, ... ...)
Requires WP_SESSION_FEATURE_ENDPOINTS
The constraints specified in the variable arguments must follow the rules documented in wp_object_interest_new.
Parameters:
self
–
the session
...
–
a list of constraints, terminated by NULL
the first endpoint that matches the constraints, or NULL if there is no such endpoint
wp_session_lookup_endpoint_full
WpEndpoint * wp_session_lookup_endpoint_full (WpSession * self, WpObjectInterest * interest)
Requires WP_SESSION_FEATURE_ENDPOINTS
Parameters:
self
–
the session
interest
(
[transfer: full])
–
the interest
the first endpoint that matches the interest, or NULL if there is no such endpoint
wp_session_lookup_link
WpEndpointLink * wp_session_lookup_link (WpSession * self, ... ...)
Requires WP_SESSION_FEATURE_LINKS
The constraints specified in the variable arguments must follow the rules documented in wp_object_interest_new.
Parameters:
self
–
the session
...
–
a list of constraints, terminated by NULL
the first link that matches the constraints, or NULL if there is no such link
wp_session_lookup_link_full
WpEndpointLink * wp_session_lookup_link_full (WpSession * self, WpObjectInterest * interest)
Requires WP_SESSION_FEATURE_LINKS
Parameters:
self
–
the session
interest
(
[transfer: full])
–
the interest
the first link that matches the interest, or NULL if there is no such link
wp_session_new_endpoints_filtered_iterator
WpIterator * wp_session_new_endpoints_filtered_iterator (WpSession * self, ... ...)
Requires WP_SESSION_FEATURE_ENDPOINTS
The constraints specified in the variable arguments must follow the rules documented in wp_object_interest_new.
Parameters:
self
–
the session
...
–
a list of constraints, terminated by NULL
a WpIterator that iterates over all the endpoints that belong to this session and match the constraints
wp_session_new_endpoints_filtered_iterator_full
WpIterator * wp_session_new_endpoints_filtered_iterator_full (WpSession * self, WpObjectInterest * interest)
Requires WP_SESSION_FEATURE_ENDPOINTS
Parameters:
self
–
the session
interest
(
[transfer: full])
–
the interest
a WpIterator that iterates over all the endpoints that belong to this session and match the interest
wp_session_new_endpoints_iterator
WpIterator * wp_session_new_endpoints_iterator (WpSession * self)
Requires WP_SESSION_FEATURE_ENDPOINTS
Parameters:
self
–
the session
a WpIterator that iterates over all the endpoints that belong to this session
wp_session_new_links_filtered_iterator
WpIterator * wp_session_new_links_filtered_iterator (WpSession * self, ... ...)
Requires WP_SESSION_FEATURE_LINKS
The constraints specified in the variable arguments must follow the rules documented in wp_object_interest_new.
Parameters:
self
–
the session
...
–
a list of constraints, terminated by NULL
a WpIterator that iterates over all the links that belong to this session and match the constraints
wp_session_new_links_filtered_iterator_full
WpIterator * wp_session_new_links_filtered_iterator_full (WpSession * self, WpObjectInterest * interest)
Requires WP_SESSION_FEATURE_LINKS
Parameters:
self
–
the session
interest
(
[transfer: full])
–
the interest
a WpIterator that iterates over all the links that belong to this session and match the interest
wp_session_new_links_iterator
WpIterator * wp_session_new_links_iterator (WpSession * self)
Requires WP_SESSION_FEATURE_LINKS
Parameters:
self
–
the session
a WpIterator that iterates over all the endpoint links that belong to this session
Signals
endpoints-changed
endpoints_changed_callback (WpSession * self, gpointer user_data)
Emitted when the sessions's endpoints change. This is only emitted when WP_SESSION_FEATURE_ENDPOINTS is enabled.
Parameters:
self
–
the session
user_data
–
Flags: Run Last
links-changed
links_changed_callback (WpSession * self, gpointer user_data)
Emitted when the session's links change. This is only emitted when WP_SESSION_FEATURE_LINKS is enabled.
Parameters:
self
–
the session
user_data
–
Flags: Run Last
Enumerations
WpSessionFeatures
An extension of WpProxyFeatures
Members
WP_SESSION_FEATURE_ENDPOINTS
(65536)
–
caches information about endpoints, enabling the use of wp_session_get_n_endpoints, wp_session_lookup_endpoint, wp_session_new_endpoints_iterator and related methods
WP_SESSION_FEATURE_LINKS
(131072)
–
caches information about endpoint links, enabling the use of wp_session_get_n_links, wp_session_lookup_link, wp_session_new_links_iterator and related methods
Constants
WP_TYPE_IMPL_SESSION
#define WP_TYPE_IMPL_SESSION (wp_impl_session_get_type ())
The WpImplSession GType
The results of the search are