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 <!-- ##### STRUCT GstEvent ##### -->
40 <!-- ##### ENUM GstEventType ##### -->
42 The different major types of events.
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:
56 <!-- ##### MACRO GST_EVENT_ANY ##### -->
63 <!-- ##### MACRO GST_EVENT_TRACE_NAME ##### -->
65 The name used for memory allocation tracing
70 <!-- ##### MACRO GST_EVENT_TYPE ##### -->
75 @event: The event to query.
78 <!-- ##### MACRO GST_EVENT_TIMESTAMP ##### -->
80 Get the timestamp of the event.
83 @event: The event to query.
86 <!-- ##### MACRO GST_EVENT_SRC ##### -->
88 The source object that generated this event
91 @event: The event to query
94 <!-- ##### MACRO GST_EVENT_IS_INTERRUPT ##### -->
96 Check if the event is an interrupt event
99 @event: The event to check
102 <!-- ##### MACRO GST_SEEK_FORMAT_SHIFT ##### -->
104 Shift for the format in the GstSeekType
109 <!-- ##### MACRO GST_SEEK_METHOD_SHIFT ##### -->
111 Shift for the method in the GstSeekType
116 <!-- ##### MACRO GST_SEEK_FLAGS_SHIFT ##### -->
118 Shift for the flags in the GstSeekType
123 <!-- ##### MACRO GST_SEEK_FORMAT_MASK ##### -->
125 Mask for the format in the GstSeekType
130 <!-- ##### MACRO GST_SEEK_METHOD_MASK ##### -->
132 Mask for the method in the GstSeekType
137 <!-- ##### MACRO GST_SEEK_FLAGS_MASK ##### -->
139 Mask for the flags in the GstSeekType
144 <!-- ##### ENUM GstEventFlag ##### -->
146 Event flags are used when querying for supported events
149 @GST_EVENT_FLAG_NONE: no value
150 @GST_RATE_FLAG_NEGATIVE: indicates negative rates are supported
152 <!-- ##### MACRO GST_EVENT_MASK_FUNCTION ##### -->
154 A convenience macro to create event mask functions
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
162 <!-- ##### ENUM GstSeekType ##### -->
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().
168 Following example illustrates how to insert a seek event (1 second in the stream)
171 <title>Insertion of a seek event into a pipeline</title>
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) */
182 res = gst_element_send_event (GST_ELEMENT (osssink), event);
184 g_warning ("seek failed");
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
198 <!-- ##### ENUM GstSeekAccuracy ##### -->
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.
204 @GST_SEEK_CERTAIN: The seek was exact
205 @GST_SEEK_FUZZY: The seek was fuzzy, exact position can not be guaranteed
207 <!-- ##### MACRO GST_EVENT_SEEK_TYPE ##### -->
209 Get the seektype of the GST_EVENT_SEEK.
212 @event: The event to query.
215 <!-- ##### MACRO GST_EVENT_SEEK_FORMAT ##### -->
217 The format of the seek value
220 @event: The event operate on
223 <!-- ##### MACRO GST_EVENT_SEEK_METHOD ##### -->
225 The seek method to use as one of #GstSeekType
228 @event: The event operate on
231 <!-- ##### MACRO GST_EVENT_SEEK_FLAGS ##### -->
233 The optional seek flags
236 @event: The event operate on
239 <!-- ##### MACRO GST_EVENT_SEEK_OFFSET ##### -->
241 Get the offset of the seek event.
244 @event: The event to query.
247 <!-- ##### MACRO GST_EVENT_SEEK_ENDOFFSET ##### -->
249 The event stop position for a segment seek
252 @event: The event to query
255 <!-- ##### MACRO GST_EVENT_SEEK_ACCURACY ##### -->
257 Indicates how accurate the event was performed.
260 @event: The event to query
263 <!-- ##### MACRO GST_EVENT_DISCONT_OFFSET ##### -->
265 The offset of the discont event. A discont event can hold up to 8 different
269 @event: The event to query
270 @i: The offset/value pair.
273 <!-- ##### MACRO GST_EVENT_DISCONT_OFFSET_LEN ##### -->
275 Get the number of offset/value pairs this event has.
278 @event: The event to query.
281 <!-- ##### MACRO GST_EVENT_SIZE_FORMAT ##### -->
283 The format of the size event.
286 @event: The event to query
289 <!-- ##### MACRO GST_EVENT_SIZE_VALUE ##### -->
291 The value of the size event
294 @event: The event to query
297 <!-- ##### MACRO GST_EVENT_RATE_VALUE ##### -->
299 Get access to the rate vale field
302 @event: The event to query
305 <!-- ##### FUNCTION gst_event_new ##### -->
314 <!-- ##### MACRO gst_event_ref ##### -->
316 Increase the refcount of this event
319 @ev: The event to refcount
322 <!-- ##### MACRO gst_event_unref ##### -->
324 Decrease the refcount of an event, freeing it if the refcount reaches 0
327 @ev: The event to unref
330 <!-- ##### MACRO gst_event_copy ##### -->
332 Copy the event using the event specific copy function
335 @ev: The event to copy
336 @Returns: A new event that is a copy of the given input event
339 <!-- ##### FUNCTION gst_event_masks_contains ##### -->
349 <!-- ##### FUNCTION gst_event_new_seek ##### -->
359 <!-- ##### FUNCTION gst_event_new_segment_seek ##### -->
370 <!-- ##### FUNCTION gst_event_new_size ##### -->
380 <!-- ##### FUNCTION gst_event_new_discontinuous ##### -->
389 <!-- # Unused Parameters # -->
393 <!-- ##### FUNCTION gst_event_new_discontinuous_valist ##### -->
402 <!-- # Unused Parameters # -->
406 <!-- ##### FUNCTION gst_event_discont_get_value ##### -->
416 <!-- # Unused Parameters # -->
420 <!-- ##### MACRO gst_event_new_filler ##### -->
422 Create a new dummy event that should be ignored
427 <!-- ##### FUNCTION gst_event_new_flush ##### -->
429 Create a new flush event.