diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-03-07 23:48:31 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-03-07 23:48:31 +0000 |
| commit | 5f3d6026a68118666988b997c7ced189b93fabb4 (patch) | |
| tree | 70563ecaafe56a4af87190cfd299350d488324d7 /src/lib | |
| parent | fda4b7ffbc70e63061c741a90dfdc81602764610 (diff) | |
Non-exposed but working language config option.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/config.cc | 16 | ||||
| -rw-r--r-- | src/lib/config.h | 9 |
2 files changed, 22 insertions, 3 deletions
diff --git a/src/lib/config.cc b/src/lib/config.cc index f5273b875..ad132437a 100644 --- a/src/lib/config.cc +++ b/src/lib/config.cc @@ -94,6 +94,8 @@ Config::Config () _tms_password = v; } else if (k == N_("sound_processor")) { _sound_processor = SoundProcessor::from_id (v); + } else if (k == "language") { + _language = v; } _default_dci_metadata.read (k, v); @@ -128,8 +130,11 @@ Config::write () const ofstream f (file().c_str ()); f << N_("num_local_encoding_threads ") << _num_local_encoding_threads << N_("\n") << N_("default_directory ") << _default_directory << N_("\n") - << N_("server_port ") << _server_port << N_("\n") - << N_("reference_scaler ") << _reference_scaler->id () << N_("\n"); + << N_("server_port ") << _server_port << N_("\n"); + + if (_reference_scaler) { + f << "reference_scaler " << _reference_scaler->id () << "\n"; + } for (vector<Filter const *>::const_iterator i = _reference_filters.begin(); i != _reference_filters.end(); ++i) { f << N_("reference_filter ") << (*i)->id () << N_("\n"); @@ -143,7 +148,12 @@ Config::write () const f << N_("tms_path ") << _tms_path << N_("\n"); f << N_("tms_user ") << _tms_user << N_("\n"); f << N_("tms_password ") << _tms_password << N_("\n"); - f << N_("sound_processor ") << _sound_processor->id () << N_("\n"); + if (_sound_processor) { + f << "sound_processor " << _sound_processor->id () << "\n"; + } + if (_language) { + f << "language " << _language.get() << "\n"; + } _default_dci_metadata.write (f); } diff --git a/src/lib/config.h b/src/lib/config.h index fed297ad0..0e9c4a60a 100644 --- a/src/lib/config.h +++ b/src/lib/config.h @@ -103,6 +103,10 @@ public: return _default_dci_metadata; } + boost::optional<std::string> language () const { + return _language; + } + /** @param n New number of local encoding threads */ void set_num_local_encoding_threads (int n) { _num_local_encoding_threads = n; @@ -157,6 +161,10 @@ public: void set_default_dci_metadata (DCIMetadata d) { _default_dci_metadata = d; } + + void set_language (std::string l) { + _language = l; + } void write () const; @@ -192,6 +200,7 @@ private: std::list<int> _allowed_dcp_frame_rates; /** Default DCI metadata for newly-created Films */ DCIMetadata _default_dci_metadata; + boost::optional<std::string> _language; /** Singleton instance, or 0 */ static Config* _instance; |
