atomic queue: register as boxed type
authorEvan Nemerson <evan@coeus-group.com>
Fri, 15 Jun 2012 23:14:49 +0000 (16:14 -0700)
committerWim Taymans <wim.taymans@collabora.co.uk>
Mon, 18 Jun 2012 11:15:03 +0000 (13:15 +0200)
gst/gstatomicqueue.c
gst/gstatomicqueue.h

index 812970a..8e11a3d 100644 (file)
  * Since: 0.10.33
  */
 
+G_DEFINE_BOXED_TYPE (GstAtomicQueue, gst_atomic_queue,
+    (GBoxedCopyFunc) gst_atomic_queue_ref,
+    (GBoxedFreeFunc) gst_atomic_queue_unref);
+
 /* By default the queue uses 2 * sizeof(gpointer) * clp2 (max_items) of
  * memory. clp2(x) is the next power of two >= than x.
  *
index e38e9b4..8d4f233 100644 (file)
@@ -27,6 +27,8 @@
 
 G_BEGIN_DECLS
 
+#define GST_TYPE_ATOMIC_QUEUE (gst_atomic_queue_get_type())
+
 /**
  * GstAtomicQueue:
  *
@@ -39,6 +41,8 @@ G_BEGIN_DECLS
 typedef struct _GstAtomicQueue GstAtomicQueue;
 
 
+GType              gst_atomic_queue_get_type    (void);
+
 GstAtomicQueue *   gst_atomic_queue_new         (guint initial_size) G_GNUC_MALLOC;
 
 void               gst_atomic_queue_ref         (GstAtomicQueue * queue);