, _reel_type (REELTYPE_SINGLE)
, _reel_length (2000000000)
, _upload_after_make_dcp (Config::instance()->default_upload_after_make_dcp())
+ , _reencode_j2k (false)
, _state_version (current_state_version)
, _dirty (false)
{
root->add_child("ReelType")->add_child_text (raw_convert<string> (static_cast<int> (_reel_type)));
root->add_child("ReelLength")->add_child_text (raw_convert<string> (_reel_length));
root->add_child("UploadAfterMakeDCP")->add_child_text (_upload_after_make_dcp ? "1" : "0");
+ root->add_child("ReencodeJ2K")->add_child_text (_reencode_j2k ? "1" : "0");
_playlist->as_xml (root->add_child ("Playlist"), with_content_paths);
return doc;
_reel_type = static_cast<ReelType> (f.optional_number_child<int>("ReelType").get_value_or (static_cast<int>(REELTYPE_SINGLE)));
_reel_length = f.optional_number_child<int64_t>("ReelLength").get_value_or (2000000000);
_upload_after_make_dcp = f.optional_bool_child("UploadAfterMakeDCP").get_value_or (false);
+ _reencode_j2k = f.optional_bool_child("ReencodeJ2K").get_value_or(false);
list<string> notes;
/* This method is the only one that can return notes (so far) */
_upload_after_make_dcp = u;
}
+void
+Film::set_reencode_j2k (bool r)
+{
+ ChangeSignaller<Film> ch (this, REENCODE_J2K);
+ _reencode_j2k = r;
+}
+
void
Film::signal_change (ChangeType type, int p)
{
checked_set (_three_d, _film->three_d ());
setup_dcp_name ();
break;
+ case Film::REENCODE_J2K:
+ checked_set (_reencode_j2k, _film->reencode_j2k());
+ break;
case Film::INTEROP:
checked_set (_standard, _film->interop() ? 1 : 0);
setup_dcp_name ();
film_changed (Film::REEL_TYPE);
film_changed (Film::REEL_LENGTH);
film_changed (Film::UPLOAD_AFTER_MAKE_DCP);
+ film_changed (Film::REENCODE_J2K);
set_general_sensitivity(static_cast<bool>(_film));
}
_film->set_three_d (_three_d->GetValue ());
}
+void
+DCPPanel::reencode_j2k_changed ()
+{
+ if (!_film) {
+ return;
+ }
+
+ _film->set_reencode_j2k (_reencode_j2k->GetValue());
+}
+
void
DCPPanel::config_changed (Config::Property p)
{
sizer->Add (_video_grid, 0, wxALL, 8);
panel->SetSizer (sizer);
- int r = 0;
-
_container_label = create_label (panel, _("Container"), true);
_container = new wxChoice (panel, wxID_ANY);
_container_size = new wxStaticText (panel, wxID_ANY, wxT (""));
_frame_rate_sizer->Add (_best_frame_rate, 1, wxALIGN_CENTER_VERTICAL);
_three_d = new wxCheckBox (panel, wxID_ANY, _("3D"));
- ++r;
_j2k_bandwidth_label = create_label (panel, _("JPEG2000 bandwidth\nfor newly-encoded data"), true);
_j2k_bandwidth = new wxSpinCtrl (panel, wxID_ANY);
_mbits_label = create_label (panel, _("Mbit/s"), false);
- _container->Bind (wxEVT_CHOICE, boost::bind (&DCPPanel::container_changed, this));
- _frame_rate_choice->Bind(wxEVT_CHOICE, boost::bind (&DCPPanel::frame_rate_choice_changed, this));
- _frame_rate_spin->Bind (wxEVT_SPINCTRL, boost::bind (&DCPPanel::frame_rate_spin_changed, this));
- _best_frame_rate->Bind (wxEVT_BUTTON, boost::bind (&DCPPanel::best_frame_rate_clicked, this));
- _j2k_bandwidth->Bind (wxEVT_SPINCTRL, boost::bind (&DCPPanel::j2k_bandwidth_changed, this));
+ _reencode_j2k = new wxCheckBox (panel, wxID_ANY, _("Re-encode JPEG2000 data from input"));
+
+ _container->Bind (wxEVT_CHOICE, boost::bind(&DCPPanel::container_changed, this));
+ _frame_rate_choice->Bind (wxEVT_CHOICE, boost::bind(&DCPPanel::frame_rate_choice_changed, this));
+ _frame_rate_spin->Bind (wxEVT_SPINCTRL, boost::bind(&DCPPanel::frame_rate_spin_changed, this));
+ _best_frame_rate->Bind (wxEVT_BUTTON, boost::bind(&DCPPanel::best_frame_rate_clicked, this));
+ _j2k_bandwidth->Bind (wxEVT_SPINCTRL, boost::bind(&DCPPanel::j2k_bandwidth_changed, this));
/* Also listen to wxEVT_TEXT so that typing numbers directly in is always noticed */
- _j2k_bandwidth->Bind (wxEVT_TEXT, boost::bind (&DCPPanel::j2k_bandwidth_changed, this));
- _resolution->Bind (wxEVT_CHOICE, boost::bind (&DCPPanel::resolution_changed, this));
- _three_d->Bind (wxEVT_CHECKBOX, boost::bind (&DCPPanel::three_d_changed, this));
+ _j2k_bandwidth->Bind (wxEVT_TEXT, boost::bind(&DCPPanel::j2k_bandwidth_changed, this));
+ _resolution->Bind (wxEVT_CHOICE, boost::bind(&DCPPanel::resolution_changed, this));
+ _three_d->Bind (wxEVT_CHECKBOX, boost::bind(&DCPPanel::three_d_changed, this));
+ _reencode_j2k->Bind (wxEVT_CHECKBOX, boost::bind(&DCPPanel::reencode_j2k_changed, this));
BOOST_FOREACH (Ratio const * i, Ratio::containers()) {
_container->Append (std_to_wx(i->container_nickname()));
add_label_to_sizer (s, _mbits_label, false);
_video_grid->Add (s, wxGBPosition (r, 1));
++r;
+ _video_grid->Add (_reencode_j2k, wxGBPosition(r, 0), wxGBSpan(1, 2));
}
}