X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fconfig.h;h=91d779b7ad7b0bcca7b6c06c25542c9fcec408d0;hb=48eb118a26bbd98a7ac2d555c4add923b0f2311d;hp=9e84a120b822755bf667e32b024ba16374bc9537;hpb=0d7d4fb3472a30f7706baab0703114ec32d5a2af;p=dcpomatic.git diff --git a/src/lib/config.h b/src/lib/config.h index 9e84a120b..91d779b7a 100644 --- a/src/lib/config.h +++ b/src/lib/config.h @@ -31,7 +31,6 @@ #include "export_config.h" #include "rough_duration.h" #include "state.h" -#include "types.h" #include #include #include @@ -94,6 +93,7 @@ public: SHOW_EXPERIMENTAL_AUDIO_PROCESSORS, AUDIO_MAPPING, AUTO_CROP_THRESHOLD, + ALLOW_SMPTE_BV20, OTHER }; @@ -194,10 +194,6 @@ public: return _default_still_length; } - Ratio const * default_container () const { - return _default_container; - } - DCPContentType const * default_dcp_content_type () const { return _default_dcp_content_type; } @@ -242,6 +238,14 @@ public: return _default_interop; } + boost::optional default_audio_language() const { + return _default_audio_language; + } + + boost::optional default_territory() const { + return _default_territory; + } + std::map default_metadata () const { return _default_metadata; } @@ -562,9 +566,7 @@ public: return _custom_languages; } - boost::optional add_files_path () const { - return _add_files_path; - } + boost::optional initial_path(std::string id) const; bool use_isdcf_name_by_default () const { return _use_isdcf_name_by_default; @@ -602,6 +604,19 @@ public: return _main_content_divider_sash_position; } + enum class DefaultAddFileLocation { + SAME_AS_LAST_TIME, + SAME_AS_PROJECT + }; + + DefaultAddFileLocation default_add_file_location() const { + return _default_add_file_location; + } + + bool allow_smpte_bv20() const { + return _allow_smpte_bv20; + } + /* SET (mostly) */ void set_master_encoding_threads (int n) { @@ -722,10 +737,6 @@ public: maybe_set (_default_still_length, s); } - void set_default_container (Ratio const * c) { - maybe_set (_default_container, c); - } - void set_default_dcp_content_type (DCPContentType const * t) { maybe_set (_default_dcp_content_type, t); } @@ -770,6 +781,22 @@ public: maybe_set (_default_interop, i); } + void set_default_audio_language(dcp::LanguageTag tag) { + maybe_set(_default_audio_language, tag); + } + + void unset_default_audio_language() { + maybe_set(_default_audio_language, boost::optional()); + } + + void set_default_territory(dcp::LanguageTag::RegionSubtag tag) { + maybe_set(_default_territory, tag); + } + + void unset_default_territory() { + maybe_set(_default_territory, boost::optional()); + } + void set_default_metadata (std::map const& metadata) { maybe_set (_default_metadata, metadata); } @@ -1113,10 +1140,7 @@ public: void add_custom_language (dcp::LanguageTag tag); - void set_add_files_path (boost::filesystem::path p) { - _add_files_path = p; - changed (); - } + void set_initial_path(std::string id, boost::filesystem::path path); void set_use_isdcf_name_by_default (bool use) { maybe_set (_use_isdcf_name_by_default, use); @@ -1162,6 +1186,14 @@ public: maybe_set(_main_content_divider_sash_position, position); } + void set_default_add_file_location(DefaultAddFileLocation location) { + maybe_set(_default_add_file_location, location); + } + + void set_allow_smpte_bv20(bool allow) { + maybe_set(_allow_smpte_bv20, allow, ALLOW_SMPTE_BV20); + } + void changed (Property p = OTHER); boost::signals2::signal Changed; /** Emitted if read() failed on an existing Config file. There is nothing @@ -1289,7 +1321,6 @@ private: boost::optional _language; /** Default length of still image content (seconds) */ int _default_still_length; - Ratio const * _default_container; DCPContentType const * _default_dcp_content_type; int _default_dcp_audio_channels; std::string _dcp_issuer; @@ -1301,6 +1332,8 @@ private: int _default_j2k_bandwidth; int _default_audio_delay; bool _default_interop; + boost::optional _default_audio_language; + boost::optional _default_territory; std::map _default_metadata; /** Default directory to offer to write KDMs to; if it's not set, the home directory will be offered. @@ -1387,7 +1420,7 @@ private: boost::optional _player_kdm_directory; boost::optional _audio_mapping; std::vector _custom_languages; - boost::optional _add_files_path; + std::map> _initial_paths; bool _use_isdcf_name_by_default; bool _write_kdms_to_disk; bool _email_kdms; @@ -1397,6 +1430,8 @@ private: boost::optional _last_release_notes_version; boost::optional _main_divider_sash_position; boost::optional _main_content_divider_sash_position; + DefaultAddFileLocation _default_add_file_location; + bool _allow_smpte_bv20; ExportConfig _export;