Commit 07533cb7 authored by Peter Hutterer's avatar Peter Hutterer Committed by Wim Taymans
Browse files

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.
parent d0aff793
......@@ -29,6 +29,11 @@ extern "C" {
#include <spa/buffer/buffer.h>
/**
* \addtogroup spa_buffer
* \{
*/
/** information about the buffer layout */
struct spa_buffer_alloc_info {
#define SPA_BUFFER_ALLOC_FLAG_INLINE_META (1<<0) /**< add metadata data in the skeleton */
......@@ -178,7 +183,7 @@ static inline int spa_buffer_alloc_fill_info(struct spa_buffer_alloc_info *info,
/**
* Fill skeleton and data according to the allocation info
*
* Use the allocation info to create a \ref struct spa_buffer into
* Use the allocation info to create a struct \ref spa_buffer into
* \a skel_mem and \a data_mem.
*
* Depending on the flags given when calling \ref
......@@ -186,10 +191,10 @@ static inline int spa_buffer_alloc_fill_info(struct spa_buffer_alloc_info *info,
* will be referenced in either skel_mem or data_mem.
*
* \param info an allocation info
* \param skel_mem memory to hold the \ref struct spa_buffer and the
* \param skel_mem memory to hold the struct \ref spa_buffer and the
* pointers to meta, chunk and memory.
* \param data_mem memory to hold the meta, chunk and memory
* \return a \ref struct spa_buffer in \a skel_mem
* \return a struct \ref spa_buffer in \a skel_mem
*/
static inline struct spa_buffer *
spa_buffer_alloc_layout(struct spa_buffer_alloc_info *info,
......@@ -262,8 +267,8 @@ spa_buffer_alloc_layout(struct spa_buffer_alloc_info *info,
*
* \param info the allocation info for one buffer
* \param n_buffers the number of buffers to create
* \param buffer a array with space to hold \a n_buffers pointers to buffers
* \param skel_mem memory for the \ref struct spa_buffer
* \param buffers a array with space to hold \a n_buffers pointers to buffers
* \param skel_mem memory for the struct \ref spa_buffer
* \param data_mem memory for the meta, chunk, memory of the buffer if not
* inlined in the skeleton.
* \return 0 on success.
......@@ -299,7 +304,7 @@ spa_buffer_alloc_layout_array(struct spa_buffer_alloc_info *info,
* \param n_datas number of datas
* \param datas \a n_datas memory specification
* \param data_aligns \a n_datas alignment specifications
* \returns an array of \a n_buffers pointers to \ref struct spa_buffer
* \returns an array of \a n_buffers pointers to struct \ref spa_buffer
* with the given metadata, data and alignment or NULL when
* allocation failed.
*
......@@ -330,6 +335,9 @@ spa_buffer_alloc_array(uint32_t n_buffers, uint32_t flags,
return buffers;
}
/**
* \}
*/
#ifdef __cplusplus
} /* extern "C" */
......
......@@ -31,12 +31,17 @@ extern "C" {
#include <spa/utils/defs.h>
#include <spa/buffer/meta.h>
/** \page page_buffer Buffers
/** \defgroup spa_buffer SPA Buffers
*
* Buffers describe the data and metadata that is exchanged between
* ports of a node.
*/
/**
* \addtogroup spa_buffer
* \{
*/
enum spa_data_type {
SPA_DATA_Invalid,
SPA_DATA_MemPtr, /**< pointer to memory, the data field in
......@@ -112,6 +117,10 @@ static inline void *spa_buffer_find_meta_data(const struct spa_buffer *b, uint32
return NULL;
}
/**
* \}
*/
#ifdef __cplusplus
} /* extern "C" */
#endif
......
......@@ -32,10 +32,11 @@ extern "C" {
#include <spa/utils/defs.h>
#include <spa/pod/pod.h>
/** \page page_meta Metadata
*
* Metadata contains extra information on a buffer.
/**
* \addtogroup spa_buffer
* \{
*/
enum spa_meta_type {
SPA_META_Invalid,
SPA_META_Header, /**< struct spa_meta_header */
......@@ -151,6 +152,10 @@ struct spa_meta_busy {
uint32_t count; /**< number of users busy with the buffer */
};
/**
* \}
*/
#ifdef __cplusplus
} /* extern "C" */
#endif
......
......@@ -25,6 +25,11 @@
#ifndef SPA_BUFFER_TYPES_H
#define SPA_BUFFER_TYPES_H
/**
* \addtogroup spa_buffer
* \{
*/
#ifdef __cplusplus
extern "C" {
#endif
......@@ -77,6 +82,10 @@ static const struct spa_type_info spa_type_meta_type[] = {
{ 0, 0, NULL, NULL },
};
/**
* \}
*/
#ifdef __cplusplus
} /* extern "C" */
#endif
......
......@@ -32,10 +32,15 @@ extern "C" {
#include <spa/utils/defs.h>
#include <spa/pod/pod.h>
/** Controls
/** \defgroup spa_control SPA Controls
*
*/
/**
* \addtogroup spa_control
* \{
*/
/** Different Control types */
enum spa_control_type {
SPA_CONTROL_Invalid,
......@@ -46,6 +51,10 @@ enum spa_control_type {
_SPA_CONTROL_LAST, /**< not part of ABI */
};
/**
* \}
*/
#ifdef __cplusplus
} /* extern "C" */
#endif
......
......@@ -29,6 +29,11 @@
extern "C" {
#endif
/**
* \addtogroup spa_control
* \{
*/
#include <spa/utils/defs.h>
#include <spa/utils/type-info.h>
#include <spa/control/control.h>
......@@ -45,6 +50,10 @@ static const struct spa_type_info spa_type_control[] = {
{ 0, 0, NULL, NULL },
};
/**
* \}
*/
#ifdef __cplusplus
} /* extern "C" */
#endif
......
......@@ -29,6 +29,15 @@
extern "C" {
#endif
/** \defgroup spa_debug SPA Debug
*
*/
/**
* \addtogroup spa_debug
* \{
*/
#include <spa/debug/mem.h>
#include <spa/debug/types.h>
#include <spa/buffer/type-info.h>
......@@ -112,6 +121,10 @@ static inline int spa_debug_buffer(int indent, const struct spa_buffer *buffer)
return 0;
}
/**
* \}
*/
#ifdef __cplusplus
} /* extern "C" */
#endif
......
......@@ -29,6 +29,11 @@
extern "C" {
#endif
/**
* \addtogroup spa_debug
* \{
*/
#include <spa/utils/dict.h>
#ifndef spa_debug
......@@ -45,6 +50,10 @@ static inline int spa_debug_dict(int indent, const struct spa_dict *dict)
return 0;
}
/**
* \}
*/
#ifdef __cplusplus
} /* extern "C" */
#endif
......
......@@ -29,6 +29,11 @@
extern "C" {
#endif
/**
* \addtogroup spa_debug
* \{
*/
#include <spa/pod/parser.h>
#include <spa/debug/types.h>
#include <spa/param/type-info.h>
......@@ -195,6 +200,10 @@ static inline int spa_debug_format(int indent,
return 0;
}
/**
* \}
*/
#ifdef __cplusplus
} /* extern "C" */
#endif
......
......@@ -29,6 +29,11 @@
extern "C" {
#endif
/**
* \addtogroup spa_debug
* \{
*/
#include <spa/utils/dict.h>
#ifndef spa_debug
......@@ -53,6 +58,10 @@ static inline int spa_debug_mem(int indent, const void *data, size_t size)
return 0;
}
/**
* \}
*/
#ifdef __cplusplus
} /* extern "C" */
#endif
......
......@@ -29,6 +29,11 @@
extern "C" {
#endif
/**
* \addtogroup spa_debug
* \{
*/
#include <spa/node/node.h>
#include <spa/debug/dict.h>
......@@ -49,6 +54,10 @@ static inline int spa_debug_port_info(int indent, const struct spa_port_info *in
return 0;
}
/**
* \}
*/
#ifdef __cplusplus
} /* extern "C" */
......
......@@ -29,6 +29,11 @@
extern "C" {
#endif
/**
* \addtogroup spa_debug
* \{
*/
#include <spa/debug/mem.h>
#include <spa/debug/types.h>
#include <spa/pod/pod.h>
......@@ -201,6 +206,11 @@ static inline int spa_debug_pod(int indent,
SPA_POD_BODY_SIZE(pod));
}
/**
* \}
*/
#ifdef __cplusplus
} /* extern "C" */
#endif
......
......@@ -29,6 +29,11 @@
extern "C" {
#endif
/**
* \addtogroup spa_debug
* \{
*/
#include <spa/utils/type-info.h>
#include <string.h>
......@@ -91,6 +96,10 @@ static inline uint32_t spa_debug_type_find_type(const struct spa_type_info *info
return SPA_ID_INVALID;
}
/**
* \}
*/
#ifdef __cplusplus
} /* extern "C" */
#endif
......
......@@ -29,6 +29,14 @@
extern "C" {
#endif
/** \defgroup spa_graph SPA Graph
*/
/**
* \addtogroup spa_graph
* \{
*/
#include <spa/utils/defs.h>
#include <spa/utils/list.h>
#include <spa/utils/hook.h>
......@@ -345,6 +353,10 @@ static const struct spa_graph_node_callbacks spa_graph_node_impl_default = {
.reuse_buffer = spa_graph_node_impl_reuse_buffer,
};
/**
* \}
*/
#ifdef __cplusplus
} /* extern "C" */
#endif
......
......@@ -35,13 +35,18 @@ extern "C" {
#include <spa/pod/event.h>
/**
* spa_device:
* \defgroup spa_device SPA Device
*
* The device interface can be used to monitor all kinds of devices
* and create objects as a result. Objects a typically other
* Devices or Nodes.
*
*/
/**
* \addtogroup spa_device
* \{
*/
#define SPA_TYPE_INTERFACE_Device SPA_TYPE_INFO_INTERFACE_BASE "Device"
#define SPA_VERSION_DEVICE 0
......@@ -291,6 +296,9 @@ struct spa_device_methods {
#define SPA_KEY_DEVICE_STRING "device.string" /**< device string in the underlying
* layer's format. E.g. "surround51:0" */
/**
* \}
*/
#ifdef __cplusplus
} /* extern "C" */
......
......@@ -29,6 +29,11 @@
extern "C" {
#endif
/**
* \addtogroup spa_node
* \{
*/
#include <spa/pod/command.h>
/* object id of SPA_TYPE_COMMAND_Node */
......@@ -55,6 +60,10 @@ enum spa_node_command {
#define SPA_NODE_COMMAND_INIT(id) SPA_COMMAND_INIT(SPA_TYPE_COMMAND_Node, id)
/**
* \}
*/
#ifdef __cplusplus
} /* extern "C" */
#endif
......
......@@ -29,6 +29,11 @@
extern "C" {
#endif
/**
* \addtogroup spa_node
* \{
*/
#include <spa/pod/event.h>
/* object id of SPA_TYPE_EVENT_Node */
......@@ -41,6 +46,10 @@ enum spa_node_event {
#define SPA_NODE_EVENT_ID(ev) SPA_EVENT_ID(ev, SPA_TYPE_EVENT_Node)
#define SPA_NODE_EVENT_INIT(id) SPA_EVENT_INIT(SPA_TYPE_EVENT_Node, id)
/**
* \}
*/
#ifdef __cplusplus
} /* extern "C" */
#endif
......
......@@ -29,6 +29,11 @@
extern "C" {
#endif
/**
* \addtogroup spa_node
* \{
*/
#include <spa/utils/defs.h>
#include <spa/pod/pod.h>
......@@ -288,6 +293,10 @@ struct spa_io_rate_match {
uint32_t padding[7];
};
/**
* \}
*/
#ifdef __cplusplus
} /* extern "C" */
#endif
......
......@@ -29,6 +29,11 @@
extern "C" {
#endif
/**
* \addtogroup spa_node
* \{
*/
/** node keys */
#define SPA_KEY_NODE_NAME "node.name" /**< a node name */
#define SPA_KEY_NODE_LATENCY "node.latency" /**< the requested node latency */
......@@ -48,6 +53,10 @@ extern "C" {
#define SPA_KEY_PORT_MONITOR "port.monitor" /**< this port is a monitor port */
/**
* \}
*/
#ifdef __cplusplus
} /* extern "C" */
#endif
......
......@@ -29,6 +29,15 @@
extern "C" {
#endif
/** \defgroup spa_node SPA Nodes
* A spa_node is a component that can consume and produce buffers.
*/
/**
* \addtogroup spa_node
* \{
*/
#include <spa/utils/defs.h>
#include <spa/utils/type.h>
#include <spa/utils/hook.h>
......@@ -37,9 +46,6 @@ extern "C" {
#include <spa/node/command.h>
/**
* A spa_node is a component that can consume and produce buffers.
*/
#define SPA_TYPE_INTERFACE_Node SPA_TYPE_INFO_INTERFACE_BASE "Node"
#define SPA_VERSION_NODE 0
......@@ -655,6 +661,10 @@ struct spa_node_methods {
#define spa_node_port_reuse_buffer(n,...) spa_node_method(n, port_reuse_buffer, 0, __VA_ARGS__)
#define spa_node_process(n) spa_node_method(n, process, 0)
/**
* \}
*/
#ifdef __cplusplus
} /* extern "C" */
#endif
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment