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 <!-- ##### MACRO GST_TYPE_EVENT ##### -->
37 <!-- ##### STRUCT GstEvent ##### -->
47 <!-- ##### ENUM GstEventType ##### -->
49 The different major types of events.
52 @GST_EVENT_UNKNOWN: unknown event.
53 @GST_EVENT_EOS: an end-of-stream event.
54 @GST_EVENT_FLUSH: a flush event.
55 @GST_EVENT_EMPTY: an empty event.
56 @GST_EVENT_DISCONTINUOUS: a discontinuous event to indicate the stream has a discontinuity.
57 @GST_EVENT_QOS: a quality of service event
58 @GST_EVENT_SEEK: a seek event.
59 @GST_EVENT_SEEK_SEGMENT: a segment seek with start and stop position
60 @GST_EVENT_SEGMENT_DONE: the event that will be emited when the segment seek has ended
61 @GST_EVENT_SIZE: a size suggestion for a peer element
62 @GST_EVENT_RATE: adjust the output rate of an element
63 @GST_EVENT_FILLER: a dummy event that should be ignored by plugins
64 @GST_EVENT_TS_OFFSET: an event to set the time offset on buffers
65 @GST_EVENT_INTERRUPT: mainly used by _get based elements when they were interrupted
66 while waiting for a buffer.
67 @GST_EVENT_NAVIGATION:
70 <!-- ##### MACRO GST_EVENT_ANY ##### -->
77 <!-- ##### MACRO GST_EVENT_TRACE_NAME ##### -->
79 The name used for memory allocation tracing
84 <!-- ##### MACRO GST_EVENT_TYPE ##### -->
89 @event: The event to query.
92 <!-- ##### MACRO GST_EVENT_TIMESTAMP ##### -->
94 Get the timestamp of the event.
97 @event: The event to query.
100 <!-- ##### MACRO GST_EVENT_SRC ##### -->
102 The source object that generated this event
105 @event: The event to query
108 <!-- ##### MACRO GST_EVENT_IS_INTERRUPT ##### -->
110 Check if the event is an interrupt event
113 @event: The event to check
116 <!-- ##### MACRO GST_SEEK_FORMAT_SHIFT ##### -->
118 Shift for the format in the GstSeekType
123 <!-- ##### MACRO GST_SEEK_METHOD_SHIFT ##### -->
125 Shift for the method in the GstSeekType
130 <!-- ##### MACRO GST_SEEK_FLAGS_SHIFT ##### -->
132 Shift for the flags in the GstSeekType
137 <!-- ##### MACRO GST_SEEK_FORMAT_MASK ##### -->
139 Mask for the format in the GstSeekType
144 <!-- ##### MACRO GST_SEEK_METHOD_MASK ##### -->
146 Mask for the method in the GstSeekType
151 <!-- ##### MACRO GST_SEEK_FLAGS_MASK ##### -->
153 Mask for the flags in the GstSeekType
158 <!-- ##### ENUM GstEventFlag ##### -->
160 Event flags are used when querying for supported events
163 @GST_EVENT_FLAG_NONE: no value
164 @GST_RATE_FLAG_NEGATIVE: indicates negative rates are supported
166 <!-- ##### MACRO GST_EVENT_MASK_FUNCTION ##### -->
168 A convenience macro to create event mask functions
171 @type: The type of the first argument of the function
172 @functionname: the name of the function
173 @...: event masks, the last element is marked with 0
176 <!-- ##### ENUM GstSeekType ##### -->
178 The different types of seek events. When constructing a seek event a format,
179 a seek method and optional flags are OR-ed together. The seek event is then
180 inserted into the graph with #gst_pad_send_event() or #gst_element_send_event().
182 Following example illustrates how to insert a seek event (1 second in the stream)
185 <title>Insertion of a seek event into a pipeline</title>
190 event = gst_event_new_seek (
191 GST_FORMAT_TIME | /* seek on time */
192 GST_SEEK_METHOD_SET | /* set the absolute position */
193 GST_SEEK_FLAG_FLUSH, /* flush any pending data */
194 1 * GST_SECOND); /* the seek offset (1 second) */
196 res = gst_element_send_event (GST_ELEMENT (osssink), event);
198 g_warning ("seek failed");
204 @GST_SEEK_METHOD_CUR: Seek to an relative position
205 @GST_SEEK_METHOD_SET: Seek to an absolute position
206 @GST_SEEK_METHOD_END: Seek relative to the end of the stream
207 @GST_SEEK_FLAG_FLUSH: Flush any pending data while seeking
208 @GST_SEEK_FLAG_ACCURATE: Seek as accurately as possible
209 @GST_SEEK_FLAG_KEY_UNIT: Seek to a nearby key unit
210 @GST_SEEK_FLAG_SEGMENT_LOOP: Loop between start and stop in a segmented seek
212 <!-- ##### ENUM GstSeekAccuracy ##### -->
214 The seekaccuracy gives more information of how the seek was performed,
215 if the seek was accurate or fuzzy.
218 @GST_SEEK_CERTAIN: The seek was exact
219 @GST_SEEK_FUZZY: The seek was fuzzy, exact position can not be guaranteed
221 <!-- ##### MACRO GST_EVENT_SEEK_TYPE ##### -->
223 Get the seektype of the GST_EVENT_SEEK.
226 @event: The event to query.
229 <!-- ##### MACRO GST_EVENT_SEEK_FORMAT ##### -->
231 The format of the seek value
234 @event: The event operate on
237 <!-- ##### MACRO GST_EVENT_SEEK_METHOD ##### -->
239 The seek method to use as one of #GstSeekType
242 @event: The event operate on
245 <!-- ##### MACRO GST_EVENT_SEEK_FLAGS ##### -->
247 The optional seek flags
250 @event: The event operate on
253 <!-- ##### MACRO GST_EVENT_SEEK_OFFSET ##### -->
255 Get the offset of the seek event.
258 @event: The event to query.
261 <!-- ##### MACRO GST_EVENT_SEEK_ENDOFFSET ##### -->
263 The event stop position for a segment seek
266 @event: The event to query
269 <!-- ##### MACRO GST_EVENT_SEEK_ACCURACY ##### -->
271 Indicates how accurate the event was performed.
274 @event: The event to query
277 <!-- ##### MACRO GST_EVENT_DISCONT_NEW_MEDIA ##### -->
279 Flag that indicates the discont event was because of a new media
283 @event: The event to operate on
286 <!-- ##### MACRO GST_EVENT_DISCONT_OFFSET ##### -->
288 The offset of the discont event. A discont event can hold up to 8 different
292 @event: The event to query
293 @i: The offset/value pair.
296 <!-- ##### MACRO GST_EVENT_DISCONT_OFFSET_LEN ##### -->
298 Get the number of offset/value pairs this event has.
301 @event: The event to query.
304 <!-- ##### MACRO GST_EVENT_SIZE_FORMAT ##### -->
306 The format of the size event.
309 @event: The event to query
312 <!-- ##### MACRO GST_EVENT_SIZE_VALUE ##### -->
314 The value of the size event
317 @event: The event to query
320 <!-- ##### MACRO GST_EVENT_RATE_VALUE ##### -->
322 Get access to the rate vale field
325 @event: The event to query
328 <!-- ##### FUNCTION gst_event_new ##### -->
337 <!-- ##### MACRO gst_event_ref ##### -->
339 Increase the refcount of this event
342 @ev: The event to refcount
345 <!-- ##### MACRO gst_event_ref_by_count ##### -->
347 Increase the refcount of the event with the given value
350 @ev: The event to refcount
351 @c: The value to add to the refcount
354 <!-- ##### MACRO gst_event_unref ##### -->
356 Decrease the refcount of an event, freeing it if the refcount reaches 0
359 @ev: The event to unref
362 <!-- ##### MACRO gst_event_copy ##### -->
364 Copy the event using the event specific copy function
367 @ev: The event to copy
368 @Returns: A new event that is a copy of the given input event
371 <!-- ##### FUNCTION gst_event_masks_contains ##### -->
381 <!-- ##### FUNCTION gst_event_new_seek ##### -->
391 <!-- ##### FUNCTION gst_event_new_segment_seek ##### -->
402 <!-- ##### FUNCTION gst_event_new_size ##### -->
412 <!-- ##### FUNCTION gst_event_new_discontinuous ##### -->
423 <!-- ##### FUNCTION gst_event_new_discontinuous_valist ##### -->
434 <!-- ##### FUNCTION gst_event_discont_get_value ##### -->
445 <!-- ##### MACRO gst_event_new_filler ##### -->
447 Create a new dummy event that should be ignored
452 <!-- ##### MACRO gst_event_new_flush ##### -->
454 Create a new flush event.