* @GST_CLOCK_TYPE_MONOTONIC: monotonic time since some unspecified starting
* point
* @GST_CLOCK_TYPE_OTHER: some other time source is used (Since: 1.0.5)
+ * @GST_CLOCK_TYPE_TAI: time since Epoch, but using International Atomic Time
+ * as reference (Since 1.18)
*
* The different kind of clocks.
*/
typedef enum {
GST_CLOCK_TYPE_REALTIME = 0,
GST_CLOCK_TYPE_MONOTONIC = 1,
- GST_CLOCK_TYPE_OTHER = 2
+ GST_CLOCK_TYPE_OTHER = 2,
+ GST_CLOCK_TYPE_TAI = 3
} GstClockType;
/**
cdata.set('HAVE_PTHREAD_SETNAME_NP_WITHOUT_TID', 1)
endif
-# Check for posix timers and the monotonic clock
+# Check for posix timers, monotonic clock and TAI clock
time_prefix = '#include <time.h>\n'
if cdata.has('HAVE_UNISTD_H')
time_prefix += '#include <unistd.h>'
cdata.set('HAVE_MONOTONIC_CLOCK', 1)
endif
+tai_clock_src = time_prefix + '''
+#if !defined(CLOCK_TAI)
+#error CLOCK_TAI not defined
+#endif
+'''
+if cc.compiles(tai_clock_src, name : 'TAI clock from time.h')
+ cdata.set('HAVE_TAI_CLOCK', 1)
+endif
+
# Check for __uint128_t (gcc) by checking for 128-bit division
uint128_t_src = '''int main() {
static __uint128_t v1 = 100;