static inline GstBuffer *
gst_buffer_ref (GstBuffer * buf)
{
- /* not using a macro here because gcc-4.1 will complain
- * if the return value isn't used (because of the cast) */
return (GstBuffer *) gst_mini_object_ref (GST_MINI_OBJECT_CAST (buf));
}
* will be freed. If GST_BUFFER_MALLOCDATA() is non-NULL, this pointer will
* also be freed at this time.
*/
-#define gst_buffer_unref(buf) gst_mini_object_unref (GST_MINI_OBJECT_CAST (buf))
+#ifdef _FOOL_GTK_DOC_
+G_INLINE_FUNC void gst_buffer_unref (GstBuffer * buf);
+#endif
+
+static inline void
+gst_buffer_unref (GstBuffer * buf)
+{
+ gst_mini_object_unref (GST_MINI_OBJECT_CAST (buf));
+}
/* copy buffer */
/**
* Create a copy of the given buffer. This will also make a newly allocated
* copy of the data the source buffer contains.
*/
-#define gst_buffer_copy(buf) GST_BUFFER_CAST (gst_mini_object_copy (GST_MINI_OBJECT_CAST (buf)))
+#ifdef _FOOL_GTK_DOC_
+G_INLINE_FUNC GstBuffer * gst_buffer_copy (const GstBuffer * buf);
+#endif
+
+static inline GstBuffer *
+gst_buffer_copy (const GstBuffer * buf)
+{
+ return GST_BUFFER (gst_mini_object_copy (GST_MINI_OBJECT_CAST (buf)));
+}
+
/**
* GstBufferCopyFlags:
static inline GstEvent *
gst_event_ref (GstEvent * ev)
{
- /* not using a macro here because gcc-4.1 will complain
- * if the return value isn't used (because of the cast) */
return (GstEvent *) gst_mini_object_ref (GST_MINI_OBJECT (ev));
}
*
* Decrease the refcount of an event, freeing it if the refcount reaches 0.
*/
-#define gst_event_unref(ev) gst_mini_object_unref (GST_MINI_OBJECT (ev))
+#ifdef _FOOL_GTK_DOC_
+G_INLINE_FUNC void gst_event_unref (GstEvent * event);
+#endif
+
+static inline void
+gst_event_unref (GstEvent * ev)
+{
+ gst_mini_object_unref (GST_MINI_OBJECT (ev));
+}
/* copy event */
/**
*
* Copy the event using the event specific copy function.
*/
-#define gst_event_copy(ev) GST_EVENT_CAST (gst_mini_object_copy (GST_MINI_OBJECT (ev)))
+#ifdef _FOOL_GTK_DOC_
+G_INLINE_FUNC void gst_event_copy (GstEvent * event);
+#endif
+
+static inline GstEvent *
+gst_event_copy (const GstEvent * ev)
+{
+ return GST_EVENT_CAST (gst_mini_object_copy (GST_MINI_OBJECT (ev)));
+}
+
/* custom event */
GstEvent* gst_event_new_custom (GstEventType type, GstStructure *structure);
static inline GstMessage *
gst_message_ref (GstMessage * msg)
{
- /* not using a macro here because gcc-4.1 will complain
- * if the return value isn't used (because of the cast) */
return (GstMessage *) gst_mini_object_ref (GST_MINI_OBJECT (msg));
}
* Convenience macro to decrease the reference count of the message, possibly
* freeing it.
*/
-#define gst_message_unref(msg) gst_mini_object_unref (GST_MINI_OBJECT (msg))
+#ifdef _FOOL_GTK_DOC_
+G_INLINE_FUNC void gst_message_unref (GstMessage * msg);
+#endif
+
+static inline void
+gst_message_unref (GstMessage * msg)
+{
+ gst_mini_object_unref (GST_MINI_OBJECT_CAST (msg));
+}
+
/* copy message */
/**
* gst_message_copy:
*
* MT safe
*/
-#define gst_message_copy(msg) GST_MESSAGE (gst_mini_object_copy (GST_MINI_OBJECT (msg)))
+#ifdef _FOOL_GTK_DOC_
+G_INLINE_FUNC GstMessage * gst_message_copy (const GstMessage * msg);
+#endif
+
+static inline GstMessage *
+gst_message_copy (const GstMessage * msg)
+{
+ return GST_MESSAGE (gst_mini_object_copy (GST_MINI_OBJECT_CAST (msg)));
+}
+
/**
* gst_message_make_writable:
* @msg: the message to make writable
*
* Increases the refcount of the given query by one.
*/
-#define gst_query_ref(q) GST_QUERY (gst_mini_object_ref (GST_MINI_OBJECT (q)))
+#ifdef _FOOL_GTK_DOC_
+G_INLINE_FUNC GstQuery * gst_query_ref (GstQuery * q);
+#endif
+
+static inline GstQuery *
+gst_query_ref (GstQuery * q)
+{
+ return GST_QUERY (gst_mini_object_ref (GST_MINI_OBJECT_CAST (q)));
+}
+
/**
* gst_query_unref:
* @q: a #GstQuery to decrease the refcount of.
* Decreases the refcount of the query. If the refcount reaches 0, the query
* will be freed.
*/
-#define gst_query_unref(q) gst_mini_object_unref (GST_MINI_OBJECT (q))
+#ifdef _FOOL_GTK_DOC_
+G_INLINE_FUNC void gst_query_unref (GstQuery * q);
+#endif
+
+static inline void
+gst_query_unref (GstQuery * q)
+{
+ gst_mini_object_unref (GST_MINI_OBJECT_CAST (q));
+}
/* copy query */
/**
* Copies the given query using the copy function of the parent #GstData
* structure.
*/
-#define gst_query_copy(q) GST_QUERY (gst_mini_object_copy (GST_MINI_OBJECT (q)))
+#ifdef _FOOL_GTK_DOC_
+G_INLINE_FUNC GstQuery * gst_query_copy (const GstQuery * q);
+#endif
+
+static inline GstQuery *
+gst_query_copy (const GstQuery * q)
+{
+ return GST_QUERY (gst_mini_object_copy (GST_MINI_OBJECT_CAST (q)));
+}
+
/**
* gst_query_make_writable:
* @q: a #GstQuery to make writable