X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fconfig.h;h=f3e8f1441b918bd23282f5adfc2f8bb46a20d9e6;hb=6de3f68aa2bec3f8a1c35a587f56fdee5e105ed3;hp=57f4fb8a9de3f557ef2c9fc935e43fc0429dc75a;hpb=147cca5876dfbdf56e21289c3a36bec4b4850191;p=dcpomatic.git diff --git a/src/lib/config.h b/src/lib/config.h index 57f4fb8a9..f3e8f1441 100644 --- a/src/lib/config.h +++ b/src/lib/config.h @@ -27,12 +27,15 @@ #include #include #include +#include #include "dci_metadata.h" class ServerDescription; class Scaler; class Filter; class SoundProcessor; +class DCPContentType; +class Ratio; /** @class Config * @brief A singleton class holding configuration. @@ -62,14 +65,6 @@ public: return _servers; } - Scaler const * reference_scaler () const { - return _reference_scaler; - } - - std::vector reference_filters () const { - return _reference_filters; - } - /** @return The IP address of a TMS that we can copy DCPs to */ std::string tms_ip () const { return _tms_ip; @@ -107,6 +102,22 @@ public: return _language; } + int default_still_length () const { + return _default_still_length; + } + + Ratio const * default_container () const { + return _default_container; + } + + DCPContentType const * default_dcp_content_type () const { + return _default_dcp_content_type; + } + + libdcp::XMLMetadata dcp_metadata () const { + return _dcp_metadata; + } + /** @param n New number of local encoding threads */ void set_num_local_encoding_threads (int n) { _num_local_encoding_threads = n; @@ -169,6 +180,22 @@ public: void unset_language () { _language = boost::none; } + + void set_default_still_length (int s) { + _default_still_length = s; + } + + void set_default_container (Ratio const * c) { + _default_container = c; + } + + void set_default_dcp_content_type (DCPContentType const * t) { + _default_dcp_content_type = t; + } + + void set_dcp_metadata (libdcp::XMLMetadata m) { + _dcp_metadata = m; + } void write () const; @@ -178,6 +205,7 @@ public: private: Config (); std::string file (bool) const; + void read (); void read_old_metadata (); /** number of threads to use for J2K encoding on the local machine */ @@ -207,6 +235,10 @@ private: /** Default DCI metadata for newly-created Films */ DCIMetadata _default_dci_metadata; boost::optional _language; + int _default_still_length; + Ratio const * _default_container; + DCPContentType const * _default_dcp_content_type; + libdcp::XMLMetadata _dcp_metadata; /** Singleton instance, or 0 */ static Config* _instance;