mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
alloctrace: print size and allocator details for buffers and memories
This commit is contained in:
parent
50888062ba
commit
a35dfb1b16
1 changed files with 9 additions and 0 deletions
|
@ -179,6 +179,15 @@ gst_alloc_trace_print (const GstAllocTrace * trace)
|
||||||
extra = g_strdup_printf ("%s", GST_MESSAGE_TYPE_NAME (data));
|
extra = g_strdup_printf ("%s", GST_MESSAGE_TYPE_NAME (data));
|
||||||
else
|
else
|
||||||
extra = gst_structure_to_string (s);
|
extra = gst_structure_to_string (s);
|
||||||
|
} else if (type == GST_TYPE_BUFFER) {
|
||||||
|
guint size = gst_buffer_get_size (data);
|
||||||
|
|
||||||
|
extra = g_strdup_printf ("%u bytes", size);
|
||||||
|
} else if (type == GST_TYPE_MEMORY) {
|
||||||
|
GstMemory *mem = (GstMemory *) data;
|
||||||
|
|
||||||
|
extra = g_strdup_printf ("%u bytes, %s allocator", (guint) mem->size,
|
||||||
|
mem->allocator ? mem->allocator->mem_type : "unknown");
|
||||||
}
|
}
|
||||||
refcount = GST_MINI_OBJECT_REFCOUNT_VALUE (data);
|
refcount = GST_MINI_OBJECT_REFCOUNT_VALUE (data);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue