Ejemplo n.º 1
0
EXPORT_C
#endif

gboolean
gst_is_tag_list (gconstpointer p)
{
  GstStructure *s = (GstStructure *) p;

  g_return_val_if_fail (p != NULL, FALSE);

  return (GST_IS_STRUCTURE (s) && s->name == gst_tag_list_quark);
}
gboolean
gst_media_descriptor_parser_add_taglist (GstMediaDescriptorParser * parser,
    GstTagList * taglist)
{
  GList *tmptag;
  TagsNode *tagsnode;

  g_return_val_if_fail (GST_IS_MEDIA_DESCRIPTOR_PARSER (parser), FALSE);
  g_return_val_if_fail (((GstMediaDescriptor *) parser)->filenode, FALSE);
  g_return_val_if_fail (GST_IS_STRUCTURE (taglist), FALSE);

  tagsnode = ((GstMediaDescriptor *) parser)->filenode->tags;

  for (tmptag = tagsnode->tags; tmptag; tmptag = tmptag->next) {
    if (tag_node_compare ((TagNode *) tmptag->data, taglist)) {
      GST_DEBUG ("Adding tag %" GST_PTR_FORMAT, taglist);
      return TRUE;
    }
  }

  return FALSE;
}