PipeWire 1.2.5
Loading...
Searching...
No Matches
Proxy
See also
Proxy

Overview

The proxy object is a client side representation of a resource that lives on a remote PipeWire instance.

It is used to communicate with the remote object.

Core proxy

A proxy for a remote core object can be obtained by making a remote connection with pw_context_connect. See Proxy

Some methods on proxy object allow creation of more proxy objects or create a binding between a local proxy and global resource.

Create

A client first creates a new proxy object with pw_proxy_new(). A type must be provided for this object.

The protocol of the context will usually install an interface to translate method calls and events to the wire format.

The creator of the proxy will usually also install an event implementation of the particular object type.

Bind

To actually use the proxy object, one needs to create a server side resource for it. This can be done by, for example, binding to a global object or by calling a method that creates and binds to a new remote object. In all cases, the local id is passed to the server and is used to create a resource with the same id.

Methods

To call a method on the proxy use the interface methods. Calling any interface method will result in a request to the server to perform the requested action on the corresponding resource.

Events

Events send from the server to the proxy will be demarshalled by the protocol and will then result in a call to the installed implementation of the proxy.

Destroy

Use pw_proxy_destroy() to destroy the client side object. This is usually done automatically when the server removes the resource associated to the proxy.