modules: add more docs

This commit is contained in:
Wim Taymans 2025-01-28 10:11:24 +01:00
parent 4e3d5e2ac5
commit 73e7f61d8c
2 changed files with 60 additions and 7 deletions

View file

@ -16,10 +16,63 @@
#include "module-client-device/client-device.h"
/** \page page_module_client_device Client Device
*
* Allow clients to export devices to the PipeWire daemon.
*
* This module creates an export type for the \ref SPA_TYPE_INTERFACE_Device
* interface.
*
* With \ref pw_core_export(), objects of this type can be exported to the
* PipeWire server. All actions performed on the device locally will be visible
* to connecteced clients.
*
* In some cases, it is possible to use this factory directly.
* With \ref pw_core_create_object() on the `client-device`
* factory will result in a \ref SPA_TYPE_INTERFACE_Device proxy that can be
* used to control the server side created \ref pw_impl_device.
*
* Schematically, the client side \ref spa_device is wrapped in the ClientDevice
* proxy and unwrapped by the server side resource so that all actions on the client
* side device are reflected on the server side device and server side actions are
* reflected in the client.
*
*\code{.unparsed}
*
* client side proxy server side resource
* .------------------------------. .----------------------------------.
* | SPA_TYPE_INTERFACE_Device | | PW_TYPE_INTERFACE_Device |
* | | IPC |.--------------------------------.|
* | | -----> || SPA_TYPE_INTERFACE_Device ||
* | | |'--------------------------------'|
* '------------------------------' '----------------------------------'
*\endcode
*
* ## Module Name
*
* `libpipewire-module-client-device`
*
* ## Module Options
*
* This module has no options.
*
* ## Properties for the create_object call
*
* All properties are passed directly to the \ref pw_context_create_device() call.
*
* ## Example configuration
*
* The module is usually added to the config file of the main PipeWire daemon and the
* clients.
*
*\code{.unparsed}
* context.modules = [
* { name = libpipewire-module-client-device }
* ]
*\endcode
*
* ## See also
*
* - `module-spa-device-factory`: make nodes from a factory
*/
#define NAME "client-device"