, _sound_processor (SoundProcessor::from_id (N_("dolby_cp750")))
, _allow_any_dcp_frame_rate (false)
, _default_still_length (10)
+ , _default_scale (Ratio::from_id ("185"))
, _default_container (Ratio::from_id ("185"))
, _default_dcp_content_type (DCPContentType::from_isdcf_name ("TST"))
, _default_j2k_bandwidth (100000000)
_language = f.optional_string_child ("Language");
+ c = f.optional_string_child ("DefaultScale");
+ if (c) {
+ _default_scale = Ratio::from_id (c.get ());
+ }
+
c = f.optional_string_child ("DefaultContainer");
if (c) {
_default_container = Ratio::from_id (c.get ());
if (_language) {
root->add_child("Language")->add_child_text (_language.get());
}
+ if (_default_scale) {
+ root->add_child("DefaultScale")->add_child_text (_default_scale->id ());
+ }
if (_default_container) {
root->add_child("DefaultContainer")->add_child_text (_default_container->id ());
}
return _default_still_length;
}
+ Ratio const * default_scale () const {
+ return _default_scale;
+ }
+
Ratio const * default_container () const {
return _default_container;
}
changed ();
}
+ void set_default_scale (Ratio const * s) {
+ _default_scale = s;
+ changed ();
+ }
+
void set_default_container (Ratio const * c) {
_default_container = c;
changed ();
ISDCFMetadata _default_isdcf_metadata;
boost::optional<std::string> _language;
int _default_still_length;
+ Ratio const * _default_scale;
Ratio const * _default_container;
DCPContentType const * _default_dcp_content_type;
libdcp::XMLMetadata _dcp_metadata;
, _original_video_frame_rate (0)
, _video_frame_rate (0)
, _video_frame_type (VIDEO_FRAME_TYPE_2D)
- , _scale (Ratio::from_id ("185"))
+ , _scale (Config::instance()->default_scale ())
{
setup_default_colour_conversion ();
}
, _original_video_frame_rate (0)
, _video_frame_rate (0)
, _video_frame_type (VIDEO_FRAME_TYPE_2D)
- , _scale (Ratio::from_id ("185"))
+ , _scale (Config::instance()->default_scale ())
{
setup_default_colour_conversion ();
}
, _original_video_frame_rate (0)
, _video_frame_rate (0)
, _video_frame_type (VIDEO_FRAME_TYPE_2D)
- , _scale (Ratio::from_id ("185"))
+ , _scale (Config::instance()->default_scale ())
{
setup_default_colour_conversion ();
}
add_label_to_sizer (table, panel, _("Default ISDCF name details"), true);
_isdcf_metadata_button = new wxButton (panel, wxID_ANY, _("Edit..."));
table->Add (_isdcf_metadata_button);
+
+ add_label_to_sizer (table, panel, _("Default scale to"), true);
+ _scale = new wxChoice (panel, wxID_ANY);
+ table->Add (_scale);
add_label_to_sizer (table, panel, _("Default container"), true);
_container = new wxChoice (panel, wxID_ANY);
vector<Ratio const *> ratio = Ratio::all ();
int n = 0;
for (vector<Ratio const *>::iterator i = ratio.begin(); i != ratio.end(); ++i) {
+ _scale->Append (std_to_wx ((*i)->nickname ()));
+ if (*i == config->default_scale ()) {
+ _scale->SetSelection (n);
+ }
_container->Append (std_to_wx ((*i)->nickname ()));
if (*i == config->default_container ()) {
_container->SetSelection (n);
++n;
}
+ _scale->Bind (wxEVT_COMMAND_CHOICE_SELECTED, boost::bind (&DefaultsPage::scale_changed, this));
_container->Bind (wxEVT_COMMAND_CHOICE_SELECTED, boost::bind (&DefaultsPage::container_changed, this));
vector<DCPContentType const *> const ct = DCPContentType::all ();
{
Config::instance()->set_default_still_length (_still_length->GetValue ());
}
+
+ void scale_changed ()
+ {
+ vector<Ratio const *> ratio = Ratio::all ();
+ Config::instance()->set_default_scale (ratio[_scale->GetSelection()]);
+ }
void container_changed ()
{
#else
wxDirPickerCtrl* _directory;
#endif
+ wxChoice* _scale;
wxChoice* _container;
wxChoice* _dcp_content_type;
wxTextCtrl* _issuer;