mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-07 13:30:09 -05:00
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:
parent
922997175d
commit
7fc73953cd
8 changed files with 657 additions and 11 deletions
|
|
@ -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]))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue