From 61e11b0fc4a3029ba1e5f6cf3e5119b420e38eea Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Mon, 9 Aug 2010 18:04:08 -0300 Subject: [PATCH] xmp: exif: Adds GST_TAG_APPLICATION_NAME mappings adds xmp and exif helper library mappings for GST_TAG_APPLICATION_NAME tag. --- gst-libs/gst/tag/gstexiftag.c | 1 + gst-libs/gst/tag/gstxmptag.c | 2 ++ tests/check/libs/tag.c | 5 +++++ 3 files changed, 8 insertions(+) diff --git a/gst-libs/gst/tag/gstexiftag.c b/gst-libs/gst/tag/gstexiftag.c index baf7822..4d01435 100644 --- a/gst-libs/gst/tag/gstexiftag.c +++ b/gst-libs/gst/tag/gstexiftag.c @@ -181,6 +181,7 @@ static const GstExifTagMatch tag_map_ifd0[] = { {GST_TAG_DEVICE_MODEL, 0x110, EXIF_TYPE_ASCII, 0, NULL, NULL}, {GST_TAG_IMAGE_ORIENTATION, 0x112, EXIF_TYPE_SHORT, 0, serialize_orientation, deserialize_orientation}, + {GST_TAG_APPLICATION_NAME, 0x131, EXIF_TYPE_ASCII, 0, NULL, NULL}, {GST_TAG_ARTIST, 0x13B, EXIF_TYPE_ASCII, 0, NULL, NULL}, {GST_TAG_COPYRIGHT, 0x8298, EXIF_TYPE_ASCII, 0, NULL, NULL}, {NULL, EXIF_IFD_TAG, EXIF_TYPE_LONG, 0, NULL, NULL}, diff --git a/gst-libs/gst/tag/gstxmptag.c b/gst-libs/gst/tag/gstxmptag.c index 38b5533..e57c4c3 100644 --- a/gst-libs/gst/tag/gstxmptag.c +++ b/gst-libs/gst/tag/gstxmptag.c @@ -827,6 +827,8 @@ _init_xmp_tag_map () NULL); _gst_xmp_schema_add_simple_mapping (schema, GST_TAG_DEVICE_MODEL, "tiff:Model", GST_XMP_TAG_TYPE_SIMPLE, NULL, NULL); + _gst_xmp_schema_add_simple_mapping (schema, GST_TAG_APPLICATION_NAME, + "tiff:Software", GST_XMP_TAG_TYPE_SIMPLE, NULL, NULL); _gst_xmp_schema_add_simple_mapping (schema, GST_TAG_IMAGE_ORIENTATION, "tiff:Orientation", GST_XMP_TAG_TYPE_SIMPLE, serialize_tiff_orientation, deserialize_tiff_orientation); diff --git a/tests/check/libs/tag.c b/tests/check/libs/tag.c index e29c313..e561dce 100644 --- a/tests/check/libs/tag.c +++ b/tests/check/libs/tag.c @@ -964,6 +964,8 @@ GST_START_TEST (test_xmp_tags_serialization_deserialization) &value); do_simple_xmp_tag_serialization_deserialization (GST_TAG_DEVICE_MODEL, &value); + do_simple_xmp_tag_serialization_deserialization (GST_TAG_APPLICATION_NAME, + &value); g_value_set_static_string (&value, "rotate-0"); do_simple_xmp_tag_serialization_deserialization (GST_TAG_IMAGE_ORIENTATION, @@ -1247,6 +1249,9 @@ GST_START_TEST (test_exif_tags_serialization_deserialization) do_simple_exif_tag_serialization_deserialization (GST_TAG_COPYRIGHT, &value); g_value_set_static_string (&value, "ty"); do_simple_exif_tag_serialization_deserialization (GST_TAG_ARTIST, &value); + g_value_set_static_string (&value, "Company Software 1.2b (info)"); + do_simple_exif_tag_serialization_deserialization (GST_TAG_APPLICATION_NAME, + &value); /* image orientation tests */ g_value_set_static_string (&value, "rotate-0"); -- 2.7.4