X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fvideo_monitor.cc;h=a23e2b251604568df7bcf3e25390c20cd0ad4d01;hb=d9dc2592d02924718d9f181dbbca423a5eac364f;hp=4f05ef84714d6395e31df1208306362026d50aa4;hpb=dfbc9da79aef9cc05808d29a20c6d12c5d553a80;p=ardour.git diff --git a/gtk2_ardour/video_monitor.cc b/gtk2_ardour/video_monitor.cc index 4f05ef8471..a23e2b2516 100644 --- a/gtk2_ardour/video_monitor.cc +++ b/gtk2_ardour/video_monitor.cc @@ -20,7 +20,7 @@ #include "pbd/file_utils.h" #include "pbd/convert.h" #include "gui_thread.h" -#include "ardour_ui.h" +#include "timers.h" #include "utils.h" #include @@ -28,7 +28,7 @@ #include "editor.h" #include "video_monitor.h" -#include "i18n.h" +#include "pbd/i18n.h" using namespace std; using namespace PBD; @@ -159,10 +159,10 @@ VideoMonitor::open (std::string filename) querystate(); state_clk_divide = 0; /* TODO once every two second or so -- state_clk_divide hack below */ - state_connection = ARDOUR_UI::RapidScreenUpdate.connect (sigc::mem_fun (*this, &VideoMonitor::querystate)); + state_connection = Timers::rapid_connect (sigc::mem_fun (*this, &VideoMonitor::querystate)); } sync_by_manual_seek = true; - clock_connection = ARDOUR_UI::FPSUpdate.connect (sigc::mem_fun (*this, &VideoMonitor::srsupdate)); + clock_connection = Timers::fps_connect (sigc::mem_fun (*this, &VideoMonitor::srsupdate)); xjadeo_sync_setup(); } @@ -255,9 +255,7 @@ VideoMonitor::is_started () void VideoMonitor::forward_keyevent (unsigned int keyval) { - Editor* ed = dynamic_cast(&PublicEditor::instance()); - if (!ed) return; - emulate_key_event(ed, keyval); + emulate_key_event (keyval); } void @@ -443,6 +441,7 @@ VideoMonitor::set_session (ARDOUR::Session *s) { SessionHandlePtr::set_session (s); if (!_session) { return; } + ARDOUR::Config->ParameterChanged.connect (*this, invalidator (*this), ui_bind (&VideoMonitor::parameter_changed, this, _1), gui_context()); _session->config.ParameterChanged.connect (*this, invalidator (*this), ui_bind (&VideoMonitor::parameter_changed, this, _1), gui_context()); XMLNode* node = _session->extra_xml (X_("XJSettings")); if (!node) { return;} @@ -468,7 +467,7 @@ VideoMonitor::get_custom_setting (const std::string k) return (xjadeo_settings[k]); } -#define NO_OFFSET (1<<31) //< skip setting or modifying offset -- TODO check ARDOUR::frameoffset_t max value. +#define NO_OFFSET (ARDOUR::max_framepos) //< skip setting or modifying offset void VideoMonitor::srsupdate () { @@ -570,7 +569,7 @@ VideoMonitor::xjadeo_sync_setup () process->write_to_stdin("jack connect\n"); } else { process->write_to_stdin("jack disconnect\n"); - clock_connection = ARDOUR_UI::FPSUpdate.connect (sigc::mem_fun (*this, &VideoMonitor::srsupdate)); + clock_connection = Timers::fps_connect (sigc::mem_fun (*this, &VideoMonitor::srsupdate)); } sync_by_manual_seek = my_manual_seek; }