From 9301991f6e77f16c6cefe3f0c92fdc02da687f8b Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 3 Apr 2013 22:29:04 +0200 Subject: vtl: video-monitor interaction * Menu > View > Video Monitor -- bi-directional communication with xjadeo for window-state and OSD. * fix saving state on session close (wait for xjadeo to terminate) --- gtk2_ardour/video_timeline.cc | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'gtk2_ardour/video_timeline.cc') diff --git a/gtk2_ardour/video_timeline.cc b/gtk2_ardour/video_timeline.cc index dd47a82970..d68df6bc2f 100644 --- a/gtk2_ardour/video_timeline.cc +++ b/gtk2_ardour/video_timeline.cc @@ -155,8 +155,8 @@ VideoTimeLine::close_session () if (video_duration == 0) { return; } - close_video_monitor(); save_session(); + close_video_monitor(); remove_frames(); video_filename = ""; @@ -581,6 +581,26 @@ VideoTimeLine::gui_update(std::string const & t) { editor->toggle_xjadeo_proc(0); //close_video_monitor(); editor->set_xjadeo_sensitive(false); + } else if (t == "xjadeo-window-ontop-on") { + editor->toggle_xjadeo_viewoption(1, 1); + } else if (t == "xjadeo-window-ontop-off") { + editor->toggle_xjadeo_viewoption(1, 0); + } else if (t == "xjadeo-window-osd-timecode-on") { + editor->toggle_xjadeo_viewoption(2, 1); + } else if (t == "xjadeo-window-osd-timecode-off") { + editor->toggle_xjadeo_viewoption(2, 0); + } else if (t == "xjadeo-window-osd-frame-on") { + editor->toggle_xjadeo_viewoption(3, 1); + } else if (t == "xjadeo-window-osd-frame-off") { + editor->toggle_xjadeo_viewoption(3, 0); + } else if (t == "xjadeo-window-osd-box-on") { + editor->toggle_xjadeo_viewoption(4, 1); + } else if (t == "xjadeo-window-osd-box-off") { + editor->toggle_xjadeo_viewoption(4, 0); + } else if (t == "xjadeo-window-fullscreen-on") { + editor->toggle_xjadeo_viewoption(5, 1); + } else if (t == "xjadeo-window-fullscreen-off") { + editor->toggle_xjadeo_viewoption(5, 0); } } @@ -688,6 +708,7 @@ VideoTimeLine::open_video_monitor() { vmonitor = new VideoMonitor(editor, _xjadeo_bin); vmonitor->set_session(_session); vmonitor->Terminated.connect (sigc::mem_fun (*this, &VideoTimeLine::terminated_video_monitor)); + vmonitor->UiState.connect (*this, invalidator (*this), boost::bind (&VideoTimeLine::gui_update, this, _1), gui_context()); } else if (vmonitor->is_started()) { return; } @@ -723,6 +744,15 @@ VideoTimeLine::close_video_monitor() { } } +void +VideoTimeLine::control_video_monitor(int what, int param) { + if (!vmonitor || !vmonitor->is_started()) { + return; + } + vmonitor->send_cmd(what, param); +} + + void VideoTimeLine::terminated_video_monitor () { if (vmonitor) { -- cgit v1.2.3