5 #ifndef SPA_DEBUG_BUFFER_H
6 #define SPA_DEBUG_BUFFER_H
26 #ifndef SPA_API_DEBUG_BUFFER
28 #define SPA_API_DEBUG_BUFFER SPA_API_IMPL
30 #define SPA_API_DEBUG_BUFFER static inline
40 for (i = 0; i <
buffer->n_metas; i++) {
42 const char *type_name;
45 spa_debugc(ctx,
"%*s" " meta %d: type %d (%s), data %p, size %d:", indent,
"", i, m->
type,
52 spa_debugc(ctx,
"%*s" " struct spa_meta_header:", indent,
"");
63 spa_debugc(ctx,
"%*s" " struct spa_meta_region:", indent,
"");
74 spa_debugc(ctx,
"%*s" " struct spa_meta_region:", indent,
"");
87 spa_debugc(ctx,
"%*s" " Unknown:", indent,
"");
92 for (i = 0; i <
buffer->n_datas; i++) {
98 spa_debugc(ctx,
"%*s" " fd: %" PRIi64, indent,
"", d->
fd);
buffer[1023]
Definition: core.h:437
static const struct spa_type_info spa_type_data_type[]
Definition: type-info.h:43
#define spa_meta_for_each(pos, meta)
iterate all the items in a metadata
Definition: meta.h:108
static const struct spa_type_info spa_type_meta_type[]
Definition: type-info.h:91
@ SPA_META_VideoDamage
array of struct spa_meta_region with damage, where an invalid entry or end-of-array marks the end.
Definition: meta.h:39
@ SPA_META_Bitmap
struct spa_meta_bitmap
Definition: meta.h:40
@ SPA_META_Cursor
struct spa_meta_cursor
Definition: meta.h:41
@ SPA_META_VideoCrop
struct spa_meta_region with cropping data
Definition: meta.h:38
@ SPA_META_Header
struct spa_meta_header
Definition: meta.h:37
SPA_API_DEBUG_MEM int spa_debugc_mem(struct spa_debug_context *ctx, int indent, const void *data, size_t size)
Definition: mem.h:36
#define spa_debugc(_c, _fmt,...)
Definition: context.h:49
SPA_API_DEBUG_BUFFER int spa_debugc_buffer(struct spa_debug_context *ctx, int indent, const struct spa_buffer *buffer)
Definition: buffer.h:41
#define SPA_API_DEBUG_BUFFER
Definition: buffer.h:37
SPA_API_DEBUG_TYPES const char * spa_debug_type_find_name(const struct spa_type_info *info, uint32_t type)
Definition: types.h:61
SPA_API_DEBUG_BUFFER int spa_debug_buffer(int indent, const struct spa_buffer *buffer)
Definition: buffer.h:116
A Buffer.
Definition: buffer.h:110
int32_t stride
stride of valid data
Definition: buffer.h:65
uint32_t size
size of valid data.
Definition: buffer.h:63
uint32_t offset
offset of valid data.
Definition: buffer.h:60
Data for a buffer this stays constant for a buffer.
Definition: buffer.h:78
struct spa_chunk * chunk
valid chunk of memory
Definition: buffer.h:106
int64_t fd
optional fd for data
Definition: buffer.h:102
uint32_t mapoffset
offset to map fd at, this is page aligned
Definition: buffer.h:103
uint32_t flags
data flags
Definition: buffer.h:101
void * data
optional data pointer
Definition: buffer.h:105
uint32_t maxsize
max size of data
Definition: buffer.h:104
uint32_t type
memory type, one of enum spa_data_type, when allocating memory, the type contains a bitmask of allowe...
Definition: buffer.h:79
int32_t y
Definition: defs.h:125
int32_t x
Definition: defs.h:124
uint32_t width
Definition: defs.h:117
uint32_t height
Definition: defs.h:118
struct spa_point position
Definition: defs.h:131
struct spa_rectangle size
Definition: defs.h:132