More work on memory

Add explicit DMABUF memory because we can't use it like an fd in v4l2.
mmap random fd memory and use userptr in v4l2 to use it.
Allocate buffer data memory in memfd when no node can allocate.
Improve debug some more
This commit is contained in:
Wim Taymans 2016-10-04 15:56:33 +02:00
parent d828073bb8
commit b8f693ceea
14 changed files with 425 additions and 329 deletions

View file

@ -85,6 +85,7 @@ typedef void (*SpaNotify) (void *data);
#define SPA_N_ELEMENTS(arr) (sizeof (arr) / sizeof ((arr)[0]))
#define SPA_MIN(a,b) ((a)<(b) ? (a) : (b))
#define SPA_MAX(a,b) ((a)>(b) ? (a) : (b))
#define SPA_CLAMP(v,a,b) ((v)>(b) ? (b) : ((v) < (a) ? (a) : (v)))
#define SPA_MEMBER(b,o,t) ((t*)((uint8_t*)(b) + (o)))
#define SPA_PTRDIFF(p1,p2) ((uint8_t*)(p1) - (uint8_t*)(p2))