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 <!-- ##### SECTION Stability_Level ##### -->
33 <!-- ##### STRUCT GstEvent ##### -->
43 <!-- ##### ENUM GstEventType ##### -->
45 The different major types of events.
48 @GST_EVENT_UNKNOWN: unknown event.
49 @GST_EVENT_EOS: an end-of-stream event.
50 @GST_EVENT_FLUSH: a flush event.
51 @GST_EVENT_DISCONTINUOUS: a discontinuous event to indicate the stream has a discontinuity.
52 @GST_EVENT_QOS: a quality of service event
53 @GST_EVENT_SEEK: a seek event.
54 @GST_EVENT_SIZE: a size suggestion for a peer element
55 @GST_EVENT_RATE: adjust the output rate of an element
56 @GST_EVENT_NAVIGATION:
59 <!-- ##### MACRO GST_EVENT_ANY ##### -->
66 <!-- ##### MACRO GST_EVENT_TRACE_NAME ##### -->
68 The name used for memory allocation tracing
73 <!-- ##### MACRO GST_EVENT_TYPE ##### -->
78 @event: The event to query.
81 <!-- ##### MACRO GST_EVENT_TIMESTAMP ##### -->
83 Get the timestamp of the event.
86 @event: The event to query.
89 <!-- ##### MACRO GST_EVENT_SRC ##### -->
91 The source object that generated this event
94 @event: The event to query
97 <!-- ##### MACRO GST_EVENT_IS_INTERRUPT ##### -->
99 Check if the event is an interrupt event
102 @event: The event to check
105 <!-- ##### MACRO GST_SEEK_FORMAT_SHIFT ##### -->
107 Shift for the format in the GstSeekType
112 <!-- ##### MACRO GST_SEEK_METHOD_SHIFT ##### -->
114 Shift for the method in the GstSeekType
119 <!-- ##### MACRO GST_SEEK_FLAGS_SHIFT ##### -->
121 Shift for the flags in the GstSeekType
126 <!-- ##### MACRO GST_SEEK_FORMAT_MASK ##### -->
128 Mask for the format in the GstSeekType
133 <!-- ##### MACRO GST_SEEK_METHOD_MASK ##### -->
135 Mask for the method in the GstSeekType
140 <!-- ##### MACRO GST_SEEK_FLAGS_MASK ##### -->
142 Mask for the flags in the GstSeekType
147 <!-- ##### ENUM GstEventFlag ##### -->
149 Event flags are used when querying for supported events
152 @GST_EVENT_FLAG_NONE: no value
153 @GST_RATE_FLAG_NEGATIVE: indicates negative rates are supported
155 <!-- ##### MACRO GST_EVENT_MASK_FUNCTION ##### -->
157 A convenience macro to create event mask functions
160 @type: The type of the first argument of the function
161 @functionname: the name of the function
162 @...: event masks, the last element is marked with 0
165 <!-- ##### ENUM GstSeekType ##### -->
167 The different types of seek events. When constructing a seek event a format,
168 a seek method and optional flags are OR-ed together. The seek event is then
169 inserted into the graph with #gst_pad_send_event() or #gst_element_send_event().
171 Following example illustrates how to insert a seek event (1 second in the stream)
174 <title>Insertion of a seek event into a pipeline</title>
179 event = gst_event_new_seek (
180 GST_FORMAT_TIME | /* seek on time */
181 GST_SEEK_METHOD_SET | /* set the absolute position */
182 GST_SEEK_FLAG_FLUSH, /* flush any pending data */
183 1 * GST_SECOND); /* the seek offset (1 second) */
185 res = gst_element_send_event (GST_ELEMENT (osssink), event);
187 g_warning ("seek failed");
193 @GST_SEEK_METHOD_CUR: Seek to an relative position
194 @GST_SEEK_METHOD_SET: Seek to an absolute position
195 @GST_SEEK_METHOD_END: Seek relative to the end of the stream
196 @GST_SEEK_FLAG_FLUSH: Flush any pending data while seeking
197 @GST_SEEK_FLAG_ACCURATE: Seek as accurately as possible
198 @GST_SEEK_FLAG_KEY_UNIT: Seek to a nearby key unit
199 @GST_SEEK_FLAG_SEGMENT_LOOP: Loop between start and stop in a segmented seek
201 <!-- ##### ENUM GstSeekAccuracy ##### -->
203 The accuracy about a seek operation gives more information of how the seek was
204 performed, namly if the seek was accurate or fuzzy.
207 @GST_SEEK_CERTAIN: The seek was exact
208 @GST_SEEK_FUZZY: The seek was fuzzy, exact position can not be guaranteed
210 <!-- ##### MACRO GST_EVENT_SEEK_TYPE ##### -->
212 Get the seektype of the GST_EVENT_SEEK.
215 @event: The event to query.
218 <!-- ##### MACRO GST_EVENT_SEEK_FORMAT ##### -->
220 The format of the seek value
223 @event: The event operate on
226 <!-- ##### MACRO GST_EVENT_SEEK_METHOD ##### -->
228 The seek method to use as one of #GstSeekType
231 @event: The event operate on
234 <!-- ##### MACRO GST_EVENT_SEEK_FLAGS ##### -->
236 The optional seek flags
239 @event: The event operate on
242 <!-- ##### MACRO GST_EVENT_SEEK_OFFSET ##### -->
244 Get the offset of the seek event.
247 @event: The event to query.
250 <!-- ##### MACRO GST_EVENT_SEEK_ENDOFFSET ##### -->
252 The event stop position for a segment seek
255 @event: The event to query
258 <!-- ##### MACRO GST_EVENT_SEEK_ACCURACY ##### -->
260 Indicates how accurate the event was performed.
263 @event: The event to query
266 <!-- ##### MACRO GST_EVENT_DISCONT_OFFSET ##### -->
268 The offset of the discont event. A discont event can hold up to 8 different
272 @event: The event to query
273 @i: The offset/value pair.
276 <!-- ##### MACRO GST_EVENT_DISCONT_OFFSET_LEN ##### -->
278 Get the number of offset/value pairs this event has.
281 @event: The event to query.
284 <!-- ##### MACRO GST_EVENT_SIZE_FORMAT ##### -->
286 The format of the size event.
289 @event: The event to query
292 <!-- ##### MACRO GST_EVENT_SIZE_VALUE ##### -->
294 The value of the size event
297 @event: The event to query
300 <!-- ##### MACRO GST_EVENT_RATE_VALUE ##### -->
302 Get access to the rate vale field
305 @event: The event to query
308 <!-- ##### FUNCTION gst_event_new ##### -->
317 <!-- ##### MACRO gst_event_ref ##### -->
319 Increase the refcount of this event
322 @ev: The event to refcount
325 <!-- ##### MACRO gst_event_unref ##### -->
327 Decrease the refcount of an event, freeing it if the refcount reaches 0
330 @ev: The event to unref
333 <!-- ##### MACRO gst_event_copy ##### -->
335 Copy the event using the event specific copy function
338 @ev: The event to copy
339 @Returns: A new event that is a copy of the given input event
342 <!-- ##### FUNCTION gst_event_masks_contains ##### -->
352 <!-- ##### FUNCTION gst_event_new_seek ##### -->
362 <!-- ##### FUNCTION gst_event_new_segment_seek ##### -->
373 <!-- ##### FUNCTION gst_event_new_size ##### -->
383 <!-- ##### FUNCTION gst_event_new_discontinuous ##### -->
392 <!-- # Unused Parameters # -->
396 <!-- ##### FUNCTION gst_event_new_discontinuous_valist ##### -->
405 <!-- # Unused Parameters # -->
409 <!-- ##### FUNCTION gst_event_discont_get_value ##### -->
419 <!-- # Unused Parameters # -->
423 <!-- ##### MACRO gst_event_new_filler ##### -->
425 Create a new dummy event that should be ignored
430 <!-- ##### FUNCTION gst_event_new_flush ##### -->
432 Create a new flush event.