Cut down the time before fps starts to be reported for export jobs.
[dcpomatic.git] / src / wx / export_dialog.cc
index 804200596c9535911c1b361b6313429980da7e4d..65ce14092683b0a1496cbde9d384fdc9dbbf2d69 100644 (file)
 using std::string;
 using boost::bind;
 
-#define FORMATS 2
+#define FORMATS 3
 
 wxString format_names[] = {
        _("ProRes"),
-       _("MP4 / H.264")
+       _("MP4 / H.264"),
+       _("DCP subtitles")
 };
 
 wxString format_filters[] = {
        _("MOV files (*.mov)|*.mov"),
        _("MP4 files (*.mp4)|*.mp4"),
+       _("Subtitle files (*.xml)|*.xml"),
 };
 
 wxString format_extensions[] = {
        "mov",
-       "mp4"
+       "mp4",
+       "xml",
 };
 
 ExportFormat formats[] = {
        EXPORT_FORMAT_PRORES,
-       EXPORT_FORMAT_H264_AAC
+       EXPORT_FORMAT_H264_AAC,
+       EXPORT_FORMAT_SUBTITLES_DCP
 };
 
 ExportDialog::ExportDialog (wxWindow* parent, string name)
        : TableDialog (parent, _("Export film"), 2, 1, true)
+       , _initial_name (name)
 {
        add (_("Format"), true);
        _format = new wxChoice (this, wxID_ANY);
@@ -74,7 +79,7 @@ ExportDialog::ExportDialog (wxWindow* parent, string name)
 
        add (_("Output file"), true);
        _file = new FilePickerCtrl (this, _("Select output file"), format_filters[0], false);
-       _file->SetPath (name);
+       _file->SetPath (_initial_name);
        add (_file);
 
        for (int i = 0; i < FORMATS; ++i) {
@@ -101,11 +106,12 @@ ExportDialog::format_changed ()
 {
        DCPOMATIC_ASSERT (_format->GetSelection() >= 0 && _format->GetSelection() < FORMATS);
        _file->SetWildcard (format_filters[_format->GetSelection()]);
-       _file->SetPath ("");
+       _file->SetPath (_initial_name);
        _x264_crf->Enable (_format->GetSelection() == 1);
        for (int i = 0; i < 2; ++i) {
                _x264_crf_label[i]->Enable (_format->GetSelection() == 1);
        }
+       _mixdown->Enable (_format->GetSelection() != 2);
 }
 
 boost::filesystem::path