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;
495 void set_master_encoding_threads (int n) {
496 maybe_set (_master_encoding_threads, n);
499 void set_server_encoding_threads (int n) {
500 maybe_set (_server_encoding_threads, n);
503 void set_default_directory (boost::filesystem::path d) {
504 if (_default_directory && *_default_directory == d) {
507 _default_directory = d;
511 /** @param p New server port */
512 void set_server_port_base (int p) {
513 maybe_set (_server_port_base, p);
516 void set_only_servers_encode (bool o) {
517 maybe_set (_only_servers_encode, o);
520 void set_tms_protocol (Protocol p) {
521 maybe_set (_tms_protocol, p);
524 /** @param i IP address of a TMS that we can copy DCPs to */
525 void set_tms_ip (std::string i) {
526 maybe_set (_tms_ip, i);
529 /** @param p Path on a TMS that we should changed DCPs to */
530 void set_tms_path (std::string p) {
531 maybe_set (_tms_path, p);
534 /** @param u User name to log into the TMS with */
535 void set_tms_user (std::string u) {
536 maybe_set (_tms_user, u);
539 /** @param p Password to log into the TMS with */
540 void set_tms_password (std::string p) {
541 maybe_set (_tms_password, p);
544 void add_cinema (boost::shared_ptr<Cinema> c) {
545 _cinemas.push_back (c);
549 void remove_cinema (boost::shared_ptr<Cinema> c) {
554 void set_allowed_dcp_frame_rates (std::list<int> const & r) {
555 maybe_set (_allowed_dcp_frame_rates, r);
558 void set_allow_any_dcp_frame_rate (bool a) {
559 maybe_set (_allow_any_dcp_frame_rate, a);
562 void set_allow_any_container (bool a) {
563 maybe_set (_allow_any_container, a);
566 void set_default_isdcf_metadata (ISDCFMetadata d) {
567 maybe_set (_default_isdcf_metadata, d);
570 void set_language (std::string l) {
571 if (_language && _language.get() == l) {
578 void unset_language () {
583 _language = boost::none;
587 void set_default_still_length (int s) {
588 maybe_set (_default_still_length, s);
591 void set_default_container (Ratio const * c) {
592 maybe_set (_default_container, c);
595 void set_default_scale_to (Ratio const * c) {
596 maybe_set (_default_scale_to, c);
599 void set_default_dcp_content_type (DCPContentType const * t) {
600 maybe_set (_default_dcp_content_type, t);
603 void set_default_dcp_audio_channels (int c) {
604 maybe_set (_default_dcp_audio_channels, c);
607 void set_dcp_issuer (std::string i) {
608 maybe_set (_dcp_issuer, i);
611 void set_dcp_creator (std::string c) {
612 maybe_set (_dcp_creator, c);
615 void set_default_j2k_bandwidth (int b) {
616 maybe_set (_default_j2k_bandwidth, b);
619 void set_default_audio_delay (int d) {
620 maybe_set (_default_audio_delay, d);
623 void set_default_interop (bool i) {
624 maybe_set (_default_interop, i);
627 void set_default_upload_after_make_dcp (bool u) {
628 maybe_set (_default_upload_after_make_dcp, u);
631 void set_mail_server (std::string s) {
632 maybe_set (_mail_server, s);
635 void set_mail_port (int p) {
636 maybe_set (_mail_port, p);
639 void set_mail_user (std::string u) {
640 maybe_set (_mail_user, u);
643 void set_mail_password (std::string p) {
644 maybe_set (_mail_password, p);
647 void set_kdm_subject (std::string s) {
648 maybe_set (_kdm_subject, s);
651 void set_kdm_from (std::string f) {
652 maybe_set (_kdm_from, f);
655 void set_kdm_cc (std::vector<std::string> f) {
656 maybe_set (_kdm_cc, f);
659 void set_kdm_bcc (std::string f) {
660 maybe_set (_kdm_bcc, f);
663 void set_kdm_email (std::string e) {
664 maybe_set (_kdm_email, e);
667 void reset_kdm_email ();
669 void set_notification_subject (std::string s) {
670 maybe_set (_notification_subject, s);
673 void set_notification_from (std::string f) {
674 maybe_set (_notification_from, f);
677 void set_notification_to (std::string t) {
678 maybe_set (_notification_to, t);
681 void set_notification_cc (std::vector<std::string> f) {
682 maybe_set (_notification_cc, f);
685 void set_notification_bcc (std::string f) {
686 maybe_set (_notification_bcc, f);
689 void set_notification_email (std::string e) {
690 maybe_set (_notification_email, e);
693 void reset_notification_email ();
695 void set_signer_chain (boost::shared_ptr<const dcp::CertificateChain> s) {
696 maybe_set (_signer_chain, s);
699 void set_decryption_chain (boost::shared_ptr<const dcp::CertificateChain> c) {
700 maybe_set (_decryption_chain, c);
703 void set_check_for_updates (bool c) {
704 maybe_set (_check_for_updates, c);
706 set_check_for_test_updates (false);
710 void set_check_for_test_updates (bool c) {
711 maybe_set (_check_for_test_updates, c);
714 void set_maximum_j2k_bandwidth (int b) {
715 maybe_set (_maximum_j2k_bandwidth, b);
718 void set_log_types (int t) {
719 maybe_set (_log_types, t);
722 void set_analyse_ebur128 (bool a) {
723 maybe_set (_analyse_ebur128, a);
726 void set_automatic_audio_analysis (bool a) {
727 maybe_set (_automatic_audio_analysis, a);
730 #ifdef DCPOMATIC_WINDOWS
731 void set_win32_console (bool c) {
732 maybe_set (_win32_console, c);
736 void set_dkdms (boost::shared_ptr<DKDMGroup> dkdms) {
741 void set_cinemas_file (boost::filesystem::path file);
743 void set_show_hints_before_make_dcp (bool s) {
744 maybe_set (_show_hints_before_make_dcp, s);
747 void set_confirm_kdm_email (bool s) {
748 maybe_set (_confirm_kdm_email, s);
751 void set_sound (bool s) {
752 maybe_set (_sound, s, SOUND);
755 void set_sound_output (std::string o) {
756 maybe_set (_sound_output, o, SOUND_OUTPUT);
759 void set_last_player_load_directory (boost::filesystem::path d) {
760 maybe_set (_last_player_load_directory, d);
763 void set_last_kdm_write_type (KDMWriteType t) {
764 maybe_set (_last_kdm_write_type, t);
767 void set_last_dkdm_write_type (DKDMWriteType t) {
768 maybe_set (_last_dkdm_write_type, t);
771 void unset_sound_output () {
772 if (!_sound_output) {
776 _sound_output = boost::none;
780 void set_kdm_container_name_format (dcp::NameFormat n) {
781 maybe_set (_kdm_container_name_format, n);
784 void set_kdm_filename_format (dcp::NameFormat n) {
785 maybe_set (_kdm_filename_format, n);
788 void set_dcp_metadata_filename_format (dcp::NameFormat n) {
789 maybe_set (_dcp_metadata_filename_format, n);
792 void set_dcp_asset_filename_format (dcp::NameFormat n) {
793 maybe_set (_dcp_asset_filename_format, n);
796 void set_frames_in_memory_multiplier (int m) {
797 maybe_set (_frames_in_memory_multiplier, m);
800 void set_decode_reduction (boost::optional<int> r) {
801 maybe_set (_decode_reduction, r);
804 void set_default_notify (bool n) {
805 maybe_set (_default_notify, n);
808 void clear_history () {
813 void clear_player_history () {
814 _player_history.clear ();
818 void add_to_history (boost::filesystem::path p);
819 void add_to_player_history (boost::filesystem::path p);
821 void set_jump_to_selected (bool j) {
822 maybe_set (_jump_to_selected, j);
825 void set_nagged (Nag nag, bool nagged) {
826 maybe_set (_nagged[nag], nagged);
829 void set_cover_sheet (std::string s) {
830 maybe_set (_cover_sheet, s);
833 void reset_cover_sheet ();
835 void set_notification (Notification n, bool v) {
836 maybe_set (_notification[n], v);
839 void set_barco_username (std::string u) {
840 maybe_set (_barco_username, u);
843 void unset_barco_username () {
844 maybe_set (_barco_username, boost::optional<std::string>());
847 void set_barco_password (std::string p) {
848 maybe_set (_barco_password, p);
851 void unset_barco_password () {
852 maybe_set (_barco_password, boost::optional<std::string>());
855 void set_christie_username (std::string u) {
856 maybe_set (_christie_username, u);
859 void unset_christie_username () {
860 maybe_set (_christie_username, boost::optional<std::string>());
863 void set_christie_password (std::string p) {
864 maybe_set (_christie_password, p);
867 void unset_christie_password () {
868 maybe_set (_christie_password, boost::optional<std::string>());
871 void set_gdc_username (std::string u) {
872 maybe_set (_gdc_username, u);
875 void unset_gdc_username () {
876 maybe_set (_gdc_username, boost::optional<std::string>());
879 void set_gdc_password (std::string p) {
880 maybe_set (_gdc_password, p);
883 void unset_gdc_password () {
884 maybe_set (_gdc_password, boost::optional<std::string>());
887 void set_interface_complexity (Interface i) {
888 maybe_set (_interface_complexity, i, INTERFACE_COMPLEXITY);
891 void set_player_mode (PlayerMode m) {
892 maybe_set (_player_mode, m);
895 void set_image_display (int n) {
896 maybe_set (_image_display, n);
899 void set_respect_kdm_validity_periods (bool r) {
900 maybe_set (_respect_kdm_validity_periods, r);
903 void set_player_log_file (boost::filesystem::path p) {
904 maybe_set (_player_log_file, p);
907 void unset_player_log_file () {
908 if (!_player_log_file) {
911 _player_log_file = boost::none;
915 void set_player_dcp_directory (boost::filesystem::path p) {
916 maybe_set (_player_dcp_directory, p, PLAYER_DCP_DIRECTORY);
919 void unset_player_dcp_directory () {
920 if (!_player_dcp_directory) {
923 _player_dcp_directory = boost::none;
924 changed (PLAYER_DCP_DIRECTORY);
927 void set_player_kdm_directory (boost::filesystem::path p) {
928 maybe_set (_player_kdm_directory, p);
931 void unset_player_kdm_directory () {
932 if (!_player_kdm_directory) {
935 _player_kdm_directory = boost::none;
939 void changed (Property p = OTHER);
940 boost::signals2::signal<void (Property)> Changed;
941 /** Emitted if read() failed on an existing Config file. There is nothing
942 a listener can do about it: this is just for information.
944 static boost::signals2::signal<void ()> FailedToLoad;
945 /** Emitted if read() issued a warning which the user might want to know about */
946 static boost::signals2::signal<void (std::string)> Warning;
947 /** Emitted if there is a bad certificate in the signer chain. Handler can call
948 * true to ask Config to re-create the chain.
950 static boost::signals2::signal<bool (void)> BadSignerChain;
953 void write_config () const;
954 void write_cinemas () const;
955 void link (boost::filesystem::path new_file) const;
956 void copy_and_link (boost::filesystem::path new_file) const;
958 void save_template (boost::shared_ptr<const Film> film, std::string name) const;
959 bool existing_template (std::string name) const;
960 std::list<std::string> templates () const;
961 boost::filesystem::path template_path (std::string name) const;
962 void rename_template (std::string old_name, std::string new_name) const;
963 void delete_template (std::string name) const;
965 static Config* instance ();
967 static void restore_defaults ();
968 static bool have_existing (std::string);
969 static boost::filesystem::path config_file ();
971 /** If set, this overrides the standard path (in home, Library, AppData or wherever) for config.xml and cinemas.xml */
972 static boost::optional<boost::filesystem::path> override_path;
976 static boost::filesystem::path path (std::string file, bool create_directories = true);
978 void set_defaults ();
979 void set_kdm_email_to_default ();
980 void set_notification_email_to_default ();
981 void set_cover_sheet_to_default ();
982 void read_cinemas (cxml::Document const & f);
983 boost::shared_ptr<dcp::CertificateChain> create_certificate_chain ();
984 boost::filesystem::path directory_or (boost::optional<boost::filesystem::path> dir, boost::filesystem::path a) const;
985 void add_to_history_internal (std::vector<boost::filesystem::path>& h, boost::filesystem::path p);
989 void maybe_set (T& member, T new_value, Property prop = OTHER) {
990 if (member == new_value) {
998 void maybe_set (boost::optional<T>& member, T new_value, Property prop = OTHER) {
999 if (member && member.get() == new_value) {
1006 /** number of threads which a master DoM should use for J2K encoding on the local machine */
1007 int _master_encoding_threads;
1008 /** number of threads which a server should use for J2K encoding on the local machine */
1009 int _server_encoding_threads;
1010 /** default directory to put new films in */
1011 boost::optional<boost::filesystem::path> _default_directory;
1012 /** base port number to use for J2K encoding servers;
1013 * this port and the two above it will be used.
1015 int _server_port_base;
1016 /** true to broadcast on the `any' address to look for servers */
1017 bool _use_any_servers;
1018 /** J2K encoding servers that should definitely be used */
1019 std::vector<std::string> _servers;
1020 bool _only_servers_encode;
1021 Protocol _tms_protocol;
1022 /** The IP address of a TMS that we can copy DCPs to */
1023 std::string _tms_ip;
1024 /** The path on a TMS that we should write DCPs to */
1025 std::string _tms_path;
1026 /** User name to log into the TMS with */
1027 std::string _tms_user;
1028 /** Password to log into the TMS with */
1029 std::string _tms_password;
1030 /** Our cinema sound processor */
1031 CinemaSoundProcessor const * _cinema_sound_processor;
1032 std::list<int> _allowed_dcp_frame_rates;
1033 /** Allow any video frame rate for the DCP; if true, overrides _allowed_dcp_frame_rates */
1034 bool _allow_any_dcp_frame_rate;
1035 /** Allow any container ratio, not just the standard ones. GDC SX-2001 will not play Flat
1036 DCPs at 25fps but will play 16:9, so this is very useful for some users.
1037 https://www.dcpomatic.com/forum/viewtopic.php?f=2&t=1119&p=4468
1039 bool _allow_any_container;
1040 /** Default ISDCF metadata for newly-created Films */
1041 ISDCFMetadata _default_isdcf_metadata;
1042 boost::optional<std::string> _language;
1043 /** Default length of still image content (seconds) */
1044 int _default_still_length;
1045 Ratio const * _default_container;
1046 Ratio const * _default_scale_to;
1047 DCPContentType const * _default_dcp_content_type;
1048 int _default_dcp_audio_channels;
1049 std::string _dcp_issuer;
1050 std::string _dcp_creator;
1051 int _default_j2k_bandwidth;
1052 int _default_audio_delay;
1053 bool _default_interop;
1054 /** Default directory to offer to write KDMs to; if it's not set,
1055 the home directory will be offered.
1057 boost::optional<boost::filesystem::path> _default_kdm_directory;
1058 bool _default_upload_after_make_dcp;
1059 std::list<boost::shared_ptr<Cinema> > _cinemas;
1060 std::string _mail_server;
1062 std::string _mail_user;
1063 std::string _mail_password;
1064 std::string _kdm_subject;
1065 std::string _kdm_from;
1066 std::vector<std::string> _kdm_cc;
1067 std::string _kdm_bcc;
1068 std::string _kdm_email;
1069 std::string _notification_subject;
1070 std::string _notification_from;
1071 std::string _notification_to;
1072 std::vector<std::string> _notification_cc;
1073 std::string _notification_bcc;
1074 std::string _notification_email;
1075 boost::shared_ptr<const dcp::CertificateChain> _signer_chain;
1076 /** Chain used to decrypt KDMs; the leaf of this chain is the target
1077 * certificate for making KDMs given to DCP-o-matic.
1079 boost::shared_ptr<const dcp::CertificateChain> _decryption_chain;
1080 /** true to check for updates on startup */
1081 bool _check_for_updates;
1082 bool _check_for_test_updates;
1083 /** maximum allowed J2K bandwidth in bits per second */
1084 int _maximum_j2k_bandwidth;
1086 bool _analyse_ebur128;
1087 bool _automatic_audio_analysis;
1088 #ifdef DCPOMATIC_WINDOWS
1089 bool _win32_console;
1091 std::vector<boost::filesystem::path> _history;
1092 std::vector<boost::filesystem::path> _player_history;
1093 boost::shared_ptr<DKDMGroup> _dkdms;
1094 boost::filesystem::path _cinemas_file;
1095 bool _show_hints_before_make_dcp;
1096 bool _confirm_kdm_email;
1097 dcp::NameFormat _kdm_filename_format;
1098 dcp::NameFormat _kdm_container_name_format;
1099 dcp::NameFormat _dcp_metadata_filename_format;
1100 dcp::NameFormat _dcp_asset_filename_format;
1101 bool _jump_to_selected;
1102 bool _nagged[NAG_COUNT];
1104 /** name of a specific sound output stream to use, or empty to use the default */
1105 boost::optional<std::string> _sound_output;
1106 std::string _cover_sheet;
1107 boost::optional<boost::filesystem::path> _last_player_load_directory;
1108 boost::optional<KDMWriteType> _last_kdm_write_type;
1109 boost::optional<DKDMWriteType> _last_dkdm_write_type;
1110 int _frames_in_memory_multiplier;
1111 boost::optional<int> _decode_reduction;
1112 bool _default_notify;
1113 bool _notification[NOTIFICATION_COUNT];
1114 boost::optional<std::string> _barco_username;
1115 boost::optional<std::string> _barco_password;
1116 boost::optional<std::string> _christie_username;
1117 boost::optional<std::string> _christie_password;
1118 boost::optional<std::string> _gdc_username;
1119 boost::optional<std::string> _gdc_password;
1120 Interface _interface_complexity;
1121 PlayerMode _player_mode;
1123 bool _respect_kdm_validity_periods;
1124 boost::optional<boost::filesystem::path> _player_log_file;
1125 /** A directory containing DCPs whose contents are presented to the user
1126 in the dual-screen player mode. DCPs on the list can be loaded
1129 boost::optional<boost::filesystem::path> _player_dcp_directory;
1130 boost::optional<boost::filesystem::path> _player_kdm_directory;
1132 static int const _current_version;
1134 /** Singleton instance, or 0 */
1135 static Config* _instance;