gstclock: Fix GST_STIME_ARGS

It wasn't properly handling GST_CLOCK_STIME_NONE and always use the
sign marker (+/-) to make it easier to identify signed values in
logs

https://bugzilla.gnome.org/show_bug.cgi?id=758870
This commit is contained in:
Edward Hervey 2015-11-30 17:11:33 +01:00 committed by Edward Hervey
parent 3737466563
commit e5d5f99a9e

View file

@ -266,8 +266,16 @@ G_STMT_START { \
*
* Since: 1.6
*/
#define GST_STIME_ARGS(t) \
((t) >= 0) ? ' ' : '-', GST_TIME_ARGS (ABS (t))
#define GST_STIME_ARGS(t) \
((t) == GST_CLOCK_STIME_NONE || (t) >= 0) ? '+' : '-', \
GST_CLOCK_STIME_IS_VALID (t) ? \
(guint) (((GstClockTime)(ABS(t))) / (GST_SECOND * 60 * 60)) : 99, \
GST_CLOCK_STIME_IS_VALID (t) ? \
(guint) ((((GstClockTime)(ABS(t))) / (GST_SECOND * 60)) % 60) : 99, \
GST_CLOCK_STIME_IS_VALID (t) ? \
(guint) ((((GstClockTime)(ABS(t))) / GST_SECOND) % 60) : 99, \
GST_CLOCK_STIME_IS_VALID (t) ? \
(guint) (((GstClockTime)(ABS(t))) % GST_SECOND) : 999999999
typedef struct _GstClockEntry GstClockEntry;
typedef struct _GstClock GstClock;