+
+ _gst_meta_transform_copy = g_quark_from_static_string ("gst-copy");
+ _gst_meta_tag_memory = g_quark_from_static_string ("memory");
+}
+
+/**
+ * gst_meta_api_type_register:
+ * @api: an API to register
+ * @tags: (array zero-terminated=1): tags for @api
+ *
+ * Register and return a GType for the @api and associate it with
+ * @tags.
+ *
+ * Returns: a unique GType for @api.
+ */
+GType
+gst_meta_api_type_register (const gchar * api, const gchar ** tags)
+{
+ GType type;
+
+ g_return_val_if_fail (api != NULL, 0);
+ g_return_val_if_fail (tags != NULL, 0);
+
+ GST_CAT_DEBUG (GST_CAT_META, "register API \"%s\"", api);
+ type = g_pointer_type_register_static (api);
+
+ if (type != 0) {
+ gint i;
+
+ for (i = 0; tags[i]; i++) {
+ GST_CAT_DEBUG (GST_CAT_META, " adding tag \"%s\"", tags[i]);
+ g_type_set_qdata (type, g_quark_from_string (tags[i]),
+ GINT_TO_POINTER (TRUE));
+ }
+ }
+
+ g_type_set_qdata (type, g_quark_from_string ("tags"),
+ g_strdupv ((gchar **) tags));
+
+ return type;
+}
+
+/**
+ * gst_meta_api_type_has_tag:
+ * @api: an API
+ * @tag: the tag to check
+ *
+ * Check if @api was registered with @tag.
+ *
+ * Returns: %TRUE if @api was registered with @tag.
+ */
+gboolean
+gst_meta_api_type_has_tag (GType api, GQuark tag)
+{
+ g_return_val_if_fail (api != 0, FALSE);
+ g_return_val_if_fail (tag != 0, FALSE);
+
+ return g_type_get_qdata (api, tag) != NULL;
+}
+
+/**
+ * gst_meta_api_type_get_tags:
+ * @api: an API
+ *
+ * Returns: (transfer none) (array zero-terminated=1) (element-type utf8): an array of tags as strings.
+ *
+ * Since: 1.2
+ */
+const gchar *const *
+gst_meta_api_type_get_tags (GType api)
+{
+ const gchar **tags;
+ g_return_val_if_fail (api != 0, FALSE);
+
+ tags = g_type_get_qdata (api, g_quark_from_string ("tags"));
+
+ if (!tags[0])
+ return NULL;
+
+ return (const gchar * const *) tags;