| GStreamer Library Reference Manual (Core) | |||
|---|---|---|---|
| <<< Previous Page | Home | Up | Next Page >>> |
#include <gst/gst.h> enum GstEventType; #define GST_EVENT_TYPE (event) #define GST_EVENT_TIMESTAMP (event) enum GstSeekType; #define GST_EVENT_SEEK_TYPE (event) #define GST_EVENT_SEEK_OFFSET (event) #define GST_EVENT_SEEK_FLUSH (event) struct GstEvent; GstEvent* gst_event_new (GstEventType type); void gst_event_free (GstEvent *event); GstEvent* gst_event_new_seek (GstSeekType type, |
The event classes are used to construct and query events.
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. The event is freed with gst_event_free().
gst_event_new_seek() is a usually used to create a seek event and it takes the needed parameters for a seek event.
gst_event_new_flush() creates a new flush event.
typedef enum {
GST_EVENT_UNKNOWN,
GST_EVENT_EOS,
GST_EVENT_FLUSH,
GST_EVENT_EMPTY,
GST_EVENT_SEEK,
GST_EVENT_DISCONTINUOUS
} GstEventType; |
The different major types of events.
#define GST_EVENT_TIMESTAMP(event) (GST_EVENT(event)->timstamp) |
Get the timestamp of the event.
typedef enum {
GST_SEEK_ANY,
GST_SEEK_TIMEOFFSET,
GST_SEEK_BYTEOFFSET
} GstSeekType; |
The different types of seek events.
#define GST_EVENT_SEEK_TYPE(event) (GST_EVENT(event)->event_data.seek.type) |
Get the seektype of the GST_EVENT_SEEK.
#define GST_EVENT_SEEK_OFFSET(event) (GST_EVENT(event)->event_data.seek.offset) |
Get the offset of the seek event.
#define GST_EVENT_SEEK_FLUSH(event) (GST_EVENT(event)->event_data.seek.flush) |
Qeury wether the seek event also needs a flush.
struct GstEvent {
GstData data;
GstEventType type;
guint64 timestamp;
union {
struct {
GstSeekType type;
guint64 offset;
gboolean flush;
} seek;
} event_data;
}; |
The event data structure.
| GstData data | The parent data type. |
| GstEventType type | The event type. |
| The event timestamp. |
GstEvent* gst_event_new_seek (GstSeekType type, |
Allocate a new seek event with the given parameters.