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
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 GstEventFlag ##### -->
76 Event flags are used when querying for supported events
79 @GST_EVENT_FLAG_NONE: no value
80 @GST_RATE_FLAG_NEGATIVE: indicates negative rates are supported
82 <!-- ##### ENUM GstSeekType ##### -->
84 The different types of seek events.
87 @GST_SEEK_METHOD_CUR: Seek to an relative position
88 @GST_SEEK_METHOD_SET: Seek to an absolute position
89 @GST_SEEK_METHOD_END: Seek relative to the end of the stream
90 @GST_SEEK_FLAG_FLUSH: Flush any pending data while seeking
91 @GST_SEEK_FLAG_ACCURATE: Seek as accuratly as possible
92 @GST_SEEK_FLAG_KEY_UNIT: Seek to a nearby key unit
93 @GST_SEEK_FLAG_SEGMENT_LOOP: Loop between start and stop in a segmented seek
95 <!-- ##### ENUM GstSeekAccuracy ##### -->
97 The seekaccuracy gives more information of how the seek was performed,
98 if the seek was accurate or fuzzy.
101 @GST_SEEK_CERTAIN: The seek was exact
102 @GST_SEEK_FUZZY: The seek was fuzzy, exact position can not be guaranteed
104 <!-- ##### MACRO GST_EVENT_SEEK_TYPE ##### -->
106 Get the seektype of the GST_EVENT_SEEK.
109 @event: The event to query.
112 <!-- ##### MACRO GST_EVENT_SEEK_FORMAT ##### -->
114 The format of the seek value
117 @event: The event operate on
120 <!-- ##### MACRO GST_EVENT_SEEK_METHOD ##### -->
122 The seek method to use as one of #GstSeekType
125 @event: The event operate on
128 <!-- ##### MACRO GST_EVENT_SEEK_FLAGS ##### -->
130 The optional seek flags
133 @event: The event operate on
136 <!-- ##### MACRO GST_EVENT_SEEK_OFFSET ##### -->
138 Get the offset of the seek event.
141 @event: The event to query.
144 <!-- ##### MACRO GST_EVENT_SEEK_ACCURACY ##### -->
146 Indicates how accurate the event was performed.
149 @event: The event to query
152 <!-- ##### MACRO GST_SEEK_FLAGS_MASK ##### -->
154 Mask for the flags in the GstSeekType
159 <!-- ##### MACRO GST_SEEK_FLAGS_SHIFT ##### -->
161 Shift for the flags in the GstSeekType
166 <!-- ##### MACRO GST_SEEK_FORMAT_MASK ##### -->
168 Mask for the format in the GstSeekType
173 <!-- ##### MACRO GST_SEEK_FORMAT_SHIFT ##### -->
175 Shift for the format in the GstSeekType
180 <!-- ##### MACRO GST_SEEK_METHOD_MASK ##### -->
182 Mask for the method in the GstSeekType
187 <!-- ##### MACRO GST_SEEK_METHOD_SHIFT ##### -->
189 Shift for the method in the GstSeekType
194 <!-- ##### MACRO GST_EVENT_DISCONT_NEW_MEDIA ##### -->
196 Flag that indicates the discont event was because of a new media
200 @event: The event to operate on
203 <!-- ##### MACRO GST_EVENT_DISCONT_OFFSET ##### -->
205 The offset of the discont event. A discont evetn can hold up to 8 different
209 @event: The event to query
210 @i: The offset/value pair.
213 <!-- ##### MACRO GST_EVENT_DISCONT_OFFSET_LEN ##### -->
215 Get the number of offset/value pairs this event has.
218 @event: The event to query.
221 <!-- ##### MACRO GST_EVENT_RATE_VALUE ##### -->
223 Get access to the rate vale field
226 @event: The event to query
229 <!-- ##### MACRO GST_EVENT_SEEK_ENDOFFSET ##### -->
231 The event stop position for a segment seek
234 @event: The event to query
237 <!-- ##### MACRO GST_EVENT_SIZE_FORMAT ##### -->
239 The format of the size event.
242 @event: The event to query
245 <!-- ##### MACRO GST_EVENT_SIZE_VALUE ##### -->
247 The value of the size event
250 @event: The event to query
253 <!-- ##### STRUCT GstEvent ##### -->
263 <!-- ##### FUNCTION gst_event_new ##### -->
272 <!-- ##### MACRO gst_event_copy ##### -->
274 Copy the event using the event specific copy function
277 @ev: The event to copy
278 @Returns: A new event that is a copy of the given input event
281 <!-- ##### MACRO gst_event_ref ##### -->
283 Increase the refcount of this event
286 @ev: The event to refcount
289 <!-- ##### MACRO gst_event_ref_by_count ##### -->
291 Increase the refcount of the event with the given value
294 @ev: The event to refcount
295 @c: The value to add to the refcount
298 <!-- ##### MACRO gst_event_unref ##### -->
300 Decrease the refcount of an event, freeing it if the refcount reaches 0
303 @ev: The event to unref
306 <!-- ##### FUNCTION gst_event_new_seek ##### -->
316 <!-- ##### FUNCTION gst_event_new_segment_seek ##### -->
327 <!-- ##### FUNCTION gst_event_new_size ##### -->
337 <!-- ##### FUNCTION gst_event_new_discontinuous ##### -->
348 <!-- ##### FUNCTION gst_event_discont_get_value ##### -->
359 <!-- ##### MACRO gst_event_new_filler ##### -->
361 Create a new dummy event that should be ignored
366 <!-- ##### MACRO gst_event_new_flush ##### -->
368 Create a new flush event.
373 <!-- ##### FUNCTION gst_event_print_stats ##### -->
380 <!-- ##### MACRO GST_EVENT_MASK_FUNCTION ##### -->
382 A convenience macro to create event mask functions
385 @type: The type of the first argument of the function
386 @functionname: the name of the function
387 @...: event masks, the last element is marked with 0