2005-11-11 Wim Taymans <wim@fluendo.com>
+ * gst/gstbuffer.c: (_gst_buffer_copy):
+ Copy more flags.
+
+ * gst/gstcaps.c: (gst_caps_is_equal):
+ Fix some docs.
+ Make _is_equal fast in the trivial cases.
+
+ * gst/gstminiobject.c:
+ * gst/gstminiobject.h:
+ More docs. Spifify .h file.
+
+ * gst/gstutils.c:
+ Small doc update.
+
+2005-11-11 Wim Taymans <wim@fluendo.com>
+
* gst/base/gstbasetransform.c:
(gst_base_transform_prepare_output_buf),
(gst_base_transform_handle_buffer):
gboolean
gst_caps_is_equal (const GstCaps * caps1, const GstCaps * caps2)
{
+ /* NULL <-> NULL is allowed here */
+ if (caps1 == caps2)
+ return TRUE;
+
g_return_val_if_fail (caps1 != NULL, FALSE);
g_return_val_if_fail (caps2 != NULL, FALSE);
* @caps: a pointer to #GstCaps
* @newcaps: a #GstCaps to replace *caps
*
- * Replaces *caps with @newcaps. Frees the #GstCaps in the location
+ * Replaces *caps with @newcaps. Unrefs the #GstCaps in the location
* pointed to by @caps, if applicable, then modifies @caps to point to
- * @newcaps.
+ * @newcaps. An additional ref on @newcaps is taken.
*/
void
gst_caps_replace (GstCaps ** caps, GstCaps * newcaps)
/**
* gst_mini_object_new:
- * @type: the GType of the mini-object to create
+ * @type: the #GType of the mini-object to create
*
* Creates a new mini-object of the desired type.
*
* @mini_object: the mini-object to check
*
* Checks if a mini-object is writable. A mini-object is writable
- * if the reference count is one and the GST_MINI_OBJECT_FLAG_READONLY
+ * if the reference count is one and the #GST_MINI_OBJECT_FLAG_READONLY
* flag is not set. Modification of a mini-object should only be
* done after verifying that it is writable.
*
*/
#define GST_MINI_OBJECT_REFCOUNT_VALUE(obj) (g_atomic_int_get (&(GST_MINI_OBJECT_CAST(obj))->refcount))
+/**
+ * GstMiniObject:
+ * @instance: type instance
+ * @refcount: atomic refcount
+ * @flags: extra flags.
+ *
+ * Base class for refcounted lightweight objects.
+ */
struct _GstMiniObject {
GTypeInstance instance;
+ /*< public >*/ /* with COW */
gint refcount;
guint flags;
+ /*< private >*/
gpointer _gst_reserved[GST_PADDING];
};
GstMiniObjectCopyFunction copy;
GstMiniObjectFinalizeFunction finalize;
+ /*< private >*/
gpointer _gst_reserved[GST_PADDING];
};
-GType gst_mini_object_get_type (void);
-
-GstMiniObject * gst_mini_object_new (GType type);
-GstMiniObject * gst_mini_object_copy (const GstMiniObject *mini_object);
-gboolean gst_mini_object_is_writable (const GstMiniObject *mini_object);
-GstMiniObject * gst_mini_object_make_writable (GstMiniObject *mini_object);
+GType gst_mini_object_get_type (void);
-GstMiniObject * gst_mini_object_ref (GstMiniObject *mini_object);
-void gst_mini_object_unref (GstMiniObject *mini_object);
+GstMiniObject* gst_mini_object_new (GType type);
+GstMiniObject* gst_mini_object_copy (const GstMiniObject *mini_object);
+gboolean gst_mini_object_is_writable (const GstMiniObject *mini_object);
+GstMiniObject* gst_mini_object_make_writable (GstMiniObject *mini_object);
-void gst_mini_object_replace (GstMiniObject **olddata, GstMiniObject *newdata);
+/* refcounting */
+GstMiniObject* gst_mini_object_ref (GstMiniObject *mini_object);
+void gst_mini_object_unref (GstMiniObject *mini_object);
+void gst_mini_object_replace (GstMiniObject **olddata, GstMiniObject *newdata);
-GParamSpec * gst_param_spec_mini_object (const char *name, const char *nick,
- const char *blurb, GType object_type, GParamFlags flags);
+/* GParamSpec */
+GParamSpec* gst_param_spec_mini_object (const char *name, const char *nick,
+ const char *blurb, GType object_type,
+ GParamFlags flags);
-void gst_value_set_mini_object (GValue *value, GstMiniObject *mini_object);
-void gst_value_take_mini_object (GValue *value, GstMiniObject *mini_object);
-GstMiniObject * gst_value_get_mini_object (const GValue *value);
+/* GValue stuff */
+void gst_value_set_mini_object (GValue *value, GstMiniObject *mini_object);
+void gst_value_take_mini_object (GValue *value, GstMiniObject *mini_object);
+GstMiniObject* gst_value_get_mini_object (const GValue *value);
G_END_DECLS