From 1627222aa5dbf5535ba1a75df67e856abdce6242 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Thu, 9 Jul 2020 07:57:01 -0400 Subject: [PATCH] taglist: Stop inlining gst_tag_list_copy This way it gets exposed to bindings through GObject Introspection. Same logic as with d1b2d3429c66d80b8d38f9afc6a8dfca49f3a71a Part-of: --- gst/gsttaglist.c | 21 +++++++++++++++++++++ gst/gsttaglist.h | 26 ++++---------------------- 2 files changed, 25 insertions(+), 22 deletions(-) diff --git a/gst/gsttaglist.c b/gst/gsttaglist.c index 965630fbea..9a487a4c5e 100644 --- a/gst/gsttaglist.c +++ b/gst/gsttaglist.c @@ -2062,3 +2062,24 @@ gst_tag_list_get_sample_index (const GstTagList * list, *sample = g_value_dup_boxed (v); return (*sample != NULL); } + +/** + * gst_tag_list_copy: + * @taglist: a #GstTagList. + * + * Creates a new #GstTagList as a copy of the old @taglist. The new taglist + * will have a refcount of 1, owned by the caller, and will be writable as + * a result. + * + * Note that this function is the semantic equivalent of a gst_tag_list_ref() + * followed by a gst_tag_list_make_writable(). If you only want to hold on to a + * reference to the data, you should use gst_tag_list_ref(). + * + * When you are finished with the taglist, call gst_tag_list_unref() on it. + * + * Returns: the new #GstTagList + */ +GstTagList *(gst_tag_list_copy) (const GstTagList * taglist) +{ + return GST_TAG_LIST (gst_mini_object_copy (GST_MINI_OBJECT_CAST (taglist))); +} diff --git a/gst/gsttaglist.h b/gst/gsttaglist.h index 156c745326..1207ba6072 100644 --- a/gst/gsttaglist.h +++ b/gst/gsttaglist.h @@ -453,28 +453,10 @@ gst_clear_tag_list (GstTagList ** taglist_ptr) gst_clear_mini_object ((GstMiniObject **) taglist_ptr); } -/** - * gst_tag_list_copy: (skip) - * @taglist: a #GstTagList. - * - * Creates a new #GstTagList as a copy of the old @taglist. The new taglist - * will have a refcount of 1, owned by the caller, and will be writable as - * a result. - * - * Note that this function is the semantic equivalent of a gst_tag_list_ref() - * followed by a gst_tag_list_make_writable(). If you only want to hold on to a - * reference to the data, you should use gst_tag_list_ref(). - * - * When you are finished with the taglist, call gst_tag_list_unref() on it. - * - * Returns: the new #GstTagList - */ -static inline GstTagList* gst_tag_list_copy(const GstTagList* taglist); -static inline GstTagList * -gst_tag_list_copy (const GstTagList * taglist) -{ - return GST_TAG_LIST (gst_mini_object_copy (GST_MINI_OBJECT_CAST (taglist))); -} +GST_API +GstTagList* gst_tag_list_copy(const GstTagList* taglist); + +#define gst_tag_list_copy(taglist) GST_TAG_LIST (gst_mini_object_copy (GST_MINI_OBJECT_CAST (taglist))) /** * gst_tag_list_replace: