sigc::mem_fun (*this, &ARDOUR_UI::remove_video));
act->set_sensitive (false);
act = ActionManager::register_action (main_actions, X_("ExportVideo"), _("Export To Video File"),
- sigc::mem_fun (*editor, &PublicEditor::export_video));
+ hide_return (sigc::bind (sigc::mem_fun(*editor, &PublicEditor::export_video), false)));
ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_action (main_actions, X_("Snapshot"), _("Snapshot..."), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::snapshot_session), false));
edit_items.push_back (MenuElem (_("Bounce Range to Region List"), sigc::bind (sigc::mem_fun(*this, &Editor::bounce_range_selection), false, false)));
edit_items.push_back (MenuElem (_("Bounce Range to Region List With Processing"), sigc::bind (sigc::mem_fun(*this, &Editor::bounce_range_selection), false, true)));
edit_items.push_back (MenuElem (_("Export Range..."), sigc::mem_fun(*this, &Editor::export_selection)));
+ if (ARDOUR_UI::instance()->video_timeline->get_duration() > 0) {
+ edit_items.push_back (MenuElem (_("Export Video Range..."), sigc::bind (sigc::mem_fun(*this, &Editor::export_video), true)));
+ }
}
void toggle_ruler_video (bool onoff) {ruler_video_action->set_active(onoff);}
int videotl_bar_height; /* in units of timebar_height; default: 4 */
int get_videotl_bar_height () const { return videotl_bar_height; }
- void export_video ();
+ void export_video (bool range = false);
void toggle_region_video_lock ();
Gtk::VBox time_button_vbox;
}
void
-Editor::export_video ()
+Editor::export_video (bool range)
{
if (ARDOUR::Config->get_show_video_export_info()) {
ExportVideoInfobox infobox (_session);
break;
}
}
- ExportVideoDialog dialog (_session, get_selection().time);
+ ExportVideoDialog dialog (_session, get_selection().time, range);
Gtk::ResponseType r = (Gtk::ResponseType) dialog.run();
dialog.hide();
#if 0
using namespace ARDOUR;
using namespace VideoUtils;
-ExportVideoDialog::ExportVideoDialog (Session* s, TimeSelection &tme)
+ExportVideoDialog::ExportVideoDialog (Session* s, TimeSelection &tme, bool range)
: ArdourDialog (_("Export Video File "))
, export_range (tme)
, outfn_path_label (_("File:"), Gtk::ALIGN_LEFT)
if (!export_range.empty()) {
insnd_combo.append_text (_("Selected range")); // TODO show export_range.start() -> export_range.end_frame()
}
- insnd_combo.set_active(0);
+ if (range) {
+ insnd_combo.set_active(2);
+ } else {
+ insnd_combo.set_active(0);
+ }
outfn_path_entry.set_width_chars(38);
outfn_path_entry.set_text (_session->session_directory().export_path() + G_DIR_SEPARATOR +"export.avi");
class ExportVideoDialog : public ArdourDialog , public PBD::ScopedConnectionList
{
public:
- ExportVideoDialog (ARDOUR::Session*, TimeSelection &tme);
+ ExportVideoDialog (ARDOUR::Session*, TimeSelection &tme, bool range = false);
~ExportVideoDialog ();
std::string get_exported_filename () { return outfn_path_entry.get_text(); }
virtual int get_videotl_bar_height () const = 0;
virtual void set_video_timeline_height (const int h) = 0;
virtual void embed_audio_from_video (std::string, framepos_t n = 0) = 0;
- virtual void export_video () = 0;
+ virtual void export_video (bool range = false) = 0;
virtual RouteTimeAxisView* get_route_view_by_route_id (const PBD::ID& id) const = 0;