diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2011-05-11 12:04:43 +0200 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2011-05-11 16:06:49 +0200 |
commit | 0bfbce44638949e53983beda930dd05219be60e7 (patch) | |
tree | 3296e1b564c172538fbace945b335b3c3b567c79 /gst/gstevent.c | |
parent | 9ec1673cae34853334f9891bfb0723274dc0ec93 (diff) | |
download | gstreamer-0bfbce44638949e53983beda930dd05219be60e7.tar.gz |
event: clean up some macros
Avoid executing a method for GST_TYPE_EVENT but instead use the type variable
directly. We can do this because we register it before anything else.
Diffstat (limited to 'gst/gstevent.c')
-rw-r--r-- | gst/gstevent.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/gst/gstevent.c b/gst/gstevent.c index b573cf0421..af0cf02fc4 100644 --- a/gst/gstevent.c +++ b/gst/gstevent.c @@ -85,7 +85,7 @@ #include "gstutils.h" #include "gstquark.h" -static GType _gst_event_type = 0; +GType _gst_event_type = 0; typedef struct { @@ -147,7 +147,8 @@ _gst_event_initialize (void) { gint i; - gst_event_get_type (); + _gst_event_type = gst_mini_object_register ("GstEvent"); + g_type_class_ref (gst_seek_flags_get_type ()); g_type_class_ref (gst_seek_type_get_type ()); @@ -214,15 +215,6 @@ gst_event_type_get_flags (GstEventType type) return ret; } -GType -gst_event_get_type (void) -{ - if (G_UNLIKELY (_gst_event_type == 0)) { - _gst_event_type = gst_mini_object_register ("GstEvent"); - } - return _gst_event_type; -} - static void _gst_event_free (GstEvent * event) { |