From daec8e44d52116d8841cf08954b930142c8dc495 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 29 Mar 2013 12:20:09 +0100 Subject: vtl: rework import workflow - do not allow to simply copy the video file - decision to transcode or just reference is made in "transcode dialog" not during file-selection. Only there the actual codec is known and can be judged to be suitable for direct reference - simplify "transcode dialog" - no more buttons for specific actions, drop-down select actions. - increase minimum bitrate for imported file to 500kbit/s --- gtk2_ardour/ardour_ui.cc | 54 +++++++++++++++++++++--------------------------- 1 file changed, 24 insertions(+), 30 deletions(-) (limited to 'gtk2_ardour/ardour_ui.cc') 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()); -- cgit v1.2.3