[gst-cvs] gst-plugins-base: tag: exif: Always write FlashPixVersion tag

Thiago Sousa Santos thiagoss at kemper.freedesktop.org
Wed Aug 25 05:16:56 PDT 2010


Module: gst-plugins-base
Branch: master
Commit: 0ea550b0cfda173f7a60f2a20cf99b1d4269d10d
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=0ea550b0cfda173f7a60f2a20cf99b1d4269d10d

Author: Thiago Santos <thiago.sousa.santos at collabora.co.uk>
Date:   Fri Aug 20 16:39:08 2010 -0300

tag: exif: Always write FlashPixVersion tag

FlashPixVersion is mandatory and constant. Write it always.

---

 gst-libs/gst/tag/gstexiftag.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/gst-libs/gst/tag/gstexiftag.c b/gst-libs/gst/tag/gstexiftag.c
index 529f958..d2209cc 100644
--- a/gst-libs/gst/tag/gstexiftag.c
+++ b/gst-libs/gst/tag/gstexiftag.c
@@ -292,7 +292,10 @@ EXIF_DESERIALIZATION_FUNC (add_to_pending_tags);
 /* IFD pointer tags */
 #define EXIF_IFD_TAG 0x8769
 #define EXIF_GPS_IFD_TAG 0x8825
+
+/* version tags */
 #define EXIF_VERSION_TAG 0x9000
+#define EXIF_FLASHPIX_VERSION_TAG 0xA000
 
 /* useful macros for speed tag */
 #define METERS_PER_SECOND_TO_KILOMETERS_PER_HOUR (3.6)
@@ -358,6 +361,7 @@ static const GstExifTagMatch tag_map_exif[] = {
       NULL, NULL},
   {GST_TAG_APPLICATION_DATA, EXIF_TAG_MAKER_NOTE, EXIF_TYPE_UNDEFINED, 0, NULL,
       NULL},
+  {NULL, EXIF_FLASHPIX_VERSION_TAG, EXIF_TYPE_UNDEFINED, 0, NULL, NULL},
   {GST_TAG_CAPTURING_EXPOSURE_MODE, EXIF_TAG_EXPOSURE_MODE, EXIF_TYPE_SHORT,
       0, serialize_exposure_mode, deserialize_exposure_mode},
   {GST_TAG_CAPTURING_WHITE_BALANCE, EXIF_TAG_WHITE_BALANCE, EXIF_TYPE_SHORT,
@@ -1340,6 +1344,10 @@ write_exif_ifd (const GstTagList * taglist, gboolean byte_order,
         /* special case where we write the exif version */
         write_exif_undefined_tag (&writer, EXIF_VERSION_TAG, (guint8 *) "0230",
             4);
+      } else if (tag_map[i].exif_tag == EXIF_FLASHPIX_VERSION_TAG) {
+        /* special case where we write the flashpix version */
+        write_exif_undefined_tag (&writer, EXIF_FLASHPIX_VERSION_TAG,
+            (guint8 *) "0100", 4);
       }
 
       if (inner_tag_map) {
@@ -1480,7 +1488,8 @@ parse_exif_ifd (GstExifReader * exif_reader, gint buf_offset,
 
       continue;
     }
-    if (tagdata.tag == EXIF_VERSION_TAG) {
+    if (tagdata.tag == EXIF_VERSION_TAG ||
+        tagdata.tag == EXIF_FLASHPIX_VERSION_TAG) {
       /* skip */
       continue;
     }





More information about the Gstreamer-commits mailing list