diff options
| author | Carl Hetherington <cth@carlh.net> | 2017-05-09 23:08:34 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2017-05-09 23:08:34 +0100 |
| commit | b19987ae5342602977b265ba9167ec09e433367c (patch) | |
| tree | 7225dfbf58e7e07135b58d44e0ebb390df6178ac /src/wx/export_dialog.cc | |
| parent | 78c27b4fa4d23d4a0a64f0398350ec5697d50551 (diff) | |
Some export tidying up.
Diffstat (limited to 'src/wx/export_dialog.cc')
| -rw-r--r-- | src/wx/export_dialog.cc | 35 |
1 files changed, 27 insertions, 8 deletions
diff --git a/src/wx/export_dialog.cc b/src/wx/export_dialog.cc index e21a49e8a..fb50e1134 100644 --- a/src/wx/export_dialog.cc +++ b/src/wx/export_dialog.cc @@ -25,6 +25,20 @@ using boost::bind; +#define FORMATS 1 + +wxString format_names[] = { + _("ProRes"), +}; + +wxString format_filters[] = { + _("MOV files (*.mov)|*.mov"), +}; + +FFmpegTranscoder::Format formats[] = { + FFmpegTranscoder::FORMAT_PRORES, +}; + ExportDialog::ExportDialog (wxWindow* parent) : TableDialog (parent, _("Export film"), 2, 1, true) { @@ -32,10 +46,12 @@ ExportDialog::ExportDialog (wxWindow* parent) _format = new wxChoice (this, wxID_ANY); add (_format); add (_("Output file"), true); - _file = new FilePickerCtrl (this, _("Select output file"), _("MOV files (*.mov)|*.mov"), false); + _file = new FilePickerCtrl (this, _("Select output file"), format_filters[0], false); add (_file); - _format->Append (_("ProRes 422")); + for (int i = 0; i < FORMATS; ++i) { + _format->Append (format_names[i]); + } _format->SetSelection (0); _format->Bind (wxEVT_CHOICE, bind (&ExportDialog::format_changed, this)); @@ -46,12 +62,8 @@ ExportDialog::ExportDialog (wxWindow* parent) void ExportDialog::format_changed () { - switch (_format->GetSelection()) { - case 0: - _file->SetWildcard (_("MOV files (*.mov)")); - break; - } - + DCPOMATIC_ASSERT (_format->GetSelection() >= 0 && _format->GetSelection() < FORMATS); + _file->SetWildcard (format_filters[_format->GetSelection()]); _file->SetPath (""); } @@ -60,3 +72,10 @@ ExportDialog::path () const { return wx_to_std (_file->GetPath ()); } + +FFmpegTranscoder::Format +ExportDialog::format () const +{ + DCPOMATIC_ASSERT (_format->GetSelection() >= 0 && _format->GetSelection() < FORMATS); + return formats[_format->GetSelection()]; +} |
