Documentation updates
[platform/upstream/gstreamer.git] / docs / gst / tmpl / gstevent.sgml
1 <!-- ##### SECTION Title ##### -->
2 GstEvent
3
4 <!-- ##### SECTION Short_Description ##### -->
5 Event definitions.
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
28 </para>
29
30 <!-- ##### ENUM GstEventType ##### -->
31 <para>
32 The different major types of events.
33 </para>
34
35 @GST_EVENT_UNKNOWN: unknown event.
36 @GST_EVENT_EOS: an end-of-stream event.
37 @GST_EVENT_FLUSH: a flush event.
38 @GST_EVENT_EMPTY: an empty event.
39 @GST_EVENT_DISCONTINUOUS: a discontinuous event to indicate the stream has a discontinuity.
40 @GST_EVENT_NEW_MEDIA: a new media stream is started
41 @GST_EVENT_QOS: a quality of service event
42 @GST_EVENT_SEEK: a seek event.
43 @GST_EVENT_SEEK_SEGMENT: a segment seek with start and stop position
44 @GST_EVENT_SEGMENT_DONE: the event that will be emited when the segment seek has ended
45 @GST_EVENT_SIZE: a size suggestion for a peer element
46 @GST_EVENT_RATE: adjust the output rate of an element
47 @GST_EVENT_FILLER: a dummy event that should be ignored by plugins
48 @GST_EVENT_TS_OFFSET: an event to set the time offset on buffers
49
50 <!-- ##### MACRO GST_EVENT_TYPE ##### -->
51 <para>
52 Get the event type.
53 </para>
54
55 @event: The event to query.
56
57
58 <!-- ##### MACRO GST_EVENT_SRC ##### -->
59 <para>
60 The source object that generated this event
61 </para>
62
63 @event: The event to query
64
65
66 <!-- ##### MACRO GST_EVENT_TIMESTAMP ##### -->
67 <para>
68 Get the timestamp of the event.
69 </para>
70
71 @event: The event to query.
72
73
74 <!-- ##### ENUM GstEventFlag ##### -->
75 <para>
76 Event flags are used when querying for supported events
77 </para>
78
79 @GST_EVENT_FLAG_NONE: no value
80 @GST_RATE_FLAG_NEGATIVE: indicates negative rates are supported
81
82 <!-- ##### ENUM GstSeekType ##### -->
83 <para>
84 The different types of seek events.
85 </para>
86
87 @GST_SEEK_METHOD_CUR: Seek to an relative position
88 @GST_SEEK_METHOD_SET: Seek to an absolute position
89 @GST_SEEK_METHOD_END: Seek relative to the end of the stream
90 @GST_SEEK_FLAG_FLUSH: Flush any pending data while seeking
91 @GST_SEEK_FLAG_ACCURATE: Seek as accuratly as possible
92 @GST_SEEK_FLAG_KEY_UNIT: Seek to a nearby key unit
93 @GST_SEEK_FLAG_SEGMENT_LOOP: Loop between start and stop in a segmented seek
94
95 <!-- ##### ENUM GstSeekAccuracy ##### -->
96 <para>
97 The seekaccuracy gives more information of how the seek was performed,
98 if the seek was accurate or fuzzy.
99 </para>
100
101 @GST_SEEK_CERTAIN: The seek was exact
102 @GST_SEEK_FUZZY: The seek was fuzzy, exact position can not be guaranteed
103
104 <!-- ##### MACRO GST_EVENT_SEEK_TYPE ##### -->
105 <para>
106 Get the seektype of the GST_EVENT_SEEK.
107 </para>
108
109 @event: The event to query.
110
111
112 <!-- ##### MACRO GST_EVENT_SEEK_FORMAT ##### -->
113 <para>
114 The format of the seek value
115 </para>
116
117 @event: The event operate on
118
119
120 <!-- ##### MACRO GST_EVENT_SEEK_METHOD ##### -->
121 <para>
122 The seek method to use as one of #GstSeekType
123 </para>
124
125 @event: The event operate on
126
127
128 <!-- ##### MACRO GST_EVENT_SEEK_FLAGS ##### -->
129 <para>
130 The optional seek flags
131 </para>
132
133 @event: The event operate on
134
135
136 <!-- ##### MACRO GST_EVENT_SEEK_OFFSET ##### -->
137 <para>
138 Get the offset of the seek event.
139 </para>
140
141 @event: The event to query.
142
143
144 <!-- ##### MACRO GST_EVENT_SEEK_ACCURACY ##### -->
145 <para>
146 Indicates how accurate the event was performed.
147 </para>
148
149 @event: The event to query
150
151
152 <!-- ##### MACRO GST_SEEK_FLAGS_MASK ##### -->
153 <para>
154 Mask for the flags in the GstSeekType
155 </para>
156
157
158
159 <!-- ##### MACRO GST_SEEK_FLAGS_SHIFT ##### -->
160 <para>
161 Shift for the flags in the GstSeekType
162 </para>
163
164
165
166 <!-- ##### MACRO GST_SEEK_FORMAT_MASK ##### -->
167 <para>
168 Mask for the format in the GstSeekType
169 </para>
170
171
172
173 <!-- ##### MACRO GST_SEEK_FORMAT_SHIFT ##### -->
174 <para>
175 Shift for the format in the GstSeekType
176 </para>
177
178
179
180 <!-- ##### MACRO GST_SEEK_METHOD_MASK ##### -->
181 <para>
182 Mask for the method in the GstSeekType
183 </para>
184
185
186
187 <!-- ##### MACRO GST_SEEK_METHOD_SHIFT ##### -->
188 <para>
189 Shift for the method in the GstSeekType
190 </para>
191
192
193
194 <!-- ##### MACRO GST_EVENT_DISCONT_NEW_MEDIA ##### -->
195 <para>
196 Flag that indicates the discont event was because of a new media
197 type.
198 </para>
199
200 @event: The event to operate on
201
202
203 <!-- ##### MACRO GST_EVENT_DISCONT_OFFSET ##### -->
204 <para>
205 The offset of the discont event. A discont evetn can hold up to 8 different
206 format/value pairs.
207 </para>
208
209 @event: The event to query
210 @i: The offset/value pair.
211
212
213 <!-- ##### MACRO GST_EVENT_DISCONT_OFFSET_LEN ##### -->
214 <para>
215 Get the number of offset/value pairs this event has.
216 </para>
217
218 @event: The event to query.
219
220
221 <!-- ##### MACRO GST_EVENT_RATE_VALUE ##### -->
222 <para>
223 Get access to the rate vale field
224 </para>
225
226 @event: The event to query
227
228
229 <!-- ##### MACRO GST_EVENT_SEEK_ENDOFFSET ##### -->
230 <para>
231 The event stop position for a segment seek
232 </para>
233
234 @event: The event to query
235
236
237 <!-- ##### MACRO GST_EVENT_SIZE_FORMAT ##### -->
238 <para>
239 The format of the size event.
240 </para>
241
242 @event: The event to query
243
244
245 <!-- ##### MACRO GST_EVENT_SIZE_VALUE ##### -->
246 <para>
247 The value of the size event
248 </para>
249
250 @event: The event to query
251
252
253 <!-- ##### STRUCT GstEvent ##### -->
254 <para>
255 The event structure
256 </para>
257
258 @data: 
259 @type: 
260 @timestamp: 
261 @src: 
262
263 <!-- ##### FUNCTION gst_event_new ##### -->
264 <para>
265
266 </para>
267
268 @type: 
269 @Returns: 
270
271
272 <!-- ##### MACRO gst_event_copy ##### -->
273 <para>
274 Copy the event using the event specific copy function
275 </para>
276
277 @ev: The event to copy
278 @Returns: A new event that is a copy of the given input event
279
280
281 <!-- ##### MACRO gst_event_ref ##### -->
282 <para>
283 Increase the refcount of this event
284 </para>
285
286 @ev: The event to refcount
287
288
289 <!-- ##### MACRO gst_event_ref_by_count ##### -->
290 <para>
291 Increase the refcount of the event with the given value
292 </para>
293
294 @ev: The event to refcount
295 @c: The value to add to the refcount
296
297
298 <!-- ##### MACRO gst_event_unref ##### -->
299 <para>
300 Decrease the refcount of an event, freeing it if the refcount reaches 0
301 </para>
302
303 @ev: The event to unref
304
305
306 <!-- ##### FUNCTION gst_event_new_seek ##### -->
307 <para>
308
309 </para>
310
311 @type: 
312 @offset: 
313 @Returns: 
314
315
316 <!-- ##### FUNCTION gst_event_new_segment_seek ##### -->
317 <para>
318
319 </para>
320
321 @type: 
322 @start: 
323 @stop: 
324 @Returns: 
325
326
327 <!-- ##### FUNCTION gst_event_new_size ##### -->
328 <para>
329
330 </para>
331
332 @format: 
333 @value: 
334 @Returns: 
335
336
337 <!-- ##### FUNCTION gst_event_new_discontinuous ##### -->
338 <para>
339
340 </para>
341
342 @new_media: 
343 @format1: 
344 @Varargs: 
345 @Returns: 
346
347
348 <!-- ##### FUNCTION gst_event_discont_get_value ##### -->
349 <para>
350
351 </para>
352
353 @event: 
354 @format: 
355 @value: 
356 @Returns: 
357
358
359 <!-- ##### MACRO gst_event_new_filler ##### -->
360 <para>
361 Create a new dummy event that should be ignored
362 </para>
363
364
365
366 <!-- ##### MACRO gst_event_new_flush ##### -->
367 <para>
368 Create a new flush event.
369 </para>
370
371
372
373 <!-- ##### FUNCTION gst_event_print_stats ##### -->
374 <para>
375
376 </para>
377
378
379
380 <!-- ##### MACRO GST_EVENT_MASK_FUNCTION ##### -->
381 <para>
382 A convenience macro to create event mask functions
383 </para>
384
385 @functionname: the name of the function
386 @...: event masks, the last element is marked with 0
387
388