PipeWire Proxy

digraph inheritance { rankdir=LR; GObject -> WpObject; WpObject -> WpProxy; }
struct WpProxy

Base class for all objects that expose PipeWire objects using pw_proxy underneath.

This base class cannot be instantiated. It provides handling of pw_proxy’s events and exposes common functionality.

GObject Properties

bound-id

The id that this object has on the registry

guint

G_PARAM_READABLE

pw-proxy

The struct pw_proxy *

gpointer

G_PARAM_READABLE

GObject Signals

bound

void
bound_callback (WpProxy * self,
                guint id,
                gpointer user_data)
Parameters:
  • id - the bound id of the proxy

Flags: G_SIGNAL_RUN_FIRST

pw-proxy-created

void
pw_proxy_created_callback (WpProxy * self,
                           gpointer object,
                           gpointer user_data)
Parameters:
  • object - pointer to the pw_proxy that was just created

Flags: G_SIGNAL_RUN_FIRST

pw-proxy-destroyed

void
pw_proxy_destroyed_callback (WpProxy * self,
                             gpointer user_data)
Flags: G_SIGNAL_RUN_FIRST

error

void
error_callback (WpProxy * self,
                gint seq, gint res, const gchar *message,
                gpointer user_data)
Emitted when an error occurs on the remote object. The parameters are exactly the same as on the underlying pw_proxy error callback.

Parameters:

  • seq - the sequence number of the operation that caused the error

  • res - the error code

  • message - a description of the error

Flags: G_SIGNAL_RUN_FIRST

struct _WpProxyClass
enum WpProxyFeatures

Flags to be used as WpObjectFeatures for WpProxy subclasses.

Values:

enumerator WP_PROXY_FEATURE_BOUND = (1 << 0)
enumerator WP_PIPEWIRE_OBJECT_FEATURE_INFO = (1 << 4)
enumerator WP_PIPEWIRE_OBJECT_FEATURE_PARAM_PROPS = (1 << 5)
enumerator WP_PIPEWIRE_OBJECT_FEATURE_PARAM_FORMAT = (1 << 6)
enumerator WP_PIPEWIRE_OBJECT_FEATURE_PARAM_PROFILE = (1 << 7)
enumerator WP_PIPEWIRE_OBJECT_FEATURE_PARAM_PORT_CONFIG = (1 << 8)
enumerator WP_PIPEWIRE_OBJECT_FEATURE_PARAM_ROUTE = (1 << 9)
enumerator WP_PROXY_FEATURE_CUSTOM_START = (1 << 16)
static const WpObjectFeatures WP_PIPEWIRE_OBJECT_FEATURES_MINIMAL = (WP_PROXY_FEATURE_BOUND | WP_PIPEWIRE_OBJECT_FEATURE_INFO)

The minimal feature set for proxies implementing WpPipewireObject. This is a subset of WP_PIPEWIRE_OBJECT_FEATURES_ALL.

static const WpObjectFeatures WP_PIPEWIRE_OBJECT_FEATURES_ALL = (WP_PIPEWIRE_OBJECT_FEATURES_MINIMAL | WP_PIPEWIRE_OBJECT_FEATURE_PARAM_PROPS | WP_PIPEWIRE_OBJECT_FEATURE_PARAM_FORMAT | WP_PIPEWIRE_OBJECT_FEATURE_PARAM_PROFILE | WP_PIPEWIRE_OBJECT_FEATURE_PARAM_PORT_CONFIG | WP_PIPEWIRE_OBJECT_FEATURE_PARAM_ROUTE)

The complete common feature set for proxies implementing WpPipewireObject. This is a subset of WP_OBJECT_FEATURES_ALL.

guint32 wp_proxy_get_bound_id(WpProxy *self)

Returns the proxy bound id.

The bound id is the id that this object has on the PipeWire registry (a.k.a. the global id). The object must have the WP_PROXY_FEATURE_BOUND feature before this method can be called.

Remark

Requires WP_PROXY_FEATURE_BOUND

Parameters
  • self – the proxy

Returns

the bound id of this object

const gchar *wp_proxy_get_interface_type(WpProxy *self, guint32 *version)
Parameters
  • self – the proxy

  • version – (out) (optional): the version of the interface

Returns

the PipeWire type of the interface that is being proxied

struct pw_proxy *wp_proxy_get_pw_proxy(WpProxy *self)
Parameters
  • self – the proxy

Returns

a pointer to the underlying pw_proxy object

void wp_proxy_set_pw_proxy(WpProxy *self, struct pw_proxy *proxy)

Private method to be used by subclasses to set the pw_proxy pointer when it is available.

This can be called only if there is no pw_proxy already set. Takes ownership of proxy.

void wp_proxy_watch_bind_error(WpProxy *proxy, WpTransition *transition)

Private method to be used by subclasses to watch for errors during a transition that leads the proxy to become bound.

If an error is signaled on the proxy before the bound signal is emitted, the transition will return an error.

Parameters
  • proxy – the proxy

  • transition – the transition that binds the proxy

WP_TYPE_PROXY (wp_proxy_get_type ())

The WpProxy GType.