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;
83 /** @return base port number to use for J2K encoding servers */
84 int server_port_base () const {
85 return _server_port_base;
88 void set_use_any_servers (bool u) {
90 changed (USE_ANY_SERVERS);
93 bool use_any_servers () const {
94 return _use_any_servers;
97 /** @param s New list of servers */
98 void set_servers (std::vector<std::string> s) {
103 /** @return Host names / IP addresses of J2K encoding servers that should definitely be used */
104 std::vector<std::string> servers () const {
108 bool only_servers_encode () const {
109 return _only_servers_encode;
112 Protocol tms_protocol () const {
113 return _tms_protocol;
116 /** @return The IP address of a TMS that we can copy DCPs to */
117 std::string tms_ip () const {
121 /** @return The path on a TMS that we should changed DCPs to */
122 std::string tms_path () const {
126 /** @return User name to log into the TMS with */
127 std::string tms_user () const {
131 /** @return Password to log into the TMS with */
132 std::string tms_password () const {
133 return _tms_password;
136 /** @return The cinema sound processor that we are using */
137 CinemaSoundProcessor const * cinema_sound_processor () const {
138 return _cinema_sound_processor;
141 std::list<boost::shared_ptr<Cinema> > cinemas () const {
145 std::list<int> allowed_dcp_frame_rates () const {
146 return _allowed_dcp_frame_rates;
149 bool allow_any_dcp_frame_rate () const {
150 return _allow_any_dcp_frame_rate;
153 bool allow_any_container () const {
154 return _allow_any_container;
157 ISDCFMetadata default_isdcf_metadata () const {
158 return _default_isdcf_metadata;
161 boost::optional<std::string> language () const {
165 int default_still_length () const {
166 return _default_still_length;
169 Ratio const * default_container () const {
170 return _default_container;
173 Ratio const * default_scale_to () const {
174 return _default_scale_to;
177 DCPContentType const * default_dcp_content_type () const {
178 return _default_dcp_content_type;
181 int default_dcp_audio_channels () const {
182 return _default_dcp_audio_channels;
185 std::string dcp_issuer () const {
189 std::string dcp_creator () const {
193 int default_j2k_bandwidth () const {
194 return _default_j2k_bandwidth;
197 int default_audio_delay () const {
198 return _default_audio_delay;
201 bool default_interop () const {
202 return _default_interop;
205 bool default_upload_after_make_dcp () {
206 return _default_upload_after_make_dcp;
209 void set_default_kdm_directory (boost::filesystem::path d) {
210 if (_default_kdm_directory && _default_kdm_directory.get() == d) {
213 _default_kdm_directory = d;
217 std::string mail_server () const {
221 int mail_port () const {
225 std::string mail_user () const {
229 std::string mail_password () const {
230 return _mail_password;
233 std::string kdm_subject () const {
237 std::string kdm_from () const {
241 std::vector<std::string> kdm_cc () const {
245 std::string kdm_bcc () const {
249 std::string kdm_email () const {
253 std::string notification_subject () const {
254 return _notification_subject;
257 std::string notification_from () const {
258 return _notification_from;
261 std::string notification_to () const {
262 return _notification_to;
265 std::vector<std::string> notification_cc () const {
266 return _notification_cc;
269 std::string notification_bcc () const {
270 return _notification_bcc;
273 std::string notification_email () const {
274 return _notification_email;
277 boost::shared_ptr<const dcp::CertificateChain> signer_chain () const {
278 return _signer_chain;
281 boost::shared_ptr<const dcp::CertificateChain> decryption_chain () const {
282 return _decryption_chain;
285 bool check_for_updates () const {
286 return _check_for_updates;
289 bool check_for_test_updates () const {
290 return _check_for_test_updates;
293 int maximum_j2k_bandwidth () const {
294 return _maximum_j2k_bandwidth;
297 int log_types () const {
301 bool analyse_ebur128 () const {
302 return _analyse_ebur128;
305 bool automatic_audio_analysis () const {
306 return _automatic_audio_analysis;
309 #ifdef DCPOMATIC_WINDOWS
310 bool win32_console () const {
311 return _win32_console;
315 std::vector<boost::filesystem::path> history () const {
319 std::vector<boost::filesystem::path> player_history () const {
320 return _player_history;
323 boost::shared_ptr<DKDMGroup> dkdms () const {
327 boost::filesystem::path cinemas_file () const {
328 return _cinemas_file;
331 bool show_hints_before_make_dcp () const {
332 return _show_hints_before_make_dcp;
335 bool confirm_kdm_email () const {
336 return _confirm_kdm_email;
339 dcp::NameFormat kdm_container_name_format () const {
340 return _kdm_container_name_format;
343 dcp::NameFormat kdm_filename_format () const {
344 return _kdm_filename_format;
347 dcp::NameFormat dcp_metadata_filename_format () const {
348 return _dcp_metadata_filename_format;
351 dcp::NameFormat dcp_asset_filename_format () const {
352 return _dcp_asset_filename_format;
355 bool jump_to_selected () const {
356 return _jump_to_selected;
361 NAG_ENCRYPTED_METADATA,
362 NAG_REMAKE_DECRYPTION_CHAIN,
363 NAG_BAD_SIGNER_CHAIN,
364 /* Not really a nag but it's the same idea */
369 bool nagged (Nag nag) const {
373 bool sound () const {
377 std::string cover_sheet () const {
381 boost::optional<std::string> sound_output () const {
382 return _sound_output;
385 boost::optional<boost::filesystem::path> last_player_load_directory () const {
386 return _last_player_load_directory;
395 boost::optional<KDMWriteType> last_kdm_write_type () const {
396 return _last_kdm_write_type;
404 boost::optional<DKDMWriteType> last_dkdm_write_type () const {
405 return _last_dkdm_write_type;
408 int frames_in_memory_multiplier () const {
409 return _frames_in_memory_multiplier;
412 boost::optional<int> decode_reduction () const {
413 return _decode_reduction;
416 bool default_notify () const {
417 return _default_notify;
426 bool notification (Notification n) const {
427 return _notification[n];
430 boost::optional<std::string> barco_username () const {
431 return _barco_username;
434 boost::optional<std::string> barco_password () const {
435 return _barco_password;
438 boost::optional<std::string> christie_username () const {
439 return _christie_username;
442 boost::optional<std::string> christie_password () const {
443 return _christie_password;
446 boost::optional<std::string> gdc_username () const {
447 return _gdc_username;
450 boost::optional<std::string> gdc_password () const {
451 return _gdc_password;
459 Interface interface_complexity () const {
460 return _interface_complexity;
469 PlayerMode player_mode () const {
473 int image_display () const {
474 return _image_display;
477 bool respect_kdm_validity_periods () const {
478 return _respect_kdm_validity_periods;
481 boost::optional<boost::filesystem::path> player_log_file () const {
482 return _player_log_file;
485 boost::optional<boost::filesystem::path> player_dcp_directory () const {
486 return _player_dcp_directory;
489 boost::optional<boost::filesystem::path> player_kdm_directory () const {
490 return _player_kdm_directory;
493 #ifdef DCPOMATIC_VARIANT_SWAROOP
494 boost::optional<boost::filesystem::path> player_background_image () const {
495 return _player_background_image;
501 void set_master_encoding_threads (int n) {
502 maybe_set (_master_encoding_threads, n);
505 void set_server_encoding_threads (int n) {
506 maybe_set (_server_encoding_threads, n);
509 void set_default_directory (boost::filesystem::path d) {
510 if (_default_directory && *_default_directory == d) {
513 _default_directory = d;
517 /** @param p New server port */
518 void set_server_port_base (int p) {
519 maybe_set (_server_port_base, p);
522 void set_only_servers_encode (bool o) {
523 maybe_set (_only_servers_encode, o);
526 void set_tms_protocol (Protocol p) {
527 maybe_set (_tms_protocol, p);
530 /** @param i IP address of a TMS that we can copy DCPs to */
531 void set_tms_ip (std::string i) {
532 maybe_set (_tms_ip, i);
535 /** @param p Path on a TMS that we should changed DCPs to */
536 void set_tms_path (std::string p) {
537 maybe_set (_tms_path, p);
540 /** @param u User name to log into the TMS with */
541 void set_tms_user (std::string u) {
542 maybe_set (_tms_user, u);
545 /** @param p Password to log into the TMS with */
546 void set_tms_password (std::string p) {
547 maybe_set (_tms_password, p);
550 void add_cinema (boost::shared_ptr<Cinema> c) {
551 _cinemas.push_back (c);
555 void remove_cinema (boost::shared_ptr<Cinema> c) {
560 void set_allowed_dcp_frame_rates (std::list<int> const & r) {
561 maybe_set (_allowed_dcp_frame_rates, r);
564 void set_allow_any_dcp_frame_rate (bool a) {
565 maybe_set (_allow_any_dcp_frame_rate, a);
568 void set_allow_any_container (bool a) {
569 maybe_set (_allow_any_container, a);
572 void set_default_isdcf_metadata (ISDCFMetadata d) {
573 maybe_set (_default_isdcf_metadata, d);
576 void set_language (std::string l) {
577 if (_language && _language.get() == l) {
584 void unset_language () {
589 _language = boost::none;
593 void set_default_still_length (int s) {
594 maybe_set (_default_still_length, s);
597 void set_default_container (Ratio const * c) {
598 maybe_set (_default_container, c);
601 void set_default_scale_to (Ratio const * c) {
602 maybe_set (_default_scale_to, c);
605 void set_default_dcp_content_type (DCPContentType const * t) {
606 maybe_set (_default_dcp_content_type, t);
609 void set_default_dcp_audio_channels (int c) {
610 maybe_set (_default_dcp_audio_channels, c);
613 void set_dcp_issuer (std::string i) {
614 maybe_set (_dcp_issuer, i);
617 void set_dcp_creator (std::string c) {
618 maybe_set (_dcp_creator, c);
621 void set_default_j2k_bandwidth (int b) {
622 maybe_set (_default_j2k_bandwidth, b);
625 void set_default_audio_delay (int d) {
626 maybe_set (_default_audio_delay, d);
629 void set_default_interop (bool i) {
630 maybe_set (_default_interop, i);
633 void set_default_upload_after_make_dcp (bool u) {
634 maybe_set (_default_upload_after_make_dcp, u);
637 void set_mail_server (std::string s) {
638 maybe_set (_mail_server, s);
641 void set_mail_port (int p) {
642 maybe_set (_mail_port, p);
645 void set_mail_user (std::string u) {
646 maybe_set (_mail_user, u);
649 void set_mail_password (std::string p) {
650 maybe_set (_mail_password, p);
653 void set_kdm_subject (std::string s) {
654 maybe_set (_kdm_subject, s);
657 void set_kdm_from (std::string f) {
658 maybe_set (_kdm_from, f);
661 void set_kdm_cc (std::vector<std::string> f) {
662 maybe_set (_kdm_cc, f);
665 void set_kdm_bcc (std::string f) {
666 maybe_set (_kdm_bcc, f);
669 void set_kdm_email (std::string e) {
670 maybe_set (_kdm_email, e);
673 void reset_kdm_email ();
675 void set_notification_subject (std::string s) {
676 maybe_set (_notification_subject, s);
679 void set_notification_from (std::string f) {
680 maybe_set (_notification_from, f);
683 void set_notification_to (std::string t) {
684 maybe_set (_notification_to, t);
687 void set_notification_cc (std::vector<std::string> f) {
688 maybe_set (_notification_cc, f);
691 void set_notification_bcc (std::string f) {
692 maybe_set (_notification_bcc, f);
695 void set_notification_email (std::string e) {
696 maybe_set (_notification_email, e);
699 void reset_notification_email ();
701 void set_signer_chain (boost::shared_ptr<const dcp::CertificateChain> s) {
702 maybe_set (_signer_chain, s);
705 void set_decryption_chain (boost::shared_ptr<const dcp::CertificateChain> c) {
706 maybe_set (_decryption_chain, c);
709 void set_check_for_updates (bool c) {
710 maybe_set (_check_for_updates, c);
712 set_check_for_test_updates (false);
716 void set_check_for_test_updates (bool c) {
717 maybe_set (_check_for_test_updates, c);
720 void set_maximum_j2k_bandwidth (int b) {
721 maybe_set (_maximum_j2k_bandwidth, b);
724 void set_log_types (int t) {
725 maybe_set (_log_types, t);
728 void set_analyse_ebur128 (bool a) {
729 maybe_set (_analyse_ebur128, a);
732 void set_automatic_audio_analysis (bool a) {
733 maybe_set (_automatic_audio_analysis, a);
736 #ifdef DCPOMATIC_WINDOWS
737 void set_win32_console (bool c) {
738 maybe_set (_win32_console, c);
742 void set_dkdms (boost::shared_ptr<DKDMGroup> dkdms) {
747 void set_cinemas_file (boost::filesystem::path file);
749 void set_show_hints_before_make_dcp (bool s) {
750 maybe_set (_show_hints_before_make_dcp, s);
753 void set_confirm_kdm_email (bool s) {
754 maybe_set (_confirm_kdm_email, s);
757 void set_sound (bool s) {
758 maybe_set (_sound, s, SOUND);
761 void set_sound_output (std::string o) {
762 maybe_set (_sound_output, o, SOUND_OUTPUT);
765 void set_last_player_load_directory (boost::filesystem::path d) {
766 maybe_set (_last_player_load_directory, d);
769 void set_last_kdm_write_type (KDMWriteType t) {
770 maybe_set (_last_kdm_write_type, t);
773 void set_last_dkdm_write_type (DKDMWriteType t) {
774 maybe_set (_last_dkdm_write_type, t);
777 void unset_sound_output () {
778 if (!_sound_output) {
782 _sound_output = boost::none;
786 void set_kdm_container_name_format (dcp::NameFormat n) {
787 maybe_set (_kdm_container_name_format, n);
790 void set_kdm_filename_format (dcp::NameFormat n) {
791 maybe_set (_kdm_filename_format, n);
794 void set_dcp_metadata_filename_format (dcp::NameFormat n) {
795 maybe_set (_dcp_metadata_filename_format, n);
798 void set_dcp_asset_filename_format (dcp::NameFormat n) {
799 maybe_set (_dcp_asset_filename_format, n);
802 void set_frames_in_memory_multiplier (int m) {
803 maybe_set (_frames_in_memory_multiplier, m);
806 void set_decode_reduction (boost::optional<int> r) {
807 maybe_set (_decode_reduction, r);
810 void set_default_notify (bool n) {
811 maybe_set (_default_notify, n);
814 void clear_history () {
819 void clear_player_history () {
820 _player_history.clear ();
824 void add_to_history (boost::filesystem::path p);
825 void add_to_player_history (boost::filesystem::path p);
827 void set_jump_to_selected (bool j) {
828 maybe_set (_jump_to_selected, j);
831 void set_nagged (Nag nag, bool nagged) {
832 maybe_set (_nagged[nag], nagged);
835 void set_cover_sheet (std::string s) {
836 maybe_set (_cover_sheet, s);
839 void reset_cover_sheet ();
841 void set_notification (Notification n, bool v) {
842 maybe_set (_notification[n], v);
845 void set_barco_username (std::string u) {
846 maybe_set (_barco_username, u);
849 void unset_barco_username () {
850 maybe_set (_barco_username, boost::optional<std::string>());
853 void set_barco_password (std::string p) {
854 maybe_set (_barco_password, p);
857 void unset_barco_password () {
858 maybe_set (_barco_password, boost::optional<std::string>());
861 void set_christie_username (std::string u) {
862 maybe_set (_christie_username, u);
865 void unset_christie_username () {
866 maybe_set (_christie_username, boost::optional<std::string>());
869 void set_christie_password (std::string p) {
870 maybe_set (_christie_password, p);
873 void unset_christie_password () {
874 maybe_set (_christie_password, boost::optional<std::string>());
877 void set_gdc_username (std::string u) {
878 maybe_set (_gdc_username, u);
881 void unset_gdc_username () {
882 maybe_set (_gdc_username, boost::optional<std::string>());
885 void set_gdc_password (std::string p) {
886 maybe_set (_gdc_password, p);
889 void unset_gdc_password () {
890 maybe_set (_gdc_password, boost::optional<std::string>());
893 void set_interface_complexity (Interface i) {
894 maybe_set (_interface_complexity, i, INTERFACE_COMPLEXITY);
897 void set_player_mode (PlayerMode m) {
898 maybe_set (_player_mode, m);
901 void set_image_display (int n) {
902 maybe_set (_image_display, n);
905 void set_respect_kdm_validity_periods (bool r) {
906 maybe_set (_respect_kdm_validity_periods, r);
909 void set_player_log_file (boost::filesystem::path p) {
910 maybe_set (_player_log_file, p);
913 void unset_player_log_file () {
914 if (!_player_log_file) {
917 _player_log_file = boost::none;
921 void set_player_dcp_directory (boost::filesystem::path p) {
922 maybe_set (_player_dcp_directory, p, PLAYER_DCP_DIRECTORY);
925 void unset_player_dcp_directory () {
926 if (!_player_dcp_directory) {
929 _player_dcp_directory = boost::none;
930 changed (PLAYER_DCP_DIRECTORY);
933 void set_player_kdm_directory (boost::filesystem::path p) {
934 maybe_set (_player_kdm_directory, p);
937 void unset_player_kdm_directory () {
938 if (!_player_kdm_directory) {
941 _player_kdm_directory = boost::none;
945 #ifdef DCPOMATIC_VARIANT_SWAROOP
946 void set_player_background_image (boost::filesystem::path p) {
947 maybe_set (_player_background_image, p);
950 void unset_player_background_image () {
951 if (!_player_background_image) {
954 _player_background_image = boost::none;
959 void changed (Property p = OTHER);
960 boost::signals2::signal<void (Property)> Changed;
961 /** Emitted if read() failed on an existing Config file. There is nothing
962 a listener can do about it: this is just for information.
964 static boost::signals2::signal<void ()> FailedToLoad;
965 /** Emitted if read() issued a warning which the user might want to know about */
966 static boost::signals2::signal<void (std::string)> Warning;
967 /** Emitted if there is a bad certificate in the signer chain. Handler can call
968 * true to ask Config to re-create the chain.
970 static boost::signals2::signal<bool (void)> BadSignerChain;
973 void write_config () const;
974 void write_cinemas () const;
975 void link (boost::filesystem::path new_file) const;
976 void copy_and_link (boost::filesystem::path new_file) const;
978 void save_template (boost::shared_ptr<const Film> film, std::string name) const;
979 bool existing_template (std::string name) const;
980 std::list<std::string> templates () const;
981 boost::filesystem::path template_path (std::string name) const;
982 void rename_template (std::string old_name, std::string new_name) const;
983 void delete_template (std::string name) const;
985 static Config* instance ();
987 static void restore_defaults ();
988 static bool have_existing (std::string);
989 static boost::filesystem::path config_file ();
991 /** If set, this overrides the standard path (in home, Library, AppData or wherever) for config.xml and cinemas.xml */
992 static boost::optional<boost::filesystem::path> override_path;
996 static boost::filesystem::path path (std::string file, bool create_directories = true);
998 void set_defaults ();
999 void set_kdm_email_to_default ();
1000 void set_notification_email_to_default ();
1001 void set_cover_sheet_to_default ();
1002 void read_cinemas (cxml::Document const & f);
1003 boost::shared_ptr<dcp::CertificateChain> create_certificate_chain ();
1004 boost::filesystem::path directory_or (boost::optional<boost::filesystem::path> dir, boost::filesystem::path a) const;
1005 void add_to_history_internal (std::vector<boost::filesystem::path>& h, boost::filesystem::path p);
1009 void maybe_set (T& member, T new_value, Property prop = OTHER) {
1010 if (member == new_value) {
1018 void maybe_set (boost::optional<T>& member, T new_value, Property prop = OTHER) {
1019 if (member && member.get() == new_value) {
1026 /** number of threads which a master DoM should use for J2K encoding on the local machine */
1027 int _master_encoding_threads;
1028 /** number of threads which a server should use for J2K encoding on the local machine */
1029 int _server_encoding_threads;
1030 /** default directory to put new films in */
1031 boost::optional<boost::filesystem::path> _default_directory;
1032 /** base port number to use for J2K encoding servers;
1033 * this port and the two above it will be used.
1035 int _server_port_base;
1036 /** true to broadcast on the `any' address to look for servers */
1037 bool _use_any_servers;
1038 /** J2K encoding servers that should definitely be used */
1039 std::vector<std::string> _servers;
1040 bool _only_servers_encode;
1041 Protocol _tms_protocol;
1042 /** The IP address of a TMS that we can copy DCPs to */
1043 std::string _tms_ip;
1044 /** The path on a TMS that we should write DCPs to */
1045 std::string _tms_path;
1046 /** User name to log into the TMS with */
1047 std::string _tms_user;
1048 /** Password to log into the TMS with */
1049 std::string _tms_password;
1050 /** Our cinema sound processor */
1051 CinemaSoundProcessor const * _cinema_sound_processor;
1052 std::list<int> _allowed_dcp_frame_rates;
1053 /** Allow any video frame rate for the DCP; if true, overrides _allowed_dcp_frame_rates */
1054 bool _allow_any_dcp_frame_rate;
1055 /** Allow any container ratio, not just the standard ones. GDC SX-2001 will not play Flat
1056 DCPs at 25fps but will play 16:9, so this is very useful for some users.
1057 https://www.dcpomatic.com/forum/viewtopic.php?f=2&t=1119&p=4468
1059 bool _allow_any_container;
1060 /** Default ISDCF metadata for newly-created Films */
1061 ISDCFMetadata _default_isdcf_metadata;
1062 boost::optional<std::string> _language;
1063 /** Default length of still image content (seconds) */
1064 int _default_still_length;
1065 Ratio const * _default_container;
1066 Ratio const * _default_scale_to;
1067 DCPContentType const * _default_dcp_content_type;
1068 int _default_dcp_audio_channels;
1069 std::string _dcp_issuer;
1070 std::string _dcp_creator;
1071 int _default_j2k_bandwidth;
1072 int _default_audio_delay;
1073 bool _default_interop;
1074 /** Default directory to offer to write KDMs to; if it's not set,
1075 the home directory will be offered.
1077 boost::optional<boost::filesystem::path> _default_kdm_directory;
1078 bool _default_upload_after_make_dcp;
1079 std::list<boost::shared_ptr<Cinema> > _cinemas;
1080 std::string _mail_server;
1082 std::string _mail_user;
1083 std::string _mail_password;
1084 std::string _kdm_subject;
1085 std::string _kdm_from;
1086 std::vector<std::string> _kdm_cc;
1087 std::string _kdm_bcc;
1088 std::string _kdm_email;
1089 std::string _notification_subject;
1090 std::string _notification_from;
1091 std::string _notification_to;
1092 std::vector<std::string> _notification_cc;
1093 std::string _notification_bcc;
1094 std::string _notification_email;
1095 boost::shared_ptr<const dcp::CertificateChain> _signer_chain;
1096 /** Chain used to decrypt KDMs; the leaf of this chain is the target
1097 * certificate for making KDMs given to DCP-o-matic.
1099 boost::shared_ptr<const dcp::CertificateChain> _decryption_chain;
1100 /** true to check for updates on startup */
1101 bool _check_for_updates;
1102 bool _check_for_test_updates;
1103 /** maximum allowed J2K bandwidth in bits per second */
1104 int _maximum_j2k_bandwidth;
1106 bool _analyse_ebur128;
1107 bool _automatic_audio_analysis;
1108 #ifdef DCPOMATIC_WINDOWS
1109 bool _win32_console;
1111 std::vector<boost::filesystem::path> _history;
1112 std::vector<boost::filesystem::path> _player_history;
1113 boost::shared_ptr<DKDMGroup> _dkdms;
1114 boost::filesystem::path _cinemas_file;
1115 bool _show_hints_before_make_dcp;
1116 bool _confirm_kdm_email;
1117 dcp::NameFormat _kdm_filename_format;
1118 dcp::NameFormat _kdm_container_name_format;
1119 dcp::NameFormat _dcp_metadata_filename_format;
1120 dcp::NameFormat _dcp_asset_filename_format;
1121 bool _jump_to_selected;
1122 bool _nagged[NAG_COUNT];
1124 /** name of a specific sound output stream to use, or empty to use the default */
1125 boost::optional<std::string> _sound_output;
1126 std::string _cover_sheet;
1127 boost::optional<boost::filesystem::path> _last_player_load_directory;
1128 boost::optional<KDMWriteType> _last_kdm_write_type;
1129 boost::optional<DKDMWriteType> _last_dkdm_write_type;
1130 int _frames_in_memory_multiplier;
1131 boost::optional<int> _decode_reduction;
1132 bool _default_notify;
1133 bool _notification[NOTIFICATION_COUNT];
1134 boost::optional<std::string> _barco_username;
1135 boost::optional<std::string> _barco_password;
1136 boost::optional<std::string> _christie_username;
1137 boost::optional<std::string> _christie_password;
1138 boost::optional<std::string> _gdc_username;
1139 boost::optional<std::string> _gdc_password;
1140 Interface _interface_complexity;
1141 PlayerMode _player_mode;
1143 bool _respect_kdm_validity_periods;
1144 boost::optional<boost::filesystem::path> _player_log_file;
1145 /** A directory containing DCPs whose contents are presented to the user
1146 in the dual-screen player mode. DCPs on the list can be loaded
1149 boost::optional<boost::filesystem::path> _player_dcp_directory;
1150 boost::optional<boost::filesystem::path> _player_kdm_directory;
1151 #ifdef DCPOMATIC_VARIANT_SWAROOP
1152 boost::optional<boost::filesystem::path> _player_background_image;
1155 static int const _current_version;
1157 /** Singleton instance, or 0 */
1158 static Config* _instance;