Commit 6e0e7820 authored by Wim Taymans's avatar Wim Taymans

meta: add method to check for a tag

parent 549347f8
......@@ -126,3 +126,27 @@ gst_meta_get_info (const gchar * impl)
return info;
}
/*
* gst_meta_info_has_tag:
* @info: a #GstMetaInfo
* @tag: a #GQuark
*
* Check if @info contains @tag.
*
* Returns: %TRUE when @info contains @tag.
*/
gboolean
gst_meta_info_has_tag (const GstMetaInfo * info, GQuark tag)
{
gint i;
g_return_val_if_fail (info != NULL, FALSE);
g_return_val_if_fail (tag != 0, FALSE);
for (i = 0; info->tags[i]; i++)
if (info->tags[i] == tag)
return TRUE;
return FALSE;
}
......@@ -190,6 +190,8 @@ const GstMetaInfo * gst_meta_register (const gchar *api, const gchar *im
const gchar **tags);
const GstMetaInfo * gst_meta_get_info (const gchar * impl);
gboolean gst_meta_info_has_tag (const GstMetaInfo *info, GQuark tag);
G_END_DECLS
#endif /* __GST_META_H__ */
......@@ -586,6 +586,7 @@ EXPORTS
gst_message_type_to_quark
gst_meta_flags_get_type
gst_meta_get_info
gst_meta_info_has_tag
gst_meta_register
gst_mini_object_copy
gst_mini_object_flags_get_type
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment