index c680eaa4082b04480f4cdf3e924e3534eb843b5e..fd276fae446aa48ce388c003e1a5b5067f603330 100644 (file)
/* FILL ME */
};
-static void gst_mem_index_class_init (GstMemIndexClass * klass);
-static void gst_mem_index_init (GstMemIndex * index);
static void gst_mem_index_finalize (GObject * object);
static void gst_mem_index_add_entry (GstIndex * index, GstIndexEntry * entry);
@@ -118,35 +116,11 @@ static GstIndexEntry *gst_mem_index_get_assoc_entry (GstIndex * index, gint id,
#define CLASS(mem_index) GST_MEM_INDEX_CLASS (G_OBJECT_GET_CLASS (mem_index))
-static GstIndex *parent_class = NULL;
-
/*static guint gst_mem_index_signals[LAST_SIGNAL] = { 0 }; */
-static GType
-gst_mem_index_get_type (void)
-{
- static GType mem_index_type = 0;
-
- if (!mem_index_type) {
- static const GTypeInfo mem_index_info = {
- sizeof (GstMemIndexClass),
- NULL,
- NULL,
- (GClassInitFunc) gst_mem_index_class_init,
- NULL,
- NULL,
- sizeof (GstMemIndex),
- 1,
- (GInstanceInitFunc) gst_mem_index_init,
- NULL
- };
-
- mem_index_type =
- g_type_register_static (GST_TYPE_INDEX, "GstMemIndex", &mem_index_info,
- 0);
- }
- return mem_index_type;
-}
+GType gst_mem_index_get_type (void);
+
+G_DEFINE_TYPE (GstMemIndex, gst_mem_index, GST_TYPE_INDEX);
static void
gst_mem_index_class_init (GstMemIndexClass * klass)
gobject_class = (GObjectClass *) klass;
gstindex_class = (GstIndexClass *) klass;
- parent_class = g_type_class_peek_parent (klass);
-
gobject_class->finalize = gst_mem_index_finalize;
gstindex_class->add_entry = GST_DEBUG_FUNCPTR (gst_mem_index_add_entry);
memindex->associations = NULL;
}
- G_OBJECT_CLASS (parent_class)->finalize (object);
+ G_OBJECT_CLASS (gst_mem_index_parent_class)->finalize (object);
}
static void
return FALSE;
}
- GST_PLUGIN_FEATURE (factory)->plugin_name = g_strdup (plugin->desc.name);
+ GST_PLUGIN_FEATURE (factory)->plugin_name = plugin->desc.name;
GST_PLUGIN_FEATURE (factory)->loaded = TRUE;
gst_registry_add_feature (gst_registry_get_default (),