fix up docs remove props commit automatic moving and removing of documentation
[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 The GstClock object
235 </para>
236
237
238 <!-- ##### FUNCTION gst_clock_set_speed ##### -->
239 <para>
240
241 </para>
242
243 @clock: 
244 @speed: 
245 @Returns: 
246
247
248 <!-- ##### FUNCTION gst_clock_get_speed ##### -->
249 <para>
250
251 </para>
252
253 @clock: 
254 @Returns: 
255
256
257 <!-- ##### FUNCTION gst_clock_set_resolution ##### -->
258 <para>
259
260 </para>
261
262 @clock: 
263 @resolution: 
264 @Returns: 
265
266
267 <!-- ##### FUNCTION gst_clock_get_resolution ##### -->
268 <para>
269
270 </para>
271
272 @clock: 
273 @Returns: 
274
275
276 <!-- ##### FUNCTION gst_clock_set_active ##### -->
277 <para>
278
279 </para>
280
281 @clock: 
282 @active: 
283
284
285 <!-- ##### FUNCTION gst_clock_is_active ##### -->
286 <para>
287
288 </para>
289
290 @clock: 
291 @Returns: 
292
293
294 <!-- ##### FUNCTION gst_clock_reset ##### -->
295 <para>
296
297 </para>
298
299 @clock: 
300
301
302 <!-- ##### FUNCTION gst_clock_handle_discont ##### -->
303 <para>
304
305 </para>
306
307 @clock: 
308 @time: 
309 @Returns: 
310
311
312 <!-- ##### FUNCTION gst_clock_get_time ##### -->
313 <para>
314
315 </para>
316
317 @clock: 
318 @Returns: 
319
320
321 <!-- ##### FUNCTION gst_clock_get_next_id ##### -->
322 <para>
323
324 </para>
325
326 @clock: 
327 @Returns: 
328
329
330 <!-- ##### FUNCTION gst_clock_new_single_shot_id ##### -->
331 <para>
332
333 </para>
334
335 @clock: 
336 @time: 
337 @Returns: 
338
339
340 <!-- ##### FUNCTION gst_clock_new_periodic_id ##### -->
341 <para>
342
343 </para>
344
345 @clock: 
346 @start_time: 
347 @interval: 
348 @Returns: 
349
350
351 <!-- ##### FUNCTION gst_clock_id_get_time ##### -->
352 <para>
353
354 </para>
355
356 @id: 
357 @Returns: 
358
359
360 <!-- ##### FUNCTION gst_clock_id_wait ##### -->
361 <para>
362
363 </para>
364
365 @id: 
366 @jitter: 
367 @Returns: 
368
369
370 <!-- ##### FUNCTION gst_clock_id_wait_async ##### -->
371 <para>
372
373 </para>
374
375 @id: 
376 @func: 
377 @user_data: 
378 @Returns: 
379
380
381 <!-- ##### FUNCTION gst_clock_id_unschedule ##### -->
382 <para>
383
384 </para>
385
386 @id: 
387
388
389 <!-- ##### FUNCTION gst_clock_id_unlock ##### -->
390 <para>
391
392 </para>
393
394 @id: 
395
396
397 <!-- ##### FUNCTION gst_clock_id_free ##### -->
398 <para>
399
400 </para>
401
402 @id: 
403
404
405 <!-- ##### ARG GstClock:max-diff ##### -->
406 <para>
407 Maximum allowed diff for clock sync requests against the real time.
408 </para>
409
410 <!-- ##### ARG GstClock:stats ##### -->
411 <para>
412 Boolean property to activate stat generation on the clock.
413 </para>
414