toc: Add boxed types for GstToc and GstTocEntry
authorAnton Belka <antonbelka@gmail.com>
Sun, 20 May 2012 22:48:29 +0000 (01:48 +0300)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Mon, 21 May 2012 06:46:48 +0000 (08:46 +0200)
gst/gsttoc.c
gst/gsttoc.h

index f04fbdf..44f3b0a 100644 (file)
 #include "gstpad.h"
 #include "gstquark.h"
 
+G_DEFINE_BOXED_TYPE (GstToc, gst_toc,
+    (GBoxedCopyFunc) gst_toc_copy, (GBoxedFreeFunc) gst_toc_free);
+G_DEFINE_BOXED_TYPE (GstTocEntry, gst_toc_entry,
+    (GBoxedCopyFunc) gst_toc_entry_copy, (GBoxedFreeFunc) gst_toc_entry_free);
+
 /**
  * gst_toc_new:
  *
index b3e0fc0..d59cf84 100644 (file)
@@ -29,6 +29,9 @@
 
 G_BEGIN_DECLS
 
+#define GST_TYPE_TOC (gst_toc_get_type ())
+#define GST_TYPE_TOC_ENTRY (gst_toc_entry_get_type ())
+
 typedef struct _GstTocEntry GstTocEntry;
 typedef struct _GstToc GstToc;
 
@@ -90,6 +93,10 @@ struct _GstToc {
   gpointer _gst_reserved[GST_PADDING];
 };
 
+/* functions to return type structures */
+GType           gst_toc_get_type                (void);
+GType           gst_toc_entry_get_type          (void);
+
 /* functions to create new structures */
 GstToc *        gst_toc_new                     (void);
 GstTocEntry *   gst_toc_entry_new               (GstTocEntryType type, const gchar *uid);