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 is freed with gst_event_free().
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 element that should be ignored by plugins
49 <!-- ##### MACRO GST_EVENT_TYPE ##### -->
54 @event: The event to query.
57 <!-- ##### MACRO GST_EVENT_SRC ##### -->
59 The source object that generated this event
62 @event: The event to query
65 <!-- ##### MACRO GST_EVENT_TIMESTAMP ##### -->
67 Get the timestamp of the event.
70 @event: The event to query.
73 <!-- ##### ENUM GstSeekType ##### -->
75 The different types of seek events.
78 @GST_SEEK_METHOD_CUR: Seek to an relative position
79 @GST_SEEK_METHOD_SET: Seek to an absolute position
80 @GST_SEEK_METHOD_END: Seek relative to the end of the stream
81 @GST_SEEK_FLAG_FLUSH: Flush any pending data while seeking
82 @GST_SEEK_FLAG_ACCURATE: Seek as accuratly as possible
83 @GST_SEEK_FLAG_KEY_UNIT: Seek to a nearby key unit
84 @GST_SEEK_FLAG_SEGMENT_LOOP: Loop between start and stop in a segmented seek
86 <!-- ##### ENUM GstSeekAccuracy ##### -->
88 The seekaccuracy gives more information of how the seek was performed,
89 if the seek was accurate or fuzzy.
92 @GST_SEEK_CERTAIN: The seek was exact
93 @GST_SEEK_FUZZY: The seek was fuzzy, exact position can not be guaranteed
95 <!-- ##### MACRO GST_EVENT_SEEK_TYPE ##### -->
97 Get the seektype of the GST_EVENT_SEEK.
100 @event: The event to query.
103 <!-- ##### MACRO GST_EVENT_SEEK_FORMAT ##### -->
105 The format of the seek value
108 @event: The event operate on
111 <!-- ##### MACRO GST_EVENT_SEEK_METHOD ##### -->
113 The seek method to use as one of #GstSeekType
116 @event: The event operate on
119 <!-- ##### MACRO GST_EVENT_SEEK_FLAGS ##### -->
121 The optional seek flags
124 @event: The event operate on
127 <!-- ##### MACRO GST_EVENT_SEEK_OFFSET ##### -->
129 Get the offset of the seek event.
132 @event: The event to query.
135 <!-- ##### MACRO GST_EVENT_SEEK_ACCURACY ##### -->
137 Indicates how accurate the event was performed.
140 @event: The event to query
143 <!-- ##### MACRO GST_SEEK_FLAGS_MASK ##### -->
145 Mask for the flags in the GstSeekType
150 <!-- ##### MACRO GST_SEEK_FLAGS_SHIFT ##### -->
152 Shift for the flags in the GstSeekType
157 <!-- ##### MACRO GST_SEEK_FORMAT_MASK ##### -->
159 Mask for the format in the GstSeekType
164 <!-- ##### MACRO GST_SEEK_FORMAT_SHIFT ##### -->
166 Shift for the format in the GstSeekType
171 <!-- ##### MACRO GST_SEEK_METHOD_MASK ##### -->
173 Mask for the method in the GstSeekType
178 <!-- ##### MACRO GST_SEEK_METHOD_SHIFT ##### -->
180 Shift for the method in the GstSeekType
185 <!-- ##### MACRO GST_EVENT_DISCONT_NEW_MEDIA ##### -->
187 Flag that indicates the discont event was because of a new media
191 @event: The event to operate on
194 <!-- ##### MACRO GST_EVENT_DISCONT_OFFSET ##### -->
196 The offset of the discont event. A discont evetn can hold up to 8 different
200 @event: The event to query
201 @i: The offset/value pair.
204 <!-- ##### MACRO GST_EVENT_DISCONT_OFFSET_LEN ##### -->
206 Get the number of offset/value pairs this event has.
209 @event: The event to query.
212 <!-- ##### MACRO GST_EVENT_RATE_VALUE ##### -->
214 Get access to the rate vale field
217 @event: The event to query
220 <!-- ##### MACRO GST_EVENT_SEEK_ENDOFFSET ##### -->
222 The event stop position for a segment seek
225 @event: The event to query
228 <!-- ##### MACRO GST_EVENT_SIZE_FORMAT ##### -->
230 The format of the size event.
233 @event: The event to query
236 <!-- ##### MACRO GST_EVENT_SIZE_VALUE ##### -->
238 The value of the size event
241 @event: The event to query
244 <!-- ##### STRUCT GstEvent ##### -->
246 The event data structure.
249 @data: The parent data type.
250 @type: The event type.
251 @timestamp: The event timestamp.
252 @src: The object that generated the event
254 <!-- ##### FUNCTION gst_event_new ##### -->
263 <!-- ##### MACRO gst_event_copy ##### -->
265 Copy the event using the event specific copy function
268 @ev: The event to copy
269 @Returns: A new event that is a copy of the given input event
272 <!-- ##### MACRO gst_event_ref ##### -->
274 Increase the refcount of this event
277 @ev: The event to refcount
280 <!-- ##### MACRO gst_event_ref_by_count ##### -->
282 Increase the refcount of the event with the given value
285 @ev: The event to refcount
286 @c: The value to add to the refcount
289 <!-- ##### MACRO gst_event_unref ##### -->
291 Decrease the refcount of an event, freeing it if the refcount reaches 0
294 @ev: The event to unref
297 <!-- ##### FUNCTION gst_event_new_seek ##### -->
307 <!-- ##### FUNCTION gst_event_new_segment_seek ##### -->
318 <!-- ##### FUNCTION gst_event_new_size ##### -->
328 <!-- ##### FUNCTION gst_event_new_discontinuous ##### -->
339 <!-- ##### FUNCTION gst_event_discont_get_value ##### -->
350 <!-- ##### MACRO gst_event_new_filler ##### -->
352 Create a new dummy event that should be ignored
357 <!-- ##### MACRO gst_event_new_flush ##### -->
359 Create a new flush event.
364 <!-- ##### FUNCTION gst_event_print_stats ##### -->