replace ::cast_dynamic() with relevant ActionManager::get_*_action() calls
[ardour.git] / gtk2_ardour / editor_videotimeline.cc
index 458393708a8476588c07e6db312fbef9fc796d43..b5184539fc92b090ca5eadf63be8d3647beb4724 100644 (file)
@@ -18,7 +18,7 @@
 
 */
 
-#include <jack/types.h>
+#include "pbd/gstdio_compat.h"
 
 #include "ardour/profile.h"
 #include "ardour/rc_configuration.h"
 #include "audio_time_axis.h"
 #include "video_image_frame.h"
 #include "export_video_dialog.h"
-#include "export_video_infobox.h"
 #include "interthread_progress_window.h"
 
 #include "pbd/openuri.h"
-#include "i18n.h"
+#include "pbd/i18n.h"
 
 using namespace std;
 
@@ -54,6 +53,9 @@ Editor::set_video_timeline_height (const int h)
 void
 Editor::update_video_timeline (bool flush)
 {
+       // catch GUIIdle -> Editor::idle_visual_changer during quit/close
+       assert (ARDOUR_UI::instance()->video_timeline);
+
        if (flush) {
                ARDOUR_UI::instance()->video_timeline->flush_local_cache();
        }
@@ -80,7 +82,7 @@ Editor::toggle_video_timeline_locked ()
 }
 
 void
-Editor::embed_audio_from_video (std::string path, framepos_t n, bool lock_position_to_video)
+Editor::embed_audio_from_video (std::string path, samplepos_t n, bool lock_position_to_video)
 {
        vector<std::string> paths;
        paths.push_back(path);
@@ -103,28 +105,5 @@ Editor::embed_audio_from_video (std::string path, framepos_t n, bool lock_positi
        }
 
        import_status.all_done = true;
-       unlink(path.c_str());
-}
-
-void
-Editor::export_video (bool range)
-{
-       if (ARDOUR::Config->get_show_video_export_info()) {
-               ExportVideoInfobox infobox (_session);
-               Gtk::ResponseType rv = (Gtk::ResponseType) infobox.run();
-               if (infobox.show_again()) {
-                       ARDOUR::Config->set_show_video_export_info(false);
-               }
-               switch (rv) {
-                       case GTK_RESPONSE_YES:
-                               PBD::open_uri (ARDOUR::Config->get_reference_manual_url() + "/video-timeline/operations/#export");
-                               break;
-                       default:
-                               break;
-               }
-       }
-       ExportVideoDialog dialog (_session, get_selection().time, range);
-       Gtk::ResponseType r = (Gtk::ResponseType) dialog.run();
-       (void) r; // keep gcc quiet
-       dialog.hide();
+       ::g_unlink(path.c_str());
 }