+2004-02-27 Benjamin Otte <otte@gnome.org>
+
+ * gst/gstbuffer.h:
+ remove gst_buffer_free, use gst_data_unref
+ * gst/gstdata.c: (gst_data_get_type):
+ use refcounting in GstData GBoxed registration
+ * gst/gstdata.h:
+ remove gst_data_free, use gst_data_unref
+
2004-02-27 Johan Dahlin <johan@gnome.org>
* gst/gstdata.c (gst_data_get_type): New function, register
#define gst_buffer_copy(buf) GST_BUFFER (gst_data_copy (GST_DATA (buf)))
#define gst_buffer_is_writable(buf) gst_data_is_writable (GST_DATA (buf))
#define gst_buffer_copy_on_write(buf) GST_BUFFER (gst_data_copy_on_write (GST_DATA (buf)))
-#define gst_buffer_free(buf) gst_data_free (GST_DATA (buf))
/* creating a subbuffer */
GstBuffer* gst_buffer_create_sub (GstBuffer *parent, guint offset, guint size);
if (!type)
type = g_boxed_type_register_static ("GstData",
- (GBoxedCopyFunc) gst_data_copy,
- (GBoxedFreeFunc) gst_data_free);
+ (GBoxedCopyFunc) gst_data_ref,
+ (GBoxedFreeFunc) gst_data_unref);
return type;
}
}
/**
- * gst_data_free:
- * @data: a #GstData to free
- *
- * Frees the given #GstData. This function will call the custom free function
- * provided by the subclass.
- */
-void
-gst_data_free (GstData *data)
-{
- if (!data)
- return;
-
- if (data->free)
- data->free (data);
-}
-
-/**
* gst_data_ref:
* @data: a #GstData to reference
*
GstData* gst_data_copy (const GstData *data);
gboolean gst_data_is_writable (GstData *data);
GstData* gst_data_copy_on_write (GstData *data);
-void gst_data_free (GstData *data);
/* reference counting */
GstData* gst_data_ref (GstData* data);