From 37b108959c9ae855a4c9e64d7ef96a63c7dc9a05 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 2 Apr 2013 16:37:28 +0200 Subject: [PATCH 1/4] vtl: update export information --- gtk2_ardour/export_video_infobox.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/export_video_infobox.cc b/gtk2_ardour/export_video_infobox.cc index d12ceb7ed8..ab2363838e 100644 --- a/gtk2_ardour/export_video_infobox.cc +++ b/gtk2_ardour/export_video_infobox.cc @@ -30,7 +30,7 @@ using namespace ARDOUR; ExportVideoInfobox::ExportVideoInfobox (Session* s) : ArdourDialog (_("Video Export Info")) - , showagain_checkbox (_("Don't show this dialog again. (Reset in Edit->Preferences).")) + , showagain_checkbox (_("Do Not Show This Dialog Again (Reset in Edit > Preferences > Video).")) { set_session (s); @@ -46,7 +46,7 @@ ExportVideoInfobox::ExportVideoInfobox (Session* s) l = manage (new Label (_("Video Export Info"), Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false)); l->set_use_markup (); vbox->pack_start (*l, false, true); - l = manage (new Label (_("The video export is not recommended for mastering!\nThe video input file defaults to that listed from the video timeline, which may not the the best quality to start with. While 'ffmpeg' can produce high-quality files, this export lacks the possibility to tweak many settings. We recommend to use 'winff', 'devede' or 'dvdauthor' to mux & master. Nevertheless this video-export may come in handy to do quick snapshots, intermediates or online videos.\n\nThe file-format is determined by the extension you choose for the output file (.avi, .mov, .flv, .ogv; run 'ffmpeg -formats' for a full list of supported formats)\nNote: not all combinations do work, i.e., flv files require samplerates of 22.1kHz or 44.1kHz, mpeg containers can not be used with ac3 audio-codec, etc. If in doubt, use one of the presets."), Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false)); + l = manage (new Label (_("Ardour video export is not recommended for mastering!\nWhile 'ffmpeg' (which is used by ardour) can produce high-quality files, this export lacks the possibility to tweak many settings. We recommend to use 'winff', 'devede' or 'dvdauthor' to mux & master. Nevertheless this video-export comes in handy to do quick snapshots, intermediates, dailies or online videos.\n\nThe soundtrack is created from the master-bus of the current Ardour session.\n\nThe video soure defaults to the file used in the video timeline, which may not the best quality to start with, you should the original video file.\n\nIf the export-range is longer than the original video, black video frames are prefixed and/or appended. This process may fail with non-standard pixel-aspect-ratios.\n\nThe file-format is determined by the extension that you choose for the output file (.avi, .mov, .flv, .ogv,...)\nNote: not all combinations of format+codec+settings produce files which are according so spec. e.g. flv files require sample-rates of 22.1kHz or 44.1kHz, mpeg containers can not be used with ac3 audio-codec, etc. If in doubt, use one of the built-in presets."), Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false)); l->set_size_request(700,-1); l->set_line_wrap(); vbox->pack_start (*l, false, true,4); From 5a4d0fff019f1f024ffc22f661ea93b2fe989aa1 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 2 Apr 2013 17:57:09 +0200 Subject: [PATCH 2/4] vtl: remove xjadeo option dialog xjadeo options (selective session restore) are only useful for testing and debugging. --- gtk2_ardour/open_video_monitor_dialog.cc | 196 --------------------- gtk2_ardour/open_video_monitor_dialog.h | 80 --------- gtk2_ardour/rc_option_editor.cc | 22 +-- gtk2_ardour/video_timeline.cc | 52 +----- gtk2_ardour/video_timeline.h | 4 +- gtk2_ardour/wscript | 1 - libs/ardour/ardour/rc_configuration_vars.h | 1 - 7 files changed, 8 insertions(+), 348 deletions(-) delete mode 100644 gtk2_ardour/open_video_monitor_dialog.cc delete mode 100644 gtk2_ardour/open_video_monitor_dialog.h diff --git a/gtk2_ardour/open_video_monitor_dialog.cc b/gtk2_ardour/open_video_monitor_dialog.cc deleted file mode 100644 index 3d4091ff8b..0000000000 --- a/gtk2_ardour/open_video_monitor_dialog.cc +++ /dev/null @@ -1,196 +0,0 @@ -/* - Copyright (C) 2010 Paul Davis - Author: Robin Gareus - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ -#ifdef WITH_VIDEOTIMELINE - -#include -#include - -#include - -#include "pbd/file_utils.h" -#include "pbd/error.h" -#include "pbd/convert.h" -#include "gtkmm2ext/utils.h" -#include "ardour/profile.h" -#include "ardour/template_utils.h" -#include "ardour/session.h" -#include "ardour_ui.h" - -#include "utils.h" -#include "add_video_dialog.h" -#include "video_monitor.h" -#include "i18n.h" - -using namespace Gtk; -using namespace std; -using namespace PBD; -using namespace ARDOUR; - -OpenVideoMonitorDialog::OpenVideoMonitorDialog (Session* s) - : ArdourDialog (_("Open Video Monitor")) - , filename_label () - , showagain_checkbox (_("Don't show this dialog again. (Reset in Edit->Preferences).")) - , win_checkbox (_("Restore last window size and position.")) - , att_checkbox (_("Restore Window Attributes (fullscreen, on-top).")) - , osd_checkbox (_("Restore On-Screen-Display settings.")) - , off_checkbox (_("Restore Time Offset.")) - , label_winsize () - , label_winpos () - , label_letterbox () - , label_ontop () - , label_fullscreen () - , label_osd () - , label_offset () -#if 1 - , debug_checkbox (_("Enable Debug Mode: Dump Communication to stdout.")) -#endif -{ - set_session (s); - - set_name ("OpenVideoMonitorDialog"); - set_position (Gtk::WIN_POS_MOUSE); - set_modal (true); - set_skip_taskbar_hint (true); - set_resizable (false); - - Gtk::Label* l; - VBox* vbox = manage (new VBox); - VBox* options_box = manage (new VBox); - - l = manage (new Label (_("Video Monitor Window"), Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false)); - l->set_use_markup (); - vbox->pack_start (*l, false, true); - l = manage (new Label (_("The video monitor state can restored to the last known settings for this session. To modify the settings, interact with the monitor itself: Move its window or focus it and use keyboard shortcuts (or the OSX menu bar). Consult the xjadeo documentation for available keyboard shortcuts."), Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false)); - l->set_size_request(550,-1); - l->set_line_wrap(); - vbox->pack_start (*l, false, true,4); - - l = manage (new Label (_("Open Video file:"), Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false)); - l->set_use_markup (); - vbox->pack_start (*l, false, true, 4); - vbox->pack_start (filename_label, false, false); - - l = manage (new Label (_("Session Options"), Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false)); - l->set_use_markup (); - options_box->pack_start (*l, false, true, 4); - - options_box->pack_start (win_checkbox, false, true, 2); - options_box->pack_start (label_winpos, false, false, 2); - options_box->pack_start (label_winsize, false, false, 2); - options_box->pack_start (label_letterbox, false, false, 2); - - options_box->pack_start (att_checkbox, false, true, 2); - options_box->pack_start (label_fullscreen, false, false, 2); - options_box->pack_start (label_ontop, false, false, 2); - - options_box->pack_start (osd_checkbox, false, true, 2); - options_box->pack_start (label_osd, false, false, 2); - - options_box->pack_start (off_checkbox, false, true, 2); - options_box->pack_start (label_offset, false, false, 2); - - options_box->pack_start (*(manage (new HSeparator())), true, true, 2); - options_box->pack_start (showagain_checkbox, false, true, 2); - -#if 1 - options_box->pack_start (debug_checkbox, false, true, 2); - debug_checkbox.set_active(false); -#endif - - vbox->pack_start (*options_box, false, true); - - get_vbox()->set_spacing (4); - get_vbox()->pack_start (*vbox, false, false); - - showagain_checkbox.set_active(false); - show_all_children (); - add_button (Stock::CANCEL, RESPONSE_CANCEL); - add_button (Stock::OPEN, RESPONSE_ACCEPT); -} - -OpenVideoMonitorDialog::~OpenVideoMonitorDialog () -{ -} - -void -OpenVideoMonitorDialog::on_show () -{ - label_offset.set_text(string_compose(_("Offset: %1 Video frame(s)"), "-")); - label_osd.set_text(string_compose(_("On-Screen-Display: %1"), "-")); - label_letterbox.set_text(string_compose(_("Letterbox: %1"), "-")); - label_winsize.set_text(string_compose(_("Size: %1"), "-")); - label_winpos.set_text(string_compose(_("Position: %1"), "-")); - label_fullscreen.set_text(string_compose(_("Fullscreen: %1"), "-")); - label_ontop.set_text(string_compose(_("Window on Top: %1"), "-")); - -#define L_YESNO(v) (atoi(v)?_("Yes"):_("No")) -#define L_OSDMODE(i) ( std::string((i)? "":_("(Off)")) \ - +std::string((i&1)?_("Frame Number "):"") \ - +std::string((i&2)?_("SMPTE "):"") \ - +std::string((i&4)?_("Text "):"") \ - +std::string((i&8)?_("Box "):"") ) - - XMLNode* node = _session->extra_xml (X_("XJSettings")); - if (node) { - XMLNodeList nlist = node->children(); - XMLNodeConstIterator niter; - for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - std::string k = (*niter)->property(X_("k"))->value(); - std::string v = (*niter)->property(X_("v"))->value(); - if (k == "osd mode") { label_osd.set_text(string_compose(_("On-Screen-Display: %1"), L_OSDMODE(atoi(v)))); } - if (k == "window letterbox") { label_letterbox.set_text(string_compose(_("Letterbox: %1"), L_YESNO(v))); } - if (k == "window xy") { label_winpos.set_text(string_compose(_("Position: %1"), v)); } - if (k == "window ontop") { label_ontop.set_text(string_compose(_("Window On Top: %1"), L_YESNO(v))); } - if (k == "window zoom") { label_fullscreen.set_text(string_compose(_("Fullscreen: %1"), L_YESNO(v))); } - if (k == "window size") { label_winsize.set_text(string_compose(_("Size: %1"), v)); } - if (k == "set offset") { label_offset.set_text(string_compose(_("Offset: %1 video-frame(s)"), v)); } - } - } - - Dialog::on_show (); -} - -int -OpenVideoMonitorDialog::xj_settings_mask () -{ - int rv =0; - if (!win_checkbox.get_active()) { rv |= XJ_WINDOW_SIZE | XJ_WINDOW_POS | XJ_LETTERBOX; } - if (!att_checkbox.get_active()) { rv |= XJ_WINDOW_ONTOP | XJ_FULLSCREEN; } - if (!osd_checkbox.get_active()) { rv |= XJ_OSD; } - if (!off_checkbox.get_active()) { rv |= XJ_OFFSET; } - return rv; -} - -void -OpenVideoMonitorDialog::set_filename (const std::string fn) -{ - filename_label.set_text(fn); -} - -void -OpenVideoMonitorDialog::setup_settings_mask (const int f) -{ - win_checkbox.set_active((f&XJ_WINDOW_SIZE) == 0); - att_checkbox.set_active((f&XJ_WINDOW_ONTOP) == 0); - osd_checkbox.set_active((f&XJ_OSD) == 0); - off_checkbox.set_active((f&XJ_OFFSET) == 0); -} - -#endif /* WITH_VIDEOTIMELINE */ diff --git a/gtk2_ardour/open_video_monitor_dialog.h b/gtk2_ardour/open_video_monitor_dialog.h deleted file mode 100644 index 9b79352f40..0000000000 --- a/gtk2_ardour/open_video_monitor_dialog.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - Copyright (C) 2010 Paul Davis - Author: Robin Gareus - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ -#ifdef WITH_VIDEOTIMELINE - -#ifndef __gtk_ardour_open_video_monitor_dialog_h__ -#define __gtk_ardour_open_video_monitor_dialog_h__ - -#include - -#include - -#include "ardour/types.h" -#include "ardour/template_utils.h" -#include "ardour_dialog.h" - -/** @class OpenVideoMonitorDialog - * @brief video-monitor start-option dialog - * - * This dialog allows to override xjadeo startup-options - * eg. restore previous size&position, offset or letterbox - * settings. - * - * This dialog is optional and can be en/disabled in the - * Preferences. - */ -class OpenVideoMonitorDialog : public ArdourDialog -{ - public: - OpenVideoMonitorDialog (ARDOUR::Session*); - ~OpenVideoMonitorDialog (); - - bool show_again () { return showagain_checkbox.get_active(); } - int xj_settings_mask (); - void setup_settings_mask (const int); - void set_filename (const std::string); -#if 1 - bool enable_debug () { return debug_checkbox.get_active(); } -#endif - - private: - void on_show (); - Gtk::Label filename_label; - Gtk::CheckButton showagain_checkbox; - Gtk::CheckButton win_checkbox; - Gtk::CheckButton att_checkbox; - Gtk::CheckButton osd_checkbox; - Gtk::CheckButton off_checkbox; - - Gtk::Label label_winsize; - Gtk::Label label_winpos; - Gtk::Label label_letterbox; - Gtk::Label label_ontop; - Gtk::Label label_fullscreen; - Gtk::Label label_osd; - Gtk::Label label_offset; -#if 1 - Gtk::CheckButton debug_checkbox; -#endif -}; - -#endif /* __gtk_ardour_open_video_monitor_dialog_h__ */ - -#endif /* WITH_VIDEOTIMELINE */ diff --git a/gtk2_ardour/rc_option_editor.cc b/gtk2_ardour/rc_option_editor.cc index 4a115b0f31..2a79772bb9 100644 --- a/gtk2_ardour/rc_option_editor.cc +++ b/gtk2_ardour/rc_option_editor.cc @@ -815,12 +815,11 @@ class VideoTimelineOptions : public OptionEditorBox public: VideoTimelineOptions (RCConfiguration* c) : _rc_config (c) - , _show_xjadeo_setup_button (_("Show Video Monitor Option Dialog")) , _show_video_export_info_button (_("Show Video Export Info before export")) , _show_video_server_dialog_button (_("Show Video Server Startup Dialog")) , _video_advanced_setup_button (_("Advanced Setup (remote video server)")) { - Table* t = manage (new Table (2, 7)); + Table* t = manage (new Table (2, 6)); t->set_spacings (4); t->attach (_video_advanced_setup_button, 0, 2, 0, 1); @@ -844,17 +843,12 @@ public: /* small vspace y=3..4 */ - t->attach (_show_xjadeo_setup_button, 0, 2, 4, 5); - _show_xjadeo_setup_button.signal_toggled().connect (sigc::mem_fun (*this, &VideoTimelineOptions::show_xjadeo_setup_toggled)); - Gtkmm2ext::UI::instance()->set_tip (_show_xjadeo_setup_button, - _("When enabled an option dialog is presented before opening the video monitor")); - - t->attach (_show_video_export_info_button, 0, 2, 5, 6); + t->attach (_show_video_export_info_button, 0, 2, 4, 5); _show_video_export_info_button.signal_toggled().connect (sigc::mem_fun (*this, &VideoTimelineOptions::show_video_export_info_toggled)); Gtkmm2ext::UI::instance()->set_tip (_show_video_export_info_button, _("When enabled an information window with details is displayed before the video-export dialog.")); - t->attach (_show_video_server_dialog_button, 0, 2, 6, 7); + t->attach (_show_video_server_dialog_button, 0, 2, 5, 6); _show_video_server_dialog_button.signal_toggled().connect (sigc::mem_fun (*this, &VideoTimelineOptions::show_video_server_dialog_toggled)); Gtkmm2ext::UI::instance()->set_tip (_show_video_server_dialog_button, _("When enabled the video server is never launched automatically without confirmation")); @@ -877,12 +871,6 @@ public: _rc_config->set_video_server_docroot (_video_server_docroot_entry.get_text()); } - void show_xjadeo_setup_toggled () - { - bool const x = _show_xjadeo_setup_button.get_active (); - _rc_config->set_video_monitor_setup_dialog (x); - } - void show_video_export_info_toggled () { bool const x = _show_video_export_info_button.get_active (); @@ -907,9 +895,6 @@ public: _video_server_url_entry.set_text (_rc_config->get_video_server_url()); } else if (p == "video-server-docroot") { _video_server_docroot_entry.set_text (_rc_config->get_video_server_docroot()); - } else if (p == "video-monitor-setup-dialog") { - bool const x = _rc_config->get_video_monitor_setup_dialog(); - _show_xjadeo_setup_button.set_active (x); } else if (p == "show-video-export-info") { bool const x = _rc_config->get_show_video_export_info(); _show_video_export_info_button.set_active (x); @@ -938,7 +923,6 @@ private: RCConfiguration* _rc_config; Entry _video_server_url_entry; Entry _video_server_docroot_entry; - CheckButton _show_xjadeo_setup_button; CheckButton _show_video_export_info_button; CheckButton _show_video_server_dialog_button; CheckButton _video_advanced_setup_button; diff --git a/gtk2_ardour/video_timeline.cc b/gtk2_ardour/video_timeline.cc index 24d8f8ebcc..c77b345fec 100644 --- a/gtk2_ardour/video_timeline.cc +++ b/gtk2_ardour/video_timeline.cc @@ -59,7 +59,6 @@ VideoTimeLine::VideoTimeLine (PublicEditor *ed, ArdourCanvas::Group *vbg, int in auto_set_session_fps = false; video_offset_lock = false; video_aspect_ratio = 4.0/3.0; - open_video_monitor_dialog = 0; Config->ParameterChanged.connect (*this, invalidator (*this), ui_bind (&VideoTimeLine::parameter_changed, this, _1), gui_context()); video_server_url = video_get_server_url(Config); server_docroot = video_get_docroot(Config); @@ -163,10 +162,6 @@ VideoTimeLine::close_session () video_filename = ""; video_duration = 0; GuiUpdate("set-xjadeo-sensitive-off"); - if (open_video_monitor_dialog) { - delete open_video_monitor_dialog; - } - open_video_monitor_dialog = 0; } /** load settings from session */ @@ -220,16 +215,11 @@ VideoTimeLine::set_session (ARDOUR::Session *s) video_file_info(propf->value(), local_file); } - if (open_video_monitor_dialog) { - delete open_video_monitor_dialog; - } - open_video_monitor_dialog = 0; - node = _session->extra_xml (X_("Videomonitor")); if (node) { const XMLProperty* prop = node->property (X_("active")); if (prop && prop->value() == "yes" && found_xjadeo() && !video_filename.empty() && local_file) { - open_video_monitor(false); + open_video_monitor(); } } @@ -697,7 +687,7 @@ VideoTimeLine::find_xjadeo () { } void -VideoTimeLine::open_video_monitor(bool interactive) { +VideoTimeLine::open_video_monitor() { if (!found_xjadeo()) return; if (!vmonitor) { vmonitor = new VideoMonitor(editor, _xjadeo_bin); @@ -719,41 +709,7 @@ VideoTimeLine::open_video_monitor(bool interactive) { } } - if (interactive && Config->get_video_monitor_setup_dialog()) { - if (open_video_monitor_dialog == 0) { - open_video_monitor_dialog = new OpenVideoMonitorDialog(_session); - } - if (open_video_monitor_dialog->is_visible()) { - return; - } - open_video_monitor_dialog->setup_settings_mask(xj_settings_mask); - open_video_monitor_dialog->set_filename(video_filename); - Gtk::ResponseType r = (Gtk::ResponseType) open_video_monitor_dialog->run (); - open_video_monitor_dialog->hide(); - if (r != Gtk::RESPONSE_ACCEPT) { - GuiUpdate("set-xjadeo-active-off"); - return; - } - - if (_session && (xj_settings_mask != open_video_monitor_dialog->xj_settings_mask()) ) { - /* save mask to Session */ - XMLNode* node = new XMLNode(X_("XJRestoreSettings")); - node->add_property (X_("mask"), (const long) open_video_monitor_dialog->xj_settings_mask() ); - _session->add_extra_xml (*node); - _session->set_dirty (); - } - - if (open_video_monitor_dialog->show_again()) { - Config->set_video_monitor_setup_dialog(false); - } -#if 1 - vmonitor->set_debug(open_video_monitor_dialog->enable_debug()); -#endif - vmonitor->restore_settings_mask(open_video_monitor_dialog->xj_settings_mask()); - } else { - vmonitor->restore_settings_mask(xj_settings_mask); - } - + vmonitor->restore_settings_mask(xj_settings_mask); if (!vmonitor->start()) { warning << "launching xjadeo failed.." << endmsg; @@ -781,7 +737,7 @@ VideoTimeLine::terminated_video_monitor () { vmonitor=0; if (reopen_vmonitor) { reopen_vmonitor=false; - open_video_monitor(false); + open_video_monitor(); } } diff --git a/gtk2_ardour/video_timeline.h b/gtk2_ardour/video_timeline.h index d352af9faf..ef889af452 100644 --- a/gtk2_ardour/video_timeline.h +++ b/gtk2_ardour/video_timeline.h @@ -29,7 +29,6 @@ #include "ardour/session.h" #include "ardour/session_handle.h" #include "video_image_frame.h" -#include "open_video_monitor_dialog.h" #include "video_monitor.h" #include "pbd/signals.h" #include "canvas.h" @@ -77,7 +76,7 @@ class VideoTimeLine : public sigc::trackable, public ARDOUR::SessionHandlePtr, p void toggle_offset_locked () { video_offset_lock = !video_offset_lock; } bool is_offset_locked () { return video_offset_lock; } - void open_video_monitor (bool interactive=true); + void open_video_monitor (); void close_video_monitor (); void terminated_video_monitor (); void manual_seek_video_monitor (framepos_t pos); @@ -132,7 +131,6 @@ class VideoTimeLine : public sigc::trackable, public ARDOUR::SessionHandlePtr, p std::string translated_filename (); VideoMonitor *vmonitor; - OpenVideoMonitorDialog *open_video_monitor_dialog; bool reopen_vmonitor; PBD::Signal0 VtlUpdate; diff --git a/gtk2_ardour/wscript b/gtk2_ardour/wscript index 605266b0a2..d8dcf6d21f 100644 --- a/gtk2_ardour/wscript +++ b/gtk2_ardour/wscript @@ -427,7 +427,6 @@ def build(bld): 'video_timeline.cc', 'system_exec.cc', 'video_monitor.cc', - 'open_video_monitor_dialog.cc', 'transcode_ffmpeg.cc', 'transcode_video_dialog.cc', 'video_server_dialog.cc', diff --git a/libs/ardour/ardour/rc_configuration_vars.h b/libs/ardour/ardour/rc_configuration_vars.h index ae616d3008..f1a7e9c428 100644 --- a/libs/ardour/ardour/rc_configuration_vars.h +++ b/libs/ardour/ardour/rc_configuration_vars.h @@ -220,7 +220,6 @@ CONFIG_VARIABLE (std::string, donate_url, "donate-url", "http://ardour.org/donat CONFIG_VARIABLE (bool, video_advanced_setup, "video-advanced-setup", false) CONFIG_VARIABLE (std::string, video_server_url, "video-server-url", "http://localhost:1554") CONFIG_VARIABLE (std::string, video_server_docroot, "video-server-docroot", "/") -CONFIG_VARIABLE (bool, video_monitor_setup_dialog, "video-monitor-setup-dialog", false) CONFIG_VARIABLE (bool, show_video_export_info, "show-video-export-info", true) CONFIG_VARIABLE (bool, show_video_server_dialog, "show-video-server-dialog", false) #endif From 467b13722245633b7ccc5964ffe319187525fd2b Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 2 Apr 2013 18:02:41 +0200 Subject: [PATCH 3/4] vtl: remove video-maintenance menu * only really relevant for testing/debugging. * the back-end functions are still used for 'normal' operation and called implicitly when opening/closing a video. * call stop_video_server() when removing a video. --- gtk2_ardour/ardour.menus.in | 5 ----- gtk2_ardour/ardour_ui.cc | 1 + gtk2_ardour/ardour_ui_ed.cc | 11 ----------- 3 files changed, 1 insertion(+), 16 deletions(-) diff --git a/gtk2_ardour/ardour.menus.in b/gtk2_ardour/ardour.menus.in index 0451146b2a..608f4dd6e4 100644 --- a/gtk2_ardour/ardour.menus.in +++ b/gtk2_ardour/ardour.menus.in @@ -37,11 +37,6 @@ #ifdef WITH_VIDEOTIMELINE - - - - - #endif diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index f21817c29d..12b15c688a 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -3562,6 +3562,7 @@ ARDOUR_UI::remove_video () _session->add_extra_xml(*node); node = new XMLNode(X_("Videomonitor")); _session->add_extra_xml(*node); + stop_video_server(); } void diff --git a/gtk2_ardour/ardour_ui_ed.cc b/gtk2_ardour/ardour_ui_ed.cc index 5d6b230796..3685233efa 100644 --- a/gtk2_ardour/ardour_ui_ed.cc +++ b/gtk2_ardour/ardour_ui_ed.cc @@ -142,17 +142,6 @@ ARDOUR_UI::install_actions () act = ActionManager::register_action (main_actions, X_("ExportVideo"), _("Export To Video File"), sigc::mem_fun (*editor, &PublicEditor::export_video)); ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (main_actions, X_("Video"), _("Video maintenance")); - ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (main_actions, X_("StartVideoServer"), _("Start Video Server"), - sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::start_video_server_menu), (Gtk::Window*) 0)); - ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (main_actions, X_("StopVideoServer"), _("Stop Video Server"), - sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::stop_video_server), true )); - ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (main_actions, X_("VideoTimelineFlushCache"), _("Reload video-files"), - sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::flush_videotimeline_cache), false)); - ActionManager::session_sensitive_actions.push_back (act); #endif #ifdef WITH_CMT From e06ff1cf295f72ee2e33ac8af2b4ec3d59e652aa Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 2 Apr 2013 18:06:02 +0200 Subject: [PATCH 4/4] vtl: update session start/end only when adding (or dragging) the video --- gtk2_ardour/ardour_ui.cc | 5 +++++ gtk2_ardour/video_timeline.cc | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 12b15c688a..931ceadd21 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -3541,6 +3541,11 @@ ARDOUR_UI::add_video (Gtk::Window* float_window) _session->add_extra_xml (*node); _session->set_dirty (); + _session->maybe_update_session_range( + std::max(video_timeline->get_offset(), (ARDOUR::frameoffset_t) 0), + std::max(video_timeline->get_offset() + video_timeline->get_duration(), (ARDOUR::frameoffset_t) 0)); + + if (add_video_dialog->launch_xjadeo() && local_file) { editor->set_xjadeo_sensitive(true); editor->toggle_xjadeo_proc(1); diff --git a/gtk2_ardour/video_timeline.cc b/gtk2_ardour/video_timeline.cc index c77b345fec..dd47a82970 100644 --- a/gtk2_ardour/video_timeline.cc +++ b/gtk2_ardour/video_timeline.cc @@ -523,11 +523,6 @@ VideoTimeLine::video_file_info (std::string filename, bool local) } flush_local_cache (); - _session->maybe_update_session_range( - std::max(get_offset(), (ARDOUR::frameoffset_t) 0), - std::max(get_offset() + get_duration(), (ARDOUR::frameoffset_t) 0) - ); - if (found_xjadeo() && local_file) { GuiUpdate("set-xjadeo-sensitive-on"); if (vmonitor && vmonitor->is_started()) {