diff --git a/ChangeLog b/ChangeLog index 499d71a6cb..788c7a6c16 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-05-13 Thomas Vander Stichele + + * gst/elements/gstidentity.c: (gst_identity_chain): + add duration debug + * gst/gstinfo.c: (gst_debug_log_default): + add timestamp + 2004-05-13 Benjamin Otte * gst/gstpipeline.c: (gst_pipeline_dispose), diff --git a/gst/elements/gstidentity.c b/gst/elements/gstidentity.c index cecf0ad8e6..937fa01c78 100644 --- a/gst/elements/gstidentity.c +++ b/gst/elements/gstidentity.c @@ -213,9 +213,11 @@ gst_identity_chain (GstPad * pad, GstData * _data) if (!identity->silent) { g_free (identity->last_message); identity->last_message = - g_strdup_printf ("chain ******* (%s:%s)i (%d bytes, %" - GST_TIME_FORMAT ")", GST_DEBUG_PAD_NAME (identity->sinkpad), - GST_BUFFER_SIZE (buf), GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf))); + g_strdup_printf ("chain ******* (%s:%s)i (%d bytes, ts %" + GST_TIME_FORMAT ", dur %" GST_TIME_FORMAT ")", + GST_DEBUG_PAD_NAME (identity->sinkpad), GST_BUFFER_SIZE (buf), + GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)), + GST_TIME_ARGS (GST_BUFFER_DURATION (buf))); g_object_notify (G_OBJECT (identity), "last-message"); } diff --git a/gst/gstinfo.c b/gst/gstinfo.c index 86bf0f0f80..57be7be269 100644 --- a/gst/gstinfo.c +++ b/gst/gstinfo.c @@ -22,7 +22,6 @@ */ #include "gst_private.h" - #include "gstinfo.h" #ifndef GST_DISABLE_GST_DEBUG @@ -38,8 +37,6 @@ #include #endif #include /* G_VA_COPY */ -#include "gstinfo.h" -#include "gst_private.h" #include "gstelement.h" #include "gstpad.h" #include "gstscheduler.h" @@ -482,6 +479,7 @@ gst_debug_log_default (GstDebugCategory * category, GstDebugLevel level, gchar *obj; gchar *pidcolor; gint pid; + GTimeVal now; if (level > gst_debug_category_get_threshold (category)) return; @@ -503,8 +501,10 @@ gst_debug_log_default (GstDebugCategory * category, GstDebugLevel level, obj = object ? gst_debug_print_object (object) : g_strdup (""); - g_printerr ("%s %s%15s%s(%s%5d%s) %s%s(%d):%s:%s%s %s\n", + g_get_current_time (&now); + g_printerr ("%s (%10ld:%06ld) %s%15s%s(%s%5d%s) %s%s(%d):%s:%s%s %s\n", gst_debug_level_get_name (level), + now.tv_sec, now.tv_usec, color, gst_debug_category_get_name (category), clear, pidcolor, pid, clear, color, file, line, function, obj, clear, gst_debug_message_get (message)); diff --git a/plugins/elements/gstidentity.c b/plugins/elements/gstidentity.c index cecf0ad8e6..937fa01c78 100644 --- a/plugins/elements/gstidentity.c +++ b/plugins/elements/gstidentity.c @@ -213,9 +213,11 @@ gst_identity_chain (GstPad * pad, GstData * _data) if (!identity->silent) { g_free (identity->last_message); identity->last_message = - g_strdup_printf ("chain ******* (%s:%s)i (%d bytes, %" - GST_TIME_FORMAT ")", GST_DEBUG_PAD_NAME (identity->sinkpad), - GST_BUFFER_SIZE (buf), GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf))); + g_strdup_printf ("chain ******* (%s:%s)i (%d bytes, ts %" + GST_TIME_FORMAT ", dur %" GST_TIME_FORMAT ")", + GST_DEBUG_PAD_NAME (identity->sinkpad), GST_BUFFER_SIZE (buf), + GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)), + GST_TIME_ARGS (GST_BUFFER_DURATION (buf))); g_object_notify (G_OBJECT (identity), "last-message"); }