64 #define SPA_CHUNK_FLAG_NONE 0
65 #define SPA_CHUNK_FLAG_CORRUPTED (1u<<0)
66 #define SPA_CHUNK_FLAG_EMPTY (1u<<1)
82 #define SPA_DATA_FLAG_NONE 0
83 #define SPA_DATA_FLAG_READABLE (1u<<0)
84 #define SPA_DATA_FLAG_WRITABLE (1u<<1)
85 #define SPA_DATA_FLAG_DYNAMIC (1u<<2)
86 #define SPA_DATA_FLAG_READWRITE (SPA_DATA_FLAG_READABLE|SPA_DATA_FLAG_WRITABLE)
108 for (i = 0; i < b->
n_metas; i++)
static void * spa_buffer_find_meta_data(const struct spa_buffer *b, uint32_t type, size_t size)
Definition: buffer.h:128
static struct spa_meta * spa_buffer_find_meta(const struct spa_buffer *b, uint32_t type)
Find metadata in a buffer.
Definition: buffer.h:117
spa_data_type
Definition: buffer.h:50
@ _SPA_DATA_LAST
not part of ABI
Definition: buffer.h:58
@ SPA_DATA_MemFd
generic fd, mmap to get to memory
Definition: buffer.h:54
@ SPA_DATA_MemPtr
pointer to memory, the data field in struct spa_data is set.
Definition: buffer.h:52
@ SPA_DATA_Invalid
Definition: buffer.h:51
@ SPA_DATA_MemId
memory is identified with an id
Definition: buffer.h:56
@ SPA_DATA_DmaBuf
fd to dmabuf memory
Definition: buffer.h:55
A Buffer.
Definition: buffer.h:109
uint32_t n_metas
number of metadata
Definition: buffer.h:110
struct spa_meta * metas
array of metadata
Definition: buffer.h:112
struct spa_data * datas
array of data members
Definition: buffer.h:113
uint32_t n_datas
number of data members
Definition: buffer.h:111
Chunk of memory, can change for each buffer.
Definition: buffer.h:62
int32_t stride
stride of valid data
Definition: buffer.h:68
uint32_t size
size of valid data.
Definition: buffer.h:66
int32_t flags
chunk flags
Definition: buffer.h:77
uint32_t offset
offset of valid data.
Definition: buffer.h:63
Data for a buffer this stays constant for a buffer.
Definition: buffer.h:81
struct spa_chunk * chunk
valid chunk of memory
Definition: buffer.h:105
int64_t fd
optional fd for data
Definition: buffer.h:101
uint32_t mapoffset
offset to map fd at
Definition: buffer.h:102
uint32_t flags
data flags
Definition: buffer.h:100
void * data
optional data pointer
Definition: buffer.h:104
uint32_t maxsize
max size of data
Definition: buffer.h:103
uint32_t type
memory type, one of enum spa_data_type, when allocating memory, the type contains a bitmask of allowe...
Definition: buffer.h:82