diff options
author | Stefan Sauer <ensonic@users.sf.net> | 2016-12-15 15:37:45 +0100 |
---|---|---|
committer | Stefan Sauer <ensonic@users.sf.net> | 2016-12-16 15:55:21 +0100 |
commit | 1bfd04a5fee09a647a380d17bfe924f3860ad04c (patch) | |
tree | cf4784815ce38eef7ebe1fe2f9f8bac3d59a943e /tools | |
parent | 564dc742a445aebc9394ef83aab7603536ef8818 (diff) |
tracers/stats: log optional fields instead of GST_CLOCK_TIME_NONE
Simplify the traces and avoid trace analyzer to know that ((1<<64) - 1) means
we had no value.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/gst-stats.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/gst-stats.c b/tools/gst-stats.c index a9b1918a7..90241ac24 100644 --- a/tools/gst-stats.c +++ b/tools/gst-stats.c @@ -280,7 +280,8 @@ do_element_stats (GstElementStats * stats, GstElementStats * peer_stats, static void do_buffer_stats (GstStructure * s) { - guint64 ts, buffer_pts, buffer_dur; + guint64 ts; + guint64 buffer_pts = GST_CLOCK_TIME_NONE, buffer_dur = GST_CLOCK_TIME_NONE; guint pad_ix, elem_ix, peer_elem_ix; guint size; GstBufferFlags buffer_flags; @@ -293,9 +294,9 @@ do_buffer_stats (GstStructure * s) "element-ix", G_TYPE_UINT, &elem_ix, "peer-element-ix", G_TYPE_UINT, &peer_elem_ix, "buffer-size", G_TYPE_UINT, &size, - "buffer-pts", G_TYPE_UINT64, &buffer_pts, - "buffer-duration", G_TYPE_UINT64, &buffer_dur, "buffer-flags", GST_TYPE_BUFFER_FLAGS, &buffer_flags, NULL); + gst_structure_get_uint64 (s, "buffer-pts", &buffer_pts); + gst_structure_get_uint64 (s, "buffer-duration", &buffer_dur); last_ts = MAX (last_ts, ts); if (!(pad_stats = get_pad_stats (pad_ix))) { GST_WARNING ("no pad stats found for ix=%u", pad_ix); |