diff --git a/gst/gstbuffer.h b/gst/gstbuffer.h
index 44c3210..a8fdffd 100644
--- a/gst/gstbuffer.h
+++ b/gst/gstbuffer.h
@@ -200,6 +200,35 @@ typedef struct _GstBufferClass GstBufferClass;
  */
 #define GST_BUFFER_IS_DISCONT(buffer)   (GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DISCONT))
 
+/* boundary debugging macros */
+/**
+ * GST_BUFFER_BOUNDARIES_FORMAT:
+ *
+ * A string that can be used in printf-like format strings to display a
+ * #GstBuffer value's boundaries.  Use GST_BUFFER_BOUNDARIES_ARGS() to
+ * construct the matching arguments.
+ *
+ * Example:
+ *
+ * printf("%" GST_BUFFER_BOUNDARIES_FORMAT "\n", GST_BUFFER_BOUNDARIES_ARGS(buf));
+ *
+ * See also GST_BUFFER_BOUNDARIES_ARGS().
+ */
+#define GST_BUFFER_BOUNDARIES_FORMAT  ".d[%" GST_TIME_SECONDS_FORMAT ", %" GST_TIME_SECONDS_FORMAT ") = offsets [%" G_GUINT64_FORMAT ", %" G_GUINT64_FORMAT ")"
+/**
+ * GST_BUFFER_BOUNDARIES_ARGS:
+ * @buf: a #GstBuffer
+ *
+ * Format @buf for the #GST_BUFFER_BOUNDARIES_FORMAT format string.  Note:
+ * @buf will be evaluated more than once.
+ */
+#define GST_BUFFER_BOUNDARIES_ARGS(buf) \
+        0, \
+        GST_TIME_SECONDS_ARGS(GST_BUFFER_TIMESTAMP(buf)), \
+        GST_TIME_SECONDS_ARGS(GST_BUFFER_TIMESTAMP(buf) + GST_BUFFER_DURATION(buf)), \
+        GST_BUFFER_OFFSET(buf), \
+        GST_BUFFER_OFFSET_END(buf)
+
 /**
  * GstBufferFlag:
  * @GST_BUFFER_FLAG_READONLY: the buffer is read-only. This means the data of
diff --git a/gst/gstclock.h b/gst/gstclock.h
index c0d65c5..9e63df9 100644
--- a/gst/gstclock.h
+++ b/gst/gstclock.h
@@ -205,15 +205,23 @@ G_STMT_START {						\
 /**
  * GST_TIME_FORMAT:
  *
- * A format that can be used in printf like format strings to format
- * a #GstClockTime value.
+ * A string that can be used in printf-like format strings to display a
+ * #GstClockTime value in h:m:s format.  Use GST_TIME_ARGS() to construct
+ * the matching arguments.
+ *
+ * Example:
+ *
+ * printf("%" GST_TIME_FORMAT "\n", GST_TIME_ARGS(0));
+ *
+ * See also GST_TIME_ARGS(), #GST_TIME_SECONDS_FORMAT.
  */
 #define GST_TIME_FORMAT "u:%02u:%02u.%09u"
 /**
  * GST_TIME_ARGS:
  * @t: a #GstClockTime
  *
- * Format @t for the GST_TIME_FORMAT format string.
+ * Format @t for the #GST_TIME_FORMAT format string.  Note:  @t will be
+ * evaluated more than once.
  */
 #define GST_TIME_ARGS(t) \
         GST_CLOCK_TIME_IS_VALID (t) ? \
@@ -226,6 +234,31 @@ G_STMT_START {						\
         (guint) (((GstClockTime)(t)) % GST_SECOND) : 999999999
 
 /**
+ * GST_TIME_SECONDS_FORMAT:
+ *
+ * A string that can be used in printf-like format strings to display a
+ * #GstClockTime value in seconds.  Use GST_TIME_SECONDS_ARGS() to
+ * construct the matching arguments.
+ *
+ * Example:
+ *
+ * printf("%" GST_TIME_SECONDS_FORMAT "\n", GST_TIME_SECONDS_ARGS(0));
+ *
+ * See also GST_TIME_SECONDS_ARGS(), #GST_TIME_FORMAT.
+ */
+#define GST_TIME_SECONDS_FORMAT G_GUINT64_FORMAT ".%09" G_GUINT64_FORMAT " s"
+/**
+ * GST_TIME_SECONDS_ARGS:
+ * @t: a #GstClockTime
+ *
+ * Format @t for the #GST_TIME_SECONDS_FORMAT format string.  Note:  @t
+ * will be evaluated more than once.
+ */
+#define GST_TIME_SECONDS_ARGS(t) \
+        ((t) / GST_SECOND), \
+        ((t) % GST_SECOND)
+
+/**
  * GST_CLOCK_ENTRY_TRACE_NAME:
  *
  * The name used for tracing clock entry allocations.
