2 Copyright (C) 2012-2018 Carl Hetherington <cth@carlh.net>
4 This file is part of DCP-o-matic.
6 DCP-o-matic is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 DCP-o-matic is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
21 /** @file src/config.h
22 * @brief Class holding configuration.
25 #ifndef DCPOMATIC_CONFIG_H
26 #define DCPOMATIC_CONFIG_H
28 #include "isdcf_metadata.h"
30 #include <dcp/name_format.h>
31 #include <dcp/certificate_chain.h>
32 #include <dcp/encrypted_kdm.h>
33 #include <boost/shared_ptr.hpp>
34 #include <boost/signals2.hpp>
35 #include <boost/filesystem.hpp>
38 class CinemaSoundProcessor;
46 * @brief A singleton class holding configuration.
48 class Config : public boost::noncopyable
51 /** @return number of threads which a master DoM should use for J2K encoding on the local machine */
52 int master_encoding_threads () const {
53 return _master_encoding_threads;
56 /** @return number of threads which a server should use for J2K encoding on the local machine */
57 int server_encoding_threads () const {
58 return _server_encoding_threads;
61 boost::optional<boost::filesystem::path> default_directory () const {
62 return _default_directory;
65 boost::optional<boost::filesystem::path> default_kdm_directory () const {
66 return _default_kdm_directory;
69 boost::filesystem::path default_directory_or (boost::filesystem::path a) const;
70 boost::filesystem::path default_kdm_directory_or (boost::filesystem::path a) const;
80 #ifdef DCPOMATIC_VARIANT_SWAROOP
81 PLAYER_BACKGROUND_IMAGE,
86 /** @return base port number to use for J2K encoding servers */
87 int server_port_base () const {
88 return _server_port_base;
91 void set_use_any_servers (bool u) {
93 changed (USE_ANY_SERVERS);
96 bool use_any_servers () const {
97 return _use_any_servers;
100 /** @param s New list of servers */
101 void set_servers (std::vector<std::string> s) {
106 /** @return Host names / IP addresses of J2K encoding servers that should definitely be used */
107 std::vector<std::string> servers () const {
111 bool only_servers_encode () const {
112 return _only_servers_encode;
115 Protocol tms_protocol () const {
116 return _tms_protocol;
119 /** @return The IP address of a TMS that we can copy DCPs to */
120 std::string tms_ip () const {
124 /** @return The path on a TMS that we should changed DCPs to */
125 std::string tms_path () const {
129 /** @return User name to log into the TMS with */
130 std::string tms_user () const {
134 /** @return Password to log into the TMS with */
135 std::string tms_password () const {
136 return _tms_password;
139 /** @return The cinema sound processor that we are using */
140 CinemaSoundProcessor const * cinema_sound_processor () const {
141 return _cinema_sound_processor;
144 std::list<boost::shared_ptr<Cinema> > cinemas () const {
148 std::list<int> allowed_dcp_frame_rates () const {
149 return _allowed_dcp_frame_rates;
152 bool allow_any_dcp_frame_rate () const {
153 return _allow_any_dcp_frame_rate;
156 bool allow_any_container () const {
157 return _allow_any_container;
160 ISDCFMetadata default_isdcf_metadata () const {
161 return _default_isdcf_metadata;
164 boost::optional<std::string> language () const {
168 int default_still_length () const {
169 return _default_still_length;
172 Ratio const * default_container () const {
173 return _default_container;
176 Ratio const * default_scale_to () const {
177 return _default_scale_to;
180 DCPContentType const * default_dcp_content_type () const {
181 return _default_dcp_content_type;
184 int default_dcp_audio_channels () const {
185 return _default_dcp_audio_channels;
188 std::string dcp_issuer () const {
192 std::string dcp_creator () const {
196 int default_j2k_bandwidth () const {
197 return _default_j2k_bandwidth;
200 int default_audio_delay () const {
201 return _default_audio_delay;
204 bool default_interop () const {
205 return _default_interop;
208 bool default_upload_after_make_dcp () {
209 return _default_upload_after_make_dcp;
212 void set_default_kdm_directory (boost::filesystem::path d) {
213 if (_default_kdm_directory && _default_kdm_directory.get() == d) {
216 _default_kdm_directory = d;
220 std::string mail_server () const {
224 int mail_port () const {
228 std::string mail_user () const {
232 std::string mail_password () const {
233 return _mail_password;
236 std::string kdm_subject () const {
240 std::string kdm_from () const {
244 std::vector<std::string> kdm_cc () const {
248 std::string kdm_bcc () const {
252 std::string kdm_email () const {
256 std::string notification_subject () const {
257 return _notification_subject;
260 std::string notification_from () const {
261 return _notification_from;
264 std::string notification_to () const {
265 return _notification_to;
268 std::vector<std::string> notification_cc () const {
269 return _notification_cc;
272 std::string notification_bcc () const {
273 return _notification_bcc;
276 std::string notification_email () const {
277 return _notification_email;
280 boost::shared_ptr<const dcp::CertificateChain> signer_chain () const {
281 return _signer_chain;
284 boost::shared_ptr<const dcp::CertificateChain> decryption_chain () const {
285 return _decryption_chain;
288 bool check_for_updates () const {
289 return _check_for_updates;
292 bool check_for_test_updates () const {
293 return _check_for_test_updates;
296 int maximum_j2k_bandwidth () const {
297 return _maximum_j2k_bandwidth;
300 int log_types () const {
304 bool analyse_ebur128 () const {
305 return _analyse_ebur128;
308 bool automatic_audio_analysis () const {
309 return _automatic_audio_analysis;
312 #ifdef DCPOMATIC_WINDOWS
313 bool win32_console () const {
314 return _win32_console;
318 std::vector<boost::filesystem::path> history () const {
322 std::vector<boost::filesystem::path> player_history () const {
323 return _player_history;
326 boost::shared_ptr<DKDMGroup> dkdms () const {
330 boost::filesystem::path cinemas_file () const {
331 return _cinemas_file;
334 bool show_hints_before_make_dcp () const {
335 return _show_hints_before_make_dcp;
338 bool confirm_kdm_email () const {
339 return _confirm_kdm_email;
342 dcp::NameFormat kdm_container_name_format () const {
343 return _kdm_container_name_format;
346 dcp::NameFormat kdm_filename_format () const {
347 return _kdm_filename_format;
350 dcp::NameFormat dcp_metadata_filename_format () const {
351 return _dcp_metadata_filename_format;
354 dcp::NameFormat dcp_asset_filename_format () const {
355 return _dcp_asset_filename_format;
358 bool jump_to_selected () const {
359 return _jump_to_selected;
364 NAG_ENCRYPTED_METADATA,
365 NAG_REMAKE_DECRYPTION_CHAIN,
366 NAG_BAD_SIGNER_CHAIN,
367 /* Not really a nag but it's the same idea */
372 bool nagged (Nag nag) const {
376 bool sound () const {
380 std::string cover_sheet () const {
384 boost::optional<std::string> sound_output () const {
385 return _sound_output;
388 boost::optional<boost::filesystem::path> last_player_load_directory () const {
389 return _last_player_load_directory;
398 boost::optional<KDMWriteType> last_kdm_write_type () const {
399 return _last_kdm_write_type;
407 boost::optional<DKDMWriteType> last_dkdm_write_type () const {
408 return _last_dkdm_write_type;
411 int frames_in_memory_multiplier () const {
412 return _frames_in_memory_multiplier;
415 boost::optional<int> decode_reduction () const {
416 return _decode_reduction;
419 bool default_notify () const {
420 return _default_notify;
429 bool notification (Notification n) const {
430 return _notification[n];
433 boost::optional<std::string> barco_username () const {
434 return _barco_username;
437 boost::optional<std::string> barco_password () const {
438 return _barco_password;
441 boost::optional<std::string> christie_username () const {
442 return _christie_username;
445 boost::optional<std::string> christie_password () const {
446 return _christie_password;
449 boost::optional<std::string> gdc_username () const {
450 return _gdc_username;
453 boost::optional<std::string> gdc_password () const {
454 return _gdc_password;
462 Interface interface_complexity () const {
463 return _interface_complexity;
472 PlayerMode player_mode () const {
476 int image_display () const {
477 return _image_display;
480 bool respect_kdm_validity_periods () const {
481 return _respect_kdm_validity_periods;
484 boost::optional<boost::filesystem::path> player_log_file () const {
485 return _player_log_file;
488 boost::optional<boost::filesystem::path> player_dcp_directory () const {
489 return _player_dcp_directory;
492 boost::optional<boost::filesystem::path> player_kdm_directory () const {
493 return _player_kdm_directory;
496 #ifdef DCPOMATIC_VARIANT_SWAROOP
497 boost::optional<boost::filesystem::path> player_background_image () const {
498 return _player_background_image;
501 std::string kdm_server_url () const {
502 return _kdm_server_url;
508 void set_master_encoding_threads (int n) {
509 maybe_set (_master_encoding_threads, n);
512 void set_server_encoding_threads (int n) {
513 maybe_set (_server_encoding_threads, n);
516 void set_default_directory (boost::filesystem::path d) {
517 if (_default_directory && *_default_directory == d) {
520 _default_directory = d;
524 /** @param p New server port */
525 void set_server_port_base (int p) {
526 maybe_set (_server_port_base, p);
529 void set_only_servers_encode (bool o) {
530 maybe_set (_only_servers_encode, o);
533 void set_tms_protocol (Protocol p) {
534 maybe_set (_tms_protocol, p);
537 /** @param i IP address of a TMS that we can copy DCPs to */
538 void set_tms_ip (std::string i) {
539 maybe_set (_tms_ip, i);
542 /** @param p Path on a TMS that we should changed DCPs to */
543 void set_tms_path (std::string p) {
544 maybe_set (_tms_path, p);
547 /** @param u User name to log into the TMS with */
548 void set_tms_user (std::string u) {
549 maybe_set (_tms_user, u);
552 /** @param p Password to log into the TMS with */
553 void set_tms_password (std::string p) {
554 maybe_set (_tms_password, p);
557 void add_cinema (boost::shared_ptr<Cinema> c) {
558 _cinemas.push_back (c);
562 void remove_cinema (boost::shared_ptr<Cinema> c) {
567 void set_allowed_dcp_frame_rates (std::list<int> const & r) {
568 maybe_set (_allowed_dcp_frame_rates, r);
571 void set_allow_any_dcp_frame_rate (bool a) {
572 maybe_set (_allow_any_dcp_frame_rate, a);
575 void set_allow_any_container (bool a) {
576 maybe_set (_allow_any_container, a);
579 void set_default_isdcf_metadata (ISDCFMetadata d) {
580 maybe_set (_default_isdcf_metadata, d);
583 void set_language (std::string l) {
584 if (_language && _language.get() == l) {
591 void unset_language () {
596 _language = boost::none;
600 void set_default_still_length (int s) {
601 maybe_set (_default_still_length, s);
604 void set_default_container (Ratio const * c) {
605 maybe_set (_default_container, c);
608 void set_default_scale_to (Ratio const * c) {
609 maybe_set (_default_scale_to, c);
612 void set_default_dcp_content_type (DCPContentType const * t) {
613 maybe_set (_default_dcp_content_type, t);
616 void set_default_dcp_audio_channels (int c) {
617 maybe_set (_default_dcp_audio_channels, c);
620 void set_dcp_issuer (std::string i) {
621 maybe_set (_dcp_issuer, i);
624 void set_dcp_creator (std::string c) {
625 maybe_set (_dcp_creator, c);
628 void set_default_j2k_bandwidth (int b) {
629 maybe_set (_default_j2k_bandwidth, b);
632 void set_default_audio_delay (int d) {
633 maybe_set (_default_audio_delay, d);
636 void set_default_interop (bool i) {
637 maybe_set (_default_interop, i);
640 void set_default_upload_after_make_dcp (bool u) {
641 maybe_set (_default_upload_after_make_dcp, u);
644 void set_mail_server (std::string s) {
645 maybe_set (_mail_server, s);
648 void set_mail_port (int p) {
649 maybe_set (_mail_port, p);
652 void set_mail_user (std::string u) {
653 maybe_set (_mail_user, u);
656 void set_mail_password (std::string p) {
657 maybe_set (_mail_password, p);
660 void set_kdm_subject (std::string s) {
661 maybe_set (_kdm_subject, s);
664 void set_kdm_from (std::string f) {
665 maybe_set (_kdm_from, f);
668 void set_kdm_cc (std::vector<std::string> f) {
669 maybe_set (_kdm_cc, f);
672 void set_kdm_bcc (std::string f) {
673 maybe_set (_kdm_bcc, f);
676 void set_kdm_email (std::string e) {
677 maybe_set (_kdm_email, e);
680 void reset_kdm_email ();
682 void set_notification_subject (std::string s) {
683 maybe_set (_notification_subject, s);
686 void set_notification_from (std::string f) {
687 maybe_set (_notification_from, f);
690 void set_notification_to (std::string t) {
691 maybe_set (_notification_to, t);
694 void set_notification_cc (std::vector<std::string> f) {
695 maybe_set (_notification_cc, f);
698 void set_notification_bcc (std::string f) {
699 maybe_set (_notification_bcc, f);
702 void set_notification_email (std::string e) {
703 maybe_set (_notification_email, e);
706 void reset_notification_email ();
708 void set_signer_chain (boost::shared_ptr<const dcp::CertificateChain> s) {
709 maybe_set (_signer_chain, s);
712 void set_decryption_chain (boost::shared_ptr<const dcp::CertificateChain> c) {
713 maybe_set (_decryption_chain, c);
716 void set_check_for_updates (bool c) {
717 maybe_set (_check_for_updates, c);
719 set_check_for_test_updates (false);
723 void set_check_for_test_updates (bool c) {
724 maybe_set (_check_for_test_updates, c);
727 void set_maximum_j2k_bandwidth (int b) {
728 maybe_set (_maximum_j2k_bandwidth, b);
731 void set_log_types (int t) {
732 maybe_set (_log_types, t);
735 void set_analyse_ebur128 (bool a) {
736 maybe_set (_analyse_ebur128, a);
739 void set_automatic_audio_analysis (bool a) {
740 maybe_set (_automatic_audio_analysis, a);
743 #ifdef DCPOMATIC_WINDOWS
744 void set_win32_console (bool c) {
745 maybe_set (_win32_console, c);
749 void set_dkdms (boost::shared_ptr<DKDMGroup> dkdms) {
754 void set_cinemas_file (boost::filesystem::path file);
756 void set_show_hints_before_make_dcp (bool s) {
757 maybe_set (_show_hints_before_make_dcp, s);
760 void set_confirm_kdm_email (bool s) {
761 maybe_set (_confirm_kdm_email, s);
764 void set_sound (bool s) {
765 maybe_set (_sound, s, SOUND);
768 void set_sound_output (std::string o) {
769 maybe_set (_sound_output, o, SOUND_OUTPUT);
772 void set_last_player_load_directory (boost::filesystem::path d) {
773 maybe_set (_last_player_load_directory, d);
776 void set_last_kdm_write_type (KDMWriteType t) {
777 maybe_set (_last_kdm_write_type, t);
780 void set_last_dkdm_write_type (DKDMWriteType t) {
781 maybe_set (_last_dkdm_write_type, t);
784 void unset_sound_output () {
785 if (!_sound_output) {
789 _sound_output = boost::none;
793 void set_kdm_container_name_format (dcp::NameFormat n) {
794 maybe_set (_kdm_container_name_format, n);
797 void set_kdm_filename_format (dcp::NameFormat n) {
798 maybe_set (_kdm_filename_format, n);
801 void set_dcp_metadata_filename_format (dcp::NameFormat n) {
802 maybe_set (_dcp_metadata_filename_format, n);
805 void set_dcp_asset_filename_format (dcp::NameFormat n) {
806 maybe_set (_dcp_asset_filename_format, n);
809 void set_frames_in_memory_multiplier (int m) {
810 maybe_set (_frames_in_memory_multiplier, m);
813 void set_decode_reduction (boost::optional<int> r) {
814 maybe_set (_decode_reduction, r);
817 void set_default_notify (bool n) {
818 maybe_set (_default_notify, n);
821 void clear_history () {
826 void clear_player_history () {
827 _player_history.clear ();
831 void add_to_history (boost::filesystem::path p);
832 void add_to_player_history (boost::filesystem::path p);
834 void set_jump_to_selected (bool j) {
835 maybe_set (_jump_to_selected, j);
838 void set_nagged (Nag nag, bool nagged) {
839 maybe_set (_nagged[nag], nagged);
842 void set_cover_sheet (std::string s) {
843 maybe_set (_cover_sheet, s);
846 void reset_cover_sheet ();
848 void set_notification (Notification n, bool v) {
849 maybe_set (_notification[n], v);
852 void set_barco_username (std::string u) {
853 maybe_set (_barco_username, u);
856 void unset_barco_username () {
857 maybe_set (_barco_username, boost::optional<std::string>());
860 void set_barco_password (std::string p) {
861 maybe_set (_barco_password, p);
864 void unset_barco_password () {
865 maybe_set (_barco_password, boost::optional<std::string>());
868 void set_christie_username (std::string u) {
869 maybe_set (_christie_username, u);
872 void unset_christie_username () {
873 maybe_set (_christie_username, boost::optional<std::string>());
876 void set_christie_password (std::string p) {
877 maybe_set (_christie_password, p);
880 void unset_christie_password () {
881 maybe_set (_christie_password, boost::optional<std::string>());
884 void set_gdc_username (std::string u) {
885 maybe_set (_gdc_username, u);
888 void unset_gdc_username () {
889 maybe_set (_gdc_username, boost::optional<std::string>());
892 void set_gdc_password (std::string p) {
893 maybe_set (_gdc_password, p);
896 void unset_gdc_password () {
897 maybe_set (_gdc_password, boost::optional<std::string>());
900 void set_interface_complexity (Interface i) {
901 maybe_set (_interface_complexity, i, INTERFACE_COMPLEXITY);
904 void set_player_mode (PlayerMode m) {
905 maybe_set (_player_mode, m);
908 void set_image_display (int n) {
909 maybe_set (_image_display, n);
912 void set_respect_kdm_validity_periods (bool r) {
913 maybe_set (_respect_kdm_validity_periods, r);
916 void set_player_log_file (boost::filesystem::path p) {
917 maybe_set (_player_log_file, p);
920 void unset_player_log_file () {
921 if (!_player_log_file) {
924 _player_log_file = boost::none;
928 void set_player_dcp_directory (boost::filesystem::path p) {
929 maybe_set (_player_dcp_directory, p, PLAYER_DCP_DIRECTORY);
932 void unset_player_dcp_directory () {
933 if (!_player_dcp_directory) {
936 _player_dcp_directory = boost::none;
937 changed (PLAYER_DCP_DIRECTORY);
940 void set_player_kdm_directory (boost::filesystem::path p) {
941 maybe_set (_player_kdm_directory, p);
944 void unset_player_kdm_directory () {
945 if (!_player_kdm_directory) {
948 _player_kdm_directory = boost::none;
952 #ifdef DCPOMATIC_VARIANT_SWAROOP
953 void set_player_background_image (boost::filesystem::path p) {
954 maybe_set (_player_background_image, p, PLAYER_BACKGROUND_IMAGE);
957 void unset_player_background_image () {
958 if (!_player_background_image) {
961 _player_background_image = boost::none;
962 changed (PLAYER_BACKGROUND_IMAGE);
965 void set_kdm_server_url (std::string s) {
966 maybe_set (_kdm_server_url, s);
970 void changed (Property p = OTHER);
971 boost::signals2::signal<void (Property)> Changed;
972 /** Emitted if read() failed on an existing Config file. There is nothing
973 a listener can do about it: this is just for information.
975 static boost::signals2::signal<void ()> FailedToLoad;
976 /** Emitted if read() issued a warning which the user might want to know about */
977 static boost::signals2::signal<void (std::string)> Warning;
978 /** Emitted if there is a bad certificate in the signer chain. Handler can call
979 * true to ask Config to re-create the chain.
981 static boost::signals2::signal<bool (void)> BadSignerChain;
984 void write_config () const;
985 void write_cinemas () const;
986 void link (boost::filesystem::path new_file) const;
987 void copy_and_link (boost::filesystem::path new_file) const;
989 void save_template (boost::shared_ptr<const Film> film, std::string name) const;
990 bool existing_template (std::string name) const;
991 std::list<std::string> templates () const;
992 boost::filesystem::path template_path (std::string name) const;
993 void rename_template (std::string old_name, std::string new_name) const;
994 void delete_template (std::string name) const;
996 static Config* instance ();
998 static void restore_defaults ();
999 static bool have_existing (std::string);
1000 static boost::filesystem::path config_file ();
1002 /** If set, this overrides the standard path (in home, Library, AppData or wherever) for config.xml and cinemas.xml */
1003 static boost::optional<boost::filesystem::path> override_path;
1007 static boost::filesystem::path path (std::string file, bool create_directories = true);
1009 void set_defaults ();
1010 void set_kdm_email_to_default ();
1011 void set_notification_email_to_default ();
1012 void set_cover_sheet_to_default ();
1013 void read_cinemas (cxml::Document const & f);
1014 boost::shared_ptr<dcp::CertificateChain> create_certificate_chain ();
1015 boost::filesystem::path directory_or (boost::optional<boost::filesystem::path> dir, boost::filesystem::path a) const;
1016 void add_to_history_internal (std::vector<boost::filesystem::path>& h, boost::filesystem::path p);
1020 void maybe_set (T& member, T new_value, Property prop = OTHER) {
1021 if (member == new_value) {
1029 void maybe_set (boost::optional<T>& member, T new_value, Property prop = OTHER) {
1030 if (member && member.get() == new_value) {
1037 /** number of threads which a master DoM should use for J2K encoding on the local machine */
1038 int _master_encoding_threads;
1039 /** number of threads which a server should use for J2K encoding on the local machine */
1040 int _server_encoding_threads;
1041 /** default directory to put new films in */
1042 boost::optional<boost::filesystem::path> _default_directory;
1043 /** base port number to use for J2K encoding servers;
1044 * this port and the two above it will be used.
1046 int _server_port_base;
1047 /** true to broadcast on the `any' address to look for servers */
1048 bool _use_any_servers;
1049 /** J2K encoding servers that should definitely be used */
1050 std::vector<std::string> _servers;
1051 bool _only_servers_encode;
1052 Protocol _tms_protocol;
1053 /** The IP address of a TMS that we can copy DCPs to */
1054 std::string _tms_ip;
1055 /** The path on a TMS that we should write DCPs to */
1056 std::string _tms_path;
1057 /** User name to log into the TMS with */
1058 std::string _tms_user;
1059 /** Password to log into the TMS with */
1060 std::string _tms_password;
1061 /** Our cinema sound processor */
1062 CinemaSoundProcessor const * _cinema_sound_processor;
1063 std::list<int> _allowed_dcp_frame_rates;
1064 /** Allow any video frame rate for the DCP; if true, overrides _allowed_dcp_frame_rates */
1065 bool _allow_any_dcp_frame_rate;
1066 /** Allow any container ratio, not just the standard ones. GDC SX-2001 will not play Flat
1067 DCPs at 25fps but will play 16:9, so this is very useful for some users.
1068 https://www.dcpomatic.com/forum/viewtopic.php?f=2&t=1119&p=4468
1070 bool _allow_any_container;
1071 /** Default ISDCF metadata for newly-created Films */
1072 ISDCFMetadata _default_isdcf_metadata;
1073 boost::optional<std::string> _language;
1074 /** Default length of still image content (seconds) */
1075 int _default_still_length;
1076 Ratio const * _default_container;
1077 Ratio const * _default_scale_to;
1078 DCPContentType const * _default_dcp_content_type;
1079 int _default_dcp_audio_channels;
1080 std::string _dcp_issuer;
1081 std::string _dcp_creator;
1082 int _default_j2k_bandwidth;
1083 int _default_audio_delay;
1084 bool _default_interop;
1085 /** Default directory to offer to write KDMs to; if it's not set,
1086 the home directory will be offered.
1088 boost::optional<boost::filesystem::path> _default_kdm_directory;
1089 bool _default_upload_after_make_dcp;
1090 std::list<boost::shared_ptr<Cinema> > _cinemas;
1091 std::string _mail_server;
1093 std::string _mail_user;
1094 std::string _mail_password;
1095 std::string _kdm_subject;
1096 std::string _kdm_from;
1097 std::vector<std::string> _kdm_cc;
1098 std::string _kdm_bcc;
1099 std::string _kdm_email;
1100 std::string _notification_subject;
1101 std::string _notification_from;
1102 std::string _notification_to;
1103 std::vector<std::string> _notification_cc;
1104 std::string _notification_bcc;
1105 std::string _notification_email;
1106 boost::shared_ptr<const dcp::CertificateChain> _signer_chain;
1107 /** Chain used to decrypt KDMs; the leaf of this chain is the target
1108 * certificate for making KDMs given to DCP-o-matic.
1110 boost::shared_ptr<const dcp::CertificateChain> _decryption_chain;
1111 /** true to check for updates on startup */
1112 bool _check_for_updates;
1113 bool _check_for_test_updates;
1114 /** maximum allowed J2K bandwidth in bits per second */
1115 int _maximum_j2k_bandwidth;
1117 bool _analyse_ebur128;
1118 bool _automatic_audio_analysis;
1119 #ifdef DCPOMATIC_WINDOWS
1120 bool _win32_console;
1122 std::vector<boost::filesystem::path> _history;
1123 std::vector<boost::filesystem::path> _player_history;
1124 boost::shared_ptr<DKDMGroup> _dkdms;
1125 boost::filesystem::path _cinemas_file;
1126 bool _show_hints_before_make_dcp;
1127 bool _confirm_kdm_email;
1128 dcp::NameFormat _kdm_filename_format;
1129 dcp::NameFormat _kdm_container_name_format;
1130 dcp::NameFormat _dcp_metadata_filename_format;
1131 dcp::NameFormat _dcp_asset_filename_format;
1132 bool _jump_to_selected;
1133 bool _nagged[NAG_COUNT];
1135 /** name of a specific sound output stream to use, or empty to use the default */
1136 boost::optional<std::string> _sound_output;
1137 std::string _cover_sheet;
1138 boost::optional<boost::filesystem::path> _last_player_load_directory;
1139 boost::optional<KDMWriteType> _last_kdm_write_type;
1140 boost::optional<DKDMWriteType> _last_dkdm_write_type;
1141 int _frames_in_memory_multiplier;
1142 boost::optional<int> _decode_reduction;
1143 bool _default_notify;
1144 bool _notification[NOTIFICATION_COUNT];
1145 boost::optional<std::string> _barco_username;
1146 boost::optional<std::string> _barco_password;
1147 boost::optional<std::string> _christie_username;
1148 boost::optional<std::string> _christie_password;
1149 boost::optional<std::string> _gdc_username;
1150 boost::optional<std::string> _gdc_password;
1151 Interface _interface_complexity;
1152 PlayerMode _player_mode;
1154 bool _respect_kdm_validity_periods;
1155 boost::optional<boost::filesystem::path> _player_log_file;
1156 /** A directory containing DCPs whose contents are presented to the user
1157 in the dual-screen player mode. DCPs on the list can be loaded
1160 boost::optional<boost::filesystem::path> _player_dcp_directory;
1161 boost::optional<boost::filesystem::path> _player_kdm_directory;
1162 #ifdef DCPOMATIC_VARIANT_SWAROOP
1163 boost::optional<boost::filesystem::path> _player_background_image;
1164 std::string _kdm_server_url;
1167 static int const _current_version;
1169 /** Singleton instance, or 0 */
1170 static Config* _instance;