gstreamer_core/gst/gstindexfactory.c
branchRCL_3
changeset 30 7e817e7e631c
parent 29 567bb019e3e3
--- a/gstreamer_core/gst/gstindexfactory.c	Tue Aug 31 15:30:33 2010 +0300
+++ b/gstreamer_core/gst/gstindexfactory.c	Wed Sep 01 12:16:41 2010 +0100
@@ -43,12 +43,46 @@
 static GstPluginFeatureClass *factory_parent_class = NULL;
 
 /* static guint gst_index_factory_signals[LAST_SIGNAL] = { 0 }; */
-G_DEFINE_TYPE (GstIndexFactory, gst_index_factory, GST_TYPE_PLUGIN_FEATURE);
+#ifdef __SYMBIAN32__
+EXPORT_C
+#endif
+
+
+GType
+gst_index_factory_get_type (void)
+{
+  static GType indexfactory_type = 0;
+
+  if (G_UNLIKELY (indexfactory_type == 0)) {
+    static const GTypeInfo indexfactory_info = {
+      sizeof (GstIndexFactoryClass),
+      NULL,
+      NULL,
+      (GClassInitFunc) gst_index_factory_class_init,
+      NULL,
+      NULL,
+      sizeof (GstIndexFactory),
+      0,
+      NULL,
+      NULL
+    };
+
+    indexfactory_type = g_type_register_static (GST_TYPE_PLUGIN_FEATURE,
+        "GstIndexFactory", &indexfactory_info, 0);
+  }
+  return indexfactory_type;
+}
 
 static void
 gst_index_factory_class_init (GstIndexFactoryClass * klass)
 {
-  GObjectClass *gobject_class = (GObjectClass *) klass;
+  GObjectClass *gobject_class;
+  GstObjectClass *gstobject_class;
+  GstPluginFeatureClass *gstpluginfeature_class;
+
+  gobject_class = (GObjectClass *) klass;
+  gstobject_class = (GstObjectClass *) klass;
+  gstpluginfeature_class = (GstPluginFeatureClass *) klass;
 
   factory_parent_class = g_type_class_peek_parent (klass);
 
@@ -56,11 +90,6 @@
 }
 
 static void
-gst_index_factory_init (GstIndexFactory * factory)
-{
-}
-
-static void
 gst_index_factory_finalize (GObject * object)
 {
   GstIndexFactory *factory = GST_INDEX_FACTORY (object);
@@ -200,33 +229,13 @@
 gst_index_factory_make (const gchar * name)
 {
   GstIndexFactory *factory;
-  GstIndex *index;
 
   g_return_val_if_fail (name != NULL, NULL);
 
   factory = gst_index_factory_find (name);
 
   if (factory == NULL)
-    goto no_factory;
-
-  index = gst_index_factory_create (factory);
-
-  if (index == NULL)
-    goto create_failed;
-
-  gst_object_unref (factory);
-  return index;
+    return NULL;
 
-  /* ERRORS */
-no_factory:
-  {
-    GST_INFO ("no such index factory \"%s\"!", name);
-    return NULL;
-  }
-create_failed:
-  {
-    GST_INFO_OBJECT (factory, "couldn't create instance!");
-    gst_object_unref (factory);
-    return NULL;
-  }
+  return gst_index_factory_create (factory);
 }