aboutsummaryrefslogtreecommitdiff
path: root/gst/gstmeta.c
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2013-09-19 12:31:13 +0200
committerSebastian Dröge <slomo@circular-chaos.org>2013-09-19 12:31:13 +0200
commit63f3a12981d4257915f0c1651ab409a08a1c66f8 (patch)
treeaede32630d47ab14da0fb9ca006a363ae3407dc3 /gst/gstmeta.c
parent63f38155df9cb281e4d48dbc14389e66446436f2 (diff)
Imported Upstream version 1.1.90upstream/1.1.90
Diffstat (limited to 'gst/gstmeta.c')
-rw-r--r--gst/gstmeta.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/gst/gstmeta.c b/gst/gstmeta.c
index 819c72e..51936a3 100644
--- a/gst/gstmeta.c
+++ b/gst/gstmeta.c
@@ -98,6 +98,10 @@ gst_meta_api_type_register (const gchar * api, const gchar ** tags)
GINT_TO_POINTER (TRUE));
}
}
+
+ g_type_set_qdata (type, g_quark_from_string ("tags"),
+ g_strdupv ((gchar **) tags));
+
return type;
}
@@ -120,6 +124,28 @@ gst_meta_api_type_has_tag (GType api, GQuark tag)
}
/**
+ * 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;
+}
+
+/**
* gst_meta_register:
* @api: the type of the #GstMeta API
* @impl: the name of the #GstMeta implementation