gst/gstbin.c (sink_iterator_filter): Err... um...
[platform/upstream/gstreamer.git] / docs / gst / tmpl / gstevent.sgml
1 <!-- ##### SECTION Title ##### -->
2 GstEvent
3
4 <!-- ##### SECTION Short_Description ##### -->
5 Structure describing events that are passed up and down a pipeline
6
7 <!-- ##### SECTION Long_Description ##### -->
8 <para>
9 The event classes are used to construct and query events.
10 </para>
11
12 <para>
13 Events are usually created with gst_event_new() which takes the event type as an argument.
14 properties specific to the event can be set afterwards with the provided macros. 
15 The event should be unreferenced with gst_event_unref().
16 </para>
17 <para>
18 gst_event_new_seek() is a usually used to create a seek event and it takes the 
19 needed parameters for a seek event. 
20 </para>
21 <para>
22 gst_event_new_flush() creates a new flush event.
23 </para>
24
25 <!-- ##### SECTION See_Also ##### -->
26 <para>
27 #GstPad, #GstElement
28 </para>
29
30 <!-- ##### STRUCT GstEvent ##### -->
31 <para>
32
33 </para>
34
35 @mini_object: 
36 @type: 
37 @timestamp: 
38 @src: 
39
40 <!-- ##### ENUM GstEventType ##### -->
41 <para>
42 The different major types of events.
43 </para>
44
45 @GST_EVENT_UNKNOWN: unknown event.
46 @GST_EVENT_EOS: an end-of-stream event.
47 @GST_EVENT_FLUSH: a flush event.
48 @GST_EVENT_DISCONTINUOUS: a discontinuous event to indicate the stream has a discontinuity.
49 @GST_EVENT_QOS: a quality of service event
50 @GST_EVENT_SEEK: a seek event.
51 @GST_EVENT_SIZE: a size suggestion for a peer element
52 @GST_EVENT_RATE: adjust the output rate of an element
53 @GST_EVENT_NAVIGATION: 
54 @GST_EVENT_TAG: 
55
56 <!-- ##### MACRO GST_EVENT_ANY ##### -->
57 <para>
58
59 </para>
60
61
62
63 <!-- ##### MACRO GST_EVENT_TRACE_NAME ##### -->
64 <para>
65 The name used for memory allocation tracing
66 </para>
67
68
69
70 <!-- ##### MACRO GST_EVENT_TYPE ##### -->
71 <para>
72 Get the event type.
73 </para>
74
75 @event: The event to query.
76
77
78 <!-- ##### MACRO GST_EVENT_TIMESTAMP ##### -->
79 <para>
80 Get the timestamp of the event.
81 </para>
82
83 @event: The event to query.
84
85
86 <!-- ##### MACRO GST_EVENT_SRC ##### -->
87 <para>
88 The source object that generated this event
89 </para>
90
91 @event: The event to query
92
93
94 <!-- ##### MACRO GST_EVENT_IS_INTERRUPT ##### -->
95 <para>
96 Check if the event is an interrupt event
97 </para>
98
99 @event: The event to check
100
101
102 <!-- ##### MACRO GST_SEEK_FORMAT_SHIFT ##### -->
103 <para>
104 Shift for the format in the GstSeekType
105 </para>
106
107
108
109 <!-- ##### MACRO GST_SEEK_METHOD_SHIFT ##### -->
110 <para>
111 Shift for the method in the GstSeekType
112 </para>
113
114
115
116 <!-- ##### MACRO GST_SEEK_FLAGS_SHIFT ##### -->
117 <para>
118 Shift for the flags in the GstSeekType
119 </para>
120
121
122
123 <!-- ##### MACRO GST_SEEK_FORMAT_MASK ##### -->
124 <para>
125 Mask for the format in the GstSeekType
126 </para>
127
128
129
130 <!-- ##### MACRO GST_SEEK_METHOD_MASK ##### -->
131 <para>
132 Mask for the method in the GstSeekType
133 </para>
134
135
136
137 <!-- ##### MACRO GST_SEEK_FLAGS_MASK ##### -->
138 <para>
139 Mask for the flags in the GstSeekType
140 </para>
141
142
143
144 <!-- ##### ENUM GstEventFlag ##### -->
145 <para>
146 Event flags are used when querying for supported events
147 </para>
148
149 @GST_EVENT_FLAG_NONE: no value
150 @GST_RATE_FLAG_NEGATIVE: indicates negative rates are supported
151
152 <!-- ##### MACRO GST_EVENT_MASK_FUNCTION ##### -->
153 <para>
154 A convenience macro to create event mask functions
155 </para>
156
157 @type: The type of the first argument of the function
158 @functionname: the name of the function
159 @...: event masks, the last element is marked with 0
160
161
162 <!-- ##### ENUM GstSeekType ##### -->
163 <para>
164 The different types of seek events. When constructing a seek event a format,
165 a seek method and optional flags are OR-ed together. The seek event is then
166 inserted into the graph with #gst_pad_send_event() or #gst_element_send_event().
167
168 Following example illustrates how to insert a seek event (1 second in the stream)
169 in a pipeline.
170 <example>
171 <title>Insertion of a seek event into a pipeline</title>
172   <programlisting>
173   gboolean res;
174   GstEvent *event;
175
176   event = gst_event_new_seek (
177             GST_FORMAT_TIME |           /* seek on time */
178             GST_SEEK_METHOD_SET |       /* set the absolute position */
179             GST_SEEK_FLAG_FLUSH,        /* flush any pending data */
180             1 * GST_SECOND);            /* the seek offset (1 second) */
181
182   res = gst_element_send_event (GST_ELEMENT (osssink), event);
183   if (!res) {
184     g_warning ("seek failed");
185   }
186   </programlisting>
187 </example>
188 </para>
189
190 @GST_SEEK_METHOD_CUR: Seek to an relative position
191 @GST_SEEK_METHOD_SET: Seek to an absolute position
192 @GST_SEEK_METHOD_END: Seek relative to the end of the stream
193 @GST_SEEK_FLAG_FLUSH: Flush any pending data while seeking
194 @GST_SEEK_FLAG_ACCURATE: Seek as accurately as possible
195 @GST_SEEK_FLAG_KEY_UNIT: Seek to a nearby key unit
196 @GST_SEEK_FLAG_SEGMENT_LOOP: Loop between start and stop in a segmented seek
197
198 <!-- ##### ENUM GstSeekAccuracy ##### -->
199 <para>
200 The accuracy about a seek operation gives more information of how the seek was
201 performed, namly if the seek was accurate or fuzzy.
202 </para>
203
204 @GST_SEEK_CERTAIN: The seek was exact
205 @GST_SEEK_FUZZY: The seek was fuzzy, exact position can not be guaranteed
206
207 <!-- ##### MACRO GST_EVENT_SEEK_TYPE ##### -->
208 <para>
209 Get the seektype of the GST_EVENT_SEEK.
210 </para>
211
212 @event: The event to query.
213
214
215 <!-- ##### MACRO GST_EVENT_SEEK_FORMAT ##### -->
216 <para>
217 The format of the seek value
218 </para>
219
220 @event: The event operate on
221
222
223 <!-- ##### MACRO GST_EVENT_SEEK_METHOD ##### -->
224 <para>
225 The seek method to use as one of #GstSeekType
226 </para>
227
228 @event: The event operate on
229
230
231 <!-- ##### MACRO GST_EVENT_SEEK_FLAGS ##### -->
232 <para>
233 The optional seek flags
234 </para>
235
236 @event: The event operate on
237
238
239 <!-- ##### MACRO GST_EVENT_SEEK_OFFSET ##### -->
240 <para>
241 Get the offset of the seek event.
242 </para>
243
244 @event: The event to query.
245
246
247 <!-- ##### MACRO GST_EVENT_SEEK_ENDOFFSET ##### -->
248 <para>
249 The event stop position for a segment seek
250 </para>
251
252 @event: The event to query
253
254
255 <!-- ##### MACRO GST_EVENT_SEEK_ACCURACY ##### -->
256 <para>
257 Indicates how accurate the event was performed.
258 </para>
259
260 @event: The event to query
261
262
263 <!-- ##### MACRO GST_EVENT_DISCONT_OFFSET ##### -->
264 <para>
265 The offset of the discont event. A discont event can hold up to 8 different
266 format/value pairs.
267 </para>
268
269 @event: The event to query
270 @i: The offset/value pair.
271
272
273 <!-- ##### MACRO GST_EVENT_DISCONT_OFFSET_LEN ##### -->
274 <para>
275 Get the number of offset/value pairs this event has.
276 </para>
277
278 @event: The event to query.
279
280
281 <!-- ##### MACRO GST_EVENT_SIZE_FORMAT ##### -->
282 <para>
283 The format of the size event.
284 </para>
285
286 @event: The event to query
287
288
289 <!-- ##### MACRO GST_EVENT_SIZE_VALUE ##### -->
290 <para>
291 The value of the size event
292 </para>
293
294 @event: The event to query
295
296
297 <!-- ##### MACRO GST_EVENT_RATE_VALUE ##### -->
298 <para>
299 Get access to the rate vale field
300 </para>
301
302 @event: The event to query
303
304
305 <!-- ##### FUNCTION gst_event_new ##### -->
306 <para>
307
308 </para>
309
310 @type: 
311 @Returns: 
312
313
314 <!-- ##### MACRO gst_event_ref ##### -->
315 <para>
316 Increase the refcount of this event
317 </para>
318
319 @ev: The event to refcount
320
321
322 <!-- ##### MACRO gst_event_unref ##### -->
323 <para>
324 Decrease the refcount of an event, freeing it if the refcount reaches 0
325 </para>
326
327 @ev: The event to unref
328
329
330 <!-- ##### MACRO gst_event_copy ##### -->
331 <para>
332 Copy the event using the event specific copy function
333 </para>
334
335 @ev: The event to copy
336 @Returns: A new event that is a copy of the given input event
337
338
339 <!-- ##### FUNCTION gst_event_masks_contains ##### -->
340 <para>
341
342 </para>
343
344 @masks: 
345 @mask: 
346 @Returns: 
347
348
349 <!-- ##### FUNCTION gst_event_new_seek ##### -->
350 <para>
351
352 </para>
353
354 @type: 
355 @offset: 
356 @Returns: 
357
358
359 <!-- ##### FUNCTION gst_event_new_segment_seek ##### -->
360 <para>
361
362 </para>
363
364 @type: 
365 @start: 
366 @stop: 
367 @Returns: 
368
369
370 <!-- ##### FUNCTION gst_event_new_size ##### -->
371 <para>
372
373 </para>
374
375 @format: 
376 @value: 
377 @Returns: 
378
379
380 <!-- ##### FUNCTION gst_event_new_discontinuous ##### -->
381 <para>
382
383 </para>
384
385 @rate: 
386 @format1: 
387 @Varargs: 
388 @Returns: 
389 <!-- # Unused Parameters # -->
390 @new_media: 
391
392
393 <!-- ##### FUNCTION gst_event_new_discontinuous_valist ##### -->
394 <para>
395
396 </para>
397
398 @rate: 
399 @format1: 
400 @var_args: 
401 @Returns: 
402 <!-- # Unused Parameters # -->
403 @new_media: 
404
405
406 <!-- ##### FUNCTION gst_event_discont_get_value ##### -->
407 <para>
408
409 </para>
410
411 @event: 
412 @format: 
413 @start_value: 
414 @end_value: 
415 @Returns: 
416 <!-- # Unused Parameters # -->
417 @value: 
418
419
420 <!-- ##### MACRO gst_event_new_filler ##### -->
421 <para>
422 Create a new dummy event that should be ignored
423 </para>
424
425
426
427 <!-- ##### FUNCTION gst_event_new_flush ##### -->
428 <para>
429 Create a new flush event.
430 </para>
431
432 @done: 
433 @Returns: 
434
435