2002-01-15 00:41:22 +00:00
|
|
|
<!-- ##### SECTION Title ##### -->
|
|
|
|
GstEvent
|
|
|
|
|
|
|
|
<!-- ##### SECTION Short_Description ##### -->
|
2004-03-25 04:20:33 +00:00
|
|
|
Structure describing events that are passed up and down a pipeline
|
2002-01-15 00:41:22 +00:00
|
|
|
|
|
|
|
<!-- ##### SECTION Long_Description ##### -->
|
|
|
|
<para>
|
|
|
|
The event classes are used to construct and query events.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Events are usually created with gst_event_new() which takes the event type as an argument.
|
|
|
|
properties specific to the event can be set afterwards with the provided macros.
|
2002-09-23 08:44:35 +00:00
|
|
|
The event should be unreferenced with gst_event_unref().
|
2002-01-15 00:41:22 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
gst_event_new_seek() is a usually used to create a seek event and it takes the
|
|
|
|
needed parameters for a seek event.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
gst_event_new_flush() creates a new flush event.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### SECTION See_Also ##### -->
|
|
|
|
<para>
|
2003-02-11 20:38:41 +00:00
|
|
|
#GstPad, #GstElement
|
2002-01-15 00:41:22 +00:00
|
|
|
</para>
|
|
|
|
|
2004-07-21 11:32:09 +00:00
|
|
|
<!-- ##### MACRO GST_TYPE_EVENT ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### STRUCT GstEvent ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@data:
|
|
|
|
@type:
|
|
|
|
@timestamp:
|
|
|
|
@src:
|
|
|
|
|
2002-01-15 00:41:22 +00:00
|
|
|
<!-- ##### ENUM GstEventType ##### -->
|
|
|
|
<para>
|
|
|
|
The different major types of events.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@GST_EVENT_UNKNOWN: unknown event.
|
|
|
|
@GST_EVENT_EOS: an end-of-stream event.
|
|
|
|
@GST_EVENT_FLUSH: a flush event.
|
|
|
|
@GST_EVENT_EMPTY: an empty event.
|
|
|
|
@GST_EVENT_DISCONTINUOUS: a discontinuous event to indicate the stream has a discontinuity.
|
2002-06-12 22:27:18 +00:00
|
|
|
@GST_EVENT_QOS: a quality of service event
|
|
|
|
@GST_EVENT_SEEK: a seek event.
|
2002-07-12 23:21:20 +00:00
|
|
|
@GST_EVENT_SEEK_SEGMENT: a segment seek with start and stop position
|
|
|
|
@GST_EVENT_SEGMENT_DONE: the event that will be emited when the segment seek has ended
|
|
|
|
@GST_EVENT_SIZE: a size suggestion for a peer element
|
|
|
|
@GST_EVENT_RATE: adjust the output rate of an element
|
2002-12-14 13:02:16 +00:00
|
|
|
@GST_EVENT_FILLER: a dummy event that should be ignored by plugins
|
|
|
|
@GST_EVENT_TS_OFFSET: an event to set the time offset on buffers
|
2003-02-11 20:38:41 +00:00
|
|
|
@GST_EVENT_INTERRUPT: mainly used by _get based elements when they were interrupted
|
|
|
|
while waiting for a buffer.
|
2003-10-08 18:21:41 +00:00
|
|
|
@GST_EVENT_NAVIGATION:
|
2003-11-24 02:09:23 +00:00
|
|
|
@GST_EVENT_TAG:
|
2002-01-15 00:41:22 +00:00
|
|
|
|
2004-03-30 07:36:19 +00:00
|
|
|
<!-- ##### MACRO GST_EVENT_ANY ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
2004-03-25 04:20:33 +00:00
|
|
|
<!-- ##### MACRO GST_EVENT_TRACE_NAME ##### -->
|
|
|
|
<para>
|
|
|
|
The name used for memory allocation tracing
|
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
2002-01-15 00:41:22 +00:00
|
|
|
<!-- ##### MACRO GST_EVENT_TYPE ##### -->
|
|
|
|
<para>
|
|
|
|
Get the event type.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@event: The event to query.
|
|
|
|
|
|
|
|
|
2004-03-25 04:20:33 +00:00
|
|
|
<!-- ##### MACRO GST_EVENT_TIMESTAMP ##### -->
|
|
|
|
<para>
|
|
|
|
Get the timestamp of the event.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@event: The event to query.
|
|
|
|
|
|
|
|
|
2002-01-15 00:41:22 +00:00
|
|
|
<!-- ##### MACRO GST_EVENT_SRC ##### -->
|
|
|
|
<para>
|
|
|
|
The source object that generated this event
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@event: The event to query
|
|
|
|
|
|
|
|
|
2004-03-25 04:20:33 +00:00
|
|
|
<!-- ##### MACRO GST_EVENT_IS_INTERRUPT ##### -->
|
2002-01-15 00:41:22 +00:00
|
|
|
<para>
|
2004-03-25 04:20:33 +00:00
|
|
|
Check if the event is an interrupt event
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@event: The event to check
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO GST_SEEK_FORMAT_SHIFT ##### -->
|
|
|
|
<para>
|
|
|
|
Shift for the format in the GstSeekType
|
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO GST_SEEK_METHOD_SHIFT ##### -->
|
|
|
|
<para>
|
|
|
|
Shift for the method in the GstSeekType
|
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO GST_SEEK_FLAGS_SHIFT ##### -->
|
|
|
|
<para>
|
|
|
|
Shift for the flags in the GstSeekType
|
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO GST_SEEK_FORMAT_MASK ##### -->
|
|
|
|
<para>
|
|
|
|
Mask for the format in the GstSeekType
|
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO GST_SEEK_METHOD_MASK ##### -->
|
|
|
|
<para>
|
|
|
|
Mask for the method in the GstSeekType
|
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO GST_SEEK_FLAGS_MASK ##### -->
|
|
|
|
<para>
|
|
|
|
Mask for the flags in the GstSeekType
|
2002-01-15 00:41:22 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
2002-12-14 13:02:16 +00:00
|
|
|
<!-- ##### ENUM GstEventFlag ##### -->
|
|
|
|
<para>
|
|
|
|
Event flags are used when querying for supported events
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@GST_EVENT_FLAG_NONE: no value
|
|
|
|
@GST_RATE_FLAG_NEGATIVE: indicates negative rates are supported
|
|
|
|
|
2004-03-25 04:20:33 +00:00
|
|
|
<!-- ##### MACRO GST_EVENT_MASK_FUNCTION ##### -->
|
|
|
|
<para>
|
|
|
|
A convenience macro to create event mask functions
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@type: The type of the first argument of the function
|
|
|
|
@functionname: the name of the function
|
|
|
|
@...: event masks, the last element is marked with 0
|
|
|
|
|
|
|
|
|
2002-01-15 00:41:22 +00:00
|
|
|
<!-- ##### ENUM GstSeekType ##### -->
|
|
|
|
<para>
|
2003-02-11 20:38:41 +00:00
|
|
|
The different types of seek events. When constructing a seek event a format,
|
|
|
|
a seek method and optional flags are OR-ed together. The seek event is then
|
|
|
|
inserted into the graph with #gst_pad_send_event() or #gst_element_send_event().
|
|
|
|
|
2004-07-14 15:06:31 +00:00
|
|
|
Following example illustrates how to insert a seek event (1 second in the stream)
|
|
|
|
in a pipeline.
|
|
|
|
<example>
|
|
|
|
<title>Insertion of a seek event into a pipeline</title>
|
2003-02-11 20:38:41 +00:00
|
|
|
<programlisting>
|
|
|
|
gboolean res;
|
|
|
|
GstEvent *event;
|
|
|
|
|
|
|
|
event = gst_event_new_seek (
|
|
|
|
GST_FORMAT_TIME | /* seek on time */
|
|
|
|
GST_SEEK_METHOD_SET | /* set the absolute position */
|
|
|
|
GST_SEEK_FLAG_FLUSH, /* flush any pending data */
|
|
|
|
1 * GST_SECOND); /* the seek offset (1 second) */
|
|
|
|
|
|
|
|
res = gst_element_send_event (GST_ELEMENT (osssink), event);
|
|
|
|
if (!res) {
|
|
|
|
g_warning ("seek failed");
|
|
|
|
}
|
|
|
|
</programlisting>
|
2004-07-14 15:06:31 +00:00
|
|
|
</example>
|
2002-01-15 00:41:22 +00:00
|
|
|
</para>
|
|
|
|
|
2002-06-12 22:27:18 +00:00
|
|
|
@GST_SEEK_METHOD_CUR: Seek to an relative position
|
|
|
|
@GST_SEEK_METHOD_SET: Seek to an absolute position
|
|
|
|
@GST_SEEK_METHOD_END: Seek relative to the end of the stream
|
|
|
|
@GST_SEEK_FLAG_FLUSH: Flush any pending data while seeking
|
|
|
|
@GST_SEEK_FLAG_ACCURATE: Seek as accuratly as possible
|
|
|
|
@GST_SEEK_FLAG_KEY_UNIT: Seek to a nearby key unit
|
2002-07-12 23:21:20 +00:00
|
|
|
@GST_SEEK_FLAG_SEGMENT_LOOP: Loop between start and stop in a segmented seek
|
2002-06-12 22:27:18 +00:00
|
|
|
|
|
|
|
<!-- ##### ENUM GstSeekAccuracy ##### -->
|
|
|
|
<para>
|
|
|
|
The seekaccuracy gives more information of how the seek was performed,
|
|
|
|
if the seek was accurate or fuzzy.
|
|
|
|
</para>
|
|
|
|
|
2002-07-12 23:21:20 +00:00
|
|
|
@GST_SEEK_CERTAIN: The seek was exact
|
|
|
|
@GST_SEEK_FUZZY: The seek was fuzzy, exact position can not be guaranteed
|
2002-01-15 00:41:22 +00:00
|
|
|
|
|
|
|
<!-- ##### MACRO GST_EVENT_SEEK_TYPE ##### -->
|
|
|
|
<para>
|
|
|
|
Get the seektype of the GST_EVENT_SEEK.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@event: The event to query.
|
|
|
|
|
|
|
|
|
2002-06-12 22:27:18 +00:00
|
|
|
<!-- ##### MACRO GST_EVENT_SEEK_FORMAT ##### -->
|
|
|
|
<para>
|
|
|
|
The format of the seek value
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@event: The event operate on
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO GST_EVENT_SEEK_METHOD ##### -->
|
|
|
|
<para>
|
|
|
|
The seek method to use as one of #GstSeekType
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@event: The event operate on
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO GST_EVENT_SEEK_FLAGS ##### -->
|
|
|
|
<para>
|
|
|
|
The optional seek flags
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@event: The event operate on
|
|
|
|
|
|
|
|
|
2002-01-15 00:41:22 +00:00
|
|
|
<!-- ##### MACRO GST_EVENT_SEEK_OFFSET ##### -->
|
|
|
|
<para>
|
|
|
|
Get the offset of the seek event.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@event: The event to query.
|
|
|
|
|
|
|
|
|
2004-03-25 04:20:33 +00:00
|
|
|
<!-- ##### MACRO GST_EVENT_SEEK_ENDOFFSET ##### -->
|
2002-01-15 00:41:22 +00:00
|
|
|
<para>
|
2004-03-25 04:20:33 +00:00
|
|
|
The event stop position for a segment seek
|
2002-01-15 00:41:22 +00:00
|
|
|
</para>
|
|
|
|
|
2002-06-12 22:27:18 +00:00
|
|
|
@event: The event to query
|
|
|
|
|
2002-01-15 00:41:22 +00:00
|
|
|
|
2004-03-25 04:20:33 +00:00
|
|
|
<!-- ##### MACRO GST_EVENT_SEEK_ACCURACY ##### -->
|
2002-06-12 22:27:18 +00:00
|
|
|
<para>
|
2004-03-25 04:20:33 +00:00
|
|
|
Indicates how accurate the event was performed.
|
2002-06-12 22:27:18 +00:00
|
|
|
</para>
|
|
|
|
|
2004-03-25 04:20:33 +00:00
|
|
|
@event: The event to query
|
2002-06-12 22:27:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO GST_EVENT_DISCONT_NEW_MEDIA ##### -->
|
|
|
|
<para>
|
|
|
|
Flag that indicates the discont event was because of a new media
|
|
|
|
type.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@event: The event to operate on
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO GST_EVENT_DISCONT_OFFSET ##### -->
|
|
|
|
<para>
|
|
|
|
The offset of the discont event. A discont evetn can hold up to 8 different
|
|
|
|
format/value pairs.
|
2002-01-15 00:41:22 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
@event: The event to query
|
2002-06-12 22:27:18 +00:00
|
|
|
@i: The offset/value pair.
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO GST_EVENT_DISCONT_OFFSET_LEN ##### -->
|
|
|
|
<para>
|
|
|
|
Get the number of offset/value pairs this event has.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@event: The event to query.
|
2002-01-15 00:41:22 +00:00
|
|
|
|
|
|
|
|
2002-07-12 23:21:20 +00:00
|
|
|
<!-- ##### MACRO GST_EVENT_SIZE_FORMAT ##### -->
|
|
|
|
<para>
|
|
|
|
The format of the size event.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@event: The event to query
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO GST_EVENT_SIZE_VALUE ##### -->
|
|
|
|
<para>
|
|
|
|
The value of the size event
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@event: The event to query
|
|
|
|
|
|
|
|
|
2004-03-25 04:20:33 +00:00
|
|
|
<!-- ##### MACRO GST_EVENT_RATE_VALUE ##### -->
|
2003-02-10 23:01:55 +00:00
|
|
|
<para>
|
2004-03-25 04:20:33 +00:00
|
|
|
Get access to the rate vale field
|
2003-02-10 23:01:55 +00:00
|
|
|
</para>
|
|
|
|
|
2004-03-25 04:20:33 +00:00
|
|
|
@event: The event to query
|
2003-02-10 23:01:55 +00:00
|
|
|
|
|
|
|
|
2002-01-15 00:41:22 +00:00
|
|
|
<!-- ##### FUNCTION gst_event_new ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@type:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2002-07-12 23:21:20 +00:00
|
|
|
<!-- ##### MACRO gst_event_ref ##### -->
|
|
|
|
<para>
|
|
|
|
Increase the refcount of this event
|
2002-01-15 00:41:22 +00:00
|
|
|
</para>
|
|
|
|
|
2002-07-12 23:21:20 +00:00
|
|
|
@ev: The event to refcount
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO gst_event_ref_by_count ##### -->
|
|
|
|
<para>
|
|
|
|
Increase the refcount of the event with the given value
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@ev: The event to refcount
|
|
|
|
@c: The value to add to the refcount
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO gst_event_unref ##### -->
|
|
|
|
<para>
|
|
|
|
Decrease the refcount of an event, freeing it if the refcount reaches 0
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@ev: The event to unref
|
2002-03-31 14:00:33 +00:00
|
|
|
|
|
|
|
|
2004-03-25 04:20:33 +00:00
|
|
|
<!-- ##### MACRO gst_event_copy ##### -->
|
|
|
|
<para>
|
|
|
|
Copy the event using the event specific copy function
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@ev: The event to copy
|
|
|
|
@Returns: A new event that is a copy of the given input event
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gst_event_masks_contains ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@masks:
|
|
|
|
@mask:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2002-01-15 00:41:22 +00:00
|
|
|
<!-- ##### FUNCTION gst_event_new_seek ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@type:
|
|
|
|
@offset:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2002-07-12 23:21:20 +00:00
|
|
|
<!-- ##### FUNCTION gst_event_new_segment_seek ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@type:
|
|
|
|
@start:
|
|
|
|
@stop:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gst_event_new_size ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@format:
|
|
|
|
@value:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2002-06-12 22:27:18 +00:00
|
|
|
<!-- ##### FUNCTION gst_event_new_discontinuous ##### -->
|
2002-01-15 00:41:22 +00:00
|
|
|
<para>
|
2002-06-12 22:27:18 +00:00
|
|
|
|
2002-01-15 00:41:22 +00:00
|
|
|
</para>
|
|
|
|
|
2002-06-12 22:27:18 +00:00
|
|
|
@new_media:
|
|
|
|
@format1:
|
|
|
|
@Varargs:
|
|
|
|
@Returns:
|
2002-01-15 00:41:22 +00:00
|
|
|
|
|
|
|
|
2004-03-25 04:20:33 +00:00
|
|
|
<!-- ##### FUNCTION gst_event_new_discontinuous_valist ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@new_media:
|
|
|
|
@format1:
|
|
|
|
@var_args:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2002-06-12 22:27:18 +00:00
|
|
|
<!-- ##### FUNCTION gst_event_discont_get_value ##### -->
|
2002-01-15 00:41:22 +00:00
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
2002-06-12 22:27:18 +00:00
|
|
|
@event:
|
|
|
|
@format:
|
|
|
|
@value:
|
2002-01-15 00:41:22 +00:00
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2002-06-12 22:27:18 +00:00
|
|
|
<!-- ##### MACRO gst_event_new_filler ##### -->
|
|
|
|
<para>
|
|
|
|
Create a new dummy event that should be ignored
|
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO gst_event_new_flush ##### -->
|
|
|
|
<para>
|
|
|
|
Create a new flush event.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|