gst/elements/gstidentity.c: add duration debug
authorThomas Vander Stichele <thomas@apestaart.org>
Thu, 13 May 2004 10:10:31 +0000 (10:10 +0000)
committerThomas Vander Stichele <thomas@apestaart.org>
Thu, 13 May 2004 10:10:31 +0000 (10:10 +0000)
Original commit message from CVS:
* gst/elements/gstidentity.c: (gst_identity_chain):
add duration debug
* gst/gstinfo.c: (gst_debug_log_default):
add timestamp

ChangeLog
gst/elements/gstidentity.c
gst/gstinfo.c
plugins/elements/gstidentity.c

index 499d71a..788c7a6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-05-13  Thomas Vander Stichele  <thomas at apestaart dot org>
+
+       * gst/elements/gstidentity.c: (gst_identity_chain):
+          add duration debug
+       * gst/gstinfo.c: (gst_debug_log_default):
+          add timestamp
+
 2004-05-13  Benjamin Otte  <otte@gnome.org>
 
        * gst/gstpipeline.c: (gst_pipeline_dispose),
index cecf0ad..937fa01 100644 (file)
@@ -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");
     }
 
index 86bf0f0..57be7be 100644 (file)
@@ -22,7 +22,6 @@
  */
 
 #include "gst_private.h"
-
 #include "gstinfo.h"
 
 #ifndef GST_DISABLE_GST_DEBUG
@@ -38,8 +37,6 @@
 #include <unistd.h>
 #endif
 #include <string.h>             /* 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));
index cecf0ad..937fa01 100644 (file)
@@ -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");
     }