From 2ca1c89aaca0667bf2d2abf1b0dd7ff5422df8f1 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Sat, 15 Oct 2005 16:33:09 +0000 Subject: [PATCH] gst/gst.*: remove _gst_registry_auto_load, not used anymore Original commit message from CVS: * gst/gst.c: * gst/gst.h: remove _gst_registry_auto_load, not used anymore * gst/gstbin.c: (gst_bin_get_type): * gst/gstbin.h: * gst/gstelement.c: (gst_element_get_type): * gst/gstelement.h: * gst/gstobject.c: (gst_object_get_type): * gst/gstobject.h: * gst/gstpad.c: (gst_pad_get_type): * gst/gstpad.h: make _get_type functions similar, fixes data export from library --- ChangeLog | 15 +++++++++++++++ gst/gst.c | 4 ---- gst/gst.h | 4 ---- gst/gstbin.c | 12 ++++++------ gst/gstbin.h | 4 +--- gst/gstelement.c | 10 +++++----- gst/gstelement.h | 4 +--- gst/gstobject.c | 9 +++++---- gst/gstobject.h | 4 +--- gst/gstpad.c | 10 +++++----- gst/gstpad.h | 4 +--- 11 files changed, 40 insertions(+), 40 deletions(-) diff --git a/ChangeLog b/ChangeLog index b3de9f228c..f8876b9242 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2005-10-15 Thomas Vander Stichele + + * gst/gst.c: + * gst/gst.h: + remove _gst_registry_auto_load, not used anymore + * gst/gstbin.c: (gst_bin_get_type): + * gst/gstbin.h: + * gst/gstelement.c: (gst_element_get_type): + * gst/gstelement.h: + * gst/gstobject.c: (gst_object_get_type): + * gst/gstobject.h: + * gst/gstpad.c: (gst_pad_get_type): + * gst/gstpad.h: + make _get_type functions similar, fixes data export from library + 2005-10-15 Thomas Vander Stichele * configure.ac: diff --git a/gst/gst.c b/gst/gst.c index abbeacdf62..a15cba5b96 100644 --- a/gst/gst.c +++ b/gst/gst.c @@ -107,10 +107,6 @@ #define MAX_PATH_SPLIT 16 #define GST_PLUGIN_SEPARATOR "," -#ifndef GST_DISABLE_REGISTRY -gboolean _gst_registry_auto_load = TRUE; -#endif - static gboolean gst_initialized = FALSE; extern gint _gst_trace_on; diff --git a/gst/gst.h b/gst/gst.h index bff062a456..5173b43a57 100644 --- a/gst/gst.h +++ b/gst/gst.h @@ -72,10 +72,6 @@ G_BEGIN_DECLS -#ifndef GST_DISABLE_REGISTRY -GST_EXPORT gboolean _gst_registry_auto_load; -#endif - void gst_init (int *argc, char **argv[]); gboolean gst_init_check (int *argc, char **argv[], GError ** err); diff --git a/gst/gstbin.c b/gst/gstbin.c index 8873cade67..39a5a554c6 100644 --- a/gst/gstbin.c +++ b/gst/gstbin.c @@ -77,8 +77,6 @@ static GstElementDetails gst_bin_details = GST_ELEMENT_DETAILS ("Generic bin", "Simple container object", "Erik Walthinsen ," "Wim Taymans "); -GType _gst_bin_type = 0; - static void gst_bin_dispose (GObject * object); static void gst_bin_recalc_state (GstBin * bin, gboolean force); @@ -138,7 +136,9 @@ static guint gst_bin_signals[LAST_SIGNAL] = { 0 }; GType gst_bin_get_type (void) { - if (!_gst_bin_type) { + static GType gst_bin_type = 0; + + if (!gst_bin_type) { static const GTypeInfo bin_info = { sizeof (GstBinClass), gst_bin_base_init, @@ -157,16 +157,16 @@ gst_bin_get_type (void) NULL }; - _gst_bin_type = + gst_bin_type = g_type_register_static (GST_TYPE_ELEMENT, "GstBin", &bin_info, 0); - g_type_add_interface_static (_gst_bin_type, GST_TYPE_CHILD_PROXY, + g_type_add_interface_static (gst_bin_type, GST_TYPE_CHILD_PROXY, &child_proxy_info); GST_DEBUG_CATEGORY_INIT (bin_debug, "bin", GST_DEBUG_BOLD, "debugging info for the 'bin' container element"); } - return _gst_bin_type; + return gst_bin_type; } static void diff --git a/gst/gstbin.h b/gst/gstbin.h index 4eb2b6dd22..206842b8d1 100644 --- a/gst/gstbin.h +++ b/gst/gstbin.h @@ -30,9 +30,7 @@ G_BEGIN_DECLS -GST_EXPORT GType _gst_bin_type; - -#define GST_TYPE_BIN (_gst_bin_type) +#define GST_TYPE_BIN (gst_bin_get_type ()) #define GST_IS_BIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_BIN)) #define GST_IS_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_BIN)) #define GST_BIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_BIN, GstBinClass)) diff --git a/gst/gstelement.c b/gst/gstelement.c index 1d90bd609a..16d5de119e 100644 --- a/gst/gstelement.c +++ b/gst/gstelement.c @@ -131,15 +131,15 @@ static xmlNodePtr gst_element_save_thyself (GstObject * object, static void gst_element_restore_thyself (GstObject * parent, xmlNodePtr self); #endif -GType _gst_element_type = 0; - static GstObjectClass *parent_class = NULL; static guint gst_element_signals[LAST_SIGNAL] = { 0 }; GType gst_element_get_type (void) { - if (!_gst_element_type) { + static GType gst_element_type = 0; + + if (!gst_element_type) { static const GTypeInfo element_info = { sizeof (GstElementClass), gst_element_base_class_init, @@ -153,10 +153,10 @@ gst_element_get_type (void) NULL }; - _gst_element_type = g_type_register_static (GST_TYPE_OBJECT, "GstElement", + gst_element_type = g_type_register_static (GST_TYPE_OBJECT, "GstElement", &element_info, G_TYPE_FLAG_ABSTRACT); } - return _gst_element_type; + return gst_element_type; } static void diff --git a/gst/gstelement.h b/gst/gstelement.h index e4379612e1..c6e4f6cc05 100644 --- a/gst/gstelement.h +++ b/gst/gstelement.h @@ -55,9 +55,7 @@ typedef enum { G_BEGIN_DECLS -GST_EXPORT GType _gst_element_type; - -#define GST_TYPE_ELEMENT (_gst_element_type) +#define GST_TYPE_ELEMENT (gst_element_get_type ()) #define GST_IS_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_ELEMENT)) #define GST_IS_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_ELEMENT)) #define GST_ELEMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_ELEMENT, GstElementClass)) diff --git a/gst/gstobject.c b/gst/gstobject.c index 5c46c67b6a..4f594e0b2e 100644 --- a/gst/gstobject.c +++ b/gst/gstobject.c @@ -138,7 +138,6 @@ enum SO_LAST_SIGNAL }; -GType _gst_object_type = 0; static GHashTable *object_name_counts = NULL; G_LOCK_DEFINE_STATIC (object_name_mutex); @@ -186,7 +185,9 @@ static guint gst_object_signals[LAST_SIGNAL] = { 0 }; GType gst_object_get_type (void) { - if (!_gst_object_type) { + static GType gst_object_type = 0; + + if (!gst_object_type) { static const GTypeInfo object_info = { sizeof (GstObjectClass), NULL, @@ -200,11 +201,11 @@ gst_object_get_type (void) NULL }; - _gst_object_type = + gst_object_type = g_type_register_static (G_TYPE_OBJECT, "GstObject", &object_info, G_TYPE_FLAG_ABSTRACT); } - return _gst_object_type; + return gst_object_type; } static void diff --git a/gst/gstobject.h b/gst/gstobject.h index dbb6db5f35..dcced647a5 100644 --- a/gst/gstobject.h +++ b/gst/gstobject.h @@ -30,9 +30,7 @@ G_BEGIN_DECLS -GST_EXPORT GType _gst_object_type; - -#define GST_TYPE_OBJECT (_gst_object_type) +#define GST_TYPE_OBJECT (gst_object_get_type ()) #define GST_IS_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_OBJECT)) #define GST_IS_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_OBJECT)) #define GST_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_OBJECT, GstObjectClass)) diff --git a/gst/gstpad.c b/gst/gstpad.c index 480c464c3f..202ded04af 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -95,8 +95,6 @@ enum /* FILL ME */ }; -GType _gst_pad_type = 0; - static void gst_pad_class_init (GstPadClass * klass); static void gst_pad_init (GstPad * pad); static void gst_pad_dispose (GObject * object); @@ -186,7 +184,9 @@ gst_flow_to_quark (GstFlowReturn ret) GType gst_pad_get_type (void) { - if (!_gst_pad_type) { + static GType gst_pad_type = 0; + + if (!gst_pad_type) { static const GTypeInfo pad_info = { sizeof (GstPadClass), NULL, NULL, (GClassInitFunc) gst_pad_class_init, NULL, NULL, @@ -196,7 +196,7 @@ gst_pad_get_type (void) }; gint i; - _gst_pad_type = g_type_register_static (GST_TYPE_OBJECT, "GstPad", + gst_pad_type = g_type_register_static (GST_TYPE_OBJECT, "GstPad", &pad_info, 0); buffer_quark = g_quark_from_static_string ("buffer"); @@ -209,7 +209,7 @@ gst_pad_get_type (void) GST_DEBUG_CATEGORY_INIT (debug_dataflow, "GST_DATAFLOW", GST_DEBUG_BOLD | GST_DEBUG_FG_GREEN, "dataflow inside pads"); } - return _gst_pad_type; + return gst_pad_type; } static gboolean diff --git a/gst/gstpad.h b/gst/gstpad.h index 9fdba3968e..93410d5214 100644 --- a/gst/gstpad.h +++ b/gst/gstpad.h @@ -35,12 +35,10 @@ G_BEGIN_DECLS -GST_EXPORT GType _gst_pad_type; - /* * Pad base class */ -#define GST_TYPE_PAD (_gst_pad_type) +#define GST_TYPE_PAD (gst_pad_get_type ()) #define GST_IS_PAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PAD)) #define GST_IS_PAD_FAST(obj) (G_OBJECT_TYPE(obj) == GST_TYPE_PAD) /* necessary? */ #define GST_IS_PAD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_PAD))