Add POD helper objects

POD (plain old data) objects are similar to LV2 Atoms and allows storage
and construction of datastructures in memory or on the stack. They can
be copied with a simple memcpy.

The idea is to use this to construct the network messages and to replace
the structures used for describing formats and properties.
This commit is contained in:
Wim Taymans 2017-02-22 13:12:32 +01:00
parent 922997175d
commit 7fc73953cd
8 changed files with 657 additions and 11 deletions

View file

@ -88,6 +88,16 @@ typedef enum {
SPA_DIRECTION_OUTPUT,
} SpaDirection;
typedef struct {
uint32_t width;
uint32_t height;
} SpaRectangle;
typedef struct {
uint32_t num;
uint32_t denom;
} SpaFraction;
typedef void (*SpaNotify) (void *data);
#define SPA_N_ELEMENTS(arr) (sizeof (arr) / sizeof ((arr)[0]))