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

WpImplSessionClass

Fields
parent_class (WpSessionClass) –
No description available

Constructors

wp_impl_session_new

WpImplSession *
wp_impl_session_new (WpCore * core)

Parameters:

core

the WpCore

Returns ( [transfer: full])

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) –
No description available

Class structure

WpSessionClass

Fields
parent_class (WpGlobalProxyClass) –
No description available

Methods

wp_session_get_n_endpoints

guint
wp_session_get_n_endpoints (WpSession * self)

Requires WP_SESSION_FEATURE_ENDPOINTS

Parameters:

self

the session

Returns

the number of endpoints 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

Returns ( [transfer: none])

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

Returns ( [transfer: full][nullable])

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

Returns ( [transfer: full][nullable])

the first endpoint that matches the interest, or NULL if there is no such endpoint


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

Returns ( [transfer: full])

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

Returns ( [transfer: full])

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

Returns ( [transfer: full])

a WpIterator that iterates over all the endpoints 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
No description available

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


WP_TYPE_SESSION

#define WP_TYPE_SESSION (wp_session_get_type ())

The WpSession GType


The results of the search are