From: Carl Hetherington Date: Mon, 25 Aug 2014 15:56:17 +0000 (+0100) Subject: Merge master. X-Git-Tag: v2.0.48~636 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=7b2054e2a73844450b5b55c5788c02af671812ce Merge master. --- 7b2054e2a73844450b5b55c5788c02af671812ce diff --cc ChangeLog index d1d008b5e,c3d8a77c4..c34750ad6 --- a/ChangeLog +++ b/ChangeLog @@@ -1,29 -1,7 +1,33 @@@ +2014-08-24 Carl Hetherington + + * Version 2.0.3 released. + +2014-08-24 Carl Hetherington + + * Version 2.0.2 released. + +2014-08-06 Carl Hetherington + + * Version 2.0.1 released. + +2014-07-15 Carl Hetherington + + * A variety of changes were made on the 2.0 branch + but not documented in the ChangeLog. Most sigificantly: + + - DCP import + - Creation of DCPs with proper XML subtitles + - Import of .srt and .xml subtitles + - Audio processing framework (with some basic processors). + +2014-03-07 Carl Hetherington + + * Add subtitle view. + + 2014-08-25 Carl Hetherington + + * Basic recent files list in the File menu. + 2014-08-23 Carl Hetherington * Version 1.72.12 released. diff --cc src/lib/config.cc index d20536f14,04f28579b..7e3762587 --- a/src/lib/config.cc +++ b/src/lib/config.cc @@@ -215,32 -207,73 +217,37 @@@ Config::read ( _log_types = f.optional_number_child ("LogTypes").get_value_or (Log::TYPE_GENERAL | Log::TYPE_WARNING | Log::TYPE_ERROR); + list his = f.node_children ("History"); + for (list::const_iterator i = his.begin(); i != his.end(); ++i) { + _history.push_back ((*i)->content ()); + } -} + -void -Config::read_old_metadata () -{ - /* XXX: this won't work with non-Latin filenames */ - ifstream f (file(true).string().c_str ()); - string line; - - while (getline (f, line)) { - if (line.empty ()) { - continue; + cxml::NodePtr signer = f.optional_node_child ("Signer"); + dcp::CertificateChain signer_chain; + if (signer) { + /* Read the signing certificates and private key in from the config file */ + list certificates = signer->node_children ("Certificate"); + for (list::const_iterator i = certificates.begin(); i != certificates.end(); ++i) { + signer_chain.add (dcp::Certificate ((*i)->content ())); } - if (line[0] == '#') { - continue; - } + _signer.reset (new dcp::Signer (signer_chain, signer->string_child ("PrivateKey"))); + } else { + /* Make a new set of signing certificates and key */ + _signer.reset (new dcp::Signer (openssl_path ())); + } - size_t const s = line.find (' '); - if (s == string::npos) { - continue; - } - - string const k = line.substr (0, s); - string const v = line.substr (s + 1); - - if (k == N_("num_local_encoding_threads")) { - _num_local_encoding_threads = atoi (v.c_str ()); - } else if (k == N_("default_directory")) { - _default_directory = v; - } else if (k == N_("server_port")) { - _server_port_base = atoi (v.c_str ()); - } else if (k == N_("server")) { - vector b; - split (b, v, is_any_of (" ")); - if (b.size() == 2) { - _servers.push_back (b[0]); - } - } else if (k == N_("tms_ip")) { - _tms_ip = v; - } else if (k == N_("tms_path")) { - _tms_path = v; - } else if (k == N_("tms_user")) { - _tms_user = v; - } else if (k == N_("tms_password")) { - _tms_password = v; - } else if (k == N_("sound_processor")) { - _sound_processor = SoundProcessor::from_id (v); - } else if (k == "language") { - _language = v; - } else if (k == "default_container") { - _default_container = Ratio::from_id (v); - } else if (k == "default_dcp_content_type") { - _default_dcp_content_type = DCPContentType::from_isdcf_name (v); - } else if (k == "dcp_metadata_issuer") { - _dcp_metadata.issuer = v; - } else if (k == "dcp_metadata_creator") { - _dcp_metadata.creator = v; - } else if (k == "dcp_metadata_issue_date") { - _dcp_metadata.issue_date = v; - } + if (f.optional_string_child ("DecryptionCertificate")) { + _decryption_certificate = dcp::Certificate (f.string_child ("DecryptionCertificate")); + } + + if (f.optional_string_child ("DecryptionPrivateKey")) { + _decryption_private_key = f.string_child ("DecryptionPrivateKey"); + } - _default_isdcf_metadata.read_old_metadata (k, v); + if (!f.optional_string_child ("DecryptionCertificate") || !f.optional_string_child ("DecryptionPrivateKey")) { + /* Generate our own decryption certificate and key if either is not present in config */ + make_decryption_keys (); } } @@@ -361,16 -396,10 +368,20 @@@ Config::write () cons root->add_child("AllowAnyDCPFrameRate")->add_child_text (_allow_any_dcp_frame_rate ? "1" : "0"); root->add_child("LogTypes")->add_child_text (raw_convert (_log_types)); + xmlpp::Element* signer = root->add_child ("Signer"); + dcp::CertificateChain::List certs = _signer->certificates().root_to_leaf (); + for (dcp::CertificateChain::List::const_iterator i = certs.begin(); i != certs.end(); ++i) { + signer->add_child("Certificate")->add_child_text (i->certificate (true)); + } + signer->add_child("PrivateKey")->add_child_text (_signer->key ()); + + root->add_child("DecryptionCertificate")->add_child_text (_decryption_certificate.certificate (true)); + root->add_child("DecryptionPrivateKey")->add_child_text (_decryption_private_key); + + for (vector::const_iterator i = _history.begin(); i != _history.end(); ++i) { + root->add_child("History")->add_child_text (i->string ()); + } + doc.write_to_file_formatted (file(false).string ()); } diff --cc src/lib/config.h index 3cfaa1200,aa3c06356..05bc7945f --- a/src/lib/config.h +++ b/src/lib/config.h @@@ -414,7 -390,16 +418,14 @@@ public _log_types = t; changed (); } + + void clear_history () { + _history.clear (); + changed (); + } + + void add_to_history (boost::filesystem::path p); - boost::filesystem::path signer_chain_directory () const; - void changed (); boost::signals2::signal Changed; diff --cc src/lib/util.h index 1bbdfb2cf,675c8d03e..724e8937c --- a/src/lib/util.h +++ b/src/lib/util.h @@@ -44,11 -44,14 +44,11 @@@ extern "C" /** The maximum number of audio channels that we can have in a DCP */ #define MAX_DCP_AUDIO_CHANNELS 12 - #define DCPOMATIC_HELLO "Boys, you gotta learn not to talk to nuns that way" + #define HISTORY_SIZE 10 -namespace libdcp { - class Signer; -} - class Job; +struct AVSubtitle; extern std::string seconds_to_hms (int); extern std::string seconds_to_approximate_hms (int); diff --cc src/tools/dcpomatic.cc index 424645537,09aebd39c..8763e35cb --- a/src/tools/dcpomatic.cc +++ b/src/tools/dcpomatic.cc @@@ -469,13 -396,13 +397,13 @@@ private try { if (d->write_to ()) { - write_kdm_files (film, d->screens (), d->cpl (), d->from (), d->until (), d->formulation (), d->directory ()); + write_kdm_files (_film, d->screens (), d->cpl (), d->from (), d->until (), d->formulation (), d->directory ()); } else { JobManager::instance()->add ( - shared_ptr (new SendKDMEmailJob (film, d->screens (), d->cpl (), d->from (), d->until (), d->formulation ())) + shared_ptr (new SendKDMEmailJob (_film, d->screens (), d->cpl (), d->from (), d->until (), d->formulation ())) ); } - } catch (libdcp::NotEncryptedError& e) { + } catch (dcp::NotEncryptedError& e) { error_dialog (this, _("CPL's content is not encrypted.")); } catch (exception& e) { error_dialog (this, e.what ()); @@@ -601,8 -528,8 +529,8 @@@ ++i; } bool const dcp_creation = (i != jobs.end ()) && !(*i)->finished (); - bool const have_cpl = film && !film->cpls().empty (); + bool const have_cpl = _film && !_film->cpls().empty (); - bool const have_selected_video_content = !_film_editor->selected_video_content().empty(); + bool const have_selected_video_content = !_film_editor->content_panel()->selected_video().empty(); for (map::iterator j = menu_items.begin(); j != menu_items.end(); ++j) { diff --cc src/wx/film_editor.cc index 1ce4695d6,e2886b5f5..7f9461d94 --- a/src/wx/film_editor.cc +++ b/src/wx/film_editor.cc @@@ -71,28 -70,342 +71,28 @@@ using boost::dynamic_pointer_cast using boost::lexical_cast; /** @param f Film to edit */ - FilmEditor::FilmEditor (shared_ptr f, wxWindow* parent) + FilmEditor::FilmEditor (wxWindow* parent) : wxPanel (parent) - , _menu (this) - , _generally_sensitive (true) - , _timeline_dialog (0) { wxBoxSizer* s = new wxBoxSizer (wxVERTICAL); _main_notebook = new wxNotebook (this, wxID_ANY); s->Add (_main_notebook, 1); - make_content_panel (); - _main_notebook->AddPage (_content_panel, _("Content"), true); - make_dcp_panel (); - _main_notebook->AddPage (_dcp_panel, _("DCP"), false); + _content_panel = new ContentPanel (_main_notebook, _film); + _main_notebook->AddPage (_content_panel->panel (), _("Content"), true); + _dcp_panel = new DCPPanel (_main_notebook, _film); + _main_notebook->AddPage (_dcp_panel->panel (), _("DCP"), false); - set_film (f); - connect_to_widgets (); -- JobManager::instance()->ActiveJobsChanged.connect ( bind (&FilmEditor::active_jobs_changed, this, _1) ); - Config::instance()->Changed.connect (boost::bind (&FilmEditor::config_changed, this)); - + set_film (shared_ptr ()); - SetSizerAndFit (s); -} - -void -FilmEditor::make_dcp_panel () -{ - _dcp_panel = new wxPanel (_main_notebook); - _dcp_sizer = new wxBoxSizer (wxVERTICAL); - _dcp_panel->SetSizer (_dcp_sizer); - - wxGridBagSizer* grid = new wxGridBagSizer (DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP); - _dcp_sizer->Add (grid, 0, wxEXPAND | wxALL, 8); - - int r = 0; + - add_label_to_grid_bag_sizer (grid, _dcp_panel, _("Name"), true, wxGBPosition (r, 0)); - _name = new wxTextCtrl (_dcp_panel, wxID_ANY); - grid->Add (_name, wxGBPosition(r, 1), wxDefaultSpan, wxEXPAND | wxLEFT | wxRIGHT); - ++r; - - add_label_to_grid_bag_sizer (grid, _dcp_panel, _("DCP Name"), true, wxGBPosition (r, 0)); - _dcp_name = new wxStaticText (_dcp_panel, wxID_ANY, wxT ("")); - grid->Add (_dcp_name, wxGBPosition(r, 1), wxDefaultSpan, wxALIGN_CENTER_VERTICAL); - ++r; - - int flags = wxALIGN_CENTER_VERTICAL; -#ifdef __WXOSX__ - flags |= wxALIGN_RIGHT; -#endif - - _use_isdcf_name = new wxCheckBox (_dcp_panel, wxID_ANY, _("Use ISDCF name")); - grid->Add (_use_isdcf_name, wxGBPosition (r, 0), wxDefaultSpan, flags); - _edit_isdcf_button = new wxButton (_dcp_panel, wxID_ANY, _("Details...")); - grid->Add (_edit_isdcf_button, wxGBPosition (r, 1), wxDefaultSpan); - ++r; - - add_label_to_grid_bag_sizer (grid, _dcp_panel, _("Container"), true, wxGBPosition (r, 0)); - _container = new wxChoice (_dcp_panel, wxID_ANY); - grid->Add (_container, wxGBPosition (r, 1), wxDefaultSpan, wxEXPAND); - ++r; - - add_label_to_grid_bag_sizer (grid, _dcp_panel, _("Content Type"), true, wxGBPosition (r, 0)); - _dcp_content_type = new wxChoice (_dcp_panel, wxID_ANY); - grid->Add (_dcp_content_type, wxGBPosition (r, 1)); - ++r; - - { - add_label_to_grid_bag_sizer (grid, _dcp_panel, _("Frame Rate"), true, wxGBPosition (r, 0)); - _frame_rate_sizer = new wxBoxSizer (wxHORIZONTAL); - _frame_rate_choice = new wxChoice (_dcp_panel, wxID_ANY); - _frame_rate_sizer->Add (_frame_rate_choice, 1, wxALIGN_CENTER_VERTICAL); - _frame_rate_spin = new wxSpinCtrl (_dcp_panel, wxID_ANY); - _frame_rate_sizer->Add (_frame_rate_spin, 1, wxALIGN_CENTER_VERTICAL); - setup_frame_rate_widget (); - _best_frame_rate = new wxButton (_dcp_panel, wxID_ANY, _("Use best")); - _frame_rate_sizer->Add (_best_frame_rate, 1, wxALIGN_CENTER_VERTICAL | wxEXPAND); - grid->Add (_frame_rate_sizer, wxGBPosition (r, 1)); - } - ++r; - - _signed = new wxCheckBox (_dcp_panel, wxID_ANY, _("Signed")); - grid->Add (_signed, wxGBPosition (r, 0), wxGBSpan (1, 2)); - ++r; - - _encrypted = new wxCheckBox (_dcp_panel, wxID_ANY, _("Encrypted")); - grid->Add (_encrypted, wxGBPosition (r, 0), wxGBSpan (1, 2)); - ++r; - - add_label_to_grid_bag_sizer (grid, _dcp_panel, _("Audio channels"), true, wxGBPosition (r, 0)); - _audio_channels = new wxSpinCtrl (_dcp_panel, wxID_ANY); - grid->Add (_audio_channels, wxGBPosition (r, 1)); - ++r; - - _three_d = new wxCheckBox (_dcp_panel, wxID_ANY, _("3D")); - grid->Add (_three_d, wxGBPosition (r, 0), wxGBSpan (1, 2)); - ++r; - - add_label_to_grid_bag_sizer (grid, _dcp_panel, _("Resolution"), true, wxGBPosition (r, 0)); - _resolution = new wxChoice (_dcp_panel, wxID_ANY); - grid->Add (_resolution, wxGBPosition (r, 1)); - ++r; - - { - add_label_to_grid_bag_sizer (grid, _dcp_panel, _("JPEG2000 bandwidth"), true, wxGBPosition (r, 0)); - wxSizer* s = new wxBoxSizer (wxHORIZONTAL); - _j2k_bandwidth = new wxSpinCtrl (_dcp_panel, wxID_ANY); - s->Add (_j2k_bandwidth, 1); - add_label_to_sizer (s, _dcp_panel, _("Mbit/s"), false); - grid->Add (s, wxGBPosition (r, 1)); - } - ++r; - - add_label_to_grid_bag_sizer (grid, _dcp_panel, _("Standard"), true, wxGBPosition (r, 0)); - _standard = new wxChoice (_dcp_panel, wxID_ANY); - grid->Add (_standard, wxGBPosition (r, 1), wxDefaultSpan, wxALIGN_CENTER_VERTICAL); - ++r; - - add_label_to_grid_bag_sizer (grid, _dcp_panel, _("Scaler"), true, wxGBPosition (r, 0)); - _scaler = new wxChoice (_dcp_panel, wxID_ANY); - grid->Add (_scaler, wxGBPosition (r, 1), wxDefaultSpan, wxALIGN_CENTER_VERTICAL); - ++r; - - vector const sc = Scaler::all (); - for (vector::const_iterator i = sc.begin(); i != sc.end(); ++i) { - _scaler->Append (std_to_wx ((*i)->name())); - } - - vector const ratio = Ratio::all (); - for (vector::const_iterator i = ratio.begin(); i != ratio.end(); ++i) { - _container->Append (std_to_wx ((*i)->nickname ())); - } - - vector const ct = DCPContentType::all (); - for (vector::const_iterator i = ct.begin(); i != ct.end(); ++i) { - _dcp_content_type->Append (std_to_wx ((*i)->pretty_name ())); - } - - list const dfr = Config::instance()->allowed_dcp_frame_rates (); - for (list::const_iterator i = dfr.begin(); i != dfr.end(); ++i) { - _frame_rate_choice->Append (std_to_wx (boost::lexical_cast (*i))); - } - - _audio_channels->SetRange (0, MAX_DCP_AUDIO_CHANNELS); - _j2k_bandwidth->SetRange (1, Config::instance()->maximum_j2k_bandwidth() / 1000000); - _frame_rate_spin->SetRange (1, 480); - - _resolution->Append (_("2K")); - _resolution->Append (_("4K")); - - _standard->Append (_("SMPTE")); - _standard->Append (_("Interop")); -} - -void -FilmEditor::connect_to_widgets () -{ - _name->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&FilmEditor::name_changed, this)); - _use_isdcf_name->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&FilmEditor::use_isdcf_name_toggled, this)); - _edit_isdcf_button->Bind(wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&FilmEditor::edit_isdcf_button_clicked, this)); - _container->Bind (wxEVT_COMMAND_CHOICE_SELECTED, boost::bind (&FilmEditor::container_changed, this)); - _content->Bind (wxEVT_COMMAND_LIST_ITEM_SELECTED, boost::bind (&FilmEditor::content_selection_changed, this)); - _content->Bind (wxEVT_COMMAND_LIST_ITEM_DESELECTED, boost::bind (&FilmEditor::content_selection_changed, this)); - _content->Bind (wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, boost::bind (&FilmEditor::content_right_click, this, _1)); - _content_add_file->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&FilmEditor::content_add_file_clicked, this)); - _content_add_folder->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&FilmEditor::content_add_folder_clicked, this)); - _content_remove->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&FilmEditor::content_remove_clicked, this)); - _content_earlier->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&FilmEditor::content_earlier_clicked, this)); - _content_later->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&FilmEditor::content_later_clicked, this)); - _content_timeline->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&FilmEditor::content_timeline_clicked, this)); - _scaler->Bind (wxEVT_COMMAND_CHOICE_SELECTED, boost::bind (&FilmEditor::scaler_changed, this)); - _dcp_content_type->Bind (wxEVT_COMMAND_CHOICE_SELECTED, boost::bind (&FilmEditor::dcp_content_type_changed, this)); - _frame_rate_choice->Bind(wxEVT_COMMAND_CHOICE_SELECTED, boost::bind (&FilmEditor::frame_rate_choice_changed, this)); - _frame_rate_spin->Bind (wxEVT_COMMAND_SPINCTRL_UPDATED, boost::bind (&FilmEditor::frame_rate_spin_changed, this)); - _best_frame_rate->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&FilmEditor::best_frame_rate_clicked, this)); - _signed->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&FilmEditor::signed_toggled, this)); - _encrypted->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&FilmEditor::encrypted_toggled, this)); - _audio_channels->Bind (wxEVT_COMMAND_SPINCTRL_UPDATED, boost::bind (&FilmEditor::audio_channels_changed, this)); - _j2k_bandwidth->Bind (wxEVT_COMMAND_SPINCTRL_UPDATED, boost::bind (&FilmEditor::j2k_bandwidth_changed, this)); - _resolution->Bind (wxEVT_COMMAND_CHOICE_SELECTED, boost::bind (&FilmEditor::resolution_changed, this)); - _sequence_video->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&FilmEditor::sequence_video_changed, this)); - _three_d->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&FilmEditor::three_d_changed, this)); - _standard->Bind (wxEVT_COMMAND_CHOICE_SELECTED, boost::bind (&FilmEditor::standard_changed, this)); -} - -void -FilmEditor::make_content_panel () -{ - _content_panel = new wxPanel (_main_notebook); - _content_sizer = new wxBoxSizer (wxVERTICAL); - _content_panel->SetSizer (_content_sizer); - - { - wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL); - - _content = new wxListCtrl (_content_panel, wxID_ANY, wxDefaultPosition, wxSize (320, 160), wxLC_REPORT | wxLC_NO_HEADER); - s->Add (_content, 1, wxEXPAND | wxTOP | wxBOTTOM, 6); - - _content->InsertColumn (0, wxT("")); - _content->SetColumnWidth (0, 512); - - wxBoxSizer* b = new wxBoxSizer (wxVERTICAL); - _content_add_file = new wxButton (_content_panel, wxID_ANY, _("Add file(s)...")); - b->Add (_content_add_file, 1, wxEXPAND | wxALL, DCPOMATIC_BUTTON_STACK_GAP); - _content_add_folder = new wxButton (_content_panel, wxID_ANY, _("Add folder...")); - b->Add (_content_add_folder, 1, wxEXPAND | wxALL, DCPOMATIC_BUTTON_STACK_GAP); - _content_remove = new wxButton (_content_panel, wxID_ANY, _("Remove")); - b->Add (_content_remove, 1, wxEXPAND | wxALL, DCPOMATIC_BUTTON_STACK_GAP); - _content_earlier = new wxButton (_content_panel, wxID_ANY, _("Up")); - b->Add (_content_earlier, 1, wxEXPAND | wxALL, DCPOMATIC_BUTTON_STACK_GAP); - _content_later = new wxButton (_content_panel, wxID_ANY, _("Down")); - b->Add (_content_later, 1, wxEXPAND | wxALL, DCPOMATIC_BUTTON_STACK_GAP); - _content_timeline = new wxButton (_content_panel, wxID_ANY, _("Timeline...")); - b->Add (_content_timeline, 1, wxEXPAND | wxALL, DCPOMATIC_BUTTON_STACK_GAP); - - s->Add (b, 0, wxALL, 4); - - _content_sizer->Add (s, 0, wxEXPAND | wxALL, 6); - } - - _sequence_video = new wxCheckBox (_content_panel, wxID_ANY, _("Keep video in sequence")); - _content_sizer->Add (_sequence_video); - - _content_notebook = new wxNotebook (_content_panel, wxID_ANY); - _content_sizer->Add (_content_notebook, 1, wxEXPAND | wxTOP, 6); - - _video_panel = new VideoPanel (this); - _panels.push_back (_video_panel); - _audio_panel = new AudioPanel (this); - _panels.push_back (_audio_panel); - _subtitle_panel = new SubtitlePanel (this); - _panels.push_back (_subtitle_panel); - _timing_panel = new TimingPanel (this); - _panels.push_back (_timing_panel); -} - -/** Called when the name widget has been changed */ -void -FilmEditor::name_changed () -{ - if (!_film) { - return; - } - - _film->set_name (string (_name->GetValue().mb_str())); -} - -void -FilmEditor::j2k_bandwidth_changed () -{ - if (!_film) { - return; - } - - _film->set_j2k_bandwidth (_j2k_bandwidth->GetValue() * 1000000); -} - -void -FilmEditor::signed_toggled () -{ - if (!_film) { - return; - } - - _film->set_signed (_signed->GetValue ()); -} - -void -FilmEditor::encrypted_toggled () -{ - if (!_film) { - return; - } - - _film->set_encrypted (_encrypted->GetValue ()); -} - -/** Called when the frame rate choice widget has been changed */ -void -FilmEditor::frame_rate_choice_changed () -{ - if (!_film) { - return; - } - - _film->set_video_frame_rate ( - boost::lexical_cast ( - wx_to_std (_frame_rate_choice->GetString (_frame_rate_choice->GetSelection ())) - ) - ); -} - -/** Called when the frame rate spin widget has been changed */ -void -FilmEditor::frame_rate_spin_changed () -{ - if (!_film) { - return; - } - - _film->set_video_frame_rate (_frame_rate_spin->GetValue ()); -} - -void -FilmEditor::audio_channels_changed () -{ - if (!_film) { - return; - } - - _film->set_audio_channels (_audio_channels->GetValue ()); -} - -void -FilmEditor::resolution_changed () -{ - if (!_film) { - return; - } - - _film->set_resolution (_resolution->GetSelection() == 0 ? RESOLUTION_2K : RESOLUTION_4K); + SetSizerAndFit (s); } -void -FilmEditor::standard_changed () -{ - if (!_film) { - return; - } - - _film->set_interop (_standard->GetSelection() == 1); -} /** Called when the metadata stored in the Film object has changed; * so that we can update the GUI. diff --cc src/wx/film_editor.h index 28baf410c,6f39f2d68..a198d7aa7 --- a/src/wx/film_editor.h +++ b/src/wx/film_editor.h @@@ -38,9 -45,10 +38,9 @@@ class DCPPanel class FilmEditor : public wxPanel { public: - FilmEditor (boost::shared_ptr, wxWindow *); + FilmEditor (wxWindow *); void set_film (boost::shared_ptr); - void set_selection (boost::weak_ptr); boost::signals2::signal FileChanged; diff --cc src/wx/film_viewer.cc index 2416c6776,595fd4720..ef5c78f24 --- a/src/wx/film_viewer.cc +++ b/src/wx/film_viewer.cc @@@ -53,12 -51,11 +53,12 @@@ using std::make_pair using boost::shared_ptr; using boost::dynamic_pointer_cast; using boost::weak_ptr; -using libdcp::Size; +using dcp::Size; - FilmViewer::FilmViewer (shared_ptr f, wxWindow* p) + FilmViewer::FilmViewer (wxWindow* p) : wxPanel (p) , _panel (new wxPanel (this)) + , _outline_content (new wxCheckBox (this, wxID_ANY, _("Outline content"))) , _slider (new wxSlider (this, wxID_ANY, 0, 0, 4096)) , _back_button (new wxButton (this, wxID_ANY, wxT("<"))) , _forward_button (new wxButton (this, wxID_ANY, wxT(">")))