diff --git a/ChangeLog b/ChangeLog index b1b15343f4..1be321e315 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2007-11-01 Tim-Philipp Müller + + * gst/gst.c: (init_post): + * gst/gstevent.c: (_gst_event_initialize): + * gst/gstquery.c: (_gst_query_initialize): + * libs/gst/dataprotocol/dataprotocol.c (gst_dp_init): + g_type_class_ref() other types as well, see #349410 and #64764. + + * gst/gstbuffer.c: (_gst_buffer_initialize): + * gst/gstmessage.c: (_gst_message_initialize): + Simplify existing g_type_class_ref(). + 2007-11-01 Tim-Philipp Müller * gst/gstformat.c: (_gst_format_initialize): diff --git a/gst/gst.c b/gst/gst.c index 9573af10b8..da4211498d 100644 --- a/gst/gst.c +++ b/gst/gst.c @@ -968,15 +968,15 @@ init_post (GOptionContext * context, GOptionGroup * group, gpointer data, _priv_gst_quarks_initialize (); _gst_format_initialize (); _gst_query_initialize (); - gst_object_get_type (); - gst_pad_get_type (); - gst_element_factory_get_type (); - gst_element_get_type (); - gst_type_find_factory_get_type (); - gst_bin_get_type (); + g_type_class_ref (gst_object_get_type ()); + g_type_class_ref (gst_pad_get_type ()); + g_type_class_ref (gst_element_factory_get_type ()); + g_type_class_ref (gst_element_get_type ()); + g_type_class_ref (gst_type_find_factory_get_type ()); + g_type_class_ref (gst_bin_get_type ()); #ifndef GST_DISABLE_INDEX - gst_index_factory_get_type (); + g_type_class_ref (gst_index_factory_get_type ()); #endif /* GST_DISABLE_INDEX */ #ifndef GST_DISABLE_URI gst_uri_handler_get_type (); @@ -984,7 +984,7 @@ init_post (GOptionContext * context, GOptionGroup * group, gpointer data, gst_structure_get_type (); _gst_value_initialize (); - gst_param_spec_fraction_get_type (); + g_type_class_ref (gst_param_spec_fraction_get_type ()); gst_caps_get_type (); _gst_event_initialize (); _gst_buffer_initialize (); diff --git a/gst/gstbuffer.c b/gst/gstbuffer.c index c553ac1034..cf26d77c04 100644 --- a/gst/gstbuffer.c +++ b/gst/gstbuffer.c @@ -132,18 +132,11 @@ static GType _gst_buffer_type = 0; void _gst_buffer_initialize (void) { - gpointer ptr; - - gst_buffer_get_type (); - gst_subbuffer_get_type (); - /* the GstMiniObject types need to be class_ref'd once before it can be * done from multiple threads; * see http://bugzilla.gnome.org/show_bug.cgi?id=304551 */ - ptr = g_type_class_ref (GST_TYPE_BUFFER); - g_type_class_unref (ptr); - ptr = g_type_class_ref (_gst_subbuffer_type); - g_type_class_unref (ptr); + g_type_class_ref (gst_buffer_get_type ()); + g_type_class_ref (gst_subbuffer_get_type ()); } GType diff --git a/gst/gstevent.c b/gst/gstevent.c index 2953c18aec..0357581e06 100644 --- a/gst/gstevent.c +++ b/gst/gstevent.c @@ -92,9 +92,9 @@ static GstEvent *_gst_event_copy (GstEvent * event); void _gst_event_initialize (void) { - gst_event_get_type (); - gst_seek_flags_get_type (); - gst_seek_type_get_type (); + g_type_class_ref (gst_event_get_type ()); + g_type_class_ref (gst_seek_flags_get_type ()); + g_type_class_ref (gst_seek_type_get_type ()); } typedef struct diff --git a/gst/gstmessage.c b/gst/gstmessage.c index 81f0105fd5..820d3e2e7a 100644 --- a/gst/gstmessage.c +++ b/gst/gstmessage.c @@ -67,17 +67,12 @@ static GstMessage *_gst_message_copy (GstMessage * message); void _gst_message_initialize (void) { - gpointer ptr; - GST_CAT_INFO (GST_CAT_GST_INIT, "init messages"); - gst_message_get_type (); - /* the GstMiniObject types need to be class_ref'd once before it can be * done from multiple threads; * see http://bugzilla.gnome.org/show_bug.cgi?id=304551 */ - ptr = g_type_class_ref (GST_TYPE_MESSAGE); - g_type_class_unref (ptr); + g_type_class_ref (gst_message_get_type ()); } typedef struct diff --git a/gst/gstquery.c b/gst/gstquery.c index 3ebe70b569..fde1d61a3d 100644 --- a/gst/gstquery.c +++ b/gst/gstquery.c @@ -119,7 +119,7 @@ _gst_query_initialize (void) } g_static_mutex_unlock (&mutex); - gst_query_get_type (); + g_type_class_ref (gst_query_get_type ()); } /** diff --git a/libs/gst/dataprotocol/dataprotocol.c b/libs/gst/dataprotocol/dataprotocol.c index 949fd729f1..b5dea2a1f9 100644 --- a/libs/gst/dataprotocol/dataprotocol.c +++ b/libs/gst/dataprotocol/dataprotocol.c @@ -327,7 +327,7 @@ gst_dp_init (void) _gst_dp_initialized = TRUE; - gst_dp_version_get_type (); + g_type_class_ref (gst_dp_version_get_type ()); GST_DEBUG_CATEGORY_INIT (data_protocol_debug, "gdp", 0, "GStreamer Data Protocol");