summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-05-12 23:29:21 +0100
committerCarl Hetherington <cth@carlh.net>2014-05-12 23:29:21 +0100
commit93facb40ea1d2bf88053230afdc80af2737d7b99 (patch)
tree9dec85dd42776e859ce3a0830011a82c155a3260 /src/lib
parent1a944e0bd39abf49bbe863b23c3b4b84eb7459fc (diff)
Add option to use any DCP frame rate, rather than just the
"allowed" set. Requested-by: Noah Orozco
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/config.cc5
-rw-r--r--src/lib/config.h11
2 files changed, 15 insertions, 1 deletions
diff --git a/src/lib/config.cc b/src/lib/config.cc
index d7503b848..40ae3971b 100644
--- a/src/lib/config.cc
+++ b/src/lib/config.cc
@@ -61,6 +61,7 @@ Config::Config ()
, _use_any_servers (true)
, _tms_path (".")
, _sound_processor (SoundProcessor::from_id (N_("dolby_cp750")))
+ , _allow_any_dcp_frame_rate (false)
, _default_still_length (10)
, _default_container (Ratio::from_id ("185"))
, _default_dcp_content_type (DCPContentType::from_dci_name ("TST"))
@@ -187,6 +188,7 @@ Config::read ()
_check_for_test_updates = f.optional_bool_child("CheckForTestUpdates").get_value_or (false);
_maximum_j2k_bandwidth = f.optional_number_child<int> ("MaximumJ2KBandwidth").get_value_or (250000000);
+ _allow_any_dcp_frame_rate = f.optional_bool_child ("AllowAnyDCPFrameRate");
}
void
@@ -363,7 +365,8 @@ Config::write () const
root->add_child("CheckForTestUpdates")->add_child_text (_check_for_test_updates ? "1" : "0");
root->add_child("MaximumJ2KBandwidth")->add_child_text (raw_convert<string> (_maximum_j2k_bandwidth));
-
+ root->add_child("AllowAnyDCPFrameRate")->add_child_text (_allow_any_dcp_frame_rate ? "1" : "0");
+
doc.write_to_file_formatted (file(false).string ());
}
diff --git a/src/lib/config.h b/src/lib/config.h
index a40e3680a..87b7038de 100644
--- a/src/lib/config.h
+++ b/src/lib/config.h
@@ -116,6 +116,10 @@ public:
std::list<int> allowed_dcp_frame_rates () const {
return _allowed_dcp_frame_rates;
}
+
+ bool allow_any_dcp_frame_rate () const {
+ return _allow_any_dcp_frame_rate;
+ }
DCIMetadata default_dci_metadata () const {
return _default_dci_metadata;
@@ -241,6 +245,11 @@ public:
changed ();
}
+ void set_allow_any_dcp_frame_rate (bool a) {
+ _allow_any_dcp_frame_rate = a;
+ changed ();
+ }
+
void set_default_dci_metadata (DCIMetadata d) {
_default_dci_metadata = d;
changed ();
@@ -369,6 +378,8 @@ private:
/** Our sound processor */
SoundProcessor const * _sound_processor;
std::list<int> _allowed_dcp_frame_rates;
+ /** Allow any video frame rate for the DCP; if true, overrides _allowed_dcp_frame_rates */
+ bool _allow_any_dcp_frame_rate;
/** Default DCI metadata for newly-created Films */
DCIMetadata _default_dci_metadata;
boost::optional<std::string> _language;