diff options
author | Robin Gareus <robin@gareus.org> | 2013-06-17 09:46:01 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2013-06-17 09:46:01 +0200 |
commit | b407b753f718d9244f16c23eb31a137be00f230e (patch) | |
tree | 841da60f05c3dda1d82d349f5a46011259d84218 /gtk2_ardour/export_video_dialog.cc | |
parent | cc960c4f07fa0217ebfced99452c15f047db5b40 (diff) |
vtl: remember original video-file for later export/mux
Diffstat (limited to 'gtk2_ardour/export_video_dialog.cc')
-rw-r--r-- | gtk2_ardour/export_video_dialog.cc | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/gtk2_ardour/export_video_dialog.cc b/gtk2_ardour/export_video_dialog.cc index ba32ef3302..ce85fad81e 100644 --- a/gtk2_ardour/export_video_dialog.cc +++ b/gtk2_ardour/export_video_dialog.cc @@ -154,13 +154,30 @@ ExportVideoDialog::ExportVideoDialog (PublicEditor& ed, Session* s) outfn_path_entry.set_width_chars(38); outfn_path_entry.set_text (_session->session_directory().export_path() + G_DIR_SEPARATOR +"export.avi"); - XMLNode* node = _session->extra_xml (X_("Video Timeline")); - if (node && node->property(X_("Filename"))) { - std::string filename = node->property(X_("Filename"))->value(); - if (filename.at(0) != G_DIR_SEPARATOR) { - filename = Glib::build_filename (_session->session_directory().video_path(), filename); + XMLNode* node = _session->extra_xml (X_("Videotimeline")); + if (node) { + bool filenameset = false; + if (node->property(X_("OriginalVideoFile"))) { + std::string filename = node->property(X_("OriginalVideoFile"))->value(); + if (Glib::file_test(filename, Glib::FILE_TEST_EXISTS)) { + invid_path_entry.set_text (filename); + filenameset = true; + } + } + else if (!filenameset + && node->property(X_("Filename")) + && node->property(X_("LocalFile")) + && node->property(X_("LocalFile"))->value() == X_("1") + ) { + std::string filename = node->property(X_("Filename"))->value(); + if (filename.at(0) != G_DIR_SEPARATOR) { + filename = Glib::build_filename (_session->session_directory().video_path(), filename); + } + if (Glib::file_test(filename, Glib::FILE_TEST_EXISTS)) { + invid_path_entry.set_text (filename); + filenameset = true; + } } - invid_path_entry.set_text (filename); } l = manage (new Label (_("<b>Settings:</b>"), Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false)); |