diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2018-03-14 14:53:50 +0100 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2018-04-06 13:39:42 +0200 |
commit | 021b66878a180968a363685cf1c970489d8c62bc (patch) | |
tree | c819e8bdbceed7c61faa84287d965a805c7fa7e8 /omx/gstomx.c | |
parent | dec9c8c385b2a48804c99be973930fedda027a12 (diff) | |
download | gst-omx-021b66878a180968a363685cf1c970489d8c62bc.tar.gz |
log_omx_performance: convert pointers to strings
G_TYPE_POINTER are not serialized in logs.
https://bugzilla.gnome.org/show_bug.cgi?id=794331
Diffstat (limited to 'omx/gstomx.c')
-rw-r--r-- | omx/gstomx.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/omx/gstomx.c b/omx/gstomx.c index 1151a6c..b16cf50 100644 --- a/omx/gstomx.c +++ b/omx/gstomx.c @@ -655,10 +655,16 @@ log_omx_performance (GstOMXComponent * comp, const gchar * event, return; if (buf) { + gchar *buf_str, *omx_buf_str; + + /* GST_PTR_FORMAT won't serialize G_TYPE_POINTER fields so stringify pointers */ + buf_str = g_strdup_printf ("%p", buf); + omx_buf_str = g_strdup_printf ("%p", buf->omx_buf); + /* *INDENT-OFF* */ s = gst_structure_new (event, - "GstOMXBuffer", G_TYPE_POINTER, buf, - "OMX-buffer", G_TYPE_POINTER, buf->omx_buf, + "GstOMXBuffer", G_TYPE_STRING, buf_str, + "OMX-buffer", G_TYPE_STRING, omx_buf_str, "TimeStamp", G_TYPE_UINT64, GST_OMX_GET_TICKS (buf->omx_buf->nTimeStamp), "AllocLen", G_TYPE_UINT, buf->omx_buf->nAllocLen, "FilledLen", G_TYPE_UINT, buf->omx_buf->nFilledLen, @@ -666,6 +672,9 @@ log_omx_performance (GstOMXComponent * comp, const gchar * event, "flags-str", G_TYPE_STRING, gst_omx_buffer_flags_to_string (buf->omx_buf->nFlags), NULL); /* *INDENT-ON* */ + + g_free (buf_str); + g_free (omx_buf_str); } else { s = gst_structure_new_empty (event); } |