diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-07-20 15:20:56 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-07-20 15:20:56 +0100 |
| commit | f82bdaa6ffe1a9e62a010de405f8bbb7ea392f00 (patch) | |
| tree | 8eb15d2df9cd0bed17684d79ba481d453e344eaf /src/lib/ratio.cc | |
| parent | b6746acdc852bb33a386cff6109e03d1791cb310 (diff) | |
Add advanced configuration option to allow any container ratio,
specifically because the GDC SX-2001 will only play 25fps DCPs
with a 16:9 ratio (not Flat).
https://www.dcpomatic.com/forum/viewtopic.php?f=2&t=1119&p=4470
Diffstat (limited to 'src/lib/ratio.cc')
| -rw-r--r-- | src/lib/ratio.cc | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/lib/ratio.cc b/src/lib/ratio.cc index eae12b061..8a86ced59 100644 --- a/src/lib/ratio.cc +++ b/src/lib/ratio.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net> + Copyright (C) 2013-2018 Carl Hetherington <cth@carlh.net> This file is part of DCP-o-matic. @@ -20,6 +20,7 @@ #include "ratio.h" #include "util.h" +#include "config.h" #include <dcp/types.h> #include <cfloat> @@ -102,6 +103,10 @@ Ratio::nearest_from_ratio (float r) vector<Ratio const *> Ratio::containers () { + if (Config::instance()->allow_any_container()) { + return _ratios; + } + vector<Ratio const *> r; r.push_back (Ratio::from_id ("185")); r.push_back (Ratio::from_id ("239")); @@ -112,6 +117,12 @@ Ratio::containers () string Ratio::container_nickname () const { - DCPOMATIC_ASSERT (_container_nickname); + if (!_container_nickname) { + /* Fall back to the image nickname; this just for when non-standard container + ratios are enabled. + */ + return _image_nickname; + } + return *_container_nickname; } |
