#define GST_MINI_OBJECT_REFCOUNT_VALUE(obj) (g_atomic_int_get (&(GST_MINI_OBJECT_CAST(obj))->refcount))
/**
+ * GstMiniObjectWeakNotify:
+ * @data: data that was provided when the weak reference was established
+ * @where_the_mini_object_was: the mini object being finalized
+ *
+ * A #GstMiniObjectWeakNotify function can be added to a mini object as a
+ * callback that gets triggered when the mini object is finalized. Since the
+ * mini object is already being finalized when the #GstMiniObjectWeakNotify is
+ * called, there's not much you could do with the object, apart from e.g. using
+ * its adress as hash-index or the like.
+ */
+typedef void (*GstMiniObjectWeakNotify) (gpointer data,
+ GstMiniObject * where_the_mini_object_was);
+
+typedef struct _GstMiniObjectPrivateData GstMiniObjectPrivateData;
+
+/**
* GstMiniObject:
* @instance: type instance
* @refcount: atomic refcount
guint flags;
/*< private >*/
- gpointer _gst_reserved;
+ GstMiniObjectPrivateData *priv;
};
struct _GstMiniObjectClass {
/* refcounting */
GstMiniObject* gst_mini_object_ref (GstMiniObject *mini_object);
void gst_mini_object_unref (GstMiniObject *mini_object);
+void gst_mini_object_weak_ref (GstMiniObject *object,
+ GstMiniObjectWeakNotify notify,
+ gpointer data);
+void gst_mini_object_weak_unref (GstMiniObject *object,
+ GstMiniObjectWeakNotify notify,
+ gpointer data);
void gst_mini_object_replace (GstMiniObject **olddata, GstMiniObject *newdata);
/* GParamSpec */