X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gst%2Fgstmeta.c;h=89ebd9d3625174b259034e11c61f8cbb1f43f1df;hb=bb07550c2dc9a62dfaa58701d085f9ff7658d75f;hp=fe8159cbaecb98b5daa2979461098461068848e2;hpb=4c7dbde791fefae95b552e23c108680528561b83;p=platform%2Fupstream%2Fgstreamer.git diff --git a/gst/gstmeta.c b/gst/gstmeta.c index fe8159c..89ebd9d 100644 --- a/gst/gstmeta.c +++ b/gst/gstmeta.c @@ -21,6 +21,7 @@ /** * SECTION:gstmeta + * @title: GstMeta * @short_description: Buffer metadata * * The #GstMeta structure should be included as the first member of a #GstBuffer @@ -42,8 +43,6 @@ * * See #GstBuffer for how the metadata can be added, retrieved and removed from * buffers. - * - * Last reviewed on 2012-03-28 (0.11.3) */ #include "gst_private.h" @@ -71,7 +70,7 @@ _priv_gst_meta_initialize (void) /** * gst_meta_api_type_register: * @api: an API to register - * @tags: tags for @api + * @tags: (array zero-terminated=1): tags for @api * * Register and return a GType for the @api and associate it with * @tags. @@ -139,6 +138,9 @@ gst_meta_api_type_get_tags (GType api) tags = g_type_get_qdata (api, g_quark_from_string ("tags")); + if (!tags[0]) + return NULL; + return (const gchar * const *) tags; } @@ -147,16 +149,17 @@ gst_meta_api_type_get_tags (GType api) * @api: the type of the #GstMeta API * @impl: the name of the #GstMeta implementation * @size: the size of the #GstMeta structure - * @init_func: (scope async) a #GstMetaInitFunction - * @free_func: (scope async) a #GstMetaFreeFunction - * @transform_func: (scope async) a #GstMetaTransformFunction + * @init_func: (scope async): a #GstMetaInitFunction + * @free_func: (scope async): a #GstMetaFreeFunction + * @transform_func: (scope async): a #GstMetaTransformFunction * * Register a new #GstMeta implementation. * * The same @info can be retrieved later with gst_meta_get_info() by using * @impl as the key. * - * Returns: (transfer none): a #GstMetaInfo that can be used to access metadata. + * Returns: (transfer none) (nullable): a #GstMetaInfo that can be used to + * access metadata. */ const GstMetaInfo * @@ -171,6 +174,10 @@ gst_meta_register (GType api, const gchar * impl, gsize size, g_return_val_if_fail (impl != NULL, NULL); g_return_val_if_fail (size != 0, NULL); + if (init_func == NULL) + g_critical ("Registering meta implementation '%s' without init function", + impl); + /* first try to register the implementation name. It's possible * that this fails because it was already registered. Don't warn, * glib did this for us already. */ @@ -204,8 +211,8 @@ gst_meta_register (GType api, const gchar * impl, gsize size, * Lookup a previously registered meta info structure by its implementation name * @impl. * - * Returns: (transfer none): a #GstMetaInfo with @impl, or #NULL when no such - * metainfo exists. + * Returns: (transfer none) (nullable): a #GstMetaInfo with @impl, or + * %NULL when no such metainfo exists. */ const GstMetaInfo * gst_meta_get_info (const gchar * impl)