mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-19 07:00:10 -05:00
spa: group the spa headers into doxygen modules
Subdirectories buffer, control, debug, monitor, pod, support and utils, others are still missing. Headers are grouped either per subdirectory (e.g. buffer/ gets added to group spa_buffer) or per-file (e.g. spa_json is a separate group), whatever seemed like the most sensible approach.
This commit is contained in:
parent
d0aff793b7
commit
07533cb708
72 changed files with 700 additions and 21 deletions
|
|
@ -36,6 +36,14 @@ extern "C" {
|
|||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
|
||||
/** \defgroup spa_utils SPA Utils
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup spa_utils
|
||||
* \{
|
||||
*/
|
||||
|
||||
/**
|
||||
* SPA_FALLTHROUGH is an annotation to suppress compiler warnings about switch
|
||||
* cases that fall through without a break or return statement. SPA_FALLTHROUGH
|
||||
|
|
@ -293,6 +301,10 @@ struct spa_fraction {
|
|||
_strp; \
|
||||
})
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -33,6 +33,11 @@ extern "C" {
|
|||
|
||||
#include <spa/utils/defs.h>
|
||||
|
||||
/**
|
||||
* \addtogroup spa_utils
|
||||
* \{
|
||||
*/
|
||||
|
||||
struct spa_dict_item {
|
||||
const char *key;
|
||||
const char *value;
|
||||
|
|
@ -97,6 +102,10 @@ static inline const char *spa_dict_lookup(const struct spa_dict *dict, const cha
|
|||
return item ? item->value : NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -32,12 +32,18 @@ extern "C" {
|
|||
#include <spa/utils/defs.h>
|
||||
#include <spa/utils/list.h>
|
||||
|
||||
/** \class spa_hook
|
||||
/** \defgroup spa_hook SPA Hooks
|
||||
*
|
||||
* \brief a list of hooks
|
||||
*
|
||||
* The hook list provides a way to keep track of hooks.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup spa_hook
|
||||
* \{
|
||||
*/
|
||||
|
||||
/** A list of hooks */
|
||||
struct spa_hook_list {
|
||||
struct spa_list list;
|
||||
|
|
@ -87,7 +93,7 @@ static inline bool spa_hook_list_is_empty(struct spa_hook_list *list)
|
|||
return spa_list_is_empty(&list->list);
|
||||
}
|
||||
|
||||
/** Append a hook \memberof spa_hook. */
|
||||
/** Append a hook. */
|
||||
static inline void spa_hook_list_append(struct spa_hook_list *list,
|
||||
struct spa_hook *hook,
|
||||
const void *funcs, void *data)
|
||||
|
|
@ -97,7 +103,7 @@ static inline void spa_hook_list_append(struct spa_hook_list *list,
|
|||
spa_list_append(&list->list, &hook->link);
|
||||
}
|
||||
|
||||
/** Prepend a hook \memberof spa_hook */
|
||||
/** Prepend a hook */
|
||||
static inline void spa_hook_list_prepend(struct spa_hook_list *list,
|
||||
struct spa_hook *hook,
|
||||
const void *funcs, void *data)
|
||||
|
|
@ -107,7 +113,7 @@ static inline void spa_hook_list_prepend(struct spa_hook_list *list,
|
|||
spa_list_prepend(&list->list, &hook->link);
|
||||
}
|
||||
|
||||
/** Remove a hook \memberof spa_hook */
|
||||
/** Remove a hook */
|
||||
static inline void spa_hook_remove(struct spa_hook *hook)
|
||||
{
|
||||
spa_list_remove(&hook->link);
|
||||
|
|
@ -201,6 +207,10 @@ spa_hook_list_join(struct spa_hook_list *list,
|
|||
#define spa_hook_list_call_start(l,s,t,m,v,...) spa_hook_list_do_call(l,s,t,m,v,false,##__VA_ARGS__)
|
||||
#define spa_hook_list_call_once_start(l,s,t,m,v,...) spa_hook_list_do_call(l,s,t,m,v,true,##__VA_ARGS__)
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -37,6 +37,14 @@ extern "C" {
|
|||
|
||||
#include <spa/utils/defs.h>
|
||||
|
||||
/** \defgroup spa_json SPA JSON Parser
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup spa_json
|
||||
* \{
|
||||
*/
|
||||
|
||||
/* a simple JSON compatible tokenizer */
|
||||
struct spa_json {
|
||||
const char *cur;
|
||||
|
|
@ -401,6 +409,10 @@ static inline int spa_json_encode_string(char *str, int size, const char *val)
|
|||
return len-1;
|
||||
}
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -29,6 +29,14 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** \defgroup spa_keys SPA Key Names
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup spa_keys
|
||||
* \{
|
||||
*/
|
||||
|
||||
/** for objects */
|
||||
#define SPA_KEY_OBJECT_PATH "object.path" /**< a unique path to
|
||||
* identity the object */
|
||||
|
|
@ -121,6 +129,10 @@ extern "C" {
|
|||
#define SPA_KEY_API_JACK_SERVER "api.jack.server" /**< a jack server name */
|
||||
#define SPA_KEY_API_JACK_CLIENT "api.jack.client" /**< an internal jack client */
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -29,6 +29,11 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \addtogroup spa_utils
|
||||
* \{
|
||||
*/
|
||||
|
||||
struct spa_list {
|
||||
struct spa_list *next;
|
||||
struct spa_list *prev;
|
||||
|
|
@ -140,6 +145,10 @@ static inline void spa_list_remove(struct spa_list *elem)
|
|||
#define spa_list_cursor_end(cursor, member) \
|
||||
spa_list_remove(&(cursor).member)
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -29,6 +29,14 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** \defgroup spa_names SPA Factory Names
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup spa_names
|
||||
* \{
|
||||
*/
|
||||
|
||||
/** for factory names */
|
||||
#define SPA_NAME_SUPPORT_CPU "support.cpu" /**< A CPU interface */
|
||||
#define SPA_NAME_SUPPORT_DBUS "support.dbus" /**< A DBUS interface */
|
||||
|
|
@ -130,6 +138,10 @@ extern "C" {
|
|||
#define SPA_NAME_API_VULKAN_COMPUTE_SOURCE \
|
||||
"api.vulkan.compute.source" /**< a vulkan compute source. */
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -29,6 +29,11 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \addtogroup spa_utils
|
||||
* \{
|
||||
*/
|
||||
|
||||
#include <spa/utils/defs.h>
|
||||
#include <spa/utils/list.h>
|
||||
|
||||
|
|
@ -51,6 +56,10 @@ extern "C" {
|
|||
strerror(_err); \
|
||||
})
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -29,6 +29,11 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \addtogroup spa_utils
|
||||
* \{
|
||||
*/
|
||||
|
||||
struct spa_ringbuffer;
|
||||
|
||||
#include <string.h>
|
||||
|
|
@ -49,7 +54,6 @@ struct spa_ringbuffer {
|
|||
* Initialize a spa_ringbuffer with \a size.
|
||||
*
|
||||
* \param rbuf a spa_ringbuffer
|
||||
* \param size the number of elements in the ringbuffer
|
||||
*/
|
||||
static inline void spa_ringbuffer_init(struct spa_ringbuffer *rbuf)
|
||||
{
|
||||
|
|
@ -60,6 +64,7 @@ static inline void spa_ringbuffer_init(struct spa_ringbuffer *rbuf)
|
|||
* Sets the pointers so that the ringbuffer contains \a size bytes.
|
||||
*
|
||||
* \param rbuf a spa_ringbuffer
|
||||
* \param size the target size of \a rbuf
|
||||
*/
|
||||
static inline void spa_ringbuffer_set_avail(struct spa_ringbuffer *rbuf, uint32_t size)
|
||||
{
|
||||
|
|
@ -87,7 +92,7 @@ static inline int32_t spa_ringbuffer_get_read_index(struct spa_ringbuffer *rbuf,
|
|||
* Read \a len bytes from \a rbuf starting \a offset. \a offset must be taken
|
||||
* modulo \a size and len should be smaller than \a size.
|
||||
*
|
||||
* \param rbuf a #struct spa_ringbuffer
|
||||
* \param rbuf a struct \ref spa_ringbuffer
|
||||
* \param buffer memory to read from
|
||||
* \param size the size of \a buffer
|
||||
* \param offset offset in \a buffer to read from
|
||||
|
|
@ -166,6 +171,10 @@ static inline void spa_ringbuffer_write_update(struct spa_ringbuffer *rbuf, int3
|
|||
__atomic_store_n(&rbuf->writeindex, index, __ATOMIC_RELEASE);
|
||||
}
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
|
|
|
|||
|
|
@ -34,10 +34,17 @@ extern "C" {
|
|||
|
||||
#include <spa/utils/defs.h>
|
||||
|
||||
/**
|
||||
* \addtogroup spa_utils
|
||||
* \{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \return true if the two strings are equal, false otherwise
|
||||
*
|
||||
* If both \a a and \a b are NULL, the two are considered equal.
|
||||
*
|
||||
* \ingroup spa
|
||||
*/
|
||||
static inline bool spa_streq(const char *s1, const char *s2)
|
||||
{
|
||||
|
|
@ -93,6 +100,10 @@ static inline bool spa_atob(const char *str)
|
|||
return spa_streq(str, "true") || spa_streq(str, "1");
|
||||
}
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -31,6 +31,11 @@ extern "C" {
|
|||
|
||||
#include <spa/utils/defs.h>
|
||||
|
||||
/**
|
||||
* \addtogroup spa_types
|
||||
* \{
|
||||
*/
|
||||
|
||||
#ifndef SPA_TYPE_ROOT
|
||||
#define SPA_TYPE_ROOT spa_types
|
||||
#endif
|
||||
|
|
@ -122,6 +127,10 @@ static const struct spa_type_info spa_types[] = {
|
|||
{ 0, 0, NULL, NULL }
|
||||
};
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -31,6 +31,14 @@ extern "C" {
|
|||
|
||||
#include <spa/utils/defs.h>
|
||||
|
||||
/** \defgroup spa_types SPA Types
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup spa_types
|
||||
* \{
|
||||
*/
|
||||
|
||||
enum {
|
||||
/* Basic types */
|
||||
SPA_TYPE_START = 0x00000,
|
||||
|
|
@ -131,6 +139,10 @@ struct spa_type_info {
|
|||
const struct spa_type_info *values;
|
||||
};
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue