From: <tp...@fr...> - 2005-10-14 14:11:22
|
CVS Root: /cvs/gstreamer Module: gstreamer Changes by: tpm Date: Fri Oct 14 2005 07:10:36 PDT Log message: * gst/elements/gstfakesink.c: (gst_fake_sink_render): * gst/elements/gstfakesrc.c: (gst_fake_src_create): Beautify 'last-message' output: print 'none' for buffer timestamps and durations if none is set; improve alignment with next messages. Modified files: . : ChangeLog gst/elements : gstfakesink.c gstfakesrc.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.1730&r2=1.1731 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/elements/gstfakesink.c.diff?r1=1.94&r2=1.95 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/elements/gstfakesrc.c.diff?r1=1.111&r2=1.112 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gstreamer/ChangeLog,v retrieving revision 1.1730 retrieving revision 1.1731 diff -u -d -r1.1730 -r1.1731 --- ChangeLog 14 Oct 2005 11:09:29 -0000 1.1730 +++ ChangeLog 14 Oct 2005 14:10:24 -0000 1.1731 @@ -1,5 +1,12 @@ 2005-10-14 Tim-Philipp Müller <tim at centricular dot net> + * gst/elements/gstfakesink.c: (gst_fake_sink_render): + * gst/elements/gstfakesrc.c: (gst_fake_src_create): + Beautify 'last-message' output: print 'none' for buffer timestamps + and durations if none is set; improve alignment with next messages. + +2005-10-14 Tim-Philipp Müller <tim at centricular dot net> * gst/gstpluginfeature.c: (gst_plugin_feature_check_version): * gst/gstpluginfeature.h: * gst/gstregistry.c: (gst_default_registry_check_feature_version): Index: gstfakesink.c RCS file: /cvs/gstreamer/gstreamer/gst/elements/gstfakesink.c,v retrieving revision 1.94 retrieving revision 1.95 diff -u -d -r1.94 -r1.95 --- gstfakesink.c 12 Oct 2005 09:02:42 -0000 1.94 +++ gstfakesink.c 14 Oct 2005 14:10:24 -0000 1.95 @@ -342,17 +342,31 @@ GstFakeSink *sink = GST_FAKE_SINK (bsink); if (!sink->silent) { + gchar ts_str[64], dur_str[64]; GST_LOCK (sink); g_free (sink->last_message); + if (GST_BUFFER_TIMESTAMP (buf) != GST_CLOCK_TIME_NONE) { + g_snprintf (ts_str, sizeof (ts_str), "%" GST_TIME_FORMAT, + GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf))); + } else { + g_strlcpy (ts_str, "none", sizeof (ts_str)); + } + if (GST_BUFFER_DURATION (buf) != GST_CLOCK_TIME_NONE) { + g_snprintf (dur_str, sizeof (dur_str), "%" GST_TIME_FORMAT, + GST_TIME_ARGS (GST_BUFFER_DURATION (buf))); + g_strlcpy (dur_str, "none", sizeof (dur_str)); sink->last_message = - g_strdup_printf ("chain ******* < (%d bytes, timestamp: %" - GST_TIME_FORMAT ", duration: %" GST_TIME_FORMAT ", offset: %" - G_GINT64_FORMAT ", offset_end: %" G_GINT64_FORMAT ", flags: %d) %p", - GST_BUFFER_SIZE (buf), - GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)), - GST_TIME_ARGS (GST_BUFFER_DURATION (buf)), GST_BUFFER_OFFSET (buf), - GST_BUFFER_OFFSET_END (buf), GST_MINI_OBJECT (buf)->flags, buf); + g_strdup_printf ("chain ******* < (%5d bytes, timestamp: %s" + ", duration: %s, offset: %" G_GINT64_FORMAT ", offset_end: %" + G_GINT64_FORMAT ", flags: %d) %p", GST_BUFFER_SIZE (buf), ts_str, + dur_str, GST_BUFFER_OFFSET (buf), GST_BUFFER_OFFSET_END (buf), + GST_MINI_OBJECT (buf)->flags, buf); GST_UNLOCK (sink); g_object_notify (G_OBJECT (sink), "last_message"); Index: gstfakesrc.c RCS file: /cvs/gstreamer/gstreamer/gst/elements/gstfakesrc.c,v retrieving revision 1.111 retrieving revision 1.112 diff -u -d -r1.111 -r1.112 --- gstfakesrc.c 12 Oct 2005 14:28:39 -0000 1.111 +++ gstfakesrc.c 14 Oct 2005 14:10:24 -0000 1.112 @@ -706,17 +706,31 @@ GST_BUFFER_TIMESTAMP (buf) = time; if (!src->silent) { GST_LOCK (src); g_free (src->last_message); src->last_message = - g_strdup_printf ("get ******* > (%d bytes, timestamp: %" + g_strdup_printf ("get ******* > (%5d bytes, timestamp: %s" GST_UNLOCK (src); g_object_notify (G_OBJECT (src), "last_message"); |