mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 11:11:08 +00:00
utils: add gst_utils_dump_buffer()
Useful for debugging.
This commit is contained in:
parent
c44edd95e7
commit
eb9ac74362
4 changed files with 23 additions and 0 deletions
|
@ -3574,6 +3574,7 @@ GFLOAT_TO_LE
|
||||||
|
|
||||||
gst_guint64_to_gdouble
|
gst_guint64_to_gdouble
|
||||||
gst_gdouble_to_guint64
|
gst_gdouble_to_guint64
|
||||||
|
gst_util_dump_buffer
|
||||||
gst_util_dump_mem
|
gst_util_dump_mem
|
||||||
gst_util_uint64_scale
|
gst_util_uint64_scale
|
||||||
gst_util_uint64_scale_round
|
gst_util_uint64_scale_round
|
||||||
|
|
|
@ -86,6 +86,24 @@ gst_util_dump_mem (const guchar * mem, guint size)
|
||||||
g_string_free (chars, TRUE);
|
g_string_free (chars, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gst_util_dump_buffer:
|
||||||
|
* @buf: a #GstBuffer whose memory to dump
|
||||||
|
*
|
||||||
|
* Dumps the buffer memory into a hex representation. Useful for debugging.
|
||||||
|
*
|
||||||
|
* Since: 1.14
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
gst_util_dump_buffer (GstBuffer * buf)
|
||||||
|
{
|
||||||
|
GstMapInfo map;
|
||||||
|
|
||||||
|
if (gst_buffer_map (buf, &map, GST_MAP_READ)) {
|
||||||
|
gst_util_dump_mem (map.data, map.size);
|
||||||
|
gst_buffer_unmap (buf, &map);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_util_set_value_from_string:
|
* gst_util_set_value_from_string:
|
||||||
|
|
|
@ -47,6 +47,9 @@ gboolean gst_util_get_object_array (GObject * object, const gchar *
|
||||||
GST_EXPORT
|
GST_EXPORT
|
||||||
void gst_util_dump_mem (const guchar *mem, guint size);
|
void gst_util_dump_mem (const guchar *mem, guint size);
|
||||||
|
|
||||||
|
GST_EXPORT
|
||||||
|
void gst_util_dump_buffer (GstBuffer * buf);
|
||||||
|
|
||||||
GST_EXPORT
|
GST_EXPORT
|
||||||
guint64 gst_util_gdouble_to_guint64 (gdouble value) G_GNUC_CONST;
|
guint64 gst_util_gdouble_to_guint64 (gdouble value) G_GNUC_CONST;
|
||||||
|
|
||||||
|
|
|
@ -1581,6 +1581,7 @@ EXPORTS
|
||||||
gst_uri_type_get_type
|
gst_uri_type_get_type
|
||||||
gst_util_array_binary_search
|
gst_util_array_binary_search
|
||||||
gst_util_double_to_fraction
|
gst_util_double_to_fraction
|
||||||
|
gst_util_dump_buffer
|
||||||
gst_util_dump_mem
|
gst_util_dump_mem
|
||||||
gst_util_fraction_add
|
gst_util_fraction_add
|
||||||
gst_util_fraction_compare
|
gst_util_fraction_compare
|
||||||
|
|
Loading…
Reference in a new issue