class Config : public boost::noncopyable
{
public:
- /** @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 which a master DoM should use for J2K encoding on the local machine */
+ int master_encoding_threads () const {
+ return _master_encoding_threads;
+ }
+
+ /** @return number of threads which a server should use for J2K encoding on the local machine */
+ int server_encoding_threads () const {
+ return _server_encoding_threads;
}
boost::optional<boost::filesystem::path> default_directory () const {
return _jump_to_selected;
}
+ enum Nag {
+ NAG_DKDM_CONFIG,
+ NAG_ENCRYPTED_METADATA,
+ NAG_COUNT
+ };
+
+ bool nagged (Nag nag) const {
+ return _nagged[nag];
+ }
+
bool preview_sound () const {
return _preview_sound;
}
+ std::string cover_sheet () const {
+ return _cover_sheet;
+ }
+
boost::optional<std::string> preview_sound_output () const {
return _preview_sound_output;
}
- /** @param n New number of local encoding threads */
- void set_num_local_encoding_threads (int n) {
- maybe_set (_num_local_encoding_threads, n);
+ void set_master_encoding_threads (int n) {
+ maybe_set (_master_encoding_threads, n);
+ }
+
+ void set_server_encoding_threads (int n) {
+ maybe_set (_server_encoding_threads, n);
}
void set_default_directory (boost::filesystem::path d) {
maybe_set (_jump_to_selected, j);
}
+ void set_nagged (Nag nag, bool nagged) {
+ maybe_set (_nagged[nag], nagged);
+ }
+
+ void set_cover_sheet (std::string s) {
+ maybe_set (_cover_sheet, s);
+ }
+
+ void reset_cover_sheet ();
+
void changed (Property p = OTHER);
boost::signals2::signal<void (Property)> Changed;
/** Emitted if read() failed on an existing Config file. There is nothing
static void drop ();
static void restore_defaults ();
static bool have_existing (std::string);
+ static boost::filesystem::path config_path ();
private:
Config ();
void read ();
void set_defaults ();
void set_kdm_email_to_default ();
+ void set_cover_sheet_to_default ();
void read_cinemas (cxml::Document const & f);
boost::shared_ptr<dcp::CertificateChain> create_certificate_chain ();
boost::filesystem::path directory_or (boost::optional<boost::filesystem::path> dir, boost::filesystem::path a) const;
changed (prop);
}
- /** number of threads to use for J2K encoding on the local machine */
- int _num_local_encoding_threads;
+ /** number of threads which a master DoM should use for J2K encoding on the local machine */
+ int _master_encoding_threads;
+ /** number of threads which a server should use for J2K encoding on the local machine */
+ int _server_encoding_threads;
/** default directory to put new films in */
boost::optional<boost::filesystem::path> _default_directory;
/** base port number to use for J2K encoding servers;
dcp::NameFormat _dcp_metadata_filename_format;
dcp::NameFormat _dcp_asset_filename_format;
bool _jump_to_selected;
+ bool _nagged[NAG_COUNT];
bool _preview_sound;
/** name of a specific sound output stream to use for preview, or empty to use the default */
boost::optional<std::string> _preview_sound_output;
+ std::string _cover_sheet;
/** Singleton instance, or 0 */
static Config* _instance;