From 10f0319d6293b0f4dcbd39771cc6fab85c54fad8 Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Thu, 23 Sep 2010 10:16:07 -0300 Subject: [PATCH] tags: exif: Add mapping for _HORIZONTAL_ERROR Maps GST_TAG_GEO_LOCATION_HORIZONTAL_ERROR to the GPSHPositionError tag in exif. Tests included. --- gst-libs/gst/tag/gstexiftag.c | 4 ++++ tests/check/libs/tag.c | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/gst-libs/gst/tag/gstexiftag.c b/gst-libs/gst/tag/gstexiftag.c index 14f0ce8..fd025c4 100644 --- a/gst-libs/gst/tag/gstexiftag.c +++ b/gst-libs/gst/tag/gstexiftag.c @@ -261,6 +261,7 @@ EXIF_DESERIALIZATION_FUNC (add_to_pending_tags); #define EXIF_TAG_GPS_TRACK 0xF #define EXIF_TAG_GPS_IMAGE_DIRECTION_REF 0x10 #define EXIF_TAG_GPS_IMAGE_DIRECTION 0x11 +#define EXIF_TAG_GPS_HORIZONTAL_POSITIONING_ERROR 0x1F #define EXIF_TAG_IMAGE_DESCRIPTION 0x10E #define EXIF_TAG_MAKE 0x10F #define EXIF_TAG_MODEL 0x110 @@ -411,6 +412,9 @@ static const GstExifTagMatch tag_map_gps[] = { {GST_TAG_GEO_LOCATION_CAPTURE_DIRECTION, EXIF_TAG_GPS_IMAGE_DIRECTION, EXIF_TYPE_RATIONAL, EXIF_TAG_GPS_IMAGE_DIRECTION_REF, serialize_geo_direction, deserialize_geo_direction}, + {GST_TAG_GEO_LOCATION_HORIZONTAL_ERROR, + EXIF_TAG_GPS_HORIZONTAL_POSITIONING_ERROR, + EXIF_TYPE_RATIONAL, 0, NULL, NULL}, {NULL, 0, 0, 0, NULL, NULL} }; diff --git a/tests/check/libs/tag.c b/tests/check/libs/tag.c index 2a399f7..7077d6e 100644 --- a/tests/check/libs/tag.c +++ b/tests/check/libs/tag.c @@ -1435,6 +1435,13 @@ GST_START_TEST (test_exif_tags_serialization_deserialization) g_value_set_double (&value, 0); do_simple_exif_tag_serialization_deserialization + (GST_TAG_GEO_LOCATION_HORIZONTAL_ERROR, &value); + g_value_set_double (&value, 50.25); + do_simple_exif_tag_serialization_deserialization + (GST_TAG_GEO_LOCATION_HORIZONTAL_ERROR, &value); + + g_value_set_double (&value, 0); + do_simple_exif_tag_serialization_deserialization (GST_TAG_CAPTURING_DIGITAL_ZOOM_RATIO, &value); g_value_set_double (&value, 2.5); do_simple_exif_tag_serialization_deserialization -- 2.7.4