1 <!-- ##### SECTION Title ##### -->
4 <!-- ##### SECTION Short_Description ##### -->
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_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
51 <!-- ##### MACRO GST_EVENT_TYPE ##### -->
56 @event: The event to query.
59 <!-- ##### MACRO GST_EVENT_SRC ##### -->
61 The source object that generated this event
64 @event: The event to query
67 <!-- ##### MACRO GST_EVENT_TIMESTAMP ##### -->
69 Get the timestamp of the event.
72 @event: The event to query.
75 <!-- ##### ENUM GstEventFlag ##### -->
77 Event flags are used when querying for supported events
80 @GST_EVENT_FLAG_NONE: no value
81 @GST_RATE_FLAG_NEGATIVE: indicates negative rates are supported
83 <!-- ##### ENUM GstSeekType ##### -->
85 The different types of seek events.
88 @GST_SEEK_METHOD_CUR: Seek to an relative position
89 @GST_SEEK_METHOD_SET: Seek to an absolute position
90 @GST_SEEK_METHOD_END: Seek relative to the end of the stream
91 @GST_SEEK_FLAG_FLUSH: Flush any pending data while seeking
92 @GST_SEEK_FLAG_ACCURATE: Seek as accuratly as possible
93 @GST_SEEK_FLAG_KEY_UNIT: Seek to a nearby key unit
94 @GST_SEEK_FLAG_SEGMENT_LOOP: Loop between start and stop in a segmented seek
96 <!-- ##### ENUM GstSeekAccuracy ##### -->
98 The seekaccuracy gives more information of how the seek was performed,
99 if the seek was accurate or fuzzy.
102 @GST_SEEK_CERTAIN: The seek was exact
103 @GST_SEEK_FUZZY: The seek was fuzzy, exact position can not be guaranteed
105 <!-- ##### MACRO GST_EVENT_SEEK_TYPE ##### -->
107 Get the seektype of the GST_EVENT_SEEK.
110 @event: The event to query.
113 <!-- ##### MACRO GST_EVENT_SEEK_FORMAT ##### -->
115 The format of the seek value
118 @event: The event operate on
121 <!-- ##### MACRO GST_EVENT_SEEK_METHOD ##### -->
123 The seek method to use as one of #GstSeekType
126 @event: The event operate on
129 <!-- ##### MACRO GST_EVENT_SEEK_FLAGS ##### -->
131 The optional seek flags
134 @event: The event operate on
137 <!-- ##### MACRO GST_EVENT_SEEK_OFFSET ##### -->
139 Get the offset of the seek event.
142 @event: The event to query.
145 <!-- ##### MACRO GST_EVENT_SEEK_ACCURACY ##### -->
147 Indicates how accurate the event was performed.
150 @event: The event to query
153 <!-- ##### MACRO GST_SEEK_FLAGS_MASK ##### -->
155 Mask for the flags in the GstSeekType
160 <!-- ##### MACRO GST_SEEK_FLAGS_SHIFT ##### -->
162 Shift for the flags in the GstSeekType
167 <!-- ##### MACRO GST_SEEK_FORMAT_MASK ##### -->
169 Mask for the format in the GstSeekType
174 <!-- ##### MACRO GST_SEEK_FORMAT_SHIFT ##### -->
176 Shift for the format in the GstSeekType
181 <!-- ##### MACRO GST_SEEK_METHOD_MASK ##### -->
183 Mask for the method in the GstSeekType
188 <!-- ##### MACRO GST_SEEK_METHOD_SHIFT ##### -->
190 Shift for the method in the GstSeekType
195 <!-- ##### MACRO GST_EVENT_DISCONT_NEW_MEDIA ##### -->
197 Flag that indicates the discont event was because of a new media
201 @event: The event to operate on
204 <!-- ##### MACRO GST_EVENT_DISCONT_OFFSET ##### -->
206 The offset of the discont event. A discont evetn can hold up to 8 different
210 @event: The event to query
211 @i: The offset/value pair.
214 <!-- ##### MACRO GST_EVENT_DISCONT_OFFSET_LEN ##### -->
216 Get the number of offset/value pairs this event has.
219 @event: The event to query.
222 <!-- ##### MACRO GST_EVENT_RATE_VALUE ##### -->
224 Get access to the rate vale field
227 @event: The event to query
230 <!-- ##### MACRO GST_EVENT_SEEK_ENDOFFSET ##### -->
232 The event stop position for a segment seek
235 @event: The event to query
238 <!-- ##### MACRO GST_EVENT_SIZE_FORMAT ##### -->
240 The format of the size event.
243 @event: The event to query
246 <!-- ##### MACRO GST_EVENT_SIZE_VALUE ##### -->
248 The value of the size event
251 @event: The event to query
254 <!-- ##### MACRO GST_EVENT_IS_INTERRUPT ##### -->
256 Check if the event is an interrupt event
259 @event: The event to check
262 <!-- ##### MACRO GST_EVENT_TRACE_NAME ##### -->
264 The name used for memory allocation tracing
269 <!-- ##### STRUCT GstEvent ##### -->
279 <!-- ##### FUNCTION gst_event_new ##### -->
288 <!-- ##### MACRO gst_event_copy ##### -->
290 Copy the event using the event specific copy function
293 @ev: The event to copy
294 @Returns: A new event that is a copy of the given input event
297 <!-- ##### MACRO gst_event_ref ##### -->
299 Increase the refcount of this event
302 @ev: The event to refcount
305 <!-- ##### MACRO gst_event_ref_by_count ##### -->
307 Increase the refcount of the event with the given value
310 @ev: The event to refcount
311 @c: The value to add to the refcount
314 <!-- ##### MACRO gst_event_unref ##### -->
316 Decrease the refcount of an event, freeing it if the refcount reaches 0
319 @ev: The event to unref
322 <!-- ##### FUNCTION gst_event_new_seek ##### -->
332 <!-- ##### FUNCTION gst_event_new_segment_seek ##### -->
343 <!-- ##### FUNCTION gst_event_new_size ##### -->
353 <!-- ##### FUNCTION gst_event_new_discontinuous ##### -->
364 <!-- ##### FUNCTION gst_event_discont_get_value ##### -->
375 <!-- ##### MACRO gst_event_new_filler ##### -->
377 Create a new dummy event that should be ignored
382 <!-- ##### MACRO gst_event_new_flush ##### -->
384 Create a new flush event.
389 <!-- ##### FUNCTION gst_event_masks_contains ##### -->
399 <!-- ##### MACRO GST_EVENT_MASK_FUNCTION ##### -->
401 A convenience macro to create event mask functions
404 @type: The type of the first argument of the function
405 @functionname: the name of the function
406 @...: event masks, the last element is marked with 0