miniobjects: pass copy, dispose and free function to gst_mini_object_init()
[platform/upstream/gstreamer.git] / gst / gsttaglist.c
index ebefb15..9d6a076 100644 (file)
@@ -52,8 +52,6 @@
 
 #define GST_TAG_IS_VALID(tag)           (gst_tag_get_info (tag) != NULL)
 
-/* FIXME 0.11: make taglists refcounted maybe? */
-/* a tag list is basically a structure, but we don't make this fact public */
 typedef struct _GstTagListImpl
 {
   GstTagList taglist;
@@ -63,11 +61,6 @@ typedef struct _GstTagListImpl
 
 #define GST_TAG_LIST_STRUCTURE(taglist)  ((GstTagListImpl*)(taglist))->structure
 
-
-/* FIXME 0.11: use GParamSpecs or something similar for tag registrations,
- * possibly even gst_tag_register(). Especially value ranges might be
- * useful for some tags. */
-
 typedef struct
 {
   GType type;                   /* type the data is in */
@@ -662,17 +655,6 @@ gst_tag_is_fixed (const gchar * tag)
   return info->merge_func == NULL;
 }
 
-static void
-gst_tag_list_init (GstTagList * taglist)
-{
-  gst_mini_object_init (GST_MINI_OBJECT_CAST (taglist),
-      gst_tag_list_get_type ());
-
-  taglist->mini_object.copy = (GstMiniObjectCopyFunction) __gst_tag_list_copy;
-  taglist->mini_object.dispose = NULL;
-  taglist->mini_object.free = (GstMiniObjectFreeFunction) __gst_tag_list_free;
-}
-
 /* takes ownership of the structure */
 static GstTagList *
 gst_tag_list_new_internal (GstStructure * s)
@@ -683,7 +665,9 @@ gst_tag_list_new_internal (GstStructure * s)
 
   tag_list = (GstTagList *) g_slice_new (GstTagListImpl);
 
-  gst_tag_list_init (tag_list);
+  gst_mini_object_init (GST_MINI_OBJECT_CAST (tag_list), GST_TYPE_TAG_LIST,
+      (GstMiniObjectCopyFunction) __gst_tag_list_copy, NULL,
+      (GstMiniObjectFreeFunction) __gst_tag_list_free);
 
   GST_TAG_LIST_STRUCTURE (tag_list) = s;