vtl: video-monitor letterbox & orig-zoom to menu
This commit is contained in:
parent
ddfc047f0e
commit
1040801ffe
|
@ -447,6 +447,8 @@
|
|||
<menuitem action="toggle-vmon-frame"/>
|
||||
<menuitem action="toggle-vmon-osdbg"/>
|
||||
<menuitem action="toggle-vmon-fullscreen"/>
|
||||
<menuitem action="toggle-vmon-letterbox"/>
|
||||
<menuitem action="zoom-vmon-100"/>
|
||||
#endif
|
||||
</menu>
|
||||
<menu action="ScrollMenu">
|
||||
|
|
|
@ -933,6 +933,8 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||
Glib::RefPtr<Gtk::ToggleAction> xjadeo_frame_action;
|
||||
Glib::RefPtr<Gtk::ToggleAction> xjadeo_osdbg_action;
|
||||
Glib::RefPtr<Gtk::ToggleAction> xjadeo_fullscreen_action;
|
||||
Glib::RefPtr<Gtk::ToggleAction> xjadeo_letterbox_action;
|
||||
Glib::RefPtr<Gtk::Action> xjadeo_zoom_100;
|
||||
void set_xjadeo_proc ();
|
||||
void toggle_xjadeo_proc (int state=-1);
|
||||
void set_xjadeo_sensitive (bool onoff);
|
||||
|
|
|
@ -555,6 +555,8 @@ Editor::register_actions ()
|
|||
xjadeo_frame_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (editor_actions, X_("toggle-vmon-frame"), _("Framenumber"), sigc::bind (sigc::mem_fun (*this, &Editor::set_xjadeo_viewoption), (int) 3)));
|
||||
xjadeo_osdbg_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (editor_actions, X_("toggle-vmon-osdbg"), _("Timecode Background"), sigc::bind (sigc::mem_fun (*this, &Editor::set_xjadeo_viewoption), (int) 4)));
|
||||
xjadeo_fullscreen_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (editor_actions, X_("toggle-vmon-fullscreen"), _("Fullscreen"), sigc::bind (sigc::mem_fun (*this, &Editor::set_xjadeo_viewoption), (int) 5)));
|
||||
xjadeo_letterbox_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (editor_actions, X_("toggle-vmon-letterbox"), _("Letterbox"), sigc::bind (sigc::mem_fun (*this, &Editor::set_xjadeo_viewoption), (int) 6)));
|
||||
xjadeo_zoom_100 = reg_sens (editor_actions, "zoom-vmon-100", _("Original Size"), sigc::bind (sigc::mem_fun (*this, &Editor::set_xjadeo_viewoption), (int) 7));
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -581,6 +583,9 @@ Editor::register_actions ()
|
|||
xjadeo_osdbg_action->set_sensitive (false);
|
||||
xjadeo_fullscreen_action->set_active (false);
|
||||
xjadeo_fullscreen_action->set_sensitive (false);
|
||||
xjadeo_letterbox_action->set_active (false);
|
||||
xjadeo_letterbox_action->set_sensitive (false);
|
||||
xjadeo_zoom_100->set_sensitive (false);
|
||||
#endif
|
||||
if (Profile->get_sae()) {
|
||||
ruler_bbt_action->set_active (true);
|
||||
|
@ -800,6 +805,8 @@ Editor::toggle_xjadeo_proc (int state)
|
|||
xjadeo_frame_action->set_sensitive(onoff);
|
||||
xjadeo_osdbg_action->set_sensitive(onoff);
|
||||
xjadeo_fullscreen_action->set_sensitive(onoff);
|
||||
xjadeo_letterbox_action->set_sensitive(onoff);
|
||||
xjadeo_zoom_100->set_sensitive(onoff);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -832,6 +839,11 @@ Editor::toggle_xjadeo_viewoption (int what, int state)
|
|||
case 5:
|
||||
action = xjadeo_fullscreen_action;
|
||||
break;
|
||||
case 6:
|
||||
action = xjadeo_letterbox_action;
|
||||
break;
|
||||
case 7:
|
||||
return;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
@ -869,6 +881,12 @@ Editor::set_xjadeo_viewoption (int what)
|
|||
case 5:
|
||||
action = xjadeo_fullscreen_action;
|
||||
break;
|
||||
case 6:
|
||||
action = xjadeo_letterbox_action;
|
||||
break;
|
||||
case 7:
|
||||
ARDOUR_UI::instance()->video_timeline->control_video_monitor(what, 0);
|
||||
return;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -118,7 +118,7 @@ VideoMonitor::open (std::string filename)
|
|||
manually_seeked_frame = 0;
|
||||
osdmode = 10; // 1: frameno, 2: timecode, 8: box
|
||||
sync_by_manual_seek = false;
|
||||
starting = 7;
|
||||
starting = 15;
|
||||
process->write_to_stdin("load " + filename + "\n");
|
||||
process->write_to_stdin("set fps -1\n");
|
||||
process->write_to_stdin("window resize 100%\n");
|
||||
|
@ -132,7 +132,7 @@ VideoMonitor::open (std::string filename)
|
|||
process->write_to_stdin(it->first + " " + it->second + "\n");
|
||||
}
|
||||
if (!state_connection.connected()) {
|
||||
starting = 7;
|
||||
starting = 15;
|
||||
querystate();
|
||||
state_clk_divide = 0;
|
||||
/* TODO once every two second or so -- state_clk_divide hack below */
|
||||
|
@ -197,6 +197,13 @@ VideoMonitor::send_cmd (int what, int param)
|
|||
if (param) process->write_to_stdin("window zoom on\n");
|
||||
else process->write_to_stdin("window zoom off\n");
|
||||
break;
|
||||
case 6:
|
||||
if (param) process->write_to_stdin("window letterbox on\n");
|
||||
else process->write_to_stdin("window letterbox off\n");
|
||||
break;
|
||||
case 7:
|
||||
process->write_to_stdin("window resize 100%");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -280,6 +287,11 @@ VideoMonitor::parse_output (std::string d, size_t s)
|
|||
}
|
||||
xjadeo_settings["window zoom"] = value;
|
||||
} else if(key == "letterbox") {
|
||||
if (starting || xjadeo_settings["window letterbox"] != value) {
|
||||
starting &= ~8;
|
||||
if (atoi(value.c_str())) { UiState("xjadeo-window-letterbox-on"); }
|
||||
else { UiState("xjadeo-window-letterbox-off"); }
|
||||
}
|
||||
xjadeo_settings["window letterbox"] = value;
|
||||
} else if(key == "osdmode") {
|
||||
if (starting || xjadeo_settings["osd mode"] != value) {
|
||||
|
|
|
@ -601,6 +601,10 @@ VideoTimeLine::gui_update(std::string const & t) {
|
|||
editor->toggle_xjadeo_viewoption(5, 1);
|
||||
} else if (t == "xjadeo-window-fullscreen-off") {
|
||||
editor->toggle_xjadeo_viewoption(5, 0);
|
||||
} else if (t == "xjadeo-window-letterbox-on") {
|
||||
editor->toggle_xjadeo_viewoption(6, 1);
|
||||
} else if (t == "xjadeo-window-letterbox-off") {
|
||||
editor->toggle_xjadeo_viewoption(6, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue