vtl: fix small issue with video source file on export
[ardour.git] / gtk2_ardour / export_video_dialog.cc
index ce85fad81ef5c6129cb861c7bc00092239703740..cd45bb368ed25179f0e3588b1032ea53d3a263e4 100644 (file)
@@ -60,6 +60,7 @@ using namespace Gtk;
 using namespace std;
 using namespace PBD;
 using namespace ARDOUR;
+using namespace VideoUtils;
 
 ExportVideoDialog::ExportVideoDialog (PublicEditor& ed, Session* s)
        : ArdourDialog (_("Export Video File "))
@@ -85,7 +86,7 @@ ExportVideoDialog::ExportVideoDialog (PublicEditor& ed, Session* s)
        , fps_checkbox (_("Override FPS (Default is to retain FPS from the input video file):"))
        , meta_checkbox (_("Include Session Metadata"))
 #if 1 /* tentative debug mode */
-       , debug_checkbox (_("Enable Debug Mode: Print ffmpeg Command & Output to stdout."))
+       , debug_checkbox (_("Debug Mode: Print ffmpeg command and output to stdout."))
 #endif
 {
        set_session (s);
@@ -103,7 +104,7 @@ ExportVideoDialog::ExportVideoDialog (PublicEditor& ed, Session* s)
        /* check if ffmpeg can be found */
        transcoder = new TranscodeFfmpeg("");
        if (!transcoder->ffexec_ok()) {
-               l = manage (new Label (_("No ffprobe or ffmpeg executables could be found on this system. Video Export is not possible until you install those tools. See the Log widow for more information."), Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false));
+               l = manage (new Label (_("No ffprobe or ffmpeg executables could be found on this system. Video Export is not possible until you install those tools. See the Log window for more information."), Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false));
                l->set_line_wrap();
                vbox->pack_start (*l, false, false, 8);
                get_vbox()->pack_start (*vbox, false, false);
@@ -164,7 +165,7 @@ ExportVideoDialog::ExportVideoDialog (PublicEditor& ed, Session* s)
                                filenameset = true;
                        }
                }
-               else if (!filenameset
+               if (!filenameset
                                && node->property(X_("Filename"))
                                && node->property(X_("LocalFile"))
                                && node->property(X_("LocalFile"))->value() == X_("1")
@@ -178,6 +179,9 @@ ExportVideoDialog::ExportVideoDialog (PublicEditor& ed, Session* s)
                                filenameset = true;
                        }
                }
+               if (!filenameset) {
+                       invid_path_entry.set_text (X_(""));
+               }
        }
 
        l = manage (new Label (_("<b>Settings:</b>"), Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false));
@@ -584,7 +588,7 @@ ExportVideoDialog::encode_pass (int pass)
        }
 
        std::string preset = preset_combo.get_active_text();
-       FFSettings ffs ; /* = transcoder->default_encoder_settings(); */
+       TranscodeFfmpeg::FFSettings ffs ; /* = transcoder->default_encoder_settings(); */
        ffs.clear();
 
        if (fps_checkbox.get_active()) {
@@ -740,7 +744,7 @@ ExportVideoDialog::encode_pass (int pass)
                transcoder->set_avoffset(av_offset / (double)_session->nominal_frame_rate());
        }
 
-       FFSettings meta = transcoder->default_meta_data();
+       TranscodeFfmpeg::FFSettings meta = transcoder->default_meta_data();
        if (meta_checkbox.get_active()) {
                ARDOUR::SessionMetadata * session_data = ARDOUR::SessionMetadata::Metadata();
                if (session_data->year() > 0 ) {