[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:36:39 UTC 2017


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=9b6e62c

The following commit has been merged in the master branch:
commit 9b6e62c552d1289c2bb98cfd0415d72790e62bf9
Author: Andreas Huggel <ahuggel at gmx.net>
Date:   Sun Sep 19 09:22:20 2004 +0000

    Added support to build a MakerNote from scratch
---
 src/exif.cpp        | 14 +++++++--
 src/exif.hpp        | 11 +++----
 src/fujimn.cpp      |  8 +++--
 src/nikonmn.cpp     | 13 ++++++--
 src/sigmamn.cpp     |  8 +++--
 src/write2-test.cpp | 86 +++++++++++++++++++++++++++++++++++++++++++++++++++--
 6 files changed, 125 insertions(+), 15 deletions(-)

diff --git a/src/exif.cpp b/src/exif.cpp
index e1d21e8..e947aad 100644
--- a/src/exif.cpp
+++ b/src/exif.cpp
@@ -20,14 +20,14 @@
  */
 /*
   File:      exif.cpp
-  Version:   $Name:  $ $Revision: 1.60 $
+  Version:   $Name:  $ $Revision: 1.61 $
   Author(s): Andreas Huggel (ahu) <ahuggel at gmx.net>
   History:   26-Jan-04, ahu: created
              11-Feb-04, ahu: isolated as a component
  */
 // *****************************************************************************
 #include "rcsid.hpp"
-EXIV2_RCSID("@(#) $Name:  $ $Revision: 1.60 $ $RCSfile: exif.cpp,v $");
+EXIV2_RCSID("@(#) $Name:  $ $Revision: 1.61 $ $RCSfile: exif.cpp,v $");
 
 // Define DEBUG_MAKERNOTE to output debug information to std::cerr
 #undef DEBUG_MAKERNOTE
@@ -1031,6 +1031,16 @@ namespace Exiv2 {
 
     void ExifData::add(const Exifdatum& exifdatum)
     {
+        if (exifdatum.ifdId() == makerIfdId) {
+            if (   pMakerNote_ 
+                && pMakerNote_->ifdItem() != exifdatum.groupName()) {
+                throw Error("Inconsistent MakerNote");
+            }
+            if (!pMakerNote_) {
+                MakerNoteFactory& mnf = MakerNoteFactory::instance();
+                pMakerNote_ = mnf.create(exifdatum.groupName());
+            }
+        }
         // allow duplicates
         exifMetadata_.push_back(exifdatum);
     }
diff --git a/src/exif.hpp b/src/exif.hpp
index 0f4b09f..d61586a 100644
--- a/src/exif.hpp
+++ b/src/exif.hpp
@@ -21,7 +21,7 @@
 /*!
   @file    exif.hpp
   @brief   Encoding and decoding of Exif data
-  @version $Name:  $ $Revision: 1.52 $
+  @version $Name:  $ $Revision: 1.53 $
   @author  Andreas Huggel (ahu)
            <a href="mailto:ahuggel at gmx.net">ahuggel at gmx.net</a>
   @date    09-Jan-04, ahu: created
@@ -118,7 +118,7 @@ namespace Exiv2 {
         //! Return the name of the IFD
         const char* ifdName() const { return ExifTags::ifdName(ifdId()); }
         //! Return the related image item
-        const char* ifdItem() const { return ExifTags::ifdItem(ifdId()); }
+        std::string ifdItem() const { return ifdItem_; }
         //! Return the name of the Exif section (deprecated) 
         std::string sectionName() const;
         //! Return the index (unique id of this key within the original IFD)
@@ -225,7 +225,7 @@ namespace Exiv2 {
         const char* ifdName() const
             { return pKey_ == 0 ? "" : pKey_->ifdName(); }
         //! Return the related image item (deprecated)
-        const char* ifdItem() const 
+        std::string ifdItem() const 
             { return pKey_ == 0 ? "" : pKey_->ifdItem(); }
         //! Return the index (unique id of this key within the original IFD)
         int idx() const
@@ -672,8 +672,7 @@ namespace Exiv2 {
                  ByteOrder byteOrder);
         /*!
           @brief Add a Exifdatum from the supplied key and value pair.  This
-                 method copies (clones) key and value and adds a pointer to
-                 the MakerNote to the cloned key. No duplicate checks are
+                 method copies (clones) key and value. No duplicate checks are
                  performed, i.e., it is possible to add multiple metadata with
                  the same key.
          */
@@ -682,6 +681,8 @@ namespace Exiv2 {
           @brief Add a copy of the Exifdatum to the Exif metadata.  No
                  duplicate checks are performed, i.e., it is possible to add
                  multiple metadata with the same key.
+          @throw Error ("Inconsistent MakerNote") if Exifdatum is a MakerNote
+                 tag for a different MakerNote than that of the ExifData.
          */
         void add(const Exifdatum& Exifdatum);
         /*!
diff --git a/src/fujimn.cpp b/src/fujimn.cpp
index 45aec01..796e2ff 100644
--- a/src/fujimn.cpp
+++ b/src/fujimn.cpp
@@ -20,7 +20,7 @@
  */
 /*
   File:      fujimn.cpp
-  Version:   $Name:  $ $Revision: 1.11 $
+  Version:   $Name:  $ $Revision: 1.12 $
   Author(s): Andreas Huggel (ahu) <ahuggel at gmx.net>
   History:   18-Feb-04, ahu: created
              07-Mar-04, ahu: isolated as a separate component
@@ -31,7 +31,7 @@
  */
 // *****************************************************************************
 #include "rcsid.hpp"
-EXIV2_RCSID("@(#) $Name:  $ $Revision: 1.11 $ $RCSfile: fujimn.cpp,v $");
+EXIV2_RCSID("@(#) $Name:  $ $Revision: 1.12 $ $RCSfile: fujimn.cpp,v $");
 
 // *****************************************************************************
 // included header files
@@ -82,6 +82,10 @@ namespace Exiv2 {
     {
         byteOrder_ = littleEndian;
         absOffset_ = false;
+        byte buf[] = {
+            'F', 'U', 'J', 'I', 'F', 'I', 'L', 'M', 0x0c, 0x00, 0x00, 0x00
+        };
+        readHeader(buf, 12, byteOrder_);
     }
 
     int FujiMakerNote::readHeader(const byte* buf,
diff --git a/src/nikonmn.cpp b/src/nikonmn.cpp
index 1138cbd..fccce80 100644
--- a/src/nikonmn.cpp
+++ b/src/nikonmn.cpp
@@ -20,14 +20,14 @@
  */
 /*
   File:      nikon1mn.cpp
-  Version:   $Name:  $ $Revision: 1.7 $
+  Version:   $Name:  $ $Revision: 1.8 $
   Author(s): Andreas Huggel (ahu) <ahuggel at gmx.net>
   History:   17-May-04, ahu: created
              25-May-04, ahu: combined all Nikon formats in one component
  */
 // *****************************************************************************
 #include "rcsid.hpp"
-EXIV2_RCSID("@(#) $Name:  $ $Revision: 1.7 $ $RCSfile: nikonmn.cpp,v $");
+EXIV2_RCSID("@(#) $Name:  $ $Revision: 1.8 $ $RCSfile: nikonmn.cpp,v $");
 
 // *****************************************************************************
 // included header files
@@ -202,6 +202,10 @@ namespace Exiv2 {
     Nikon2MakerNote::Nikon2MakerNote(bool alloc)
         : IfdMakerNote(nikon2MnTagInfo, alloc), ifdItem_("Nikon2")
     {
+        byte buf[] = {
+            'N', 'i', 'k', 'o', 'n', '

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list