5#ifndef SPA_DEBUG_BUFFER_H
6#define SPA_DEBUG_BUFFER_H
30 spa_debugc(ctx,
"%*s" "struct spa_buffer %p:", indent,
"", buffer);
31 spa_debugc(ctx,
"%*s" " n_metas: %u (at %p)", indent,
"", buffer->n_metas, buffer->metas);
32 for (i = 0; i < buffer->n_metas; i++) {
33 struct spa_meta *m = &buffer->metas[i];
34 const char *type_name;
37 spa_debugc(ctx,
"%*s" " meta %d: type %d (%s), data %p, size %d:", indent,
"", i, m->
type,
44 spa_debugc(ctx,
"%*s" " struct spa_meta_header:", indent,
"");
45 spa_debugc(ctx,
"%*s" " flags: %08x", indent,
"", h->flags);
46 spa_debugc(ctx,
"%*s" " offset: %u", indent,
"", h->offset);
47 spa_debugc(ctx,
"%*s" " seq: %" PRIu64, indent,
"", h->seq);
48 spa_debugc(ctx,
"%*s" " pts: %" PRIi64, indent,
"", h->pts);
49 spa_debugc(ctx,
"%*s" " dts_offset: %" PRIi64, indent,
"", h->dts_offset);
55 spa_debugc(ctx,
"%*s" " struct spa_meta_region:", indent,
"");
56 spa_debugc(ctx,
"%*s" " x: %d", indent,
"", h->region.position.x);
57 spa_debugc(ctx,
"%*s" " y: %d", indent,
"", h->region.position.y);
58 spa_debugc(ctx,
"%*s" " width: %d", indent,
"", h->region.size.width);
59 spa_debugc(ctx,
"%*s" " height: %d", indent,
"", h->region.size.height);
66 spa_debugc(ctx,
"%*s" " struct spa_meta_region:", indent,
"");
79 spa_debugc(ctx,
"%*s" " Unknown:", indent,
"");
83 spa_debugc(ctx,
"%*s" " n_datas: \t%u (at %p)", indent,
"", buffer->n_datas, buffer->datas);
84 for (i = 0; i < buffer->n_datas; i++) {
85 struct spa_data *d = &buffer->datas[i];
90 spa_debugc(ctx,
"%*s" " fd: %" PRIi64, indent,
"", d->
fd);
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:99
static const struct spa_type_info spa_type_meta_type[]
Definition type-info.h:72
@ 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:29
@ SPA_META_Bitmap
struct spa_meta_bitmap
Definition meta.h:30
@ SPA_META_Cursor
struct spa_meta_cursor
Definition meta.h:31
@ SPA_META_VideoCrop
struct spa_meta_region with cropping data
Definition meta.h:28
@ SPA_META_Header
struct spa_meta_header
Definition meta.h:27
static int spa_debug_buffer(int indent, const struct spa_buffer *buffer)
Definition buffer.h:106
#define spa_debugc(_c, _fmt,...)
Definition context.h:37
static const char * spa_debug_type_find_name(const struct spa_type_info *info, uint32_t type)
Definition types.h:53
static int spa_debugc_buffer(struct spa_debug_context *ctx, int indent, const struct spa_buffer *buffer)
Definition buffer.h:31
static int spa_debugc_mem(struct spa_debug_context *ctx, int indent, const void *data, size_t size)
Definition mem.h:26
A Buffer.
Definition buffer.h:90
int32_t stride
stride of valid data
Definition buffer.h:49
uint32_t size
size of valid data.
Definition buffer.h:47
uint32_t offset
offset of valid data.
Definition buffer.h:44
Data for a buffer this stays constant for a buffer.
Definition buffer.h:62
struct spa_chunk * chunk
valid chunk of memory
Definition buffer.h:86
int64_t fd
optional fd for data
Definition buffer.h:82
uint32_t mapoffset
offset to map fd at
Definition buffer.h:83
uint32_t flags
data flags
Definition buffer.h:81
void * data
optional data pointer
Definition buffer.h:85
uint32_t maxsize
max size of data
Definition buffer.h:84
uint32_t type
memory type, one of enum spa_data_type, when allocating memory, the type contains a bitmask of allowe...
Definition buffer.h:63
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