gst/elements/gstidentity.c: add duration debug

Original commit message from CVS:
* gst/elements/gstidentity.c: (gst_identity_chain):
add duration debug
* gst/gstinfo.c: (gst_debug_log_default):
add timestamp
This commit is contained in:
Thomas Vander Stichele 2004-05-13 10:10:31 +00:00
parent 953f54c5ce
commit 0cdc821508
4 changed files with 21 additions and 10 deletions

View file

@ -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),

View 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");
}

View 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));

View 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");
}