1 <!-- ##### SECTION Title ##### -->
4 <!-- ##### SECTION Short_Description ##### -->
5 Structure describing events that are passed up and down a pipeline
7 <!-- ##### SECTION Long_Description ##### -->
9 The event classes are used to construct and query events.
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().
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.
22 gst_event_new_flush() creates a new flush event.
25 <!-- ##### SECTION See_Also ##### -->
30 <!-- ##### ENUM GstEventType ##### -->
32 The different major types of events.
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_QOS: a quality of service event
41 @GST_EVENT_SEEK: a seek event.
42 @GST_EVENT_SEEK_SEGMENT: a segment seek with start and stop position
43 @GST_EVENT_SEGMENT_DONE: the event that will be emited when the segment seek has ended
44 @GST_EVENT_SIZE: a size suggestion for a peer element
45 @GST_EVENT_RATE: adjust the output rate of an element
46 @GST_EVENT_FILLER: a dummy event that should be ignored by plugins
47 @GST_EVENT_TS_OFFSET: an event to set the time offset on buffers
48 @GST_EVENT_INTERRUPT: mainly used by _get based elements when they were interrupted
49 while waiting for a buffer.
50 @GST_EVENT_NAVIGATION:
53 <!-- ##### MACRO GST_EVENT_ANY ##### -->
60 <!-- ##### MACRO GST_EVENT_TRACE_NAME ##### -->
62 The name used for memory allocation tracing
67 <!-- ##### MACRO GST_EVENT_TYPE ##### -->
72 @event: The event to query.
75 <!-- ##### MACRO GST_EVENT_TIMESTAMP ##### -->
77 Get the timestamp of the event.
80 @event: The event to query.
83 <!-- ##### MACRO GST_EVENT_SRC ##### -->
85 The source object that generated this event
88 @event: The event to query
91 <!-- ##### MACRO GST_EVENT_IS_INTERRUPT ##### -->
93 Check if the event is an interrupt event
96 @event: The event to check
99 <!-- ##### MACRO GST_SEEK_FORMAT_SHIFT ##### -->
101 Shift for the format in the GstSeekType
106 <!-- ##### MACRO GST_SEEK_METHOD_SHIFT ##### -->
108 Shift for the method in the GstSeekType
113 <!-- ##### MACRO GST_SEEK_FLAGS_SHIFT ##### -->
115 Shift for the flags in the GstSeekType
120 <!-- ##### MACRO GST_SEEK_FORMAT_MASK ##### -->
122 Mask for the format in the GstSeekType
127 <!-- ##### MACRO GST_SEEK_METHOD_MASK ##### -->
129 Mask for the method in the GstSeekType
134 <!-- ##### MACRO GST_SEEK_FLAGS_MASK ##### -->
136 Mask for the flags in the GstSeekType
141 <!-- ##### ENUM GstEventFlag ##### -->
143 Event flags are used when querying for supported events
146 @GST_EVENT_FLAG_NONE: no value
147 @GST_RATE_FLAG_NEGATIVE: indicates negative rates are supported
149 <!-- ##### MACRO GST_EVENT_MASK_FUNCTION ##### -->
151 A convenience macro to create event mask functions
154 @type: The type of the first argument of the function
155 @functionname: the name of the function
156 @...: event masks, the last element is marked with 0
159 <!-- ##### ENUM GstSeekType ##### -->
161 The different types of seek events. When constructing a seek event a format,
162 a seek method and optional flags are OR-ed together. The seek event is then
163 inserted into the graph with #gst_pad_send_event() or #gst_element_send_event().
165 Following example illustrates how to insert a seek event (1 second in the stream)
168 <title>Insertion of a seek event into a pipeline</title>
173 event = gst_event_new_seek (
174 GST_FORMAT_TIME | /* seek on time */
175 GST_SEEK_METHOD_SET | /* set the absolute position */
176 GST_SEEK_FLAG_FLUSH, /* flush any pending data */
177 1 * GST_SECOND); /* the seek offset (1 second) */
179 res = gst_element_send_event (GST_ELEMENT (osssink), event);
181 g_warning ("seek failed");
187 @GST_SEEK_METHOD_CUR: Seek to an relative position
188 @GST_SEEK_METHOD_SET: Seek to an absolute position
189 @GST_SEEK_METHOD_END: Seek relative to the end of the stream
190 @GST_SEEK_FLAG_FLUSH: Flush any pending data while seeking
191 @GST_SEEK_FLAG_ACCURATE: Seek as accuratly as possible
192 @GST_SEEK_FLAG_KEY_UNIT: Seek to a nearby key unit
193 @GST_SEEK_FLAG_SEGMENT_LOOP: Loop between start and stop in a segmented seek
195 <!-- ##### ENUM GstSeekAccuracy ##### -->
197 The seekaccuracy gives more information of how the seek was performed,
198 if the seek was accurate or fuzzy.
201 @GST_SEEK_CERTAIN: The seek was exact
202 @GST_SEEK_FUZZY: The seek was fuzzy, exact position can not be guaranteed
204 <!-- ##### MACRO GST_EVENT_SEEK_TYPE ##### -->
206 Get the seektype of the GST_EVENT_SEEK.
209 @event: The event to query.
212 <!-- ##### MACRO GST_EVENT_SEEK_FORMAT ##### -->
214 The format of the seek value
217 @event: The event operate on
220 <!-- ##### MACRO GST_EVENT_SEEK_METHOD ##### -->
222 The seek method to use as one of #GstSeekType
225 @event: The event operate on
228 <!-- ##### MACRO GST_EVENT_SEEK_FLAGS ##### -->
230 The optional seek flags
233 @event: The event operate on
236 <!-- ##### MACRO GST_EVENT_SEEK_OFFSET ##### -->
238 Get the offset of the seek event.
241 @event: The event to query.
244 <!-- ##### MACRO GST_EVENT_SEEK_ENDOFFSET ##### -->
246 The event stop position for a segment seek
249 @event: The event to query
252 <!-- ##### MACRO GST_EVENT_SEEK_ACCURACY ##### -->
254 Indicates how accurate the event was performed.
257 @event: The event to query
260 <!-- ##### MACRO GST_EVENT_DISCONT_NEW_MEDIA ##### -->
262 Flag that indicates the discont event was because of a new media
266 @event: The event to operate on
269 <!-- ##### MACRO GST_EVENT_DISCONT_OFFSET ##### -->
271 The offset of the discont event. A discont evetn can hold up to 8 different
275 @event: The event to query
276 @i: The offset/value pair.
279 <!-- ##### MACRO GST_EVENT_DISCONT_OFFSET_LEN ##### -->
281 Get the number of offset/value pairs this event has.
284 @event: The event to query.
287 <!-- ##### MACRO GST_EVENT_SIZE_FORMAT ##### -->
289 The format of the size event.
292 @event: The event to query
295 <!-- ##### MACRO GST_EVENT_SIZE_VALUE ##### -->
297 The value of the size event
300 @event: The event to query
303 <!-- ##### MACRO GST_EVENT_RATE_VALUE ##### -->
305 Get access to the rate vale field
308 @event: The event to query
311 <!-- ##### STRUCT GstEvent ##### -->
321 <!-- ##### FUNCTION gst_event_new ##### -->
330 <!-- ##### MACRO gst_event_ref ##### -->
332 Increase the refcount of this event
335 @ev: The event to refcount
338 <!-- ##### MACRO gst_event_ref_by_count ##### -->
340 Increase the refcount of the event with the given value
343 @ev: The event to refcount
344 @c: The value to add to the refcount
347 <!-- ##### MACRO gst_event_unref ##### -->
349 Decrease the refcount of an event, freeing it if the refcount reaches 0
352 @ev: The event to unref
355 <!-- ##### MACRO gst_event_copy ##### -->
357 Copy the event using the event specific copy function
360 @ev: The event to copy
361 @Returns: A new event that is a copy of the given input event
364 <!-- ##### FUNCTION gst_event_masks_contains ##### -->
374 <!-- ##### FUNCTION gst_event_new_seek ##### -->
384 <!-- ##### FUNCTION gst_event_new_segment_seek ##### -->
395 <!-- ##### FUNCTION gst_event_new_size ##### -->
405 <!-- ##### FUNCTION gst_event_new_discontinuous ##### -->
416 <!-- ##### FUNCTION gst_event_new_discontinuous_valist ##### -->
427 <!-- ##### FUNCTION gst_event_discont_get_value ##### -->
438 <!-- ##### MACRO gst_event_new_filler ##### -->
440 Create a new dummy event that should be ignored
445 <!-- ##### MACRO gst_event_new_flush ##### -->
447 Create a new flush event.