mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-10-14 20:02:38 +00:00
0f0565175e
Add more info to the main SPA page and split the design vs plugin pages up, together with some more documentation to ideally lower make this easier to understand on a glance. Most of the actual plugin loading documentation are unmodified.
36 lines
1.1 KiB
Plaintext
36 lines
1.1 KiB
Plaintext
/** \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 statis 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
|
|
|
|
*/
|