This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <boost/shared_ptr.hpp>
#include <boost/signals2.hpp>
#include <boost/filesystem.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/signals2.hpp>
#include <boost/filesystem.hpp>
-#include "isdcf_metadata.h"
-#include "colour_conversion.h"
-#include "server.h"
-#include "video_content.h"
-
-class ServerDescription;
-class Scaler;
-class Filter;
-class SoundProcessor;
+#include <vector>
+
+class CinemaSoundProcessor;
/** @return number of threads to use for J2K encoding on the local machine */
int num_local_encoding_threads () const {
return _num_local_encoding_threads;
/** @return number of threads to use for J2K encoding on the local machine */
int num_local_encoding_threads () const {
return _num_local_encoding_threads;
/** @return base port number to use for J2K encoding servers */
int server_port_base () const {
return _server_port_base;
/** @return base port number to use for J2K encoding servers */
int server_port_base () const {
return _server_port_base;
- /** @return The sound processor that we are using */
- SoundProcessor const * sound_processor () const {
- return _sound_processor;
+ /** @return The cinema sound processor that we are using */
+ CinemaSoundProcessor const * cinema_sound_processor () const {
+ return _cinema_sound_processor;
std::vector<boost::filesystem::path> history () const {
return _history;
}
/** @param n New number of local encoding threads */
void set_num_local_encoding_threads (int n) {
std::vector<boost::filesystem::path> history () const {
return _history;
}
/** @param n New number of local encoding threads */
void set_num_local_encoding_threads (int n) {
- _server_port_base = p;
- changed ();
+ maybe_set (_server_port_base, p);
+ }
+
+ void set_only_servers_encode (bool o) {
+ maybe_set (_only_servers_encode, o);
+ }
+
+ void set_tms_protocol (Protocol p) {
+ maybe_set (_tms_protocol, p);
- void set_colour_conversions (std::vector<PresetColourConversion> const & c) {
- _colour_conversions = c;
- changed ();
+ void set_default_interop (bool i) {
+ maybe_set (_default_interop, i);
+ void set_signer_chain (boost::shared_ptr<const dcp::CertificateChain> s) {
+ maybe_set (_signer_chain, s);
+ }
+
+ void set_decryption_chain (boost::shared_ptr<const dcp::CertificateChain> c) {
+ maybe_set (_decryption_chain, c);
+ }
+
+ void set_automatic_audio_analysis (bool a) {
+ maybe_set (_automatic_audio_analysis, a);
+ }
+
+#ifdef DCPOMATIC_WINDOWS
+ void set_win32_console (bool c) {
+ maybe_set (_win32_console, c);
+ }
+#endif
+
- void read_old_metadata ();
- void write () const;
+ void set_defaults ();
+ void set_kdm_email_to_default ();
+ boost::shared_ptr<dcp::CertificateChain> create_certificate_chain ();
+
+ template <class T>
+ void maybe_set (T& member, T new_value) {
+ if (member == new_value) {
+ return;
+ }
+ member = new_value;
+ changed ();
+ }
/** number of threads to use for J2K encoding on the local machine */
int _num_local_encoding_threads;
/** default directory to put new films in */
boost::filesystem::path _default_directory;
/** base port number to use for J2K encoding servers;
/** number of threads to use for J2K encoding on the local machine */
int _num_local_encoding_threads;
/** default directory to put new films in */
boost::filesystem::path _default_directory;
/** base port number to use for J2K encoding servers;
*/
int _server_port_base;
/** true to broadcast on the `any' address to look for servers */
bool _use_any_servers;
/** J2K encoding servers that should definitely be used */
std::vector<std::string> _servers;
*/
int _server_port_base;
/** true to broadcast on the `any' address to look for servers */
bool _use_any_servers;
/** J2K encoding servers that should definitely be used */
std::vector<std::string> _servers;
/** The IP address of a TMS that we can copy DCPs to */
std::string _tms_ip;
/** The path on a TMS that we should write DCPs to */
/** The IP address of a TMS that we can copy DCPs to */
std::string _tms_ip;
/** The path on a TMS that we should write DCPs to */
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 ISDCF metadata for newly-created Films */
ISDCFMetadata _default_isdcf_metadata;
boost::optional<std::string> _language;
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 ISDCF metadata for newly-created Films */
ISDCFMetadata _default_isdcf_metadata;
boost::optional<std::string> _language;
+ boost::shared_ptr<const dcp::CertificateChain> _signer_chain;
+ /** Chain used to decrypt KDMs; the leaf of this chain is the target
+ * certificate for making KDMs given to DCP-o-matic.
+ */
+ boost::shared_ptr<const dcp::CertificateChain> _decryption_chain;
/** true to check for updates on startup */
bool _check_for_updates;
bool _check_for_test_updates;
/** maximum allowed J2K bandwidth in bits per second */
int _maximum_j2k_bandwidth;
int _log_types;
/** true to check for updates on startup */
bool _check_for_updates;
bool _check_for_test_updates;
/** maximum allowed J2K bandwidth in bits per second */
int _maximum_j2k_bandwidth;
int _log_types;
/** Singleton instance, or 0 */
static Config* _instance;
};
/** Singleton instance, or 0 */
static Config* _instance;
};