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

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:43:23 UTC 2017


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

The following commit has been merged in the master branch:
commit 9769cd8e59fd063c6520bc8e666f6fafd941a0f3
Author: Abhinav Badola <mail.abu.to at gmail.com>
Date:   Sun Sep 2 17:39:51 2012 +0000

    #813: Addded TrackAperture Function and Nikon MOV tags decoding in quicktimevideo.cpp
---
 src/properties.cpp     |  20 ++++++--
 src/quicktimevideo.cpp | 127 ++++++++++++++++++++++++++++++++++++++++++++++---
 src/quicktimevideo.hpp |  18 +++++++
 3 files changed, 154 insertions(+), 11 deletions(-)

diff --git a/src/properties.cpp b/src/properties.cpp
index 1e56574..b2a6e43 100644
--- a/src/properties.cpp
+++ b/src/properties.cpp
@@ -1009,6 +1009,8 @@ namespace Exiv2 {
         { "Brightness",             N_("Brightness"),                       "Integer",                  xmpText, xmpExternal, N_("Brightness setting.") },
         { "CameraByteOrder",        N_("Camera Byte Order"),                "Text",                     xmpText, xmpExternal, N_("Byte Order used by the Video Capturing device.")   },
         { "Cinematographer",        N_("Video Cinematographer"),            "Text",                     xmpText, xmpExternal, N_("The video Cinematographer information.")   },
+        { "CleanApertureWidth",     N_("Clean Aperture Width"),             "Integer",                  xmpText, xmpExternal, N_("Clean aperture width in pixels")   },
+        { "CleanApertureHeight",    N_("Clean Aperture Height"),            "Integer",                  xmpText, xmpExternal, N_("Clean aperture height in pixels")   },
         { "Codec",                  N_("Video Codec"),                      "Text",                     xmpText, xmpExternal, N_("The video codec information. Informs about the encoding algorithm of video. Codec Info is required for video playback.")   },
         { "CodecDecodeAll",         N_("Video Codec Decode Info"),          "Text",                     xmpText, xmpExternal, N_("Contains information the video Codec Decode All, i.e. Enabled/Disabled")   },
         { "CodecDescription",       N_("Video Codec Description"),          "Text",                     xmpText, xmpExternal, N_("Contains description the codec.")   },
@@ -1075,6 +1077,8 @@ namespace Exiv2 {
         { "EditedBy",               N_("Edited By"),                        "Text",                     xmpText, xmpExternal, N_("Edited By, i.e. name of person or organization.")   },
         { "Enabled",                N_("Video Track Enabled"),              "Text",                     xmpText, xmpExternal, N_("Status of Video Track, i.e. Enabled/Disabled")   },
         { "EncodedBy",              N_("Encoded By"),                       "Text",                     xmpText, xmpExternal, N_("Encoded By, i.e. name of person or organization.")   },
+        { "EncodedPixelsWidth",     N_("Encoded Pixels Width"),             "Integer",                  xmpText, xmpExternal, N_("Encoded Pixels width in pixels")   },
+        { "EncodedPixelsHeight",    N_("Encoded Pixels Height"),            "Integer",                  xmpText, xmpExternal, N_("Encoded Pixels height in pixels")   },
         { "Encoder",                N_("Encoder"),                          "Text",                     xmpText, xmpExternal, N_("Information about the Encoder.")   },
         { "EndTimecode",            N_("End Timecode"),                     "Integer",                  xmpText, xmpExternal, N_("End Timecode")   },
         { "Engineer",               N_("Engineer"),                         "Text",                     xmpText, xmpExternal, N_("Engineer, in most cases name of person.")   },
@@ -1128,6 +1132,7 @@ namespace Exiv2 {
         { "Information",            N_("Information"),                      "Text",                     xmpText, xmpExternal, N_("Additional Movie Information.")   },
         { "InfoText",               N_("Info Text"),                        "Text",                     xmpText, xmpExternal, N_("Information Text.")   },
         { "InfoURL",                N_("Info URL"),                         "Text",                     xmpText, xmpExternal, N_("Information URL.")   },
+        { "ISO",                    N_("ISO Setting"),                      "Integer",                  xmpText, xmpExternal, N_("Information about the ISO Setting.")   },
         { "ISRCCode",               N_("ISRC Code"),                        "Text",                     xmpText, xmpExternal, N_("Information about the ISRC Code.")   },
         { "Junk",                   N_("Junk Data"),                        "Text",                     xmpText, xmpExternal, N_("Video Junk data")   },
         { "Language",               N_("Language"),                         "Text",                     xmpText, xmpExternal, N_("Language.")  },
@@ -1193,11 +1198,6 @@ namespace Exiv2 {
         { "PictureControlQuickAdjust",N_("Picture Control Quick Adjust"),   "Text",                     xmpText, xmpExternal, N_("Picture Control Quick Adjustment Settings.")   },
         { "PlaySelection",          N_("Play Selection"),                   "Text",                     xmpText, xmpExternal, N_("Play Selection.")   },
         { "PlayMode",               N_("PlayMode"),                         "Text",                     xmpText, xmpExternal, N_("Information about the Play Mode.")   },
-        { "Producer",               N_("Producer"),                         "Text",                     xmpText, xmpExternal, N_("Producer involved with the video.")   },
-        { "ProducerKeywords",       N_("Producer Keywords"),                "Text",                     xmpText, xmpExternal, N_("Information about the Producer Keywords.")   },
-        { "ProductionDesigner",     N_("Production Designer"),              "Text",                     xmpText, xmpExternal, N_("Information about the Production Designer.")   },
-        { "ProductionStudio",       N_("Production Studio"),                "Text",                     xmpText, xmpExternal, N_("Information about the Production Studio.")   },
-        { "Product",                N_("Product"),                          "Text",                     xmpText, xmpExternal, N_("Product.")   },
         { "PhysicalEquivalent",     N_("Chapter Physical Equivalent"),      "Text",                     xmpText, xmpExternal, N_("Contains the information of External media.")   },
         { "PixelDepth",             N_("Video Pixel Depth"),                "closed Choice of Text",    xmpText, xmpExternal, N_("The size in bits of each color component of a pixel. Standard Windows 32-bit "
                                                                                                                                  "pixels have 8 bits per component. One of: 8Int, 16Int, 32Int, 32Float.") },
@@ -1210,9 +1210,19 @@ namespace Exiv2 {
         { "Preroll",                N_("Preroll"),                          "Integer",                  xmpText, xmpExternal, N_("Specifies the amount of time to buffer data before starting to play the file, in millisecond units. If this value is nonzero,"
                                                                                                                                  "the Play Duration field and all of the payload Presentation Time fields have been offset by this amount. Therefore, player software "
                                                                                                                                  "must subtract the value in the preroll field from the play duration and presentation times to calculate their actual values.") },
+        { "PreviewAtomType",        N_("Preview Atom Type"),                "Text",                     xmpText, xmpExternal, N_("Indicates the type of atom that contains the preview data") },
+        { "PreviewDate",            N_("Preview Date"),                     "Integer",                  xmpText, xmpExternal, N_("The date of the movie preview in local time converted from UTC") },
         { "PreviewDuration",        N_("Preview Duration"),                 "Integer",                  xmpText, xmpExternal, N_("The duration of the movie preview in movie time scale units") },
         { "PreviewTime",            N_("Preview Time"),                     "Integer",                  xmpText, xmpExternal, N_("The time value in the movie at which the preview begins.") },
+        { "PreviewVersion",         N_("Preview Version"),                  "Integer",                  xmpText, xmpExternal, N_("The version of the movie preview ") },
         { "ProducedBy",             N_("Produced By"),                      "Text",                     xmpText, xmpExternal, N_("Produced By, i.e. name of person or organization.")   },
+        { "Producer",               N_("Producer"),                         "Text",                     xmpText, xmpExternal, N_("Producer involved with the video.")   },
+        { "ProducerKeywords",       N_("Producer Keywords"),                "Text",                     xmpText, xmpExternal, N_("Information about the Producer Keywords.")   },
+        { "ProductionApertureWidth",N_("Production Aperture Width"),        "Integer",                  xmpText, xmpExternal, N_("Production aperture width in pixels")   },
+        { "ProductionApertureHeight",N_("Production Aperture Height"),      "Integer",                  xmpText, xmpExternal, N_("Production aperture height in pixels")   },
+        { "ProductionDesigner",     N_("Production Designer"),              "Text",                     xmpText, xmpExternal, N_("Information about the Production Designer.")   },
+        { "ProductionStudio",       N_("Production Studio"),                "Text",                     xmpText, xmpExternal, N_("Information about the Production Studio.")   },
+        { "Product",                N_("Product"),                          "Text",                     xmpText, xmpExternal, N_("Product.")   },
         { "ProjectRef",             N_("Project Reference"),                "ProjectLink",              xmpText, xmpExternal, N_("A reference to the project that created this file.") },
         { "Rate",                   N_("Rate"),                             "Integer",                  xmpText, xmpExternal, N_("Rate.")   },
         { "Rated",                  N_("Rated"),                            "Text",                     xmpText, xmpExternal, N_("The age circle required for viewing the video.")   },
diff --git a/src/quicktimevideo.cpp b/src/quicktimevideo.cpp
index 29e4414..3bd65b0 100644
--- a/src/quicktimevideo.cpp
+++ b/src/quicktimevideo.cpp
@@ -258,6 +258,7 @@ namespace Exiv2 {
         {   "NCHD", "Xmp.video.MakerNoteType" },
         {   "WLOC", "Xmp.video.WindowLocation" },
         {   "SDLN", "Xmp.video.PlayMode" },
+        {   "FFMV", "Xmp.video.StreamName" },
         {   "SelO", "Xmp.video.PlaySelection" },
         {   "name", "Xmp.video.Name" },
         {   "vndr", "Xmp.video.Vendor" },
@@ -456,6 +457,15 @@ namespace Exiv2 {
         {   0xff, "n/a" },
     };
 
+    extern const TagDetails whiteBalance[] = {
+        {   0, "Auto" },
+        {   1, "Daylight" },
+        {   2, "Shade" },
+        {   3, "Fluorescent" },
+        {   4, "Tungsten" },
+        {   5, "Manual" },
+    };
+
     enum movieHeaderTags {
         MovieHeaderVersion, CreateDate, ModifyDate, TimeScale, Duration, PreferredRate, PreferredVolume,
         PreviewTime = 18, PreviewDuration,PosterTime, SelectionTime, SelectionDuration, CurrentTime, NextTrackID
@@ -648,7 +658,7 @@ namespace Exiv2 {
         io_->read(buf.pData_, 4);
         if(size < 8)
             return;
-
+//        std::cerr<<"
("<<std::setw(5)<<size<<") :" << buf.pData_;
         tagDecoder(buf,size-8);
     } // QuickTimeVideo::decodeBlock
 
@@ -693,6 +703,12 @@ namespace Exiv2 {
         else if (equalsQTimeTag(buf, "stts"))
             timeToSampleDecoder();
 
+        else if (equalsQTimeTag(buf, "pnot"))
+            previewTagDecoder(size);
+
+        else if (equalsQTimeTag(buf, "tapt"))
+            trackApertureTagDecoder(size);
+
         else if (equalsQTimeTag(buf, "url ")) {
             io_->read(buf.pData_, size);
             if (currentStream_ == Video)
@@ -721,6 +737,7 @@ namespace Exiv2 {
         }
 
         else {
+//            std::cerr<<" Unprocessed";
             discard(size);
         }
     } // QuickTimeVideo::tagDecoder
@@ -731,6 +748,102 @@ namespace Exiv2 {
         io_->seek(cur_pos + size, BasicIo::beg);
     } // QuickTimeVideo::discard
 
+    void QuickTimeVideo::previewTagDecoder(unsigned long size)
+    {
+        DataBuf buf(4);
+        uint64_t cur_pos = io_->tell();
+        io_->read(buf.pData_, 4);
+        xmpData_["Xmp.video.PreviewDate"] = getULong(buf.pData_, bigEndian);
+        io_->read(buf.pData_, 2);
+        xmpData_["Xmp.video.PreviewVersion"] = getShort(buf.pData_, bigEndian);
+
+        io_->read(buf.pData_, 4);
+        if(equalsQTimeTag(buf, "PICT"))
+            xmpData_["Xmp.video.PreviewAtomType"] = "QuickDraw Picture";
+        else
+            xmpData_["Xmp.video.PreviewAtomType"] = Exiv2::toString(buf.pData_);
+
+        io_->seek(cur_pos + size, BasicIo::beg);
+    } // QuickTimeVideo::previewTagDecoder
+
+    void QuickTimeVideo::trackApertureTagDecoder(unsigned long size)
+    {
+        DataBuf buf(4), buf2(2);
+        uint64_t cur_pos = io_->tell();
+        byte n = 3;
+
+        while(n--) {
+            io_->seek(4, BasicIo::cur); io_->read(buf.pData_, 4);
+
+            if(equalsQTimeTag(buf, "clef")) {
+                io_->seek(4, BasicIo::cur);
+                io_->read(buf.pData_, 2); io_->read(buf2.pData_, 2);
+                xmpData_["Xmp.video.CleanApertureWidth"]    =   Exiv2::toString(getUShort(buf.pData_, bigEndian))
+                                                                + "." + Exiv2::toString(getUShort(buf2.pData_, bigEndian));
+                io_->read(buf.pData_, 2); io_->read(buf2.pData_, 2);
+                xmpData_["Xmp.video.CleanApertureHeight"]   =   Exiv2::toString(getUShort(buf.pData_, bigEndian))
+                                                                + "." + Exiv2::toString(getUShort(buf2.pData_, bigEndian));
+            }
+
+            else if(equalsQTimeTag(buf, "prof")) {
+                io_->seek(4, BasicIo::cur);
+                io_->read(buf.pData_, 2); io_->read(buf2.pData_, 2);
+                xmpData_["Xmp.video.ProductionApertureWidth"]    =   Exiv2::toString(getUShort(buf.pData_, bigEndian))
+                                                                + "." + Exiv2::toString(getUShort(buf2.pData_, bigEndian));
+                io_->read(buf.pData_, 2); io_->read(buf2.pData_, 2);
+                xmpData_["Xmp.video.ProductionApertureHeight"]   =   Exiv2::toString(getUShort(buf.pData_, bigEndian))
+                                                                + "." + Exiv2::toString(getUShort(buf2.pData_, bigEndian));
+            }
+
+            else if(equalsQTimeTag(buf, "enof")) {
+                io_->seek(4, BasicIo::cur);
+                io_->read(buf.pData_, 2); io_->read(buf2.pData_, 2);
+                xmpData_["Xmp.video.EncodedPixelsWidth"]    =   Exiv2::toString(getUShort(buf.pData_, bigEndian))
+                                                                + "." + Exiv2::toString(getUShort(buf2.pData_, bigEndian));
+                io_->read(buf.pData_, 2); io_->read(buf2.pData_, 2);
+                xmpData_["Xmp.video.EncodedPixelsHeight"]   =   Exiv2::toString(getUShort(buf.pData_, bigEndian))
+                                                                + "." + Exiv2::toString(getUShort(buf2.pData_, bigEndian));
+            }
+        }
+        io_->seek(cur_pos + size, BasicIo::beg);
+    } // QuickTimeVideo::trackApertureTagDecoder
+
+    void QuickTimeVideo::CameraTagsDecoder(unsigned long size_external)
+    {
+        uint64_t cur_pos = io_->tell();
+        DataBuf buf(50), buf2(4);
+        const TagDetails* td;
+
+        io_->read(buf.pData_, 4);
+        if(equalsQTimeTag(buf, "NIKO")) {
+            io_->seek(cur_pos, BasicIo::beg);
+
+            io_->read(buf.pData_, 24);
+            xmpData_["Xmp.video.Make"] = Exiv2::toString(buf.pData_);
+            io_->read(buf.pData_, 14);
+            xmpData_["Xmp.video.Model"] = Exiv2::toString(buf.pData_);
+            io_->read(buf.pData_, 4);
+            xmpData_["Xmp.video.ExposureTime"] = "1/" + Exiv2::toString( ceil( getULong(buf.pData_, littleEndian) / (double)10));
+            io_->read(buf.pData_, 4); io_->read(buf2.pData_, 4);
+            xmpData_["Xmp.video.FNumber"] =  getULong(buf.pData_, littleEndian) / (double)getULong(buf2.pData_, littleEndian) ;
+            io_->read(buf.pData_, 4); io_->read(buf2.pData_, 4);
+            xmpData_["Xmp.video.ExposureCompensation"] =  getULong(buf.pData_, littleEndian) / (double)getULong(buf2.pData_, littleEndian) ;
+            io_->read(buf.pData_, 10); io_->read(buf.pData_, 4);
+            td = find(whiteBalance, getULong(buf.pData_, littleEndian));
+            if (td)
+                xmpData_["Xmp.video.WhiteBalance"] = exvGettext(td->label_);
+            io_->read(buf.pData_, 4); io_->read(buf2.pData_, 4);
+            xmpData_["Xmp.video.FocalLength"] =  getULong(buf.pData_, littleEndian) / (double)getULong(buf2.pData_, littleEndian) ;
+            io_->seek(95, BasicIo::cur);
+            io_->read(buf.pData_, 48);
+            xmpData_["Xmp.video.Software"] = Exiv2::toString(buf.pData_);
+            io_->read(buf.pData_, 4);
+            xmpData_["Xmp.video.ISO"] = getULong(buf.pData_, littleEndian);
+        }
+
+        io_->seek(cur_pos + size_external, BasicIo::beg);
+    } // QuickTimeVideo::CameraTagsDecoder
+
     void QuickTimeVideo::userDataDecoder(unsigned long size_external)
     {
         uint64_t cur_pos = io_->tell();
@@ -757,7 +870,7 @@ namespace Exiv2 {
             td = find(userDatatags, Exiv2::toString( buf.pData_));
 
             tv = find(userDataReferencetags, Exiv2::toString( buf.pData_));
-
+//            std::cerr<<"  =>("<<size<<") "<<buf.pData_;
             if(size == 0 || (size - 12) <= 0)
                 break;
 
@@ -767,13 +880,16 @@ namespace Exiv2 {
             else if(equalsQTimeTag(buf, "NCTG"))
                 NikonTagsDecoder(size - 8);
 
+            else if(equalsQTimeTag(buf, "TAGS"))
+                CameraTagsDecoder(size - 8);
+
             else if(equalsQTimeTag(buf, "CNCV") || equalsQTimeTag(buf, "CNFV")
-                    || equalsQTimeTag(buf, "CNMN") || equalsQTimeTag(buf, "NCHD")) {
+                    || equalsQTimeTag(buf, "CNMN") || equalsQTimeTag(buf, "NCHD")
+                    || equalsQTimeTag(buf, "FFMV")) {
                 io_->read(buf.pData_, size - 8);
                 xmpData_[exvGettext(tv->label_)] = Exiv2::toString(buf.pData_);
             }
 
-
             else if(equalsQTimeTag(buf, "CMbo") || equalsQTimeTag(buf, "Cmbo")) {
                 io_->read(buf.pData_, 2);
                 buf.pData_[2] = '

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list