Initialize Tizen 2.3
[framework/multimedia/gstreamer0.10.git] / mobile / docs / gst / html / GstClock.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>GstClock</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="index.html" title="GStreamer 0.10 Core Reference Manual">
8 <link rel="up" href="libgstreamer.html" title="GStreamer Core Library">
9 <link rel="prev" href="GstChildProxy.html" title="GstChildProxy">
10 <link rel="next" href="gstreamer-gstconfig.html" title="gstconfig">
11 <meta name="generator" content="GTK-Doc V1.18 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 </head>
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
16 <tr valign="middle">
17 <td><a accesskey="p" href="GstChildProxy.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="libgstreamer.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20 <th width="100%" align="center">GStreamer 0.10 Core Reference Manual</th>
21 <td><a accesskey="n" href="gstreamer-gstconfig.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
22 </tr>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#GstClock.synopsis" class="shortcut">Top</a>
25                    | 
26                   <a href="#GstClock.description" class="shortcut">Description</a>
27                    | 
28                   <a href="#GstClock.object-hierarchy" class="shortcut">Object Hierarchy</a>
29                    | 
30                   <a href="#GstClock.properties" class="shortcut">Properties</a>
31 </td></tr>
32 </table>
33 <div class="refentry">
34 <a name="GstClock"></a><div class="titlepage"></div>
35 <div class="refnamediv"><table width="100%"><tr>
36 <td valign="top">
37 <h2><span class="refentrytitle"><a name="GstClock.top_of_page"></a>GstClock</span></h2>
38 <p>GstClock — Abstract class for global clocks</p>
39 </td>
40 <td valign="top" align="right"></td>
41 </tr></table></div>
42 <div class="refsynopsisdiv">
43 <a name="GstClock.synopsis"></a><h2>Synopsis</h2>
44 <pre class="synopsis">
45 #include &lt;gst/gst.h&gt;
46
47 struct              <a class="link" href="GstClock.html#GstClock-struct" title="struct GstClock">GstClock</a>;
48 struct              <a class="link" href="GstClock.html#GstClockClass" title="struct GstClockClass">GstClockClass</a>;
49 typedef             <a class="link" href="GstClock.html#GstClockTime" title="GstClockTime">GstClockTime</a>;
50 typedef             <a class="link" href="GstClock.html#GstClockTimeDiff" title="GstClockTimeDiff">GstClockTimeDiff</a>;
51 typedef             <a class="link" href="GstClock.html#GstClockID" title="GstClockID">GstClockID</a>;
52 #define             <a class="link" href="GstClock.html#GST-CLOCK-TIME-NONE:CAPS" title="GST_CLOCK_TIME_NONE">GST_CLOCK_TIME_NONE</a>
53 #define             <a class="link" href="GstClock.html#GST-CLOCK-TIME-IS-VALID:CAPS" title="GST_CLOCK_TIME_IS_VALID()">GST_CLOCK_TIME_IS_VALID</a>             (time)
54 #define             <a class="link" href="GstClock.html#GST-SECOND:CAPS" title="GST_SECOND">GST_SECOND</a>
55 #define             <a class="link" href="GstClock.html#GST-MSECOND:CAPS" title="GST_MSECOND">GST_MSECOND</a>
56 #define             <a class="link" href="GstClock.html#GST-USECOND:CAPS" title="GST_USECOND">GST_USECOND</a>
57 #define             <a class="link" href="GstClock.html#GST-NSECOND:CAPS" title="GST_NSECOND">GST_NSECOND</a>
58 #define             <a class="link" href="GstClock.html#GST-TIME-AS-SECONDS:CAPS" title="GST_TIME_AS_SECONDS()">GST_TIME_AS_SECONDS</a>                 (time)
59 #define             <a class="link" href="GstClock.html#GST-TIME-AS-MSECONDS:CAPS" title="GST_TIME_AS_MSECONDS()">GST_TIME_AS_MSECONDS</a>                (time)
60 #define             <a class="link" href="GstClock.html#GST-TIME-AS-USECONDS:CAPS" title="GST_TIME_AS_USECONDS()">GST_TIME_AS_USECONDS</a>                (time)
61 #define             <a class="link" href="GstClock.html#GST-TIME-AS-NSECONDS:CAPS" title="GST_TIME_AS_NSECONDS()">GST_TIME_AS_NSECONDS</a>                (time)
62 #define             <a class="link" href="GstClock.html#GST-CLOCK-DIFF:CAPS" title="GST_CLOCK_DIFF()">GST_CLOCK_DIFF</a>                      (s,
63                                                          e)
64 #define             <a class="link" href="GstClock.html#GST-TIMEVAL-TO-TIME:CAPS" title="GST_TIMEVAL_TO_TIME()">GST_TIMEVAL_TO_TIME</a>                 (tv)
65 #define             <a class="link" href="GstClock.html#GST-TIME-TO-TIMEVAL:CAPS" title="GST_TIME_TO_TIMEVAL()">GST_TIME_TO_TIMEVAL</a>                 (t,
66                                                          tv)
67 #define             <a class="link" href="GstClock.html#GST-TIMESPEC-TO-TIME:CAPS" title="GST_TIMESPEC_TO_TIME()">GST_TIMESPEC_TO_TIME</a>                (ts)
68 #define             <a class="link" href="GstClock.html#GST-TIME-TO-TIMESPEC:CAPS" title="GST_TIME_TO_TIMESPEC()">GST_TIME_TO_TIMESPEC</a>                (t,
69                                                          ts)
70 #define             <a class="link" href="GstClock.html#GST-CLOCK-ENTRY-TRACE-NAME:CAPS" title="GST_CLOCK_ENTRY_TRACE_NAME">GST_CLOCK_ENTRY_TRACE_NAME</a>
71 struct              <a class="link" href="GstClock.html#GstClockEntry" title="struct GstClockEntry">GstClockEntry</a>;
72 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            (<a class="link" href="GstClock.html#GstClockCallback" title="GstClockCallback ()">*GstClockCallback</a>)                 (<em class="parameter"><code><a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> *clock</code></em>,
73                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> time</code></em>,
74                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> id</code></em>,
75                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
76 enum                <a class="link" href="GstClock.html#GstClockEntryType" title="enum GstClockEntryType">GstClockEntryType</a>;
77 #define             <a class="link" href="GstClock.html#GST-CLOCK-ENTRY:CAPS" title="GST_CLOCK_ENTRY()">GST_CLOCK_ENTRY</a>                     (entry)
78 #define             <a class="link" href="GstClock.html#GST-CLOCK-ENTRY-CLOCK:CAPS" title="GST_CLOCK_ENTRY_CLOCK()">GST_CLOCK_ENTRY_CLOCK</a>               (entry)
79 #define             <a class="link" href="GstClock.html#GST-CLOCK-ENTRY-TYPE:CAPS" title="GST_CLOCK_ENTRY_TYPE()">GST_CLOCK_ENTRY_TYPE</a>                (entry)
80 #define             <a class="link" href="GstClock.html#GST-CLOCK-ENTRY-TIME:CAPS" title="GST_CLOCK_ENTRY_TIME()">GST_CLOCK_ENTRY_TIME</a>                (entry)
81 #define             <a class="link" href="GstClock.html#GST-CLOCK-ENTRY-INTERVAL:CAPS" title="GST_CLOCK_ENTRY_INTERVAL()">GST_CLOCK_ENTRY_INTERVAL</a>            (entry)
82 #define             <a class="link" href="GstClock.html#GST-CLOCK-ENTRY-STATUS:CAPS" title="GST_CLOCK_ENTRY_STATUS()">GST_CLOCK_ENTRY_STATUS</a>              (entry)
83 enum                <a class="link" href="GstClock.html#GstClockReturn" title="enum GstClockReturn">GstClockReturn</a>;
84 enum                <a class="link" href="GstClock.html#GstClockFlags" title="enum GstClockFlags">GstClockFlags</a>;
85 #define             <a class="link" href="GstClock.html#GST-CLOCK-FLAGS:CAPS" title="GST_CLOCK_FLAGS()">GST_CLOCK_FLAGS</a>                     (clock)
86 #define             <a class="link" href="GstClock.html#GST-CLOCK-BROADCAST:CAPS" title="GST_CLOCK_BROADCAST()">GST_CLOCK_BROADCAST</a>                 (clock)
87 #define             <a class="link" href="GstClock.html#GST-CLOCK-COND:CAPS" title="GST_CLOCK_COND()">GST_CLOCK_COND</a>                      (clock)
88 #define             <a class="link" href="GstClock.html#GST-CLOCK-TIMED-WAIT:CAPS" title="GST_CLOCK_TIMED_WAIT()">GST_CLOCK_TIMED_WAIT</a>                (clock,
89                                                          tv)
90 #define             <a class="link" href="GstClock.html#GST-CLOCK-WAIT:CAPS" title="GST_CLOCK_WAIT()">GST_CLOCK_WAIT</a>                      (clock)
91 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="GstClock.html#gst-clock-add-observation" title="gst_clock_add_observation ()">gst_clock_add_observation</a>           (<em class="parameter"><code><a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> *clock</code></em>,
92                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> slave</code></em>,
93                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> master</code></em>,
94                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *r_squared</code></em>);
95 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="GstClock.html#gst-clock-set-master" title="gst_clock_set_master ()">gst_clock_set_master</a>                (<em class="parameter"><code><a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> *clock</code></em>,
96                                                          <em class="parameter"><code><a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> *master</code></em>);
97 <a class="link" href="GstClock.html" title="GstClock"><span class="returnvalue">GstClock</span></a> *          <a class="link" href="GstClock.html#gst-clock-get-master" title="gst_clock_get_master ()">gst_clock_get_master</a>                (<em class="parameter"><code><a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> *clock</code></em>);
98 <a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="returnvalue">GstClockTime</span></a>        <a class="link" href="GstClock.html#gst-clock-set-resolution" title="gst_clock_set_resolution ()">gst_clock_set_resolution</a>            (<em class="parameter"><code><a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> *clock</code></em>,
99                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> resolution</code></em>);
100 <a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="returnvalue">GstClockTime</span></a>        <a class="link" href="GstClock.html#gst-clock-get-resolution" title="gst_clock_get_resolution ()">gst_clock_get_resolution</a>            (<em class="parameter"><code><a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> *clock</code></em>);
101 <a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="returnvalue">GstClockTime</span></a>        <a class="link" href="GstClock.html#gst-clock-get-time" title="gst_clock_get_time ()">gst_clock_get_time</a>                  (<em class="parameter"><code><a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> *clock</code></em>);
102 <a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="returnvalue">GstClockID</span></a>          <a class="link" href="GstClock.html#gst-clock-new-single-shot-id" title="gst_clock_new_single_shot_id ()">gst_clock_new_single_shot_id</a>        (<em class="parameter"><code><a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> *clock</code></em>,
103                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> time</code></em>);
104 <a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="returnvalue">GstClockID</span></a>          <a class="link" href="GstClock.html#gst-clock-new-periodic-id" title="gst_clock_new_periodic_id ()">gst_clock_new_periodic_id</a>           (<em class="parameter"><code><a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> *clock</code></em>,
105                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> start_time</code></em>,
106                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> interval</code></em>);
107 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="GstClock.html#gst-clock-single-shot-id-reinit" title="gst_clock_single_shot_id_reinit ()">gst_clock_single_shot_id_reinit</a>     (<em class="parameter"><code><a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> *clock</code></em>,
108                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> id</code></em>,
109                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> time</code></em>);
110 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="GstClock.html#gst-clock-periodic-id-reinit" title="gst_clock_periodic_id_reinit ()">gst_clock_periodic_id_reinit</a>        (<em class="parameter"><code><a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> *clock</code></em>,
111                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> id</code></em>,
112                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> start_time</code></em>,
113                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> interval</code></em>);
114 <a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="returnvalue">GstClockTime</span></a>        <a class="link" href="GstClock.html#gst-clock-get-internal-time" title="gst_clock_get_internal_time ()">gst_clock_get_internal_time</a>         (<em class="parameter"><code><a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> *clock</code></em>);
115 <a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="returnvalue">GstClockTime</span></a>        <a class="link" href="GstClock.html#gst-clock-adjust-unlocked" title="gst_clock_adjust_unlocked ()">gst_clock_adjust_unlocked</a>           (<em class="parameter"><code><a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> *clock</code></em>,
116                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> internal</code></em>);
117 <a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="returnvalue">GstClockTime</span></a>        <a class="link" href="GstClock.html#gst-clock-unadjust-unlocked" title="gst_clock_unadjust_unlocked ()">gst_clock_unadjust_unlocked</a>         (<em class="parameter"><code><a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> *clock</code></em>,
118                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> external</code></em>);
119 <span class="returnvalue">void</span>                <a class="link" href="GstClock.html#gst-clock-get-calibration" title="gst_clock_get_calibration ()">gst_clock_get_calibration</a>           (<em class="parameter"><code><a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> *clock</code></em>,
120                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> *internal</code></em>,
121                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> *external</code></em>,
122                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> *rate_num</code></em>,
123                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> *rate_denom</code></em>);
124 <span class="returnvalue">void</span>                <a class="link" href="GstClock.html#gst-clock-set-calibration" title="gst_clock_set_calibration ()">gst_clock_set_calibration</a>           (<em class="parameter"><code><a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> *clock</code></em>,
125                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> internal</code></em>,
126                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> external</code></em>,
127                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> rate_num</code></em>,
128                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> rate_denom</code></em>);
129 <a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="returnvalue">GstClockTime</span></a>        <a class="link" href="GstClock.html#gst-clock-id-get-time" title="gst_clock_id_get_time ()">gst_clock_id_get_time</a>               (<em class="parameter"><code><a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> id</code></em>);
130 <a class="link" href="GstClock.html#GstClockReturn" title="enum GstClockReturn"><span class="returnvalue">GstClockReturn</span></a>      <a class="link" href="GstClock.html#gst-clock-id-wait" title="gst_clock_id_wait ()">gst_clock_id_wait</a>                   (<em class="parameter"><code><a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> id</code></em>,
131                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTimeDiff" title="GstClockTimeDiff"><span class="type">GstClockTimeDiff</span></a> *jitter</code></em>);
132 <a class="link" href="GstClock.html#GstClockReturn" title="enum GstClockReturn"><span class="returnvalue">GstClockReturn</span></a>      <a class="link" href="GstClock.html#gst-clock-id-wait-async" title="gst_clock_id_wait_async ()">gst_clock_id_wait_async</a>             (<em class="parameter"><code><a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> id</code></em>,
133                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockCallback" title="GstClockCallback ()"><span class="type">GstClockCallback</span></a> func</code></em>,
134                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
135 <a class="link" href="GstClock.html#GstClockReturn" title="enum GstClockReturn"><span class="returnvalue">GstClockReturn</span></a>      <a class="link" href="GstClock.html#gst-clock-id-wait-async-full" title="gst_clock_id_wait_async_full ()">gst_clock_id_wait_async_full</a>        (<em class="parameter"><code><a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> id</code></em>,
136                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockCallback" title="GstClockCallback ()"><span class="type">GstClockCallback</span></a> func</code></em>,
137                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
138                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> destroy_data</code></em>);
139 <span class="returnvalue">void</span>                <a class="link" href="GstClock.html#gst-clock-id-unschedule" title="gst_clock_id_unschedule ()">gst_clock_id_unschedule</a>             (<em class="parameter"><code><a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> id</code></em>);
140 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                <a class="link" href="GstClock.html#gst-clock-id-compare-func" title="gst_clock_id_compare_func ()">gst_clock_id_compare_func</a>           (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> id1</code></em>,
141                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> id2</code></em>);
142 <a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="returnvalue">GstClockID</span></a>          <a class="link" href="GstClock.html#gst-clock-id-ref" title="gst_clock_id_ref ()">gst_clock_id_ref</a>                    (<em class="parameter"><code><a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> id</code></em>);
143 <span class="returnvalue">void</span>                <a class="link" href="GstClock.html#gst-clock-id-unref" title="gst_clock_id_unref ()">gst_clock_id_unref</a>                  (<em class="parameter"><code><a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> id</code></em>);
144 </pre>
145 </div>
146 <div class="refsect1">
147 <a name="GstClock.object-hierarchy"></a><h2>Object Hierarchy</h2>
148 <pre class="synopsis">
149   <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
150    +----<a class="link" href="GstObject.html" title="GstObject">GstObject</a>
151          +----GstClock
152                +----<a class="link" href="GstSystemClock.html" title="GstSystemClock">GstSystemClock</a>
153 </pre>
154 </div>
155 <div class="refsect1">
156 <a name="GstClock.properties"></a><h2>Properties</h2>
157 <pre class="synopsis">
158   "<a class="link" href="GstClock.html#GstClock--stats" title='The "stats" property'>stats</a>"                    <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write
159   "<a class="link" href="GstClock.html#GstClock--timeout" title='The "timeout" property'>timeout</a>"                  <span class="type">guint64</span>               : Read / Write
160   "<a class="link" href="GstClock.html#GstClock--window-size" title='The "window-size" property'>window-size</a>"              <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>                  : Read / Write
161   "<a class="link" href="GstClock.html#GstClock--window-threshold" title='The "window-threshold" property'>window-threshold</a>"         <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>                  : Read / Write
162 </pre>
163 </div>
164 <div class="refsect1">
165 <a name="GstClock.description"></a><h2>Description</h2>
166 <p>
167 GStreamer uses a global clock to synchronize the plugins in a pipeline.
168 Different clock implementations are possible by implementing this abstract
169 base class or, more conveniently, by subclassing <a class="link" href="GstSystemClock.html" title="GstSystemClock"><span class="type">GstSystemClock</span></a>.
170 </p>
171 <p>
172 The <a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> returns a monotonically increasing time with the method
173 <a class="link" href="GstClock.html#gst-clock-get-time" title="gst_clock_get_time ()"><code class="function">gst_clock_get_time()</code></a>. Its accuracy and base time depend on the specific
174 clock implementation but time is always expressed in nanoseconds. Since the
175 baseline of the clock is undefined, the clock time returned is not
176 meaningful in itself, what matters are the deltas between two clock times.
177 The time returned by a clock is called the absolute time.
178 </p>
179 <p>
180 The pipeline uses the clock to calculate the running time. Usually all
181 renderers synchronize to the global clock using the buffer timestamps, the
182 newsegment events and the element's base time, see <a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a>.
183 </p>
184 <p>
185 A clock implementation can support periodic and single shot clock
186 notifications both synchronous and asynchronous.
187 </p>
188 <p>
189 One first needs to create a <a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> for the periodic or single shot
190 notification using <a class="link" href="GstClock.html#gst-clock-new-single-shot-id" title="gst_clock_new_single_shot_id ()"><code class="function">gst_clock_new_single_shot_id()</code></a> or
191 <a class="link" href="GstClock.html#gst-clock-new-periodic-id" title="gst_clock_new_periodic_id ()"><code class="function">gst_clock_new_periodic_id()</code></a>.
192 </p>
193 <p>
194 To perform a blocking wait for the specific time of the <a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> use the
195 <a class="link" href="GstClock.html#gst-clock-id-wait" title="gst_clock_id_wait ()"><code class="function">gst_clock_id_wait()</code></a>. To receive a callback when the specific time is reached
196 in the clock use <a class="link" href="GstClock.html#gst-clock-id-wait-async" title="gst_clock_id_wait_async ()"><code class="function">gst_clock_id_wait_async()</code></a>. Both these calls can be
197 interrupted with the <a class="link" href="GstClock.html#gst-clock-id-unschedule" title="gst_clock_id_unschedule ()"><code class="function">gst_clock_id_unschedule()</code></a> call. If the blocking wait is
198 unscheduled a return value of <a class="link" href="GstClock.html#GST-CLOCK-UNSCHEDULED:CAPS"><span class="type">GST_CLOCK_UNSCHEDULED</span></a> is returned.
199 </p>
200 <p>
201 Periodic callbacks scheduled async will be repeatedly called automatically
202 until it is unscheduled. To schedule a sync periodic callback,
203 <a class="link" href="GstClock.html#gst-clock-id-wait" title="gst_clock_id_wait ()"><code class="function">gst_clock_id_wait()</code></a> should be called repeatedly.
204 </p>
205 <p>
206 The async callbacks can happen from any thread, either provided by the core
207 or from a streaming thread. The application should be prepared for this.
208 </p>
209 <p>
210 A <a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> that has been unscheduled cannot be used again for any wait
211 operation, a new <a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> should be created and the old unscheduled one
212 should be destroyed with <a class="link" href="GstClock.html#gst-clock-id-unref" title="gst_clock_id_unref ()"><code class="function">gst_clock_id_unref()</code></a>.
213 </p>
214 <p>
215 It is possible to perform a blocking wait on the same <a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> from
216 multiple threads. However, registering the same <a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> for multiple
217 async notifications is not possible, the callback will only be called for
218 the thread registering the entry last.
219 </p>
220 <p>
221 None of the wait operations unref the <a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a>, the owner is responsible
222 for unreffing the ids itself. This holds for both periodic and single shot
223 notifications. The reason being that the owner of the <a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> has to
224 keep a handle to the <a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> to unblock the wait on FLUSHING events or
225 state changes and if the entry would be unreffed automatically, the handle 
226 might become invalid without any notification.
227 </p>
228 <p>
229 These clock operations do not operate on the running time, so the callbacks
230 will also occur when not in PLAYING state as if the clock just keeps on
231 running. Some clocks however do not progress when the element that provided
232 the clock is not PLAYING.
233 </p>
234 <p>
235 When a clock has the <a class="link" href="GstClock.html#GST-CLOCK-FLAG-CAN-SET-MASTER:CAPS"><span class="type">GST_CLOCK_FLAG_CAN_SET_MASTER</span></a> flag set, it can be
236 slaved to another <a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> with the <a class="link" href="GstClock.html#gst-clock-set-master" title="gst_clock_set_master ()"><code class="function">gst_clock_set_master()</code></a>. The clock will
237 then automatically be synchronized to this master clock by repeatedly
238 sampling the master clock and the slave clock and recalibrating the slave
239 clock with <a class="link" href="GstClock.html#gst-clock-set-calibration" title="gst_clock_set_calibration ()"><code class="function">gst_clock_set_calibration()</code></a>. This feature is mostly useful for
240 plugins that have an internal clock but must operate with another clock
241 selected by the <a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a>.  They can track the offset and rate difference
242 of their internal clock relative to the master clock by using the
243 <a class="link" href="GstClock.html#gst-clock-get-calibration" title="gst_clock_get_calibration ()"><code class="function">gst_clock_get_calibration()</code></a> function. 
244 </p>
245 <p>
246 The master/slave synchronisation can be tuned with the <a class="link" href="GstClock.html#GstClock--timeout" title='The "timeout" property'><span class="type">"timeout"</span></a>,
247 <a class="link" href="GstClock.html#GstClock--window-size" title='The "window-size" property'><span class="type">"window-size"</span></a> and <a class="link" href="GstClock.html#GstClock--window-threshold" title='The "window-threshold" property'><span class="type">"window-threshold"</span></a> properties.
248 The <a class="link" href="GstClock.html#GstClock--timeout" title='The "timeout" property'><span class="type">"timeout"</span></a> property defines the interval to sample the master
249 clock and run the calibration functions. <a class="link" href="GstClock.html#GstClock--window-size" title='The "window-size" property'><span class="type">"window-size"</span></a> defines the
250 number of samples to use when calibrating and <a class="link" href="GstClock.html#GstClock--window-threshold" title='The "window-threshold" property'><span class="type">"window-threshold"</span></a>
251 defines the minimum number of samples before the calibration is performed.
252 </p>
253 <p>
254 Last reviewed on 2009-05-21 (0.10.24)
255 </p>
256 </div>
257 <div class="refsect1">
258 <a name="GstClock.details"></a><h2>Details</h2>
259 <div class="refsect2">
260 <a name="GstClock-struct"></a><h3>struct GstClock</h3>
261 <pre class="programlisting">struct GstClock;</pre>
262 <p>
263 <a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> base structure. The values of this structure are
264 protected for subclasses, use the methods to use the <a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a>.
265 </p>
266 </div>
267 <hr>
268 <div class="refsect2">
269 <a name="GstClockClass"></a><h3>struct GstClockClass</h3>
270 <pre class="programlisting">struct GstClockClass {
271   GstObjectClass        parent_class;
272
273   /* vtable */
274   GstClockTime          (*change_resolution)    (GstClock *clock,
275                                                  GstClockTime old_resolution,
276                                                  GstClockTime new_resolution);
277   GstClockTime          (*get_resolution)       (GstClock *clock);
278
279   GstClockTime          (*get_internal_time) (GstClock *clock);
280
281   /* waiting on an ID */
282   GstClockReturn        (*wait)                 (GstClock *clock, GstClockEntry *entry);
283   GstClockReturn        (*wait_async)           (GstClock *clock, GstClockEntry *entry);
284   void                  (*unschedule)           (GstClock *clock, GstClockEntry *entry);
285
286   /* ABI added to replace the deprecated wait */
287   GstClockReturn        (*wait_jitter)          (GstClock *clock, GstClockEntry *entry,
288                                                  GstClockTimeDiff *jitter);
289 };
290 </pre>
291 <p>
292 GStreamer clock class. Override the vmethods to implement the clock
293 functionality.
294 </p>
295 <div class="variablelist"><table border="0">
296 <col align="left" valign="top">
297 <tbody>
298 <tr>
299 <td><p><span class="term"><a class="link" href="GstObject.html#GstObjectClass" title="struct GstObjectClass"><span class="type">GstObjectClass</span></a> <em class="structfield"><code><a name="GstClockClass.parent-class"></a>parent_class</code></em>;</span></p></td>
300 <td>the parent class structure</td>
301 </tr>
302 <tr>
303 <td><p><span class="term"><em class="structfield"><code><a name="GstClockClass.change-resolution"></a>change_resolution</code></em> ()</span></p></td>
304 <td>change the resolution of the clock. Not all values might
305 be acceptable. The new resolution should be returned.</td>
306 </tr>
307 <tr>
308 <td><p><span class="term"><em class="structfield"><code><a name="GstClockClass.get-resolution"></a>get_resolution</code></em> ()</span></p></td>
309 <td>get the resolution of the clock.</td>
310 </tr>
311 <tr>
312 <td><p><span class="term"><em class="structfield"><code><a name="GstClockClass.get-internal-time"></a>get_internal_time</code></em> ()</span></p></td>
313 <td>get the internal unadjusted time of the clock.</td>
314 </tr>
315 <tr>
316 <td><p><span class="term"><em class="structfield"><code><a name="GstClockClass.wait"></a>wait</code></em> ()</span></p></td>
317 <td>perform a blocking wait for the given <a class="link" href="GstClock.html#GstClockEntry" title="struct GstClockEntry"><span class="type">GstClockEntry</span></a>. Deprecated,
318 implement <em class="parameter"><code>wait_jitter</code></em> instead.</td>
319 </tr>
320 <tr>
321 <td><p><span class="term"><em class="structfield"><code><a name="GstClockClass.wait-async"></a>wait_async</code></em> ()</span></p></td>
322 <td>perform an asynchronous wait for the given <a class="link" href="GstClock.html#GstClockEntry" title="struct GstClockEntry"><span class="type">GstClockEntry</span></a>.</td>
323 </tr>
324 <tr>
325 <td><p><span class="term"><em class="structfield"><code><a name="GstClockClass.unschedule"></a>unschedule</code></em> ()</span></p></td>
326 <td>unblock a blocking or async wait operation.</td>
327 </tr>
328 <tr>
329 <td><p><span class="term"><em class="structfield"><code><a name="GstClockClass.wait-jitter"></a>wait_jitter</code></em> ()</span></p></td>
330 <td>perform a blocking wait on the given <a class="link" href="GstClock.html#GstClockEntry" title="struct GstClockEntry"><span class="type">GstClockEntry</span></a> and return
331 the jitter. (Since: 0.10.10)</td>
332 </tr>
333 </tbody>
334 </table></div>
335 </div>
336 <hr>
337 <div class="refsect2">
338 <a name="GstClockTime"></a><h3>GstClockTime</h3>
339 <pre class="programlisting">typedef guint64 GstClockTime;
340 </pre>
341 <p>
342 A datatype to hold a time, measured in nanoseconds.
343 </p>
344 </div>
345 <hr>
346 <div class="refsect2">
347 <a name="GstClockTimeDiff"></a><h3>GstClockTimeDiff</h3>
348 <pre class="programlisting">typedef gint64 GstClockTimeDiff;
349 </pre>
350 <p>
351 A datatype to hold a time difference, measured in nanoseconds.
352 </p>
353 </div>
354 <hr>
355 <div class="refsect2">
356 <a name="GstClockID"></a><h3>GstClockID</h3>
357 <pre class="programlisting">typedef gpointer GstClockID;
358 </pre>
359 <p>
360 A datatype to hold the handle to an outstanding sync or async clock callback.
361 </p>
362 </div>
363 <hr>
364 <div class="refsect2">
365 <a name="GST-CLOCK-TIME-NONE:CAPS"></a><h3>GST_CLOCK_TIME_NONE</h3>
366 <pre class="programlisting">#define GST_CLOCK_TIME_NONE         ((GstClockTime) -1)
367 </pre>
368 <p>
369 Constant to define an undefined clock time.
370 </p>
371 </div>
372 <hr>
373 <div class="refsect2">
374 <a name="GST-CLOCK-TIME-IS-VALID:CAPS"></a><h3>GST_CLOCK_TIME_IS_VALID()</h3>
375 <pre class="programlisting">#define GST_CLOCK_TIME_IS_VALID(time) (((GstClockTime)(time)) != GST_CLOCK_TIME_NONE)
376 </pre>
377 <p>
378 Tests if a given <a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> represents a valid defined time.
379 </p>
380 <div class="variablelist"><table border="0">
381 <col align="left" valign="top">
382 <tbody><tr>
383 <td><p><span class="term"><em class="parameter"><code>time</code></em> :</span></p></td>
384 <td>clock time to validate</td>
385 </tr></tbody>
386 </table></div>
387 </div>
388 <hr>
389 <div class="refsect2">
390 <a name="GST-SECOND:CAPS"></a><h3>GST_SECOND</h3>
391 <pre class="programlisting">#define GST_SECOND  (G_USEC_PER_SEC * G_GINT64_CONSTANT (1000))
392 </pre>
393 <p>
394 Constant that defines one GStreamer second.
395 </p>
396 <p>
397 Value: 1000000000
398 </p>
399 </div>
400 <hr>
401 <div class="refsect2">
402 <a name="GST-MSECOND:CAPS"></a><h3>GST_MSECOND</h3>
403 <pre class="programlisting">#define GST_MSECOND (GST_SECOND / G_GINT64_CONSTANT (1000))
404 </pre>
405 <p>
406 Constant that defines one GStreamer millisecond.
407 </p>
408 <p>
409 Value: 1000000
410 </p>
411 </div>
412 <hr>
413 <div class="refsect2">
414 <a name="GST-USECOND:CAPS"></a><h3>GST_USECOND</h3>
415 <pre class="programlisting">#define GST_USECOND (GST_SECOND / G_GINT64_CONSTANT (1000000))
416 </pre>
417 <p>
418 Constant that defines one GStreamer microsecond.
419 </p>
420 <p>
421 Value: 1000
422 </p>
423 </div>
424 <hr>
425 <div class="refsect2">
426 <a name="GST-NSECOND:CAPS"></a><h3>GST_NSECOND</h3>
427 <pre class="programlisting">#define GST_NSECOND (GST_SECOND / G_GINT64_CONSTANT (1000000000))
428 </pre>
429 <p>
430 Constant that defines one GStreamer nanosecond
431 </p>
432 <p>
433 Value: 1
434 </p>
435 </div>
436 <hr>
437 <div class="refsect2">
438 <a name="GST-TIME-AS-SECONDS:CAPS"></a><h3>GST_TIME_AS_SECONDS()</h3>
439 <pre class="programlisting">#define GST_TIME_AS_SECONDS(time)  ((time) / GST_SECOND)
440 </pre>
441 <p>
442 Convert a <a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> to seconds.
443 </p>
444 <div class="variablelist"><table border="0">
445 <col align="left" valign="top">
446 <tbody><tr>
447 <td><p><span class="term"><em class="parameter"><code>time</code></em> :</span></p></td>
448 <td>the time</td>
449 </tr></tbody>
450 </table></div>
451 <p class="since">Since 0.10.16</p>
452 </div>
453 <hr>
454 <div class="refsect2">
455 <a name="GST-TIME-AS-MSECONDS:CAPS"></a><h3>GST_TIME_AS_MSECONDS()</h3>
456 <pre class="programlisting">#define GST_TIME_AS_MSECONDS(time) ((time) / G_GINT64_CONSTANT (1000000))
457 </pre>
458 <p>
459 Convert a <a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> to milliseconds (1/1000 of a second).
460 </p>
461 <div class="variablelist"><table border="0">
462 <col align="left" valign="top">
463 <tbody><tr>
464 <td><p><span class="term"><em class="parameter"><code>time</code></em> :</span></p></td>
465 <td>the time</td>
466 </tr></tbody>
467 </table></div>
468 <p class="since">Since 0.10.16</p>
469 </div>
470 <hr>
471 <div class="refsect2">
472 <a name="GST-TIME-AS-USECONDS:CAPS"></a><h3>GST_TIME_AS_USECONDS()</h3>
473 <pre class="programlisting">#define GST_TIME_AS_USECONDS(time) ((time) / G_GINT64_CONSTANT (1000))
474 </pre>
475 <p>
476 Convert a <a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> to microseconds (1/1000000 of a second).
477 </p>
478 <div class="variablelist"><table border="0">
479 <col align="left" valign="top">
480 <tbody><tr>
481 <td><p><span class="term"><em class="parameter"><code>time</code></em> :</span></p></td>
482 <td>the time</td>
483 </tr></tbody>
484 </table></div>
485 <p class="since">Since 0.10.16</p>
486 </div>
487 <hr>
488 <div class="refsect2">
489 <a name="GST-TIME-AS-NSECONDS:CAPS"></a><h3>GST_TIME_AS_NSECONDS()</h3>
490 <pre class="programlisting">#define GST_TIME_AS_NSECONDS(time) (time)
491 </pre>
492 <p>
493 Convert a <a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> to nanoseconds (1/1000000000 of a second).
494 </p>
495 <div class="variablelist"><table border="0">
496 <col align="left" valign="top">
497 <tbody><tr>
498 <td><p><span class="term"><em class="parameter"><code>time</code></em> :</span></p></td>
499 <td>the time</td>
500 </tr></tbody>
501 </table></div>
502 <p class="since">Since 0.10.16</p>
503 </div>
504 <hr>
505 <div class="refsect2">
506 <a name="GST-CLOCK-DIFF:CAPS"></a><h3>GST_CLOCK_DIFF()</h3>
507 <pre class="programlisting">#define GST_CLOCK_DIFF(s, e)                (GstClockTimeDiff)((e) - (s))
508 </pre>
509 <p>
510 Calculate a difference between two clock times as a <a class="link" href="GstClock.html#GstClockTimeDiff" title="GstClockTimeDiff"><span class="type">GstClockTimeDiff</span></a>.
511 The difference is calculated as <em class="parameter"><code>e</code></em> - <em class="parameter"><code>s</code></em>.
512 </p>
513 <div class="variablelist"><table border="0">
514 <col align="left" valign="top">
515 <tbody>
516 <tr>
517 <td><p><span class="term"><em class="parameter"><code>s</code></em> :</span></p></td>
518 <td>the first time</td>
519 </tr>
520 <tr>
521 <td><p><span class="term"><em class="parameter"><code>e</code></em> :</span></p></td>
522 <td>the second time</td>
523 </tr>
524 </tbody>
525 </table></div>
526 </div>
527 <hr>
528 <div class="refsect2">
529 <a name="GST-TIMEVAL-TO-TIME:CAPS"></a><h3>GST_TIMEVAL_TO_TIME()</h3>
530 <pre class="programlisting">#define GST_TIMEVAL_TO_TIME(tv)             (GstClockTime)((tv).tv_sec * GST_SECOND + (tv).tv_usec * GST_USECOND)
531 </pre>
532 <p>
533 Convert a <a href="http://library.gnome.org/devel/glib/unstable/glib-Date-and-Time-Functions.html#GTimeVal"><span class="type">GTimeVal</span></a> to a <a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a>.
534 </p>
535 <div class="variablelist"><table border="0">
536 <col align="left" valign="top">
537 <tbody><tr>
538 <td><p><span class="term"><em class="parameter"><code>tv</code></em> :</span></p></td>
539 <td>the timeval to convert</td>
540 </tr></tbody>
541 </table></div>
542 </div>
543 <hr>
544 <div class="refsect2">
545 <a name="GST-TIME-TO-TIMEVAL:CAPS"></a><h3>GST_TIME_TO_TIMEVAL()</h3>
546 <pre class="programlisting">#define             GST_TIME_TO_TIMEVAL(t,tv)</pre>
547 <p>
548 Convert a <a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> to a <a href="http://library.gnome.org/devel/glib/unstable/glib-Date-and-Time-Functions.html#GTimeVal"><span class="type">GTimeVal</span></a>
549 </p>
550 <p>
551 </p>
552 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
553 <h3 class="title">Note</h3>on 32-bit systems, a timeval has a range of only 2^32 - 1 seconds,
554 which is about 68 years.  Expect trouble if you want to schedule stuff
555 in your pipeline for 2038.</div>
556 <p>
557 </p>
558 <div class="variablelist"><table border="0">
559 <col align="left" valign="top">
560 <tbody>
561 <tr>
562 <td><p><span class="term"><em class="parameter"><code>t</code></em> :</span></p></td>
563 <td>The <a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> to convert</td>
564 </tr>
565 <tr>
566 <td><p><span class="term"><em class="parameter"><code>tv</code></em> :</span></p></td>
567 <td>The target timeval</td>
568 </tr>
569 </tbody>
570 </table></div>
571 </div>
572 <hr>
573 <div class="refsect2">
574 <a name="GST-TIMESPEC-TO-TIME:CAPS"></a><h3>GST_TIMESPEC_TO_TIME()</h3>
575 <pre class="programlisting">#define GST_TIMESPEC_TO_TIME(ts) (GstClockTime)((ts).tv_sec * GST_SECOND + (ts).tv_nsec * GST_NSECOND)
576 </pre>
577 <p>
578 Convert a struct timespec (see man pselect) to a <a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a>.
579 </p>
580 <div class="variablelist"><table border="0">
581 <col align="left" valign="top">
582 <tbody><tr>
583 <td><p><span class="term"><em class="parameter"><code>ts</code></em> :</span></p></td>
584 <td>the timespec to convert</td>
585 </tr></tbody>
586 </table></div>
587 </div>
588 <hr>
589 <div class="refsect2">
590 <a name="GST-TIME-TO-TIMESPEC:CAPS"></a><h3>GST_TIME_TO_TIMESPEC()</h3>
591 <pre class="programlisting">#define             GST_TIME_TO_TIMESPEC(t,ts)</pre>
592 <p>
593 Convert a <a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> to a struct timespec (see man pselect)
594 </p>
595 <div class="variablelist"><table border="0">
596 <col align="left" valign="top">
597 <tbody>
598 <tr>
599 <td><p><span class="term"><em class="parameter"><code>t</code></em> :</span></p></td>
600 <td>The <a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> to convert</td>
601 </tr>
602 <tr>
603 <td><p><span class="term"><em class="parameter"><code>ts</code></em> :</span></p></td>
604 <td>The target timespec</td>
605 </tr>
606 </tbody>
607 </table></div>
608 </div>
609 <hr>
610 <div class="refsect2">
611 <a name="GST-CLOCK-ENTRY-TRACE-NAME:CAPS"></a><h3>GST_CLOCK_ENTRY_TRACE_NAME</h3>
612 <pre class="programlisting">#define GST_CLOCK_ENTRY_TRACE_NAME "GstClockEntry"
613 </pre>
614 <p>
615 The name used for tracing clock entry allocations.
616 </p>
617 </div>
618 <hr>
619 <div class="refsect2">
620 <a name="GstClockEntry"></a><h3>struct GstClockEntry</h3>
621 <pre class="programlisting">struct GstClockEntry {
622   gint                  refcount;
623 };
624 </pre>
625 <p>
626 All pending timeouts or periodic notifies are converted into
627 an entry.
628 Note that GstClockEntry should be treated as an opaque structure. It must
629 not be extended or allocated using a custom allocator.
630 </p>
631 <div class="variablelist"><table border="0">
632 <col align="left" valign="top">
633 <tbody><tr>
634 <td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> <em class="structfield"><code><a name="GstClockEntry.refcount"></a>refcount</code></em>;</span></p></td>
635 <td>reference counter (read-only)</td>
636 </tr></tbody>
637 </table></div>
638 </div>
639 <hr>
640 <div class="refsect2">
641 <a name="GstClockCallback"></a><h3>GstClockCallback ()</h3>
642 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            (*GstClockCallback)                 (<em class="parameter"><code><a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> *clock</code></em>,
643                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> time</code></em>,
644                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> id</code></em>,
645                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
646 <p>
647 The function prototype of the callback.
648 </p>
649 <div class="variablelist"><table border="0">
650 <col align="left" valign="top">
651 <tbody>
652 <tr>
653 <td><p><span class="term"><em class="parameter"><code>clock</code></em> :</span></p></td>
654 <td>The clock that triggered the callback</td>
655 </tr>
656 <tr>
657 <td><p><span class="term"><em class="parameter"><code>time</code></em> :</span></p></td>
658 <td>The time it was triggered</td>
659 </tr>
660 <tr>
661 <td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
662 <td>The <a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> that expired</td>
663 </tr>
664 <tr>
665 <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
666 <td>user data passed in the <a class="link" href="GstClock.html#gst-clock-id-wait-async" title="gst_clock_id_wait_async ()"><code class="function">gst_clock_id_wait_async()</code></a> function</td>
667 </tr>
668 <tr>
669 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
670 <td>
671 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> (currently unused)</td>
672 </tr>
673 </tbody>
674 </table></div>
675 </div>
676 <hr>
677 <div class="refsect2">
678 <a name="GstClockEntryType"></a><h3>enum GstClockEntryType</h3>
679 <pre class="programlisting">typedef enum {
680   GST_CLOCK_ENTRY_SINGLE,
681   GST_CLOCK_ENTRY_PERIODIC
682 } GstClockEntryType;
683 </pre>
684 <p>
685 The type of the clock entry
686 </p>
687 <div class="variablelist"><table border="0">
688 <col align="left" valign="top">
689 <tbody>
690 <tr>
691 <td><p><a name="GST-CLOCK-ENTRY-SINGLE:CAPS"></a><span class="term"><code class="literal">GST_CLOCK_ENTRY_SINGLE</code></span></p></td>
692 <td>a single shot timeout
693 </td>
694 </tr>
695 <tr>
696 <td><p><a name="GST-CLOCK-ENTRY-PERIODIC:CAPS"></a><span class="term"><code class="literal">GST_CLOCK_ENTRY_PERIODIC</code></span></p></td>
697 <td>a periodic timeout request
698 </td>
699 </tr>
700 </tbody>
701 </table></div>
702 </div>
703 <hr>
704 <div class="refsect2">
705 <a name="GST-CLOCK-ENTRY:CAPS"></a><h3>GST_CLOCK_ENTRY()</h3>
706 <pre class="programlisting">#define GST_CLOCK_ENTRY(entry)              ((GstClockEntry *)(entry))
707 </pre>
708 <p>
709 Cast to a clock entry
710 </p>
711 <div class="variablelist"><table border="0">
712 <col align="left" valign="top">
713 <tbody><tr>
714 <td><p><span class="term"><em class="parameter"><code>entry</code></em> :</span></p></td>
715 <td>the entry to cast</td>
716 </tr></tbody>
717 </table></div>
718 </div>
719 <hr>
720 <div class="refsect2">
721 <a name="GST-CLOCK-ENTRY-CLOCK:CAPS"></a><h3>GST_CLOCK_ENTRY_CLOCK()</h3>
722 <pre class="programlisting">#define GST_CLOCK_ENTRY_CLOCK(entry) ((entry)-&gt;clock)
723 </pre>
724 <p>
725 Get the owner clock of the entry
726 </p>
727 <div class="variablelist"><table border="0">
728 <col align="left" valign="top">
729 <tbody><tr>
730 <td><p><span class="term"><em class="parameter"><code>entry</code></em> :</span></p></td>
731 <td>the entry to query</td>
732 </tr></tbody>
733 </table></div>
734 </div>
735 <hr>
736 <div class="refsect2">
737 <a name="GST-CLOCK-ENTRY-TYPE:CAPS"></a><h3>GST_CLOCK_ENTRY_TYPE()</h3>
738 <pre class="programlisting">#define GST_CLOCK_ENTRY_TYPE(entry) ((entry)-&gt;type)
739 </pre>
740 <p>
741 Get the type of the clock entry
742 </p>
743 <div class="variablelist"><table border="0">
744 <col align="left" valign="top">
745 <tbody><tr>
746 <td><p><span class="term"><em class="parameter"><code>entry</code></em> :</span></p></td>
747 <td>the entry to query</td>
748 </tr></tbody>
749 </table></div>
750 </div>
751 <hr>
752 <div class="refsect2">
753 <a name="GST-CLOCK-ENTRY-TIME:CAPS"></a><h3>GST_CLOCK_ENTRY_TIME()</h3>
754 <pre class="programlisting">#define GST_CLOCK_ENTRY_TIME(entry) ((entry)-&gt;time)
755 </pre>
756 <p>
757 Get the requested time of this entry
758 </p>
759 <div class="variablelist"><table border="0">
760 <col align="left" valign="top">
761 <tbody><tr>
762 <td><p><span class="term"><em class="parameter"><code>entry</code></em> :</span></p></td>
763 <td>the entry to query</td>
764 </tr></tbody>
765 </table></div>
766 </div>
767 <hr>
768 <div class="refsect2">
769 <a name="GST-CLOCK-ENTRY-INTERVAL:CAPS"></a><h3>GST_CLOCK_ENTRY_INTERVAL()</h3>
770 <pre class="programlisting">#define GST_CLOCK_ENTRY_INTERVAL(entry) ((entry)-&gt;interval)
771 </pre>
772 <p>
773 Get the interval of this periodic entry
774 </p>
775 <div class="variablelist"><table border="0">
776 <col align="left" valign="top">
777 <tbody><tr>
778 <td><p><span class="term"><em class="parameter"><code>entry</code></em> :</span></p></td>
779 <td>the entry to query</td>
780 </tr></tbody>
781 </table></div>
782 </div>
783 <hr>
784 <div class="refsect2">
785 <a name="GST-CLOCK-ENTRY-STATUS:CAPS"></a><h3>GST_CLOCK_ENTRY_STATUS()</h3>
786 <pre class="programlisting">#define GST_CLOCK_ENTRY_STATUS(entry) ((entry)-&gt;status)
787 </pre>
788 <p>
789 The status of the entry
790 </p>
791 <div class="variablelist"><table border="0">
792 <col align="left" valign="top">
793 <tbody><tr>
794 <td><p><span class="term"><em class="parameter"><code>entry</code></em> :</span></p></td>
795 <td>the entry to query</td>
796 </tr></tbody>
797 </table></div>
798 </div>
799 <hr>
800 <div class="refsect2">
801 <a name="GstClockReturn"></a><h3>enum GstClockReturn</h3>
802 <pre class="programlisting">typedef enum {
803   GST_CLOCK_OK          =  0,
804   GST_CLOCK_EARLY =  1,
805   GST_CLOCK_UNSCHEDULED =  2,
806   GST_CLOCK_BUSY =  3,
807   GST_CLOCK_BADTIME =  4,
808   GST_CLOCK_ERROR =  5,
809   GST_CLOCK_UNSUPPORTED =  6,
810   GST_CLOCK_DONE =  7
811 } GstClockReturn;
812 </pre>
813 <p>
814 The return value of a clock operation.
815 </p>
816 <div class="variablelist"><table border="0">
817 <col align="left" valign="top">
818 <tbody>
819 <tr>
820 <td><p><a name="GST-CLOCK-OK:CAPS"></a><span class="term"><code class="literal">GST_CLOCK_OK</code></span></p></td>
821 <td>The operation succeeded.
822 </td>
823 </tr>
824 <tr>
825 <td><p><a name="GST-CLOCK-EARLY:CAPS"></a><span class="term"><code class="literal">GST_CLOCK_EARLY</code></span></p></td>
826 <td>The operation was scheduled too late.
827 </td>
828 </tr>
829 <tr>
830 <td><p><a name="GST-CLOCK-UNSCHEDULED:CAPS"></a><span class="term"><code class="literal">GST_CLOCK_UNSCHEDULED</code></span></p></td>
831 <td>The clockID was unscheduled
832 </td>
833 </tr>
834 <tr>
835 <td><p><a name="GST-CLOCK-BUSY:CAPS"></a><span class="term"><code class="literal">GST_CLOCK_BUSY</code></span></p></td>
836 <td>The ClockID is busy
837 </td>
838 </tr>
839 <tr>
840 <td><p><a name="GST-CLOCK-BADTIME:CAPS"></a><span class="term"><code class="literal">GST_CLOCK_BADTIME</code></span></p></td>
841 <td>A bad time was provided to a function.
842 </td>
843 </tr>
844 <tr>
845 <td><p><a name="GST-CLOCK-ERROR:CAPS"></a><span class="term"><code class="literal">GST_CLOCK_ERROR</code></span></p></td>
846 <td>An error occurred
847 </td>
848 </tr>
849 <tr>
850 <td><p><a name="GST-CLOCK-UNSUPPORTED:CAPS"></a><span class="term"><code class="literal">GST_CLOCK_UNSUPPORTED</code></span></p></td>
851 <td>Operation is not supported
852 </td>
853 </tr>
854 <tr>
855 <td><p><a name="GST-CLOCK-DONE:CAPS"></a><span class="term"><code class="literal">GST_CLOCK_DONE</code></span></p></td>
856 <td>The ClockID is done waiting (Since: 0.10.32)
857 </td>
858 </tr>
859 </tbody>
860 </table></div>
861 </div>
862 <hr>
863 <div class="refsect2">
864 <a name="GstClockFlags"></a><h3>enum GstClockFlags</h3>
865 <pre class="programlisting">typedef enum {
866   GST_CLOCK_FLAG_CAN_DO_SINGLE_SYNC     = (GST_OBJECT_FLAG_LAST &lt;&lt; 0),
867   GST_CLOCK_FLAG_CAN_DO_SINGLE_ASYNC    = (GST_OBJECT_FLAG_LAST &lt;&lt; 1),
868   GST_CLOCK_FLAG_CAN_DO_PERIODIC_SYNC   = (GST_OBJECT_FLAG_LAST &lt;&lt; 2),
869   GST_CLOCK_FLAG_CAN_DO_PERIODIC_ASYNC  = (GST_OBJECT_FLAG_LAST &lt;&lt; 3),
870   GST_CLOCK_FLAG_CAN_SET_RESOLUTION     = (GST_OBJECT_FLAG_LAST &lt;&lt; 4),
871   GST_CLOCK_FLAG_CAN_SET_MASTER         = (GST_OBJECT_FLAG_LAST &lt;&lt; 5),
872   /* padding */
873   GST_CLOCK_FLAG_LAST                   = (GST_OBJECT_FLAG_LAST &lt;&lt; 8)
874 } GstClockFlags;
875 </pre>
876 <p>
877 The capabilities of this clock
878 </p>
879 <div class="variablelist"><table border="0">
880 <col align="left" valign="top">
881 <tbody>
882 <tr>
883 <td><p><a name="GST-CLOCK-FLAG-CAN-DO-SINGLE-SYNC:CAPS"></a><span class="term"><code class="literal">GST_CLOCK_FLAG_CAN_DO_SINGLE_SYNC</code></span></p></td>
884 <td>clock can do a single sync timeout request
885 </td>
886 </tr>
887 <tr>
888 <td><p><a name="GST-CLOCK-FLAG-CAN-DO-SINGLE-ASYNC:CAPS"></a><span class="term"><code class="literal">GST_CLOCK_FLAG_CAN_DO_SINGLE_ASYNC</code></span></p></td>
889 <td>clock can do a single async timeout request
890 </td>
891 </tr>
892 <tr>
893 <td><p><a name="GST-CLOCK-FLAG-CAN-DO-PERIODIC-SYNC:CAPS"></a><span class="term"><code class="literal">GST_CLOCK_FLAG_CAN_DO_PERIODIC_SYNC</code></span></p></td>
894 <td>clock can do sync periodic timeout requests
895 </td>
896 </tr>
897 <tr>
898 <td><p><a name="GST-CLOCK-FLAG-CAN-DO-PERIODIC-ASYNC:CAPS"></a><span class="term"><code class="literal">GST_CLOCK_FLAG_CAN_DO_PERIODIC_ASYNC</code></span></p></td>
899 <td>clock can do async periodic timeout callbacks
900 </td>
901 </tr>
902 <tr>
903 <td><p><a name="GST-CLOCK-FLAG-CAN-SET-RESOLUTION:CAPS"></a><span class="term"><code class="literal">GST_CLOCK_FLAG_CAN_SET_RESOLUTION</code></span></p></td>
904 <td>clock's resolution can be changed
905 </td>
906 </tr>
907 <tr>
908 <td><p><a name="GST-CLOCK-FLAG-CAN-SET-MASTER:CAPS"></a><span class="term"><code class="literal">GST_CLOCK_FLAG_CAN_SET_MASTER</code></span></p></td>
909 <td>clock can be slaved to a master clock
910 </td>
911 </tr>
912 <tr>
913 <td><p><a name="GST-CLOCK-FLAG-LAST:CAPS"></a><span class="term"><code class="literal">GST_CLOCK_FLAG_LAST</code></span></p></td>
914 <td>subclasses can add additional flags starting from this flag
915 </td>
916 </tr>
917 </tbody>
918 </table></div>
919 </div>
920 <hr>
921 <div class="refsect2">
922 <a name="GST-CLOCK-FLAGS:CAPS"></a><h3>GST_CLOCK_FLAGS()</h3>
923 <pre class="programlisting">#define GST_CLOCK_FLAGS(clock)  GST_OBJECT_FLAGS(clock)
924 </pre>
925 <p>
926 Gets the <a class="link" href="GstClock.html#GstClockFlags" title="enum GstClockFlags"><span class="type">GstClockFlags</span></a> clock flags.
927 </p>
928 <div class="variablelist"><table border="0">
929 <col align="left" valign="top">
930 <tbody><tr>
931 <td><p><span class="term"><em class="parameter"><code>clock</code></em> :</span></p></td>
932 <td>the clock to query</td>
933 </tr></tbody>
934 </table></div>
935 </div>
936 <hr>
937 <div class="refsect2">
938 <a name="GST-CLOCK-BROADCAST:CAPS"></a><h3>GST_CLOCK_BROADCAST()</h3>
939 <pre class="programlisting">#define GST_CLOCK_BROADCAST(clock)       g_cond_broadcast(GST_CLOCK_COND(clock))
940 </pre>
941 <p>
942 Signal that the entries in the clock have changed.
943 </p>
944 <div class="variablelist"><table border="0">
945 <col align="left" valign="top">
946 <tbody><tr>
947 <td><p><span class="term"><em class="parameter"><code>clock</code></em> :</span></p></td>
948 <td>the clock to broadcast</td>
949 </tr></tbody>
950 </table></div>
951 </div>
952 <hr>
953 <div class="refsect2">
954 <a name="GST-CLOCK-COND:CAPS"></a><h3>GST_CLOCK_COND()</h3>
955 <pre class="programlisting">#define GST_CLOCK_COND(clock)            (GST_CLOCK_CAST(clock)-&gt;entries_changed)
956 </pre>
957 <p>
958 Gets the <a href="http://library.gnome.org/devel/glib/unstable/glib-Threads.html#GCond"><span class="type">GCond</span></a> that gets signalled when the entries of the clock
959 changed.
960 </p>
961 <div class="variablelist"><table border="0">
962 <col align="left" valign="top">
963 <tbody><tr>
964 <td><p><span class="term"><em class="parameter"><code>clock</code></em> :</span></p></td>
965 <td>the clock to query</td>
966 </tr></tbody>
967 </table></div>
968 </div>
969 <hr>
970 <div class="refsect2">
971 <a name="GST-CLOCK-TIMED-WAIT:CAPS"></a><h3>GST_CLOCK_TIMED_WAIT()</h3>
972 <pre class="programlisting">#define GST_CLOCK_TIMED_WAIT(clock,tv)   g_cond_timed_wait(GST_CLOCK_COND(clock),GST_OBJECT_GET_LOCK(clock),tv)
973 </pre>
974 <p>
975 Wait on the clock until the entries changed or the specified timeout
976 occurred.
977 </p>
978 <div class="variablelist"><table border="0">
979 <col align="left" valign="top">
980 <tbody>
981 <tr>
982 <td><p><span class="term"><em class="parameter"><code>clock</code></em> :</span></p></td>
983 <td>the clock to wait on</td>
984 </tr>
985 <tr>
986 <td><p><span class="term"><em class="parameter"><code>tv</code></em> :</span></p></td>
987 <td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Date-and-Time-Functions.html#GTimeVal"><span class="type">GTimeVal</span></a> to wait.</td>
988 </tr>
989 </tbody>
990 </table></div>
991 </div>
992 <hr>
993 <div class="refsect2">
994 <a name="GST-CLOCK-WAIT:CAPS"></a><h3>GST_CLOCK_WAIT()</h3>
995 <pre class="programlisting">#define GST_CLOCK_WAIT(clock)            g_cond_wait(GST_CLOCK_COND(clock),GST_OBJECT_GET_LOCK(clock))
996 </pre>
997 <p>
998 Wait on the clock until the entries changed.
999 </p>
1000 <div class="variablelist"><table border="0">
1001 <col align="left" valign="top">
1002 <tbody><tr>
1003 <td><p><span class="term"><em class="parameter"><code>clock</code></em> :</span></p></td>
1004 <td>the clock to wait on</td>
1005 </tr></tbody>
1006 </table></div>
1007 </div>
1008 <hr>
1009 <div class="refsect2">
1010 <a name="gst-clock-add-observation"></a><h3>gst_clock_add_observation ()</h3>
1011 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gst_clock_add_observation           (<em class="parameter"><code><a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> *clock</code></em>,
1012                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> slave</code></em>,
1013                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> master</code></em>,
1014                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *r_squared</code></em>);</pre>
1015 <p>
1016 The time <em class="parameter"><code>master</code></em> of the master clock and the time <em class="parameter"><code>slave</code></em> of the slave
1017 clock are added to the list of observations. If enough observations
1018 are available, a linear regression algorithm is run on the
1019 observations and <em class="parameter"><code>clock</code></em> is recalibrated.
1020 </p>
1021 <p>
1022 If this functions returns <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, <em class="parameter"><code>r_squared</code></em> will contain the 
1023 correlation coefficient of the interpolation. A value of 1.0
1024 means a perfect regression was performed. This value can
1025 be used to control the sampling frequency of the master and slave
1026 clocks.
1027 </p>
1028 <div class="variablelist"><table border="0">
1029 <col align="left" valign="top">
1030 <tbody>
1031 <tr>
1032 <td><p><span class="term"><em class="parameter"><code>clock</code></em> :</span></p></td>
1033 <td>a <a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a>
1034 </td>
1035 </tr>
1036 <tr>
1037 <td><p><span class="term"><em class="parameter"><code>slave</code></em> :</span></p></td>
1038 <td>a time on the slave</td>
1039 </tr>
1040 <tr>
1041 <td><p><span class="term"><em class="parameter"><code>master</code></em> :</span></p></td>
1042 <td>a time on the master</td>
1043 </tr>
1044 <tr>
1045 <td><p><span class="term"><em class="parameter"><code>r_squared</code></em> :</span></p></td>
1046 <td>a pointer to hold the result. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
1047 </td>
1048 </tr>
1049 <tr>
1050 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1051 <td>
1052 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if enough observations were added to run the
1053 regression algorithm.
1054 MT safe.</td>
1055 </tr>
1056 </tbody>
1057 </table></div>
1058 </div>
1059 <hr>
1060 <div class="refsect2">
1061 <a name="gst-clock-set-master"></a><h3>gst_clock_set_master ()</h3>
1062 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gst_clock_set_master                (<em class="parameter"><code><a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> *clock</code></em>,
1063                                                          <em class="parameter"><code><a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> *master</code></em>);</pre>
1064 <p>
1065 Set <em class="parameter"><code>master</code></em> as the master clock for <em class="parameter"><code>clock</code></em>. <em class="parameter"><code>clock</code></em> will be automatically
1066 calibrated so that <a class="link" href="GstClock.html#gst-clock-get-time" title="gst_clock_get_time ()"><code class="function">gst_clock_get_time()</code></a> reports the same time as the
1067 master clock.  
1068 </p>
1069 <p>
1070 A clock provider that slaves its clock to a master can get the current
1071 calibration values with <a class="link" href="GstClock.html#gst-clock-get-calibration" title="gst_clock_get_calibration ()"><code class="function">gst_clock_get_calibration()</code></a>.
1072 </p>
1073 <p>
1074 <em class="parameter"><code>master</code></em> can be <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> in which case <em class="parameter"><code>clock</code></em> will not be slaved anymore. It will
1075 however keep reporting its time adjusted with the last configured rate 
1076 and time offsets.
1077 </p>
1078 <div class="variablelist"><table border="0">
1079 <col align="left" valign="top">
1080 <tbody>
1081 <tr>
1082 <td><p><span class="term"><em class="parameter"><code>clock</code></em> :</span></p></td>
1083 <td>a <a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a>
1084 </td>
1085 </tr>
1086 <tr>
1087 <td><p><span class="term"><em class="parameter"><code>master</code></em> :</span></p></td>
1088 <td>a master <a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
1089 </td>
1090 </tr>
1091 <tr>
1092 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1093 <td>
1094 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the clock is capable of being slaved to a master clock.
1095 Trying to set a master on a clock without the
1096 <a class="link" href="GstClock.html#GST-CLOCK-FLAG-CAN-SET-MASTER:CAPS"><span class="type">GST_CLOCK_FLAG_CAN_SET_MASTER</span></a> flag will make this function return <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.
1097 MT safe.</td>
1098 </tr>
1099 </tbody>
1100 </table></div>
1101 </div>
1102 <hr>
1103 <div class="refsect2">
1104 <a name="gst-clock-get-master"></a><h3>gst_clock_get_master ()</h3>
1105 <pre class="programlisting"><a class="link" href="GstClock.html" title="GstClock"><span class="returnvalue">GstClock</span></a> *          gst_clock_get_master                (<em class="parameter"><code><a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> *clock</code></em>);</pre>
1106 <p>
1107 Get the master clock that <em class="parameter"><code>clock</code></em> is slaved to or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> when the clock is
1108 not slaved to any master clock.
1109 </p>
1110 <div class="variablelist"><table border="0">
1111 <col align="left" valign="top">
1112 <tbody>
1113 <tr>
1114 <td><p><span class="term"><em class="parameter"><code>clock</code></em> :</span></p></td>
1115 <td>a <a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a>
1116 </td>
1117 </tr>
1118 <tr>
1119 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1120 <td>a master <a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> when this clock is
1121 not slaved to a master clock. Unref after usage.
1122 MT safe. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
1123 </td>
1124 </tr>
1125 </tbody>
1126 </table></div>
1127 </div>
1128 <hr>
1129 <div class="refsect2">
1130 <a name="gst-clock-set-resolution"></a><h3>gst_clock_set_resolution ()</h3>
1131 <pre class="programlisting"><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="returnvalue">GstClockTime</span></a>        gst_clock_set_resolution            (<em class="parameter"><code><a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> *clock</code></em>,
1132                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> resolution</code></em>);</pre>
1133 <p>
1134 Set the accuracy of the clock. Some clocks have the possibility to operate
1135 with different accuracy at the expense of more resource usage. There is
1136 normally no need to change the default resolution of a clock. The resolution
1137 of a clock can only be changed if the clock has the
1138 <a class="link" href="GstClock.html#GST-CLOCK-FLAG-CAN-SET-RESOLUTION:CAPS"><span class="type">GST_CLOCK_FLAG_CAN_SET_RESOLUTION</span></a> flag set.
1139 </p>
1140 <div class="variablelist"><table border="0">
1141 <col align="left" valign="top">
1142 <tbody>
1143 <tr>
1144 <td><p><span class="term"><em class="parameter"><code>clock</code></em> :</span></p></td>
1145 <td>a <a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a>
1146 </td>
1147 </tr>
1148 <tr>
1149 <td><p><span class="term"><em class="parameter"><code>resolution</code></em> :</span></p></td>
1150 <td>The resolution to set</td>
1151 </tr>
1152 <tr>
1153 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1154 <td>the new resolution of the clock.</td>
1155 </tr>
1156 </tbody>
1157 </table></div>
1158 </div>
1159 <hr>
1160 <div class="refsect2">
1161 <a name="gst-clock-get-resolution"></a><h3>gst_clock_get_resolution ()</h3>
1162 <pre class="programlisting"><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="returnvalue">GstClockTime</span></a>        gst_clock_get_resolution            (<em class="parameter"><code><a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> *clock</code></em>);</pre>
1163 <p>
1164 Get the accuracy of the clock. The accuracy of the clock is the granularity
1165 of the values returned by <a class="link" href="GstClock.html#gst-clock-get-time" title="gst_clock_get_time ()"><code class="function">gst_clock_get_time()</code></a>.
1166 </p>
1167 <div class="variablelist"><table border="0">
1168 <col align="left" valign="top">
1169 <tbody>
1170 <tr>
1171 <td><p><span class="term"><em class="parameter"><code>clock</code></em> :</span></p></td>
1172 <td>a <a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a>
1173 </td>
1174 </tr>
1175 <tr>
1176 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1177 <td>the resolution of the clock in units of <a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a>.
1178 MT safe.</td>
1179 </tr>
1180 </tbody>
1181 </table></div>
1182 </div>
1183 <hr>
1184 <div class="refsect2">
1185 <a name="gst-clock-get-time"></a><h3>gst_clock_get_time ()</h3>
1186 <pre class="programlisting"><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="returnvalue">GstClockTime</span></a>        gst_clock_get_time                  (<em class="parameter"><code><a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> *clock</code></em>);</pre>
1187 <p>
1188 Gets the current time of the given clock. The time is always
1189 monotonically increasing and adjusted according to the current
1190 offset and rate.
1191 </p>
1192 <div class="variablelist"><table border="0">
1193 <col align="left" valign="top">
1194 <tbody>
1195 <tr>
1196 <td><p><span class="term"><em class="parameter"><code>clock</code></em> :</span></p></td>
1197 <td>a <a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> to query</td>
1198 </tr>
1199 <tr>
1200 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1201 <td>the time of the clock. Or GST_CLOCK_TIME_NONE when
1202 given invalid input.
1203 MT safe.</td>
1204 </tr>
1205 </tbody>
1206 </table></div>
1207 </div>
1208 <hr>
1209 <div class="refsect2">
1210 <a name="gst-clock-new-single-shot-id"></a><h3>gst_clock_new_single_shot_id ()</h3>
1211 <pre class="programlisting"><a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="returnvalue">GstClockID</span></a>          gst_clock_new_single_shot_id        (<em class="parameter"><code><a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> *clock</code></em>,
1212                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> time</code></em>);</pre>
1213 <p>
1214 Get a <a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> from <em class="parameter"><code>clock</code></em> to trigger a single shot
1215 notification at the requested time. The single shot id should be
1216 unreffed after usage.
1217 </p>
1218 <p>
1219 Free-function: gst_clock_id_unref
1220 </p>
1221 <div class="variablelist"><table border="0">
1222 <col align="left" valign="top">
1223 <tbody>
1224 <tr>
1225 <td><p><span class="term"><em class="parameter"><code>clock</code></em> :</span></p></td>
1226 <td>The <a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> to get a single shot notification from</td>
1227 </tr>
1228 <tr>
1229 <td><p><span class="term"><em class="parameter"><code>time</code></em> :</span></p></td>
1230 <td>the requested time</td>
1231 </tr>
1232 <tr>
1233 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1234 <td>a <a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> that can be used to request the
1235 time notification.
1236 MT safe. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
1237 </td>
1238 </tr>
1239 </tbody>
1240 </table></div>
1241 </div>
1242 <hr>
1243 <div class="refsect2">
1244 <a name="gst-clock-new-periodic-id"></a><h3>gst_clock_new_periodic_id ()</h3>
1245 <pre class="programlisting"><a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="returnvalue">GstClockID</span></a>          gst_clock_new_periodic_id           (<em class="parameter"><code><a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> *clock</code></em>,
1246                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> start_time</code></em>,
1247                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> interval</code></em>);</pre>
1248 <p>
1249 Get an ID from <em class="parameter"><code>clock</code></em> to trigger a periodic notification.
1250 The periodic notifications will start at time <em class="parameter"><code>start_time</code></em> and
1251 will then be fired with the given <em class="parameter"><code>interval</code></em>. <em class="parameter"><code>id</code></em> should be unreffed
1252 after usage.
1253 </p>
1254 <p>
1255 Free-function: gst_clock_id_unref
1256 </p>
1257 <div class="variablelist"><table border="0">
1258 <col align="left" valign="top">
1259 <tbody>
1260 <tr>
1261 <td><p><span class="term"><em class="parameter"><code>clock</code></em> :</span></p></td>
1262 <td>The <a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> to get a periodic notification id from</td>
1263 </tr>
1264 <tr>
1265 <td><p><span class="term"><em class="parameter"><code>start_time</code></em> :</span></p></td>
1266 <td>the requested start time</td>
1267 </tr>
1268 <tr>
1269 <td><p><span class="term"><em class="parameter"><code>interval</code></em> :</span></p></td>
1270 <td>the requested interval</td>
1271 </tr>
1272 <tr>
1273 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1274 <td>a <a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> that can be used to request the
1275 time notification.
1276 MT safe. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
1277 </td>
1278 </tr>
1279 </tbody>
1280 </table></div>
1281 </div>
1282 <hr>
1283 <div class="refsect2">
1284 <a name="gst-clock-single-shot-id-reinit"></a><h3>gst_clock_single_shot_id_reinit ()</h3>
1285 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gst_clock_single_shot_id_reinit     (<em class="parameter"><code><a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> *clock</code></em>,
1286                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> id</code></em>,
1287                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> time</code></em>);</pre>
1288 <p>
1289 Reinitializes the provided single shot <em class="parameter"><code>id</code></em> to the provided time. Does not
1290 modify the reference count.
1291 </p>
1292 <div class="variablelist"><table border="0">
1293 <col align="left" valign="top">
1294 <tbody>
1295 <tr>
1296 <td><p><span class="term"><em class="parameter"><code>clock</code></em> :</span></p></td>
1297 <td>a <a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a>
1298 </td>
1299 </tr>
1300 <tr>
1301 <td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
1302 <td>a <a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a>
1303 </td>
1304 </tr>
1305 <tr>
1306 <td><p><span class="term"><em class="parameter"><code>time</code></em> :</span></p></td>
1307 <td>The requested time.</td>
1308 </tr>
1309 <tr>
1310 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1311 <td>
1312 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the GstClockID could be reinitialized to the provided
1313 <em class="parameter"><code>time</code></em>, else <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</td>
1314 </tr>
1315 </tbody>
1316 </table></div>
1317 <p class="since">Since 0.10.32</p>
1318 </div>
1319 <hr>
1320 <div class="refsect2">
1321 <a name="gst-clock-periodic-id-reinit"></a><h3>gst_clock_periodic_id_reinit ()</h3>
1322 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gst_clock_periodic_id_reinit        (<em class="parameter"><code><a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> *clock</code></em>,
1323                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> id</code></em>,
1324                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> start_time</code></em>,
1325                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> interval</code></em>);</pre>
1326 <p>
1327 Reinitializes the provided periodic <em class="parameter"><code>id</code></em> to the provided start time and
1328 interval. Does not modify the reference count.
1329 </p>
1330 <div class="variablelist"><table border="0">
1331 <col align="left" valign="top">
1332 <tbody>
1333 <tr>
1334 <td><p><span class="term"><em class="parameter"><code>clock</code></em> :</span></p></td>
1335 <td>a <a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a>
1336 </td>
1337 </tr>
1338 <tr>
1339 <td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
1340 <td>a <a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a>
1341 </td>
1342 </tr>
1343 <tr>
1344 <td><p><span class="term"><em class="parameter"><code>start_time</code></em> :</span></p></td>
1345 <td>the requested start time</td>
1346 </tr>
1347 <tr>
1348 <td><p><span class="term"><em class="parameter"><code>interval</code></em> :</span></p></td>
1349 <td>the requested interval</td>
1350 </tr>
1351 <tr>
1352 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1353 <td>
1354 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the GstClockID could be reinitialized to the provided
1355 <em class="parameter"><code>time</code></em>, else <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</td>
1356 </tr>
1357 </tbody>
1358 </table></div>
1359 <p class="since">Since 0.10.33</p>
1360 </div>
1361 <hr>
1362 <div class="refsect2">
1363 <a name="gst-clock-get-internal-time"></a><h3>gst_clock_get_internal_time ()</h3>
1364 <pre class="programlisting"><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="returnvalue">GstClockTime</span></a>        gst_clock_get_internal_time         (<em class="parameter"><code><a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> *clock</code></em>);</pre>
1365 <p>
1366 Gets the current internal time of the given clock. The time is returned
1367 unadjusted for the offset and the rate.
1368 </p>
1369 <div class="variablelist"><table border="0">
1370 <col align="left" valign="top">
1371 <tbody>
1372 <tr>
1373 <td><p><span class="term"><em class="parameter"><code>clock</code></em> :</span></p></td>
1374 <td>a <a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> to query</td>
1375 </tr>
1376 <tr>
1377 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1378 <td>the internal time of the clock. Or GST_CLOCK_TIME_NONE when
1379 given invalid input.
1380 MT safe.</td>
1381 </tr>
1382 </tbody>
1383 </table></div>
1384 </div>
1385 <hr>
1386 <div class="refsect2">
1387 <a name="gst-clock-adjust-unlocked"></a><h3>gst_clock_adjust_unlocked ()</h3>
1388 <pre class="programlisting"><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="returnvalue">GstClockTime</span></a>        gst_clock_adjust_unlocked           (<em class="parameter"><code><a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> *clock</code></em>,
1389                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> internal</code></em>);</pre>
1390 <p>
1391 Converts the given <em class="parameter"><code>internal</code></em> clock time to the external time, adjusting for the
1392 rate and reference time set with <a class="link" href="GstClock.html#gst-clock-set-calibration" title="gst_clock_set_calibration ()"><code class="function">gst_clock_set_calibration()</code></a> and making sure
1393 that the returned time is increasing. This function should be called with the
1394 clock's OBJECT_LOCK held and is mainly used by clock subclasses.
1395 </p>
1396 <p>
1397 This function is the reverse of <a class="link" href="GstClock.html#gst-clock-unadjust-unlocked" title="gst_clock_unadjust_unlocked ()"><code class="function">gst_clock_unadjust_unlocked()</code></a>.
1398 </p>
1399 <div class="variablelist"><table border="0">
1400 <col align="left" valign="top">
1401 <tbody>
1402 <tr>
1403 <td><p><span class="term"><em class="parameter"><code>clock</code></em> :</span></p></td>
1404 <td>a <a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> to use</td>
1405 </tr>
1406 <tr>
1407 <td><p><span class="term"><em class="parameter"><code>internal</code></em> :</span></p></td>
1408 <td>a clock time</td>
1409 </tr>
1410 <tr>
1411 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1412 <td>the converted time of the clock.</td>
1413 </tr>
1414 </tbody>
1415 </table></div>
1416 </div>
1417 <hr>
1418 <div class="refsect2">
1419 <a name="gst-clock-unadjust-unlocked"></a><h3>gst_clock_unadjust_unlocked ()</h3>
1420 <pre class="programlisting"><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="returnvalue">GstClockTime</span></a>        gst_clock_unadjust_unlocked         (<em class="parameter"><code><a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> *clock</code></em>,
1421                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> external</code></em>);</pre>
1422 <p>
1423 Converts the given <em class="parameter"><code>external</code></em> clock time to the internal time of <em class="parameter"><code>clock</code></em>,
1424 using the rate and reference time set with <a class="link" href="GstClock.html#gst-clock-set-calibration" title="gst_clock_set_calibration ()"><code class="function">gst_clock_set_calibration()</code></a>.
1425 This function should be called with the clock's OBJECT_LOCK held and
1426 is mainly used by clock subclasses.
1427 </p>
1428 <p>
1429 This function is the reverse of <a class="link" href="GstClock.html#gst-clock-adjust-unlocked" title="gst_clock_adjust_unlocked ()"><code class="function">gst_clock_adjust_unlocked()</code></a>.
1430 </p>
1431 <div class="variablelist"><table border="0">
1432 <col align="left" valign="top">
1433 <tbody>
1434 <tr>
1435 <td><p><span class="term"><em class="parameter"><code>clock</code></em> :</span></p></td>
1436 <td>a <a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> to use</td>
1437 </tr>
1438 <tr>
1439 <td><p><span class="term"><em class="parameter"><code>external</code></em> :</span></p></td>
1440 <td>an external clock time</td>
1441 </tr>
1442 <tr>
1443 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1444 <td>the internal time of the clock corresponding to <em class="parameter"><code>external</code></em>.</td>
1445 </tr>
1446 </tbody>
1447 </table></div>
1448 <p class="since">Since 0.10.13</p>
1449 </div>
1450 <hr>
1451 <div class="refsect2">
1452 <a name="gst-clock-get-calibration"></a><h3>gst_clock_get_calibration ()</h3>
1453 <pre class="programlisting"><span class="returnvalue">void</span>                gst_clock_get_calibration           (<em class="parameter"><code><a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> *clock</code></em>,
1454                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> *internal</code></em>,
1455                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> *external</code></em>,
1456                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> *rate_num</code></em>,
1457                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> *rate_denom</code></em>);</pre>
1458 <p>
1459 Gets the internal rate and reference time of <em class="parameter"><code>clock</code></em>. See
1460 <a class="link" href="GstClock.html#gst-clock-set-calibration" title="gst_clock_set_calibration ()"><code class="function">gst_clock_set_calibration()</code></a> for more information.
1461 </p>
1462 <p>
1463 <em class="parameter"><code>internal</code></em>, <em class="parameter"><code>external</code></em>, <em class="parameter"><code>rate_num</code></em>, and <em class="parameter"><code>rate_denom</code></em> can be left <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the
1464 caller is not interested in the values.
1465 </p>
1466 <p>
1467 MT safe.
1468 </p>
1469 <div class="variablelist"><table border="0">
1470 <col align="left" valign="top">
1471 <tbody>
1472 <tr>
1473 <td><p><span class="term"><em class="parameter"><code>clock</code></em> :</span></p></td>
1474 <td>a <a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a>
1475 </td>
1476 </tr>
1477 <tr>
1478 <td><p><span class="term"><em class="parameter"><code>internal</code></em> :</span></p></td>
1479 <td>a location to store the internal time. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
1480 </td>
1481 </tr>
1482 <tr>
1483 <td><p><span class="term"><em class="parameter"><code>external</code></em> :</span></p></td>
1484 <td>a location to store the external time. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
1485 </td>
1486 </tr>
1487 <tr>
1488 <td><p><span class="term"><em class="parameter"><code>rate_num</code></em> :</span></p></td>
1489 <td>a location to store the rate numerator. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
1490 </td>
1491 </tr>
1492 <tr>
1493 <td><p><span class="term"><em class="parameter"><code>rate_denom</code></em> :</span></p></td>
1494 <td>a location to store the rate denominator. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
1495 </td>
1496 </tr>
1497 </tbody>
1498 </table></div>
1499 </div>
1500 <hr>
1501 <div class="refsect2">
1502 <a name="gst-clock-set-calibration"></a><h3>gst_clock_set_calibration ()</h3>
1503 <pre class="programlisting"><span class="returnvalue">void</span>                gst_clock_set_calibration           (<em class="parameter"><code><a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> *clock</code></em>,
1504                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> internal</code></em>,
1505                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> external</code></em>,
1506                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> rate_num</code></em>,
1507                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> rate_denom</code></em>);</pre>
1508 <p>
1509 Adjusts the rate and time of <em class="parameter"><code>clock</code></em>. A rate of 1/1 is the normal speed of
1510 the clock. Values bigger than 1/1 make the clock go faster.
1511 </p>
1512 <p>
1513 <em class="parameter"><code>internal</code></em> and <em class="parameter"><code>external</code></em> are calibration parameters that arrange that
1514 <a class="link" href="GstClock.html#gst-clock-get-time" title="gst_clock_get_time ()"><code class="function">gst_clock_get_time()</code></a> should have been <em class="parameter"><code>external</code></em> at internal time <em class="parameter"><code>internal</code></em>.
1515 This internal time should not be in the future; that is, it should be less
1516 than the value of <a class="link" href="GstClock.html#gst-clock-get-internal-time" title="gst_clock_get_internal_time ()"><code class="function">gst_clock_get_internal_time()</code></a> when this function is called.
1517 </p>
1518 <p>
1519 Subsequent calls to <a class="link" href="GstClock.html#gst-clock-get-time" title="gst_clock_get_time ()"><code class="function">gst_clock_get_time()</code></a> will return clock times computed as
1520 follows:
1521 </p>
1522 <p>
1523 </p>
1524 <pre class="programlisting">
1525   time = (internal_time - internal) * rate_num / rate_denom + external
1526 </pre>
1527 <p>
1528 </p>
1529 <p>
1530 This formula is implemented in <a class="link" href="GstClock.html#gst-clock-adjust-unlocked" title="gst_clock_adjust_unlocked ()"><code class="function">gst_clock_adjust_unlocked()</code></a>. Of course, it
1531 tries to do the integer arithmetic as precisely as possible.
1532 </p>
1533 <p>
1534 Note that <a class="link" href="GstClock.html#gst-clock-get-time" title="gst_clock_get_time ()"><code class="function">gst_clock_get_time()</code></a> always returns increasing values so when you
1535 move the clock backwards, <a class="link" href="GstClock.html#gst-clock-get-time" title="gst_clock_get_time ()"><code class="function">gst_clock_get_time()</code></a> will report the previous value
1536 until the clock catches up.
1537 </p>
1538 <p>
1539 MT safe.
1540 </p>
1541 <div class="variablelist"><table border="0">
1542 <col align="left" valign="top">
1543 <tbody>
1544 <tr>
1545 <td><p><span class="term"><em class="parameter"><code>clock</code></em> :</span></p></td>
1546 <td>a <a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> to calibrate</td>
1547 </tr>
1548 <tr>
1549 <td><p><span class="term"><em class="parameter"><code>internal</code></em> :</span></p></td>
1550 <td>a reference internal time</td>
1551 </tr>
1552 <tr>
1553 <td><p><span class="term"><em class="parameter"><code>external</code></em> :</span></p></td>
1554 <td>a reference external time</td>
1555 </tr>
1556 <tr>
1557 <td><p><span class="term"><em class="parameter"><code>rate_num</code></em> :</span></p></td>
1558 <td>the numerator of the rate of the clock relative to its
1559 internal time</td>
1560 </tr>
1561 <tr>
1562 <td><p><span class="term"><em class="parameter"><code>rate_denom</code></em> :</span></p></td>
1563 <td>the denominator of the rate of the clock</td>
1564 </tr>
1565 </tbody>
1566 </table></div>
1567 </div>
1568 <hr>
1569 <div class="refsect2">
1570 <a name="gst-clock-id-get-time"></a><h3>gst_clock_id_get_time ()</h3>
1571 <pre class="programlisting"><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="returnvalue">GstClockTime</span></a>        gst_clock_id_get_time               (<em class="parameter"><code><a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> id</code></em>);</pre>
1572 <p>
1573 Get the time of the clock ID
1574 </p>
1575 <div class="variablelist"><table border="0">
1576 <col align="left" valign="top">
1577 <tbody>
1578 <tr>
1579 <td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
1580 <td>The <a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> to query</td>
1581 </tr>
1582 <tr>
1583 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1584 <td>the time of the given clock id.
1585 MT safe.</td>
1586 </tr>
1587 </tbody>
1588 </table></div>
1589 </div>
1590 <hr>
1591 <div class="refsect2">
1592 <a name="gst-clock-id-wait"></a><h3>gst_clock_id_wait ()</h3>
1593 <pre class="programlisting"><a class="link" href="GstClock.html#GstClockReturn" title="enum GstClockReturn"><span class="returnvalue">GstClockReturn</span></a>      gst_clock_id_wait                   (<em class="parameter"><code><a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> id</code></em>,
1594                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTimeDiff" title="GstClockTimeDiff"><span class="type">GstClockTimeDiff</span></a> *jitter</code></em>);</pre>
1595 <p>
1596 Perform a blocking wait on <em class="parameter"><code>id</code></em>. 
1597 <em class="parameter"><code>id</code></em> should have been created with <a class="link" href="GstClock.html#gst-clock-new-single-shot-id" title="gst_clock_new_single_shot_id ()"><code class="function">gst_clock_new_single_shot_id()</code></a>
1598 or <a class="link" href="GstClock.html#gst-clock-new-periodic-id" title="gst_clock_new_periodic_id ()"><code class="function">gst_clock_new_periodic_id()</code></a> and should not have been unscheduled
1599 with a call to <a class="link" href="GstClock.html#gst-clock-id-unschedule" title="gst_clock_id_unschedule ()"><code class="function">gst_clock_id_unschedule()</code></a>. 
1600 </p>
1601 <p>
1602 If the <em class="parameter"><code>jitter</code></em> argument is not <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> and this function returns <a class="link" href="GstClock.html#GST-CLOCK-OK:CAPS"><span class="type">GST_CLOCK_OK</span></a>
1603 or <a class="link" href="GstClock.html#GST-CLOCK-EARLY:CAPS"><span class="type">GST_CLOCK_EARLY</span></a>, it will contain the difference
1604 against the clock and the time of <em class="parameter"><code>id</code></em> when this method was
1605 called. 
1606 Positive values indicate how late <em class="parameter"><code>id</code></em> was relative to the clock
1607 (in which case this function will return <a class="link" href="GstClock.html#GST-CLOCK-EARLY:CAPS"><span class="type">GST_CLOCK_EARLY</span></a>). 
1608 Negative values indicate how much time was spent waiting on the clock 
1609 before this function returned.
1610 </p>
1611 <div class="variablelist"><table border="0">
1612 <col align="left" valign="top">
1613 <tbody>
1614 <tr>
1615 <td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
1616 <td>The <a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> to wait on</td>
1617 </tr>
1618 <tr>
1619 <td><p><span class="term"><em class="parameter"><code>jitter</code></em> :</span></p></td>
1620 <td>a pointer that will contain the jitter,
1621 can be <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
1622 </td>
1623 </tr>
1624 <tr>
1625 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1626 <td>the result of the blocking wait. <a class="link" href="GstClock.html#GST-CLOCK-EARLY:CAPS"><span class="type">GST_CLOCK_EARLY</span></a> will be returned
1627 if the current clock time is past the time of <em class="parameter"><code>id</code></em>, <a class="link" href="GstClock.html#GST-CLOCK-OK:CAPS"><span class="type">GST_CLOCK_OK</span></a> if
1628 <em class="parameter"><code>id</code></em> was scheduled in time. <a class="link" href="GstClock.html#GST-CLOCK-UNSCHEDULED:CAPS"><span class="type">GST_CLOCK_UNSCHEDULED</span></a> if <em class="parameter"><code>id</code></em> was
1629 unscheduled with <a class="link" href="GstClock.html#gst-clock-id-unschedule" title="gst_clock_id_unschedule ()"><code class="function">gst_clock_id_unschedule()</code></a>.
1630 MT safe.</td>
1631 </tr>
1632 </tbody>
1633 </table></div>
1634 </div>
1635 <hr>
1636 <div class="refsect2">
1637 <a name="gst-clock-id-wait-async"></a><h3>gst_clock_id_wait_async ()</h3>
1638 <pre class="programlisting"><a class="link" href="GstClock.html#GstClockReturn" title="enum GstClockReturn"><span class="returnvalue">GstClockReturn</span></a>      gst_clock_id_wait_async             (<em class="parameter"><code><a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> id</code></em>,
1639                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockCallback" title="GstClockCallback ()"><span class="type">GstClockCallback</span></a> func</code></em>,
1640                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
1641 <p>
1642 Register a callback on the given <a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> <em class="parameter"><code>id</code></em> with the given
1643 function and user_data. When passing a <a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> with an invalid
1644 time to this function, the callback will be called immediately
1645 with  a time set to GST_CLOCK_TIME_NONE. The callback will
1646 be called when the time of <em class="parameter"><code>id</code></em> has been reached.
1647 </p>
1648 <p>
1649 The callback <em class="parameter"><code>func</code></em> can be invoked from any thread, either provided by the
1650 core or from a streaming thread. The application should be prepared for this.
1651 </p>
1652 <div class="variablelist"><table border="0">
1653 <col align="left" valign="top">
1654 <tbody>
1655 <tr>
1656 <td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
1657 <td>a <a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> to wait on</td>
1658 </tr>
1659 <tr>
1660 <td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
1661 <td>The callback function</td>
1662 </tr>
1663 <tr>
1664 <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
1665 <td>User data passed in the callback</td>
1666 </tr>
1667 <tr>
1668 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1669 <td>the result of the non blocking wait.
1670 MT safe.</td>
1671 </tr>
1672 </tbody>
1673 </table></div>
1674 </div>
1675 <hr>
1676 <div class="refsect2">
1677 <a name="gst-clock-id-wait-async-full"></a><h3>gst_clock_id_wait_async_full ()</h3>
1678 <pre class="programlisting"><a class="link" href="GstClock.html#GstClockReturn" title="enum GstClockReturn"><span class="returnvalue">GstClockReturn</span></a>      gst_clock_id_wait_async_full        (<em class="parameter"><code><a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> id</code></em>,
1679                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockCallback" title="GstClockCallback ()"><span class="type">GstClockCallback</span></a> func</code></em>,
1680                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
1681                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> destroy_data</code></em>);</pre>
1682 <p>
1683 Register a callback on the given <a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> <em class="parameter"><code>id</code></em> with the given
1684 function and user_data. When passing a <a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> with an invalid
1685 time to this function, the callback will be called immediately
1686 with  a time set to GST_CLOCK_TIME_NONE. The callback will
1687 be called when the time of <em class="parameter"><code>id</code></em> has been reached.
1688 </p>
1689 <p>
1690 The callback <em class="parameter"><code>func</code></em> can be invoked from any thread, either provided by the
1691 core or from a streaming thread. The application should be prepared for this.
1692 </p>
1693 <div class="variablelist"><table border="0">
1694 <col align="left" valign="top">
1695 <tbody>
1696 <tr>
1697 <td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
1698 <td>a <a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> to wait on</td>
1699 </tr>
1700 <tr>
1701 <td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
1702 <td>The callback function</td>
1703 </tr>
1704 <tr>
1705 <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
1706 <td>User data passed in the callback</td>
1707 </tr>
1708 <tr>
1709 <td><p><span class="term"><em class="parameter"><code>destroy_data</code></em> :</span></p></td>
1710 <td>
1711 <a href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> for user_data</td>
1712 </tr>
1713 <tr>
1714 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1715 <td>the result of the non blocking wait.
1716 MT safe.</td>
1717 </tr>
1718 </tbody>
1719 </table></div>
1720 <p class="since">Since 0.10.30</p>
1721 </div>
1722 <hr>
1723 <div class="refsect2">
1724 <a name="gst-clock-id-unschedule"></a><h3>gst_clock_id_unschedule ()</h3>
1725 <pre class="programlisting"><span class="returnvalue">void</span>                gst_clock_id_unschedule             (<em class="parameter"><code><a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> id</code></em>);</pre>
1726 <p>
1727 Cancel an outstanding request with <em class="parameter"><code>id</code></em>. This can either
1728 be an outstanding async notification or a pending sync notification.
1729 After this call, <em class="parameter"><code>id</code></em> cannot be used anymore to receive sync or
1730 async notifications, you need to create a new <a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a>.
1731 </p>
1732 <p>
1733 MT safe.
1734 </p>
1735 <div class="variablelist"><table border="0">
1736 <col align="left" valign="top">
1737 <tbody><tr>
1738 <td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
1739 <td>The id to unschedule</td>
1740 </tr></tbody>
1741 </table></div>
1742 </div>
1743 <hr>
1744 <div class="refsect2">
1745 <a name="gst-clock-id-compare-func"></a><h3>gst_clock_id_compare_func ()</h3>
1746 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                gst_clock_id_compare_func           (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> id1</code></em>,
1747                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> id2</code></em>);</pre>
1748 <p>
1749 Compares the two <a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> instances. This function can be used
1750 as a GCompareFunc when sorting ids.
1751 </p>
1752 <div class="variablelist"><table border="0">
1753 <col align="left" valign="top">
1754 <tbody>
1755 <tr>
1756 <td><p><span class="term"><em class="parameter"><code>id1</code></em> :</span></p></td>
1757 <td>A <a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a>
1758 </td>
1759 </tr>
1760 <tr>
1761 <td><p><span class="term"><em class="parameter"><code>id2</code></em> :</span></p></td>
1762 <td>A <a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> to compare with</td>
1763 </tr>
1764 <tr>
1765 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1766 <td>negative value if a &lt; b; zero if a = b; positive value if a &gt; b
1767 MT safe.</td>
1768 </tr>
1769 </tbody>
1770 </table></div>
1771 </div>
1772 <hr>
1773 <div class="refsect2">
1774 <a name="gst-clock-id-ref"></a><h3>gst_clock_id_ref ()</h3>
1775 <pre class="programlisting"><a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="returnvalue">GstClockID</span></a>          gst_clock_id_ref                    (<em class="parameter"><code><a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> id</code></em>);</pre>
1776 <p>
1777 Increase the refcount of given <em class="parameter"><code>id</code></em>.
1778 </p>
1779 <div class="variablelist"><table border="0">
1780 <col align="left" valign="top">
1781 <tbody>
1782 <tr>
1783 <td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
1784 <td>The <a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> to ref</td>
1785 </tr>
1786 <tr>
1787 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1788 <td>The same <a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> with increased refcount.
1789 MT safe. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
1790 </td>
1791 </tr>
1792 </tbody>
1793 </table></div>
1794 </div>
1795 <hr>
1796 <div class="refsect2">
1797 <a name="gst-clock-id-unref"></a><h3>gst_clock_id_unref ()</h3>
1798 <pre class="programlisting"><span class="returnvalue">void</span>                gst_clock_id_unref                  (<em class="parameter"><code><a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> id</code></em>);</pre>
1799 <p>
1800 Unref given <em class="parameter"><code>id</code></em>. When the refcount reaches 0 the
1801 <a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> will be freed.
1802 </p>
1803 <p>
1804 MT safe.
1805 </p>
1806 <div class="variablelist"><table border="0">
1807 <col align="left" valign="top">
1808 <tbody><tr>
1809 <td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
1810 <td>The <a class="link" href="GstClock.html#GstClockID" title="GstClockID"><span class="type">GstClockID</span></a> to unref. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
1811 </td>
1812 </tr></tbody>
1813 </table></div>
1814 </div>
1815 </div>
1816 <div class="refsect1">
1817 <a name="GstClock.property-details"></a><h2>Property Details</h2>
1818 <div class="refsect2">
1819 <a name="GstClock--stats"></a><h3>The <code class="literal">"stats"</code> property</h3>
1820 <pre class="programlisting">  "stats"                    <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write</pre>
1821 <p>Enable clock stats (unimplemented).</p>
1822 <p>Default value: FALSE</p>
1823 </div>
1824 <hr>
1825 <div class="refsect2">
1826 <a name="GstClock--timeout"></a><h3>The <code class="literal">"timeout"</code> property</h3>
1827 <pre class="programlisting">  "timeout"                  <span class="type">guint64</span>               : Read / Write</pre>
1828 <p>The amount of time, in nanoseconds, to sample master and slave clocks.</p>
1829 <p>Default value: 100000000</p>
1830 </div>
1831 <hr>
1832 <div class="refsect2">
1833 <a name="GstClock--window-size"></a><h3>The <code class="literal">"window-size"</code> property</h3>
1834 <pre class="programlisting">  "window-size"              <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>                  : Read / Write</pre>
1835 <p>The size of the window used to calculate rate and offset.</p>
1836 <p>Allowed values: [2,1024]</p>
1837 <p>Default value: 32</p>
1838 </div>
1839 <hr>
1840 <div class="refsect2">
1841 <a name="GstClock--window-threshold"></a><h3>The <code class="literal">"window-threshold"</code> property</h3>
1842 <pre class="programlisting">  "window-threshold"         <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>                  : Read / Write</pre>
1843 <p>The threshold to start calculating rate and offset.</p>
1844 <p>Allowed values: [2,1024]</p>
1845 <p>Default value: 4</p>
1846 </div>
1847 </div>
1848 <div class="refsect1">
1849 <a name="GstClock.see-also"></a><h2>See Also</h2>
1850 <a class="link" href="GstSystemClock.html" title="GstSystemClock"><span class="type">GstSystemClock</span></a>, <a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a>
1851 </div>
1852 </div>
1853 <div class="footer">
1854 <hr>
1855           Generated by GTK-Doc V1.18</div>
1856 </body>
1857 </html>