From 157471889e8d1f61846bea6a788f361ecf6af917 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Tue, 20 Feb 2024 08:54:11 +0100 Subject: [PATCH] meta: Skip gst_meta_info_new in gir ``` gstmeta.c:500: Warning: Gst: gst_meta_info_new: return value: Invalid non-constant return of bare structure or union; register as boxed type or (skip) ``` Skip this for now Part-of: --- girs/Gst-1.0.gir | 51 +++++++++++++++++++++++++++++ subprojects/gstreamer/gst/gstmeta.c | 2 +- 2 files changed, 52 insertions(+), 1 deletion(-) diff --git a/girs/Gst-1.0.gir b/girs/Gst-1.0.gir index a3a23bca34..ac19229358 100644 --- a/girs/Gst-1.0.gir +++ b/girs/Gst-1.0.gir @@ -52389,6 +52389,57 @@ not allow to determine that size, @consumed is set to 0. + + Creates a new structure that needs to be filled before being +registered. This structure should filled and then registered with +gst_meta_info_register(). + +Example: +```c +const GstMetaInfo * +gst_my_meta_get_info (void) +{ + static const GstMetaInfo *meta_info = NULL; + + if (g_once_init_enter ((GstMetaInfo **) & meta_info)) { + GstMetaInfo *info = gst_meta_info_new ( + gst_my_meta_api_get_type (), + "GstMyMeta", + sizeof (GstMyMeta)); + const GstMetaInfo *meta = NULL; + + info->init_func = my_meta_init; + info->free_func = my_meta_free; + info->transform_func = my_meta_transform; + info->serialize_func = my_meta_serialize; + info->deserialize_func = my_meta_deserialize; + meta = gst_meta_info_register (info); + g_once_init_leave ((GstMetaInfo **) & meta_info, (GstMetaInfo *) meta); + } + + return meta_info; +} +``` + + + a new #GstMetaInfo that needs to be filled + + + + + the type of the #GstMeta API + + + + the name of the #GstMeta implementation + + + + the size of the #GstMeta structure + + + + Register a new #GstMeta implementation. diff --git a/subprojects/gstreamer/gst/gstmeta.c b/subprojects/gstreamer/gst/gstmeta.c index 772cf38a88..6667aff844 100644 --- a/subprojects/gstreamer/gst/gstmeta.c +++ b/subprojects/gstreamer/gst/gstmeta.c @@ -461,7 +461,7 @@ gst_meta_register (GType api, const gchar * impl, gsize size, } /** - * gst_meta_info_new: + * gst_meta_info_new: (skip): * @api: the type of the #GstMeta API * @impl: the name of the #GstMeta implementation * @size: the size of the #GstMeta structure