pipewire/doc/dox/api/spa-design.dox
Pauli Virtanen de617697be doc: sync with master branch
Update doc/ from master branch.

tutorial: fix s16 scale and add some docs
doc: add 'Configuration' page
doc: disable deprecated list
doc: fix some doxygen warnings
doc: put new pulse modules to right place
doc: filter some constructs that confuse doxygen
doc: Fix typo 'statis' -> 'static'
doc: include pipewire-pulse modules explanations also on man page
doc: add pw-v4l2.1 and spa-*.1
doc: add pw-reserve.1
doc: internals/access: update documentation vs current state
2024-02-16 21:53:23 +02:00

35 lines
1.1 KiB
Text

/** \page page_spa_design SPA Design
# Conventions
## Types
Types are generally divided into two categories:
- String types: They identify interfaces and highlevel object types.
- Integer types: These are enumerations used in the parts where high
performance/ease of use/low space overhead is needed.
The SPA type is system is static and very simple but still allows you
to make and introspect complex object type hierarchies.
See the type system docs for more info.
## Error Codes
SPA uses negative integers as errno style error codes. Functions that return an
int result code generated an error when < 0. `spa_strerror()` can be used to
get a string representation of the error code.
SPA also has a way to encode asynchronous results. This is done by setting a
high bit (bit 30, the `ASYNC_BIT`) in the result code and a sequence number
in the lower bits. This result is normally identified as a positive success
result code and the sequence number can later be matched to the completion
event.
## Useful Macros
SPA comes with some useful macros defined in `<spa/utils/defs.h>` and a
number of utility functions, see \ref spa_utils.
*/