Basic and untested export option to bounce down to stereo; add encoder test with...
[dcpomatic.git] / src / wx / export_dialog.cc
index fb50e11347a2179c2d012de7f201b5a8758323c3..712ef4a7e9a96cf7b281574da48ccfdbb0f0b1a4 100644 (file)
 
 using boost::bind;
 
-#define FORMATS 1
+#define FORMATS 2
 
 wxString format_names[] = {
        _("ProRes"),
+       _("H.264")
 };
 
 wxString format_filters[] = {
        _("MOV files (*.mov)|*.mov"),
+       _("MP4 files (*.mp4)|*.mp4"),
 };
 
-FFmpegTranscoder::Format formats[] = {
-       FFmpegTranscoder::FORMAT_PRORES,
+FFmpegEncoder::Format formats[] = {
+       FFmpegEncoder::FORMAT_PRORES,
+       FFmpegEncoder::FORMAT_H264,
 };
 
 ExportDialog::ExportDialog (wxWindow* parent)
@@ -45,6 +48,9 @@ ExportDialog::ExportDialog (wxWindow* parent)
        add (_("Format"), true);
        _format = new wxChoice (this, wxID_ANY);
        add (_format);
+       add_spacer ();
+       _mixdown = new wxCheckBox (this, wxID_ANY, _("Mix audio down to stereo"));
+       add (_mixdown, false);
        add (_("Output file"), true);
        _file = new FilePickerCtrl (this, _("Select output file"), format_filters[0], false);
        add (_file);
@@ -73,9 +79,15 @@ ExportDialog::path () const
        return wx_to_std (_file->GetPath ());
 }
 
-FFmpegTranscoder::Format
+FFmpegEncoder::Format
 ExportDialog::format () const
 {
        DCPOMATIC_ASSERT (_format->GetSelection() >= 0 && _format->GetSelection() < FORMATS);
        return formats[_format->GetSelection()];
 }
+
+bool
+ExportDialog::mixdown_to_stereo () const
+{
+       return _mixdown->GetValue ();
+}