diff options
author | Edgard Lima <edgard.lima@indt.org.br> | 2008-01-30 16:05:24 +0000 |
---|---|---|
committer | Edgard Lima <edgard.lima@indt.org.br> | 2008-01-30 16:05:24 +0000 |
commit | b043a6f5e1c3b69651104c4b0719f4e0d348b04f (patch) | |
tree | c27f2d267004c3e310e4618d3f67cbe52fa5f46e /ext/metadata/metadataxmp.c | |
parent | 568edc33d0764f7186cbed8d9989810bbfb97dce (diff) | |
download | gst-plugins-bad-b043a6f5e1c3b69651104c4b0719f4e0d348b04f.tar.gz gst-plugins-bad-b043a6f5e1c3b69651104c4b0719f4e0d348b04f.tar.bz2 gst-plugins-bad-b043a6f5e1c3b69651104c4b0719f4e0d348b04f.zip |
Add documentation. Speed up a bit png muxer. Fix xmp muxer.
Original commit message from CVS:
Add documentation. Speed up a bit png muxer. Fix xmp muxer.
Diffstat (limited to 'ext/metadata/metadataxmp.c')
-rw-r--r-- | ext/metadata/metadataxmp.c | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/ext/metadata/metadataxmp.c b/ext/metadata/metadataxmp.c index 6712fbdb..8ea71d0a 100644 --- a/ext/metadata/metadataxmp.c +++ b/ext/metadata/metadataxmp.c @@ -154,12 +154,14 @@ typedef struct _tag_SchemaMap #define XMP_SCHEMA_NODE 0x80000000UL +/* *INDENT-OFF* */ static const SchemaTagMap schema_map_dublin_tags_map[] = { - {"description", GST_TAG_DESCRIPTION}, - {"title", GST_TAG_TITLE}, - {"rights", GST_TAG_COPYRIGHT}, + {"description", GST_TAG_DESCRIPTION }, + {"title", GST_TAG_TITLE }, + {"rights", GST_TAG_COPYRIGHT }, {NULL, NULL} }; +/* *INDENT-ON* */ static const SchemaMap schema_map_dublin = { "http://purl.org/dc/elements/1.1/", @@ -799,6 +801,8 @@ metadatamux_xmp_for_each_tag_in_list (const GstTagList * list, for (i = 0; schemas_map[i]; i++) { + /* FIXME: should try to get all of values (index) for the tag */ + const SchemaMap *smap = schemas_map[i]; const SchemaTagMap *stagmap = metadatamux_xmp_get_tagsmap_from_gsttag (smap, tag); @@ -818,8 +822,24 @@ metadatamux_xmp_for_each_tag_in_list (const GstTagList * list, } if (value) { - xmp_set_property (xmp, smap->schema, stagmap->xmp_tag, value); + + uint32_t options = 0; + + if (xmp_get_property_and_bits (xmp, smap->schema, stagmap->xmp_tag, + NULL, &options)) { + + if (XMP_IS_PROP_SIMPLE (options)) { + xmp_set_property (xmp, smap->schema, stagmap->xmp_tag, value); + } else { + xmp_set_array_item (xmp, smap->schema, stagmap->xmp_tag, 1, + value, 0); + } + } else { + xmp_set_property (xmp, smap->schema, stagmap->xmp_tag, value); + } + g_free (value); + } } |