2018-07-20 Carl Hetherington <cth@carlh.net>
+ * Advanced configuration option to allow any container ratio.
+
* Support closed-caption creation (#725).
2018-07-19 Carl Hetherington <cth@carlh.net>
_tms_password = "";
_cinema_sound_processor = CinemaSoundProcessor::from_id (N_("dolby_cp750"));
_allow_any_dcp_frame_rate = false;
+ _allow_any_container = false;
_language = optional<string> ();
_default_still_length = 10;
_default_container = Ratio::from_id ("185");
_maximum_j2k_bandwidth = f.optional_number_child<int> ("MaximumJ2KBandwidth").get_value_or (250000000);
_allow_any_dcp_frame_rate = f.optional_bool_child ("AllowAnyDCPFrameRate").get_value_or (false);
+ _allow_any_container = f.optional_bool_child ("AllowAnyContainer").get_value_or (false);
_log_types = f.optional_number_child<int> ("LogTypes").get_value_or (LogEntry::TYPE_GENERAL | LogEntry::TYPE_WARNING | LogEntry::TYPE_ERROR);
_analyse_ebur128 = f.optional_bool_child("AnalyseEBUR128").get_value_or (true);
root->add_child("MaximumJ2KBandwidth")->add_child_text (raw_convert<string> (_maximum_j2k_bandwidth));
/* [XML] AllowAnyDCPFrameRate 1 to allow users to specify any frame rate when creating DCPs, 0 to limit the GUI to standard rates */
root->add_child("AllowAnyDCPFrameRate")->add_child_text (_allow_any_dcp_frame_rate ? "1" : "0");
+ /* [XML] AllowAnyContainer 1 to allow users to user any container ratio for their DCP, 0 to limit the GUI to standard containers */
+ root->add_child("AllowAnyContainer")->add_child_text (_allow_any_container ? "1" : "0");
/* [XML] LogTypes Types of logging to write; a bitfield where 1 is general notes, 2 warnings, 4 errors, 8 debug information related
to encoding, 16 debug information related to encoding, 32 debug information for timing purposes, 64 debug information related
to sending email.
return _allow_any_dcp_frame_rate;
}
+ bool allow_any_container () const {
+ return _allow_any_container;
+ }
+
ISDCFMetadata default_isdcf_metadata () const {
return _default_isdcf_metadata;
}
maybe_set (_allow_any_dcp_frame_rate, a);
}
+ void set_allow_any_container (bool a) {
+ maybe_set (_allow_any_container, a);
+ }
+
void set_default_isdcf_metadata (ISDCFMetadata d) {
maybe_set (_default_isdcf_metadata, d);
}
std::list<int> _allowed_dcp_frame_rates;
/** Allow any video frame rate for the DCP; if true, overrides _allowed_dcp_frame_rates */
bool _allow_any_dcp_frame_rate;
+ /** Allow any container ratio, not just the standard ones. GDC SX-2001 will not play Flat
+ DCPs at 25fps but will play 16:9, so this is very useful for some users.
+ https://www.dcpomatic.com/forum/viewtopic.php?f=2&t=1119&p=4468
+ */
+ bool _allow_any_container;
/** Default ISDCF metadata for newly-created Films */
ISDCFMetadata _default_isdcf_metadata;
boost::optional<std::string> _language;
/*
- Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2018 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
#include "ratio.h"
#include "util.h"
+#include "config.h"
#include <dcp/types.h>
#include <cfloat>
vector<Ratio const *>
Ratio::containers ()
{
+ if (Config::instance()->allow_any_container()) {
+ return _ratios;
+ }
+
vector<Ratio const *> r;
r.push_back (Ratio::from_id ("185"));
r.push_back (Ratio::from_id ("239"));
string
Ratio::container_nickname () const
{
- DCPOMATIC_ASSERT (_container_nickname);
+ if (!_container_nickname) {
+ /* Fall back to the image nickname; this just for when non-standard container
+ ratios are enabled.
+ */
+ return _image_nickname;
+ }
+
return *_container_nickname;
}
: StockPage (Kind_Advanced, panel_size, border)
, _maximum_j2k_bandwidth (0)
, _allow_any_dcp_frame_rate (0)
+ , _allow_any_container (0)
, _only_servers_encode (0)
, _log_general (0)
, _log_warning (0)
table->Add (_allow_any_dcp_frame_rate, 1, wxEXPAND | wxALL);
table->AddSpacer (0);
+ _allow_any_container = new wxCheckBox (_panel, wxID_ANY, _("Allow non-standard container ratios"));
+ table->Add (_allow_any_container, 1, wxEXPAND | wxALL);
+ table->AddSpacer (0);
+
+ wxStaticText* restart = add_label_to_sizer (table, _panel, _("(restart DCP-o-matic to see all ratios)"), false);
+ wxFont font = restart->GetFont();
+ font.SetStyle (wxFONTSTYLE_ITALIC);
+ font.SetPointSize (font.GetPointSize() - 1);
+ restart->SetFont (font);
+ table->AddSpacer (0);
+
_only_servers_encode = new wxCheckBox (_panel, wxID_ANY, _("Only servers encode"));
table->Add (_only_servers_encode, 1, wxEXPAND | wxALL);
table->AddSpacer (0);
_maximum_j2k_bandwidth->SetRange (1, 1000);
_maximum_j2k_bandwidth->Bind (wxEVT_SPINCTRL, boost::bind (&AdvancedPage::maximum_j2k_bandwidth_changed, this));
_allow_any_dcp_frame_rate->Bind (wxEVT_CHECKBOX, boost::bind (&AdvancedPage::allow_any_dcp_frame_rate_changed, this));
+ _allow_any_container->Bind (wxEVT_CHECKBOX, boost::bind (&AdvancedPage::allow_any_container_changed, this));
_only_servers_encode->Bind (wxEVT_CHECKBOX, boost::bind (&AdvancedPage::only_servers_encode_changed, this));
_frames_in_memory_multiplier->Bind (wxEVT_SPINCTRL, boost::bind(&AdvancedPage::frames_in_memory_multiplier_changed, this));
_dcp_metadata_filename_format->Changed.connect (boost::bind (&AdvancedPage::dcp_metadata_filename_format_changed, this));
checked_set (_maximum_j2k_bandwidth, config->maximum_j2k_bandwidth() / 1000000);
checked_set (_allow_any_dcp_frame_rate, config->allow_any_dcp_frame_rate ());
+ checked_set (_allow_any_container, config->allow_any_container ());
checked_set (_only_servers_encode, config->only_servers_encode ());
checked_set (_log_general, config->log_types() & LogEntry::TYPE_GENERAL);
checked_set (_log_warning, config->log_types() & LogEntry::TYPE_WARNING);
Config::instance()->set_allow_any_dcp_frame_rate (_allow_any_dcp_frame_rate->GetValue ());
}
+ void allow_any_container_changed ()
+ {
+ Config::instance()->set_allow_any_container (_allow_any_container->GetValue ());
+ }
+
void only_servers_encode_changed ()
{
Config::instance()->set_only_servers_encode (_only_servers_encode->GetValue ());
wxSpinCtrl* _maximum_j2k_bandwidth;
wxSpinCtrl* _frames_in_memory_multiplier;
wxCheckBox* _allow_any_dcp_frame_rate;
+ wxCheckBox* _allow_any_container;
wxCheckBox* _only_servers_encode;
NameFormatEditor* _dcp_metadata_filename_format;
NameFormatEditor* _dcp_asset_filename_format;