clock: improve the GST_TIME_FORMAT/ARGS docs

This commit is contained in:
Kipp Cannon 2011-05-24 00:26:40 +03:00 committed by Stefan Kost
parent 1718abcbbb
commit 696a9a694f

View file

@ -205,15 +205,22 @@ G_STMT_START { \
/** /**
* GST_TIME_FORMAT: * GST_TIME_FORMAT:
* *
* A format that can be used in printf like format strings to format * A string that can be used in printf-like format strings to display a
* a #GstClockTime value. * #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(ts));
* ]|
*/ */
#define GST_TIME_FORMAT "u:%02u:%02u.%09u" #define GST_TIME_FORMAT "u:%02u:%02u.%09u"
/** /**
* GST_TIME_ARGS: * GST_TIME_ARGS:
* @t: a #GstClockTime * @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) \ #define GST_TIME_ARGS(t) \
GST_CLOCK_TIME_IS_VALID (t) ? \ GST_CLOCK_TIME_IS_VALID (t) ? \