Rework buffer memory layout

Move offset, size and stride to separate chunk structure that we
can keep in shared memory.
Add shared metadata type to hold the memory block holding the
metadata.
This commit is contained in:
Wim Taymans 2016-12-15 14:57:34 +01:00
parent 5e8a3afe17
commit 0d0385b881
13 changed files with 328 additions and 241 deletions

View file

@ -286,10 +286,11 @@ typedef struct {
} PinosMessageAddMem;
typedef struct {
SpaBuffer *buffer;
uint32_t mem_id;
off_t offset;
size_t size;
} PinosMessageMemRef;
} PinosMessageBuffer;
/* PINOS_MESSAGE_USE_BUFFERS */
typedef struct {
@ -297,7 +298,7 @@ typedef struct {
SpaDirection direction;
uint32_t port_id;
unsigned int n_buffers;
PinosMessageMemRef *buffers;
PinosMessageBuffer *buffers;
} PinosMessageUseBuffers;
PinosConnection * pinos_connection_new (int fd);