doc: Fix type in previous commit
[platform/upstream/gstreamer.git] / gst / gstclock.h
1 /* GStreamer
2  * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
3  *                    2000 Wim Taymans <wtay@chello.be>
4  *                    2005 Wim Taymans <wim@fluendo.com>
5  *
6  * gstclock.h: Header for clock subsystem
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Library General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Library General Public License for more details.
17  *
18  * You should have received a copy of the GNU Library General Public
19  * License along with this library; if not, write to the
20  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
21  * Boston, MA 02110-1301, USA.
22  */
23
24 #ifndef __GST_CLOCK_H__
25 #define __GST_CLOCK_H__
26
27 G_BEGIN_DECLS
28
29 /* --- standard type macros --- */
30 #define GST_TYPE_CLOCK                  (gst_clock_get_type ())
31 #define GST_CLOCK(clock)                (G_TYPE_CHECK_INSTANCE_CAST ((clock), GST_TYPE_CLOCK, GstClock))
32 #define GST_IS_CLOCK(clock)             (G_TYPE_CHECK_INSTANCE_TYPE ((clock), GST_TYPE_CLOCK))
33 #define GST_CLOCK_CLASS(cclass)         (G_TYPE_CHECK_CLASS_CAST ((cclass), GST_TYPE_CLOCK, GstClockClass))
34 #define GST_IS_CLOCK_CLASS(cclass)      (G_TYPE_CHECK_CLASS_TYPE ((cclass), GST_TYPE_CLOCK))
35 #define GST_CLOCK_GET_CLASS(clock)      (G_TYPE_INSTANCE_GET_CLASS ((clock), GST_TYPE_CLOCK, GstClockClass))
36 #define GST_CLOCK_CAST(clock)           ((GstClock*)(clock))
37
38 /**
39  * GstClockTime:
40  *
41  * A datatype to hold a time, measured in nanoseconds.
42  */
43 typedef guint64 GstClockTime;
44
45 /**
46  * GST_TYPE_CLOCK_TIME:
47  *
48  * The #GType of a #GstClockTime.
49  */
50 #define GST_TYPE_CLOCK_TIME G_TYPE_UINT64
51
52 /**
53  * GstClockTimeDiff:
54  *
55  * A datatype to hold a time difference, measured in nanoseconds.
56  */
57 typedef gint64 GstClockTimeDiff;
58 /**
59  * GstClockID:
60  *
61  * A datatype to hold the handle to an outstanding sync or async clock callback.
62  */
63 typedef gpointer GstClockID;
64
65 /**
66  * GST_CLOCK_TIME_NONE: (value 18446744073709551615) (type GstClockTime)
67  *
68  * Constant to define an undefined clock time.
69  */
70 #define GST_CLOCK_TIME_NONE             ((GstClockTime) -1)
71 /**
72  * GST_CLOCK_TIME_IS_VALID:
73  * @time: clock time to validate
74  *
75  * Tests if a given #GstClockTime represents a valid defined time.
76  */
77 #define GST_CLOCK_TIME_IS_VALID(time)   (((GstClockTime)(time)) != GST_CLOCK_TIME_NONE)
78
79 /**
80  * GST_CLOCK_STIME_NONE: (value -9223372036854775808) (type GstClockTimeDiff)
81  *
82  * Constant to define an undefined clock time.
83  */
84 #define GST_CLOCK_STIME_NONE             G_MININT64
85 /**
86  * GST_CLOCK_STIME_IS_VALID:
87  * @time: signed clock time to validate
88  *
89  * Tests if a given #GstClockTimeDiff of #gint64 represents a valid defined time.
90  *
91  * Since 1.6
92  */
93 #define GST_CLOCK_STIME_IS_VALID(time)   (((GstClockTimeDiff)(time)) != GST_CLOCK_STIME_NONE)
94
95 /* FIXME: still need to explicitly force types on the defines below */
96 /**
97  * GST_SECOND: (value 1000000000) (type GstClockTime)
98  *
99  * Constant that defines one GStreamer second.
100  */
101 #define GST_SECOND  (G_USEC_PER_SEC * G_GINT64_CONSTANT (1000))
102 /**
103  * GST_MSECOND: (value 1000000) (type GstClockTime)
104  *
105  * Constant that defines one GStreamer millisecond.
106  */
107 #define GST_MSECOND (GST_SECOND / G_GINT64_CONSTANT (1000))
108 /**
109  * GST_USECOND: (value: 1000) (type GstClockTime)
110  *
111  * Constant that defines one GStreamer microsecond.
112  */
113 #define GST_USECOND (GST_SECOND / G_GINT64_CONSTANT (1000000))
114 /**
115  * GST_NSECOND: (value 1) (type GstClockTime)
116  *
117  * Constant that defines one GStreamer nanosecond
118  */
119 #define GST_NSECOND (GST_SECOND / G_GINT64_CONSTANT (1000000000))
120
121
122 /**
123  * GST_TIME_AS_SECONDS:
124  * @time: the time
125  *
126  * Convert a #GstClockTime to seconds.
127  */
128 #define GST_TIME_AS_SECONDS(time)  ((time) / GST_SECOND)
129 /**
130  * GST_TIME_AS_MSECONDS:
131  * @time: the time
132  *
133  * Convert a #GstClockTime to milliseconds (1/1000 of a second).
134  */
135 #define GST_TIME_AS_MSECONDS(time) ((time) / G_GINT64_CONSTANT (1000000))
136 /**
137  * GST_TIME_AS_USECONDS:
138  * @time: the time
139  *
140  * Convert a #GstClockTime to microseconds (1/1000000 of a second).
141  */
142 #define GST_TIME_AS_USECONDS(time) ((time) / G_GINT64_CONSTANT (1000))
143 /**
144  * GST_TIME_AS_NSECONDS:
145  * @time: the time
146  *
147  * Convert a #GstClockTime to nanoseconds (1/1000000000 of a second).
148  */
149 #define GST_TIME_AS_NSECONDS(time) (time)
150
151 /**
152  * GST_CLOCK_DIFF:
153  * @s: the first time
154  * @e: the second time
155  *
156  * Calculate a difference between two clock times as a #GstClockTimeDiff.
157  * The difference is calculated as @e - @s.
158  */
159 #define GST_CLOCK_DIFF(s, e)            (GstClockTimeDiff)((e) - (s))
160
161 /**
162  * GST_TIMEVAL_TO_TIME:
163  * @tv: the timeval to convert
164  *
165  * Convert a #GTimeVal to a #GstClockTime.
166  */
167 #define GST_TIMEVAL_TO_TIME(tv)         (GstClockTime)((tv).tv_sec * GST_SECOND + (tv).tv_usec * GST_USECOND)
168
169 /**
170  * GST_TIME_TO_TIMEVAL:
171  * @t: The #GstClockTime to convert
172  * @tv: The target timeval
173  *
174  * Convert a #GstClockTime to a #GTimeVal
175  *
176  * <note>on 32-bit systems, a timeval has a range of only 2^32 - 1 seconds,
177  * which is about 68 years.  Expect trouble if you want to schedule stuff
178  * in your pipeline for 2038.</note>
179  */
180 #define GST_TIME_TO_TIMEVAL(t,tv)                               \
181 G_STMT_START {                                                  \
182   g_assert ("Value of time " #t " is out of timeval's range" && \
183       ((t) / GST_SECOND) < G_MAXLONG);                          \
184   (tv).tv_sec  = (glong) (((GstClockTime) (t)) / GST_SECOND);   \
185   (tv).tv_usec = (glong) ((((GstClockTime) (t)) -               \
186                   ((GstClockTime) (tv).tv_sec) * GST_SECOND)    \
187                  / GST_USECOND);                                \
188 } G_STMT_END
189
190 /**
191  * GST_TIMESPEC_TO_TIME:
192  * @ts: the timespec to convert
193  *
194  * Convert a struct timespec (see man pselect) to a #GstClockTime.
195  */
196 #define GST_TIMESPEC_TO_TIME(ts)        (GstClockTime)((ts).tv_sec * GST_SECOND + (ts).tv_nsec * GST_NSECOND)
197 /**
198  * GST_TIME_TO_TIMESPEC:
199  * @t: The #GstClockTime to convert
200  * @ts: The target timespec
201  *
202  * Convert a #GstClockTime to a struct timespec (see man pselect)
203  */
204 #define GST_TIME_TO_TIMESPEC(t,ts)                                \
205 G_STMT_START {                                                    \
206   g_assert ("Value of time " #t " is out of timespec's range" &&  \
207       ((t) / GST_SECOND) < G_MAXLONG);                            \
208   (ts).tv_sec  =  (glong) ((t) / GST_SECOND);                     \
209   (ts).tv_nsec = (glong) (((t) - (ts).tv_sec * GST_SECOND) / GST_NSECOND);        \
210 } G_STMT_END
211
212 /* timestamp debugging macros */
213 /**
214  * GST_TIME_FORMAT:
215  *
216  * A string that can be used in printf-like format strings to display a
217  * #GstClockTime value in h:m:s format.  Use GST_TIME_ARGS() to construct
218  * the matching arguments.
219  *
220  * Example:
221  * |[
222  * printf("%" GST_TIME_FORMAT "\n", GST_TIME_ARGS(ts));
223  * ]|
224  */
225 #define GST_TIME_FORMAT "u:%02u:%02u.%09u"
226 /**
227  * GST_TIME_ARGS:
228  * @t: a #GstClockTime
229  *
230  * Format @t for the #GST_TIME_FORMAT format string. Note: @t will be
231  * evaluated more than once.
232  */
233 #define GST_TIME_ARGS(t) \
234         GST_CLOCK_TIME_IS_VALID (t) ? \
235         (guint) (((GstClockTime)(t)) / (GST_SECOND * 60 * 60)) : 99, \
236         GST_CLOCK_TIME_IS_VALID (t) ? \
237         (guint) ((((GstClockTime)(t)) / (GST_SECOND * 60)) % 60) : 99, \
238         GST_CLOCK_TIME_IS_VALID (t) ? \
239         (guint) ((((GstClockTime)(t)) / GST_SECOND) % 60) : 99, \
240         GST_CLOCK_TIME_IS_VALID (t) ? \
241         (guint) (((GstClockTime)(t)) % GST_SECOND) : 999999999
242 /**
243  * GST_STIME_FORMAT:
244  *
245  * A string that can be used in printf-like format strings to display a signed
246  * #GstClockTimeDiff or #gint64 value in h:m:s format.  Use GST_TIME_ARGS() to
247  * construct the matching arguments.
248  *
249  * Example:
250  * |[
251  * printf("%" GST_STIME_FORMAT "\n", GST_STIME_ARGS(ts));
252  * ]|
253  *
254  * Since 1.6
255  */
256 #define GST_STIME_FORMAT "d:%02u:%02u.%09u"
257 /**
258  * GST_STIME_ARGS:
259  * @t: a #GstClockTimeDiff or #gint64
260  *
261  * Format @t for the #GST_STIME_FORMAT format string. Note: @t will be
262  * evaluated more than once.
263  *
264  * Since 1.6
265  */
266 #define GST_STIME_ARGS(t) \
267         GST_CLOCK_STIME_IS_VALID (t) ? \
268         (gint) ((GstClockTimeDiff)(t) / (GST_SECOND * 60 * 60)) : -99, \
269         GST_CLOCK_STIME_IS_VALID (t) ? \
270         (guint) ((((GstClockTime)ABS(t)) / (GST_SECOND * 60)) % 60) : 99, \
271         GST_CLOCK_STIME_IS_VALID (t) ? \
272         (guint) ((((GstClockTime)ABS(t)) / GST_SECOND) % 60) : 99, \
273         GST_CLOCK_STIME_IS_VALID (t) ? \
274         (guint) (((GstClockTime)ABS(t)) % GST_SECOND) : 999999999
275
276 typedef struct _GstClockEntry   GstClockEntry;
277 typedef struct _GstClock        GstClock;
278 typedef struct _GstClockClass   GstClockClass;
279 typedef struct _GstClockPrivate GstClockPrivate;
280
281 /* --- prototype for async callbacks --- */
282 /**
283  * GstClockCallback:
284  * @clock: The clock that triggered the callback
285  * @time: The time it was triggered
286  * @id: The #GstClockID that expired
287  * @user_data: user data passed in the gst_clock_id_wait_async() function
288  *
289  * The function prototype of the callback.
290  *
291  * Returns: %TRUE or %FALSE (currently unused)
292  */
293 typedef gboolean        (*GstClockCallback)     (GstClock *clock, GstClockTime time,
294                                                  GstClockID id, gpointer user_data);
295 /**
296  * GstClockReturn:
297  * @GST_CLOCK_OK: The operation succeeded.
298  * @GST_CLOCK_EARLY: The operation was scheduled too late.
299  * @GST_CLOCK_UNSCHEDULED: The clockID was unscheduled
300  * @GST_CLOCK_BUSY: The ClockID is busy
301  * @GST_CLOCK_BADTIME: A bad time was provided to a function.
302  * @GST_CLOCK_ERROR: An error occurred
303  * @GST_CLOCK_UNSUPPORTED: Operation is not supported
304  * @GST_CLOCK_DONE: The ClockID is done waiting
305  *
306  * The return value of a clock operation.
307  */
308 typedef enum
309 {
310   GST_CLOCK_OK          =  0,
311   GST_CLOCK_EARLY       =  1,
312   GST_CLOCK_UNSCHEDULED =  2,
313   GST_CLOCK_BUSY        =  3,
314   GST_CLOCK_BADTIME     =  4,
315   GST_CLOCK_ERROR       =  5,
316   GST_CLOCK_UNSUPPORTED =  6,
317   GST_CLOCK_DONE        =  7
318 } GstClockReturn;
319
320 /**
321  * GstClockEntryType:
322  * @GST_CLOCK_ENTRY_SINGLE: a single shot timeout
323  * @GST_CLOCK_ENTRY_PERIODIC: a periodic timeout request
324  *
325  * The type of the clock entry
326  */
327 typedef enum {
328   GST_CLOCK_ENTRY_SINGLE,
329   GST_CLOCK_ENTRY_PERIODIC
330 } GstClockEntryType;
331
332 /**
333  * GST_CLOCK_ENTRY:
334  * @entry: the entry to cast
335  *
336  * Cast to a clock entry
337  */
338 #define GST_CLOCK_ENTRY(entry)          ((GstClockEntry *)(entry))
339 /**
340  * GST_CLOCK_ENTRY_CLOCK:
341  * @entry: the entry to query
342  *
343  * Get the owner clock of the entry
344  */
345 #define GST_CLOCK_ENTRY_CLOCK(entry)    ((entry)->clock)
346 /**
347  * GST_CLOCK_ENTRY_TYPE:
348  * @entry: the entry to query
349  *
350  * Get the type of the clock entry
351  */
352 #define GST_CLOCK_ENTRY_TYPE(entry)     ((entry)->type)
353 /**
354  * GST_CLOCK_ENTRY_TIME:
355  * @entry: the entry to query
356  *
357  * Get the requested time of this entry
358  */
359 #define GST_CLOCK_ENTRY_TIME(entry)     ((entry)->time)
360 /**
361  * GST_CLOCK_ENTRY_INTERVAL:
362  * @entry: the entry to query
363  *
364  * Get the interval of this periodic entry
365  */
366 #define GST_CLOCK_ENTRY_INTERVAL(entry) ((entry)->interval)
367 /**
368  * GST_CLOCK_ENTRY_STATUS:
369  * @entry: the entry to query
370  *
371  * The status of the entry
372  */
373 #define GST_CLOCK_ENTRY_STATUS(entry)   ((entry)->status)
374
375 /**
376  * GstClockEntry:
377  * @refcount: reference counter (read-only)
378  *
379  * All pending timeouts or periodic notifies are converted into
380  * an entry.
381  * Note that GstClockEntry should be treated as an opaque structure. It must
382  * not be extended or allocated using a custom allocator.
383  */
384 struct _GstClockEntry {
385   gint                  refcount;
386   /*< protected >*/
387   GstClock              *clock;
388   GstClockEntryType      type;
389   GstClockTime           time;
390   GstClockTime           interval;
391   GstClockReturn         status;
392   GstClockCallback       func;
393   gpointer               user_data;
394   GDestroyNotify         destroy_data;
395   gboolean               unscheduled;
396   gboolean               woken_up;
397
398   /*< private >*/
399   gpointer _gst_reserved[GST_PADDING];
400 };
401
402 #include <gst/gstobject.h>
403
404 /**
405  * GstClockFlags:
406  * @GST_CLOCK_FLAG_CAN_DO_SINGLE_SYNC: clock can do a single sync timeout request
407  * @GST_CLOCK_FLAG_CAN_DO_SINGLE_ASYNC: clock can do a single async timeout request
408  * @GST_CLOCK_FLAG_CAN_DO_PERIODIC_SYNC: clock can do sync periodic timeout requests
409  * @GST_CLOCK_FLAG_CAN_DO_PERIODIC_ASYNC: clock can do async periodic timeout callbacks
410  * @GST_CLOCK_FLAG_CAN_SET_RESOLUTION: clock's resolution can be changed
411  * @GST_CLOCK_FLAG_CAN_SET_MASTER: clock can be slaved to a master clock
412  * @GST_CLOCK_FLAG_NEEDS_STARTUP_SYNC: clock needs to be synced before it can be used
413  *     Since: 1.6
414  * @GST_CLOCK_FLAG_LAST: subclasses can add additional flags starting from this flag
415  *
416  * The capabilities of this clock
417  */
418 typedef enum {
419   GST_CLOCK_FLAG_CAN_DO_SINGLE_SYNC     = (GST_OBJECT_FLAG_LAST << 0),
420   GST_CLOCK_FLAG_CAN_DO_SINGLE_ASYNC    = (GST_OBJECT_FLAG_LAST << 1),
421   GST_CLOCK_FLAG_CAN_DO_PERIODIC_SYNC   = (GST_OBJECT_FLAG_LAST << 2),
422   GST_CLOCK_FLAG_CAN_DO_PERIODIC_ASYNC  = (GST_OBJECT_FLAG_LAST << 3),
423   GST_CLOCK_FLAG_CAN_SET_RESOLUTION     = (GST_OBJECT_FLAG_LAST << 4),
424   GST_CLOCK_FLAG_CAN_SET_MASTER         = (GST_OBJECT_FLAG_LAST << 5),
425   GST_CLOCK_FLAG_NEEDS_STARTUP_SYNC     = (GST_OBJECT_FLAG_LAST << 6),
426   /* padding */
427   GST_CLOCK_FLAG_LAST                   = (GST_OBJECT_FLAG_LAST << 8)
428 } GstClockFlags;
429
430 /**
431  * GST_CLOCK_FLAGS:
432  * @clock: the clock to query
433  *
434  * Gets the #GstClockFlags clock flags.
435  */
436 #define GST_CLOCK_FLAGS(clock)  GST_OBJECT_FLAGS(clock)
437
438 /**
439  * GstClock:
440  *
441  * #GstClock base structure. The values of this structure are
442  * protected for subclasses, use the methods to use the #GstClock.
443  */
444 struct _GstClock {
445   GstObject      object;
446
447   /*< private >*/
448   GstClockPrivate *priv;
449
450   gpointer _gst_reserved[GST_PADDING];
451 };
452
453 /**
454  * GstClockClass:
455  * @parent_class: the parent class structure
456  * @change_resolution: change the resolution of the clock. Not all values might
457  *                     be acceptable. The new resolution should be returned.
458  * @get_resolution: get the resolution of the clock.
459  * @get_internal_time: get the internal unadjusted time of the clock.
460  *        implement @wait_jitter instead.
461  * @wait: perform a blocking wait on the given #GstClockEntry and return
462  *               the jitter.
463  * @wait_async: perform an asynchronous wait for the given #GstClockEntry.
464  * @unschedule: unblock a blocking or async wait operation.
465  *
466  * GStreamer clock class. Override the vmethods to implement the clock
467  * functionality.
468  */
469 struct _GstClockClass {
470   GstObjectClass        parent_class;
471
472   /*< public >*/
473   /* vtable */
474   GstClockTime          (*change_resolution)    (GstClock *clock,
475                                                  GstClockTime old_resolution,
476                                                  GstClockTime new_resolution);
477   GstClockTime          (*get_resolution)       (GstClock *clock);
478
479   GstClockTime          (*get_internal_time)    (GstClock *clock);
480
481   /* waiting on an ID */
482   GstClockReturn        (*wait)                 (GstClock *clock, GstClockEntry *entry,
483                                                  GstClockTimeDiff *jitter);
484   GstClockReturn        (*wait_async)           (GstClock *clock, GstClockEntry *entry);
485   void                  (*unschedule)           (GstClock *clock, GstClockEntry *entry);
486
487   /*< private >*/
488   gpointer _gst_reserved[GST_PADDING];
489 };
490
491 GType                   gst_clock_get_type              (void);
492
493 GstClockTime            gst_clock_set_resolution        (GstClock *clock,
494                                                          GstClockTime resolution);
495 GstClockTime            gst_clock_get_resolution        (GstClock *clock);
496
497 GstClockTime            gst_clock_get_time              (GstClock *clock);
498 void                    gst_clock_set_calibration       (GstClock *clock, GstClockTime internal,
499                                                          GstClockTime external,
500                                                          GstClockTime rate_num,
501                                                          GstClockTime rate_denom);
502 void                    gst_clock_get_calibration       (GstClock *clock, GstClockTime *internal,
503                                                          GstClockTime *external,
504                                                          GstClockTime *rate_num,
505                                                          GstClockTime *rate_denom);
506
507 /* master/slave clocks */
508 gboolean                gst_clock_set_master            (GstClock *clock, GstClock *master);
509 GstClock*               gst_clock_get_master            (GstClock *clock);
510
511 void                    gst_clock_set_timeout           (GstClock *clock,
512                                                          GstClockTime timeout);
513 GstClockTime            gst_clock_get_timeout           (GstClock *clock);
514
515 gboolean                gst_clock_add_observation       (GstClock *clock, GstClockTime slave,
516                                                          GstClockTime master, gdouble *r_squared);
517
518 gboolean                gst_clock_add_observation_unapplied (GstClock *clock, GstClockTime slave,
519                                                          GstClockTime master, gdouble *r_squared,
520                                                          GstClockTime *internal,
521                                                          GstClockTime *external,
522                                                          GstClockTime *rate_num,
523                                                          GstClockTime *rate_denom);
524
525 /* getting and adjusting internal/external time */
526 GstClockTime            gst_clock_get_internal_time     (GstClock *clock);
527 GstClockTime            gst_clock_adjust_unlocked       (GstClock *clock, GstClockTime internal);
528 GstClockTime            gst_clock_adjust_with_calibration (GstClock *clock,
529                                                          GstClockTime internal_target,
530                                                          GstClockTime cinternal,
531                                                          GstClockTime cexternal,
532                                                          GstClockTime cnum,
533                                                          GstClockTime cdenom);
534 GstClockTime            gst_clock_unadjust_unlocked     (GstClock * clock, GstClockTime external);
535
536 /* waiting for, signalling and checking for synchronization */
537 gboolean                gst_clock_wait_for_sync         (GstClock * clock, GstClockTime timeout);
538 gboolean                gst_clock_is_synced             (GstClock * clock);
539
540 /* to be used by subclasses only */
541 void                    gst_clock_set_synced            (GstClock * clock, gboolean synced);
542
543 /* creating IDs that can be used to get notifications */
544 GstClockID              gst_clock_new_single_shot_id    (GstClock *clock,
545                                                          GstClockTime time);
546 GstClockID              gst_clock_new_periodic_id       (GstClock *clock,
547                                                          GstClockTime start_time,
548                                                          GstClockTime interval);
549
550 /* reference counting */
551 GstClockID              gst_clock_id_ref                (GstClockID id);
552 void                    gst_clock_id_unref              (GstClockID id);
553
554 /* operations on IDs */
555 gint                    gst_clock_id_compare_func       (gconstpointer id1, gconstpointer id2);
556
557 GstClockTime            gst_clock_id_get_time           (GstClockID id);
558 GstClockReturn          gst_clock_id_wait               (GstClockID id,
559                                                          GstClockTimeDiff *jitter);
560 GstClockReturn          gst_clock_id_wait_async         (GstClockID id,
561                                                          GstClockCallback func,
562                                                          gpointer user_data,
563                                                          GDestroyNotify destroy_data);
564 void                    gst_clock_id_unschedule         (GstClockID id);
565
566 gboolean                gst_clock_single_shot_id_reinit (GstClock * clock,
567                                                          GstClockID id,
568                                                          GstClockTime time);
569 gboolean                gst_clock_periodic_id_reinit    (GstClock * clock,
570                                                          GstClockID id,
571                                                          GstClockTime start_time,
572                                                          GstClockTime interval);
573
574 G_END_DECLS
575
576 #endif /* __GST_CLOCK_H__ */