g_type_class_ref() other types as well, see #349410 and #64764.

Original commit message from CVS:
* 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().
This commit is contained in:
Tim-Philipp Müller 2007-11-01 21:50:05 +00:00
parent b826ab6612
commit 99a41cefe3
7 changed files with 28 additions and 28 deletions

View file

@ -1,3 +1,15 @@
2007-11-01 Tim-Philipp Müller <tim at centricular dot net>
* 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 <tim at centricular dot net>
* gst/gstformat.c: (_gst_format_initialize):

View file

@ -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 ();

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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 ());
}
/**

View file

@ -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");