PipeWire 0.1.9

Remote API

# Overview

The remote API allows you to connect to a remote PipeWire instance and perform actions on the PipeWire graph. This includes

- introspecting the objects on the instance
- Creating nodes
- Linking nodes on their ports
- providing media to the server for playback or consumption
- retrieving media from the remote instance

# Event Loop Abstraction

Most API is asynchronous and based around an event loop. Methods will start an operation which will cause a state change of the pw_remote object. Connect to the state_changed event to be notified of these state changes.

The most convenient way to deal with the asynchronous calls is probably with the thread loop (See Threaded Loop for more details).

## Proxy

Proxies are local representations of remote resources. They allow communication between local and remote objects.

The pw_remote maintains a list of all proxies, including a core proxy that is used to get access to other proxy objects.

See also Proxy

# Remote

## Create

To create a new remote use pw_remote_new(). You will need to pass a local pw_core implementation for event and data loop.

A typical loop would be created with pw_thread_loop_new() but other implementation are possible.

You will also need to pass properties for the remote. Use pw_fill_remote_properties() to get a default set of properties.

After creating the remote, you can track the state of the remote by listening for the state_changed event.

## Connecting

A remote must be connected before any operation can be issued. Calling pw_remote_connect() will initiate the connection procedure.

When connecting, the remote will automatically create a core proxy to get access to the registry proxy and types.

## Registry

Registry

## Disconnect

Use pw_remote_disconnect() to disconnect from the remote.