Improve memory handling

Reserve 0,0 for stack allocated mem that we never free
Improve allocation in the link
Parse format and properties in-line, there is no need to allocate
memory.
Improve buffer cleanup in alsa
Add timestamps and offset to alsa
This commit is contained in:
Wim Taymans 2016-09-20 19:52:05 +02:00
parent 77f93e37ed
commit 27acab7532
7 changed files with 155 additions and 69 deletions

View file

@ -52,6 +52,7 @@ struct _SpaALSABuffer {
SpaMetaRingbuffer ringbuffer;
SpaData datas[1];
SpaBuffer *outbuf;
SpaMetaHeader *h;
void *ptr;
bool outstanding;
SpaALSABuffer *next;
@ -89,7 +90,6 @@ struct _SpaALSAState {
SpaPortStatus status;
bool have_buffers;
SpaMemory *alloc_bufmem;
SpaMemory *alloc_mem;
SpaALSABuffer *alloc_buffers;
@ -102,6 +102,7 @@ struct _SpaALSAState {
SpaPollFd fds[16];
SpaPollItem poll;
int64_t sample_count;
int64_t last_ticks;
int64_t last_monotonic;
};