[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:31 UTC 2017


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

The following commit has been merged in the master branch:
commit 6d9773d638b4b847887b7734fdd03e01a5543c54
Author: Robin Mills <robin at clanmills.com>
Date:   Sun Nov 4 09:02:56 2012 +0000

    Fix: #846. Fix for video-test errors (about aspectRatio) on MSVC 2003. See #846 message 20 for discussion.
---
 msvc/include/exv_msvc.h | 11 +++++++++++
 src/asfvideo.cpp        | 20 ++++++++++++--------
 src/matroskavideo.cpp   | 20 ++++++++++++--------
 src/quicktimevideo.cpp  | 20 ++++++++++++--------
 src/riffvideo.cpp       | 20 ++++++++++++--------
 5 files changed, 59 insertions(+), 32 deletions(-)

diff --git a/msvc/include/exv_msvc.h b/msvc/include/exv_msvc.h
index e778820..1892311 100644
--- a/msvc/include/exv_msvc.h
+++ b/msvc/include/exv_msvc.h
@@ -17,6 +17,17 @@
 // stdint.h was introduced with DevStudio 2010
 #define EXV_HAVE_STDINT_H 1
 #endif
+#if    _MSC_VER >= 1700
+#define MSDEV_2012    1
+#elif  _MSC_VER >= 1600
+#define MSDEV_2010    1
+#elif  _MSC_VER >= 1500
+#define MSDEV_2008    1
+#elif  _MSC_VER >= 1400
+#define MSDEV_2005	  1
+#else
+#define MSDEV_2003	  1
+#endif
 
 /* Define to 1 if you have the <process.h> header file. */
 #define EXV_HAVE_PROCESS_H 1
diff --git a/src/asfvideo.cpp b/src/asfvideo.cpp
index 3d23512..817618d 100644
--- a/src/asfvideo.cpp
+++ b/src/asfvideo.cpp
@@ -708,14 +708,18 @@ namespace Exiv2 {
         aspectRatio = floor(aspectRatio*10) / 10;
         xmpData_["Xmp.video.AspectRatio"] = aspectRatio;
 
-        if(aspectRatio == 1.3)      xmpData_["Xmp.video.AspectRatio"] = "4:3";
-        else if(aspectRatio == 1.7) xmpData_["Xmp.video.AspectRatio"] = "16:9";
-        else if(aspectRatio == 1.0) xmpData_["Xmp.video.AspectRatio"] = "1:1";
-        else if(aspectRatio == 1.6) xmpData_["Xmp.video.AspectRatio"] = "16:10";
-        else if(aspectRatio == 2.2) xmpData_["Xmp.video.AspectRatio"] = "2.21:1";
-        else if(aspectRatio == 2.3) xmpData_["Xmp.video.AspectRatio"] = "2.35:1";
-        else if(aspectRatio == 1.2) xmpData_["Xmp.video.AspectRatio"] = "5:4";
-        else                        xmpData_["Xmp.video.AspectRatio"] = aspectRatio;
+		int aR = (int) ((aspectRatio*10.0)+0.1);
+
+		switch  (aR) {
+			case 13 : xmpData_["Xmp.video.AspectRatio"] = "4:3"		; break;
+			case 17 : xmpData_["Xmp.video.AspectRatio"] = "16:9"	; break;
+			case 10 : xmpData_["Xmp.video.AspectRatio"] = "1:1"		; break;
+			case 16 : xmpData_["Xmp.video.AspectRatio"] = "16:10"	; break;
+			case 22 : xmpData_["Xmp.video.AspectRatio"] = "2.21:1"  ; break;
+			case 23 : xmpData_["Xmp.video.AspectRatio"] = "2.35:1"  ; break;
+			case 12 : xmpData_["Xmp.video.AspectRatio"] = "5:4"     ; break;
+			default : xmpData_["Xmp.video.AspectRatio"] = aspectRatio;break;
+		}
     } // AsfVideo::aspectRatio
 
 
diff --git a/src/matroskavideo.cpp b/src/matroskavideo.cpp
index 379ba2d..ae50287 100644
--- a/src/matroskavideo.cpp
+++ b/src/matroskavideo.cpp
@@ -707,14 +707,18 @@ namespace Exiv2 {
         aspectRatio = floor(aspectRatio*10) / 10;
         xmpData_["Xmp.video.AspectRatio"] = aspectRatio;
 
-        if(aspectRatio == 1.3)      xmpData_["Xmp.video.AspectRatio"] = "4:3";
-        else if(aspectRatio == 1.7) xmpData_["Xmp.video.AspectRatio"] = "16:9";
-        else if(aspectRatio == 1.0) xmpData_["Xmp.video.AspectRatio"] = "1:1";
-        else if(aspectRatio == 1.6) xmpData_["Xmp.video.AspectRatio"] = "16:10";
-        else if(aspectRatio == 2.2) xmpData_["Xmp.video.AspectRatio"] = "2.21:1";
-        else if(aspectRatio == 2.3) xmpData_["Xmp.video.AspectRatio"] = "2.35:1";
-        else if(aspectRatio == 1.2) xmpData_["Xmp.video.AspectRatio"] = "5:4";
-        else                        xmpData_["Xmp.video.AspectRatio"] = aspectRatio;
+		int aR = (int) ((aspectRatio*10.0)+0.1);
+
+		switch  (aR) {
+			case 13 : xmpData_["Xmp.video.AspectRatio"] = "4:3"		; break;
+			case 17 : xmpData_["Xmp.video.AspectRatio"] = "16:9"	; break;
+			case 10 : xmpData_["Xmp.video.AspectRatio"] = "1:1"		; break;
+			case 16 : xmpData_["Xmp.video.AspectRatio"] = "16:10"	; break;
+			case 22 : xmpData_["Xmp.video.AspectRatio"] = "2.21:1"  ; break;
+			case 23 : xmpData_["Xmp.video.AspectRatio"] = "2.35:1"  ; break;
+			case 12 : xmpData_["Xmp.video.AspectRatio"] = "5:4"     ; break;
+			default : xmpData_["Xmp.video.AspectRatio"] = aspectRatio;break;
+		}
     } // MatroskaVideo::aspectRatio
 
     uint32_t MatroskaVideo::findBlockSize(byte b)
diff --git a/src/quicktimevideo.cpp b/src/quicktimevideo.cpp
index 039486f..07625b8 100644
--- a/src/quicktimevideo.cpp
+++ b/src/quicktimevideo.cpp
@@ -1555,14 +1555,18 @@ namespace Exiv2 {
         aspectRatio = floor(aspectRatio*10) / 10;
         xmpData_["Xmp.video.AspectRatio"] = aspectRatio;
 
-        if(aspectRatio == 1.3)      xmpData_["Xmp.video.AspectRatio"] = "4:3";
-        else if(aspectRatio == 1.7) xmpData_["Xmp.video.AspectRatio"] = "16:9";
-        else if(aspectRatio == 1.0) xmpData_["Xmp.video.AspectRatio"] = "1:1";
-        else if(aspectRatio == 1.6) xmpData_["Xmp.video.AspectRatio"] = "16:10";
-        else if(aspectRatio == 2.2) xmpData_["Xmp.video.AspectRatio"] = "2.21:1";
-        else if(aspectRatio == 2.3) xmpData_["Xmp.video.AspectRatio"] = "2.35:1";
-        else if(aspectRatio == 1.2) xmpData_["Xmp.video.AspectRatio"] = "5:4";
-        else                        xmpData_["Xmp.video.AspectRatio"] = aspectRatio;
+		int aR = (int) ((aspectRatio*10.0)+0.1);
+
+		switch  (aR) {
+			case 13 : xmpData_["Xmp.video.AspectRatio"] = "4:3"		; break;
+			case 17 : xmpData_["Xmp.video.AspectRatio"] = "16:9"	; break;
+			case 10 : xmpData_["Xmp.video.AspectRatio"] = "1:1"		; break;
+			case 16 : xmpData_["Xmp.video.AspectRatio"] = "16:10"	; break;
+			case 22 : xmpData_["Xmp.video.AspectRatio"] = "2.21:1"  ; break;
+			case 23 : xmpData_["Xmp.video.AspectRatio"] = "2.35:1"  ; break;
+			case 12 : xmpData_["Xmp.video.AspectRatio"] = "5:4"     ; break;
+			default : xmpData_["Xmp.video.AspectRatio"] = aspectRatio;break;
+		}
     } // QuickTimeVideo::aspectRatio
 
 
diff --git a/src/riffvideo.cpp b/src/riffvideo.cpp
index 3773ddc..1eb571e 100644
--- a/src/riffvideo.cpp
+++ b/src/riffvideo.cpp
@@ -1153,14 +1153,18 @@ namespace Exiv2 {
         aspectRatio = floor(aspectRatio*10) / 10;
         xmpData_["Xmp.video.AspectRatio"] = aspectRatio;
 
-        if(aspectRatio == 1.3)      xmpData_["Xmp.video.AspectRatio"] = "4:3";
-        else if(aspectRatio == 1.7) xmpData_["Xmp.video.AspectRatio"] = "16:9";
-        else if(aspectRatio == 1.0) xmpData_["Xmp.video.AspectRatio"] = "1:1";
-        else if(aspectRatio == 1.6) xmpData_["Xmp.video.AspectRatio"] = "16:10";
-        else if(aspectRatio == 2.2) xmpData_["Xmp.video.AspectRatio"] = "2.21:1";
-        else if(aspectRatio == 2.3) xmpData_["Xmp.video.AspectRatio"] = "2.35:1";
-        else if(aspectRatio == 1.2) xmpData_["Xmp.video.AspectRatio"] = "5:4";
-        else                        xmpData_["Xmp.video.AspectRatio"] = aspectRatio;
+		int aR = (int) ((aspectRatio*10.0)+0.1);
+
+		switch  (aR) {
+			case 13 : xmpData_["Xmp.video.AspectRatio"] = "4:3"		; break;
+			case 17 : xmpData_["Xmp.video.AspectRatio"] = "16:9"	; break;
+			case 10 : xmpData_["Xmp.video.AspectRatio"] = "1:1"		; break;
+			case 16 : xmpData_["Xmp.video.AspectRatio"] = "16:10"	; break;
+			case 22 : xmpData_["Xmp.video.AspectRatio"] = "2.21:1"  ; break;
+			case 23 : xmpData_["Xmp.video.AspectRatio"] = "2.35:1"  ; break;
+			case 12 : xmpData_["Xmp.video.AspectRatio"] = "5:4"     ; break;
+			default : xmpData_["Xmp.video.AspectRatio"] = aspectRatio;break;
+		}
     } // RiffVideo::fillAspectRatio
 
     void RiffVideo::fillDuration(double frame_rate, long frame_count)

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list