Merge master into direct-mxf.
[dcpomatic.git] / src / lib / format.cc
index 4583dd0e58602840c95cb5b1724c5ab557a3fb6a..016c21fdea09fb60d45636f91d2ee9b5d888879b 100644 (file)
@@ -148,6 +148,9 @@ FixedFormat::FixedFormat (int r, libdcp::Size dcp, string id, string n, string d
 
 }
 
+/** @return Number of pixels (int the DCP image) to pad either side of the film
+ *  (so there are dcp_padding() pixels on the left and dcp_padding() on the right)
+ */
 int
 Format::dcp_padding (shared_ptr<const Film> f) const
 {
@@ -161,6 +164,12 @@ Format::dcp_padding (shared_ptr<const Film> f) const
        return p;
 }
 
+float
+Format::container_ratio_as_float () const
+{
+       return static_cast<float> (_dcp_size.width) / _dcp_size.height;
+}
+
 VariableFormat::VariableFormat (libdcp::Size dcp, string id, string n, string d)
        : Format (dcp, id, n, d)
 {