Film::Film (optional<boost::filesystem::path> dir)
: _playlist (new Playlist)
, _use_isdcf_name (Config::instance()->use_isdcf_name_by_default())
- , _dcp_content_type (Config::instance()->default_dcp_content_type ())
+ , _dcp_content_type(DCPContentType::from_isdcf_name("FTR"))
, _container(Ratio::from_id("185"))
, _resolution (Resolution::TWO_K)
, _encrypted (false)
, _context_id (dcp::make_uuid ())
- , _j2k_bandwidth (Config::instance()->default_j2k_bandwidth ())
+ , _j2k_bandwidth(150000000)
, _video_frame_rate (24)
- , _audio_channels (Config::instance()->default_dcp_audio_channels ())
+ , _audio_channels(8)
, _three_d (false)
, _sequence (true)
- , _interop (Config::instance()->default_interop ())
+ , _interop(false)
, _limit_to_smpte_bv20(false)
, _audio_processor (0)
, _reel_type (ReelType::SINGLE)
void
Film::use_template (string name)
{
- _template_film->read_metadata (Config::instance()->template_read_path(name));
_template_film = std::make_shared<Film>(optional<boost::filesystem::path>());
+ auto const path = Config::instance()->template_read_path(name);
+ if (!path) {
+ /* Probably the default template, and the user hasn't saved one yet */
+ return;
+ }
+
+ _template_film->read_metadata(path);
_use_isdcf_name = _template_film->_use_isdcf_name;
_dcp_content_type = _template_film->_dcp_content_type;
_container = _template_film->_container;