mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
vtl: remember original video-file for later export/mux
This commit is contained in:
parent
cc960c4f07
commit
b407b753f7
2 changed files with 33 additions and 7 deletions
|
|
@ -3474,8 +3474,12 @@ ARDOUR_UI::add_video (Gtk::Window* float_window)
|
|||
add_video_dialog->hide();
|
||||
if (r != RESPONSE_ACCEPT) { return; }
|
||||
|
||||
bool local_file;
|
||||
bool local_file, orig_local_file;
|
||||
std::string path = add_video_dialog->file_name(local_file);
|
||||
|
||||
std::string orig_path = path;
|
||||
orig_local_file = local_file;
|
||||
|
||||
bool auto_set_session_fps = add_video_dialog->auto_set_session_fps();
|
||||
|
||||
if (local_file && !Glib::file_test(path, Glib::FILE_TEST_EXISTS)) {
|
||||
|
|
@ -3534,6 +3538,11 @@ ARDOUR_UI::add_video (Gtk::Window* float_window)
|
|||
node->add_property (X_("Filename"), path);
|
||||
node->add_property (X_("AutoFPS"), auto_set_session_fps?X_("1"):X_("0"));
|
||||
node->add_property (X_("LocalFile"), local_file?X_("1"):X_("0"));
|
||||
if (orig_local_file) {
|
||||
node->add_property (X_("OriginalVideoFile"), orig_path);
|
||||
} else {
|
||||
node->remove_property (X_("OriginalVideoFile"));
|
||||
}
|
||||
_session->add_extra_xml (*node);
|
||||
_session->set_dirty ();
|
||||
|
||||
|
|
|
|||
|
|
@ -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"))) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
l = manage (new Label (_("<b>Settings:</b>"), Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue