gst-indent run on core
[platform/upstream/gstreamer.git] / docs / gst / tmpl / gstclock.sgml
1 <!-- ##### SECTION Title ##### -->
2 GstClock
3
4 <!-- ##### SECTION Short_Description ##### -->
5 Abstract class for global clocks
6
7 <!-- ##### SECTION Long_Description ##### -->
8 <para>
9 GStreamer uses a global clock to synchronise the plugins in a pipeline.
10 Different clock implementations are possible by implementing this abstract
11 base class.
12 </para>
13 <para>
14 The clock time is always measured in nanoseconds, with the clock being set
15 to 0 when the pipeline goes to READY. Usually all renderers sync to the global
16 clock so that the clock is always a good measure of the time in the pipeline.
17 </para>
18
19 <!-- ##### SECTION See_Also ##### -->
20 <para>
21 #GstSystemClock
22 </para>
23
24 <!-- ##### TYPEDEF GstClockTime ##### -->
25 <para>
26 A datatype to hold a time, measured in nanoseconds.
27 </para>
28
29
30 <!-- ##### TYPEDEF GstClockTimeDiff ##### -->
31 <para>
32 A datatype to hold a timedifference, measured in nanoseconds.
33 </para>
34
35
36 <!-- ##### TYPEDEF GstClockID ##### -->
37 <para>
38 A detatype to hold the handle to an outstanding async clock callback
39 </para>
40
41
42 <!-- ##### MACRO GST_CLOCK_TIME_NONE ##### -->
43 <para>
44 Constant to define an undefined clock time
45 </para>
46
47
48
49 <!-- ##### MACRO GST_SECOND ##### -->
50 <para>
51 Constant that defines one GStreamer second
52 </para>
53
54
55
56 <!-- ##### MACRO GST_MSECOND ##### -->
57 <para>
58 Constant that defines one GStreamer millisecond
59 </para>
60
61
62
63 <!-- ##### MACRO GST_USECOND ##### -->
64 <para>
65 Constant that defines one GStreamer microsecond
66 </para>
67
68
69
70 <!-- ##### MACRO GST_NSECOND ##### -->
71 <para>
72 Constant that defines one GStreamer nanosecond
73 </para>
74
75
76
77 <!-- ##### MACRO GST_CLOCK_DIFF ##### -->
78 <para>
79 Calculate a difference between to clock times.
80 </para>
81
82 @s: the first time
83 @e: the second time
84
85
86 <!-- ##### MACRO GST_TIMEVAL_TO_TIME ##### -->
87 <para>
88 Convert a GTimeVal to a GstClockTime
89 </para>
90
91 @tv: the timeval to convert
92
93
94 <!-- ##### MACRO GST_TIME_TO_TIMEVAL ##### -->
95 <para>
96 Convert a GstClockTime to a GTimeVal
97 </para>
98
99 @t: The GstClockTime to convert
100 @tv: The target timeval
101
102
103 <!-- ##### STRUCT GstClockEntry ##### -->
104 <para>
105 All pending timeouts or periodic notifies are converted into
106 an entry.
107 </para>
108
109 @clock: 
110 @type: 
111 @time: 
112 @interval: 
113 @status: 
114 @func: 
115 @user_data: 
116
117 <!-- ##### USER_FUNCTION GstClockCallback ##### -->
118 <para>
119 The function prototype of the callback.
120 </para>
121
122 @clock: The clock that triggered the callback
123 @time: The time it was triggered
124 @id: The id that expired
125 @user_data: user data passed in the async_wait call
126 @Returns: 
127
128
129 <!-- ##### ENUM GstClockEntryStatus ##### -->
130 <para>
131 The status of a clock timeout.
132 </para>
133
134 @GST_CLOCK_ENTRY_OK: timeout happened
135 @GST_CLOCK_ENTRY_EARLY: request for timout that has been passed
136 @GST_CLOCK_ENTRY_RESTART: need to restart the timeout request
137
138 <!-- ##### ENUM GstClockEntryType ##### -->
139 <para>
140 The type of the clock entry
141 </para>
142
143 @GST_CLOCK_ENTRY_SINGLE: a single shot timeout
144 @GST_CLOCK_ENTRY_PERIODIC: a periodic timeout request
145
146 <!-- ##### MACRO GST_CLOCK_ENTRY_TRACE_NAME ##### -->
147 <para>
148 The name used for tracing clock entry allocations.
149 </para>
150
151
152
153 <!-- ##### MACRO GST_CLOCK_ENTRY ##### -->
154 <para>
155 Cast to a clock entry
156 </para>
157
158 @entry: the entry to cast
159
160
161 <!-- ##### MACRO GST_CLOCK_ENTRY_CLOCK ##### -->
162 <para>
163 Get the owner clock of the entry
164 </para>
165
166 @entry: the entry to query
167
168
169 <!-- ##### MACRO GST_CLOCK_ENTRY_TYPE ##### -->
170 <para>
171 Get the type of the clock entry
172 </para>
173
174 @entry: the entry to query
175
176
177 <!-- ##### MACRO GST_CLOCK_ENTRY_TIME ##### -->
178 <para>
179 Get the requested time of this entry
180 </para>
181
182 @entry: the entry to query
183
184
185 <!-- ##### MACRO GST_CLOCK_ENTRY_INTERVAL ##### -->
186 <para>
187 Get the interval of this periodic entry
188 </para>
189
190 @entry: the entry to query
191
192
193 <!-- ##### MACRO GST_CLOCK_ENTRY_STATUS ##### -->
194 <para>
195 The status of the entry
196 </para>
197
198 @entry: the entry to query
199
200
201 <!-- ##### ENUM GstClockReturn ##### -->
202 <para>
203 The return value of a clock operation.
204 </para>
205
206 @GST_CLOCK_STOPPED: The clock is stopped.
207 @GST_CLOCK_TIMEOUT: The operation timed out.
208 @GST_CLOCK_EARLY: The operation was scheduled too late.
209 @GST_CLOCK_ERROR: An error occured
210 @GST_CLOCK_UNSUPPORTED: Operation is not supported
211
212 <!-- ##### ENUM GstClockFlags ##### -->
213 <para>
214 The capabilities of this clock
215 </para>
216
217 @GST_CLOCK_FLAG_CAN_DO_SINGLE_SYNC: This clock can do a single sync timeut request
218 @GST_CLOCK_FLAG_CAN_DO_SINGLE_ASYNC: This clock can do a single async timeout request
219 @GST_CLOCK_FLAG_CAN_DO_PERIODIC_SYNC: This clock can do sync periodic timeout requests
220 @GST_CLOCK_FLAG_CAN_DO_PERIODIC_ASYNC: This clock can do async periodic timeout callbacks
221 @GST_CLOCK_FLAG_CAN_SET_RESOLUTION: The resolution of this clock can be changed
222 @GST_CLOCK_FLAG_CAN_SET_SPEED: The speed of this clock can be changed
223
224 <!-- ##### MACRO GST_CLOCK_FLAGS ##### -->
225 <para>
226 Get the clock flags
227 </para>
228
229 @clock: the clock to query
230
231
232 <!-- ##### STRUCT GstClock ##### -->
233 <para>
234
235 </para>
236
237
238 <!-- ##### ARG GstClock:event-diff ##### -->
239 <para>
240
241 </para>
242
243 <!-- ##### ARG GstClock:max-diff ##### -->
244 <para>
245 Maximum allowed diff for clock sync requests against the real time.
246 </para>
247
248 <!-- ##### ARG GstClock:stats ##### -->
249 <para>
250 Boolean property to activate stat generation on the clock.
251 </para>
252
253 <!-- ##### FUNCTION gst_clock_set_speed ##### -->
254 <para>
255
256 </para>
257
258 @clock: 
259 @speed: 
260 @Returns: 
261
262
263 <!-- ##### FUNCTION gst_clock_get_speed ##### -->
264 <para>
265
266 </para>
267
268 @clock: 
269 @Returns: 
270
271
272 <!-- ##### FUNCTION gst_clock_set_resolution ##### -->
273 <para>
274
275 </para>
276
277 @clock: 
278 @resolution: 
279 @Returns: 
280
281
282 <!-- ##### FUNCTION gst_clock_get_resolution ##### -->
283 <para>
284
285 </para>
286
287 @clock: 
288 @Returns: 
289
290
291 <!-- ##### FUNCTION gst_clock_set_active ##### -->
292 <para>
293
294 </para>
295
296 @clock: 
297 @active: 
298
299
300 <!-- ##### FUNCTION gst_clock_is_active ##### -->
301 <para>
302
303 </para>
304
305 @clock: 
306 @Returns: 
307
308
309 <!-- ##### FUNCTION gst_clock_reset ##### -->
310 <para>
311
312 </para>
313
314 @clock: 
315
316
317 <!-- ##### FUNCTION gst_clock_handle_discont ##### -->
318 <para>
319
320 </para>
321
322 @clock: 
323 @time: 
324 @Returns: 
325
326
327 <!-- ##### FUNCTION gst_clock_get_time ##### -->
328 <para>
329
330 </para>
331
332 @clock: 
333 @Returns: 
334
335
336 <!-- ##### FUNCTION gst_clock_get_next_id ##### -->
337 <para>
338
339 </para>
340
341 @clock: 
342 @Returns: 
343
344
345 <!-- ##### FUNCTION gst_clock_new_single_shot_id ##### -->
346 <para>
347
348 </para>
349
350 @clock: 
351 @time: 
352 @Returns: 
353
354
355 <!-- ##### FUNCTION gst_clock_new_periodic_id ##### -->
356 <para>
357
358 </para>
359
360 @clock: 
361 @start_time: 
362 @interval: 
363 @Returns: 
364
365
366 <!-- ##### FUNCTION gst_clock_id_get_time ##### -->
367 <para>
368
369 </para>
370
371 @id: 
372 @Returns: 
373
374
375 <!-- ##### FUNCTION gst_clock_id_wait ##### -->
376 <para>
377
378 </para>
379
380 @id: 
381 @jitter: 
382 @Returns: 
383
384
385 <!-- ##### FUNCTION gst_clock_id_wait_async ##### -->
386 <para>
387
388 </para>
389
390 @id: 
391 @func: 
392 @user_data: 
393 @Returns: 
394
395
396 <!-- ##### FUNCTION gst_clock_id_unschedule ##### -->
397 <para>
398
399 </para>
400
401 @id: 
402
403
404 <!-- ##### FUNCTION gst_clock_id_unlock ##### -->
405 <para>
406
407 </para>
408
409 @id: 
410
411
412 <!-- ##### FUNCTION gst_clock_id_free ##### -->
413 <para>
414
415 </para>
416
417 @id: 
418
419