diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-06-02 15:12:00 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-06-02 15:12:00 +0100 |
| commit | c157cd97740a2ba55d3e87bd9844429cc7d49ce7 (patch) | |
| tree | a27db11e3df078ef35b980ffe26f54152657932e /src/wx | |
| parent | 0a93237cb5e4642d3b698ff9b7d0cfae5401478c (diff) | |
Apply single-processor branch manually; processor is now in Film, not AudioContent.
Diffstat (limited to 'src/wx')
| -rw-r--r-- | src/wx/dcp_panel.cc | 27 | ||||
| -rw-r--r-- | src/wx/dcp_panel.h | 4 |
2 files changed, 30 insertions, 1 deletions
diff --git a/src/wx/dcp_panel.cc b/src/wx/dcp_panel.cc index be6e08341..b6fca4604 100644 --- a/src/wx/dcp_panel.cc +++ b/src/wx/dcp_panel.cc @@ -27,12 +27,14 @@ #include "lib/util.h" #include "lib/film.h" #include "lib/ffmpeg_content.h" +#include "lib/audio_processor.h" #include <dcp/key.h> #include <wx/wx.h> #include <wx/notebook.h> #include <wx/gbsizer.h> #include <wx/spinctrl.h> #include <boost/lexical_cast.hpp> +#include <boost/foreach.hpp> using std::cout; using std::list; @@ -468,6 +470,7 @@ DCPPanel::set_general_sensitivity (bool s) _frame_rate_choice->Enable (s); _frame_rate_spin->Enable (s); _audio_channels->Enable (s); + _audio_processor->Enable (s); _j2k_bandwidth->Enable (s); _container->Enable (s); _best_frame_rate->Enable (s && _film && _film->best_video_frame_rate () != _film->video_frame_rate ()); @@ -645,15 +648,26 @@ DCPPanel::make_audio_panel () panel->SetSizer (sizer); int r = 0; + add_label_to_grid_bag_sizer (grid, panel, _("Channels"), true, wxGBPosition (r, 0)); _audio_channels = new wxChoice (panel, wxID_ANY); for (int i = 2; i <= 12; i += 2) { _audio_channels->Append (wxString::Format ("%d", i)); } grid->Add (_audio_channels, wxGBPosition (r, 1)); + + add_label_to_grid_bag_sizer (grid, panel, _("Processor"), true, wxGBPosition (r, 0)); + _audio_processor = new wxChoice (panel, wxID_ANY); + _audio_processor->Append (_("None"), new wxStringClientData (N_("none"))); + BOOST_FOREACH (AudioProcessor const * ap, AudioProcessor::all ()) { + _audio_processor->Append (std_to_wx (ap->name ()), new wxStringClientData (std_to_wx (ap->id ()))); + } + grid->Add (_audio_processor, wxGBPosition (r, 1)); + ++r; _audio_channels->Bind (wxEVT_COMMAND_CHOICE_SELECTED, boost::bind (&DCPPanel::audio_channels_changed, this)); + _audio_processor->Bind (wxEVT_COMMAND_CHOICE_SELECTED, boost::bind (&DCPPanel::audio_processor_changed, this)); return panel; } @@ -664,3 +678,16 @@ DCPPanel::copy_isdcf_name_button_clicked () _film->set_name (_film->isdcf_name (false)); _film->set_use_isdcf_name (false); } + +void +DCPPanel::audio_processor_changed () +{ + if (!_film) { + return; + } + + string const s = string_client_data (_audio_processor->GetClientObject (_audio_processor->GetSelection ())); + if (s != "none") { + _film->set_audio_processor (AudioProcessor::from_id (s)); + } +} diff --git a/src/wx/dcp_panel.h b/src/wx/dcp_panel.h index d2f32cc21..3aa97ad53 100644 --- a/src/wx/dcp_panel.h +++ b/src/wx/dcp_panel.h @@ -68,7 +68,8 @@ private: void burn_subtitles_toggled (); void encrypted_toggled (); void edit_key_clicked (); - + void audio_processor_changed (); + void setup_frame_rate_widget (); void setup_container (); void setup_dcp_name (); @@ -96,6 +97,7 @@ private: wxSpinCtrl* _frame_rate_spin; wxSizer* _frame_rate_sizer; wxChoice* _audio_channels; + wxChoice* _audio_processor; wxButton* _best_frame_rate; wxCheckBox* _three_d; wxChoice* _resolution; |
