summaryrefslogtreecommitdiff
path: root/gtk2_ardour/ardour_ui.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gtk2_ardour/ardour_ui.cc')
-rw-r--r--gtk2_ardour/ardour_ui.cc54
1 files changed, 24 insertions, 30 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc
index 4ab24dcd18..e24ec69abd 100644
--- a/gtk2_ardour/ardour_ui.cc
+++ b/gtk2_ardour/ardour_ui.cc
@@ -120,7 +120,6 @@ typedef uint64_t microseconds_t;
#include "video_server_dialog.h"
#include "add_video_dialog.h"
#include "transcode_video_dialog.h"
-#include "video_copy_dialog.h"
#include "system_exec.h" /* to launch video-server */
#endif
@@ -3420,43 +3419,38 @@ ARDOUR_UI::add_video (Gtk::Window* float_window)
}
switch (add_video_dialog->import_option()) {
- case VTL_IMPORT_COPY:
- {
- VideoCopyDialog *video_copy_dialog;
- video_copy_dialog = new VideoCopyDialog(_session, path);
- //video_copy_dialog->setup_non_interactive_copy();
- ResponseType r = (ResponseType) video_copy_dialog->run ();
- video_copy_dialog->hide();
- if (r != RESPONSE_ACCEPT) { return; }
- path = video_copy_dialog->get_filename();
- delete video_copy_dialog;
- }
- break;
case VTL_IMPORT_TRANSCODE:
- {
- TranscodeVideoDialog *transcode_video_dialog;
- transcode_video_dialog = new TranscodeVideoDialog (_session, path);
- ResponseType r = (ResponseType) transcode_video_dialog->run ();
- transcode_video_dialog->hide();
- if (r != RESPONSE_ACCEPT) { return; }
- path = transcode_video_dialog->get_filename();
- if (!transcode_video_dialog->get_audiofile().empty()) {
- editor->embed_audio_from_video(transcode_video_dialog->get_audiofile());
+ {
+ TranscodeVideoDialog *transcode_video_dialog;
+ transcode_video_dialog = new TranscodeVideoDialog (_session, path);
+ ResponseType r = (ResponseType) transcode_video_dialog->run ();
+ transcode_video_dialog->hide();
+ if (r != RESPONSE_ACCEPT) {
+ delete transcode_video_dialog;
+ return;
+ }
+ if (!transcode_video_dialog->get_audiofile().empty()) {
+ editor->embed_audio_from_video(transcode_video_dialog->get_audiofile());
+ }
+ switch (transcode_video_dialog->import_option()) {
+ case VTL_IMPORT_TRANSCODED:
+ path = transcode_video_dialog->get_filename();
+ local_file = true;
+ break;
+ case VTL_IMPORT_REFERENCE:
+ break;
+ default:
+ delete transcode_video_dialog;
+ return;
+ }
+ delete transcode_video_dialog;
}
- delete transcode_video_dialog;
- }
break;
default:
case VTL_IMPORT_NONE:
break;
}
- if (path.empty()) {
- /* may have been overriden by 'audio only import'
- * in transcode_video_dialog */
- path = add_video_dialog->file_name(local_file);;
- }
-
/* strip _session->session_directory().video_path() from video file if possible */
if (local_file && !path.compare(0, _session->session_directory().video_path().size(), _session->session_directory().video_path())) {
path=path.substr(_session->session_directory().video_path().size());