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 element that should be ignored by plugins
50 <!-- ##### MACRO GST_EVENT_TYPE ##### -->
55 @event: The event to query.
58 <!-- ##### MACRO GST_EVENT_SRC ##### -->
60 The source object that generated this event
63 @event: The event to query
66 <!-- ##### MACRO GST_EVENT_TIMESTAMP ##### -->
68 Get the timestamp of the event.
71 @event: The event to query.
74 <!-- ##### ENUM GstSeekType ##### -->
76 The different types of seek events.
79 @GST_SEEK_METHOD_CUR: Seek to an relative position
80 @GST_SEEK_METHOD_SET: Seek to an absolute position
81 @GST_SEEK_METHOD_END: Seek relative to the end of the stream
82 @GST_SEEK_FLAG_FLUSH: Flush any pending data while seeking
83 @GST_SEEK_FLAG_ACCURATE: Seek as accuratly as possible
84 @GST_SEEK_FLAG_KEY_UNIT: Seek to a nearby key unit
85 @GST_SEEK_FLAG_SEGMENT_LOOP: Loop between start and stop in a segmented seek
87 <!-- ##### ENUM GstSeekAccuracy ##### -->
89 The seekaccuracy gives more information of how the seek was performed,
90 if the seek was accurate or fuzzy.
93 @GST_SEEK_CERTAIN: The seek was exact
94 @GST_SEEK_FUZZY: The seek was fuzzy, exact position can not be guaranteed
96 <!-- ##### MACRO GST_EVENT_SEEK_TYPE ##### -->
98 Get the seektype of the GST_EVENT_SEEK.
101 @event: The event to query.
104 <!-- ##### MACRO GST_EVENT_SEEK_FORMAT ##### -->
106 The format of the seek value
109 @event: The event operate on
112 <!-- ##### MACRO GST_EVENT_SEEK_METHOD ##### -->
114 The seek method to use as one of #GstSeekType
117 @event: The event operate on
120 <!-- ##### MACRO GST_EVENT_SEEK_FLAGS ##### -->
122 The optional seek flags
125 @event: The event operate on
128 <!-- ##### MACRO GST_EVENT_SEEK_OFFSET ##### -->
130 Get the offset of the seek event.
133 @event: The event to query.
136 <!-- ##### MACRO GST_EVENT_SEEK_ACCURACY ##### -->
138 Indicates how accurate the event was performed.
141 @event: The event to query
144 <!-- ##### MACRO GST_SEEK_FLAGS_MASK ##### -->
146 Mask for the flags in the GstSeekType
151 <!-- ##### MACRO GST_SEEK_FLAGS_SHIFT ##### -->
153 Shift for the flags in the GstSeekType
158 <!-- ##### MACRO GST_SEEK_FORMAT_MASK ##### -->
160 Mask for the format in the GstSeekType
165 <!-- ##### MACRO GST_SEEK_FORMAT_SHIFT ##### -->
167 Shift for the format in the GstSeekType
172 <!-- ##### MACRO GST_SEEK_METHOD_MASK ##### -->
174 Mask for the method in the GstSeekType
179 <!-- ##### MACRO GST_SEEK_METHOD_SHIFT ##### -->
181 Shift for the method in the GstSeekType
186 <!-- ##### MACRO GST_EVENT_DISCONT_NEW_MEDIA ##### -->
188 Flag that indicates the discont event was because of a new media
192 @event: The event to operate on
195 <!-- ##### MACRO GST_EVENT_DISCONT_OFFSET ##### -->
197 The offset of the discont event. A discont evetn can hold up to 8 different
201 @event: The event to query
202 @i: The offset/value pair.
205 <!-- ##### MACRO GST_EVENT_DISCONT_OFFSET_LEN ##### -->
207 Get the number of offset/value pairs this event has.
210 @event: The event to query.
213 <!-- ##### MACRO GST_EVENT_RATE_VALUE ##### -->
215 Get access to the rate vale field
218 @event: The event to query
221 <!-- ##### MACRO GST_EVENT_SEEK_ENDOFFSET ##### -->
223 The event stop position for a segment seek
226 @event: The event to query
229 <!-- ##### MACRO GST_EVENT_SIZE_FORMAT ##### -->
231 The format of the size event.
234 @event: The event to query
237 <!-- ##### MACRO GST_EVENT_SIZE_VALUE ##### -->
239 The value of the size event
242 @event: The event to query
245 <!-- ##### STRUCT GstEvent ##### -->
255 <!-- ##### FUNCTION gst_event_new ##### -->
264 <!-- ##### MACRO gst_event_copy ##### -->
266 Copy the event using the event specific copy function
269 @ev: The event to copy
270 @Returns: A new event that is a copy of the given input event
273 <!-- ##### MACRO gst_event_ref ##### -->
275 Increase the refcount of this event
278 @ev: The event to refcount
281 <!-- ##### MACRO gst_event_ref_by_count ##### -->
283 Increase the refcount of the event with the given value
286 @ev: The event to refcount
287 @c: The value to add to the refcount
290 <!-- ##### MACRO gst_event_unref ##### -->
292 Decrease the refcount of an event, freeing it if the refcount reaches 0
295 @ev: The event to unref
298 <!-- ##### FUNCTION gst_event_new_seek ##### -->
308 <!-- ##### FUNCTION gst_event_new_segment_seek ##### -->
319 <!-- ##### FUNCTION gst_event_new_size ##### -->
329 <!-- ##### FUNCTION gst_event_new_discontinuous ##### -->
340 <!-- ##### FUNCTION gst_event_discont_get_value ##### -->
351 <!-- ##### MACRO gst_event_new_filler ##### -->
353 Create a new dummy event that should be ignored
358 <!-- ##### MACRO gst_event_new_flush ##### -->
360 Create a new flush event.
365 <!-- ##### FUNCTION gst_event_print_stats ##### -->