gstreamer_core/gst/gstxml.c
branchRCL_3
changeset 30 7e817e7e631c
parent 29 567bb019e3e3
--- a/gstreamer_core/gst/gstxml.c	Tue Aug 31 15:30:33 2010 +0300
+++ b/gstreamer_core/gst/gstxml.c	Wed Sep 01 12:16:41 2010 +0100
@@ -30,8 +30,8 @@
  * Additionally one can load saved pipelines into the gst-editor to inspect the
  * graph.
  *
- * #GstElement implementations need to override the save_thyself() and
- * restore_thyself() virtual functions of #GstObject.
+ * #GstElement implementations need to override gst_object_save_thyself() and
+ * gst_object_restore_thyself().
  */
 
 #include "gst_private.h"
@@ -57,12 +57,36 @@
 static GstObjectClass *parent_class = NULL;
 static guint gst_xml_signals[LAST_SIGNAL] = { 0 };
 
-G_DEFINE_TYPE (GstXML, gst_xml, GST_TYPE_OBJECT);
+GType
+gst_xml_get_type (void)
+{
+  static GType xml_type = 0;
+
+  if (G_UNLIKELY (xml_type == 0)) {
+    static const GTypeInfo xml_info = {
+      sizeof (GstXMLClass),
+      NULL,
+      NULL,
+      (GClassInitFunc) gst_xml_class_init,
+      NULL,
+      NULL,
+      sizeof (GstXML),
+      0,
+      (GInstanceInitFunc) gst_xml_init,
+      NULL
+    };
+
+    xml_type = g_type_register_static (GST_TYPE_OBJECT, "GstXML", &xml_info, 0);
+  }
+  return xml_type;
+}
 
 static void
 gst_xml_class_init (GstXMLClass * klass)
 {
-  GObjectClass *gobject_class = (GObjectClass *) klass;
+  GObjectClass *gobject_class;
+
+  gobject_class = (GObjectClass *) klass;
 
   parent_class = g_type_class_peek_parent (klass);