X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fconfig.h;h=77287e6868a85c0f894708540247d5e099342358;hb=49a51ff9778f3b72ee962d3e8bd9cf71944f3c2b;hp=91926750b8a9a44b37096c144756fe6dca65ff95;hpb=f85101ff72bf93ab3546ea0c4ec8e3f1242f256f;p=dcpomatic.git diff --git a/src/lib/config.h b/src/lib/config.h index 91926750b..77287e686 100644 --- a/src/lib/config.h +++ b/src/lib/config.h @@ -27,17 +27,20 @@ #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. */ -class Config +class Config : public boost::noncopyable { public: @@ -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; @@ -111,6 +106,22 @@ public: 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; + } + + int default_j2k_bandwidth () const { + return _default_j2k_bandwidth; + } + /** @param n New number of local encoding threads */ void set_num_local_encoding_threads (int n) { _num_local_encoding_threads = n; @@ -178,6 +189,22 @@ public: _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 set_default_j2k_bandwidth (int b) { + _default_j2k_bandwidth = b; + } + void write () const; static Config* instance (); @@ -186,6 +213,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 */ @@ -216,6 +244,10 @@ private: 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; + int _default_j2k_bandwidth; /** Singleton instance, or 0 */ static Config* _instance;