Forward-port DAR/SAR UI stuff from 1.x.
authorCarl Hetherington <cth@carlh.net>
Wed, 14 Jan 2015 10:31:39 +0000 (10:31 +0000)
committerCarl Hetherington <cth@carlh.net>
Wed, 14 Jan 2015 10:31:39 +0000 (10:31 +0000)
src/lib/video_content.cc

index 077972fabe685496edc9171f075ed97a954e2c43..5dc9e3d66814424f4dee8eed190e30a52cb75437 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2013-2014 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -525,7 +525,15 @@ VideoContent::processing_description () const
                        video_size_after_3d_split().height
                        );
 
-               d << " (" << fixed << setprecision(2) << video_size_after_3d_split().ratio() << ":1)\n";
+
+               float ratio = video_size_after_3d_split().ratio ();
+
+               if (sample_aspect_ratio ()) {
+                       d << ", " << _("pixel aspect ratio") << " " << fixed << setprecision(2) << sample_aspect_ratio().get () << ":1";
+                       ratio *= sample_aspect_ratio().get ();
+               }
+
+               d << "\n" << _("Display aspect ratio") << " " << fixed << setprecision(2) << ratio << ":1\n";
        }
 
        if ((crop().left || crop().right || crop().top || crop().bottom) && video_size() != dcp::Size (0, 0)) {
@@ -570,3 +578,4 @@ VideoContent::processing_description () const
 
        return d.str ();
 }
+