mem: remove memory stuff

Remove the memory stuff from the spa API, we can do thing more simple
and efficiently if we always allocate buffers outside of the plugins and
only implement an alloc function on the node when it can do something
clever.
Move serialize code to the props/format/buffer code
Make it possible to copy a format and properties.
This commit is contained in:
Wim Taymans 2016-09-29 18:18:59 +02:00
parent fe37e2bc1b
commit 24108e01c1
46 changed files with 901 additions and 1546 deletions

View file

@ -45,12 +45,9 @@ typedef struct {
bool period_event;
} SpaALSAProps;
#define MAX_BUFFERS 16
struct _SpaALSABuffer {
SpaBuffer buffer;
SpaMeta metas[2];
SpaMetaHeader header;
SpaMetaRingbuffer ringbuffer;
SpaData datas[1];
SpaBuffer *outbuf;
SpaMetaHeader *h;
void *ptr;
@ -90,9 +87,7 @@ struct _SpaALSAState {
SpaPortStatus status;
bool have_buffers;
SpaMemory *alloc_bufmem;
SpaMemory *alloc_mem;
SpaALSABuffer *alloc_buffers;
SpaALSABuffer buffers[MAX_BUFFERS];
unsigned int n_buffers;
SpaQueue free;