diff options
author | Robin Gareus <robin@gareus.org> | 2013-04-03 22:29:04 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2013-04-03 22:29:37 +0200 |
commit | 9301991f6e77f16c6cefe3f0c92fdc02da687f8b (patch) | |
tree | 252be11fb42f898a9833585a21911a82e7b6cc9c /gtk2_ardour/video_timeline.cc | |
parent | 399aee309d4e81d73be463cc0890906acfdc09d9 (diff) |
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)
Diffstat (limited to 'gtk2_ardour/video_timeline.cc')
-rw-r--r-- | gtk2_ardour/video_timeline.cc | 32 |
1 files changed, 31 insertions, 1 deletions
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; } @@ -724,6 +745,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) { delete vmonitor; |