mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
doc: switch doxygen to using groups instead of pages and classes
C code doesn't lend itself well to using classes and pages are best for prose.
A doxygen group is a set of related functions - which is exactly what we have
here, e.g. pw_context.
This patch basically adds the following lines to each header:
\defgroup pw_whatever
\addtogroup pw_whatever
\{
.... function declarations ....
\}
Doxygen is smart enough to merge documentation in the header with
documentation in the correspondin .c file where the function is implemented.
This commit is contained in:
parent
4cf18c92f8
commit
cbe29c070c
52 changed files with 546 additions and 327 deletions
|
|
@ -33,13 +33,18 @@ extern "C" {
|
|||
|
||||
#include <spa/utils/defs.h>
|
||||
|
||||
/** \class pw_array
|
||||
/** \defgroup pw_array Array Objects
|
||||
*
|
||||
* \brief An array object
|
||||
*
|
||||
* The array is a dynamically resizable data structure that can
|
||||
* hold items of the same size.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup pw_array
|
||||
* \{
|
||||
*/
|
||||
struct pw_array {
|
||||
void *data; /**< pointer to array data */
|
||||
size_t size; /**< length of array in bytes */
|
||||
|
|
@ -53,11 +58,11 @@ struct pw_array {
|
|||
#define pw_array_get_unchecked_s(a,idx,s,t) SPA_PTROFF((a)->data,(idx)*(s),t)
|
||||
#define pw_array_check_index_s(a,idx,s) ((idx) < pw_array_get_len_s(a,s))
|
||||
|
||||
/** Get the number of items of type \a t in array \memberof pw_array */
|
||||
/** Get the number of items of type \a t in array */
|
||||
#define pw_array_get_len(a,t) pw_array_get_len_s(a,sizeof(t))
|
||||
/** Get the item with index \a idx and type \a t from array \memberof pw_array */
|
||||
/** Get the item with index \a idx and type \a t from array */
|
||||
#define pw_array_get_unchecked(a,idx,t) pw_array_get_unchecked_s(a,idx,sizeof(t),t)
|
||||
/** Check if an item with index \a idx and type \a t exist in array \memberof pw_array */
|
||||
/** Check if an item with index \a idx and type \a t exist in array */
|
||||
#define pw_array_check_index(a,idx,t) pw_array_check_index_s(a,idx,sizeof(t))
|
||||
|
||||
#define pw_array_first(a) ((a)->data)
|
||||
|
|
@ -81,7 +86,7 @@ struct pw_array {
|
|||
SPA_PTRDIFF(pw_array_end(a),(p))); \
|
||||
})
|
||||
|
||||
/** Initialize the array with given extend \memberof pw_array */
|
||||
/** Initialize the array with given extend */
|
||||
static inline void pw_array_init(struct pw_array *arr, size_t extend)
|
||||
{
|
||||
arr->data = NULL;
|
||||
|
|
@ -101,7 +106,7 @@ static inline void pw_array_reset(struct pw_array *arr)
|
|||
arr->size = 0;
|
||||
}
|
||||
|
||||
/** Make sure \a size bytes can be added to the array \memberof pw_array */
|
||||
/** Make sure \a size bytes can be added to the array */
|
||||
static inline int pw_array_ensure_size(struct pw_array *arr, size_t size)
|
||||
{
|
||||
size_t alloc, need;
|
||||
|
|
@ -123,7 +128,7 @@ static inline int pw_array_ensure_size(struct pw_array *arr, size_t size)
|
|||
}
|
||||
|
||||
/** Add \a ref size bytes to \a arr. A pointer to memory that can
|
||||
* hold at least \a size bytes is returned \memberof pw_array */
|
||||
* hold at least \a size bytes is returned */
|
||||
static inline void *pw_array_add(struct pw_array *arr, size_t size)
|
||||
{
|
||||
void *p;
|
||||
|
|
@ -138,7 +143,7 @@ static inline void *pw_array_add(struct pw_array *arr, size_t size)
|
|||
}
|
||||
|
||||
/** Add \a ref size bytes to \a arr. When there is not enough memory to
|
||||
* hold \a size bytes, NULL is returned \memberof pw_array */
|
||||
* hold \a size bytes, NULL is returned */
|
||||
static inline void *pw_array_add_fixed(struct pw_array *arr, size_t size)
|
||||
{
|
||||
void *p;
|
||||
|
|
@ -154,10 +159,14 @@ static inline void *pw_array_add_fixed(struct pw_array *arr, size_t size)
|
|||
return p;
|
||||
}
|
||||
|
||||
/** Add a pointer to array \memberof pw_array */
|
||||
/** Add a pointer to array */
|
||||
#define pw_array_add_ptr(a,p) \
|
||||
*((void**) pw_array_add(a, sizeof(void*))) = (p)
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -35,6 +35,14 @@ extern "C" {
|
|||
#include <pipewire/proxy.h>
|
||||
#include <pipewire/permission.h>
|
||||
|
||||
/** \defgroup pw_client Pipewire Client
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup pw_client
|
||||
* \{
|
||||
*/
|
||||
#define PW_TYPE_INTERFACE_Client PW_TYPE_INFO_INTERFACE_BASE "Client"
|
||||
|
||||
#define PW_VERSION_CLIENT 3
|
||||
|
|
@ -43,7 +51,7 @@ struct pw_client;
|
|||
/* default ID of the current client after connect */
|
||||
#define PW_ID_CLIENT 1
|
||||
|
||||
/** The client information. Extra information can be added in later versions \memberof pw_introspect */
|
||||
/** The client information. Extra information can be added in later versions */
|
||||
struct pw_client_info {
|
||||
uint32_t id; /**< id of the global */
|
||||
#define PW_CLIENT_CHANGE_MASK_PROPS (1 << 0)
|
||||
|
|
@ -52,12 +60,12 @@ struct pw_client_info {
|
|||
struct spa_dict *props; /**< extra properties */
|
||||
};
|
||||
|
||||
/** Update and existing \ref pw_client_info with \a update \memberof pw_introspect */
|
||||
/** Update and existing \ref pw_client_info with \a update */
|
||||
struct pw_client_info *
|
||||
pw_client_info_update(struct pw_client_info *info,
|
||||
const struct pw_client_info *update);
|
||||
|
||||
/** Free a \ref pw_client_info \memberof pw_introspect */
|
||||
/** Free a \ref pw_client_info */
|
||||
void pw_client_info_free(struct pw_client_info *info);
|
||||
|
||||
|
||||
|
|
@ -164,6 +172,10 @@ struct pw_client_methods {
|
|||
#define pw_client_get_permissions(c,...) pw_client_method(c,get_permissions,0,__VA_ARGS__)
|
||||
#define pw_client_update_permissions(c,...) pw_client_method(c,update_permissions,0,__VA_ARGS__)
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -187,8 +187,6 @@ static int try_load_conf(struct pw_context *this, const char *conf_prefix,
|
|||
* \param main_loop the main loop to use
|
||||
* \param properties extra properties for the context, ownership it taken
|
||||
* \return a newly allocated context object
|
||||
*
|
||||
* \memberof pw_context
|
||||
*/
|
||||
SPA_EXPORT
|
||||
struct pw_context *pw_context_new(struct pw_loop *main_loop,
|
||||
|
|
@ -396,8 +394,6 @@ error_cleanup:
|
|||
/** Destroy a context object
|
||||
*
|
||||
* \param context a context to destroy
|
||||
*
|
||||
* \memberof pw_context
|
||||
*/
|
||||
SPA_EXPORT
|
||||
void pw_context_destroy(struct pw_context *context)
|
||||
|
|
@ -526,8 +522,6 @@ const char *pw_context_get_conf_section(struct pw_context *context, const char *
|
|||
* \param dict properties to update
|
||||
*
|
||||
* Update the context object with the given properties
|
||||
*
|
||||
* \memberof pw_context
|
||||
*/
|
||||
SPA_EXPORT
|
||||
int pw_context_update_properties(struct pw_context *context, const struct spa_dict *dict)
|
||||
|
|
@ -593,8 +587,6 @@ struct pw_global *pw_context_find_global(struct pw_context *context, uint32_t id
|
|||
* \param format_filters array of format filters
|
||||
* \param[out] error an error when something is wrong
|
||||
* \return a port that can be used to link to \a otherport or NULL on error
|
||||
*
|
||||
* \memberof pw_context
|
||||
*/
|
||||
struct pw_impl_port *pw_context_find_port(struct pw_context *context,
|
||||
struct pw_impl_port *other_port,
|
||||
|
|
@ -731,8 +723,6 @@ SPA_PRINTF_FUNC(7, 8) int pw_context_debug_port_params(struct pw_context *this,
|
|||
*
|
||||
* Find a common format between the given ports. The format will
|
||||
* be restricted to a subset given with the format filters.
|
||||
*
|
||||
* \memberof pw_context
|
||||
*/
|
||||
int pw_context_find_format(struct pw_context *context,
|
||||
struct pw_impl_port *output,
|
||||
|
|
|
|||
|
|
@ -32,12 +32,25 @@ extern "C" {
|
|||
#include <spa/utils/defs.h>
|
||||
#include <spa/utils/hook.h>
|
||||
|
||||
/** \class pw_context
|
||||
/** \page page_core_api Core API
|
||||
*
|
||||
* \brief the PipeWire context
|
||||
* The Core API serves to access a PipeWire instance. It consists of the
|
||||
* following object-specific APIs:
|
||||
*
|
||||
* The context object manages all locally available resources. It
|
||||
* is used by both clients and servers.
|
||||
* - \ref pw_context
|
||||
* - \ref pw_global
|
||||
* - \ref pw_client
|
||||
* - \ref pw_resource
|
||||
* - \ref pw_node
|
||||
* - \ref pw_port
|
||||
* - \ref pw_link
|
||||
*
|
||||
*/
|
||||
|
||||
/** \defgroup pw_context Pipewire Context
|
||||
*
|
||||
* \brief The PipeWire context object manages all locally available
|
||||
* resources. It is used by both clients and servers.
|
||||
*
|
||||
* The context is used to:
|
||||
*
|
||||
|
|
@ -51,11 +64,16 @@ extern "C" {
|
|||
* clients.
|
||||
*
|
||||
* - Connect to another PipeWire instance (the main daemon, for
|
||||
* example) and interact with it (See \subpage page_core_api).
|
||||
* example) and interact with it (See \ref page_core_api).
|
||||
*
|
||||
* - Export a local implementation of an object to another
|
||||
* instance.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup pw_context
|
||||
* @{
|
||||
*/
|
||||
struct pw_context;
|
||||
|
||||
struct pw_global;
|
||||
|
|
@ -65,33 +83,6 @@ struct pw_impl_client;
|
|||
#include <pipewire/loop.h>
|
||||
#include <pipewire/properties.h>
|
||||
|
||||
/** \page page_context_api Core API
|
||||
*
|
||||
* \section page_context_overview Overview
|
||||
*
|
||||
* \subpage page_context
|
||||
*
|
||||
* \subpage page_global
|
||||
*
|
||||
* \subpage page_client
|
||||
*
|
||||
* \subpage page_resource
|
||||
*
|
||||
* \subpage page_node
|
||||
*
|
||||
* \subpage page_port
|
||||
*
|
||||
* \subpage page_link
|
||||
*/
|
||||
|
||||
/** \page page_context Context
|
||||
*
|
||||
* \section page_context_overview Overview
|
||||
*
|
||||
* The context object is an object that manages the state and
|
||||
* resources of a PipeWire instance.
|
||||
*/
|
||||
|
||||
/** context events emitted by the context object added with \ref pw_context_add_listener */
|
||||
struct pw_context_events {
|
||||
#define PW_VERSION_CONTEXT_EVENTS 0
|
||||
|
|
@ -187,6 +178,9 @@ int pw_context_set_object(struct pw_context *context, const char *type, void *va
|
|||
/** get an object from the context */
|
||||
void *pw_context_get_object(struct pw_context *context, const char *type);
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -31,15 +31,14 @@ extern "C" {
|
|||
|
||||
#include <spa/utils/hook.h>
|
||||
|
||||
/** \page page_control Control
|
||||
/** \defgroup pw_control Control
|
||||
*
|
||||
* \section page_control_overview Overview
|
||||
*
|
||||
* A control can be used to control a port property.
|
||||
* \brief A control can be used to control a port property.
|
||||
*/
|
||||
/** \class pw_control
|
||||
*
|
||||
* The control object
|
||||
|
||||
/**
|
||||
* \addtogroup pw_control
|
||||
* \{
|
||||
*/
|
||||
struct pw_control;
|
||||
|
||||
|
|
@ -72,6 +71,10 @@ void pw_control_add_listener(struct pw_control *control,
|
|||
const struct pw_control_events *events,
|
||||
void *data);
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -34,6 +34,18 @@ extern "C" {
|
|||
|
||||
#include <spa/utils/hook.h>
|
||||
|
||||
/** \defgroup pw_core The Core Global Object
|
||||
*
|
||||
* \brief The core global object.
|
||||
*
|
||||
* This is a special singleton object. It
|
||||
* is used for internal PipeWire protocol features.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup pw_core
|
||||
* \{
|
||||
*/
|
||||
#define PW_TYPE_INTERFACE_Core PW_TYPE_INFO_INTERFACE_BASE "Core"
|
||||
#define PW_TYPE_INTERFACE_Registry PW_TYPE_INFO_INTERFACE_BASE "Registry"
|
||||
|
||||
|
|
@ -51,7 +63,7 @@ struct pw_registry;
|
|||
/* invalid ID that matches any object when used for permissions */
|
||||
#define PW_ID_ANY (uint32_t)(0xffffffff)
|
||||
|
||||
/** The core information. Extra information can be added in later versions \memberof pw_introspect */
|
||||
/** The core information. Extra information can be added in later versions */
|
||||
struct pw_core_info {
|
||||
uint32_t id; /**< id of the global */
|
||||
uint32_t cookie; /**< a random cookie for identifying this instance of PipeWire */
|
||||
|
|
@ -69,23 +81,14 @@ struct pw_core_info {
|
|||
#include <pipewire/properties.h>
|
||||
#include <pipewire/proxy.h>
|
||||
|
||||
/** Update and existing \ref pw_core_info with \a update \memberof pw_introspect */
|
||||
/** Update and existing \ref pw_core_info with \a update */
|
||||
struct pw_core_info *
|
||||
pw_core_info_update(struct pw_core_info *info,
|
||||
const struct pw_core_info *update);
|
||||
|
||||
/** Free a \ref pw_core_info \memberof pw_introspect */
|
||||
/** Free a \ref pw_core_info */
|
||||
void pw_core_info_free(struct pw_core_info *info);
|
||||
|
||||
/**
|
||||
* \page page_iface_pw_core pw_core
|
||||
* \section page_iface_pw_core_desc Description
|
||||
*
|
||||
* The core global object. This is a special singleton object. It
|
||||
* is used for internal PipeWire protocol features.
|
||||
* \section page_iface_pw_core API
|
||||
*/
|
||||
|
||||
/** Core */
|
||||
|
||||
#define PW_CORE_EVENT_INFO 0
|
||||
|
|
@ -372,12 +375,14 @@ pw_core_create_object(struct pw_core *core,
|
|||
|
||||
#define pw_core_destroy(c,...) pw_core_method(c,destroy,0,__VA_ARGS__)
|
||||
|
||||
/** \page page_registry Registry
|
||||
*
|
||||
* \section page_registry_overview Overview
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
/** \defgroup pw_registry Registry
|
||||
*
|
||||
* The registry object is a singleton object that keeps track of
|
||||
* global objects on the PipeWire instance. See also \ref page_global.
|
||||
* global objects on the PipeWire instance. See also \ref pw_global.
|
||||
*
|
||||
* Global objects typically represent an actual object in PipeWire
|
||||
* (for example, a module or node) or they are singleton
|
||||
|
|
@ -404,6 +409,11 @@ pw_core_create_object(struct pw_core *core,
|
|||
* the access permissions on an object.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup pw_registry
|
||||
* \{
|
||||
*/
|
||||
|
||||
#define PW_REGISTRY_EVENT_GLOBAL 0
|
||||
#define PW_REGISTRY_EVENT_GLOBAL_REMOVE 1
|
||||
#define PW_REGISTRY_EVENT_NUM 2
|
||||
|
|
@ -504,9 +514,17 @@ pw_registry_bind(struct pw_registry *registry,
|
|||
|
||||
#define pw_registry_destroy(p,...) pw_registry_method(p,destroy,0,__VA_ARGS__)
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
/** Connect to a PipeWire instance \memberof pw_core
|
||||
* \return a pw_core on success or NULL with errno set on error. The core
|
||||
/**
|
||||
* \addtogroup pw_core
|
||||
* \{
|
||||
*/
|
||||
|
||||
/** Connect to a PipeWire instance
|
||||
* \return a \ref pw_core on success or NULL with errno set on error. The core
|
||||
* will have an id of PW_ID_CORE (0) */
|
||||
struct pw_core *
|
||||
pw_context_connect(struct pw_context *context, /**< a \ref pw_context */
|
||||
|
|
@ -514,7 +532,7 @@ pw_context_connect(struct pw_context *context, /**< a \ref pw_context */
|
|||
* the properties is taken.*/
|
||||
size_t user_data_size /**< extra user data size */);
|
||||
|
||||
/** Connect to a PipeWire instance on the given socket \memberof pw_core
|
||||
/** Connect to a PipeWire instance on the given socket
|
||||
* \param context a \ref pw_context
|
||||
* \param fd the connected socket to use, the socket will be closed
|
||||
* automatically on disconnect or error.
|
||||
|
|
@ -528,8 +546,8 @@ pw_context_connect_fd(struct pw_context *context,
|
|||
struct pw_properties *properties,
|
||||
size_t user_data_size);
|
||||
|
||||
/** Connect to a given PipeWire instance \memberof pw_core
|
||||
* \return a pw_core on success or NULL with errno set on error */
|
||||
/** Connect to a given PipeWire instance
|
||||
* \return a \ref pw_core on success or NULL with errno set on error */
|
||||
struct pw_core *
|
||||
pw_context_connect_self(struct pw_context *context, /**< a \ref pw_context to connect to */
|
||||
struct pw_properties *properties, /**< optional properties, ownership of
|
||||
|
|
@ -579,6 +597,9 @@ struct pw_proxy *pw_core_export(struct pw_core *core, /**< the core */
|
|||
void *object, /**< object to export */
|
||||
size_t user_data_size /**< extra user data */);
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
|
|
@ -147,7 +147,6 @@ error_cleanup:
|
|||
/** Create a new \ref pw_data_loop.
|
||||
* \return a newly allocated data loop
|
||||
*
|
||||
* \memberof pw_data_loop
|
||||
*/
|
||||
SPA_EXPORT
|
||||
struct pw_data_loop *pw_data_loop_new(const struct spa_dict *props)
|
||||
|
|
@ -158,7 +157,6 @@ struct pw_data_loop *pw_data_loop_new(const struct spa_dict *props)
|
|||
|
||||
/** Destroy a data loop
|
||||
* \param loop the data loop to destroy
|
||||
* \memberof pw_data_loop
|
||||
*/
|
||||
SPA_EXPORT
|
||||
void pw_data_loop_destroy(struct pw_data_loop *loop)
|
||||
|
|
@ -200,7 +198,6 @@ pw_data_loop_get_loop(struct pw_data_loop *loop)
|
|||
*
|
||||
* This will start the realtime thread that manages the loop.
|
||||
*
|
||||
* \memberof pw_data_loop
|
||||
*/
|
||||
SPA_EXPORT
|
||||
int pw_data_loop_start(struct pw_data_loop *loop)
|
||||
|
|
@ -224,7 +221,6 @@ int pw_data_loop_start(struct pw_data_loop *loop)
|
|||
*
|
||||
* This will stop and join the realtime thread that manages the loop.
|
||||
*
|
||||
* \memberof pw_data_loop
|
||||
*/
|
||||
SPA_EXPORT
|
||||
int pw_data_loop_stop(struct pw_data_loop *loop)
|
||||
|
|
@ -250,7 +246,6 @@ int pw_data_loop_stop(struct pw_data_loop *loop)
|
|||
* \param loop the data loop to check
|
||||
* \return true is the current thread is the data loop thread
|
||||
*
|
||||
* \memberof pw_data_loop
|
||||
*/
|
||||
SPA_EXPORT
|
||||
bool pw_data_loop_in_thread(struct pw_data_loop * loop)
|
||||
|
|
|
|||
|
|
@ -31,11 +31,16 @@ extern "C" {
|
|||
|
||||
#include <spa/utils/hook.h>
|
||||
|
||||
/** \class pw_data_loop
|
||||
/** \defgroup pw_data_loop PipeWire rt-loop object
|
||||
*
|
||||
* PipeWire rt-loop object. This loop starts a new real-time thread that
|
||||
* This loop starts a new real-time thread that
|
||||
* is designed to run the processing graph.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup pw_data_loop
|
||||
* \{
|
||||
*/
|
||||
struct pw_data_loop;
|
||||
|
||||
#include <pipewire/loop.h>
|
||||
|
|
@ -88,6 +93,10 @@ int pw_data_loop_invoke(struct pw_data_loop *loop,
|
|||
spa_invoke_func_t func, uint32_t seq, const void *data, size_t size,
|
||||
bool block, void *user_data);
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ extern "C" {
|
|||
#define PW_VERSION_DEVICE 3
|
||||
struct pw_device;
|
||||
|
||||
/** The device information. Extra information can be added in later versions \memberof pw_introspect */
|
||||
/** The device information. Extra information can be added in later versions */
|
||||
struct pw_device_info {
|
||||
uint32_t id; /**< id of the global */
|
||||
#define PW_DEVICE_CHANGE_MASK_PROPS (1 << 0)
|
||||
|
|
@ -51,12 +51,12 @@ struct pw_device_info {
|
|||
uint32_t n_params; /**< number of items in \a params */
|
||||
};
|
||||
|
||||
/** Update and existing \ref pw_device_info with \a update \memberof pw_introspect */
|
||||
/** Update and existing \ref pw_device_info with \a update */
|
||||
struct pw_device_info *
|
||||
pw_device_info_update(struct pw_device_info *info,
|
||||
const struct pw_device_info *update);
|
||||
|
||||
/** Free a \ref pw_device_info \memberof pw_introspect */
|
||||
/** Free a \ref pw_device_info */
|
||||
void pw_device_info_free(struct pw_device_info *info);
|
||||
|
||||
#define PW_DEVICE_EVENT_INFO 0
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** \class pw_filter
|
||||
/** \defgroup pw_filter Pipewire Filter
|
||||
*
|
||||
* \brief PipeWire filter object class
|
||||
*
|
||||
|
|
@ -38,6 +38,11 @@ extern "C" {
|
|||
*
|
||||
* See also \ref page_core_api
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup pw_filter
|
||||
* \{
|
||||
*/
|
||||
struct pw_filter;
|
||||
|
||||
#include <spa/buffer/buffer.h>
|
||||
|
|
@ -47,7 +52,7 @@ struct pw_filter;
|
|||
#include <pipewire/core.h>
|
||||
#include <pipewire/stream.h>
|
||||
|
||||
/** \enum pw_filter_state The state of a filter \memberof pw_filter */
|
||||
/** \enum pw_filter_state The state of a filter */
|
||||
enum pw_filter_state {
|
||||
PW_FILTER_STATE_ERROR = -1, /**< the stream is in error */
|
||||
PW_FILTER_STATE_UNCONNECTED = 0, /**< unconnected */
|
||||
|
|
@ -100,10 +105,10 @@ struct pw_filter_events {
|
|||
void (*drained) (void *data);
|
||||
};
|
||||
|
||||
/** Convert a filter state to a readable string \memberof pw_filter */
|
||||
/** Convert a filter state to a readable string */
|
||||
const char * pw_filter_state_as_string(enum pw_filter_state state);
|
||||
|
||||
/** \enum pw_filter_flags Extra flags that can be used in \ref pw_filter_connect() \memberof pw_filter */
|
||||
/** \enum pw_filter_flags Extra flags that can be used in \ref pw_filter_connect() */
|
||||
enum pw_filter_flags {
|
||||
PW_FILTER_FLAG_NONE = 0, /**< no flags */
|
||||
PW_FILTER_FLAG_INACTIVE = (1 << 0), /**< start the filter inactive,
|
||||
|
|
@ -122,7 +127,7 @@ enum pw_filter_port_flags {
|
|||
* data of the buffer should be set */
|
||||
};
|
||||
|
||||
/** Create a new unconneced \ref pw_filter \memberof pw_filter
|
||||
/** Create a new unconneced \ref pw_filter
|
||||
* \return a newly allocated \ref pw_filter */
|
||||
struct pw_filter *
|
||||
pw_filter_new(struct pw_core *core, /**< a \ref pw_core */
|
||||
|
|
@ -136,7 +141,7 @@ pw_filter_new_simple(struct pw_loop *loop, /**< a \ref pw_loop to use */
|
|||
const struct pw_filter_events *events, /**< filter events */
|
||||
void *data /**< data passed to events */);
|
||||
|
||||
/** Destroy a filter \memberof pw_filter */
|
||||
/** Destroy a filter */
|
||||
void pw_filter_destroy(struct pw_filter *filter);
|
||||
|
||||
void pw_filter_add_listener(struct pw_filter *filter,
|
||||
|
|
@ -150,7 +155,7 @@ const char *pw_filter_get_name(struct pw_filter *filter);
|
|||
|
||||
struct pw_core *pw_filter_get_core(struct pw_filter *filter);
|
||||
|
||||
/** Connect a filter for processing. \memberof pw_filter
|
||||
/** Connect a filter for processing.
|
||||
* \return 0 on success < 0 on error.
|
||||
*
|
||||
* You should connect to the process event and use pw_filter_dequeue_buffer()
|
||||
|
|
@ -161,12 +166,12 @@ pw_filter_connect(struct pw_filter *filter, /**< a \ref pw_filter */
|
|||
const struct spa_pod **params, /**< an array with params. */
|
||||
uint32_t n_params /**< number of items in \a params */);
|
||||
|
||||
/** Get the node ID of the filter. \memberof pw_filter
|
||||
/** Get the node ID of the filter.
|
||||
* \return node ID. */
|
||||
uint32_t
|
||||
pw_filter_get_node_id(struct pw_filter *filter);
|
||||
|
||||
/** Disconnect \a filter \memberof pw_filter */
|
||||
/** Disconnect \a filter */
|
||||
int pw_filter_disconnect(struct pw_filter *filter);
|
||||
|
||||
/** add a port to the filter, returns user data of port_data_size. */
|
||||
|
|
@ -206,7 +211,7 @@ pw_filter_update_params(struct pw_filter *filter, /**< a \ref pw_filter */
|
|||
|
||||
|
||||
#if 0
|
||||
/** A time structure \memberof pw_filter */
|
||||
/** A time structure */
|
||||
struct pw_time {
|
||||
int64_t now; /**< the monotonic time */
|
||||
struct spa_fraction rate; /**< the rate of \a ticks and delay */
|
||||
|
|
@ -215,7 +220,7 @@ struct pw_time {
|
|||
};
|
||||
#endif
|
||||
|
||||
/** Query the time on the filter \memberof pw_filter */
|
||||
/** Query the time on the filter */
|
||||
int pw_filter_get_time(struct pw_filter *filter, struct pw_time *time);
|
||||
|
||||
/** Get a buffer that can be filled for output ports or consumed
|
||||
|
|
@ -228,13 +233,17 @@ int pw_filter_queue_buffer(void *port_data, struct pw_buffer *buffer);
|
|||
/** Get a data pointer to the buffer data */
|
||||
void *pw_filter_get_dsp_buffer(void *port_data, uint32_t n_samples);
|
||||
|
||||
/** Activate or deactivate the filter \memberof pw_filter */
|
||||
/** Activate or deactivate the filter */
|
||||
int pw_filter_set_active(struct pw_filter *filter, bool active);
|
||||
|
||||
/** Flush a filter. When \a drain is true, the drained callback will
|
||||
* be called when all data is played or recorded */
|
||||
int pw_filter_flush(struct pw_filter *filter, bool drain);
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -39,8 +39,8 @@
|
|||
struct impl {
|
||||
struct pw_global this;
|
||||
};
|
||||
|
||||
/** \endcond */
|
||||
|
||||
SPA_EXPORT
|
||||
uint32_t pw_global_get_permissions(struct pw_global *global, struct pw_impl_client *client)
|
||||
{
|
||||
|
|
@ -60,7 +60,6 @@ uint32_t pw_global_get_permissions(struct pw_global *global, struct pw_impl_clie
|
|||
* \param object the associated object
|
||||
* \return a result global
|
||||
*
|
||||
* \memberof pw_global
|
||||
*/
|
||||
SPA_EXPORT
|
||||
struct pw_global *
|
||||
|
|
@ -122,7 +121,6 @@ error_cleanup:
|
|||
* \param global a global to add
|
||||
* \return 0 on success < 0 errno value on failure
|
||||
*
|
||||
* \memberof pw_global
|
||||
*/
|
||||
SPA_EXPORT
|
||||
int pw_global_register(struct pw_global *global)
|
||||
|
|
@ -275,7 +273,6 @@ void pw_global_add_listener(struct pw_global *global,
|
|||
* After binding, the client and the global object will be able to
|
||||
* exchange messages on the proxy/resource with \a id.
|
||||
*
|
||||
* \memberof pw_global
|
||||
*/
|
||||
SPA_EXPORT int
|
||||
pw_global_bind(struct pw_global *global, struct pw_impl_client *client, uint32_t permissions,
|
||||
|
|
@ -368,7 +365,6 @@ int pw_global_update_permissions(struct pw_global *global, struct pw_impl_client
|
|||
*
|
||||
* \param global a global to destroy
|
||||
*
|
||||
* \memberof pw_global
|
||||
*/
|
||||
SPA_EXPORT
|
||||
void pw_global_destroy(struct pw_global *global)
|
||||
|
|
|
|||
|
|
@ -29,7 +29,12 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** \page page_global Global
|
||||
/** \defgroup pw_global Global Object
|
||||
*
|
||||
* \brief A global object visible to remote clients
|
||||
*
|
||||
* A global object is visible to remote clients and represents a resource
|
||||
* that can be used or inspected.
|
||||
*
|
||||
* Global objects represent resources that are available on the PipeWire
|
||||
* context and are accessible to remote clients.
|
||||
|
|
@ -37,19 +42,17 @@ extern "C" {
|
|||
* clients.
|
||||
*
|
||||
* Remote clients receives a list of globals when it binds to the registry
|
||||
* object. See \ref page_registry.
|
||||
* object. See \ref pw_registry.
|
||||
*
|
||||
* A client can bind to a global to send methods or receive events from
|
||||
* the global.
|
||||
*
|
||||
* See \ref page_proxy
|
||||
*/
|
||||
/** \class pw_global
|
||||
*
|
||||
* \brief A global object visible to remote clients
|
||||
*
|
||||
* A global object is visible to remote clients and represents a resource
|
||||
* that can be used or inspected.
|
||||
*
|
||||
* See \ref page_remote_api
|
||||
|
||||
/**
|
||||
* \addtogroup pw_global
|
||||
* \{
|
||||
*/
|
||||
struct pw_global;
|
||||
|
||||
|
|
@ -148,6 +151,10 @@ int pw_global_update_permissions(struct pw_global *global, struct pw_impl_client
|
|||
/** Destroy a global */
|
||||
void pw_global_destroy(struct pw_global *global);
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -377,7 +377,6 @@ static const struct pw_context_events context_events = {
|
|||
* \param properties optional client properties, ownership is taken
|
||||
* \return a newly allocated client object
|
||||
*
|
||||
* \memberof pw_impl_client
|
||||
*/
|
||||
SPA_EXPORT
|
||||
struct pw_impl_client *pw_context_create_client(struct pw_impl_core *core,
|
||||
|
|
@ -570,7 +569,6 @@ static int destroy_resource(void *object, void *data)
|
|||
*
|
||||
* \param client the client to destroy
|
||||
*
|
||||
* \memberof pw_impl_client
|
||||
*/
|
||||
SPA_EXPORT
|
||||
void pw_impl_client_destroy(struct pw_impl_client *client)
|
||||
|
|
@ -632,7 +630,6 @@ const struct pw_client_info *pw_impl_client_get_info(struct pw_impl_client *clie
|
|||
* properties are overwritten. Items can be removed by setting the value
|
||||
* to NULL.
|
||||
*
|
||||
* \memberof pw_impl_client
|
||||
*/
|
||||
SPA_EXPORT
|
||||
int pw_impl_client_update_properties(struct pw_impl_client *client, const struct spa_dict *dict)
|
||||
|
|
|
|||
|
|
@ -31,24 +31,6 @@ extern "C" {
|
|||
|
||||
#include <spa/utils/hook.h>
|
||||
|
||||
/** \class pw_impl_client
|
||||
*
|
||||
* \brief PipeWire client object class.
|
||||
*
|
||||
* The client object represents a client connection with the PipeWire
|
||||
* server.
|
||||
*
|
||||
* Each client has its own list of resources it is bound to along with
|
||||
* a mapping between the client types and server types.
|
||||
*/
|
||||
struct pw_impl_client;
|
||||
|
||||
#include <pipewire/context.h>
|
||||
#include <pipewire/global.h>
|
||||
#include <pipewire/properties.h>
|
||||
#include <pipewire/resource.h>
|
||||
#include <pipewire/permission.h>
|
||||
|
||||
/** \page page_client Client
|
||||
*
|
||||
* \section sec_page_client_overview Overview
|
||||
|
|
@ -76,9 +58,32 @@ struct pw_impl_client;
|
|||
* When a client binds to context global object, a resource is made for this
|
||||
* binding and a unique id is assigned to the resources. The client and
|
||||
* server will use this id as the destination when exchanging messages.
|
||||
* See also \ref page_resource
|
||||
* See also \ref pw_resource
|
||||
*/
|
||||
|
||||
/** \defgroup pw_impl_client Client Object
|
||||
*
|
||||
* \brief PipeWire client object class
|
||||
*
|
||||
* The client object represents a client connection with the PipeWire
|
||||
* server.
|
||||
*
|
||||
* Each client has its own list of resources it is bound to along with
|
||||
* a mapping between the client types and server types.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup pw_impl_client
|
||||
* \{
|
||||
*/
|
||||
struct pw_impl_client;
|
||||
|
||||
#include <pipewire/context.h>
|
||||
#include <pipewire/global.h>
|
||||
#include <pipewire/properties.h>
|
||||
#include <pipewire/resource.h>
|
||||
#include <pipewire/permission.h>
|
||||
|
||||
/** The events that a client can emit */
|
||||
struct pw_impl_client_events {
|
||||
#define PW_VERSION_IMPL_CLIENT_EVENTS 0
|
||||
|
|
@ -167,6 +172,10 @@ void pw_impl_client_add_listener(struct pw_impl_client *client,
|
|||
* started and no further processing is allowed to happen for the client */
|
||||
void pw_impl_client_set_busy(struct pw_impl_client *client, bool busy);
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -29,12 +29,18 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** \class pw_impl_core
|
||||
/** \defgroup pw_impl_core Pipewire Core Interface
|
||||
*
|
||||
* \brief PipeWire core interface.
|
||||
*
|
||||
* The core is used to make objects on demand.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup pw_impl_core
|
||||
* \{
|
||||
*/
|
||||
|
||||
struct pw_impl_core;
|
||||
|
||||
#include <pipewire/context.h>
|
||||
|
|
@ -87,6 +93,10 @@ void pw_impl_core_add_listener(struct pw_impl_core *core,
|
|||
const struct pw_impl_core_events *events,
|
||||
void *data);
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -29,9 +29,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** \class pw_impl_device
|
||||
*
|
||||
* \brief PipeWire device interface.
|
||||
/** \defgroup pw_impl_device Pipewire Device Interface
|
||||
*
|
||||
* The device is an object that manages nodes. It typically
|
||||
* corresponds to a physical hardware device but it does not
|
||||
|
|
@ -40,6 +38,11 @@ extern "C" {
|
|||
* The purpose of the device is to provide an interface to
|
||||
* dynamically create/remove/configure the nodes it manages.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup pw_impl_device
|
||||
* \{
|
||||
*/
|
||||
struct pw_impl_device;
|
||||
|
||||
#include <spa/monitor/device.h>
|
||||
|
|
@ -102,6 +105,10 @@ int pw_impl_device_for_each_param(struct pw_impl_device *device,
|
|||
uint32_t id, uint32_t index, uint32_t next,
|
||||
struct spa_pod *param),
|
||||
void *data);
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -282,7 +282,7 @@ void *pw_impl_factory_create_object(struct pw_impl_factory *factory,
|
|||
* Find in the list of factories registered in \a context for one with
|
||||
* the given \a name.
|
||||
*
|
||||
* \memberof pw_context
|
||||
* \ingroup pw_context
|
||||
*/
|
||||
SPA_EXPORT
|
||||
struct pw_impl_factory *pw_context_find_factory(struct pw_context *context,
|
||||
|
|
|
|||
|
|
@ -29,12 +29,15 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** \class pw_impl_factory
|
||||
*
|
||||
* \brief PipeWire factory interface.
|
||||
/** \defgroup pw_impl_factory Pipewire Factory Interface
|
||||
*
|
||||
* The factory is used to make objects on demand.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup pw_impl_factory
|
||||
* \{
|
||||
*/
|
||||
struct pw_impl_factory;
|
||||
|
||||
#include <pipewire/context.h>
|
||||
|
|
@ -117,6 +120,10 @@ struct pw_impl_factory *
|
|||
pw_context_find_factory(struct pw_context *context /**< the context */,
|
||||
const char *name /**< the factory name */);
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -29,26 +29,20 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** \class pw_impl_link
|
||||
/** \defgroup pw_impl_link Link Objects
|
||||
*
|
||||
* PipeWire link object.
|
||||
* \brief PipeWire link object.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup pw_impl_link
|
||||
* \{
|
||||
*/
|
||||
struct pw_impl_link;
|
||||
struct pw_impl_port;
|
||||
|
||||
#include <pipewire/impl.h>
|
||||
|
||||
/** \page page_link Link
|
||||
*
|
||||
* \section page_link_overview Overview
|
||||
*
|
||||
* A link is the connection between 2 nodes (\ref page_node). Nodes are
|
||||
* linked together on ports.
|
||||
*
|
||||
* The link is responsible for negotiating the format and buffers for
|
||||
* the nodes.
|
||||
*/
|
||||
|
||||
/** link events added with \ref pw_impl_link_add_listener */
|
||||
struct pw_impl_link_events {
|
||||
#define PW_VERSION_IMPL_LINK_EVENTS 0
|
||||
|
|
@ -76,7 +70,7 @@ struct pw_impl_link_events {
|
|||
};
|
||||
|
||||
|
||||
/** Make a new link between two ports \memberof pw_impl_link
|
||||
/** Make a new link between two ports
|
||||
* \return a newly allocated link */
|
||||
struct pw_impl_link *
|
||||
pw_context_create_link(struct pw_context *context, /**< the context object */
|
||||
|
|
@ -86,7 +80,7 @@ pw_context_create_link(struct pw_context *context, /**< the context object */
|
|||
struct pw_properties *properties /**< extra properties */,
|
||||
size_t user_data_size /**< extra user data size */);
|
||||
|
||||
/** Destroy a link \memberof pw_impl_link */
|
||||
/** Destroy a link */
|
||||
void pw_impl_link_destroy(struct pw_impl_link *link);
|
||||
|
||||
/** Add an event listener to \a link */
|
||||
|
|
@ -118,9 +112,13 @@ struct pw_impl_port *pw_impl_link_get_output(struct pw_impl_link *link);
|
|||
/** Get the input port of the link */
|
||||
struct pw_impl_port *pw_impl_link_get_input(struct pw_impl_link *link);
|
||||
|
||||
/** Find the link between 2 ports \memberof pw_impl_link */
|
||||
/** Find the link between 2 ports */
|
||||
struct pw_impl_link *pw_impl_link_find(struct pw_impl_port *output, struct pw_impl_port *input);
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -152,7 +152,6 @@ static const struct pw_global_events global_events = {
|
|||
* \param properties extra global properties
|
||||
* \return A \ref pw_impl_module if the module could be loaded, or NULL on failure.
|
||||
*
|
||||
* \memberof pw_impl_module
|
||||
*/
|
||||
SPA_EXPORT
|
||||
struct pw_impl_module *
|
||||
|
|
@ -300,7 +299,6 @@ error_cleanup:
|
|||
|
||||
/** Destroy a module
|
||||
* \param module the module to destroy
|
||||
* \memberof pw_impl_module
|
||||
*/
|
||||
SPA_EXPORT
|
||||
void pw_impl_module_destroy(struct pw_impl_module *module)
|
||||
|
|
|
|||
|
|
@ -37,10 +37,15 @@ extern "C" {
|
|||
#define PIPEWIRE_SYMBOL_MODULE_INIT "pipewire__module_init"
|
||||
#define PIPEWIRE_MODULE_PREFIX "libpipewire-"
|
||||
|
||||
/** \class pw_impl_module
|
||||
/** \defgroup pw_impl_module Dynamically loadable Module
|
||||
*
|
||||
* A dynamically loadable module
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogropu pw_impl_module
|
||||
* \{
|
||||
*/
|
||||
struct pw_impl_module;
|
||||
|
||||
/** Module init function signature
|
||||
|
|
@ -51,8 +56,6 @@ struct pw_impl_module;
|
|||
*
|
||||
* A module should provide an init function with this signature. This function
|
||||
* will be called when a module is loaded.
|
||||
*
|
||||
* \memberof pw_impl_module
|
||||
*/
|
||||
typedef int (*pw_impl_module_init_func_t) (struct pw_impl_module *module, const char *args);
|
||||
|
||||
|
|
@ -103,6 +106,10 @@ void pw_impl_module_add_listener(struct pw_impl_module *module,
|
|||
/** Destroy a module */
|
||||
void pw_impl_module_destroy(struct pw_impl_module *module);
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1715,8 +1715,6 @@ void pw_impl_node_add_listener(struct pw_impl_node *node,
|
|||
*
|
||||
* Remove \a node. This will stop the transfer on the node and
|
||||
* free the resources allocated by \a node.
|
||||
*
|
||||
* \memberof pw_impl_node
|
||||
*/
|
||||
SPA_EXPORT
|
||||
void pw_impl_node_destroy(struct pw_impl_node *node)
|
||||
|
|
@ -2067,8 +2065,6 @@ static void node_activate(struct pw_impl_node *this)
|
|||
* \return 0 on success < 0 on error
|
||||
*
|
||||
* Set the state of \a node to \a state.
|
||||
*
|
||||
* \memberof pw_impl_node
|
||||
*/
|
||||
SPA_EXPORT
|
||||
int pw_impl_node_set_state(struct pw_impl_node *node, enum pw_node_state state)
|
||||
|
|
|
|||
|
|
@ -29,17 +29,15 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** \page page_node Node
|
||||
*
|
||||
* \section page_node_overview Overview
|
||||
/** \defgroup pw_impl_node Node
|
||||
*
|
||||
* The node object processes data. The node has a list of
|
||||
* input and output ports (\ref page_port) on which it
|
||||
* input and output ports (\ref pw_impl_port) on which it
|
||||
* will receive and send out buffers respectively.
|
||||
*/
|
||||
/** \class pw_impl_node
|
||||
*
|
||||
* PipeWire node class.
|
||||
/**
|
||||
* \addtogroup pw_impl_node
|
||||
* \{
|
||||
*/
|
||||
struct pw_impl_node;
|
||||
struct pw_impl_port;
|
||||
|
|
@ -97,7 +95,7 @@ struct pw_impl_node_events {
|
|||
void (*peer_removed) (void *data, struct pw_impl_node *peer);
|
||||
};
|
||||
|
||||
/** Create a new node \memberof pw_impl_node */
|
||||
/** Create a new node */
|
||||
struct pw_impl_node *
|
||||
pw_context_create_node(struct pw_context *context, /**< the context */
|
||||
struct pw_properties *properties, /**< extra properties */
|
||||
|
|
@ -175,6 +173,10 @@ int pw_impl_node_set_active(struct pw_impl_node *node, bool active);
|
|||
/** Check if a node is active */
|
||||
bool pw_impl_node_is_active(struct pw_impl_node *node);
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -31,15 +31,14 @@ extern "C" {
|
|||
|
||||
#include <spa/utils/hook.h>
|
||||
|
||||
/** \page page_port Port
|
||||
/** \defgroup pw_impl_port Port Object
|
||||
*
|
||||
* \section page_node_overview Overview
|
||||
*
|
||||
* A port can be used to link two nodes.
|
||||
* \brief A port can be used to link two nodes.
|
||||
*/
|
||||
/** \class pw_impl_port
|
||||
*
|
||||
* The port object
|
||||
|
||||
/**
|
||||
* \addtogroup pw_impl_port
|
||||
* \{
|
||||
*/
|
||||
struct pw_impl_port;
|
||||
struct pw_impl_link;
|
||||
|
|
@ -92,7 +91,7 @@ struct pw_impl_port_events {
|
|||
void (*param_changed) (void *data, uint32_t id);
|
||||
};
|
||||
|
||||
/** Create a new port \memberof pw_impl_port
|
||||
/** Create a new port
|
||||
* \return a newly allocated port */
|
||||
struct pw_impl_port *
|
||||
pw_context_create_port(struct pw_context *context,
|
||||
|
|
@ -122,7 +121,7 @@ struct pw_impl_node *pw_impl_port_get_node(struct pw_impl_port *port);
|
|||
/** check is a port has links, return 0 if not, 1 if it is linked */
|
||||
int pw_impl_port_is_linked(struct pw_impl_port *port);
|
||||
|
||||
/** Add a port to a node \memberof pw_impl_port */
|
||||
/** Add a port to a node */
|
||||
int pw_impl_port_add(struct pw_impl_port *port, struct pw_impl_node *node);
|
||||
|
||||
/** Add an event listener on the port */
|
||||
|
|
@ -131,6 +130,10 @@ void pw_impl_port_add_listener(struct pw_impl_port *port,
|
|||
const struct pw_impl_port_events *events,
|
||||
void *data);
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -29,6 +29,28 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** \page page_implementation_api Implementation API
|
||||
*
|
||||
* The implementation API provides the tools to build new objects and
|
||||
+ * modules. It consists of the following object-specific APIs:
|
||||
*
|
||||
* - \ref pw_impl_core
|
||||
* - \ref pw_impl_client
|
||||
* - \ref pw_impl_device
|
||||
* - \ref pw_impl_factory
|
||||
* - \ref pw_impl_link
|
||||
* - \ref pw_impl_module
|
||||
* - \ref pw_impl_node
|
||||
* - \ref pw_impl_port
|
||||
* - \ref pw_control
|
||||
* - \ref pw_global
|
||||
* - \ref pw_global
|
||||
* - \ref pw_resource
|
||||
* - \ref pw_work_queue
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
struct pw_impl_client;
|
||||
struct pw_impl_module;
|
||||
struct pw_global;
|
||||
|
|
|
|||
|
|
@ -34,6 +34,21 @@ extern "C" {
|
|||
|
||||
#include <pipewire/proxy.h>
|
||||
|
||||
/** \defgroup pw_link Pipewire Link
|
||||
*
|
||||
* A link is the connection between 2 nodes (\ref pw_node). Nodes are
|
||||
* linked together on ports.
|
||||
*
|
||||
* The link is responsible for negotiating the format and buffers for
|
||||
* the nodes.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup pw_link
|
||||
* \{
|
||||
*/
|
||||
|
||||
#define PW_TYPE_INTERFACE_Link PW_TYPE_INFO_INTERFACE_BASE "Link"
|
||||
|
||||
#define PW_VERSION_LINK 3
|
||||
|
|
@ -50,7 +65,7 @@ enum pw_link_state {
|
|||
PW_LINK_STATE_ACTIVE = 4, /**< the link is active */
|
||||
};
|
||||
|
||||
/** Convert a \ref pw_link_state to a readable string \memberof pw_link */
|
||||
/** Convert a \ref pw_link_state to a readable string */
|
||||
const char * pw_link_state_as_string(enum pw_link_state state);
|
||||
/** The link information. Extra information can be added in later versions \memberof pw_introspect */
|
||||
struct pw_link_info {
|
||||
|
|
@ -118,6 +133,10 @@ struct pw_link_methods {
|
|||
|
||||
#define pw_link_add_listener(c,...) pw_link_method(c,add_listener,0,__VA_ARGS__)
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@ static struct spa_log *global_log = &default_log.log;
|
|||
|
||||
/** Set the global log interface
|
||||
* \param log the global log to set
|
||||
* \memberof pw_log
|
||||
*/
|
||||
SPA_EXPORT
|
||||
void pw_log_set(struct spa_log *log)
|
||||
|
|
@ -58,7 +57,6 @@ bool pw_log_is_default(void)
|
|||
|
||||
/** Get the global log interface
|
||||
* \return the global log
|
||||
* \memberof pw_log
|
||||
*/
|
||||
SPA_EXPORT
|
||||
struct spa_log *pw_log_get(void)
|
||||
|
|
@ -68,7 +66,6 @@ struct spa_log *pw_log_get(void)
|
|||
|
||||
/** Set the global log level
|
||||
* \param level the new log level
|
||||
* \memberof pw_log
|
||||
*/
|
||||
SPA_EXPORT
|
||||
void pw_log_set_level(enum spa_log_level level)
|
||||
|
|
@ -85,7 +82,6 @@ void pw_log_set_level(enum spa_log_level level)
|
|||
* \param fmt the printf style format
|
||||
* \param ... printf style arguments to log
|
||||
*
|
||||
* \memberof pw_log
|
||||
*/
|
||||
SPA_EXPORT
|
||||
void
|
||||
|
|
@ -113,7 +109,6 @@ pw_log_log(enum spa_log_level level,
|
|||
* \param fmt the printf style format
|
||||
* \param args a va_list of arguments
|
||||
*
|
||||
* \memberof pw_log
|
||||
*/
|
||||
SPA_EXPORT
|
||||
void
|
||||
|
|
@ -135,32 +130,27 @@ pw_log_logv(enum spa_log_level level,
|
|||
* Log an error message
|
||||
* \param format a printf style format
|
||||
* \param ... printf style arguments
|
||||
* \memberof pw_log
|
||||
*/
|
||||
/** \fn void pw_log_warn (const char *format, ...)
|
||||
* Log a warning message
|
||||
* \param format a printf style format
|
||||
* \param ... printf style arguments
|
||||
* \memberof pw_log
|
||||
*/
|
||||
/** \fn void pw_log_info (const char *format, ...)
|
||||
* Log an info message
|
||||
* \param format a printf style format
|
||||
* \param ... printf style arguments
|
||||
* \memberof pw_log
|
||||
*/
|
||||
/** \fn void pw_log_debug (const char *format, ...)
|
||||
* Log a debug message
|
||||
* \param format a printf style format
|
||||
* \param ... printf style arguments
|
||||
* \memberof pw_log
|
||||
*/
|
||||
/** \fn void pw_log_trace (const char *format, ...)
|
||||
* Log a trace message. Trace messages may be generated from
|
||||
* \param format a printf style format
|
||||
* \param ... printf style arguments
|
||||
* realtime threads
|
||||
* \memberof pw_log
|
||||
*/
|
||||
|
||||
struct log_ctx {
|
||||
|
|
|
|||
|
|
@ -31,15 +31,19 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** \class pw_log
|
||||
/** \defgroup pw_log Logging
|
||||
*
|
||||
* Logging functions of PipeWire
|
||||
* \brief Logging functions of PipeWire
|
||||
*
|
||||
* Logging is performed to stdout and stderr. Trace logging is performed
|
||||
* in a lockfree ringbuffer and written out from the main thread as to not
|
||||
* block the realtime threads.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup pw_array
|
||||
* \{
|
||||
*/
|
||||
/** The global log level */
|
||||
extern enum spa_log_level pw_log_level;
|
||||
|
||||
|
|
@ -70,7 +74,7 @@ pw_log_logv(enum spa_log_level level,
|
|||
const char *fmt, va_list args) SPA_PRINTF_FUNC(5, 0);
|
||||
|
||||
|
||||
/** Check if a loglevel is enabled \memberof pw_log */
|
||||
/** Check if a loglevel is enabled */
|
||||
#define pw_log_level_enabled(lev) (pw_log_level >= (lev))
|
||||
|
||||
#define pw_log(lev,...) \
|
||||
|
|
@ -91,6 +95,10 @@ pw_log_logv(enum spa_log_level level,
|
|||
#define pw_log_trace_fp(...)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -32,12 +32,18 @@ extern "C" {
|
|||
#include <spa/support/loop.h>
|
||||
#include <spa/utils/dict.h>
|
||||
|
||||
/** \class pw_loop
|
||||
/** \defgroup pw_loop Pipewire Loop
|
||||
*
|
||||
* PipeWire loop object provides an implementation of
|
||||
* the spa loop interfaces. It can be used to implement various
|
||||
* event loops.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup pw_loop
|
||||
* \{
|
||||
*/
|
||||
|
||||
struct pw_loop {
|
||||
struct spa_system *system; /**< system utils */
|
||||
struct spa_loop *loop; /**< wrapped loop */
|
||||
|
|
@ -73,6 +79,10 @@ pw_loop_destroy(struct pw_loop *loop);
|
|||
#define pw_loop_add_signal(l,...) spa_loop_utils_add_signal((l)->utils,__VA_ARGS__)
|
||||
#define pw_loop_destroy_source(l,...) spa_loop_utils_destroy_source((l)->utils,__VA_ARGS__)
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -81,7 +81,6 @@ error_cleanup:
|
|||
/** Create a new main loop
|
||||
* \return a newly allocated \ref pw_main_loop
|
||||
*
|
||||
* \memberof pw_main_loop
|
||||
*/
|
||||
SPA_EXPORT
|
||||
struct pw_main_loop *pw_main_loop_new(const struct spa_dict *props)
|
||||
|
|
@ -92,7 +91,6 @@ struct pw_main_loop *pw_main_loop_new(const struct spa_dict *props)
|
|||
/** Destroy a main loop
|
||||
* \param loop the main loop to destroy
|
||||
*
|
||||
* \memberof pw_main_loop
|
||||
*/
|
||||
SPA_EXPORT
|
||||
void pw_main_loop_destroy(struct pw_main_loop *loop)
|
||||
|
|
@ -128,7 +126,6 @@ struct pw_loop * pw_main_loop_get_loop(struct pw_main_loop *loop)
|
|||
*
|
||||
* The call to \ref pw_main_loop_run() will return
|
||||
*
|
||||
* \memberof pw_main_loop
|
||||
*/
|
||||
SPA_EXPORT
|
||||
int pw_main_loop_quit(struct pw_main_loop *loop)
|
||||
|
|
@ -143,7 +140,6 @@ int pw_main_loop_quit(struct pw_main_loop *loop)
|
|||
* Start running \a loop. This function blocks until \ref pw_main_loop_quit()
|
||||
* has been called
|
||||
*
|
||||
* \memberof pw_main_loop
|
||||
*/
|
||||
SPA_EXPORT
|
||||
int pw_main_loop_run(struct pw_main_loop *loop)
|
||||
|
|
|
|||
|
|
@ -29,13 +29,17 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** \class pw_main_loop
|
||||
*
|
||||
* \brief PipeWire main-loop interface.
|
||||
/** \defgroup pw_main_loop Pipewire Main-Loop Interface
|
||||
*
|
||||
* A main loop object
|
||||
*/
|
||||
/** A main loop object \memberof pw_main_loop */
|
||||
|
||||
/**
|
||||
* \addtogroup pw_main_loop
|
||||
* \{
|
||||
*/
|
||||
|
||||
/** A main loop object */
|
||||
struct pw_main_loop;
|
||||
|
||||
#include <pipewire/loop.h>
|
||||
|
|
@ -71,6 +75,10 @@ int pw_main_loop_run(struct pw_main_loop *loop);
|
|||
/** Quit a main loop */
|
||||
int pw_main_loop_quit(struct pw_main_loop *loop);
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -35,18 +35,23 @@ extern "C" {
|
|||
#include <spa/utils/defs.h>
|
||||
#include <pipewire/array.h>
|
||||
|
||||
/** \class pw_map
|
||||
/** \defgroup pw_map Map Objects
|
||||
*
|
||||
* A map that holds objects indexed by id
|
||||
* \brief A map that holds objects indexed by id
|
||||
*/
|
||||
|
||||
/** An entry in the map \memberof pw_map */
|
||||
/**
|
||||
* \addtogroup pw_map
|
||||
* \{
|
||||
*/
|
||||
|
||||
/** An entry in the map */
|
||||
union pw_map_item {
|
||||
uint32_t next; /**< next free index */
|
||||
void *data; /**< data of this item, must be an even address */
|
||||
};
|
||||
|
||||
/** A map \memberof pw_map */
|
||||
/** A map */
|
||||
struct pw_map {
|
||||
struct pw_array items; /**< an array with the map items */
|
||||
uint32_t free_list; /**< the free items */
|
||||
|
|
@ -62,16 +67,15 @@ struct pw_map {
|
|||
#define pw_map_has_item(m,id) (pw_map_check_id(m,id) && !pw_map_id_is_free(m, id))
|
||||
#define pw_map_lookup_unchecked(m,id) pw_map_get_item(m,id)->data
|
||||
|
||||
/** Convert an id to a pointer that can be inserted into the map \memberof pw_map */
|
||||
/** Convert an id to a pointer that can be inserted into the map */
|
||||
#define PW_MAP_ID_TO_PTR(id) (SPA_UINT32_TO_PTR((id)<<1))
|
||||
/** Convert a pointer to an id that can be retrieved from the map \memberof pw_map */
|
||||
/** Convert a pointer to an id that can be retrieved from the map */
|
||||
#define PW_MAP_PTR_TO_ID(p) (SPA_PTR_TO_UINT32(p)>>1)
|
||||
|
||||
/** Initialize a map
|
||||
* \param map the map to initialize
|
||||
* \param size the initial size of the map
|
||||
* \param extend the amount to bytes to grow the map with when needed
|
||||
* \memberof pw_map
|
||||
*/
|
||||
static inline void pw_map_init(struct pw_map *map, size_t size, size_t extend)
|
||||
{
|
||||
|
|
@ -82,7 +86,6 @@ static inline void pw_map_init(struct pw_map *map, size_t size, size_t extend)
|
|||
|
||||
/** Clear a map
|
||||
* \param map the map to clear
|
||||
* \memberof pw_map
|
||||
*/
|
||||
static inline void pw_map_clear(struct pw_map *map)
|
||||
{
|
||||
|
|
@ -100,7 +103,6 @@ static inline void pw_map_reset(struct pw_map *map)
|
|||
* \param data the item to add
|
||||
* \return the id where the item was inserted or SPA_ID_INVALID when the
|
||||
* item can not be inserted.
|
||||
* \memberof pw_map
|
||||
*/
|
||||
static inline uint32_t pw_map_insert_new(struct pw_map *map, void *data)
|
||||
{
|
||||
|
|
@ -128,7 +130,6 @@ static inline uint32_t pw_map_insert_new(struct pw_map *map, void *data)
|
|||
* \param data the data to insert
|
||||
* \return 0 on success, -ENOSPC value when the index is invalid or a < 0
|
||||
* errno value.
|
||||
* \memberof pw_map
|
||||
*/
|
||||
static inline int pw_map_insert_at(struct pw_map *map, uint32_t id, void *data)
|
||||
{
|
||||
|
|
@ -152,7 +153,6 @@ static inline int pw_map_insert_at(struct pw_map *map, uint32_t id, void *data)
|
|||
/** Remove an item at index
|
||||
* \param map the map to remove from
|
||||
* \param id the index to remove
|
||||
* \memberof pw_map
|
||||
*/
|
||||
static inline void pw_map_remove(struct pw_map *map, uint32_t id)
|
||||
{
|
||||
|
|
@ -164,7 +164,6 @@ static inline void pw_map_remove(struct pw_map *map, uint32_t id)
|
|||
* \param map the map to use
|
||||
* \param id the index to look at
|
||||
* \return the item at \a id or NULL when no such item exists
|
||||
* \memberof pw_map
|
||||
*/
|
||||
static inline void *pw_map_lookup(struct pw_map *map, uint32_t id)
|
||||
{
|
||||
|
|
@ -183,7 +182,6 @@ static inline void *pw_map_lookup(struct pw_map *map, uint32_t id)
|
|||
* iteration ends and the result is returned.
|
||||
* \param data data to pass to \a func
|
||||
* \return the result of the last call to \a func or 0 when all callbacks returned 0.
|
||||
* \memberof pw_map
|
||||
*/
|
||||
static inline int pw_map_for_each(struct pw_map *map,
|
||||
int (*func) (void *item_data, void *data), void *data)
|
||||
|
|
@ -199,6 +197,10 @@ static inline int pw_map_for_each(struct pw_map *map,
|
|||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -31,7 +31,16 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** Flags passed to \ref pw_mempool_alloc() \memberof pw_memblock */
|
||||
/** \defgroup pw_memblock Memory Blocks
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup pw_memblock
|
||||
* \{
|
||||
*/
|
||||
|
||||
/** Flags passed to \ref pw_mempool_alloc() */
|
||||
enum pw_memblock_flags {
|
||||
PW_MEMBLOCK_FLAG_NONE = 0,
|
||||
PW_MEMBLOCK_FLAG_READABLE = (1 << 0), /**< memory is readable */
|
||||
|
|
@ -57,14 +66,14 @@ enum pw_memmap_flags {
|
|||
|
||||
struct pw_memchunk;
|
||||
|
||||
/** \class pw_memblock
|
||||
/**
|
||||
*
|
||||
* A memory pool is a collection of pw_memblocks */
|
||||
struct pw_mempool {
|
||||
struct pw_properties *props;
|
||||
};
|
||||
|
||||
/** \class pw_memblock
|
||||
/**
|
||||
* Memory block structure */
|
||||
struct pw_memblock {
|
||||
struct pw_mempool *pool; /**< owner pool */
|
||||
|
|
@ -192,6 +201,9 @@ static inline void pw_map_range_init(struct pw_map_range *range,
|
|||
range->size = SPA_ROUND_UP_N(range->start + size, page_size);
|
||||
}
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ extern "C" {
|
|||
#define PW_VERSION_MODULE 3
|
||||
struct pw_module;
|
||||
|
||||
/** The module information. Extra information can be added in later versions \memberof pw_introspect */
|
||||
/** The module information. Extra information can be added in later versions */
|
||||
struct pw_module_info {
|
||||
uint32_t id; /**< id of the global */
|
||||
const char *name; /**< name of the module */
|
||||
|
|
@ -51,12 +51,12 @@ struct pw_module_info {
|
|||
struct spa_dict *props; /**< extra properties */
|
||||
};
|
||||
|
||||
/** Update and existing \ref pw_module_info with \a update \memberof pw_introspect */
|
||||
/** Update and existing \ref pw_module_info with \a update */
|
||||
struct pw_module_info *
|
||||
pw_module_info_update(struct pw_module_info *info,
|
||||
const struct pw_module_info *update);
|
||||
|
||||
/** Free a \ref pw_module_info \memberof pw_introspect */
|
||||
/** Free a \ref pw_module_info */
|
||||
void pw_module_info_free(struct pw_module_info *info);
|
||||
|
||||
#define PW_MODULE_EVENT_INFO 0
|
||||
|
|
|
|||
|
|
@ -39,6 +39,14 @@ extern "C" {
|
|||
|
||||
#include <pipewire/proxy.h>
|
||||
|
||||
/** \defgroup pw_node Pipewire Node
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup pw_node
|
||||
* \{
|
||||
*/
|
||||
#define PW_TYPE_INTERFACE_Node PW_TYPE_INFO_INTERFACE_BASE "Node"
|
||||
|
||||
#define PW_VERSION_NODE 3
|
||||
|
|
@ -55,7 +63,7 @@ enum pw_node_state {
|
|||
PW_NODE_STATE_RUNNING = 3, /**< the node is running */
|
||||
};
|
||||
|
||||
/** Convert a \ref pw_node_state to a readable string \memberof pw_node */
|
||||
/** Convert a \ref pw_node_state to a readable string */
|
||||
const char * pw_node_state_as_string(enum pw_node_state state);
|
||||
|
||||
/** The node information. Extra information can be added in later versions \memberof pw_introspect */
|
||||
|
|
@ -193,6 +201,10 @@ struct pw_node_methods {
|
|||
#define pw_node_set_param(c,...) pw_node_method(c,set_param,0,__VA_ARGS__)
|
||||
#define pw_node_send_command(c,...) pw_node_method(c,send_command,0,__VA_ARGS__)
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -31,9 +31,7 @@ extern "C" {
|
|||
|
||||
#include <spa/utils/defs.h>
|
||||
|
||||
/** \class pw_permission
|
||||
*
|
||||
* \brief a PipeWire permission
|
||||
/** \defgroup pw_permission Pipewire Permission
|
||||
*
|
||||
* Permissions are kept for a client and describe what the client is
|
||||
* allowed to do with an object.
|
||||
|
|
@ -41,6 +39,11 @@ extern "C" {
|
|||
* See \ref page_core_api
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup pw_permission
|
||||
* \{
|
||||
*/
|
||||
|
||||
#define PW_PERM_R 0400 /**< object can be seen and events can be received */
|
||||
#define PW_PERM_W 0200 /**< methods can be called that modify the object */
|
||||
#define PW_PERM_X 0100 /**< methods can be called on the object. The W flag must be
|
||||
|
|
@ -72,6 +75,10 @@ struct pw_permission {
|
|||
(permission) & PW_PERM_X ? 'x' : '-', \
|
||||
(permission) & PW_PERM_M ? 'm' : '-'
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -473,7 +473,6 @@ static struct spa_log *load_journal_logger(struct support *support)
|
|||
*
|
||||
* The environment variable \a PIPEWIRE_DEBUG
|
||||
*
|
||||
* \memberof pw_pipewire
|
||||
*/
|
||||
SPA_EXPORT
|
||||
void pw_init(int *argc, char **argv[])
|
||||
|
|
@ -581,7 +580,6 @@ void pw_deinit(void)
|
|||
* Debugging categories can be enabled by using the PIPEWIRE_DEBUG
|
||||
* environment variable
|
||||
*
|
||||
* \memberof pw_pipewire
|
||||
*/
|
||||
SPA_EXPORT
|
||||
bool pw_debug_is_category_enabled(const char *name)
|
||||
|
|
@ -598,7 +596,7 @@ bool pw_debug_is_category_enabled(const char *name)
|
|||
return false;
|
||||
}
|
||||
|
||||
/** Get the application name \memberof pw_pipewire */
|
||||
/** Get the application name */
|
||||
SPA_EXPORT
|
||||
const char *pw_get_application_name(void)
|
||||
{
|
||||
|
|
@ -606,7 +604,7 @@ const char *pw_get_application_name(void)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/** Get the program name \memberof pw_pipewire */
|
||||
/** Get the program name */
|
||||
SPA_EXPORT
|
||||
const char *pw_get_prgname(void)
|
||||
{
|
||||
|
|
@ -637,7 +635,7 @@ const char *pw_get_prgname(void)
|
|||
return prgname;
|
||||
}
|
||||
|
||||
/** Get the user name \memberof pw_pipewire */
|
||||
/** Get the user name */
|
||||
SPA_EXPORT
|
||||
const char *pw_get_user_name(void)
|
||||
{
|
||||
|
|
@ -649,7 +647,7 @@ const char *pw_get_user_name(void)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/** Get the host name \memberof pw_pipewire */
|
||||
/** Get the host name */
|
||||
SPA_EXPORT
|
||||
const char *pw_get_host_name(void)
|
||||
{
|
||||
|
|
@ -672,7 +670,6 @@ bool pw_in_valgrind(void)
|
|||
*
|
||||
* Make a new PipeWire client name that can be used to construct a remote.
|
||||
*
|
||||
* \memberof pw_pipewire
|
||||
*/
|
||||
SPA_EXPORT
|
||||
const char *pw_get_client_name(void)
|
||||
|
|
@ -691,7 +688,7 @@ const char *pw_get_client_name(void)
|
|||
}
|
||||
}
|
||||
|
||||
/** Reverse the direction \memberof pw_pipewire */
|
||||
/** Reverse the direction */
|
||||
SPA_EXPORT
|
||||
enum pw_direction pw_direction_reverse(enum pw_direction direction)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -109,9 +109,13 @@ extern "C" {
|
|||
* + `connection`: to log connection messages
|
||||
*/
|
||||
|
||||
/** \class pw_pipewire
|
||||
*
|
||||
* \brief PipeWire initialization and infrastructure functions
|
||||
/** \defgroup pw_pipewire PipeWire initialization and infrastructure functions
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* \addtogroup pw_pipewire
|
||||
* \{
|
||||
*/
|
||||
void
|
||||
pw_init(int *argc, char **argv[]);
|
||||
|
|
@ -154,6 +158,10 @@ struct spa_handle *pw_load_spa_handle(const char *lib,
|
|||
|
||||
int pw_unload_spa_handle(struct spa_handle *handle);
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -38,6 +38,15 @@ extern "C" {
|
|||
|
||||
#include <pipewire/proxy.h>
|
||||
|
||||
/** \defgroup pw_port Pipewire Port
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup pw_port
|
||||
* \{
|
||||
*/
|
||||
|
||||
#define PW_TYPE_INTERFACE_Port PW_TYPE_INFO_INTERFACE_BASE "Port"
|
||||
|
||||
#define PW_VERSION_PORT 3
|
||||
|
|
@ -48,16 +57,9 @@ struct pw_port;
|
|||
#define PW_DIRECTION_INPUT SPA_DIRECTION_INPUT
|
||||
#define PW_DIRECTION_OUTPUT SPA_DIRECTION_OUTPUT
|
||||
|
||||
/** Convert a \ref pw_direction to a readable string \memberof pw_introspect */
|
||||
/** Convert a \ref pw_direction to a readable string */
|
||||
const char * pw_direction_as_string(enum pw_direction direction);
|
||||
|
||||
|
||||
/** \class pw_introspect
|
||||
*
|
||||
* The introspection methods and structures are used to get information
|
||||
* about the object in the PipeWire server
|
||||
*/
|
||||
|
||||
struct pw_port_info {
|
||||
uint32_t id; /**< id of the global */
|
||||
enum pw_direction direction; /**< port direction */
|
||||
|
|
@ -162,6 +164,10 @@ struct pw_port_methods {
|
|||
#define pw_port_subscribe_params(c,...) pw_port_method(c,subscribe_params,0,__VA_ARGS__)
|
||||
#define pw_port_enum_params(c,...) pw_port_method(c,enum_params,0,__VA_ARGS__)
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -33,15 +33,18 @@ extern "C" {
|
|||
|
||||
#include <spa/utils/dict.h>
|
||||
|
||||
/** \class pw_properties
|
||||
*
|
||||
* \brief A collection of key/value pairs
|
||||
/** \defgroup pw_properties Key-Value pairs
|
||||
*
|
||||
* Properties are used to pass around arbitrary key/value pairs.
|
||||
* Both keys and values are strings which keeps things simple.
|
||||
* Encoding of arbitrary values should be done by using a string
|
||||
* serialization such as base64 for binary blobs.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup pw_properties
|
||||
* \{
|
||||
*/
|
||||
struct pw_properties {
|
||||
struct spa_dict dict; /**< dictionary of key/values */
|
||||
uint32_t flags; /**< extra flags */
|
||||
|
|
@ -120,6 +123,10 @@ static inline double pw_properties_parse_double(const char *value) {
|
|||
return strtod(value, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -31,6 +31,16 @@ extern "C" {
|
|||
|
||||
#include <spa/utils/list.h>
|
||||
|
||||
/** \defgroup pw_protocol PipeWire Protocol
|
||||
*
|
||||
* \brief Manages protocols and their implementation
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup pw_protocol
|
||||
* \{
|
||||
*/
|
||||
|
||||
struct pw_protocol;
|
||||
|
||||
#include <pipewire/context.h>
|
||||
|
|
@ -133,10 +143,6 @@ void pw_protocol_add_listener(struct pw_protocol *protocol,
|
|||
const struct pw_protocol_events *events,
|
||||
void *data);
|
||||
|
||||
/** \class pw_protocol
|
||||
*
|
||||
* \brief Manages protocols and their implementation
|
||||
*/
|
||||
int pw_protocol_add_marshal(struct pw_protocol *protocol,
|
||||
const struct pw_protocol_marshal *marshal);
|
||||
|
||||
|
|
@ -145,6 +151,10 @@ pw_protocol_get_marshal(struct pw_protocol *protocol, const char *type, uint32_t
|
|||
|
||||
struct pw_protocol * pw_context_find_protocol(struct pw_context *context, const char *name);
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -84,8 +84,6 @@ error:
|
|||
* proxy object will have an id assigned from the client id space.
|
||||
*
|
||||
* \sa pw_core
|
||||
*
|
||||
* \memberof pw_proxy
|
||||
*/
|
||||
SPA_EXPORT
|
||||
struct pw_proxy *pw_proxy_new(struct pw_proxy *factory,
|
||||
|
|
@ -226,7 +224,6 @@ static inline void remove_from_map(struct pw_proxy *proxy)
|
|||
*
|
||||
* \note This is normally called by \ref pw_core when the server
|
||||
* decides to destroy the server side object
|
||||
* \memberof pw_proxy
|
||||
*/
|
||||
SPA_EXPORT
|
||||
void pw_proxy_destroy(struct pw_proxy *proxy)
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ extern "C" {
|
|||
*
|
||||
* A proxy for a remote core object can be obtained by making
|
||||
* a remote connection with \ref pw_context_connect.
|
||||
* See \ref pw_page_remote_api
|
||||
* See \ref pw_proxy
|
||||
*
|
||||
* Some methods on proxy object allow creation of more proxy objects or
|
||||
* create a binding between a local proxy and global resource.
|
||||
|
|
@ -87,7 +87,7 @@ extern "C" {
|
|||
* associated to the proxy.
|
||||
*/
|
||||
|
||||
/** \class pw_proxy
|
||||
/** \defgroup pw_proxy Proxy Object
|
||||
*
|
||||
* \brief Represents an object on the client side.
|
||||
*
|
||||
|
|
@ -98,6 +98,11 @@ extern "C" {
|
|||
*
|
||||
* See \ref page_proxy
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup pw_proxy
|
||||
* \{
|
||||
*/
|
||||
struct pw_proxy;
|
||||
|
||||
#include <pipewire/protocol.h>
|
||||
|
|
@ -200,6 +205,10 @@ int pw_proxy_install_marshal(struct pw_proxy *proxy, bool implementor);
|
|||
_res; \
|
||||
})
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -31,9 +31,9 @@ extern "C" {
|
|||
|
||||
#include <spa/utils/hook.h>
|
||||
|
||||
/** \page page_resource Resource
|
||||
/** \defgroup pw_resource Resources
|
||||
*
|
||||
* \section sec_page_resource Overview
|
||||
* \brief Client owned objects
|
||||
*
|
||||
* Resources represent objects owned by a \ref pw_impl_client. They are
|
||||
* the result of binding to a global resource or by calling API that
|
||||
|
|
@ -47,14 +47,10 @@ extern "C" {
|
|||
*
|
||||
*/
|
||||
|
||||
/** \class pw_resource
|
||||
*
|
||||
* \brief Client owned objects
|
||||
*
|
||||
* Resources are objects owned by a client and are destroyed when the
|
||||
* client disappears.
|
||||
*
|
||||
* See also \ref page_resource
|
||||
|
||||
/**
|
||||
* \addtogroup pw_resource
|
||||
* \{
|
||||
*/
|
||||
struct pw_resource;
|
||||
|
||||
|
|
@ -161,6 +157,12 @@ int pw_resource_install_marshal(struct pw_resource *resource, bool implementor);
|
|||
_res; \
|
||||
})
|
||||
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -137,21 +137,26 @@ extern "C" {
|
|||
*
|
||||
* Use \ref pw_stream_disconnect() to disconnect a stream after use.
|
||||
*/
|
||||
/** \class pw_stream
|
||||
/** \defgroup pw_stream Stream Object
|
||||
*
|
||||
* \brief PipeWire stream object class
|
||||
* \brief PipeWire stream objects
|
||||
*
|
||||
* The stream object provides a convenient way to send and
|
||||
* receive data streams from/to PipeWire.
|
||||
*
|
||||
* See also \ref page_streams and \ref page_context_api
|
||||
* See also \ref page_streams and \ref page_core_api
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup pw_stream
|
||||
* \{
|
||||
*/
|
||||
struct pw_stream;
|
||||
|
||||
#include <spa/buffer/buffer.h>
|
||||
#include <spa/param/param.h>
|
||||
|
||||
/** \enum pw_stream_state The state of a stream \memberof pw_stream */
|
||||
/** \enum pw_stream_state The state of a stream */
|
||||
enum pw_stream_state {
|
||||
PW_STREAM_STATE_ERROR = -1, /**< the stream is in error */
|
||||
PW_STREAM_STATE_UNCONNECTED = 0, /**< unconnected */
|
||||
|
|
@ -178,7 +183,7 @@ struct pw_stream_control {
|
|||
uint32_t max_values; /**< max values that can be set on this control */
|
||||
};
|
||||
|
||||
/** A time structure \memberof pw_stream */
|
||||
/** A time structure */
|
||||
struct pw_time {
|
||||
int64_t now; /**< the monotonic time in nanoseconds */
|
||||
struct spa_fraction rate; /**< the rate of \a ticks and delay */
|
||||
|
|
@ -229,10 +234,10 @@ struct pw_stream_events {
|
|||
|
||||
};
|
||||
|
||||
/** Convert a stream state to a readable string \memberof pw_stream */
|
||||
/** Convert a stream state to a readable string */
|
||||
const char * pw_stream_state_as_string(enum pw_stream_state state);
|
||||
|
||||
/** \enum pw_stream_flags Extra flags that can be used in \ref pw_stream_connect() \memberof pw_stream */
|
||||
/** \enum pw_stream_flags Extra flags that can be used in \ref pw_stream_connect() */
|
||||
enum pw_stream_flags {
|
||||
PW_STREAM_FLAG_NONE = 0, /**< no flags */
|
||||
PW_STREAM_FLAG_AUTOCONNECT = (1 << 0), /**< try to automatically connect
|
||||
|
|
@ -255,7 +260,7 @@ enum pw_stream_flags {
|
|||
* data of the buffer should be set */
|
||||
};
|
||||
|
||||
/** Create a new unconneced \ref pw_stream \memberof pw_stream
|
||||
/** Create a new unconneced \ref pw_stream
|
||||
* \return a newly allocated \ref pw_stream */
|
||||
struct pw_stream *
|
||||
pw_stream_new(struct pw_core *core, /**< a \ref pw_core */
|
||||
|
|
@ -269,7 +274,7 @@ pw_stream_new_simple(struct pw_loop *loop, /**< a \ref pw_loop to use */
|
|||
const struct pw_stream_events *events, /**< stream events */
|
||||
void *data /**< data passed to events */);
|
||||
|
||||
/** Destroy a stream \memberof pw_stream */
|
||||
/** Destroy a stream */
|
||||
void pw_stream_destroy(struct pw_stream *stream);
|
||||
|
||||
void pw_stream_add_listener(struct pw_stream *stream,
|
||||
|
|
@ -287,7 +292,7 @@ const struct pw_properties *pw_stream_get_properties(struct pw_stream *stream);
|
|||
|
||||
int pw_stream_update_properties(struct pw_stream *stream, const struct spa_dict *dict);
|
||||
|
||||
/** Connect a stream for input or output on \a port_path. \memberof pw_stream
|
||||
/** Connect a stream for input or output on \a port_path.
|
||||
* \return 0 on success < 0 on error.
|
||||
*
|
||||
* You should connect to the process event and use pw_stream_dequeue_buffer()
|
||||
|
|
@ -304,12 +309,12 @@ pw_stream_connect(struct pw_stream *stream, /**< a \ref pw_stream */
|
|||
* formats. */
|
||||
uint32_t n_params /**< number of items in \a params */);
|
||||
|
||||
/** Get the node ID of the stream. \memberof pw_stream
|
||||
/** Get the node ID of the stream.
|
||||
* \return node ID. */
|
||||
uint32_t
|
||||
pw_stream_get_node_id(struct pw_stream *stream);
|
||||
|
||||
/** Disconnect \a stream \memberof pw_stream */
|
||||
/** Disconnect \a stream */
|
||||
int pw_stream_disconnect(struct pw_stream *stream);
|
||||
|
||||
/** Set the stream in error state */
|
||||
|
|
@ -318,7 +323,7 @@ int pw_stream_set_error(struct pw_stream *stream, /**< a \ref pw_stream */
|
|||
const char *error, /**< an error message */
|
||||
...) SPA_PRINTF_FUNC(3, 4);
|
||||
|
||||
/** Complete the negotiation process with result code \a res \memberof pw_stream
|
||||
/** Complete the negotiation process with result code \a res
|
||||
*
|
||||
* This function should be called after notification of the format.
|
||||
|
||||
|
|
@ -334,7 +339,7 @@ pw_stream_update_params(struct pw_stream *stream, /**< a \ref pw_stream */
|
|||
/** Set control values */
|
||||
int pw_stream_set_control(struct pw_stream *stream, uint32_t id, uint32_t n_values, float *values, ...);
|
||||
|
||||
/** Query the time on the stream \memberof pw_stream */
|
||||
/** Query the time on the stream */
|
||||
int pw_stream_get_time(struct pw_stream *stream, struct pw_time *time);
|
||||
|
||||
/** Get a buffer that can be filled for playback streams or consumed
|
||||
|
|
@ -344,13 +349,17 @@ struct pw_buffer *pw_stream_dequeue_buffer(struct pw_stream *stream);
|
|||
/** Submit a buffer for playback or recycle a buffer for capture. */
|
||||
int pw_stream_queue_buffer(struct pw_stream *stream, struct pw_buffer *buffer);
|
||||
|
||||
/** Activate or deactivate the stream \memberof pw_stream */
|
||||
/** Activate or deactivate the stream */
|
||||
int pw_stream_set_active(struct pw_stream *stream, bool active);
|
||||
|
||||
/** Flush a stream. When \a drain is true, the drained callback will
|
||||
* be called when all data is played or recorded */
|
||||
int pw_stream_flush(struct pw_stream *stream, bool drain);
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -173,7 +173,6 @@ clean_this:
|
|||
* After this function you should probably call pw_thread_loop_start() to
|
||||
* actually start the thread
|
||||
*
|
||||
* \memberof pw_thread_loop
|
||||
*/
|
||||
SPA_EXPORT
|
||||
struct pw_thread_loop *pw_thread_loop_new(const char *name,
|
||||
|
|
@ -195,7 +194,6 @@ struct pw_thread_loop *pw_thread_loop_new(const char *name,
|
|||
* After this function you should probably call pw_thread_loop_start() to
|
||||
* actually start the thread
|
||||
*
|
||||
* \memberof pw_thread_loop
|
||||
*/
|
||||
SPA_EXPORT
|
||||
struct pw_thread_loop *pw_thread_loop_new_full(struct pw_loop *loop,
|
||||
|
|
@ -204,7 +202,7 @@ struct pw_thread_loop *pw_thread_loop_new_full(struct pw_loop *loop,
|
|||
return loop_new(loop, name, props);
|
||||
}
|
||||
|
||||
/** Destroy a threaded loop \memberof pw_thread_loop */
|
||||
/** Destroy a threaded loop */
|
||||
SPA_EXPORT
|
||||
void pw_thread_loop_destroy(struct pw_thread_loop *loop)
|
||||
{
|
||||
|
|
@ -275,7 +273,6 @@ static void *do_loop(void *user_data)
|
|||
* \param loop a \ref pw_thread_loop
|
||||
* \return 0 on success
|
||||
*
|
||||
* \memberof pw_thread_loop
|
||||
*/
|
||||
SPA_EXPORT
|
||||
int pw_thread_loop_start(struct pw_thread_loop *loop)
|
||||
|
|
@ -298,7 +295,6 @@ int pw_thread_loop_start(struct pw_thread_loop *loop)
|
|||
*
|
||||
* \param loop a \ref pw_thread_loop
|
||||
*
|
||||
* \memberof pw_thread_loop
|
||||
*/
|
||||
SPA_EXPORT
|
||||
void pw_thread_loop_stop(struct pw_thread_loop *loop)
|
||||
|
|
@ -319,7 +315,6 @@ void pw_thread_loop_stop(struct pw_thread_loop *loop)
|
|||
*
|
||||
* \param loop a \ref pw_thread_loop
|
||||
*
|
||||
* \memberof pw_thread_loop
|
||||
*/
|
||||
SPA_EXPORT
|
||||
void pw_thread_loop_lock(struct pw_thread_loop *loop)
|
||||
|
|
@ -332,7 +327,6 @@ void pw_thread_loop_lock(struct pw_thread_loop *loop)
|
|||
*
|
||||
* \param loop a \ref pw_thread_loop
|
||||
*
|
||||
* \memberof pw_thread_loop
|
||||
*/
|
||||
SPA_EXPORT
|
||||
void pw_thread_loop_unlock(struct pw_thread_loop *loop)
|
||||
|
|
@ -349,7 +343,6 @@ void pw_thread_loop_unlock(struct pw_thread_loop *loop)
|
|||
* Signal the thread of \a loop. If \a wait_for_accept is true,
|
||||
* this function waits until \ref pw_thread_loop_accept() is called.
|
||||
*
|
||||
* \memberof pw_thread_loop
|
||||
*/
|
||||
SPA_EXPORT
|
||||
void pw_thread_loop_signal(struct pw_thread_loop *loop, bool wait_for_accept)
|
||||
|
|
@ -371,7 +364,6 @@ void pw_thread_loop_signal(struct pw_thread_loop *loop, bool wait_for_accept)
|
|||
*
|
||||
* \param loop a \ref pw_thread_loop to signal
|
||||
*
|
||||
* \memberof pw_thread_loop
|
||||
*/
|
||||
SPA_EXPORT
|
||||
void pw_thread_loop_wait(struct pw_thread_loop *loop)
|
||||
|
|
@ -390,7 +382,6 @@ void pw_thread_loop_wait(struct pw_thread_loop *loop)
|
|||
* \param wait_max_sec the maximum number of seconds to wait for a \ref pw_thread_loop_signal()
|
||||
* \return 0 on success or ETIMEDOUT on timeout or a negative errno value.
|
||||
*
|
||||
* \memberof pw_thread_loop
|
||||
*/
|
||||
SPA_EXPORT
|
||||
int pw_thread_loop_timed_wait(struct pw_thread_loop *loop, int wait_max_sec)
|
||||
|
|
@ -412,7 +403,6 @@ int pw_thread_loop_timed_wait(struct pw_thread_loop *loop, int wait_max_sec)
|
|||
* \param timeout the time in nanoseconds to add to \a tp
|
||||
* \return 0 on success or a negative errno value on error.
|
||||
*
|
||||
* \memberof pw_thread_loop
|
||||
*/
|
||||
SPA_EXPORT
|
||||
int pw_thread_loop_get_time(struct pw_thread_loop *loop, struct timespec *abstime, int64_t timeout)
|
||||
|
|
@ -436,7 +426,6 @@ int pw_thread_loop_get_time(struct pw_thread_loop *loop, struct timespec *abstim
|
|||
* \param abstime the absolute time to wait for a \ref pw_thread_loop_signal()
|
||||
* \return 0 on success or -ETIMEDOUT on timeout or a negative error value
|
||||
*
|
||||
* \memberof pw_thread_loop
|
||||
*/
|
||||
SPA_EXPORT
|
||||
int pw_thread_loop_timed_wait_full(struct pw_thread_loop *loop, struct timespec *abstime)
|
||||
|
|
@ -452,7 +441,6 @@ int pw_thread_loop_timed_wait_full(struct pw_thread_loop *loop, struct timespec
|
|||
*
|
||||
* \param loop a \ref pw_thread_loop to signal
|
||||
*
|
||||
* \memberof pw_thread_loop
|
||||
*/
|
||||
SPA_EXPORT
|
||||
void pw_thread_loop_accept(struct pw_thread_loop *loop)
|
||||
|
|
@ -466,7 +454,6 @@ void pw_thread_loop_accept(struct pw_thread_loop *loop)
|
|||
* \param loop a \ref pw_thread_loop to signal
|
||||
* \return true when called inside the thread of \a loop.
|
||||
*
|
||||
* \memberof pw_thread_loop
|
||||
*/
|
||||
SPA_EXPORT
|
||||
bool pw_thread_loop_in_thread(struct pw_thread_loop *loop)
|
||||
|
|
|
|||
|
|
@ -80,9 +80,7 @@ extern "C" {
|
|||
* All events and callbacks are called with the thread lock held.
|
||||
*
|
||||
*/
|
||||
/** \class pw_thread_loop
|
||||
*
|
||||
* \brief PipeWire threaded loop object
|
||||
/** \defgroup pw_thread_loop PipeWire Threaded Loop Object
|
||||
*
|
||||
* The threaded loop object runs a \ref pw_loop in a separate thread
|
||||
* and ensures proper locking is done.
|
||||
|
|
@ -92,6 +90,11 @@ extern "C" {
|
|||
*
|
||||
* See also \ref page_thread_loop
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup pw_thread_loop
|
||||
* \{
|
||||
*/
|
||||
struct pw_thread_loop;
|
||||
|
||||
/** Thread loop events */
|
||||
|
|
@ -161,6 +164,10 @@ void pw_thread_loop_accept(struct pw_thread_loop *loop);
|
|||
/** Check if inside the thread */
|
||||
bool pw_thread_loop_in_thread(struct pw_thread_loop *loop);
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -31,6 +31,14 @@ extern "C" {
|
|||
|
||||
#include <spa/utils/type.h>
|
||||
|
||||
/** \defgroup pw_type Pipewire Types
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup pw_type
|
||||
* \{
|
||||
*/
|
||||
|
||||
enum {
|
||||
PW_TYPE_FIRST = SPA_TYPE_VENDOR_PipeWire,
|
||||
};
|
||||
|
|
@ -45,6 +53,10 @@ enum {
|
|||
|
||||
const struct spa_type_info * pw_type_info(void);
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -38,8 +38,6 @@
|
|||
* Repeatedly call this function to split \a str into all substrings
|
||||
* delimited by \a delimiter. \a state should be set to NULL on the first
|
||||
* invocation and passed to the function until NULL is returned.
|
||||
*
|
||||
* \memberof pw_utils
|
||||
*/
|
||||
SPA_EXPORT
|
||||
const char *pw_split_walk(const char *str, const char *delimiter, size_t * len, const char **state)
|
||||
|
|
@ -64,8 +62,6 @@ const char *pw_split_walk(const char *str, const char *delimiter, size_t * len,
|
|||
* \param[out] n_tokens the number of tokens
|
||||
* \return a NULL terminated array of strings that should be
|
||||
* freed with \ref pw_free_strv.
|
||||
*
|
||||
* \memberof pw_utils
|
||||
*/
|
||||
SPA_EXPORT
|
||||
char **pw_split_strv(const char *str, const char *delimiter, int max_tokens, int *n_tokens)
|
||||
|
|
@ -98,8 +94,6 @@ char **pw_split_strv(const char *str, const char *delimiter, int max_tokens, int
|
|||
* \param str a NULL terminated array of string
|
||||
*
|
||||
* Free all the strings in the array and the array
|
||||
*
|
||||
* \memberof pw_utils
|
||||
*/
|
||||
SPA_EXPORT
|
||||
void pw_free_strv(char **str)
|
||||
|
|
@ -117,8 +111,6 @@ void pw_free_strv(char **str)
|
|||
*
|
||||
* Strip whitespace before and after \a str. \a str will be
|
||||
* modified.
|
||||
*
|
||||
* \memberof pw_utils
|
||||
*/
|
||||
SPA_EXPORT
|
||||
char *pw_strip(char *str, const char *whitespace)
|
||||
|
|
|
|||
|
|
@ -34,11 +34,16 @@ extern "C" {
|
|||
#include <spa/utils/defs.h>
|
||||
#include <spa/pod/pod.h>
|
||||
|
||||
/** \class pw_utils
|
||||
/** \defgroup pw_utils Pipewire Utility Functions
|
||||
*
|
||||
* Various utility functions
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup pw_utils
|
||||
* \{
|
||||
*/
|
||||
|
||||
/** a function to destroy an item \memberof pw_utils */
|
||||
typedef void (*pw_destroy_t) (void *object);
|
||||
|
||||
|
|
@ -76,6 +81,10 @@ pw_strip(char *str, const char *whitespace);
|
|||
})
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -94,7 +94,6 @@ static void process_work_queue(void *data, uint64_t count)
|
|||
* \param loop the loop to use
|
||||
* \return a newly allocated work queue
|
||||
*
|
||||
* \memberof pw_work_queue
|
||||
*/
|
||||
struct pw_work_queue *pw_work_queue_new(struct pw_loop *loop)
|
||||
{
|
||||
|
|
@ -129,7 +128,6 @@ error_free:
|
|||
/** Destroy a work queue
|
||||
* \param queue the work queue to destroy
|
||||
*
|
||||
* \memberof pw_work_queue
|
||||
*/
|
||||
void pw_work_queue_destroy(struct pw_work_queue *queue)
|
||||
{
|
||||
|
|
@ -158,7 +156,6 @@ void pw_work_queue_destroy(struct pw_work_queue *queue)
|
|||
* \param func a work function
|
||||
* \param data passed to \a func
|
||||
*
|
||||
* \memberof pw_work_queue
|
||||
*/
|
||||
SPA_EXPORT
|
||||
uint32_t
|
||||
|
|
@ -214,7 +211,6 @@ pw_work_queue_add(struct pw_work_queue *queue, void *obj, int res, pw_work_func_
|
|||
* \param obj the owner object
|
||||
* \param id the wotk id to cancel
|
||||
*
|
||||
* \memberof pw_work_queue
|
||||
*/
|
||||
SPA_EXPORT
|
||||
int pw_work_queue_cancel(struct pw_work_queue *queue, void *obj, uint32_t id)
|
||||
|
|
@ -246,7 +242,6 @@ int pw_work_queue_cancel(struct pw_work_queue *queue, void *obj, uint32_t id)
|
|||
* \param seq the sequence number that completed
|
||||
* \param res 0 if the item was found, < 0 on error
|
||||
*
|
||||
* \memberof pw_work_queue
|
||||
*/
|
||||
SPA_EXPORT
|
||||
int pw_work_queue_complete(struct pw_work_queue *queue, void *obj, uint32_t seq, int res)
|
||||
|
|
|
|||
|
|
@ -29,9 +29,12 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** \class pw_work_queue
|
||||
*
|
||||
* PipeWire work queue object
|
||||
/** \defgroup pw_work_queue PipeWire Work Queue Object
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup pw_work_queue
|
||||
* \{
|
||||
*/
|
||||
struct pw_work_queue;
|
||||
|
||||
|
|
@ -56,6 +59,10 @@ pw_work_queue_cancel(struct pw_work_queue *queue, void *obj, uint32_t id);
|
|||
int
|
||||
pw_work_queue_complete(struct pw_work_queue *queue, void *obj, uint32_t seq, int res);
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue