Make GstEvent extend GstData and added some macros.

Original commit message from CVS:
Make GstEvent extend GstData and added some macros.
This commit is contained in:
Wim Taymans 2001-09-10 22:06:04 +00:00
parent 38bbb8c274
commit e0ad55e8cd

View file

@ -25,6 +25,7 @@
#define __GST_EVENT_H__ #define __GST_EVENT_H__
#include <gst/gstobject.h> #include <gst/gstobject.h>
#include <gst/gstdata.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -38,12 +39,24 @@ typedef enum {
GST_EVENT_SEEK, GST_EVENT_SEEK,
} GstEventType; } GstEventType;
#define GST_EVENT(event) ((GstEvent*)(event))
#define GST_IS_EVENT(event) (GST_DATA_TYPE(event) == gst_event_get_type())
#define GST_EVENT_TYPE(event) (GST_EVENT(event)->type)
typedef struct _GstEvent GstEvent; typedef struct _GstEvent GstEvent;
struct _GstEvent { struct _GstEvent {
GstData data;
GstEventType type; GstEventType type;
}; };
GType gst_event_get_type (void);
GstEvent* gst_event_empty_new (GstEventType type);
void gst_event_free (GstEvent* event);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */